24,628 karma · joined Oct 21, 2019 (7y ago) · 5,512 submissions
https://www.bitecode.dev/
Email: contact at bitecode.dev
211.
Pre-PEP: Rust for CPython(discuss.python.org ↗)
5 points · by BiteCode_dev · 11mo ago · 5 comments
comment 11mo ago · link · parent
- Creation - 8-12x slower
- Lookup - 22-27x slower
- Contains check - 30-34x slower
- Iteration - 5-14x slower
- Merge - 32-158x slower
Except at 10k+ items, batchup dates on 100K+ items or inserting 100 keys.This is rarely the case in practice, most dictionaries and dict operations are small, if you have a huge dict, you probably should be chunking your load or delegating that to infra.
Not to mention pyrsistent's API is incompatible with dicts, so you can't pass it to external code without conversion.
You'd better have an incredible ROI to justify that.
comment 11mo ago · link · parent
This morning for example, I tested an object serialized through a JSON API. My test data seems to never match the next run.
After a while, I realized one of the objects was using a set of objects, which in the API was turned into a JSON array, but the order of said array would change depending of the initial Python VM state.
3 days ago, I used itertools.group by to group a bunch of things. But itertools.group by only works on iterable that are sorted by the grouping key.
Now granted, none of those recent example are related to dicts, but dict is not a special case. And it's iterated over regularly.
219.
Nvidia allowed to sell its H200 chips to China, the gov takes a 25% cut(theguardian.com ↗)
10 points · by BiteCode_dev · 11mo ago · 3 comments
comment 11mo ago · link · parent
- a lot of C code out there is not safe, so the LLM outputs that
- C encodes way less of the programmer's intention, and way more implementation details. So unless the author is extremely good at naming, encapsulating and commenting, the LLM just has less to work with. Not every C code is Sqlite/redis/ffmeg quality.
- the feedback loop is slower, so the LLM has less chance to brute force a decent answer
- there is no npm/pypi equivalent for C on which to train the LLM so the pool for training is less diverse
- the training pool is vastly Linux-oriented, with the linux kernel and distro system libs being very prominent in the training data because C programs on Windows are often proprietary. But most vibe coders are not on Linux, nor into system programming.
Sure, you can vibe code in C. Antirez famously states he gets superb ROI out of it.
But it's likely you'll get even better results with other languages.
comment 11mo ago · link · parent
It's not just AI, it's a market fit and quality problem.
They don't need to solve it, however.
Their strategy has been quite clear: make it barely usable so that is passes muster to auditors, integrate it with systems that corporations need, and sell them on the integrations.
Teams and Azure suck?
So what?
Big companies will pay for that, because it's integrated with their ldap, has an audit trail, gives them the ISO-whatever stamp, and lets them worry about something else.
That the users are miserable is almost never the question for the ones signing the checks.
In a world where box-checking is paramount, this approach is a winning strategy.
224.
Characters? In This Economy?(bitecode.dev ↗)
3 points · by BiteCode_dev · 11mo ago · 1 comment
comment 12mo ago · link · parent
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".
comment 1y ago · link · parent
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.
comment 1y ago · link · parent
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.
comment 1y ago · link · parent
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.
comment 1y ago · link · parent
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.comment 1y ago · link · parent
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.