4 ms·
I think CosmicOS had the same idea [1] to seamlessly introduce special forms without defining the implicit interpreter in advance. [1] https://cosmicos.github.
by lifthrasiir 2y ago
I think CosmicOS had the same idea [1] to seamlessly introduce special forms without defining the implicit interpreter in advance.
[1] https://cosmicos.github.io/message.html#section18 https://cosmicos.github.io/message.html#section18
- johnisgood 2y agoWhat is "" and so forth? It does not even render properly here on HN after having copy pasted it from the website. Custom font or what? I will check later if no one replies.
- ropejumper 2y agohttps://imgur.com/a/5zDRli5 https://imgur.com/a/5zDRli5
- deleted 2y ago[deleted]
- lifthrasiir 2y agoThe CosmicOS message has multiple possible encodings, including base 4 representations shown below (e.g. the message starts with 121001031211132233...). The very first page contains glyphs corresponding their compact graphic representations. I think there was some description about these, but I couldn't find them so I will just recall my understanding here. The base 4 representation uses four symbols 0--3, which are derived from textual tokens: --- 12 (0|1)+ 3 -- Names. A particular name `xxx` is only available after the `intro xxx;` declaration. Note that the name `intro` itself is the first token ever and never explicitly defined. 02 (0|1)+ 3 -- Binary numbers. Note that unary numbers used initially are encoded using a special function "unary" with ordinary binary numbers 0 (0203) and 1 (0213) as bits. 2 without preceding 0 or 1 -- Opening parenthesis. 3 without preceding 0 or 1 -- Closing parenthesis. 023 -- Auto-closing opening parenthesis, denoted `|` in the textual form. `(a | b | c d)` is same as `(a (b (c d)))`. 123 -- Single-item parentheses, denoted `$` in the textual form. `$x` means `(x)` and typically used in variable getters. 2233 -- Marks the end of the current expression. Each expression in the CosmicOS message should evaluate to true. --- Now, keep in mind that every name is effectively a specially marked number. I think each line segment in glyphs corresponds to a particular bit position, and numbers have short overline and underline to distinguish themselves from names.