News for hackers. Stuff that matters.
Re:Litecli: CLI for SQLite Databases with auto-completion an... by pdyc on Monday September 09, 2024 @06:03AM (#41486956)
is there a binary only utility like this that does not requires messing up with python?
Re:Litecli: CLI for SQLite Databases with auto-completion an... by rented_mule on Tuesday September 10, 2024 @03:33AM (#41498163)
If you install https://github.com/astral-sh/uv (it's really just two binaries... uv and uvx), then you can run many Python CLIs, and it will manage everything for you. This means resolving and downloading dependencies without touching your system Python. In this case, you'd type `uvx litecli`. If uvx can't find a suitable Python already installed, it will do its best to download a privately managed version. And it's very fast at doing all this.
Re:Litecli: CLI for SQLite Databases with auto-completion an... by synergy20 on Tuesday September 10, 2024 @08:58AM (#41500343)
I assume it works like pipx, caches the download until a new reboot
Re:Litecli: CLI for SQLite Databases with auto-completion an... by rented_mule on Tuesday September 10, 2024 @12:45PM (#41502814)
Yes, uvx's behavior is a lot like pipx, but much faster to start up programs (just as uv is much faster than pip), whether cached or not.
Re:Litecli: CLI for SQLite Databases with auto-completion an... by darkteflon on Wednesday September 11, 2024 @09:04AM (#41510963)
Huh, I’m a big rye user but had no idea that uvx was a drop-in replacement for pipx. Thanks!
Re:Litecli: CLI for SQLite Databases with auto-completion an... by hprotagonist on Tuesday September 10, 2024 @06:43AM (#41499397)
`pipx run litecli`
Re:Litecli: CLI for SQLite Databases with auto-completion an... by dbtablesorrows on Tuesday September 10, 2024 @07:19AM (#41499607)
What's wrong with pipx install?
Re:Litecli: CLI for SQLite Databases with auto-completion an... by hprotagonist on Tuesday September 10, 2024 @03:15PM (#41504432)
nothing!
Re:Litecli: CLI for SQLite Databases with auto-completion an... by CRConrad on Wednesday September 11, 2024 @07:17AM (#41510246)
Lots.

Perhaps not with pipx itself, but as a symptom of what's wrong with Python (and most software nowadays) there are lots of problems with it: Everything is such huge stacks of stuff built on other stuff built on other stuff built on other stuff... All huge tottering heaps of infrastructure where shit can (and does) go wrong in every layer. It's package managers running in containers calling dynamically-linked libraries running on virtual machines calling package managers running in containers calling dynamically-linked libraries running on virtual machines...

With, say, Turbo Pascal you compiled your code into a .COM file, copied it to a floppy, and people ran it. Just your program. On their OS. No heaps of layers of infrastructure and toolchains to get knotted into a tangle of failing interdependencies. How the fuck can it be so impossible to build stuff like that nowadays?!?

Not that I'm blaming pipx (whatevertheheck that is; judging from the name seems to be a relative of pip's, which I've heard of) in particular, or even Python itself, more than anything else. Almost everything nowadays seems to be that way. I just wrote all this in the hope that it might explain why a lot of us (like for instance your interlocutor saghm in a sibling thread) are rather reluctant to pick up all the New[1] Shiny stuff. It all seems to so inevitably bring with it rat's nests -- colonies of rat's nests! -- of interdependent cruft tangled up into tight balls of mud and misery. You lose the will to even start trying anything out.

___

[1]: And yeah, OK, calling Python "New" might be problematic... If we'd gotten around to picking it up some fifteen years ago it might still have been. And maybe not accrued as many layers of cruft.

Re:Litecli: CLI for SQLite Databases with auto-completion an... by dbtablesorrows on Thursday September 12, 2024 @01:01PM (#41522989)
> With, say, Turbo Pascal you compiled your code into a .COM file, copied it to a floppy, and people ran it. Just your program. On their OS. No heaps of layers of infrastructure and toolchains to get knotted into a tangle of failing interdependencies. How the fuck can it be so impossible to build stuff like that nowadays?!?

Go or Java PicoCLI with graalvm gets you pretty close to this ideal. (Now Desktop GUI is a fallen idea and we are talking about CLIs).

Anyway you're blaming the wrong thing. What pipx and venv do in python is fairly simple stuff. It's pretty reliable on standard setups. The problems if any come from C libraries.

The NodeJS Electron stack / docker / kubernetes you can feel free to blame.

Re:Litecli: CLI for SQLite Databases with auto-completion an... by CRConrad on Friday September 13, 2024 @09:02AM (#41530854)
> Go or Java PicoCLI with graalvm gets you pretty close to this ideal.

Oh yippee, only one unnecessary VM layer. :-(

> Now Desktop GUI is a fallen idea and we are talking about CLIs

??? WTF are you talking about? In the real -- i.e. boring old enterprisey -- world, people work in desktop GUIs. (Except of course where those have been replaced by shitty Web-browser UIs.)

Re:Litecli: CLI for SQLite Databases with auto-completion an... by saghm on Tuesday September 10, 2024 @10:02AM (#41500859)
The fact that there are already multiple comments with different tools recommended for how to easily deal with Python packages is a perfect example of why people like the parent commenter don't want to deal with Python in the first place. I'm sure that "just use pipx" works well for you and others, but for those of us who don't know the difference between the half dozen or so different package managers that seem to be mentioned whenever Python comes up, we don't have any clue whether pipx is the "right" choice or if "uv"/"uvx" like the sibling commenter recommends is better. We could spend time researching to figure that out, but that's exactly what we're trying to avoid in the first place!
Re:Litecli: CLI for SQLite Databases with auto-completion an... by rmbyrro on Tuesday September 10, 2024 @01:38PM (#41503398)
There's nothing inherently wrong with having options.

This is the classic trade-off between convention and configuration.

You can prefer a tech stack that values convention over configuration, while others prefer the opposite.

This is totally fine.

Re:Litecli: CLI for SQLite Databases with auto-completion an... by saghm on Tuesday September 10, 2024 @04:31PM (#41505176)
I don't disagree with your premise, but I'd argue that's not what's happening here. My perception that Python doesn't have half a dozen different tools for making package management better because the community values choice and prefers it to having a default option that does everything they want, it's that the default one isn't good enough for what people seem to want, and the community is trying to make up for that.
Re:Litecli: CLI for SQLite Databases with auto-completion an... by darkteflon on Wednesday September 11, 2024 @09:06AM (#41510988)
pyproject.toml + rye/uv is excellent.
Re:Litecli: CLI for SQLite Databases with auto-completion an... by rmbyrro on Wednesday September 11, 2024 @12:47PM (#41513096)
If I had to bet, at least half Python projects use the standard packaging.

Python applications vary widly. Having a single standard option for packaging that is good enough for all isn't the core language goal.

Re:Litecli: CLI for SQLite Databases with auto-completion an... by hprotagonist on Tuesday September 10, 2024 @03:16PM (#41504443)
with choice, comes responsibility.

with no choice comes responsibility too, it's just that neither are yours, and likely aren't what you'd want.

edit: at this time, incidentally, i'm choosing to not use the VC-backed out-of-ecosystem toolchain (ruff, uv); pipx and setuptools do just fine.

Re:Litecli: CLI for SQLite Databases with auto-completion an... by saghm on Tuesday September 10, 2024 @04:34PM (#41505213)
Unfortunately, for a lot of people (including myself), the choice is increasingly to just avoid Python whenever possible rather than try to delve into all of this. I didn't even know that _any_ of the tools were VC-backed.
Re:Litecli: CLI for SQLite Databases with auto-completion an... by hprotagonist on Tuesday September 10, 2024 @05:14PM (#41505659)
It's how language ecosystems work when there's no authority with real power at the top. Python doesn't have real power at the top. Of late the SC thinks it wants to be that power. The developer base, mostly made up of people accustomed to both a language and community that is historically allergic to the idea that you can be told what not to do, largely disagrees. So, you get a cambrian explosion.

C# doesn't have this problem, for example -- though it has others. My (very brief) contact with rust crates as a user suggests that rust does; elisp/emacs absolutely does, and in spades; js might but i've never written a line so i don't know.

end of the day, python solves my business needs, so I've learned to walk the tangle. So much so that it makes sense, usually...

Re:Litecli: CLI for SQLite Databases with auto-completion an... by djbusby on Tuesday September 10, 2024 @10:29AM (#41501152)
I do all my Python stuff in a container. I've found it easier than the N+ other methods. As a bonus when creating the container one can basically just use the tools the project author likes (pip, ,etc) even legacy things from older scripts.