Hacker News new | past | comments | ask | show | jobs | submit login

I'm surprised they wrote a minimal C compiler in assembly rather than any LISP dialects, then make a C compiler in LISP



> I'm surprised they wrote a minimal C compiler in assembly rather than any LISP dialects, then make a C compiler in LISP

I recommend you check out the author's GitHub page. It includes Forth and Lisp projects, explains why C was a success while those projects failed, and challenges any Forth and Lisp fan to actually substantiate their baseless claims with actual work instead of pushing beliefs that don't have any bearing on reality.


The link https://github.com/oriansj/talk-notes/blob/master/DECISIONS....

I think that the takeaway is familiarity trumps technical 'superiority'. That said I don't know why having a working GC for Lisp is that important because typically you'd use Lisp to compile your C-compiler so memory efficiency doesn't really matter..


> I think that the takeaway is familiarity trumps technical 'superiority'.

No, that's not what's stated in the wiki.

The section on Forth points out the lack of useful programs actually written in Forth (a nudge to how no one bothers with the language as alternatives are always found to be preferable), and the lack of developers available to help with the work.

The section on Lisp states quite clearly that "LISP is not an easy language to implement in LISP, C and definitely not an easy task to implement in assembly".


> LISP is not an easy language to implement in LISP, C and definitely not an easy task to implement in assembly

I can't speak to the ease of implementing Lisp in assembly, but I found it easy to do in C. It's trivial to implement Lisp in Lisp if you're willing to let the hosting Lisp do the heavy lifting. The person who I'm quoting isn't a very clear writer though, and his usage of "LISP" suggests he's not exactly up to date on the state of Lisp, so perhaps I'm missing some unstated context that makes his statement sensible.

While I do find the "put up or shut up" message entertaining, it's a category error to confuse what has been done with what can be done. Still, I would consider it a win if some Lisper rises to the challenge.

Since the C language and modern CPUs basically co-evolved, it's not surprising that they're a good fit for each other. The story might be different on a Symbolics machine.


> While I do find the "put up or shut up" message entertaining, it's a category error to confuse what has been done with what can be done. Still, I would consider it a win if some Lisper rises to the challenge.

The whole point is that there are an awful lot of talkers talking a big game but no none of them ever manages to actually show something working.

The challenge was presented.


I read it and I gotta say it sounds ignorant to me: lots of people have bootstrapped systems using Forth. It's not as common these days but it still happens.

And I think the wiki page predates sectorlisp, which project answers (in my opinion) the challenge, no?

( https://github.com/jart/sectorlisp )


And just after that "Never ending garbage collection bugs plague every assembly implementation of LISP."

So I was reacting to that, as a Lisp which will be used once to compile a Lisp based C-compiler which will used once be used to compile a C-based C-compiler, I'm not sure that a GC is needed, just never free the memory.


Are claims of easy bootstrapping in Forth really baseless, though? ASM makes sense for C subset, but if one wanted to bootstrap a more complete language directly from scratch, things would probably be different.


Forth is simple to bootstrap, but maybe not so easy to learn or reason about, because it isn't really taught in any schools or popular online materials. There are tons of resources for thinking about and writing compilers for C-like languages, and there's a decent chance that someone with a CS degree has done so doing their coursework.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: