Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A bit afraid of throwing gasoline on fire, but...

> What's the recommended treating regimen?

Implement!

The only way out is through.



Yeah, 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.)


Why not use an existing Lisp implementation that has a good compiler?

Or just run Mezzano [1].

[1] https://github.com/froggey/Mezzano


Because 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.


> 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...")


I see your point. But also, reinventing the wheel is just fun. Building things out yourself, you eventually realize why certain design choices were made with the leading implementations as a consequence. I'm convinced the best way to understand something is to try and build one yourself. Even if it sucks.


> reinventing the wheel is just fun.

Agreed: https://github.com/mschaef/vcsh

At least for hobby development, I find the fun/utility trade off to be a point of ongoing thought.


“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


Fair enough, but Lisp needs a little more than subleq & co. to do something useful :)


Turing-Church Thesis disagrees.


You're right of course, but picking the specific point on the slippery slope you mentioned earlier is why this is an interesting engineering problem (and not a math/logic problem).


If you're looking for a minimalist lisp, checkout Shen: https://www.shenlanguage.org/


At 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.


Contact the people who designed and used Lisp machines and get their very, very expert take. Many are still alive.


And please document your findings! Would love to read.


Seriously. A well documented history of the lisp machines would be at the top of my Christmas list.




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

Search: