This thread on bootstrapping the scala compiler is quite interesting: https://contributors.scala-lang.org/t/compiling-scala-and-sbt-for-debian-distro/3620 … I think this points to a missing value in compiler writing: bootstrap-ability from pure source.
-
Show this thread
-
Maybe start with a hand-written assembler, then assembly implementation of C compiler, then C++ compiler written in C, ...
1 reply 0 retweets 1 likeShow this thread -
I wonder if it is an anti-pattern to implement a compiler for a language in itself (unless there is another even very slow) compiler for said language.
7 replies 1 retweet 3 likesShow this thread -
Replying to @posco
There are good reasons to do it though, especially in open source. If you are fanatical enough of language X to want to contribute to the compiler, what’s the one language I know you’ll be happy to write?
2 replies 0 retweets 1 like -
Replying to @jamesiry
yeah, but maybe in those cases you have a compiler that can at least evaluate the self-hosting compiler. It doesn't need to rule out bad programs or be fast: it only needs to produce the same outputs for any inputs that the self-hosted compiler would need to.
2 replies 0 retweets 0 likes -
i.e. you don't need to typecheck, for instance, since we are only going to run this on code that also passes the self-hosted one. We don't need GC (maybe we could reference count and that be fine to compile the compiler...)
1 reply 0 retweets 1 like -
Replying to @posco
Haven’t given it deep thought but it seems like there’s a way to solve this by immutably recording cryptographic hashes of both a compiler and the compiler that produced it (and so on in a chain to whatever depth) and having 3rd parties rebuild and verify that the it all matches
2 replies 0 retweets 0 likes -
Which I think means I’m ready to create a startup that “Bootstraps Compilers on the Blockchain.” Please send me phat VC moneys plz
1 reply 0 retweets 7 likes
me reading previous tweet: ah crap, a blockchain me reading this tweet: *chefs kiss*
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.