What does it mean to be 'self-hosting' here? Does it just mean that it's a compiler that can compile itself?
How I wrote a self-hosting C compiler in 40 days
121–128 of 128 posts
Re: How I wrote a self-hosting C compiler in 40 days
#122What does it mean to be 'self-hosting' here? Does it just mean that it's a compiler that can compile itself?
Re: How I wrote a self-hosting C compiler in 40 days
#123Re: How I wrote a self-hosting C compiler in 40 days
#124Earlier quoted context omitted.
And I think the person you responded to is implying his exit from childhood did not in any way slow down his use of advent calendars for chocolate-eating purposes.
Why would I purchase a device specifically designed to rate limit my chocolate consumption? Advent calendars are the Internet data caps of dessert.
Re: How I wrote a self-hosting C compiler in 40 days
#125Earlier quoted context omitted.
I definitely agree with ML and OCaml, but why do you recommend Lisp for compiler work? I love working withs Lisps, but how do you deal with dynamic typing bugs in compiler work? I prefer OCaml/Haskell/ML for its really strong static type checking for compiler work. Just curious though...
ML got ADTs and static type guarantees, but Lisp got macros, which allows to implement things like http://andykeep.com/pubs/np-preprint.pdf - which is significantly less boilerplate than in ML. An ideal language for compilers would have combined both properties, but to make it happen, an expression problem must be solved first. See a relevant discussion here from not long ago: https://news.ycombinator.com/item?id=107…
So that's static typing (Typed Racket) and macros for sure. Possibly ADT's depending on whether you object to claim above. Should cover your list of requirements.
Re: How I wrote a self-hosting C compiler in 40 days
#126Earlier quoted context omitted.
ML got ADTs and static type guarantees, but Lisp got macros, which allows to implement things like http://andykeep.com/pubs/np-preprint.pdf - which is significantly less boilerplate than in ML. An ideal language for compilers would have combined both properties, but to make it happen, an expression problem must be solved first. See a relevant discussion here from not long ago: https://news.ycombinator.com/item?id=107…
A commenter elsewhere said Racket had ADT's with langplai but also with langracket via subtypes of struct type with match macro. Said it was same style of programming. So that's static typing (Typed Racket) and macros for sure. Possibly ADT's depending on whether you object to claim above. Should cover your list of requirements.
Re: How I wrote a self-hosting C compiler in 40 days
#127Earlier quoted context omitted.
A commenter elsewhere said Racket had ADT's with langplai but also with langracket via subtypes of struct type with match macro. Said it was same style of programming. So that's static typing (Typed Racket) and macros for sure. Possibly ADT's depending on whether you object to claim above. Should cover your list of requirements.
The problem here is that a single variant tag does not uniquely define a type, as all such type systems expect.
Re: How I wrote a self-hosting C compiler in 40 days
#128What do you mean, "as a child"?