News for hackers. Stuff that matters.
Re:Show HN: TokenDagger – A tokenizer faster than OpenAI's T... by saretup on Monday June 30, 2025 @11:35AM (#44424572)
And while we’re at it, let’s move away from Python altogether. In the long run it doesn’t make sense just because it’s the language ML engineers are familiar with.
Re:Show HN: TokenDagger – A tokenizer faster than OpenAI's T... by tbalsam on Monday June 30, 2025 @11:38AM (#44424608)
No! This is not good.

Iteration speed trumps all in research, most of what Python does is launch GPU operations, if you're having slowdowns from Pythonland then you're doing something terribly wrong.

Python is an excellent (and yes, fast!) language for orchestrating and calling ML stuff. If C++ code is needed, call it as a module.

Re:Show HN: TokenDagger – A tokenizer faster than OpenAI's T... by bigyabai on Monday June 30, 2025 @12:33PM (#44425185)
It makes plenty of sense. Python handles strings well, has a great package ecosystem, and is easy to write/learn for non-programmers. It can be easily embedded into a notebook (which is huge for academics) and is technically a "write once run anywhere" platform in theory. It's great.

If you think Python is a bad language for AI integrations, try writing one in a compiled language.

Re:Show HN: TokenDagger – A tokenizer faster than OpenAI's T... by mdaniel on Monday June 30, 2025 @09:37PM (#44429751)
> has a great package ecosystem

So great there are 8 of them. 800% better than all the rest!

> If you think Python is a bad language for AI integrations, try writing one in a compiled language.

I'll take this challenge, all day, every day, so long as I and the hypothetical 'move fast and break things' have equal "must run in prod" and "must be understandable by some other human" qualifiers

What type is `array`? Don't worry your pretty head about it, feed it whatever type you want and let Sentry's TypeError sort it out <https://github.com/openai/whisper/blob/v20250625/whisper/aud...> Oh, sorry, and you wanted to know what `pad_or_trim` returns? Well that's just, like, your opinion man

Re:Show HN: TokenDagger – A tokenizer faster than OpenAI's T... by bigyabai on Monday June 30, 2025 @10:02PM (#44429894)
Tracks with me, I don't like using Python for real programming. Try explaining any of your "Python sucks" catechisms to a second-year statistics student though. If you'd rather teach them C++, be my guest. If you want to make them indebted to proprietary infra like Mojo or CUDA, knock yourself out.

I'm still teaching them Python.

Re:Show HN: TokenDagger – A tokenizer faster than OpenAI's T... by janalsncm on Monday June 30, 2025 @12:40PM (#44425265)
Most of that is already happening under the hood. A lot of performance-sensitive code is already written in C or cython. For example numpy, scikit learn, pandas. Lots of torch code is either C or CUDA.

ML researchers aren’t using python because they are dumb. They use it because what takes 8 lines in Java can be done with 2 or 3 (including import json) in python for example.