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.

@vidak I think realistically both Lisp and C will be around for a very long time. That's why I'm trying to improve my skills with both :)

@robby @vidak

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.

@robby @vidak

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.

@suetanvil @vidak I think the thought experiment is less about staying relavent as a programmer, and more about making useful tools that will last a long time.

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.

@robby @vidak

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.

@csepp @suetanvil @robby @vidak C is a headache, because you can quickly stumble into areas where lots of dragons live, without you getting any warning of it before it's too late. I like the suggestion of Forth. Code in Forth often ends up having some stuff for a given system, but it tends to be wired so you can actually fix and port to the next VM without sacrificing a goat or something. Forth is actively hostile to piling on complexity, and _that's_ the key for long term maintenance.


@Steinar @csepp @suetanvil @robby @vidak
And Rust is C but with a fence around every dragon's den... And people complain "why are there so many damned fences in Rust?!" ...

· · Web · 0 · 0 · 1
Sign in to participate in the conversation

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!