IRC channel logs

2019-11-12.log

back to list of logs

<mercury^>Hi. I recently learned of MES, and I am now evaluating the use of scheme instead of C++ for the bootstrap stage of a compiler for a new language. I have two main concerns: 1) the scheme specifications are not as detailed as the C++ standard, and implementations are under less scrutiny. I fear that in practical terms that could make scheme a less reliable starting point. 2) What kind of performance degradation can I expect with
<mercury^>MES and guile respectively?
<janneke>mercury^: welcome! those are valid concerns.
<janneke>mercury^: currently, the mes bootstrap has only one practical target: a lightly patched tcc/tinycc compiler
<janneke>tinycc takes us up via gcc-2.95 to gcc-4
<janneke>mercury^: so while i would love to say one day: yes, use mes to bootstrap your compiler, it's not very practical at the moment. if you are willing to contribute and do some work: *lovely*
<mercury^>Hmm, that would depend on how much work is needed. My main goal in this project is to get the new language up and running. Since the language itself aims for high standards of correctness, I wanted to keep the bootstrapping of the compiler as "clearly correct" and verifiable as possible. (Until I learned of MES I thought that I had to trust a C++ compiler anyway.)
<janneke>compiling tcc with tcc takes ~30", with guile+mescc takes 2'30, with mes+mescc ~8'
<janneke>ah, that's an interesting problem!
<mercury^>The hope is that with an approach like MES takes, one could actually verify the "trust-base" of the compiler.
<mercury^>Whereas with C++ it would rather be a stochastic argument of correctness.
<mercury^>(Using what is called diverse double compilation and the like.)
<mercury^>I suppose that if MES is not ready for such a task yet, I could implement the bootstrap stage in C++ now, and maybe later replicate it in scheme.
<mercury^>janneke: do you know how long it takes to compile tcc with gcc or clang?
<xentrac>I think the Scheme specifications are considerably more watertight than the C++ standard, largely by excluding a lot of considerations C++ tries to nail down
<janneke>mercury^: gcc is a bit slower than tcc
<janneke>mercury^: yes, while bootstrapping i think it's a good idea to choose what you are comfortable with; solve one problem at a time
<mercury^>Alright, thanks for the information. And thank you very much for the work you are doing, which I think is most valuable!
<janneke>yw!
<janneke>...for the archives :)