| ▲ | netbioserror 18 hours ago |
| Throwing my hands up and moving to Nim was downright easy next to the excessive effort I put into trying out Nuitka, Numba, and PyInstaller for my use case. If you want static compilation, use a language and libraries built with that assumption as a ground rule. The herculean effort of building a half-compatible compiler for a dynamic language seems like a fool's errand, and would be a fun curiosity if so many people hadn't already tried it, especially with Python. |
|
| ▲ | rangerelf 14 hours ago | parent | next [-] |
| I was looking for someone else that had done this, I had the same exact experience. That said, anyone looking into a completely static typed language that has nice ergonomics, is easy to pick up but has enough depth to keep you busy for weeks on end, and is versatile enough to be used for anything, do yourself a favor and give Nim a try. https://nim-lang.org/ |
|
| ▲ | PaulHoule 15 hours ago | parent | prev | next [-] |
| It's so common for something like this to struggle for decades before succeeding. For instance people have been trying to make a memory safe C for a long time, just recently we got https://fil-c.org/ which has high compatibility and relatively good performance for that kind of thing. The strength of Python is that so many people are trying things with it. |
|
| ▲ | almostgotcaught 15 hours ago | parent | prev [-] |
| all of this is well and good if you completely forget that there are billions of lines of Python in prod right now. so your grand epiphany is basically on the level of "let's rewrite it in Rust". i'll let you hold your breath until that rewrite is done (and in the meantime i'll explore workarounds). |
| |
| ▲ | rangerelf 14 hours ago | parent | next [-] | | I kind of object to this take. Nobody's talking about porting billions of lines of code, for all we know it's just for personal projects, or a learning experience. This kind of replies is like killing an idea before it's even started, smells like the sunk cost fallacy. OTOH I do understand the weight of a currently existing corpus in production, evidence is the ton of COBOL code still running. But still, your reply kind of sucks. | | |
| ▲ | almostgotcaught 8 hours ago | parent [-] | | > Nobody's talking about porting billions of lines of code, for all we know it's just for personal projects, or a learning experience. am i the only person in the room that can read tone? please tell me what is the force of this statement in what i've responded: > If you want static compilation, use a language and libraries built with that assumption as a ground rule. is this an imperative only for hobbyists? not sure. > This kind of replies is like killing an idea before it's even started, smells like the sunk cost fallacy. there is no idea - that's exactly my whole point. tear it down and build it again is not an idea. |
| |
| ▲ | ajb 14 hours ago | parent | prev | next [-] | | Now there are billions of lines of python in production. But it wasn't so long ago that it seemed like the entire industry was going to completely standardise on C++, and if you wanted a picture of your future, it would be grinding away debugging buffer overflows and thread lockups - forever. | |
| ▲ | netbioserror 14 hours ago | parent | prev [-] | | I finished the rewrite in just a few months and have been happily maintaining it for two years and extending it with powerful features it never had before, partially thanks to optimized native binary speed, partially thanks to the ludicrous compatibility of a musl-libc static binary. The rewrite is the backend foundation of a web product stack that is best-in-category. I didn't choose Nim because I was an evangelist; I had only toyed with it twice before. After much evaluating (and wrestling an ultra-frustrating previous attempt at a Rust rewrite my predecessor had tried), Nim surfaced as the best tool for the specific job. And it still is. It doesn't have to be our entire product stack; it's doing a small subset of very important jobs, doing them well, and is invoked by other languages that do their jobs better as web servers and such. A modular stack helps each language and tool shine where it works best. |
|