|
|
Log in / Subscribe / Register

DeVault: Announcing the Hare programming language

DeVault: Announcing the Hare programming language

Posted May 2, 2022 19:14 UTC (Mon) by Wol (subscriber, #4433)
In reply to: DeVault: Announcing the Hare programming language by pabs
Parent article: DeVault: Announcing the Hare programming language

> The Bootstrappable Builds folks are working on a bootstrap path from ~512 bytes of machine code plus tons of source code all the way up to a full distro.

Write your C compiler in Lisp or Forth. Forth certainly, and Lisp I think, both have a core that can be expressed in precious little assembly, and then just build everything from source on top.

Cheers,
Wol


to post comments

DeVault: Announcing the Hare programming language

Posted May 3, 2022 2:28 UTC (Tue) by pabs (subscriber, #43278) [Link] (1 responses)

I asked about this on their IRC channel and got this response from oriansj:

Well we did bootstrap a FORTH from hex: https://github.com/oriansj/stage0/blob/master/stage2/forth.s

and we did bootstrap a garbage collecting Lisp from hex: https://github.com/oriansj/stage0/blob/master/stage2/lisp.s

but if you notice: https://github.com/oriansj/stage0/blob/master/stage2/cc_x...

writing a C compiler in assembly that supports structs, unions, arrays, inline assembly and a bunch more was done in less than 24 hours by an inexperienced C programmer. Who then after started doing bootstrapping speed runs to demonstrate how trivial of a problem it is to implement that level of functionality in a C compiler.

In the decades for which Lisp and FORTH existed, why didn't they solve such a trivial problem?

Or better yet, now that you can see how it is done. Could anyone actually produce a C compiler with the same level of functionality in Lisp or FORTH in the same amount of time (or less?).

It is easy to talk a big game and words are cheap, we have the entire cc_* family of C compilers written in assembly for multiple architectures and in even cross-platform arrangements. If your language was any good at bootstrapping you'd be able to beat that. Then show your language written in less lines of assembly than cc_x86 to prove the point.

Please prove me wrong with working code.

Assembly and C have working code good enough to bootstrap GCC+Guile+Linux for more than a year now. https://github.com/fosslinux/live-bootstrap https://github.com/oriansj/stage0-posix

It is time for Lisp and FORTH to either deliver or learn to stop talking about something they never were good at in the first place and learn to admit Assembly and C won not because "worse is better" but because objectively they are better languages for bootstrapping new and better tools.

DeVault: Announcing the Hare programming language

Posted May 7, 2022 20:35 UTC (Sat) by anton (subscriber, #25547) [Link]

In the decades for which Lisp and FORTH existed, why didn't they solve such a trivial problem?
What makes you think they didn't? There is CC64, although you may be unhappy with the language features.

The other answer is: What itch would a Lisp or Forth (rather than assembler) programmer scratch by writing a C compiler?


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds