Live data from Hacker News

Python 3.14 is here. How fast is it?

blog.miguelgrinberg.com

511–520 of 579 posts

Re: Python 3.14 is here. How fast is it?

#511
post #483
post #82

Earlier quoted context omitted.

You hope it doesn't ? > [Donald Knuth] firmly believes that having an unchanged system that will produce the same output now and in the future is more important than introducing new features This is such a breath of fresh air in a world where everything is considered obsolete after like 3 years. Our industry has a disease, an insatiable hunger for newness over completeness or correctness . There's no reason we can't…

> There's no reason we can't be writing code that lasts 100 years. Code is just math. The weather forecast is also “just math”, yet yesterday’s won’t be terribly useful next April.

No, weather forecasting models are "just math". The forecast itself is an output of the model. I sure hope our weather forecasting models are still useful next year!

    weather forecasting models  code  math

    weather forecast  program output  calculation results
So all you're saying is that we should not expect individual weather forecasts, program output, and calculation results to be useful long-term. Nobody is arguing that.

Re: Python 3.14 is here. How fast is it?

#512
post #82

Earlier quoted context omitted.

You hope it doesn't ? > [Donald Knuth] firmly believes that having an unchanged system that will produce the same output now and in the future is more important than introducing new features This is such a breath of fresh air in a world where everything is considered obsolete after like 3 years. Our industry has a disease, an insatiable hunger for newness over completeness or correctness . There's no reason we can't…

> This is such a breath of fresh air in a world where everything is considered obsolete after like 3 years. I dunno man, there's an equal amount of bullshit that still exists only because that's how it was before we were born. > Code is just math. What?? No. If it was there'd never be any bugs.

> > Code is just math.

> What?? No. If it was there'd never be any bugs.

Are you claiming there is no incorrect math out there? Go offer to grade some high-school algebra tests if you'd like to see buggy math. Or Google for amateur proofs of the Collatz Conjecture. Math is just extremely high (if not all the way) on the side of "if it compiles, it is correct", with the caveat that compilation only can happen in the brains of other mathematicians.

Re: Python 3.14 is here. How fast is it?

#513
post #504

Earlier quoted context omitted.

You can run Python processes in parallel for "scaling". Youtube and Uber run python backends. This is cheaper than developer time per hour.

Sure, there's multiprocessing, but historically no multithreading (relatively recently there is the free-threading interpreter). Each of those processes / threads will also execute slowly compared to most other languages. But we agree Python is not performance oriented... I'm just curious why people think it's a good trade-off when I suspect that writing the same code in say, Java, will take roughly the same time, be…

I worked on a python codebase for several years that had over two million LoC. The code was well-organized and under constant development by at least ten devs. There were Java components in the larger project that were occasionally touched on, and it was always slower to work with those parts.

A well organized python codebase really is faster to work on than other languages. If your dev work is slowing down as the codebase grows, that's a sign you're accruing tech debt by not keeping up with organizing it.

Re: Python 3.14 is here. How fast is it?

#514
post #331

Earlier quoted context omitted.

Did anyone short Cracker Barrel stock? If not, I have a hard time seeing why bots would have any interest in investing the time/money. There also didn't seem to be any political clout being gained by the complaints. More real-world is that I know tons of friends/relatives in the South and I don't know of even ONE that liked the redesign.

Russia has gotten VERY good at amplifying any cultural differences or controversies in order to break US politics (and many other countries). If you hadn't noticed it has been VERY effective.

    >Cracker Barrel
    >break US politics
It's a restaurant logo bro, not a pillar of civic discourse.

Re: Python 3.14 is here. How fast is it?

#515

Earlier quoted context omitted.

Many simple scripts at my work that more or less just argparse and fire off an HTTP request spend half a minute importing random stuff because of false deps and uncommon codepaths. For some unit tests it's 45 seconds, substantially longer than the time taken to run the test logic. In dev cycles most code is short-running.

> Many simple scripts at my work [...] For some unit tests it's 45 seconds > I spend a lot of time rewriting the python logic in C++, which makes it 100x faster Nice! Your workplace didn't care to pick a better tool for the job in the past, and it seems to not care what you're doing at present, if you have to spend time rewriting the stuff in C++, instead of picking Nim and calling it a day, in a day.

Even better, in Nim these little CLI tools could use https://github.com/c-blake/cligen and have had terminal colorized, auto-generated help for many years now with much less dev-effort than raw argparse. Start-up time of statically linked Nim programs is like O(100..500 microseconds, just like C programs).

Re: Python 3.14 is here. How fast is it?

#516
post #331

Earlier quoted context omitted.

