Orchard
A programming system
"Code is data" is such a powerful concept. My tiny, artsy Dungbeetle VM boils this van Neumann style down to it's essentials: You can manually edit the data stored in memory, but you can also let the computer interpret it as instructions. There is no hidden state. No magic. You can see everything.
This immensely powerful feeling – computers doing stuff for you – sometimes gets lost in many modern programming languages as they introduce a hard separation between compile-time and runtime. No, this is not another article about Zig. Even though some Zig code can run during compile-time and runtime, there is a difference: Types only exist during compilation. Certain actions can only happen during runtime. In this article, I want to highlight programming environments, where the difference between compile-time and runtime vanishes completely:
In Lisp, your code is just a data structure. You can create new code during runtime and just evaluate it. Macros just take your code and transform it.
In Smalltalk, everything is available during runtime: You can inspect the byte code of methods and the fields of objects. Heck, the
class is there for you to explore and use.Compiler Browsers download JavaScript code and then run it.
Computers in general also follow that principle: You don't need to restart your computer to install new software. Just download it (during "runtime") and run it.
I want to see more of that in the world: Environments that evolve "from within", where everything is readily available to touch, inspect, and explore. I want programming systems and languages that question the workflow of "write code, compile it, run it".
At the same time, I'm intruiged by some aspects of modern functional programming languages: Immutable values make functions "more mathematical" mappings between inputs and outputs. Algebraic data types with structs and enums naturally map to most domains.
That's why I want to create a new programming environment. I don't want (just) another language, but a self-hosted programming system, where you can create new code on the fly. I'm gonna call it Orchard.