frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

LPython: Novel, Fast, Retargetable Python Compiler (2023)

https://lpython.org/blog/2023/07/lpython-novel-fast-retargetable-python-compiler/
57•luismedel•6mo ago

Comments

brudgers•6mo ago
The repository appears to be active, https://github.com/lcompilers/lpython
nathan_compton•5mo ago
Very neat but what an Albatross Python is, especially in the AI era. It is clearly the best language to choose for many applications given the network effects and the fact that AI can program it so effectively, but I really wish we weren't locked into it. So many better, more fun, more tight, languages out there.

And all this effort to eek out performance. Get off my lawn etc.

throwaway7783•5mo ago
What's your personal favorite better, fun, tight language?
sgammon•5mo ago
Kotlin
nathan_compton•5mo ago
I love programming in Scheme. I played with Nim recently and appreciated the type system. I also enjoy Common Lisp. Heck, I ever prefer Java! Haskell, Ocaml, Julia! I'd rather program in any of them.
raffraffraff•5mo ago
Most of the time, Python's biggest issue isn't performance, it's the nightmare of trying to distribute it. If you want to merely run a python program you need to be educated in "python DevOps", or you'll get people gasping and saying "FFS, why don't you just create an env and activate it and pip install to it then make your own flipping shortcut to a script that activates that env and runs your code, you moron, Jeeeeeesus."
dumah•5mo ago
PEP-723 solves this nicely.

https://peps.python.org/pep-0723/

https://news.ycombinator.com/item?id=43500124

sam_bristow•5mo ago
Uv and PEP-723 style inline dependency declarations has been great at $DAYJOB. It's made a bunch of our standalone scripts trivial to distribute to non-software engineers.

I'm also bullish on using them with Marimo notebooks as a replacement for Jupyter notebooks.

gjvc•5mo ago
that the "activate it" part gets any airtime really pisses me off. that has all to do with bash and zero to do with python. the "activate" script should never have seen the light of day.

include a bin/run-python wrapper script in your project, and have that set environment variables and call the .venv/bin/python binary. done.

yes, i realise in replying to this comment i'm admitting that i'm part of the problem exactly described, but the "activate" script has caused more confusion in the long run than is worthwhile and the "running from a .venv/" directory could have been a much smaller problem instead of the wind-tunnel it has become.

terlisimo•5mo ago
why not solve it with bash then, just put

#!/path/to/your/venv/bin/python

as first the line of your script, done/done

gjvc•5mo ago
That is obviously not what I meant by "solving it with bash" and well you know it.

First, one often needs to set PYTHONPATH etc, and this is best done near the point of execution, in a wrapper script and not wangling around in ~/.bash_profile where it gets forgotten, and is not project-specific.

Secondly, and more importantly, your suggestion assumes the venv lives in a fixed location. This is unlikely to be the case.[1] What is preferable is something which is independent of filesystem location. The bin/run-python script is able to find its location on the filesystem, and the location of the venv relative to it.

[1] You might have a custom python distribution with a bunch of modules installed into a well-known location and therefore using that for the python in your application is a reasonable solution, but that is not what we are talking about here.

raffraffraff•5mo ago
Yes, it should have been something like a flatpak, snap, Appimage or some other horrible thing. But I can see why a developer would just want to set a few vars, because you need to do that in a shell anyway to pip install some other requirement or debug on the command line. There is no polish, no user story.

From the perspective of a user who just wants to install and use something, it doesn't matter why python is atrocious, it just is. Ideally, something like pipx would be far far better than it is, and bundled by default with the system python. Every venv should get added to a launcher that gives access to a shell, an IDE or any python program in the venv. In fact if the python venv module was just a teensy bit better it could (optionally, but by default) do this for you.

theanonymousone•5mo ago
Hopefully PEP-723 and uv will alleviate this.
tough•5mo ago
Docker took that job
lesser23•5mo ago
Having been around for a long time I liken it to PERL. Post-PERL it also looks a lot like Ruby. I remember everything being re-written in Ruby. Yet PERL still stands!

