I remember someone asking on here what a good permacomputing language would be to be to learn—to make sure their software would still run in, say, half a century’s time.
A lot of people recommended C. I deliberately kept out of the thread because I didn’t want to disturb anyone or start an argument.
I would recommend Common Lisp. Lisp was discovered in the 50s, and many Lisp programs written from decades ago still run with zero, or minor modifications today.
This is my humble suggestion. There are many benefits to using Lisp as a permacomputing language, such as strong typing, remarkable simplicity of its grammar, and, by its design, exhibits much less undefined behaviour.
IMO, it's less the language itself than the family of languages. The skill you get from *really* learning (e.g.) Lisp is being able to turn your idea into maximally effective code. Syntax and function names are all in the manual but knowing The Lisp Way of doing X will work regardless.
My advice would be to seek mastery of:
1. C (plus some basic assembly language)
2. One of the popular Lisps (Common Lisp, Racket, Clojure, etc.)
3. One of the strongly-typed functional languages (Haskell, OCaml, Scala, etc.)
4. One of the dynamic purely-OOP languages (Smalltalk, Ruby).
5. Unix scripting.
And also get some exposure to Forth, Prolog and one of the boring industry languages (Java, C#, Go, etc.).
Do that and you're understand pretty much any language you'll come across.
For example, Scala is a very interesting language, and I would have considered it my favorite at one point. Less than half a decade after I picked it up however, all of the code that I have written in Scala either needs to be compiled using an old compiler, or I need to put in a lot of effort to porting.
I agree with this advice for staying relavent as a career software engineer, but I think the languages that will continue to run as-is is a much smaller list.
Ah, I missed that part.
So yeah, definitely C. One of the major advantages of that language is that (up until the recent standard, anyway) it's pretty easy to implement and also pretty easy to get decent performance out of a mediocre C compiler.
Forth may also be an option, just because it's so easy to implement the core language and because it'll run on really resource-constrained systems.
@suetanvil @robby @vidak The problem with C is that it's easy to write subtly broken code. Whenever there is an architecture specific bug in some package on Guix, it seems to me that it's almost always because someone was doing something weird with C.
So yes, it will compile on lots of platforms, but that doesn't guarantee much about it actually working.
Server run by the main developers of the project It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!