24,628 karma · joined October 21, 2019
https://www.bitecode.dev/
Email: contact at bitecode.dev
It lives in a sterile, idealized world.
Python is a great language for data science in practice because it turns out data science is also:
- gluing a lot of data sources
- cleaning up a ton of terribly shaped data
- validation and error handling
- I/O, networking, and format conversion
- emboarding non-programmers into programming
- wrapping a lot of compiled languages' libs or plugging system
- prototyping stuff and exposing that prototype to some people
- turning prototypes into more permanent projects
And it turns out Python and its ecosystem are good at those while remaining decent at the other things.There are other languages excellent at some of those, or some of the other things, but rarely good at most. And because humanity is vast, diverse, and constantly renewing, being the second best at those is eventually always winning.
Because whoever you are, you will be annoyed at not having the best experience at task X. But you would be mortified if you had the worst experience at doing task Y and Z. And task X, Y, and Z change depending on who you ask.
And you want to get things done, while days have 24 hours.
As usual, to understand the Python phenomenon, you have to see the whole picture. Not your little corner of the bubble. Not the ideal world in your head either. Life is not a maths problem with a clearly laid out premise and an elegant answer.
That's the same debate about why PHP won the web in 2000 no matter the size of the spaghetti plate, why Windows stayed used for so long despite it being terrible, why people keep using iphones after all the abuses, etc. There is more to it than the use case you have every day. People have needs you don't haven't thought about.
So it's not "let the language war begin". It's, "dude, get more experience, go work with accountants, ngos, govs and logistic chains, go work in china, africa and south america, go from a startup to schools to corporate, satisfy the geeks, the artists and the business people, than we'll talk".
I love torrent, but it's legal used are cripple by corporate infra, so it's mostly florishing thanks to illegal stuff paid by shady ads.
And of course I would need to look at all the implications of spying, being locked out of google account and absence of support that are google amo. No time for that. Not for them.
Maybe it's the type of language that attracts people who are interested in getting the details right.
Or maybe the qualities of the language mean if a project manages to reachthe production stage, it will be better than an alternative that would reach the production stage because the minimal level of quality and checks required are better.
Or maybe it's because it comes with very little friction to install and use the software, because Rust software usually comes with a bunch of binaries from all popular platforms, and often, installers.
Or maybe the ecosystem is just very good.
Or maybe it's all together, and something more.
Doesn't matter.
The fact is, I did have a better experience with software written in rust that in Python, JS or even Go or Java.
And I appreciate knowing the software is not written in C or C++, and potentially contains problems regarding security, segfaults, and encoding that are going to bite me down the road, as it's been common in the last 30 years.
So "written in rust" is a thing I want to know, as it will make me more likely to try said software.
If you are afraid that people will think this code is not yours, sign your commits, it's unlikely they will take the time to clone your repo and remake it with new signatures.
But honestly, if it's such a source of stress for you, don't share it. It's ok to not share code. There is no rules that say you have to.
Just because most of us are into FOSS and open source doesn't mean we will less of you if you are not.
Then HN proceed to keep the article at the head of the front page for the day.
from dataclasses import dataclass
@dataclass(order=True)
class AppVersion:
major: int = 0
minor: int = 0
patch: int = 0
@classmethod
def from_string(cls, version_string):
parts = map(int, str(version_string).split('.'))
return cls(*parts)
def __str__(self):
return f"{self.major}.{self.minor}.{self.patch}"
All languages steal from each other, so on a long enough time scale, it makes sense they kinda converge.And no need for AI. I already had family members getting scammed by facebook or mail impersonation.
But at some point, the capability for AI is going to get so cheap it will be mass-produced by bots from millions of identities like SMS or email scams.
It's not an "if". It's a "when".
I'd rather have my mother at least have the reflex to try to send me a message if I can't remember the passphrase to check if it's indeed me.
And if it doesn't, work, it doesn't. I'm not working for a 3 letters agency and my mum is an old tech illiterate lady. There is a limit.
A passphrase is cheap. If you never need to use it, so what?
On top of that, the US can update it all remotely, including the hardware now thanks to things like intel ME.
Let's hope we never get into a conflict with them, because even without bombs, they can basically shut us down with a few keystrokes: https://www.bitecode.dev/p/the-eu-can-be-shut-down-with-a-fe...
Or at least have everything they need to develop such a capability. And it's not like the current people in power care much about alienating other countries.
In places when you don't have a lot of money to go around, solidarity goes a long way, and nobody finds it weird to ask for help.
I understand on HN the average salary allows to pay for a lot, but it's an exception.
In France, it's common that everybody brings something for dinner, for example, even if you are invited.
If you throw a big party and then ask people if they want to help the people that did that, they are usually happy to do it.
I'll add: if you need money but don't want to ask for it upfront, you will need to have someone to ask for it individually to each person mid party.
Just having a box to collect it somewhere, or a sign with a qr code, doesn't work nearly as well.
It's annoying to do, but if your party is good people react surprisingly well to this.
uv has a script mode, a temp env mode, and a way to superimpose a temp env on top of an existing env.
See: https://www.bitecode.dev/p/uv-tricks
That's one of the selling point of the tool: you don't need a project, you don't need activate anything, you don't even need to keep code around.
Yesterday I wanted to mess around with logoru in ipython. I just ran `uvx --with loguru ipython` and I was ready to go.
Not even a code file to open. Nothing to explicitly install nor to clean up.
For a tool that is that fantastic and create such enthusiasm, I'm always surprise of how little of its feature people know about. It can do crazy stuff.
But this is much better. Any plan on open sourcing this infra for sphinx or mkdocs?
Read the doc of https://iommi.rocks/, make a demo project showing of the capability of this tool.
(I have a claude.md with more info, but that's the prompt)
Came back with a fully functional demo with everything installed and working. runserver, and a glance at the code, and I get it.
TL;DR: it's like the django admin, except you can use it in any endpoint in your side. Pretty nice.
It always surprises me (although it shouldn't) how many underrated gems there are still in the world. And new ones are produced every day.
E.G: I still think QTMN will deserve a place as a classic sci-fi author among the great ones, for "there is no antimemetics division" alone. And yet despite a solid fan following, it has never exploded in popularity. It is 10 times better than the 3 body problems, which comparatively had stratospheric success.
In movies, "Amelie" has been a planetary success, but from the same author, the excellent "The city of the lost children" is practically unknown.
Even last month, a tv show named "Nero" came out on Netflix, and while not revolutionary, is clearly above most of the crap that regularly comes out. Yet, nobody talks about it.
Popularity is a cruel mistress.
I assume the beginning of the answer is given to a cheaper, faster model, so that the slower, more expensive one can have time to think.
It keeps the conversation lively and natural for most people.
Would be interesting to test if it's true, by disabling it with a system prompt, and measure if the time-to-answer is slower for the first word.
This solution is interesting, as it provides the patched code as if it were a new package, indendant of the existing one you have installed, like vendoring, but without the burden of it.
In case you want to be the only one seing your patch, this is great. It also makes the whole maintenance easier, as you don't have to wonder if you patch it at the right time or in the right way. MK can fail in many subtle edge cases.
Inheritance, particularly, is a great Mk pitfall I expect this method to transparently work with.