Did anyone short Cracker Barrel stock? If not, I have a hard time seeing why bots would have any interest in investing the time/money. There also didn't seem to be any political clout being gained by the complaints. More real-world is that I know tons of friends/relatives in the South and I don't know of even ONE that liked the redesign.

Russia has gotten VERY good at amplifying any cultural differences or controversies in order to break US politics (and many other countries). If you hadn't noticed it has been VERY effective.

[deleted]

Re: Python 3.14 is here. How fast is it?

#517
post #508

Earlier quoted context omitted.

> There's no reason we can't be writing code that lasts 100 years. Code is just math. Imagine having this attitude with math: "LOL loser you still use polynomials!? Weren't those invented like thousands of years ago? LOL dude get with the times, everyone uses Equately for their equations now. It was made by 3 interns at Facebook, so it's pretty much the new hotness." No, I don't think I will use "Equately", I think I…

> Mathematical notation evolved a lot in the last thousand years That is not counter to what I'm saying. Mathematical notation Programming Languages. Proofs Code. When mathematical notation evolves, old proofs do not become obsolete! There is no analogy to a "breaking change" in math. The closest we came to this was Godel's Incompleteness Theorem and the Cambrian Explosion of new sets of axioms, but with a lot of wor…

> When mathematical notation evolves, old proofs do not become obsolete! There is no analogy to a "breaking change" in math.

I disagree. The development of non-euclidean geometry broke a lot of theorems that were used for centuries but failed to generalize. All of a sudden, parallels could reach each other.

> Can we write a family of nested programming languages where core features are guaranteed not to change in breaking ways, and you take on progressively more risk as you use features more to the "outside" of the language?

We could, the problem is everyone disagrees on what that core should be. Should it be memory-efficient? Fast? Secure? Simple? Easy to formally prove? Easy for beginners? Work on old architecture? Work on embedded architecture? Depending on who you ask and what your goals are, you'll pick a different set of core features, and thus a different notation for your core language.

That's the difference between math & programming languages. Everyone agrees on math's overall purpose. It's a tool to understand, formalise and reason about abstractions. And mathematical notation should make that easier.

That being said, the most serious candidate for your "core language guaranteed not to change and that you can build onto" would be ANSI C. It's been there more more than 35 years, is a standard, is virtually everywhere, you can even write a conforming compiler for a brand new architecture, even an embedded microchip very easily, and most of not all the popular languages nowadays are build on it (C++ of course, but also C#, java, javascript, python, go, php, perl, haskell, rust, all have a C base), and they all use a C FFI. I'm not sure ANSI C was the best thing that ever happened to our industry, though.

Re: Python 3.14 is here. How fast is it?

#518
post #308

Earlier quoted context omitted.

because of Django admin? any downsides/notable warnings for people considering Flask v Django? any migration guide that's helpful?

Go with what you understand easier. No downsides to making an app in either, other than the logo.

After sleeping, this is my old man yelling at clouds moment. I'm glad they are trying something new.

Re: Python 3.14 is here. How fast is it?

#519
post #512

Earlier quoted context omitted.

> This is such a breath of fresh air in a world where everything is considered obsolete after like 3 years. I dunno man, there's an equal amount of bullshit that still exists only because that's how it was before we were born. > Code is just math. What?? No. If it was there'd never be any bugs.

> > Code is just math. > What?? No. If it was there'd never be any bugs. Are you claiming there is no incorrect math out there? Go offer to grade some high-school algebra tests if you'd like to see buggy math. Or Google for amateur proofs of the Collatz Conjecture. Math is just extremely high (if not all the way) on the side of "if it compiles, it is correct", with the caveat that compilation only can happen in the b…

That's human error. "Correctness vs. mistakes" applies to all human languages too, English etc.

In math, `a - b` doesn't occasionally become `b - a` if one CPU/thread/stream finishes before an other, just to give one example.

Or, if you write `1 + 2` it will forever be `1 + 2`, unlike code where it may become `3 / 4 - 5 + 6 ^ 7 + 1 + 2` or whatever junk gets appended before or after your expression tomorrow (analogy for the OS/environment your code runs in)

I guess to put it simply: code is affected by its environment, math isn't.

Re: Python 3.14 is here. How fast is it?

#520
post #10

Tangential, but I practically owe my life to this guy. He wrote the flask mega tutorial in what I followed religiously to launch my first website. Then right before launch, in the most critical part of my entire application; piping a fragged file in flask. He answered my stackoverflow question, I put his fix live, and the site went viral. Here's the link for posterity's sake https://stackoverflow.com/a/34391304/41802…

When I saw you were using readlines to read binary file I thought wtf at first, seems like he noticed as well.
Post reply on HN