Python dominates the IT world, especially in automation and many other areas. If you ever need a quick boost to your resume and job profile, try to master it. It's not perfect, but it gets the job done. Python is in demand for everything from writing web apps to IT infrastructure and more. The best part? It is easy to learn. It is the new basic.
@RadioAzureus @nixCraft much easier, no peeks and pokes. Functions instead of gosub . Etc etc

I think I agree with that. However given that BASIC was the first programming language I was introduced to and I only learned Python after taking a computer science degree, I am not in the best position to compare the ease of learning the two.

Another comparison I think is worth highlighting is that I find Python to be much more suitable than BASIC for writing larger programs. It's easier to write a large well structured program in Python. With BASIC you can easily end up with spaghetti code.

PowerShell dominates the IT world, especially in automation and many other areas. If you ever need a quick boost to your resume and job profile, try to master it. It's not perfect, but and it gets the job done. #PowerShell is in demand for everything from writing web apps to IT infrastructure and more. The best part? It is easy to learn. It is the new basic.

There you go @nixCraft, I fixed it for you 😁

@sassdawe @nixCraft

JavaScript dominates the IT world, especially in automation and many other areas. If you ever need a quick boost to your resume and job profile, try to master it. It's not perfect, but and it gets the job done.
JavaScript is in demand for everything from writing web apps to IT infrastructure and more. The best part? It is easy to learn. It is the new basic.

@sassdawe
Nobody cares about powers he'll (sic!) in serious It except they have to deal with Microsoft stuff.
There I fixed it for you...
@nixCraft
@blackcoffeerider @sassdawe @nixCraft convenient for some hypervisor work as well as some backup and storage systems. But I wouldn't write billing logic in it (again).
@depereo @blackcoffeerider @nixCraft you can do anything with it, and you don't even need to import a library to work with dates.
@sassdawe @nixCraft
All I know in powershell is wsl --install -d debian
@sassdawe @nixCraft 🀣 this is where I am at. in my experience almost all windows automation I've seen is in #PowerShell
@sassdawe @nixCraft Does Powershell work on Linux? Python works on Windows...

@matt604 @nixCraft hell yeah #PowerShell do run on Linux!!

I use it everywhere: on Windows, on MacOS both with Intel and Arm and on Ubuntu both on x64 and Arm64.

https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.4

And with this xpat version the remoting capability is based on SSH!

Install PowerShell on Linux - PowerShell

This article lists the Linux distributions and package managers that are supported for installing PowerShell.

@nixCraft I can't get over Python's syntax. I use PHP for more complex scripts (or when replacing complex Bash scripts).
@nixCraft @nightlynx And it is sooooo sloooooow … coming in from other languages gives you whiplash …

@nixCraft

Python is actually pretty elegant as computer languages go. I highly recommend "fluent python" if you already know a few programming languages and want to learn to love python. It's also a good book if you have a good understanding of the basics of just python, but want to get a better understanding of WHY the language is the way that it is.

This book also helped me to begin to appreciate the architecture and design of programming languages in general for the first time.

@futurebird @nixCraft As a biologist, I have to ask why the heck there is a lizard pictured on the cover of the book when a python is a snake? Is this some type of inside joke?

@digitalrodent @futurebird @nixCraft

O'Reilly books each have an animal so you can distinguish "Fluent Python" from "Beginner Python" and from "Why are you still using Python?".

This one is a lizard, so if you ask at the end of the book "What part of this was actually 'clear' or 'concise'?", it can just throw off it's tail and scurry away.

@digitalrodent @futurebird @nixCraft O'Reilly publishes a series of technical/instructional/reference books. for probably 30+ years the visual theme is a colorful, bold, legible title and artwork of an animal. there are about 1400.

https://www.oreilly.com/animals.csp

Animal Menagerie - O'Reilly Media

What's that animal on the front of your O'Reilly book? You'll find it listed here.

@dank @digitalrodent @nixCraft

