16 ms·
All in with Nuitka
- zxspectrum1982 4y agoIt's too cheap. Kay needs to increase prices by at least an order of magnitude, and go per-application subscribing. An all-you-can-develop subscription should be at least 25K,if not more.
- kashif 4y agoYour link to the commercial subscription page is not working. Missing a : in https:// https://
- actionfromafar 4y agoThings are picking up in compiled Python land! Also shedskin [0] which I thought was very promising but dead, has suddenly had a bunch of commits, quickly gaining Python 3 compatibility. 0: https://github.com/shedskin/shedskin https://github.com/shedskin/shedskin
- stuaxo 4y agoFantastic; I've been a fan of this since the early days, even if I haven't tried it yet I've been following the updates. I was never quite sure how to apply this to the old code base of shoebot, (a python creative code environment based on nodebox), I think if I start from fresh I might try again.
- v3ss0n 4y agoTried nutika it compile but ends up in several hundred mb binary for non data science app.it bring no performance benefits either. What's the benefits over shipping as docker?
- goneri 4y agoCode obfuscation is sometime important.
- daneel_w 4y agoNuitka's primary aim is performance, more so than self-contained deployment. It's a bit strange to pit Nuitka against "shipping with Docker". It's also surprising to hear that you saw no performance benefits at all - but then again, perhaps your application isn't that much Python but just a small bit of Python wrapped around fast libraries written in e.g. C?
- anentropic 4y agoI was under the impression that speedup with Nuitka was fairly modest and you probably get faster with pypy e.g. there's some benchmarks here https://pybenchmarks.org/ https://pybenchmarks.org/ and they mostly seem to go: Python 3 -> Nuitka (slightly faster) -> Cython (much faster) -> PyPy (faster again) So I always assumed the main advantage was more in producing a single binary And I'd consider that a big advantage over "shipping with Docker" for many use cases, e.g. building cli tools
- nerdponx 4y agoI wonder why Mypyc isn't in that benchmark.
- daneel_w 4y agoPython 3 really changed a lot, more than I realized. My experiences with Nuitka are against Python 2 from a couple of years back, at a point where Nuitka marketed itself using its performance increases and brought (at least) a 3-5x speedup on almost everything you threw at it.
- stainablesteel 4y agoi've not seen any performance boost for my code either via nuitka, using mostly pure python and a little numpy not that i mean to complain about having a working python compiler, i think its neat
- quietbritishjim 4y ago* Just a normal executable rather than something that needs a separate runtime - yes I know Docker is near universal on Linux for developers but less so for users and it doesn't integrate well with user permissions. * Works fine for graphical applications (again this is possible with Docker but not zero configuration). * Despite your complaint about size I still suspect it's a lot small than a complete Docker image. * Works natively on Windows, unlike Docker BTW the ideal mode is standalone rather than onefile - this outputs a directory including your program and separate files for any C extensions modules. That will let you chase down the offending module(s) that are hundreds of MB. Which in your case there must be - I distribute a small Qt program and even that is only 10s of MB.
- tecleandor 4y agoAlso, you don't need to install Docker ;)
- mft_ 4y agoNot everyone is a computer expert. My Mum could download and run an executable; I doubt she'd have much luck via Docker :)
- v3ss0n 4y agoGood point
- yanchep 4y agoMy team and I love Nuitka. For us, it is an important part to maintain the legacy servers (=Windows). Thanks a lot, and I hope our small contribution via subscription helps.
- plonk 4y agoIt’s great for deployment. I’m still weirded out when the result works so well, when every other Python deployment solution always fails on some common package.
- pzo 4y agoThis is nice. Hope there will be one day way to get executable for android or iOS. Even if someone maybe wouldn't write commercial python mobile app to be distributed in app store but such option would be super useful at least for me to prototype apps and directly test on mobile phones, e.g. desktop usually don't have sensors (accelerometer, gyroscope, magnetometer) or advanced camera or depth/lidar cameras. So most of the time you have to write some native app that will save those data, move it to desktop, prototype desktop python script using those data and overall whole process takes much longer. Wish I could write python script with python libraries such as: OpenCV, Open3d, SDL, tensorflow and execute directly on android/iOS.
- isthisthingon99 4y agoTypical "I'm a dev, don't know marketing" approach. This is a good strategy to end up barely surviving. I should know, I marketed something heavily for maybe 6 months 10 years ago and it still pays me an income. I couldn't do it for more than 6 months.
- bronikowski 4y agoIf you're like me and stick all your Python programs into your system with pipx[1] be wary, running Nuitka out such env will cause you lots of pain with library discovery. I felt so dumb after reinstalling it normally. [1]: https://github.com/pypa/pipx https://github.com/pypa/pipx
- nerdponx 4y agoA lot of Python tools now support the ability to search for packages using in a different installation/environment from the one that is actually running the tool. Maybe we can run a fundraiser in order to pay the developer to add this feature.
- samsquire 4y agoThank you for working on Nuitka. I've been thinking a lot about transpiling lately. GCC and Clang are state of the art optimizing compilers for C/C++ and it's interesting that all the effort to optimize compilers is for those languages. Any other language has to do a significant amount of work to build a standard library and value-add features. There's languages such as D, Dart, Nim, Crystal, Zig, Pony which are impressive but receive little attention. I'm working on my own multithreaded language, I want multithreaded software to be easier to write. It currently looks similar to Javascript but that might change. To come back to transpiling, it's interesting finding something that's orthogonal between the source language and the target language that you can add value add features. C with arbitrarily nested hashmaps, safe strings would be useful. I love the simplicity of Python sourcecode and I think complicated tools should be built in it for approachability. But transpiling or compilation is the problem.
- Denvercoder9 4y ago> GCC and Clang are state of the art optimizing compilers for C/C++ and it's interesting that all the effort to optimize compilers is for those languages. The optimizers from GCC and Clang aren't usable just for C/C++. Both compilers have frontends for different languages that share the optimization pipeline. For example, GCC has a D frontend, and the Zig compiler has a LLVM backend.
- chubot 4y agoYup, rust swift Julia and I think crystal use LLVM. Zig used it to bootstrap too LLVM has definitely enabled more language diversity!
- TekMol 4y agoOne thing I never understood about compilers: Doesn't all CPUs offer a different set of opcodes? How can a compiler then work for different CPUs? For example, this Wikipedia page is listing the CPUs that support instructions for fast SHA calculations: https://en.wikipedia.org/wiki/Intel_SHA_extensions https://en.wikipedia.org/wiki/Intel_SHA_extensions How could a compiler ever use those, when not all CPUs support them?
- vibbix 4y agoI'd imagine a combination of runtime extension checking, and baseline extension support. I.e. when you pass -mavx2 or -march=native to your Cxx compiler, it sets the baseline minimum for what op codes are used.
- jgalt212 4y agoNotes on how to get list of available targets GCC supports: https://stackoverflow.com/questions/47299458/how-can-i-determine-what-architectures-gcc-supports https://stackoverflow.com/questions/47299458/how-can-i-deter...
- arsome 4y agoTypically compilers have a "frontend" which turns code into a syntax tree and different "backends" for each architecture they need to support. For example, clang is the C front-end for LLVM while Emscripten is a backend that allows it to output Javascript. Though for highly specialized calculations like that. they're often written into popular libraries like OpenSSL with inline assembly for all relevant architectures.
- bratao 4y agoYou can set the level of instructions to use. There are some levels that are compatible enough with modern CPUs ( something like all x64 CPUS) that will work for most of people. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
- Slartie 4y agoCPUs offer feature flags that can be queried to learn about the availability of a particular extension. If a compiler wants to generate code that uses an extension if available, but falls back to an explicit (but slower) implementation if that's not the case, it can simply generate a branch instruction in front of the opcodes using the extension which checks for the feature flag first, branching into the fallback implementation if the extension isn't available.
- greatgib 4y agoWithout discussing the merits of Nuitka or this guy, in my opinion, the following is a recipe for disaster: Please become a subscriber of Nuitka commercial, even if you do not need the IP protection features it mostly has. All essential packaging and performance features are free, and I have put incredible amounts of works in this, and I need to now make a living off it. Right now, I am far from being able to sustain my income from it, and I am taking a risk with this effort, hoping for support from you. In a few years we will have a blog post about how Oss is not able to provide sustainable income and maybe the thing will switch to an hybrid license if possible.
- nerdponx 4y agoI like the idea of software freedom as much as the next guy, but software being free for noncommercial use is significantly more important to me (and I think many people) than being fully free-as-in-freedom. If hybrid licensing makes it possible to make a living developing free-ish software, which is still essentially free for "the commons" but not for corporations (which lest we forget are not actually people), then I think that's better than the alternative of everything being proprietary. Do not let the perfect be the enemy of the good. We will need to see a major culture shift in industry towards paying for support for free software before that can change. It's ridiculous that companies are willing to shell out so much money for proprietary SaaS products (especially in the data engineering space), but are not willing to pay for support/consulting of open-source products, even if the latter is cheaper. It's not entirely rational, but it's the way things are, and we are still a couple of years off from anything being different. Well-intentioned developers deserve to make a living on free-ish software more than I deserve fully free software.
- wyldfire 4y agoFYI to the author - the link to "Please become a subscriber of Nuitka commercial" is broken. Needs a colon probably. This could hurt conversions.
- synergy20 4y agoThis is where Golang shines, you can run it as a single executable on Win/Mac/Linux at a small size without pre-install a package system(e.g. pip). I just wish Golang can have a cross platform GUI one day(like swing on Java that is), Wails looks promising. Golang does have weakness as Python, both are pretty much irrelevant on Android and iOS by design, sadly.
- noisy_boy 4y agoAgree on the advantages of Golang. I have a love/hate kind of relationship with its error handling; I like the defacto standard pattern of explicit error handling and hate the boilerplate to implement it. If only it had the Result and Error types of Rust. Anyway, even the current setup is far better than having to deal with Python's Nonetype errors.
- arush15june 4y agoNuitka is a pretty good compiler! I tried it this year for a small script that was used to automate generating Excel sheets with macros in them on Windows. It worked surprisingly well, but the ~100MB size was a turn off (and our Go binaries seem tiny compared to it). Though, we ended up writing a much faster and practical Powershell script for the same. But python code as a statically compiled native executable is really cool, compared to other solutions like using pyInstaller.
- deleted 4y ago[deleted]
- silisili 4y agoGodspeed Kay. I think I've told this story before, but oh well. Years ago, not long after Nuitka became a thing, I was blown away by all the effort put into this thing by -1- person. I asked to donate, and suggested he add a donation button to his page someplace. Kay couldn't believe anyone would want to just give him money, and seemed in disbelief with the idea and that I wanted to send money. I don't know why that sticks with me. It seemed like such a humble exchange. We exchanged a few emails, he's a really smart and kind person. The world would be so lucky if more maintainers mirrored his spirit. Really wish him the best on this.
- deleted 4y ago[deleted]
- dang 4y agoRelated: Nuitka: An extremely compatible Python compiler - https://news.ycombinator.com/item?id=28377541 https://news.ycombinator.com/item?id=28377541 - Sept 2021 (84 comments) Nuitka: a Python compiler written in Python - https://news.ycombinator.com/item?id=27537819 https://news.ycombinator.com/item?id=27537819 - June 2021 (181 comments) Nuitka 0.6.0 released - https://news.ycombinator.com/item?id=18092837 https://news.ycombinator.com/item?id=18092837 - Sept 2018 (14 comments) Nuitka: A Python compiler - https://news.ycombinator.com/item?id=17683932 https://news.ycombinator.com/item?id=17683932 - Aug 2018 (6 comments) Nuitka: A Python compiler - https://news.ycombinator.com/item?id=16980704 https://news.ycombinator.com/item?id=16980704 - May 2018 (4 comments) Nuitka: A Python Compiler - https://news.ycombinator.com/item?id=16822005 https://news.ycombinator.com/item?id=16822005 - April 2018 (5 comments) Nuitka: a Python compiler - https://news.ycombinator.com/item?id=15354613 https://news.ycombinator.com/item?id=15354613 - Sept 2017 (60 comments) Nuitka Progress in 2015 – Python Compiler - https://news.ycombinator.com/item?id=10994267 https://news.ycombinator.com/item?id=10994267 - Jan 2016 (52 comments) Nuitka – A Python Compiler - https://news.ycombinator.com/item?id=9089523 https://news.ycombinator.com/item?id=9089523 - Feb 2015 (5 comments) Nuitka: a Python compiler - https://news.ycombinator.com/item?id=8771925 https://news.ycombinator.com/item?id=8771925 - Dec 2014 (135 comments) Nuitka — A Python Compiler - https://news.ycombinator.com/item?id=1746340 https://news.ycombinator.com/item?id=1746340 - Oct 2010 (33 comments)
- jimnotgym 4y agoBest of luck. The world needs Nuitka.
- v4vvdq 4y agoSorry if this is a stupid question, but could Nuitka (which transpiles Python to C in some way) also work with PyPy to gain even more speed? Like PyPy to C?
- sireat 4y agoI've heard promising things about Nuitka so this will be a good time to try it out and see how .exe size compares to one generated by PyInstaller. Also I think instead of undetermined donation amount a fixed $99 personal commercial license would be successful.