Hacker News new | ask | show | jobs
by desireco42 1 day ago
So I poked around... this is really interesting. So you take language in text and make IR, but also could be made IR directly. That is very interesting.

Potentially I could make a version without curly braces or some weird syntax and it could be compiled in IR and still be same language :).

Kind of like MS and VB and C# haha.

I like what you did so far, I will keep an eye, maybe help if I can.

1 comments

I have a few weird syntax I've worked on in the past so this is definitely possible. Currently only the textual representation and structural editor are in the repo. The most different I have done is a layout where the AST was presented like a file tree.

apply ├── int_negate └── 5

What if you just put the file tree in the AST... and hashed it all?

https://gist.github.com/conartist6/7dd40697140965ee343de93b9...

I think you created a potential platform for experiments with different language syntax ideas. It is rarely that people want to change how integers are represented and such, mostly it is syntax. So this lets me and others try things out.