7 ms·
I don't get it. Having a complaint about Python removing CGI from the stdlib is well and fine. But then you say you'd rather consider JS, which doesn't even hav
by WD-42 1y ago
I don't get it. Having a complaint about Python removing CGI from the stdlib is well and fine. But then you say you'd rather consider JS, which doesn't even have a std lib? Lua doesn't have a CGI module in stdlib either.
- bravesoul2 1y agoNode.js provides the defacto standard lib for JS backend and its got a good feature set. That said these days I'd rather use Go.
- kragen 1y agoGolang seems pretty comfortable from the stuff I've done in it, but it's not as oriented toward prototyping. It's more oriented toward writing code that's long-term maintainable even if that makes it more verbose, which is bad for throwaway code. And it's not clear how you'd use Golang to do the kind of open-ended exploration you can do in a Jupyter notebook, for example. How would you load new code into a Golang program that's already running? Admittedly Python is not great at this either (reload has interacted buggily with isinstance since the beginning), but it does attempt it.
- bravesoul2 1y agoThere are live reload utilities for Go but yeah it comes down to recompiling and restarting - which is quick but any state is gone. I agree its not a rapid prototyping kind of language. AI assistance can help though.
- oblio 1y agoCan you load new code into a Node.js program that's running?
- rvnx 1y ago`eval()` to run new code and `delete require.cache` (to reload a module)
- kragen 1y agoI think it's fine to not have functionality in the standard library if it can be implemented by including some code in my project. It's not fine to have a standard library that stuff disappears from over time.
- spockz 1y agoWhenever code is removed from the Java standard library it is announced ages ahead of time and then typically it becomes available in a separate artefact so you can still use it if you depended on it.
- kragen 1y agoI wrote an online securities trading system in Java, with a little Jython. Java is reasonably good at stability, but I find it unappealing for other reasons, especially for prototyping. Kotlin might be okay. Jython no longer works with basically any current Python libraries because it never made the leap to Python 3, and the Python community stigmatizes maintaining Python 2 compatibility in your libraries. This basically killed Jython, and from my point of view, Jython was one of the best things about Java.
- mike_hearn 1y agoNote that Jython was replaced by GraalPy, which does target Python 3
- kragen 1y agoI hadn't heard about GraalPy! Thanks for the note.
- getdoneist 1y agoRuby has been removing stuff from stdlib for some time now. But "moving" is the correct word, because it is simply moved to a stand-alone gem, and with packaging situation in Ruby being so good, it feels completely seamless.
- rollcat 1y ago> Lua doesn't have a CGI module in stdlib either. Lua barely has any stdlib to speak of, most notably in terms of OS interfaces. I'm not even talking about chmod or sockets; there's no setenv or readdir. You have to install C modules for any of that, which kinda kills it for having a simple language for CGI or scripting. Don't get me wrong, I love Lua, but you won't get far without scaffolding.
- kragen 1y agoRight, you need something more specific than Lua to actually write most complete programs in. The LuaJIT REPL does provide a C FFI by default, for example, so you don't need to install C modules. But my concern is mostly not about needing to bring my own batteries; it's about instability of interfaces resulting from evaporating batteries.
- rollcat 1y agoHonestly, I'm not worried about the batteries. Thanks to FFI, you can just talk to libc, and vendor any native Lua code you need. (That's my approach for LÖVE.) LuaJIT, release-wise, has been stuck in a very weird spot for a long time, before officially announcing it's now a "rolling release" - which was making a lot of package maintainers anxious about shipping newer versions. It also seems like it's going to be forever stuck on the 5.1 revision of the language, while continuing to pick a few cherries from 5.2 and 5.3. It's nice to have a "boring" language, but most distros (certainly Alpine, Debian, NixOS) just ship each release branch between 5.1 and 5.4 anyway. No "whatever was master 3 years ago" lottery.
- sitkack 1y agoThe argument isn't about who has the standard lib, what I think Kragen is saying is that that the Python leadership has no qualms about removing functionality that people rely on and making up lame reasons to do so.
- Aeolun 1y agoThis feels like the spacebar heating argument. Sure, there’s probably a fraction of a percent that uses Python for CGI like that, but it’s not worth making all other support harder to have it.