So many wonderful animals but there's only one cover with ants. Honeypot ants.

But it's a rare cover with a serious biological error. In honeypot ants the repletes, the ants with distended gasters full of nectar, do not exit the nest. They can hardly walk. The ants that you might find on leaves of these species look ordinary, their grape-like sisters stay underground.

We deserve a revised cover... and also MORE covers with more ants!

@futurebird
Probably used machine learning to create the cover.

@dank @digitalrodent @nixCraft

@futurebird it's all an elaborate ruse to get entomology enthusiasts to out themselves
@dank @digitalrodent @nixCraft
@futurebird and this is what they used to represent machine learning? thats kinda hilarious

@twipped

I'm so bothered by the idea of the poor helpless repletes stranded exposed on a leaf... like treats waiting for a passing bird! It's horrible!

IDK if this is ML's fault... but I've never seen an error like this on any of the other covers.

@dank @digitalrodent @futurebird @nixCraft in the case of a book about python the cover should’ve been a dead parrot πŸ˜‰

@digitalrodent @futurebird @nixCraft All O'Reilly books have animals, almost always with no intended correlation https://www.oreilly.com/content/a-short-history-of-the-oreilly-animals/

And then programmers will often refer to them by the animal, e.g. "have you read the llama book?"

A short history of the O'Reilly animals

How lions, tigers, and tarsiers went geek.

O’Reilly Media

@digitalrodent @futurebird @nixCraft the name Python is pretty arbitrary. Maybe they didn’t want to make a literal connection.

The inventor of Python is the most chill Dutch guy ever and it’s one of my all time favorite languages but calling it Python? Really? Worst name ever. I don’t think he did it from a place of heavy bro / toxic masculinity. That’s what it sounds like nowadays, though.

@kumarvibe @digitalrodent @futurebird @nixCraft He loved Monty Python. It's similar to how we are on Mastodon.

@dan613 @digitalrodent @futurebird @nixCraft oh, ha, I forgot about that. Monty would have been a better name for the language πŸ˜…

Fun fact: Python.com was not available when they first hyped the language (it was an adult site).

@digitalrodent At least Perl had, obviously, a πŸͺ on the cover.
@digitalrodent @futurebird @nixCraft also note that Python is named for Monty Python, not for the snake. Its creator Guido von Rossum resisted the association with snakes for a long time!
@digitalrodent @futurebird @nixCraft yes, much as he prefers tabs but the community chose spaces... He has a knack for striking a good balance between opinions and inclusion...

@digitalrodent @futurebird @nixCraft The Python programming language was named after *Monty* Python, not after the snake!

So the O'Reilly book cover that gets the animal reference right is the one for Allen Downey's _Think Python_, which references the Parakeet Sketch πŸ˜‚ https://greenteapress.com/wp/think-python-3rd-edition/

Think Python – Green Tea Press

@Log3overLog2 @digitalrodent @futurebird @nixCraft ... and I've heard Python is a dead language.

@digitalrodent @futurebird @nixCraft
no idea, but there are about 46 python books from that publisher. Maybe there might be enough species of python if they went for all the obscure species in pythonoidea?

as it is, Programming Python has an african rock python on the cover, and about five other python books feature other pythons, but most seem to have animals chosen more or less at random, including lizards, amphibians, mammals, non-python snakes, birds, etc.

https://www.oreilly.com/animals.csp?x-search=python&x-sort=animal

Animal Menagerie - O'Reilly Media

What's that animal on the front of your O'Reilly book? You'll find it listed here.

@digitalrodent @futurebird @nixCraft
They might not have enough python images in the desired style for all their python books? Or maybe they want to keep the books visually distinct, while still using the "18th century engraving of an animal" thing they have with all their books.
@futurebird @nixCraft If you ever want to dip into a language without going out and buying the whole O'Reilly zoo, many libraries (like Seattle's) have online access to Safari, the whole collection. It's nice to read a chapter or two before you decide if you really want to study one of the topics they cover.

