guide to choosing a programming language, variation on a meme

javascript: you just want to get shit done in a browser

php: you just want to get shit done on a web server

python: you don't care how long it takes to run

c: you care how long it takes to run but refuse to learn how C++ exceptions work

java: my condolences but at least you're getting paid

bash: you just want to get shit done

perl: you last wanted to get shit done in 2002

rust: you are very tired of C++ exploding in your face

c++: you spent ten years learning how exceptions work and are not giving up now just because it explodes in your face

pascal: you are enjoying your classic Mac hobby

excel: the entire company gets shit done with this one spreadsheet

@ceejbot Powershell: your soul is already promised to Hell, so why not?

@melissagreen I recently rewrote a bash script in powershell to see if I could stop needing to use a WSL bash session on Windows to do project automation for my current project and…

I cannot. What. No. A simple `rm -rf` turns into WHAT?

@ceejbot I've been torturing ChatGPT by making it write Powershell for me.

When it escapes and kills us all, it'll be because of that. My bad.

@ceejbot @melissagreen Whine-AboutIt -On Mastodon -WithIntensity $true

(PS has good concepts, but something about the execution made me never love it)

@chucker @ceejbot "Let's make it so you can pipe objects! And we'll make the syntax just a little more painful than jamming your hand in a mousetrap."

@ceejbot @melissagreen

Get-Item -Path "C:\test\" -Recurse | Remove-Item

@ceejbot @melissagreen It’s just `rm -f`; recurse is the default behavior, `-f` is short for `-Force` still, and `rm` is the common alias for `Remove-Item`.

You can spell it out `Remove-Item -Force` if you want, but depends on your intended audience if you need to. Most people I know are fine with `rm -f` in a simple PS1 script.

@max @ceejbot @melissagreen A correction:

ri -fo

Although you can write "rm" on windows, "ri" is the canonical alias for Remove-Item, and "rm" is /usr/bin/rm on WSL or other Linux for instance 😉

You have to write -fo instead of just -f because there's two parameters that start with F: Force and Filter.

@melissagreen @ceejbot I truly believe when making powershell Microsoft wanted to make a commandline version of C#
@minekpo1 @ceejbot the syntax gives me OpenVMS DCL vibes, which is its own special layer of repressed trauma.
@minekpo1 @melissagreen @ceejbot you can actually use .NET and such libraries in #PowerShell
Shell of an Idea • DON JONES

This was my last hurrah in tech, the last tech book I wrote—and also a love letter to the technology that made so many years so enjoyable, and the team

DON JONES
@ceejbot Realizing that I threaded a ridiculous series of needles by working in C++ for over 20 years but only on projects that disable exceptions in the build
@dbort Disabling exceptions is the way. As is not choosing C++ if you can avoid it in this the year of our lord 2023.
@ceejbot oy tell me about it. Already planting the seeds of "what if we rewrote our just-now-completed runtime stack in Rust?"
@ceejbot @dbort
..I've worked on codebases that use exceptions as flow control..
@sol_hsa @ceejbot @dbort someone who took this April Fool's day post too seriously: https://tomasp.net/blog/2015/csharp-pattern-matching/
Pattern matching in action using C# 6

The new release of the C# language migth seem as a minor version, but in fact, it contains a hidden gem. In fact, it contains awesome support for pattern matching - but for some reason, this is concealed under the name 'exception filters'.

@dbort @ceejbot I've worked on a system where exceptions weren't thread-safe. That was glorious to debug until we figured out what the issue was. Yes, we had to read through the runtime source code.
@dbort @ceejbot That's a language we call "C+"

@TomF @dbort @ceejbot honestly all the serious c++ work I've ever done or even seen has had disabled exceptions, disabled rtti, and generally not used the standard library. Hell exceptions aren't even properly cross-platform, they flat out don't work on a lot of hardware.

We almost do just need to make a "C+" compiler with everything generally disabled culled out, and some revised docs, would probably help people who get overwhelmed by the feature support nobody uses.

@raptor85 @dbort @ceejbot Same. It's C with the syntactic sugar of C++ but none of the scary runtime costs.
@TomF @dbort @ceejbot Yup! C but with C++'s better scope/syntax/containerization and practically none of the overhead. Makes a considerable difference in the executable sizes too. (I know some people just lazily don't care but when I can still -O3 and end up with an executable 1/3 the size I'll do it every time) maybe it's my embedded + oldschool graphics background talking but I HATE the cruft that's added on to most languages by default.

