I'm homeless and broken and I just spent like 2 weeks developing low level python bytecode tracer, and it SEEMS that this gonna ruin everything.
This is hilarious - as its my first project in like 2 years
I know Ars Technica has a guy who can go deep into how a security attack works. That's the only one I am aware of from a well-known publication. Even so, if you look at the comment section, most people have no clue about technical details and are just talking about the story.
Also bear in mind -- media in general is not a good industry to be in. Making money out of writing news articles is getting increasingly difficult. Most articles try to optimize for reach and clicks. Something like this one is not going to attract a lot of readers. I have no idea how LWN can be sustainable, but I can assure you that it's the exception, not the norm.
Other than LWN, your best bet is reading this from someone's blog, who spends hours writing about it, trying to explain it in an understandable way and avoid mistakes, expecting almost nothing in return, just as a hobby.
Your next best bet is reading someone's 12 disjointed tweets, possibly riddled with errors.
That's just the world we are living in.
Speculation: LWN is sustainable because there are enough people out there who recognize the value of such a source of information and are willing to pay for a subscription.
>... but I can assure you that it's the exception, not the norm.
Anecdata: I credit a good portion of my success to knowledge and insight I've gained from lwn articles.
If you're in a position to do so, I always recommend getting a paid membership, particularly if you've found their articles helpful to your tech journey.
(i am not affiliated with LWN, just a happy subscriber)
Speculation: it’s because Linux (the kernel) is a large centralised project, so there’s a critical mass of people willing to pay for Linux Weekly News.
From there the proven quality allowed the publication to cover other OSS projects. I suspect that without Linux LWN would not be sustainable.
At least for now it seems that Python can still only be used to call some Pascal or cuda bindings if one needs performance
The experience lead me to avoid any language without JIT or AOT, unless forced upon me.
Hence why I have used Python since version 1.6 only for OS scripting tasks.
Our product was inspired by AOLServer and Vignette, providing similar kind of capabilities, we had Rails in Tcl, but we were not a famous SV startup, rather mostly serving the Portuguese market.
The founders then went on to create OutSystems, built on top of .NET and Java, nowadays using other stacks, while offering the same kind of RAD tooling.
I've considered dropping the outer quotes and using CSS before/after text to add them back in to the rendered page, but we have a huge back-catalog of articles doing it this way, and it's usually not much of an issue.
v3ss0n•22h ago
orbisvicis•22h ago
iberator•22h ago
With a little bit of tinkering (multiprocessing, choosing the right libraries written strictly in python, PyPy plus a lot of memory) I was able to optimize some workflows going from 24h to just 17 minutes :) Good times...
It felt like magic.
hnuser123456•21h ago
achierius•20h ago
Twirrim•19h ago
If you've written it off on that basis, I'd suggest it's worth giving it another shot at some stage. It might surprise you.
Last I saw there was still a little bit more overhead around the C interface, so hot loops that just call out to a C module in the loop can be just a smidgen slower, but I haven't seen it be appreciably slower in a fair while.
laurencerowe•17h ago
> We have support for c-extension modules (modules written using the C-API), so they run without modifications. This has been a part of PyPy since the 1.4 release, and support is almost complete. CPython extension modules in PyPy are often much slower than in CPython due to the need to emulate refcounting. It is often faster to take out your c-extension and replace it with a pure python or CFFI version that the JIT can optimize.
https://doc.pypy.org/en/latest/faq.html#do-c-extension-modul...
I have seen great success with cffi though.
orbisvicis•17h ago
https://doc.pypy.org/en/latest/cpython_differences.html#exte...
""" The extension modules (i.e. modules written in C, in the standard CPython) that are neither mentioned above nor in lib_pypy/ are not available in PyPy. """
The lifecycle of generators makes pypy code very verbose without refcounting. I've already been bitten with generator lifecycles and shared resources. PEP533 to fix this was deferred. Probably for the best as it seems a bit heavy-handed.
anthk•15h ago
v3ss0n•2h ago
pansa2•22h ago
[0] The article says "Python has gotten nearly 50% faster in less than four years", but the original goal was a 5x speedup in the same timeframe [https://github.com/markshannon/faster-cpython/blob/master/pl...].
Qem•21h ago
IIRC they originally expected the JIT to be the single focus on CPython performance improvement. But then another front was opened to tackle the GIL in parallel[1]. Perhaps the overhead of two major "surgeries" in the CPython codebase at the same time contributed to slower progress than originally predicted.
[1] https://peps.python.org/pep-0703/
pjmlp•16h ago
Other equally dynamic languages have long shown the way.
incrudible•4h ago
PyPy does have an alternative ABI that integrates with the JIT and also works on CPython, so if people cared that much about those remaining bits of performance, they could support it.
nromiun•21h ago
But the latest PyPy supports all of Python 3.12 and it is just as fast with C ffi code as JIT Python code. It is literally magic and if it was more popular Python would not have a reputation for being slow.
quibono•20h ago
nromiun•20h ago
tgbugs•20h ago
Twirrim•19h ago
Very basic hello world app hosted under gunicorn (just returning the string "hello world", so hopefully this is measuring the framework time). Siege set to do 10k requests, 25 concurrency, running that twice so that they each have a chance to "warm up", the second round (warmed up) results give me:
So it seems like there's definitely things that pypy's JIT can do to speed up the Flask underpinnings.ziml77•18h ago
almostgotcaught•20h ago
pjmlp•16h ago
a-french-anon•4h ago
v3ss0n•1h ago
didip•18h ago
pjmlp•16h ago
pjmlp•16h ago
Python is probably the only programming language community that has been so much against JITs, and where folks routinely call C libraries bindings, "Python".
IshKebab•15h ago
It's like... imagine you ride a bike to most places. But now you want to visit Australia. "No problem, here take this racing bike! It's only a little less comfortable!".
So really it's only of interest to people who have foolishly built their entire business on Python and don't have a choice. The only one I know of is Dropbox. I bet they use Pypy.