Live data from Hacker News

Harlequin: SQL IDE for Your Terminal

github.com

21–30 of 89 posts

Re: Harlequin: SQL IDE for Your Terminal

#21

Every time I notice something is a Python codebase I feel a letdown as it means it will likely break some other Python project from someone else I have on my dev machine which I may not have touched in a while but which I will find got silently broken when I most need it Especially if it's a nice TUI app like this looks EDIT: Guys, in my experience, virtual environments do not fix this problem in all cases . At least…

This isn’t an issue if you use virtual environments. See also pipx for installing isolated Python apps.

Re: Harlequin: SQL IDE for Your Terminal

#22
post #8
post #7

Question: do people love TUI, because they love being in a terminal? Or ... is this a movement against application bloat, which has become all to common these days? EDIT: why the downvotes?

If you develop SQL you need to write code and view tables. A grid with monospace characters is perfectly suitable for that. But other than that, no, people don't love being in a terminal. It just happens that all open source portable toolkits like qt and gtk do not work via ssh and are in general total abominations for developers and users. The vt100 standard is 45 years old and turned out to be the lowest common den…

I actually like being in the terminal for the most part. The vast majority of GUI applications are a huge disappointment.

Re: Harlequin: SQL IDE for Your Terminal

#23
post #8
post #7

Question: do people love TUI, because they love being in a terminal? Or ... is this a movement against application bloat, which has become all to common these days? EDIT: why the downvotes?

If you develop SQL you need to write code and view tables. A grid with monospace characters is perfectly suitable for that. But other than that, no, people don't love being in a terminal. It just happens that all open source portable toolkits like qt and gtk do not work via ssh and are in general total abominations for developers and users. The vt100 standard is 45 years old and turned out to be the lowest common den…

> The vt100 standard is 45 years old and turned out to be the lowest common denominator to write GUIs for better or worse.

I would say the web browser is the lowest common denominator

Re: Harlequin: SQL IDE for Your Terminal

#24
post #23
post #8

Earlier quoted context omitted.

If you develop SQL you need to write code and view tables. A grid with monospace characters is perfectly suitable for that. But other than that, no, people don't love being in a terminal. It just happens that all open source portable toolkits like qt and gtk do not work via ssh and are in general total abominations for developers and users. The vt100 standard is 45 years old and turned out to be the lowest common den…

> The vt100 standard is 45 years old and turned out to be the lowest common denominator to write GUIs for better or worse. I would say the web browser is the lowest common denominator

That's assuming you can open up a port on a remote machine, which isn't always the case.

Re: Harlequin: SQL IDE for Your Terminal

#25

Every time I notice something is a Python codebase I feel a letdown as it means it will likely break some other Python project from someone else I have on my dev machine which I may not have touched in a while but which I will find got silently broken when I most need it Especially if it's a nice TUI app like this looks EDIT: Guys, in my experience, virtual environments do not fix this problem in all cases . At least…

every project you have should be in a virtual environment. it is not hard. https://docs.python.org/3.12/library/venv.html python -m venv ~/my-venvs/ source ~/my-venvs/name/bin/activate pip install but stuff like this would usually get installed globally, and your projects would instead have a venv. personally my favorite tool is pyenv, which allows you to have many versions of python on your machine as well as many v…

> every project you have should be in a virtual environment

It's like ye-olden days. Now we can go back to static linking and bundling everything in jar files and call it a win!

Re: Harlequin: SQL IDE for Your Terminal

#26

Every time I notice something is a Python codebase I feel a letdown as it means it will likely break some other Python project from someone else I have on my dev machine which I may not have touched in a while but which I will find got silently broken when I most need it Especially if it's a nice TUI app like this looks EDIT: Guys, in my experience, virtual environments do not fix this problem in all cases . At least…

every project you have should be in a virtual environment. it is not hard. https://docs.python.org/3.12/library/venv.html python -m venv ~/my-venvs/ source ~/my-venvs/name/bin/activate pip install but stuff like this would usually get installed globally, and your projects would instead have a venv. personally my favorite tool is pyenv, which allows you to have many versions of python on your machine as well as many v…

Yeah. I've heard this same comment before in different forms from "Python apologists" about a dozen times. In practice it's still a lot of hair-pulling, because your entire comment assumes that EVERY Python project is already doing things exactly this way and hasn't screwed up a single part of it: https://twitter.com/pmarreck/status/1735363908515295253

but also...

> but stuff like this would usually get installed globally

well, you just killed (apparently unknowingly?) your whole argument right there, because globals are bad and absolutely not project-specific and absolutely do cause compatibility issues between different Python projects