Anyway, Python is a nice language for small-ish (< 1000 lines or so) projects. It starts to get very unruly after that and without a type system of any kind your brain becomes the type system... and the compiler. MyPy tries it's best but it really isn't sufficient and requires developer buy-in...hard to get in a language so well designed for throw-away code.

Python 3's syntax is actually quite nice and you can write some very expressive code in it. My opinion, of course, but I also find it to be one of the "lowest common denominator" languages like Go. Python doesn't require much to get started and it's syntax and semantics are relatively easy for even a mediocre programmer to understand. Of course it has a terrible (mostly non-existent ABI) that relies on "consenting adults" as the contract and an awful package system. Yet another reason it's really only practical for (relatively) small projects.

Rarely is anything in Python about raw performance - imo. Of the things that are (NumPy, Pandas, various ML libraries) they call down to C handle most of it. For things that require true parallelism it's not uncommon to see `exec` calls to binaries. That being said in a lot of places (FastAPI based applications, etc) you can get quite a lot of perf out of Python before it becomes a problem.

However, what makes it super nice is how easy it is to hack something together in it. As it turns out most of ML is just hacking things together in a few files or a Jupyter notebook. What a perfect language for such purpose. This is not unlike PERL. I still remember all the random PERL scripts I hacked together for various tasks because it was so simple. It is no wonder it is as popular as it is.

nathan_compton•5mo ago
It may be the case that most software engineering is just hacking pieces of software together, but Python still does a pretty bad job of it. Python libraries tend to be weird/poorly designed and pretty hard to actually use. R is a much nicer/more expressive language for ML stuff. Again, the only real advantage python has here is that everyone else is using it.
lesser23•5mo ago
Maybe I’m just suffering from Stockholm syndrome but I haven’t really had trouble using most libraries in Python. I do agree however that Python makes it harder to write reusable code.

To quote Bjarne Stroustrup there are only two kinds of languages: the ones people complain about and the ones nobody uses :).

nathan_compton•5mo ago
I'm sure some Python libraries are good, but I use pandas all the time and I hate it all the time.
mdaniel•5mo ago
Adjacent: I don't like NumPy - https://news.ycombinator.com/item?id=43996431 - May, 2025 (210 comments)
sgammon•5mo ago
How does this compare to GraalPy? Why create something new when GraalPy can already build native programs?
actionfromafar•5mo ago
LPython seems more like Shedskin. (Shedskin compiles Python to C++.)

You could say that LPython and Shedskin are to Python what Crystal is to Ruby.

zem•5mo ago
imo that misrepresents crystal, which is not a compiler from ruby to c++/native but a separate language that takes a lot of inspiration from ruby and tries to maintain a similar syntax, but does not consider itself a ruby dialect or implementation.
actionfromafar•5mo ago
I think you are right, it wasn't a great comparison.
theanonymousone•5mo ago
I'm following them since their first mention in HN in 2023, particularly for Wasm support in compilation. Still not much output, unfortunately.
gsf_emergency•5mo ago
Might this be a subtler than one might think response to RPython?

About its sponsor GSI:

>As a leader in SRAM technology, we leverage our extensive expertise to develop radiation-hardened memory products for space and military use

Yann LeCun to depart Meta and launch AI startup focused on 'world models'

https://www.nasdaq.com/articles/metas-chief-ai-scientist-yann-lecun-depart-and-launch-ai-start-fo...
383•MindBreaker2605•5h ago•246 comments

Please donate to keep Network Time Protocol up – Goal 1k

https://www.ntp.org/
134•gastonmorixe•4h ago•68 comments

Yt-dlp: External JavaScript runtime now required for full YouTube support

https://github.com/yt-dlp/yt-dlp/issues/15012
56•bertman•2h ago•9 comments

What happened to Transmeta, the last big dotcom IPO

https://dfarq.homeip.net/what-happened-to-transmeta-the-last-big-dotcom-ipo/
46•onename•3h ago•20 comments

Pakistani newspaper mistakenly prints AI prompt with the article

https://twitter.com/omar_quraishi/status/1988518627859951986
83•wg0•1h ago•14 comments

Simulating a Planet on the GPU: Part 1 (2022)

