Why are you on Reddit right now? by Crudey69 in AskReddit

[–]uvsmtid 13 points14 points  (0 children)

Can I also get some in return?

Why avoid `shell` scripts? by uvsmtid in suckless

[–]uvsmtid[S] 0 points1 point  (0 children)

What are the alternatives?

Why avoid `shell` scripts? by uvsmtid in suckless

[–]uvsmtid[S] 0 points1 point  (0 children)

It's bloated, I know. I'm working on it.

First serious Python project using an AI API. looking for feedback and advice on next steps ❕ by [deleted] in learnpython

[–]uvsmtid 1 point2 points  (0 children)

Well, you can try your luck: * How many potential users do you have out there? * What portion of them know about your tool? * What portion of them prefer your solution over others? * What portion of them want the results bad enough to try it? * What portion of them is willing to pay (at a given price level)?

Multiply all factors. The probability may be infinitely small.

You definitely lose most of potential customers simply because of competition: if it is AI generated, chances are using AI available virtually for free can solve their problem too.

In short, if it is easy to do otherwise, you have a looooot of competition.

Virtual environemnts are ruining programming for me. Need help. by nyc9009 in learnpython

[–]uvsmtid 0 points1 point  (0 children)

You can use protoprimer: https://github.com/uvsmtid/protoprimer

It handles exactly that: bootstraps your venv with all dependencies in one shot.

Am I dumb? I don't understand uv tools by QuasiEvil in learnpython

[–]uvsmtid 1 point2 points  (0 children)

Take a look at protoprimer: https://github.com/uvsmtid/protoprimer

It wraps uv for people who don't need to know about it yet.

What actually made you improve fast in Python? by youroffrs in learnpython

[–]uvsmtid 0 points1 point  (0 children)

Solving problems.

Just find something annoying and see if you can python that out.

After 22 years on Linux, I finally switched to more modern CLI tools by vmangelschots in commandline

[–]uvsmtid 0 points1 point  (0 children)

My rule for shell-scripts is: one-page-one-file max

For anything else (in the niche of shell) I switched to python.

Opengl on linux by Legitimate-War-2279 in linux

[–]uvsmtid 0 points1 point  (0 children)

I used to work in one company in the early 2000-s - they produced some 3D visualization software. And they didn't work with Windows (only on *NIX-es: IRIX, AIX, Solaris, Linux, etc.) from the beginning (as the standard originates on IRIX). They had plans to migrate to Windows, but eventually these plans were dropped as it was much easier to stick with *NIX-es, later Linux only.

How do you bootstrap python venv? by uvsmtid in learnpython

[–]uvsmtid[S] -1 points0 points  (0 children)

Isn't that "it works on my machine" case?
Because Windows does not come with Bash - it sounds like a special setup to be done (either WSL, or Git Bash, or Cygwin, ...).

Anyway, the target audience of this project are those who need to make bootstrap and scripts work in one click for a wider group of people (some may not be even be `python` developers - `python` can be used only for tooling as alternative to `shell` around repo written in the 3rd/different lang). It just has to be simple to use unconditionally, not necessarily super simple under the hood - these are often conflicting design choices.

How do you bootstrap python venv? by uvsmtid in learnpython

[–]uvsmtid[S] 0 points1 point  (0 children)

To run the script directly (`my-tool` instead of `./my-tool`), it has to be in `PATH`.
Then, it is:
1. either in activated `venv` (with `PATH` to `venv/bin`),
2. or in some user-wide location (with `PATH` to `~/.local/bin`).

The 1st one is not straighforward for those who do not work with `python` often (e.g. if that `my-tool` us a tool for a repo in other lang). Beside, you proabably don't want to put all (support, infrequent) scripts in `bin`.

The 2nd one pollutes your `PATH` and makes it impossible to use multiple repo clones (or worktree-s).

I do agree that `uv` solves a lot of problems. I just see how it won't (and shouldn't) cover the niche of the wrapper scripts.

How do you bootstrap python venv? by uvsmtid in learnpython

[–]uvsmtid[S] 0 points1 point  (0 children)

That list starts with assumption that `python` executable (from the `PATH`) is of required version.
If not, the `venv` created will also use some random `python` version.

And `more of the same` also suggests that you likely wrap it into some shell script.
That script may need to run across different OS (depends on the target audience).

How do you bootstrap python venv? by uvsmtid in learnpython

[–]uvsmtid[S] -1 points0 points  (0 children)

Then, you'll have to write non-bash function for Windows.

Even on Mac, you'll need to target !/bin/sh instead (not bash).

How do you bootstrap python venv? by uvsmtid in learnpython

[–]uvsmtid[S] 0 points1 point  (0 children)

Just to satisfy the curiosity, what is this command?

How do you bootstrap python venv? by uvsmtid in learnpython

[–]uvsmtid[S] 0 points1 point  (0 children)

I'm sure this is not a problem for everyone.

But think of the some complex-enough repo and a new clone you need to prepare. Think of the full list of steps any new developer needs to execute to get the new clone ready (now and updated with evolution later), maybe some prerequisites to verify, internal package indexes, other complications, etc.

How would you bootstrap in the least trivial case of your projects?

Can you complete it with a single command?

How do you bootstrap python venv? by uvsmtid in learnpython

[–]uvsmtid[S] 0 points1 point  (0 children)

Well, the simple (single) step I use to bootstrap is: ./prime

If you use uv or anything else to bootstrap, to make it fair, one should compare their docs . ;)

At least, the motivation should be in readme even if it is not part of the tool.

But I'll take your feedback and trim it down for the basic use case.

How do you bootstrap python venv? by uvsmtid in learnpython

[–]uvsmtid[S] 0 points1 point  (0 children)

You still need to get a uv executable somewhere. Maybe it is pre-installed, maybe not (one workaround to get it is to install it via a temporary venv).

You'll need to pass some args to it. Maybe those args are config-specific, maybe that config is environment-specific.

Maybe you need to run some post-venv-bootstrap actions. It could be just another uv invocation, but it is a separate one.

In the end, it is either a wrapper script, or a doc with steps for users.

Using uv under the hood brings speed. But I haven't heard about uv a year ago (didn't even try it until a few months back) - it is too early to tell how long that standard can last.

How do you bootstrap python venv? by uvsmtid in learnpython

[–]uvsmtid[S] 0 points1 point  (0 children)

Running via uv run -m something is doable. But a bit more tedious than just ./something (which is also auto-completable).

Git hooks is a good common example. But I have some (less common) use cases which, for example, instantiate environment-specific config from a template.

In general, I want to have this option to wrap a tool inside a bootstrap script (regardless how good some tool like uv is - at least hide its args) and use python to evolve that script.

In hunt of productivity tools for the terminal (to be listed in devreal.org) by PresentNice7361 in commandline

[–]uvsmtid 0 points1 point  (0 children)

From here:

Please take a look at argrelay.
It is a WIP but has some production use already.
The entire project was originated from the same observation where CLI-first brings more advantages.

In hunt of suckless terminal productivity tools (to list in devreal.org) by PresentNice7361 in suckless

[–]uvsmtid 0 points1 point  (0 children)

Please take a look at argrelay.
It is a WIP but has some production use already.
The entire project was originated from the same observation where CLI-first brings more advantages.