When did Python go out of fashion? This is the second article I've seen talking about it as if it's some kind abomination. I get that it's not the shiny new thing, but I don't understand people hating on it. Is this just junior devs who never learned it, or is there some new language out that I missed? (And please don't tell me Javascript....)
I think for a lot of us, it was very frustrating when it was being pushed with no real analog for the practices we had in other languages. Poetry used to be pushed as how to do dependency management, but it was not obvious that it was not necessarily your build manager, as well. Even today, I'm not entirely clear what the standard approach is for how to manage a project. :(
I'm switching to Python and actually liking it
261–270 of 718 posts
Re: I'm switching to Python and actually liking it
#262Earlier quoted context omitted.
Python's package management is OK. The main culprit is .so libraries Think JNI or cgo management.
I'll throw in BLAS and LAPACK. Fuck, what a nightmare it always has been to get scipy running. I've always ended up with a wild mix of conda and pip installed shit that just wouldn't work.
Re: I'm switching to Python and actually liking it
#263Earlier quoted context omitted.
I have a silly theory that I only half joke about that docker/containers wouldn't've ever taken off as fast as it did if it didn't solve the horrible python dependency hell so well. You know something is bad when fancy chrooting is the only ergonomic way of shipping something that works. My first taste of Python was as a sysadmin, back in 2012 or so, installing a service written in Python on a server. The dependency…
> However, uv has, at least for my beginner and cynical eyes, swept away most of the bullshit for me. uv is _much_ better than what came before. As someone who has only had only glancing contact with Python throughout my career (terrible experiences at jobs with conda and pip), uv feels like Python trying to actually join the 21st century of package management. It's telling that it's in Rust and clearly takes inspira…
Re: I'm switching to Python and actually liking it
#264Earlier quoted context omitted.
this is solved by uv
> things like virtual envs I consider my point as still valid with UV, what you wanted to express? On UV specifically - say 'asdf' compiles python right on your system from official sources - means using your ssl libs for example. UV brings Python binary - I feel worried on this.
Re: I'm switching to Python and actually liking it
#265pydantic basemodel has made dataclasses redundant.
Dataclasses have the one massive benefit of not being an additional dependency.
Re: I'm switching to Python and actually liking it
#266Earlier quoted context omitted.
There are private and public methods. Private methods are only supposed to be called within other methods, as in privately. Public methods are the ones that are normally called through the code, repl, by the user or whatever. You are not supposed to write `myclass.__add__(x)` anywhere except where you define the class itself and its methods.
There's actually 4 kinds: def foo(... # public def _foo(... # internal def __foo(... # munged def __foo__(... # magic Internal is more convention as the language doesn't really do anything with it, but it does with munged, and magic methods are specifically for things implemented in the language. Internal and munged don't exactly map to private and protected, but are kinda similar ish.
In any case I actually like how one can use underscores to point on how exposed some method is supposed to be. Makes it simpler to actually know what to skip and what not.
Re: I'm switching to Python and actually liking it
#267Said with a note of surprise? Made me think this is probably normally a Ruby developer indoctrinated against Python. The article doesn’t seem to say what they have come from.
Re: I'm switching to Python and actually liking it
#268I've avoided Python for a long time, but I'm getting roped in myself, mainly because certain tasks seem to require a lot less code than Java or Perl. That said, call me old-fashioned, but I really take issue with "curl $URL | bash" as an installation method. If you're going to use an install script, inspect it first.
Re: I'm switching to Python and actually liking it
#269Re: I'm switching to Python and actually liking it
#270"And guess what's the de facto programming language for AI? Yep, that sneaky one." Is this referring at all to to PyTorch. If not, any guesses what the author has in mind "Not only because the syntax is more human-friendly, but also because the Python interpreter is natively integrated in all Unix distros." Is this referring to GNU/Linux. UNIX (UNIX-like) includes more than Linux; some UNIX distributions do not inclu…