Hacker Newsnew | past | comments | ask | show | jobs | submit | more BiteCode_dev's commentslogin

If the libraries are meant to be used together, you can get away with one venv. If they should be decoupled, then one venv per lib is better.

There is not much to know:

- uv python install <version> if you want a particular version of python to be installed

- uv init --vcs none [--python <version>] in each directory to initialize the python project

- uv add [--dev] to add libraries to your venv

- uv run <cmd> when you want to run a command in the venv

That's it, really. Any bonus can be learned later.


There's also workspaces (https://docs.astral.sh/uv/concepts/projects/workspaces/) if you have common deps and it's possible to act on a specific member of the workspace as well.


That's one of the bonus I was thinking about. It's nice if you have a subset of deps you want to share, or if one dep is actually part of the monorepo, but it does require more to know.


Thanks. Why is the notion of run and tool separate? Coming from JS, we have the package.json#scripts field and everything executes via a `pnpm run <script name>` command.


Tool ?

Maybe you mean uv tool install ?

In that case it's something you don't need right now, uv tool is useful, but it's a bonus. It's to install 3rd party utilities outside of the project.

There is no equivalent to script yets, althought they are adding it as we speak.

uv run exec any command in the context of the venv (which is like a node_modules), you don't need to declare them prior to calling them.

e.g: uv run python will start the python shell.


I was looking at https://docs.astral.sh/uv/concepts/tools/#the-uv-tool-interf...

Edit: I get it now. It's like npm's `npx` command.


uvx is the npx equivalent, it's provided with ux, and also has some nice bonuses.


uv sync if you clone a github repo


uv run in the freshly cloned repo will create the venv and install all deps automatically.

You can even use --extra and --group with uv run like with uv sync. But in a monorepo, those are rare to use.


Thanks for the info.

I looked at the group documentation, but it's not clear to me why I would want to use it, or where I would use it:

https://docs.astral.sh/uv/concepts/projects/layout/#default-...

(I'm a JS dev who has to write a set of python packages in a monorepo.)


sync is something you would rarely use, it's most useful for scripting.

uv run is the bread and meat of uv, it will run any command you need in the project, and ensure it will work by synching all deps and making sure your command can import stuff and call python.

In fact, if you run a python script, you should do uv run python the_script.py,

It's so common uv run the_script.py will work as a shortcut.

I will write a series of article on uv on bitecode.dev.

I will write it so that it work for non python devs as well.


Did you mean group and not sync?

Really looking forward to the articles!


Sorry i misread and stayed on sync. Group and extras are for lib makers to create sets of optionals dependenacies. Groups are private ones for maintainers, extras are oublic one for users.


I miss dukto r5.


https://wormhole.app/ has been spared and is pretty good. Encrypted, dl can start before up is finished, decent size limit.

Unrelated to the wormhole python cli tool and associated file sharing protocol.


Both not to be confused with Web Wormhole, which is also pretty good: https://webwormhole.io/

Slightly different approach – "P2P first", i.e. both sender and receiver need to be online simultaneously throughout the transfer, but there's a TURN relay, so it should work in almost all network constellations.


It's not a p2p tool btw.


It can be, if you send files larger than 5GB. https://wormhole.app/faq


Yeah, it uses webtorrent behind the scenes: https://webtorrent.io

...which is freaking awesome torrent software, by the way.


It's okay - 99% of the video files I download have to be opened in VLC, though :/

But still, being able to almost immediately stream, even if through VLC, is pretty nice.


I use https://onionshare.org/. It's not p2p afaik, but dang! that one is easy to work with.


In France there are mentions of the colonies, slavery, and ensuing wars. And you study napoleon of course.

But there is never a critic of it, it's mentioned as matter of fact for the first, and only in positive for the second.

I had to grow old to realize "wait, napoleon was basically our hitler...".


Napoleon is certainly a complicated figure and his raw ambition caused death and misery for millions. I don't think he carried out any genocides though, did he? I see an accusation of genocide online ( https://en.wikipedia.org/wiki/Napoleon%27s_Crimes ), but it doesn't sound very credible.


Complicated doesn't begin to describe him! I think that, by our modern standards, I would be very unhappy to be a citizen of Napoleon's empire.

However, considering the available governments in Europe at the tail end of the 18th century, I think a time-traveller such as myself would be more interested in spending a few years in France than any of her neighbours. I imagine I would think differently if I came from an aristocratic background!


Indeed, he didn't commit genocide, but his wars ended up killing 3.5 to 6 millions people, a staggering amount for the time.

Given that those deaths were basically because of his lust for territorial extension and disregard for human life, I would say we are in a similar ballpark as Mao, Hitler, Stalin, etc.

Of course, our history books are quick to state he made reforms, particularly legal and administrative ones, that benefitted our country a lot and still echo benefits today.

But again, I think if you a responsible for millions of deaths because of your desire for conquest, any arguments you can make in the other way are instantly moot.

You may, however, made the argument that it would have been better to be a French citizen at the time than somewhere else, depending on where and how you were born. But it's a different point.


I've never killed anyone, should I get your gratitude for it?


It's funny that this line of defense is sincerely attempted here, as it's so absurd that it's actually the punchline of an SMBC comic. And honestly, one of my favorite ones that I find genuinely very funny.

>Lawyer: Okay, let's say my client killed his wife. What about the people he didn't kill?! That's six billion people! Don't they matter? Don't they matter?!

>Caption: In an alternate universe, Jeffrey Dahmer has a thank you parade every year.

https://smbc-comics.com/index.php?db=comics&id=299


One of my friends is a doctornspecialist in treating musicians. He told le once it is a well known phenomenon, and worst, if you practice too much without rest, you can damage your brain in a way that makes it difficult to progress later.


Chrome had been on the biggest and most VIP billboard on the planet:

https://open.substack.com/pub/bitecode/p/web-browsers-and-ou...

Nobody can get it except chrome.


Yup, I don't understand why Google would sponsor McLaren F1 team. They've already done a better promoting Chrome.


I hope one day we will all move to something like Cuelang.


Assuming you meant Cue: https://cuelang.org/

See also Dhall.


It's nice, but not a lot of bindings from what I can tell.


If it's not the father's choice, it's like stating raped women should always raise the kid.


Same with blood types.

Clearly lots of people never listen in biology class.


As one of the referred 'lots', care to explain a bit more?


Some combinations are impossible.

E.G: both biological parents cannot be A and the kids be AB


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: