42 lines
1.6 KiB
Plaintext
42 lines
1.6 KiB
Plaintext
// NEX 4
|
|
|
|
/*
|
|
Oh how wonderful this is. Lo, I have returned, after nearly 2 years to my old editor, IntelliJ.
|
|
Times have changed, and Neovim has taught me many things, namely how to torture myself!
|
|
But I return bearing fruit, a new language! The NEW Expression LANGUAGE (for Lua Interpreters); nelli!
|
|
Come to the bright side, where the hills are lush, the grass is green, and your code reads like english.
|
|
|
|
I wish to ask you again, me, what do you think we should do? Things are awfully clear now.
|
|
More excitingly, it seems that every dilemma and conundrum we face concerning a clean implementation points back.
|
|
All the way back at the same thing: "keep it simple stupid!".
|
|
Everything is a 'branch' - or better said as a 'nexus' - now, every last bit. It's all wonderful really.
|
|
I believe that there are two worlds of thought in our heads. One for inference, and one for existence.
|
|
By virtue of that, we need to similar 'languages' in nelli to describe information for both.
|
|
These worlds will, of course, be merely connected by the conditions of equality between their (static) branches.
|
|
*/
|
|
|
|
here 'nex language' is [do {
|
|
here 'language' is [create new language]
|
|
|
|
return 'language'
|
|
}]
|
|
|
|
here (nex (expressions)) means [
|
|
do (expressions) in 'nex language'
|
|
]
|
|
|
|
(interpret 'input') means {
|
|
here 'previous character' is <nothing>
|
|
iterate over [match all "." in 'input'] as 'this character' {
|
|
if ['previous character' is something] {
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
loop (until 'termination') {
|
|
choose from [read console] as 'input' {
|
|
('input' matches "end") does { now: termination };
|
|
everything else does { interpret 'input' };
|
|
}
|
|
} |