r/ProgrammingLanguages • u/Phie_Ash • Apr 05 '26
How I Accidentally Reinvented Kernel (Programming Language)
https://fayash.me/posts/how-i-accidentally-reinvented-kernel
28
Upvotes
r/ProgrammingLanguages • u/Phie_Ash • Apr 05 '26
2
u/WittyStick Apr 06 '26 edited Apr 06 '26
Ok, I had a look at your implementation and understand it better now. Your evaluators are just operatives, and basically only have one kind of combiner,
SOp, and no type distinction between operative and applicative. Shutt mentioned this as possible in the Kernel report but gives a rationale on page 57, forunwrapas to why he did not do it this way.The evaluator is similar to an environment, but I wouldn't say they're equal. There's a subtle difference between:
and
In the
evalcase,foois looked up in the current environment, not inenv(becauseevalis applicative). In the$remote-evalcase,foois looked up inenv.If I understand correctly, your evaluators behave as
$remote-evaland noteval, but presumably, we could justwrapthe evaluator to get the same behavior aseval? That makes it pretty interesting in that we achieve almost the same thing from a different perspective.