Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flop - An adapted Nock machine #9

Open
void4 opened this issue Mar 11, 2017 · 0 comments
Open

Flop - An adapted Nock machine #9

void4 opened this issue Mar 11, 2017 · 0 comments

Comments

@void4
Copy link
Owner

void4 commented Mar 11, 2017

Looking at the Nock spec there might be some interesting changes to be made:

  • tree addressing (Nock uses infix numbering)
  • infix [a [0 b]] to prefix [0 [a b]] operators

Is it one of these Ax machines? Nope.

The Nock combinator interpreter is interesting because it's essentially a form of Lisp, where the s-expressions are more or less explicit binary trees. It has no types, its atoms are unsigned integers which can be concatenated to pairs. These are called nouns.

Nock does not support floating point math or other advanced operations, in fact, anything more complex than integer addition typically introduces (or may introduce) sources of nondeterminism, which this language explicitly avoids.

Building an operating system on top of this is ambitious, but at least it's not Zot. That would be crazy. Or would it?

notsure

On the topic of esolangs, have a look at:
https://esolangs.org/wiki/BitBitJump
https://esolangs.org/wiki////


Nock has

  • only acyclic code/data structure (nice for inner (DAG modification) and outer (VM jets) optimisation)
  • inner determinism (evaluation results are fully defined)
  • no pre-runtime determinism:

Given only the operators - or even the entire computation graph - it is not possible to estimate the runtime, as atoms may become arbitrarily large. This makes metering more difficult, as results and therefore atom sizes are only available after evaluation. This is true for any other virtual machine as well, due to turing completeness, however, in these other architectures, operations only take constant time.

Recursion: operation # estimation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant