Better HN
topnewbestaskshowjobs
Log inSign up

BiteCode_dev

24,628 karma · joined Oct 21, 2019 (7y ago) · 5,512 submissions

I write to save you time and effort when dealing with Python:

https://www.bitecode.dev/

Email: contact at bitecode.dev

Submissions

511.

UV Tricks(bitecode.dev ↗)

24 points · by BiteCode_dev · 1y ago · 1 comment

comment 1y ago · link · parent

I've been collecting gotchas from using uv myself over the last year to assess whether to recommend it or not and I found surprisingly few. Not zero, but I'm looking pretty hard.

Would love to hear what gotchas to find so I can add that to the list.

comment 1y ago · link · parent

Red arrow pointing at Earth on solar system

Nailed it.

comment 1y ago · link · parent

I don't understand how it's a drama. It's an old spec, it's easy to follow, it's standard, and you can still keep compact with the old .dir at user root if you want.

What's the big deal ?

comment 1y ago · link · parent

This being flagged is interesting in itself.

516.

Yes, you should use a Python venv in a container like Docker(bitecode.dev ↗)

3 points · by BiteCode_dev · 1y ago · discuss

comment 1y ago · link · parent

And rhai is, it allows infinite loops.

comment 1y ago · link · parent

You can say that for everything, after all if it's turing complete you can do anything.

But practically, the difference is intention, which drives design and ecosystem.

E.g: starlark is very oriented toward idempotence and limiting side effects to get reproducible config data. By default they discourage reading files: https://github.com/bazelbuild/bazel/issues/13300

But rhai is not particularly oriented toward config, and the doc promotes an extension to read files: https://rhai.rs/book/lib/rhai-fs.html

The tutorials, stdlib, language design anf tooling will all reflect this.

You probably don't want to use starlark to automate much action, but it will be well suited to describe states.

comment 1y ago · link · parent

Starlark is for config, not scripting.

comment 1y ago · link · parent

I'm a strong proponent of using LLM and use them extensively.

But this is a fireable offense in my book.

comment 1y ago · link · parent

Not the first, but the general idea that the usa behave like ignorant entitled kids with too much power is indeed very worrying for the rest of the world.

comment 1y ago · link · parent

They don't know. The average american is super uneducated and can barely read a graph. Most of the ones that heard about it probaly did thanks to the netlix adaptation to the 3 body problem, but certainly not school.

comment 1y ago · link · parent

Reading this feels like seing a guy getting his first car in 1920 and complaining he still has to drive it himself.

comment 1y ago · link · parent

It's like saying there is good and bad diseases because some solve other problems like space in nursing home.

comment 1y ago · link · parent

Stealing is raking billions every year as well, yet I wouldn't call it productive.

comment 1y ago · link · parent

[flagged]

comment 1y ago · link · parent

no armin created rye then gave it to astral

comment 1y ago · link · parent

Node hasn't solved this mess because it doesn't have the same mess.

It has a super limited compiled extensions ecosystem, plugin ecosystem and is not used as a system language in mac and linux.

And of course node is much more recent and the community less diverse.

tldr: node is playing in easy mode.

comment 1y ago · link · parent

If you are doing otel with python, use Logfire's client... even if you don't use their offering.

It's foss, and ypu can point it to any otel compat enpoint. Plus the client that the pydantic team made is 10 times better and simpler than the official otel lib.

Samuel Colvin has a cool intervew where he explains how he got there: https://www.bitecode.dev/p/samuel-colvin-on-logfire-mixing-p...

comment 1y ago · link · parent

+1 for mindbug and its extensions. The games are quick and nervous, players only have 3 pv.

The card effects are interesting, the illustrations illarious and the interractions a lot of fun.

The twist of the game, the mindbug itself, is a blast of bluffing and gambling that garanties some smiles.

Limited to 2 players but a great small box to have on all occasion of you are into that kind of stuff.

The rules are simple so ir's easy to get in.

comment 1y ago · link · parent

The road to character.

It's a great reality check, poking into human nature, morality, suffering, all with real life examples and littlz tolerance for bullshit without delusion of grandeur.

comment 1y ago · link · parent

Or just ask chatgpt.

comment 1y ago · link · parent

I'd use myst for docs, it's simpler, lighter, and interlinks well.

Quarto is more for publications.

comment 1y ago · link · parent

s/killing/delaying

Until it's good enough it can release it an nobody is the wiser.

comment 1y ago · link · parent

Yes, and then link this things to pre-requisite, and show how several of those one-things come together in a separate piece.

But again, it's a LOT of work to do that.

E.G:

To write "https://www.bitecode.dev/p/back-to-basics-with-pip-and-venv", I need to be able to rely on "https://www.bitecode.dev/p/installing-python-the-bare-minimu..." which in turn needs to rely on "https://www.bitecode.dev/p/ultra-beginners-first-steps-for-t...".

That's almost 9000 words, or 10% of the average novel size just to give beginners a good chance of success on one single topic.

Between doc, tutorials, FOSS and forums, the entire software industry is just standing on a gigantic pile of billions of hours of free labor.

comment 1y ago · link · parent

And the names of packages to install. Don't assume the imports match it. Check.

comment 1y ago · link · parent

Lot of good advice.

I'll nitpick a bit.

You can't tell your user to "echo 'awesomecopter' | sudo tee /etc/hostname" if you may have windows users.

And even for purely linux user, "Good: Give the reader a bash snippet that evaluates conditional logic for them" is quite a scary wall of code for a beginner that as no idea why copy/paste that.

All in all, don't confuse "giving the shortest path to a working solution" and "teaching", which both can be in a tutorial, but they have different goals and you should choose accordingly.

I think the "Teach one thing" is probably the best advice in the article, and too often ignored. I remember as a kid reading Swinnen's book to learn Python and having to understand OOP with his example using ions was a terrible experience.

And if you think "well you should have known that, they teach it in school", you are missing the point.

That being said, writing an excellent tutorial takes a lot of work. Way more than a good-enough one. Choose wisely.

comment 1y ago · link · parent

At this stage, notebooks should be a GUI powered docker-like image format you download and then click to run.

Non programmers using notebooks are usually the least qualified to make them reproducible, so better just ship the whole thing.

comment 1y ago · link · parent

The last paragraph let me think your normal is particularly collaborative lol.
1
171819
184