HNHacker News
TopNewBestAskShowJobs

BiteCode_dev

24,628 karma · joined October 21, 2019

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

https://www.bitecode.dev/

Email: contact at bitecode.dev

submissionscomments
BiteCode_dev··on EU age verification app to ban any Android system not licensed by Google
In the 1930s, the Dutch government conducted a census that included religion. The Netherlands, after all, had a comprehensive population registry system (Bevolkingsregister) established in the 19th century. This registry was centralized, continuously updated, and included religion, addresses, family connections, and occupations.

After the German occupation in 1940, the Nazis accessed and exploited the Dutch population registry, including religious affiliation.

About 75–80% of the ~140,000 Jews in the Netherlands were killed.

This is the highest percentage in Western Europe.

Compare that to France, which had a more fragmented administrative system, and less complete central records and 25% of Jews in France were deported and killed — a much lower percentage than the Netherlands.

As usual, when reaching the Godwin point, the idea is not for you to take it at face value, but to extrapolate to your situation.

The concentration of power and centralized people tracking are eventually always abused, and once your system becomes less free (which has historically eventually happened on a long enough timescale), you will pay the price for it.

In our case, having a full history of all opinions, interactions, locations, and behavior linked to full identity of people is what we are ultimately talking about here. It's already well on its way, but it will make it worse.

The more you concentrate power and feed data about people, the greater the potential damage.

And of course, it doesn't need to be a full-on dictatorship to get problems with those.

It's a spectrum of increasing problems you will get, the more you lean into it.

BiteCode_dev··on Keep Pydantic out of your Domain Layer
You can certainly do it, but since serialization and validation are the main benefit from using Pydantic, I/O are why it exists.

Outside of I/O, the whole machinery has little use. And since pydantic models are used by introspection to build APIs, automatic deserializer and arg parsing, making it fit the I/O is where the money is.

Also, remember that despite all the improved perf of pydantic recently, they are still more expensive than dataclass, themselves more than classes. They are 8 times more expensive to instanciate than regular classes, but above all, attribute access is 50% slower.

Now I get that in Python this is not a primary concern, but still, pydantic is not a free lunch.

I'd say it's also important to state what it conveys. When I see a Pydantic objects, I expect some I/O somewhere. Breaking this expectation would take me by surprise and lower my trust of the rest of the code. Unless you are deep in defensive programming, there is no reason to validate input far from the boundaries of the program.

BiteCode_dev··on Keep Pydantic out of your Domain Layer
Because they don't represent the same thing. Pydantic models represent your input, it's the result of the experience you expose to the outside world, and therefore comes with objectives and constraints matching this:

- make it easy to provide

- make it simple to understand

- make it familiar

- deal with security and authentication

- be easily serializable through your communication layer

On the other hand, internal representations have the goal to help you with your private calculations:

- make it performant

- make it work with different subsystems such as persistence, caching, queuing

- provide convenience shortcuts or precalculations for your own benefits

Sometimes they overlap, or the system is not big enough that it matters.

But the more you get to big or old system, the less likely they will.

However, I often pass around pydantic objects if I have them, and I do this until it becomes a problem. And I rarely reach that point.

It's like using Python until you have performance problems.

Practicality beasts premature optimization.

BiteCode_dev··on The Promised LAN
* offer comes with some money-binding requirements
BiteCode_dev··on Android Earthquake Alerts: A global system for early warning
I agree and wish it would be a separate app you can install or not instead of part of the system.
BiteCode_dev··on NIH limits scientists to six applications per year
Is there ground to sue those people?
BiteCode_dev··on Speeding up my ZSH shell
Plus, a lot of the goodies can be added with compiled programs like Starship or Atuin. Less config, faster, work across several shells.
BiteCode_dev··on Debcraft – Easiest way to modify and build Debian packages
You are not alone, packaging a deb is hard, mostly because the documentation sucks.
BiteCode_dev··on Valve confirms credit card companies pressured it to delist certain adult games
Tangent, but each of those events should be a reminder of why we must fight to never, ever live in a cashless society.

Because once big entities control the pipeline of what you can buy and you have no alternative, they basically can dictate what you can and can't do.

We saw that during the wikileak story when visa prevented Europeans to give to the org despite the fact it was perfectly legal to do so on their soil.

Just like data handled by an Apple device is not really your data since they can prevent you from doing what you want with it, money handled by Visa is only your money until they don't like what you do with it.

BiteCode_dev··on The EU can be shut down with a few keystrokes
During WW 2, the entire economy didn't have things like a cold chain, thousands of gas stations, a JIT food supply, half the country working white collar jobs, most heating relying on electricity to work, administration going mostly online, people having to commute 30 minutes away on average, electronic payment being the norm, most of the economy running on something virtual and a super dependence on the outside world for pretty much everything.

It's not about Google, it's about what critical part of our system now relies on Google to function.

Having lived in Africa, I can live in pretty minimalist conditions.

I don't think the EU is ready for them, though.

BiteCode_dev··on The EU can be shut down with a few keystrokes
Hence the "less so".

If left it for this reason, but it didn't become bad, let's not push it.

It has solid foundations.

BiteCode_dev··on The EU can be shut down with a few keystrokes
Yes, but those schools do produce more strong engineers, thinkers, and company leaders than other schools in the country.
BiteCode_dev··on Psilocybin decreases depression and anxiety in cancer patients (2016)
That's not a risk, that's a realization. You need those.

