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

211.

Pre-PEP: Rust for CPython(discuss.python.org ↗)

5 points · by BiteCode_dev · 11mo ago · 5 comments

comment 11mo ago · link · parent

Clearly the ROI is perfect for you.

I won't waste more of your time.

comment 11mo ago · link · parent

Never put it this way before, but it's exactly why I started blogging. I was fed up with how bad Python content was online.

comment 11mo ago · link · parent

pyrsistent is super slow, though. Just ran a quick benchmark:

  - 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

Ordering is very useful for testing.

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.

comment 11mo ago · link · parent

Also, this is why we still gravitate toward FOSS communities. It's the last vestige of a dying era. A circle where people like that have a chance to hang up together and keep the warm feeling of being human.

comment 11mo ago · link · parent

Anybody using it for something serious ? I can't see a use case beyond I need a quick script running that is not worth setting up a vps.

comment 11mo ago · link · parent

So close to understand the concept of taxes.

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

- C takes a lot more context than a high-level language

- 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

Microsoft has this problem with most of its products.

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.

comment 11mo ago · link · parent

Tell claude to put the screenshot as an centered image with the body having the starry background on repeat. Then define the links as boxes over each icons with an old little tech trick called an image map.

Common at the time before flash took over.

comment 11mo ago · link · parent

Ah, HN Has eaten the 80 part of the title.

224.

Characters? In This Economy?(bitecode.dev ↗)

3 points · by BiteCode_dev · 11mo ago · 1 comment

comment 12mo ago · link · parent

Levels of indirection matter.

comment 12mo ago · link · parent

Levels of indirections matter.

comment 12mo ago · link · parent

Notice how the article load_penguins() example starts neatly after all the messy parts of data science are done and stops right before the next pain starts.

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

When you squash merge almost everything, only the last messages and messages you let to yourself at checkpoints are important. JJ has it right, a message should be optin, not optout.

comment 1y ago · link · parent

It did, just not the usual people. If you go to yandex, you can see that the russian mafia makes good money with trackers.

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.

comment 1y ago · link · parent

Not but you can be quite sure somewhere deep inside the TOS there is a line saying their telemetry swallow your soul. If not, it will be added. It's google, that's what they do.

comment 1y ago · link · parent

Looks great, won't touch since they are probably going to do a switcheroo or a shutdown as usual.

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

The question is how much are people willing to pay for this trouble. Usually industries that stick to very old system did so because they didn't want to invest resources in the migration.

comment 1y ago · link · parent

"It's complicated" is probably the line I hate the most in movies for this very reason. It's lazy writing made vocal.

comment 1y ago · link · parent

It's doubleplusgood language and perfectly cromulent.

comment 1y ago · link · parent

Because many people, including myself, have been consistently experiencing better quality from Rust-written software.

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

The others students will get code from chatgpt way faster than from your code.

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

Top comment: this article sucks.

Then HN proceed to keep the article at the head of the front page for the day.

comment 1y ago · link · parent

Modern Python is quite close to the ruby version:

    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

Then it failed. Things fail. It's ok. Especially if it's cheap.

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.

comment 1y ago · link · parent

I already setup a secret passphrase with my family. My mother is particularly naive when it comes to what's online. Of course she is going to get abused.

A passphrase is cheap. If you never need to use it, so what?

1
789
184