If you ever come around to Nix, it takes care of this problem for good (as in, it guarantees that you will never have 2 projects that step on each other), across every ecosystem, not just Python's. Unfortunately, I don't see very many Python projects at all that contain a flake.nix file, which is a damn shame, because it would cause people like me to hate Python just a tiny bit less

Re: Harlequin: SQL IDE for Your Terminal

#27
post #7

Question: do people love TUI, because they love being in a terminal? Or ... is this a movement against application bloat, which has become all to common these days? EDIT: why the downvotes?

I'm not excited about it being a TUI, I'm just excited because it looks reasonable and I haven't found a macOS SQL client for writing queries that I was excited about yet

Re: Harlequin: SQL IDE for Your Terminal

#28
post #18

Every time I notice something is a Python codebase I feel a letdown as it means it will likely break some other Python project from someone else I have on my dev machine which I may not have touched in a while but which I will find got silently broken when I most need it Especially if it's a nice TUI app like this looks EDIT: Guys, in my experience, virtual environments do not fix this problem in all cases . At least…

Install using pipx to avoid that. (or virtualenvs directly if you don't mind getting your hands dirty)

see my response to your sibling comment by whalesalad.

Re: Harlequin: SQL IDE for Your Terminal

#29

Earlier quoted context omitted.

every project you have should be in a virtual environment. it is not hard. https://docs.python.org/3.12/library/venv.html python -m venv ~/my-venvs/ source ~/my-venvs/name/bin/activate pip install but stuff like this would usually get installed globally, and your projects would instead have a venv. personally my favorite tool is pyenv, which allows you to have many versions of python on your machine as well as many v…

Yeah. I've heard this same comment before in different forms from "Python apologists" about a dozen times. In practice it's still a lot of hair-pulling, because your entire comment assumes that EVERY Python project is already doing things exactly this way and hasn't screwed up a single part of it: https://twitter.com/pmarreck/status/1735363908515295253 but also... > but stuff like this would usually get installed glo…

Hair pulling? It's the most barebones unix thing you can imagine. If you understand unix principles, you can use virtual environments and python.

It used to be hard. A global site-packages or dist-packages dir is hard. Conda and all those tools make it worse.

A virtualenv is a directory. It contains a copy of Python and everything needed.

You don't even need to activate it. You can simply use the binaries that exist in those directories.

It's literally this simple:

    $ python -m venv pmarreck
    $ pmarreck/bin/python --version
    Python 3.10.12
    $ pmarreck/bin/pip install harlequin
    Collecting harlequin
      Downloading harlequin-1.8.0-py3-none-any.whl (61 kB)
        ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 1.2 MB/s eta 0:00:00
    ...
    Successfully installed MarkupSafe-2.1.3 click-8.1.7 duckdb-0.9.2 harlequin-1.8.0 jinja2-3.1.2 linkify-it-py-2.0.2 markdown-it-py-3.0.0 mdit-py-plugins-0.4.0 mdurl-0.1.2 numpy-1.26.3 platformdirs-3.11.0 prompt_toolkit-3.0.36 pyarrow-14.0.2 pygments-2.17.2 pyperclip-1.8.2 questionary-2.0.1 rich-13.7.0 rich-click-1.7.3 shandy-sqlfmt-0.21.1 textual-0.46.0 textual-fastdatatable-0.5.0 textual-textarea-0.9.5 tomli-2.0.1 tomlkit-0.12.3 tqdm-4.66.1 tree-sitter-0.20.4 tree_sitter_languages-1.9.1 typing-extensions-4.9.0 uc-micro-py-1.0.2 wcwidth-0.2.12

    $ pmarreck/bin/harlequin
Boom, the tool launched immediately. No conflicts with anything else. When I am done, `rm -rf ~/pmarreck`, done.

I did all of this in my home directory.

It literally cannot get easier than this.

Re: Harlequin: SQL IDE for Your Terminal

#30

Earlier quoted context omitted.

Yeah. I've heard this same comment before in different forms from "Python apologists" about a dozen times. In practice it's still a lot of hair-pulling, because your entire comment assumes that EVERY Python project is already doing things exactly this way and hasn't screwed up a single part of it: https://twitter.com/pmarreck/status/1735363908515295253 but also... > but stuff like this would usually get installed glo…

Hair pulling? It's the most barebones unix thing you can imagine. If you understand unix principles, you can use virtual environments and python. It used to be hard. A global site-packages or dist-packages dir is hard. Conda and all those tools make it worse. A virtualenv is a directory. It contains a copy of Python and everything needed. You don't even need to activate it. You can simply use the binaries that exist…

And this works with every existing Python project out there? What about `requirements.txt` projects?
Post reply on HN