←back to thread

Compiling with Continuations

(swatson555.github.io)
68 points swatson741 | 7 comments | | HN request time: 0.924s | source | bottom
1. matheusmoreira ◴[] No.45311617[source]
> Doing a search for source code on Github reveals basically nothing. No blog posts. No source code repositories. Nothing.

If nobody ever implemented it in C, it's questionable whether it ever happened at all.

replies(4): >>45311836 #>>45312008 #>>45312216 #>>45313028 #
2. gsf_emergency_2 ◴[] No.45311836[source]
Have been many, for the book the post is reviewing, eg.

https://github.com/abeln/cc

Blogger just didn't look hard enough (or doesn't know that search on GitHub is crippled, for reasons)

3. enum ◴[] No.45312008[source]
I learned a lot from implementing this book. Compiler was in OCaml. Runtime was in C (used as a glorified assembly).
replies(1): >>45312710 #
4. pjmlp ◴[] No.45312216[source]
Github is not the universe.
5. matheusmoreira ◴[] No.45312710[source]
> Compiler was in OCaml

Not exactly a common language...

I don't have a math or computer science background so the more academic publications are almost always quite unreadable to me. I learn a lot by exploring the source code of existing virtual machines instead, and most are written in systems languages.

Sometimes much smarter people than I randomly decide to write articles that democratize access to very complex areas of programming language development. Examples:

https://journal.stuffwithstuff.com/2013/12/08/babys-first-ga...

https://www.wingolog.org/archives/2010/02/26/guile-and-delim...

replies(1): >>45313073 #
6. rurban ◴[] No.45313028[source]
This is a book about ML, not C.

For C you can look at the old Perl6 VM, Parrot which compiled to CPS until v2.7, where they destroyed CPS and went conventional and slow.

7. StopDisinfo910 ◴[] No.45313073{3}[source]
It’s an extremely common language to write compilers in. The original Rust compiler was written in it for exemple.