A lot of the core infrastructure in a computer system - such as memory management - is somewhat overlooked for opportunities to improve things, because a vicious circle of conservatism sets in: we tune memory manages for systems that work like POSIX, and then stick with systems that work like POSIX since the memory management is so well-tuned...
So I set myself the task of designing, from scratch, an approach to memory management that's appropriate to an event-driven system based around a purely functional language with mutation expressed via unique typing.
It's far from complete, but here's a brain dump:
Read more »
There are two main kinds of standards involved in interoperability between computers: formats and protocols. Formats range from "file formats" such as JPEG and PNG for images, HTML and CSS for web pages, PDFs, Word documents, and so on, through to much simpler things such as how an integer is represented. Formats specify how information is represented as strings of 1s and 0s, the basic model of information that computers agree on.
Read more »
There are a number of type systems out there in different programming languages. In fact, there's zillions, but they boil down to a few basic approaches.
Read more »
Ever since I was a kid, I've been interested in exploring Uniqueness typing as a paradigm for mutation in a programming language.
The principle is simple: mutating operations - assignment, I/O, etc - are a pain. Both for the implementers of the language, who are limited in what optimisations can be performed when the values of things can shift around beneath them and when any given part of the program may have side effects so order of execution must be preserved, and for the programmers in the language, who have to deal with bugs and complex behaviour that just don't happen when everything is referentially transparent.
Read more »
One way of making a compiler portable to different host platforms is to make it compile to a processor-independent (or mainly processor independent) low-level language.
GCC, perhaps the most widespread compiler of them all, uses this approach: it produces mainly processor-independent "RTL" (register transfer language), which is close to assembly language in general, but not aligned to any particular processor's implementation thereof. I say mainly processor-independent since earlier stages in the compiler do access target details and produce different RTL for different targets.
Read more »