Question to help me shape some upcoming threads:
Say I'm bootstrapping from an assembly language to a (relatively) high-level language, without using any software I didn't write myself?
Any tips?
Question to help me shape some upcoming threads:
Say I'm bootstrapping from an assembly language to a (relatively) high-level language, without using any software I didn't write myself?
Any tips?
@djm62 I'll describe how I would!
Yes, that link could be handy!
@alcinnz what do you mean "any software I didn't write myself"? You wrote the compiler and stuff for the high-level language?
Is this relevant? Seems like the right direction but it's software written by everyone
https://guix.gnu.org/en/blog/2023/the-full-source-bootstrap-building-from-source-all-the-way-down/
Here's my current thoughts on bootstrapping (from raw Assembly) a high-level language like Lua:
1. I'd prefer to write declarative data rather than code, though if that data requires parsing or much in the way of interpretation it'd be counter-productive.
2. Implementing syntax-highlighting could help me see what I'm doing.
3. Per @yojimbo 's suggestion, implementing a Reverse-Polish-Notation assembler (resembling Forth or PostScript) would really help!
More tips?
Scheme might be a good alternative to Forth.
One of the nicest features of Scheme (and other LISPs) is the lack of syntax — everything is an S-expression. So parsing is trivial and you can concentrate on other aspects of the language.
A LISPer friend once joked to me that he’d picked up a compiler book thinking he might learn some tricks, but it turned out the whole book was about tokenizing and parsing, which he considered a solved problem. And, of course, there’s Alan Kay’s comment about how one half page of the *Lisp 1.5 Manual* by McCarthy amounted to “the Maxwell’s Equations of programming”.
Google “scheme in one defun” for a simple C implementation. Peter Norvig has a one-page implementation in Python.
@lain_7 Will do!
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.