#DecemberAdventure
h3rald h3rald@h3rald.com
Thu, 12 Dec 2024 15:18:24 +0100
1 files changed,
5 insertions(+),
0 deletions(-)
M
contents/articles/december-adventure-2024.md
→
contents/articles/december-adventure-2024.md
@@ -280,3 +280,8 @@ The [spec](https://hex.2c.fyi/spec) is up! No, not quite: I just managed to add an outline and the signature of every native symbol. I also updated the [web.hex](https://github.com/h3rald/hex/blob/master/scripts/web.hex) script (the mini static site generator for the hex site) to handle placeholders like `{{sym-puts}}` and substitute them with links to the corresponding [definition](https://hex.2c.fyi/spec#puts-symbol) in the spec.
I also added more tests and fixed a problem with parsing escaped characters like backslashes and quotes in strings. Hopefully... +### Day #12 + +Today I decided to remove the `slice` and `insert` symbols (which are fairly complex and can be re-implemented with other symbols, if needed) and substituted them with `ord` and `chr`, to return the ASCII code or the character represented by an ASCII code respectively. I believe this functionality is totally missing from the language, and could potentially be used to implement advanced string matching (only of ASCII characters though, I'd like to keep things _very_ simple!). + +I also started writing the [spec](https://hex.2c.fyi/spec)! All the 64 native symbols are now documented (could do with some examples but it's better than nothing), and I also completed the syntax section.