IRC channel logs

2024-03-07.log

back to list of logs

<oriansj>wow, I must say the temptation to do a full AST when creating a new language bootstrap is surprisingly strong.
<AwesomeAdam54321>oriansj: What programming language are you bootstrapping?
<oriansj>AwesomeAdam54321: well I am attempting to do a typed s-expression language with features equal to M2-Planet in M0 assembly.
<oriansj>and then I'll have the fun of redoing mescc-tools and mes.c in that s-expression language. Which will definitely provide another bootstrap path, which some people might prefer over our currently C heavy one.
<oriansj>and I figure it'll be good fun to do another compiler for a different language in assembly.
<oriansj>although it appears doing s-expressions doesn't save much complexity relative to C tokenization.
<oriansj>figure do a proper 2 stack language (arguments and return stacks) and am still pondering if supporting variable return in the registers in worth the trouble.
<oriansj>it isn't that hard to add in the assembly but it is hard to make a consistent syntax for the language itself.
<oriansj>but if one wants to deal with the upwards funarg problem in a new language seems like byting off too much.
<oriansj>but I figure it'll be good and weird with effectively zero builtin types or functions and only a half-dozen keywords
<oriansj>with pattern matching for functions so that one can do (DEFINE foo (LAMBDA :UINT_32 (a :UINT_32) ...) and (DEFINE foo (LAMBDA :UINT_8 (a :UINT_8) ...) and it will just work
<oriansj>well; no one ever said it was easy to create a language and by god; the temptation to tweak forever is hard to escape
<oriansj>thank god emacs is really good at refactoring a bunch of code in arbitrary languages one creates...