4 ms·
A bit afraid of throwing gasoline on fire, but... > What's the recommended treating regimen? Implement! The only way out is through.
by MonkeyClub 4y ago
A bit afraid of throwing gasoline on fire, but...
> What's the recommended treating regimen?
Implement!
The only way out is through.
- sph 4y agoYeah, that's my plan for the weekend. I'm currently working on a minimal Lisp implementation written in Rust, step 2 is to compile the thing into a free-standing UEFI binary, and give it the ability to execute machine code. The final goal is something akin to DOS, but the prompt is a Lisp that has access to the entire machine at full privileges and complete control over the hardware. I'm also exploring how to make it possible to rewrite the most core functions from the Lisp environment, so I could, for example, replace a naive "eval" function with native code after boot. What can you build with the most minimal "operating system" paired the most meta-programmable environment? My dream is to add a simple display, keyboard and have this run on a RISC-V SoC, that simply boots with the prompt: "> " (I hate you for making me write this down and adding more fuel to the fire.)
- rjsw 4y agoWhy not use an existing Lisp implementation that has a good compiler? Or just run Mezzano [1]. [1] https://github.com/froggey/Mezzano https://github.com/froggey/Mezzano
- sph 4y agoBecause I want to follow my vision. There is space for more than one thing in the world. Also, Common Lisp is nice but it's anything but minimal. One of the questions I want to answer is what is the minimum amount of constructs you need to have complete control over your hardware, while able to rewrite the entire kernel at run time. I bet it's not that many. That said, Mezzano is cool and I should play with it more.
- qubex 4y ago“Minimum number of constructs you need to have complete control over your hardware” is a bit of a slippery slope when it’s known that one-instruction computers are Turing Complete (“subtract and branch if negative” being one I recall). There’s plenty of mind-bending stuff on esolangs.org
- sph 4y agoFair enough, but Lisp needs a little more than subleq & co. to do something useful :)
- gjadi 4y agoIf you're looking for a minimalist lisp, checkout Shen: https://www.shenlanguage.org/ https://www.shenlanguage.org/
- sph 4y agoAt first glance this seems very minimalist in a mathematical/academic sense. For them minimalism is Peano numbers, for a computer guy it's cons and recursion. But it's worth spending more time with it, so thanks.
- mschaef 4y ago> Because I want to follow my vision. There is space for more than one thing in the world. That's nice... but I think you're underestimating the amount of work to produce something you actually want to use: > Yeah, that's my plan for the weekend. I'm currently working on a minimal Lisp implementation written in Rust, > One of the questions I want to answer is what is the minimum amount of constructs you need to have complete control over your hardware, while able to rewrite the entire kernel at run time. I bet it's not that many. You should take a look at both PreScheme (part of Scheme48) and Squeak. There's a lot of prior art you can look at without compromising your vision. I'd also suggest you commit to a (modest) end state you want to achieve. I'm reminded that Linus Torvald's original motivation for Linux was to understand the multitasking hardware in the 80386. His first working development "kernel" ran two fixed tasks that printed something like A's and B's. So you may be well served by starting with something minimal, but functional and building out as you have time. This also has the advantage that if you run out of steam for the work, you'll still be able to explicitly state you achieved an interesting goal. (As opposed to "Yeah, I started out building a bare metal Lisp, but got bogged down in the interereter and...")
- zasdffaa 4y agoContact the people who designed and used Lisp machines and get their very, very expert take. Many are still alive.
- worthless-trash 4y agoAnd please document your findings! Would love to read.
- shaftoe 4y agoSeriously. A well documented history of the lisp machines would be at the top of my Christmas list.