r/Compilers • • Sep 28 '26

Henceforth - SSA compiler for an imperative stack-based language

https://riogu.github.io/posts/henceforth-v1/

After working on it for around 1 year, we have released a v1.0 for our stack-based language compiler. Looking forward to having people try it. I wrote an article showcasing the project for those interested, you can also find it on github as well.

9 Upvotes

8 comments sorted by

3

u/vanderZwan Sep 29 '26

Is the "Henceforth" name an intentional pun on "Chicken Scheme", or is that just a happy coincidence? ("Hen's Forth", get it?)

1

u/riogu7t Sep 29 '26

It's just a happy coincidence. It was mainly a pun on Forth as "Forth but a continuation", therefore Henceforth.

2

u/vanderZwan Sep 30 '26 edited Sep 30 '26

Scheme

Forth but a continuation

Ok now you're just messing with me :p

1

u/riogu7t Oct 07 '26

I can't confirm nor deny any puns!

1

u/vanderZwan Sep 30 '26

You should claim it anyway!

This is a really nice looking language, enjoyed reading the article and docs. Curious how well it holds up as an "introduction" language to catlangs for the imperative crowd though. I'm already really into them so I can't judge that. Did you test the syntax on any unsuspecting friends? ;)

1

u/riogu7t Oct 07 '26

> Did you test the syntax on any unsuspecting friends? ;)
I did, I found this way to be the most intuitive. in the current language we could even drop all the @ usages and it would be fine, but it makes people realize that the stack is its own thing and so, we felt this current syntax has been quite approachable.

2

u/kostya27 Sep 28 '26

Your ssa looks interesting, but what the reason in Henceforth stack syntax? it is hard for human. may be it's easier for AI to work with?

2

u/vanderZwan Sep 29 '26

but what the reason in Henceforth stack syntax? it is hard for human.

Not OP, so just asking out of curiosity: you need to be more precise than this because "the syntax is hard" doesn't communicate what you consider hard about it. Are you familiar with Forth and other concatenative languages? If not, do you mean that the postfix syntax is difficult to follow? Or do you mean that the mixture of postfix and imperial language constructs and @( ... ) syntax is confusing? Because that's quite subjective, I had an easy time reading this.