https://www.patrickcelentano.com/blog/planet-sim-part-1
72•Doches•5h ago•9 comments

X5.1 solar flare, G4 geomagnetic storm watch

https://www.spaceweatherlive.com/en/news/view/593/20251111-x5-1-solar-flare-g4-geomagnetic-storm-...
348•sva_•15h ago•96 comments

Laptops with Stickers

https://stickertop.art/main/
461•z303•1w ago•439 comments

I didn't reverse-engineer the protocol for my blood pressure monitor in 24 hours

https://james.belchamber.com/articles/blood-pressure-monitor-reverse-engineering/
260•jamesbelchamber•15h ago•91 comments

Bluetooth 6.2 – more responsive, improves security, USB comms, and testing

https://www.cnx-software.com/2025/11/05/bluetooth-6-2-gets-more-responsive-improves-security-usb-...
138•zdw•6d ago•89 comments

.NET 10

https://devblogs.microsoft.com/dotnet/announcing-dotnet-10/
278•runesoerensen•21h ago•151 comments

Four strange places to see London's Roman Wall

https://diamondgeezer.blogspot.com/2025/11/odd-places-to-see-londons-roman-wall.html
194•zeristor•14h ago•58 comments

.NET MAUI is coming to Linux and the browser

https://avaloniaui.net/blog/net-maui-is-coming-to-linux-and-the-browser-powered-by-avalonia
231•vyrotek•14h ago•199 comments

Perkeep – Personal storage system for life

https://perkeep.org/
226•nikolay•9h ago•48 comments

The terminal of the future

https://jyn.dev/the-terminal-of-the-future
240•miguelraz•16h ago•112 comments

You will own nothing and be (un)happy

https://racc.blog/you-will-own-nothing-and-be-unhappy/
169•showthemfangs•6h ago•133 comments

A Vision of Chocolate's Future in an Amsterdam Brownie

https://www.bloomberg.com/graphics/2025-opinion-future-of-chocolate/
4•laurex•5d ago•0 comments

Using Street Lamps as EV Chargers

https://www.techbriefs.com/component/content/article/54104-using-street-lamps-as-ev-chargers
14•rbanffy•1w ago•10 comments

Pikaday: A friendly guide to front-end date pickers

https://pikaday.dbushell.com
236•mnemonet•21h ago•104 comments

Stochastic computing

https://scottlocklin.wordpress.com/2025/10/31/stochastic-computing/
21•emmelaich•1w ago•3 comments

Why Nietzsche matters in the age of artificial intelligence

https://cacm.acm.org/blogcacm/why-nietzsche-matters-in-the-age-of-artificial-intelligence/
126•pseudolus•12h ago•77 comments

Ask HN: How does one stay motivated to grind through LeetCode?

9•blutoot•1h ago•4 comments

The history of Casio watches

https://www.casio.com/us/watches/50th/Heritage/1970s/
260•qainsights•3d ago•132 comments

A modern 35mm film scanner for home

https://www.soke.engineering/
213•QiuChuck•17h ago•172 comments

FFmpeg to Google: Fund us or stop sending bugs

https://thenewstack.io/ffmpeg-to-google-fund-us-or-stop-sending-bugs/
945•CrankyBear•18h ago•695 comments

The Department of War just shot the accountants and opted for speed

https://steveblank.com/2025/11/11/the-department-of-war-just-shot-the-accountants-and-opted-for-s...
208•ridruejo•22h ago•338 comments

My fan worked fine, so I gave it WiFi

https://ellis.codes/blog/my-fan-worked-fine-so-i-gave-it-wi-fi/
183•woolywonder•6d ago•66 comments

Heroku Support for .NET 10

https://www.heroku.com/blog/support-for-dotnet-10-lts-what-developers-need-know/
88•runesoerensen•14h ago•30 comments

We ran over 600 image generations to compare AI image models

https://latenitesoft.com/blog/evaluating-frontier-ai-image-generation-models/
170•kalleboo•19h ago•91 comments

Scaling HNSWs

https://antirez.com/news/156
193•cyndunlop•22h ago•42 comments