Notices where this attachment appears
-
@m0xEE @pyrate @MK2boogaloo @Zerglingman @sysrq The OS was mostly C; it had some stuff in Alef that eventually got ported to C when the nice parts of Alef were turned into a library, but a lot of them became the Limbo programming language, which was more or less the immediate predecessor to Go.
Limbo is one of the interesting bits in Inferno that didn't move to Plan 9: rather than fork()/exec(), you would just load the other program and spawn a function call. Executable files that the shell loads aren't special except that they satisfy the right interface, namely that there has to be a function called `init` that has type `fn(nil: ref Draw->Context, args: list of string)`. As a result, it's trivial to do a library that doubles as an executable: https://www.rosettacode.org/wiki/Executable_library#Limbo . If you look at the code, it looks more or less like Go, with a handful of small exceptions, like libraries being loaded on-demand, native support for linked list and tuple types but no native map type, and some cosmetic differences (using `->` instead of `.`, regular semicolons, and Google wanted Go to be a language for "large systems" and insisted on camelCase and explicit exports).
Since libraries and executables are type-checked by the VM and Limbo's memory-safe, it doesn't need an MMU when running on metal, so stuff like the Nintendo DS port run like normal.
It is a cool language and there are pieces of it that I miss when doing Go, like having tuples is really nice. `x: list of (string, int)` is more convenient than having to do something like `x := make([]some_struct_you_had_to_make_for_a_single_use_data_structure)` in Go.