Re: The Official Funny Getting Started with Python Thread™
-
@HardwareGeek said in The Official Funny Stuff Thread™:
Click through and read the whole thread.
From there I found that guy's blog. The latest post (as I write this) is a hoot:
-
So, was right, not only there's too much complexity in many modern application stacks, in many ways, the people responsible for the individual parts rarely care about backwards compatibility the way their consumers would prefer them to (cue the people in the comments complaining about Excel-reading packages from Tidyverse), and the number of the moving parts (e.g. packages in a typical dependency tree) is too damn high already and keeps rising. Random tutorials on the internet that only work for the author when they want to do one and only one thing without looking at the big picture don't help, either. At least it wasn't JavaScript, though.
But is it accidental complexity, the kind that can and should be abstracted away until there's one — and preferably only one — obvious way to do it, or is it essential complexity that will never go away because the abstractions are leaky and can't contain the complicated nature of the situations where Python is expected to be working? Perhaps the reason there's more than one way to do it is because they all have their relative merits in different situations?
Visual Basic (also mentioned in the comments) is very well-integrated, but it also doesn't have to run on tens of very different platforms, deployed in strange and sometimes necessary configurations. Interestingly, MATLAB is also well-integrated while also being more cross-platform, and most pieces of MATLAB software I've seen are very self-contained, either not depending on anything else besides MATLAB itself or bundling one or two dependencies in the
private
directory. Does it mean that you can have either simplicity or package management, but never both?
-
I'm pretty sure this java codebase can be subdivided in generated code, meaningful logic, and glue. I'm not yet sure of the proportions, or of which bits are what.
All in all it seems it could be much worse but that may be Stockholm.
-
@aitap said in Re: The Official Funny Getting Started with Python Thread™:
Does it mean that you can have either simplicity or package management, but never both?
Yeah, I've always thought that blakey had a point about this stuff, but that the alternatives were all worse, especially his proposed solutions. All of the issues brought up were meant to solve real problems, and at least at some point they solved someone's problem, but there are lots of problems out there, sometimes deceptively similar looking.
-
Hilarious write-up, but all too true.
On my current laptop, I figured that instead of going through the pain that is anaconda I'd instead try installing python via homebrew. As the post already highlighted, trading one bad option for another, that was a big mistake. As they say:
If you wish to make an apple pie from scratch, you must first invent the universe.
Or in this case, compile the universe. This will depend on shit like cairo, openblas, and who knows what, which in turn will require both gfortran and gcc, even though there's already a gcc symlinked to clang available. Literal hours of compiling shit later, it ran into a bunch of errors that I forgot how I fixed them. Which is kind of a feat, since normally homebrew is set up such that it should get everything right automatically.
In the end, it's working now but I never touched brew again because if it ever updates anything it'll probably compile the whole universe again.
-
@topspin said in Re: The Official Funny Getting Started with Python Thread™:
even though there's already a gcc symlinked to clang available
-
@boomzilla said in Re: The Official Funny Getting Started with Python Thread™:
@topspin said in Re: The Official Funny Getting Started with Python Thread™:
even though there's already a gcc symlinked to clang available
MacOS. Ships with clang, which is gcc-compatible.
-
@topspin is it really? Maybe this is just my showing. Also, never used a Mac for more than a few minutes, so, eh?
-
@boomzilla said in Re: The Official Funny Getting Started with Python Thread™:
@topspin is it really? Maybe this is just my showing. Also, never used a Mac for more than a few minutes, so, eh?
It supports most of the same command-line arguments by design, yes. If your build depends on the differences, you're probably using something too bleeding-edge to be available everywhere or doing it wrong .
Back in the days (before my days, I guess), you'd just use$CC
instead, but I guess some stuff has gcc hard-coded.
-
Also, for one of our products I made a neat little python interface.
pybind11
makes that quite simple to do, and for high-level scripting the result is quite nice. However, I only make this available internally. The mere thought of having to ship or support a python installation for our customers is giving me a huge headache.
-
@PleegWat said in Re: The Official Funny Getting Started with Python Thread™:
I'm pretty sure this java codebase can be subdivided in generated code, meaningful logic, and glue. I'm not yet sure of the proportions, or of which bits are what.
All in all it seems it could be much worse but that may be Stockholm.
That, can be sorted, at least since 8 or so, glue are HOFs.
-
@topspin Part of the reason for GCC could be the need for a Fortran compiler. Flang exists, but is still experimental and seems to be completely absent from Apple's toolchain. They also don't support OpenMP.
-
@boomzilla said in Re: The Official Funny Getting Started with Python Thread™:
is it really?
It's pretty close when it comes to doing almost any of the stuff that you'd likely do to run on your current computer. It probably won't be generating as good code as either gcc or the current version of clang would, but it will probably work. Unless you're doing something funky like relying on the guts of libgcc or other exciting stuff like that (don't do that).
If you want to cross-compile, you don't have any of that to help.
-
@topspin said in Re: The Official Funny Getting Started with Python Thread™:
the pain that is anaconda
The last thing called "anaconda" I used was the olde-skoole RedHat installer, before the split into RHEL and Fedora. I'm guessing that you aren't talking about that.
-
@boomzilla I'll admit that as I read that article, I got a distinctly vibe from his writing.
Although I take issue with one thing he said:
Version control is a no brainer: it’s git or nothing.
Error.It's Perforce or nothing. (More seriously, I detest git. I use it because work says so, but I detest it enough that my twenty-year Perforce depot is staying in Perforce, thank you.)
-
@topspin said in Re: The Official Funny Getting Started with Python Thread™:
I guess some stuff has gcc hard-coded.
Basically, gcc implements a language profile that's C plus a bunch of language extensions (pretty well documented and usually a good idea, especially the attributes on functions). Real clang supports almost all of the same extensions as they'd otherwise need to reinvent something similar themselves, and Apple pushes their frankensteinian abomination a bit further. But doesn't use the latest version of either.
The only time when you really need Apple's gcc, apart from when bootstrapping a toolchain (or using Xcode), is when building the low-level of a GUI library for macOS, as there's a few things that absolutely have to be done with it to work right. I never put the effort in to figure out exactly what they are; they might be related to something nasty like Objective-C and/or Swift support? If you're not doing that, you can ignore that stuff.
-
@Steve_The_Cynic said in Re: The Official Funny Getting Started with Python Thread™:
I'm guessing that you aren't talking about that.
It's a Python distribution for Windows.
-
@dkf OK. How does it compare to ActiveState (a bit dated, I know)?
-
@dkf said in Re: The Official Funny Getting Started with Python Thread™:
@Steve_The_Cynic said in Re: The Official Funny Getting Started with Python Thread™:
I'm guessing that you aren't talking about that.
It's a Python distribution for Windows.
Not just for windows, I’m using it on Linux too.
-
@Steve_The_Cynic said in Re: The Official Funny Getting Started with Python Thread™:
@dkf OK. How does it compare to ActiveState (a bit dated, I know)?
I used to use that. Now I just use the installer directly from python.org (plus pyWin32).
-
@dcon I just use whatever comes with WSL. Or whatever is bundled with Blender, if I'm scripting inside it.
-
@boomzilla The article matches my memory and experience of Python and Git.
I especially liked the mention of C++. I had to maintain some charts made with Webalizer, a Python open-source tool almost as old as Python that hadn't been maintained in over five years. The charts hadn't been produced in a couple of years, and the last guy who used it had moved on to another project.
I was trying to debug a problem, and, guess what, the core is written in C++. I've probably done a week's worth of C++ spread out over the years since I got out of school.
It progressed about as fast as you would expect.
-
@Steve_The_Cynic said in Re: The Official Funny Getting Started with Python Thread™:
@dkf OK. How does it compare to ActiveState (a bit dated, I know)?
Anaconda is oriented to scientific computing: numpy, scipy, data visualization and analysis with libs and apps built above that. All precompiled for mainstram platforms.
Don't remember what flowor has/had ActiveState
-
@cabrito said in Re: The Official Funny Getting Started with Python Thread™:
@Steve_The_Cynic said in Re: The Official Funny Getting Started with Python Thread™:
@dkf OK. How does it compare to ActiveState (a bit dated, I know)?
Anaconda is oriented to scientific computing: numpy, scipy, data visualization and analysis with libs and apps built above that. All precompiled for mainstram platforms.
Don't remember what flowor has/had ActiveState
I get the impression that ActiveState are more focussed on commercial uses that want to still stay on Python 2.7. That is, instead of users having to rewrite their codebases, the users can pay to have the old dependencies on life support. No idea if AS also do 3.* versions; probably do, because someone will be willing to pay for it, but I've not looked.
I don't use either that or Anaconda. Our Python code development and installation instructions just tell everyone to use a virtual environment (we supply the setup scripts for those, shared with our CI workflows so tested frequently) and that makes most trouble go away.
-
@boomzilla The installation issues are in huge part caused by the fact that neither Windows nor MacOS have anything close to a package manager that would allow installing infrastructural components, which language runtimes are. I usually used python on Linux and there it usually just works.
On Windows on the other hand I always ended up with at least three copies—native one from the official package, one in cygwin, msys2 or wsl2 (depending on time period), and at least one bundled with some software.
@topspin said in Re: The Official Funny Getting Started with Python Thread™:
On my current laptop, I figured that instead of going through the pain that is anaconda I'd instead try installing python via homebrew.
Why not start with the official installer?
@topspin said in Re: The Official Funny Getting Started with Python Thread™:
Also, for one of our products I made a neat little python interface.
pybind11
makes that quite simple to do, and for high-level scripting the result is quite nice. However, I only make this available internally. The mere thought of having to ship or support a python installation for our customers is giving me a huge headache.There is py2exe that bundles a small loader, pythonXY.dll and all the (byte-compiled) python code involved in your software to create a stand-alone executable that runs basically on any Windows, no dependencies needed. I don't know whether there is anything similar for MacOS though.
-
@Bulb said in Re: The Official Funny Getting Started with Python Thread™:
Why not start with the official installer?
You must be new here ...
-
@Bulb said in Re: The Official Funny Getting Started with Python Thread™:
I don't know whether there is anything similar for MacOS though.
Probably is, but the packaging will be totally different.
It depends on whether you're producing a GUI app or a command line tool. The former is basically a signed directory structure that doesn't require a lot of fancy packaging otherwise (except to put it in a
.dmg
for actual distribution; there are tools for that). Command line tools almost identical to doing it on Windows or Linux, except for that damn signing requirement. Signing on macOS is a pain (or rather it's very tied to Xcode so it is a pain).
-
@Bulb said in Re: The Official Funny Getting Started with Python Thread™:
I usually used python on Linux and there it usually just works.
Yeah it was obvious he was using a toy operating system as I read TFA.
-
@dkf said in Re: The Official Funny Getting Started with Python Thread™:
Probably is, but the packaging will be totally different.
I didn't see it with the previous search on the cheese shop, but that's a testament to the crappiness of the cheese shop search.
Use of proper search engine revealed py2app (mac-only, similar to py2exe), briefcase (multi-platform) and pyinstaller (also multi-platform).
… packaging of GUI or command-line applications differs on Windows too, though not as much. I suppose at least one of the tools will be able to package each kind.
-
@boomzilla said in Re: The Official Funny Getting Started with Python Thread™:
@Bulb said in Re: The Official Funny Getting Started with Python Thread™:
I usually used python on Linux and there it usually just works.
Yeah it was obvious he was using a toy operating system as I read TFA.
Professional clowns use a system built by professional clowns.
-
then something requires you to install C++
Ah. That's good - we've reduced the problem to a known one, and one that I can deal with.
Best case scenario: one can start using just C++ and ditch python altogether.
-
@topspin said in Re: The Official Funny Getting Started with Python Thread™:
On my current laptop, I figured that instead of going through the pain that is anaconda I'd instead try installing python via homebrew.
Why not start with the official installer?
Well, usually you don't just need base python, but numpy/scipy, matplotlib, pyside, and twelve million other packages (all of which say to use different package managers). And install them without breaking your base system, preferrably without root rights on a multi-user system.
-
@topspin are you planning some sort of Pylympics event?
-
@topspin said in Re: The Official Funny Getting Started with Python Thread™:
Well, usually you don't just need base python, but numpy/scipy, matplotlib, pyside, and twelve million other packages (all of which say to use different package managers).
That sort of thing is why we go for virtual envs and properly characterised dependency lists. With them, we don't have much trouble at all even with very annoying packages (both numpy and matplotlib used to be ghastly; they're much better now you can use binary distributions). The real problems only come from variations in the capabilities of the base Python installation, as those can be quite variable.
-
@dkf said in Re: The Official Funny Getting Started with Python Thread™:
virtual envs
And there's also 37 different ways how to do that, with the corresponding tutorials.
-
@topspin said in Re: The Official Funny Getting Started with Python Thread™:
@dkf said in Re: The Official Funny Getting Started with Python Thread™:
virtual envs
And there's also 37 different ways how to do that, with the corresponding tutorials.
Yes, but once you've made one by any of the mechanisms then they work pretty much the same from the inside. (They're really just a bunch of environment variables that tell Python "look here first for everything", and some conventions with symlinks and installation.)
-
@Steve_The_Cynic said in Re: The Official Funny Getting Started with Python Thread™:
@topspin said in Re: The Official Funny Getting Started with Python Thread™:
the pain that is anaconda
The last thing called "anaconda" I used was the olde-skoole RedHat installer, before the split into RHEL and Fedora. I'm guessing that you aren't talking about that.
I love anaconda python, it's my distribution of choice. What's your issue with it?
-
@dangeRuss Mostly(1) just that I hadn't even heard of "anaconda" being a python distro. Red Hat's "anaconda" was an OS installer, written in Python 1.6.
(1) If truth be told, it's more like entirely rather than mostly, but whatevs.
-
@Steve_The_Cynic said in Re: The Official Funny Getting Started with Python Thread™:
@dangeRuss Mostly(1) just that I hadn't even heard of "anaconda" being a python distro. Red Hat's "anaconda" was an OS installer, written in Python 1.6.
(1) If truth be told, it's more like entirely rather than mostly, but whatevs.
Yes, I remember using anaconda the Linux installer. It's not highlander, there can be more than one.
-
@Steve_The_Cynic said in Re: The Official Funny Getting Started with Python Thread™:
[…] I hadn't even heard of "anaconda" being a python distro. Red Hat's "anaconda" was an OS installer
Entirely different "anaconda"s.
-
-
@aitap said in Re: The Official Funny Getting Started with Python Thread™:
Random tutorials on the internet that only work for the author when they want to do one and only one thing without looking at the big picture don't help, either. At least it wasn't JavaScript, though.
I tried a few guides to install kubernetes with windows nodes I found, most don't work with the latest version, same for microk8s. And that happened with official docs, not even random tutorials
-
@sockpuppet7 Windows what? Even Microsoft does not seem to care about Windows nodes.
-
@sockpuppet7 said in Re: The Official Funny Getting Started with Python Thread™:
And that happened with official docs, not even random tutorials
Now that's a serious offence. Even if a typical software license (no matter whether open sores or EULA) screams at you in all caps that THERE IS NO WARRANTY FOR ANYTHING, this is something the actual developers could improve, as opposed to fixing all the random "here's what worked for me once in 2010" tutorials that Google would gladly offer you.
Assuming they want their product to be used, of course. Some people don't, and that's okay too.
-
@aitap Look, it's Microsoft. Everybody's been making fun of Microsoft documentation for at least quarter a century. With notable exception of the Win API and some of the .NET one, which is quite good. But the user documentation and most documentation for the higher layers, including everything Azure, sucks and always did.
-
@Bulb said in Re: The Official Funny Getting Started with Python Thread™:
With notable exception of the Win API and some of the .NET one, which is quite good.
If you can find it.
-
@topspin It used to be easier back when you could install the offline version with Visual Stupido. Somehow they could make a working offline search, but struggle with making equivalent online one.
-
@Bulb said in Re: The Official Funny Getting Started with Python Thread™:
@aitap Look, it's Microsoft. Everybody's been making fun of Microsoft documentation for at least quarter a century. With notable exception of the Win API and some of the .NET one, which is quite good. But the user documentation and most documentation for the higher layers, including everything Azure, sucks and always did.
But the worst of the worst of all was the Windows 9x Driver Development Kit documentation, specifically the one for Win98 (pre-SE).
Some of the entries were kinda OK. Some were still based on Win95 original (not mentioning anything about OSR2, nor about Win98) and weren't quite correct for Win98. Some were right, if you were working on WfW 3.11 or maybe Win3.1. A very few had never been updated since the Win 3.0 version was released.
But there's a special corner of Hell reserved for the people who wrote the items in the last category. That's the ones that weren't ever correct.
-
@topspin said in Re: The Official Funny Getting Started with Python Thread™:
If you can find it.
...and no one else can help...
-
@Zerosquare said in Re: The Official Funny Getting Started with Python Thread™:
@topspin said in Re: The Official Funny Getting Started with Python Thread™:
If you can find it.
...and no one else can help...
...maybe you can hire... the Aaaaargh Team