@futurebird @nixCraft The main problem with python is that the developers of the language eschew backward compatibility. Hence if you develop something useful in Python you will be forced to either maintain it for the rest of your life or abandon it once the language no longer supports it.

As such, I can neither use python (or recommend using it) for anything that has a potential lifetime longer than 2 years.

@futurebird @nixCraft Yes! Fluent Python definitely let me feel more comfortable with the python meta-model that lurks just under the surface. There is much more introspection and consistency in the language and libraries than I realized beforehand.
@futurebird @nixCraft oh I need this. I have been having, "urges", recently to go back to #perl Perhaps this book about #python will forestall my descent back into degeneracy.
@futurebird @nixCraft Totally agree that this is a great book. Worth reading multiple times.

@nixCraft

I think python's reputation for being "easy" sometimes makes people think it can't also be powerful or precise. But, it's also capable in these areas as well.

It's not the best at some tasks (such as processing text) but even the things about it that are contrived have been made contrived for good reasons and with care.

@futurebird @nixCraft you make a very good point here. Some people tend to discount it as 'simple, thus not performant' however speaking about processing text for example, a library like SpaCy made me realize how powerful Python can be at that too

@nixCraft I use Python all the time as the main scripting language when the script needs more than a few conditionals or has to process text.

For my embedded systems work, I use it to drive functional tests of hardware using PyTest, often together with PySerial.

I use Python tools like Sphinx and Jupyter whenever possible too.

It's a great language for tooling once you understand how to use the extensive library system, and minimize external dependencies.

@rhempel @nixCraft I love Jupyter. The mix of Jupyter and Sphinx in the form of Jupyter Book is incredible.

Pytest is incredible. Maybe there's equivelent in one of the more modern languages like Rust or Go, but I've yet to see anything that matches pytest in what it is capable of and what it makes easy.

C++ and Python mix really well also. Pybind11 makes it pretty easy.

@crazyeddie
In that case, make sure to check out Xeus Cling (you will need conda to do so).
Start up a new Jupyter notebook in C++17 😁
@rhempel @nixCraft
Introduction β€” xeus-cling documentation

@ami @rhempel @nixCraft Yeah, wish it would get updated. Been waiting 5 years.

@crazyeddie @rhempel @nixCraft Since Jupyter tends to not play well with git, I recently discovered #marimo. The reproducible execution alone is worth it. Check it out.

https://marimo.io

marimo | a next-generation Python notebook

Explore data and build apps seamlessly with marimo, a next-generation Python notebook.

@JensHannemann @crazyeddie @nixCraft Oooh - this looks very interesting indeed.
@nixCraft it still hasn't got any of my screenplays made, despite including "I know python" on the title page 🀣
@nixCraft just don't forget to relearn it and rewrite all your scripts whenever a new version comes out. https://mastodon.social/@hyc/113773392521070242

Apart from the switch from Python 2 to Python 3, I don't recall any Python release, which fundamentally broke backwards compatibility.

I don't think that deprecating Python 2 was the right choice even though a new version has been available for several years. As far as I know you can still compile ANSI C code using the latest version of GCC.

There has been certain practices in how Python programs were invoked, which could lead to accidentally invoking it with a different Python version than intended. With a correct #! line at the top of the program and a correctly installed Python interpreter, that should not happen.

@hyc @nixCraft To be fair, that post is about issues someone is having with selenium, one of the most notoriously fragile third-party Python libraries in existence.

If you want to control a headless browser instead of just making raw http requests, then your code is going to be prone to breakage no matter what language you use.

@nixCraft Sadly, it's the new Data General Extended Basic on time-shared 70s systems, not the new 80s homecomputer Basic.
@nixCraft most #Python problems get solved by #Docker, so it gets a bit more complicated than that.
@nixCraft So we should expect the insult to transform to "What a python bitch" ?