|
|
|
|
|
by Joker_vD
1743 days ago
|
|
> EO is based on 𝜑-calculus (if you want to see its description, join this Telegram chat: @polystat_org). Because putting this description into a doc/MATHS.md file inside the repo itself is too easy. Also, a tip for anyone who decides to put out there a programming language with highly exotic operational semantics: please don't forget to put a quick overview of that semantics in the "Tutorial" section. I suspect most people would be puzzled why output is performed by "making a copy of the abstract object stdout with a single argument "Hello world!". |
|
According to it, "𝜑-calculus" is something they made up for the eolang and not a standard term.
Here is my take on that calculus based on reading through section 3 in the paper. Note the paper is pretty weird and likes to make its own notation, so it is possible I got some things wrong:
It is starts with a pretty standard immutable language: "object" is a set of (name, value) pairs; "value" is either object or "data" (like a string, bool etc...); everything is immutable but you can make a copy an object with some attributes changed. There are no concept of "types" -- instead, you define objects with some fields set to NULL (spelled ∅ in the paper). There are also a bunch of term defined, like "abstraction", "application", etc.. -- but they all mean "make a copy of an object with some fields changed".
The "twist" is that the language has no functions per se, instead it defines AST-like structure: there is a syntactic sugar that handles things that look like function applications. So when you see:
This means "find an object called 'stdout'"; it must have exactly one attribute that was set to NULL ; and make a copy of the "stdout" with that attribute set to value "Hello world".The "stdout" is what's called "atom", a class which is defined "outside of φ-calculus formal scope". All the actual work is defined via those atoms, which are out of scope. Unfortunately, this means that φ-calculus itself does not define much, and is basically a fancy way to write AST.