News for hackers. Stuff that matters.
Re:Python 3.11 by gypsyharlot on Monday October 04, 2021 @02:19AM (#28743636)
Python is deceptive. They lure you in with its simplicity, and then one day you want to deploy your software and you realize that it's more complicated than any other programming language ever conceived of.
Re:Python 3.11 by salex89 on Monday October 04, 2021 @02:36AM (#28743743)
Wouldn't say it better myself. Everything you gain with fast coding you lose on tackling performance issues, GIL, dependency management... Things harder to solve once you're committed to production.
Re:Python 3.11 by peakaboo on Monday October 04, 2021 @02:56AM (#28743880)
It depends very much on what you are doing. Python for big complicated applications is a No for me also but python for extraction jobs in a ETL pipeline or data science tasks is a huge YES.
Re:Python 3.11 by askvictor on Monday October 04, 2021 @02:35AM (#28743733)
I don't know; I've just written something in .net/c# and it's pretty bloddy difficult to deploy.
Re:Python 3.11 by gkbrk on Monday October 04, 2021 @03:16AM (#28744003)
.NET can export self-contained single-file executable that doesn't require any runtime on the target computer/server.

Python has solutions like PyInstaller, but it's not built-in and requires building on the same system. In .NET, you can use the built-in tools to export binaries for Linux from Windows.

Re:Python 3.11 by askvictor on Monday October 04, 2021 @06:34PM (#28753085)
Except when you have some specific dependencies/targets that make this difficult. I'm sure I'll get there eventually, but I chose .net for this thinking it would be dead simple, and yet here I am wading through documentation and stackoverflow posts to get to my self-contained single-file executable.
Re:Python 3.11 by byteface on Monday October 04, 2021 @04:12AM (#28744297)
Most windows users have at least 4/5 versions of linux installed on their machine so it's a non issue. They have wsl, a base installed partition, vagrant, a VM and probably docker containers. so running one extra command to gen a windows package isn't a big deal.
Re:Python 3.11 by rowanG077 on Monday October 04, 2021 @08:16AM (#28745689)
.net/C# was one of the easiest to deploy in my experience. Just build a self-contained executable and you're done.
Re:Python 3.11 by matkoniecz on Monday October 04, 2021 @02:52AM (#28743851)
Can you be more specific about your claims? What is wrong with Python?

> more complicated than any other programming language ever conceived of

is definitely untrue. Even if you take only mainstream languages then there are many more annoying to deploy, ones that are more complicated and so on.

Re:Python 3.11 by jshen on Monday October 04, 2021 @02:57AM (#28743890)
Dependency management in python is much worse than most mainstream languages.
Re:Python 3.11 by matkoniecz on Monday October 04, 2021 @03:24AM (#28744045)
Here I agree, but it is quite far away from

> more complicated than any other programming language ever conceived of

Re:Python 3.11 by gypsyharlot on Monday October 04, 2021 @04:29AM (#28744395)
It was far easier for me to grok monads in Haskell (and it took less time), than to learn how to properly deploy a Python application. Given that monads are often a complaint and testament to the "complexity" of Haskell, I think it's unfair to make the claim that Python is uncomplicated. If you use a language for some period of time, it is very likely that you will have to deal with the tooling at some point.
Re:Python 3.11 by eesmith on Monday October 04, 2021 @04:31AM (#28744404)
I think the "it's" in "it's more complicated" refers to deploying software, not the language itself nor its support packages.
Re:Python 3.11 by globular-toast on Monday October 04, 2021 @04:31AM (#28744405)
When you say "deploy" do you mean "put it on a webserver"? I've deployed python Web services on to very limited environments that have nothing more than an interpreter. Nowadays I use pip-tools and docker which makes updating trivial.

Do you perhaps mean distribution as an app? I've had luck with pyinstaller. There can be fiddly bits but overall it's pretty smooth. It's easier if you are targeting a system with an interpreter, like a Linux distro.

Overall I just think you need to know what you're doing. I don't really think this is a bad thing. Maybe you could elaborate on what your difficulties are? From here I just don't see how it's more difficult than anything else.

Re:Python 3.11 by gypsyharlot on Monday October 04, 2021 @05:02AM (#28744615)
Re:Python 3.11 by globular-toast on Tuesday October 05, 2021 @04:27AM (#28756758)
Thanks, I know all of that. What made you think I don't?
Re:Python 3.11 by pansa2 on Monday October 04, 2021 @04:28AM (#28744385)
Yes - this is the reason I've switched to Go for writing command-line apps. I don't like Go as much as Python (Go is simpler, but not as easy), but being able to compile a self-contained executable is huge. It's also great to have access to GIL-free parallelism.

I don't expect Python to support either of those things any time soon.

Re:Python 3.11 by DemocracyFTW on Monday October 04, 2021 @02:33AM (#28743718)
This is a solved problem. The community provides a handy system overview[^1] that should be good enough for most cases.

[^1]: https://xkcd.com/1987/

Re:Python 3.11 by SteadBytes on Monday October 04, 2021 @08:28AM (#28745786)
Didn’t even need to open the link to know what it was, thanks for the laugh!
Re:Python 3.11 by agumonkey on Monday October 04, 2021 @02:35AM (#28743730)
It's probably the most voiced complaint these days, unless core devs are deaf, I bet ten solid dollars they're gonna address that soon.
Re:Python 3.11 by jshen on Monday October 04, 2021 @03:14AM (#28743992)
It’s been like this for over a decade. I wouldn’t hold my breath. By comparison, I’m pretty sure the Ruby community adopted bundler over a decade ago.
Re:Python 3.11 by agumonkey on Monday October 04, 2021 @07:01AM (#28745195)
Maybe they were busy on other things. Py3k, async. Now these are settled I don't see what other defect needs to be worked on
Re:Python 3.11 by akmittal on Monday October 04, 2021 @02:27AM (#28743686)
What kind you issues you get during deployment? I think if running on right version then there should not be any issues.
Re:Python 3.11 by gypsyharlot on Monday October 04, 2021 @03:00AM (#28743904)
https://stackoverflow.com/questions/52187362/how-to-deploy-p...

Some of these approaches work for Windows, others for Mac, some for Linux, depending on versions of Python that are installed, etc. You can get around some of the problems with pyenv and a bunch of other tools.

Re:Python 3.11 by ido on Monday October 04, 2021 @03:50AM (#28744188)
I was originally using python (learned it in my first job back in 2001!) & that was the reason I eventually moved to other languages - python as a language is great but the tooling/ecosystem isn't for exactly these issues (or at least weren't at the time, that's also at least a decade+ ago by now).

My impression at the time was that using it for server side stuff was fine (i have control of the server and simply install all the right things/versions myself) but packaging it up for end users to install on their desktops/mobile was a huge pain, there was no real easy/simple way to just export a self running installer that you double click (on windows/mac) or an IPA/APK (on ios/android) and end up with a running program the way users were used to from e.g. a bundled .net (at the time using mono, now ms provides cross platforms .net implementations themselves) or native c/c++ executable.

Re:Python 3.11 by mrlonglong on Thursday October 07, 2021 @12:53PM (#28788938)
I recently wrote a python script to handle serial communication and uploading of a bare metal binary to my RPi3, this saves me so much time debugging now that I don't need to swap SD cards continually. Excellent tool.
Re:Python 3.11 by dijit on Monday October 04, 2021 @02:26AM (#28743682)
Because of dependency management, or?
Re:Python 3.11 by dagw on Monday October 04, 2021 @02:32AM (#28743709)
Because of having to know what WSGI and ASGI are and picking the right one. Then pick which implementation of the above you want to use. Then configuring it correctly for your app. And finally make it play nicely with nginx/apache/whatever.

If on the other hand you're trying to deploy a desktop app, that is an entirely different kettle of 'fun'.

Re:Python 3.11 by maccolgan on Monday October 04, 2021 @02:34AM (#28743725)
That's not really a criticism of Python, is it? What do you want? One Way To Do Things with No Configuration with magical compatibility with nginx/apache/whatever ?
Re:Python 3.11 by badsectoracula on Monday October 04, 2021 @03:01AM (#28743915)
Well, according to the Zen of Python "there should be one- and preferably only one -obvious way to do it" :-P
Re:Python 3.11 by dragonwriter on Monday October 04, 2021 @10:10AM (#28746926)
> Because of having to know what WSGI and ASGI are and picking the right one. Then pick which implementation of the above you want to use. Then configuring it correctly for your app. And finally make it play nicely with nginx/apache/whatever.

None if the Python in I deploy has to deal with any of that, all of which applies in a very narrow particular application domain. Even if it was a source of valid criticism, it would only be of using Python for that specific use, not generally.

Re:Python 3.11 by aitchnyu on Monday October 04, 2021 @02:50AM (#28743834)
<dream> There is a very fast Gunicorn replacement in Rust that accepts an wsgi/asgi module and a static dir and starts serving both. It breaks performance barriers for pure Python servers. It can automagically create systemd service and nginx site or just exist as a Docker entry point.
Re:Python 3.11 by tigr on Monday October 04, 2021 @02:54AM (#28743858)
Have you ever tried to deploy an Erlang/OTP application? I find it much harder to do
Re:Python 3.11 by vland on Monday October 04, 2021 @06:25AM (#28745018)
No, but Go and C++ are much easier to deploy.
Re:Python 3.11 by rcarmo on Monday October 04, 2021 @03:31AM (#28744090)
This comment is deceptive. This is a solved problem with virtualenvs. It is why Piku (https://github.com/piku) can deploy isolated apps with ease (and actually devotes less than 80 lines of code to the actual Python deployment).
Re:Python 3.11 by gypsyharlot on Monday October 04, 2021 @03:43AM (#28744151)
Thanks for taking the opportunity to advertise your own product, but it doesn't solve the problem.
Re:Python 3.11 by rcarmo on Monday October 04, 2021 @03:46AM (#28744164)
It’s not a product. It’s an example of why it isn’t a problem, and it was actually _designed_ around virtualenvs, which is why it’s just a single script (again, not a product).