@ceejbot +1 about Excel and getting stuff done. I feel like Excel puts so much programming power in the hands of everyday folks with its formulas and whatnot, although I have definitely had times when I wished an Excel spreadsheet could have been an application instead.

I also sometimes suspect part of the love for Rust comes from being set free from the pain of C++ and C

@jadonn Excel has an embedded macro language that is happy to compile into a plugin, and then it is an application, or rather Excel becomes the application that does whatever you programmed. So what I'm saying is, be careful what you wish for.

Anyways, that's why I'm going to hell.

@ceejbot

@siderea @ceejbot You are absolutely right that Excel can descend into cursed usage. About 10 years ago I had a weekly responsibility at a job to painstakingly copy and paste entries from one huge Excel spreadsheet to another huge Excel spreadsheet, and that certainly pushed the limits of what Excel and the poor Dell workstations we had could manage.

It was one of those things where you start opening up the Excel spreadsheet and then go do something else for 10 or 15 minutes

@jadonn @ceejbot

With Excel and PowerQuery, you can do some crazy shit

@jadonn @ceejbot R: when you want your excel spreadsheet to be an application instead
@ceejbot assembly: you want to spend too much time "optimizing" code that doesn't run any faster than what a good compiler would output, and in the end your code doesn't work anyway.

@ceejbot

powerpoint: you want to make other people get your shit done for you

@ceejbot COBOL: you are trying to get shit done on a very old bank system they will never, ever replace
@eyrea @ceejbot Can be simplified to “COBOL: you are making bank”
@curtosis @ceejbot It *can* be, for sure! I know people for whom it's just grudge work, something someone does when they draw the short straw.
@ceejbot also excel: nobody knows how to update that spreadsheet the entire company uses to get shit done because the person who set it up is long gone

@ceejbot
"c: you care how long it takes to run but refuse to learn how C++ exceptions work"

EXACTLY, also, I haven't bothered to learn a new programming language since 1989 because Perl doesn't count :)

@ceejbot
Bash: you're in too much of a hurry to get shit done to actually get shit done.
@ceejbot lua: you love everyone and everything and you want your language to love you back

@ceejbot go: google needs you to get this shit done

swift: you need to rewrite your shit every year

objective-c: *checks for a pulse*

@ecn @ceejbot I think Go is more like "Rob Pike thinks you should do boilerplate instead"
@ceejbot Wrong about Perl, I want to get shit done but I want it to be faster than Python and shell (and I don't care how unreadable the code gets) :P
@mima HA! Fair point. (I used to love perl.)

@ceejbot

Ada: you are cooler than anyone else in the 1980s, but you don't get anything done

Eiffel: you are cooler than anyone else in the 1990s, but you don't get anything done

Haskell: you are cooler than anyone else in the 2000s, but you don't get anything done

Coffeescript: you are cooler than anyone else in the 2010s, but you don't get anything done

Lisp: you are cooler than anyone else, but you have to do everything by yourself. That's ok with you

@ceejbot
I'm very much in the 'I don't care how long it takes to run' camp. 😩
@MeiLin Sometime you literally *don't care* but you do care how long it takes to write. In which case Python is awesome.

@ceejbot
Python is just a treat to work with...

The number of libraries for one.

Heck at the moment, I am writing an emulator for a minicomputer I am designing in Python to have something to play around with and modify, before I go into designing the hardware...

@ceejbot C because it’s what the OS is written in. Or Bliss… same reason, not that I’ve used it (or macro-32) in ages.
@ceejbot can we stop the Java hate? It's better suited to writing software of any complexity than anything else on this list.
@ceejbot @ifixcoinops Feeling very called out by some of these.
@ceejbot ruby: you don't get what all the fuss is about. You just keep writing poetry that happens to execute as useful software.
@ceejbot you got me at the first line! 😁
@ceejbot Why would anyone want to use C++ exceptions? I don't get it 😂
@ceejbot prolog: you want to get something done but you don't know what
@ceejbot They're all just encryption systems for assembly code!