6 ms·
Yeah, that and the portability are really incredible and underrated. It is funny, because I constantly hear things like "write once, debug everywhere", but I ha
by _ea1k 1y ago
Yeah, that and the portability are really incredible and underrated. It is funny, because I constantly hear things like "write once, debug everywhere", but I have yet to see an alternative that has a higher probability of working everywhere.
Although Python is pretty close, if you exclude Windows (and don't we all want to do that?).
- bhaak 1y agoI often run into problems running Python code under Linux. I don’t know if it is a me problem or if I’m missing the right incantations to set up the environment or whatever. Never had that much problems with Java. But I’m a Java and Ruby person so it might really be missing knowledge.
- cestith 1y agoPython can be tricky with the big differences between 2 and 3.
- loloquwowndueo 1y agoPython 3 came out in 2008. If the 2 vs 3 differences are still biting you you probably have bigger problems to solve (deprecated, insecure, unmaintained dependencies for example).
- coolcase 1y agoAnd IPv6 came out in 1995
- loloquwowndueo 1y agoYour point?
- coolcase 1y ago"Comes out" and "Ready to switch to" are two different things. Your conclusion is correct but not because Python 3 came out in 2008. It was ready to switch to some point a few years later but we'll before 2025 (I don't recall when sorry I didn't do Python at the time!)
- icedchai 1y agoAs late as 2022, I was at a company still in the middle of "migrating" from 2 to 3. I wouldn't be surprised if the migration project was still going on. The system had gone beyond tech debt and was bordering on bankruptcy.
- jonhohle 1y agoFor anything more than just a one off script, look into venv. I’ve not written any python until this past year and can’t imagine maintaining an ongoing project without it. Prior to that I would frequently have issues (and still have issues with one-off random scripts that use system python).
- kevin_thibedeau 1y agoIt's not you. Python packaging has regressed into a worse mess than it was 20 years ago. I limit myself to simple scripts that only rely on builtins. Anything more complicated goes to a more dependable language.
- icedchai 1y agoI rarely run into issues when using Poetry. If you use pip, add packages to requirements.txt willy-nilly and don't pin versions then you are asking for trouble.
- myko 1y agoi like poetry though i've moved to uv - both work really well
- icedchai 1y agoI've heard great things about uv. I plan to try it for my next project.
- bornfreddy 1y agoI use pipenv and it kind-of-works. Will try uv or poetry though - which one would you recommend?
- dwood_dev 1y agoUV. Using it as the exec target for python (UV script) is great. Dependencies declared at the top, now I have executable files in something better than bash. I no longer shy away from writing <500 LOC utility/glue scripts in python thanks to uv.
- myko 1y agoI can't recommend uv enough. It's so fast, and uvx is so useful to run a random Python CLI tool. If you want to do things like you're accustomed to with pip you just `uv pip ...`
- _ea1k 1y agoHonestly, it isn't just you. I had to hold off on 3.13 for quite a while too, because of various package conflicts. It isn't terrible, especially thanks to things like pyenv, but it is far from perfect.
- cestith 1y agoI can run basically any Perl code back to Perl 4 (March 1991) on Perl 5.40.2 which is current. I can run the same code on DOS, BeOS, Amiga, Atari ST, any of the BSDs, Linux distros, macOS, OS X, Windows, HP/UX, SunOS, Solaris, IRIX, OSF/1, Tru64, z/OS, Android, classic Mac, and more. This takes nothing away from Java and the Java ecosystem though. The JVM allows around the same number of target systems to run not one language but dozens. There’s JRuby, Jython, Clojure, Scala, Kotlin, jgo, multiple COBOL compilers that target JVM, Armed Bear Common Lisp, Eta, Sulong, Oxygene (Object Pascal IIRC), Rakudo (the main compiler for Perl’s sister language Raku) can target JVM, JPHP, Renjin (R), multiple implementations of Scheme, Yeti, Open Source Simula, Redline (Smalltalk), Ballerina, Fantom, Haxe (which targets multiple VM backends), Ceylon, and more. Perl has a way to inline other languages, but is only really targeted by Perl and by a really ancient version of PHP. The JVM is a bona fide target for so many. Even LLVM intermediate code has a tool to target the JVM, so basically any language with an LLVM frontend. I wouldn’t be surprised if there’s a PCode to JVM tool somewhere. JavaScript has a few languages targeting it. WebAssembly has a bunch and growing, including C, Rust, and Go. That’s probably the closest thing to the JVM.
- sigzero 1y ago> I can run THE SAME CODE on DOS, BeOS, Amiga, Atari ST, any of the BSDs, Linux distros, macOS, OS X, Windows, HP/UX, SunOS, Solaris, IRIX, OSF/1, Tru64, z/OS, Android, classic Mac, and more. No, you really can't. Not anything significant anyway. There are too many deviations between some of those systems to all you to run the same code.
- maxlybbert 1y agoHonestly, the main difference I run into is just file paths, and that’s easy to sidestep ( https://perldoc.perl.org/File::Spec https://perldoc.perl.org/File::Spec ). There are differences, but they’re usually esoteric ( https://perldoc.perl.org/perlport#PLATFORMS https://perldoc.perl.org/perlport#PLATFORMS ).
- cestith 1y agoYes, I really can, and with the same number or fewer OS-specific checks than the equivalent C program.
- invalidname 1y agoI just spent 30 minutes trying to get a python package running on my Mac... Not feeling that. Pythons version compatibility is just awful and the mix of native is deeply problematic. Don't get me started on tooling and observability.