You may have saved 20 years in an unhappy marriage.

BiteCode_dev··on NIH is cheaper than the wrong dependency
Most professionals are average, by definition, because skill follows a Gauss curve.

HN is a bubble, the world runs on "meh".

BiteCode_dev··on My favorite use-case for AI is writing logs
I have a /addlogs claude command just for that. Logging is mostly boiler plate, I'm glad I can outsource it.
BiteCode_dev··on A Rust shaped hole
And global states.

I remember the first time I was using gettext and wonder "wait, why do I have to switch the language for my whole program if I need it for just this request?" and realized that's because GNU gettext was made like that.

BiteCode_dev··on I'm switching to Python and actually liking it
I'd say the switch was learning that Google Search was written in Python (remember when error pages URL were in .py ?), and Youtube rewritten in Python. After that, reddit and dropbox followed (and later Instagram).

Apple also added Python in, I think, Mac OS X Jaguar, so it blipped on the radar.

When you have big players using it, the community automatically grows.

Django was the continuity of that and definitely contributed to the growing popularity of Python, but I think the hype started way before (and in fact we had to suffer Zope/Plone/Twisted for it :)).

Another decisive date was circa 2010 when the Belgian book "learn programming with python" came out. Granted, Django was already 5 years old at the time, but it brought many beginners who knew nothing about programming at the time.

BiteCode_dev··on I'm switching to Python and actually liking it
ty is still in alpha, I wouldn't recommend it yet. It's fast but has many false positives. In the words of charlie himself: https://bsky.app/profile/crmarsh.com/post/3lp2xikab222w

uv + ruff (for formatting AND linting) is a killer combo, though.

And the more you use uv, the most you discover incredible stuff you can do with it that kills so many python gotchas like using it in the shebang with inline deps or the wonders of "--with":

https://www.bitecode.dev/p/uv-tricks

BiteCode_dev··on I'm switching to Python and actually liking it
It's quite crazy, as Python first version was in 1991, 4 years before Java. It's a language with a ton of legacy baggage, the 2/3 transition, the BDLF being replaced by a completely different project leadership system, and it still keeps going strong.

This interview from Brett Cannon (old core dev who worked on packaging, imports, the vscode python extension...) is eye opening:

https://www.bitecode.dev/p/brett-cannon-on-python-humans-and

The guy cares SO MUCH and they have so many things not to break you can feel the sense of passion and the weight of responsibility in everything he says.

BiteCode_dev··on Fine dining restaurants researching guests to make their dinner unforgettable
In fact, many people on HN work for Google.
BiteCode_dev··on Five companies now control over 90% of the restaurant food delivery market
Getting in the market now is super tough.

We have a French company, called Delicity, that has been doing just that for the last few years. They have a smart strategy and determined people.

It works, but they have to fight tooth and nail for each city they get a foothold in.

I had a call with the founder, the guy has more dark circles than visible eyes.

BiteCode_dev··on Five companies now control over 90% of the restaurant food delivery market
They removed friction by centralizing all restaurants so you can choose from one place, standardizing the experience no matter the food source, making selection simple and payment/refund easy.

The human brain is wired to go the way of the least resistance short term, no matter the cost long term, so customers pay a lot for that.

I have many pizza places that tell me they still deliver themselves for cheaper: almost nobody takes the option, they use the giant company app.

BiteCode_dev··on Switching to Claude Code and VSCode Inside Docker
Another advantage of running claude inside a container is that you can use "--dangerously-skip-permissions" and let it do a thing in full autonomy for 2 hours. With a good prompt, abundant feedback like centralized logging and tests and a clear Claude.md, it can get pretty far on its own.
BiteCode_dev··on Underwater turbine spinning for 6 years off Scotland's coast is a breakthrough
I downvoted you because you played victim, not because of your opinion on energy production and ecology. I assume many did the same.
BiteCode_dev··on Underwater turbine spinning for 6 years off Scotland's coast is a breakthrough
Who said you were not allowed to ask these questions?
BiteCode_dev··on Thunderbird 140 “Eclipse”
We don't know how to make it reproducible.

What developers should do on such a critical and long standing issue is to offer an extension that victims can install to volunteer to track the bug. So they can click a button when things are fine to take a snapshot, and click another one when they encounter it.

I would install that and be part of the solution.

BiteCode_dev··on Thunderbird 140 “Eclipse”
It happens to me regularly. You can fix it by redownloading the message from the server using the "repair folder" feature, and I have backup, but it IS infuriating.

I have no good alternative to thunderbird, it does so much of what I want. But this bug is awful.

BiteCode_dev··on Nobody has a personality anymore: we are products with labels
I think after a few expressions of time blindness, they'll discover that their contracts have continuity deficiency and their career vertical expression challenges.

The feedback of reality will fix it, like for all young people.

BiteCode_dev··on Bitchat – A decentralized messaging app that works over Bluetooth mesh networks
Delta chat does this, without the micropayment.
BiteCode_dev··on We're not innovating, we're just forgetting slower
Everything in the physical world is the same. There are hundreds of pieces even in the smallest toaster, and no one in the world knows how to make half of one without all those external dependencies:

https://www.youtube.com/watch?v=5ODzO7Lz_pw

It's not a software thing, it's just how humanity works.

← PreviousPage 11 of 34Next →