hnock: A Nock interpreter.

[ language, library, mit, program ] [ Propose Tags ]

A Nock interpreter.

From the shell, simply pipe Nock expressions into the hnock executable:

$ echo '*[[[4 5] [6 14 15]] [0 7]]' | hnock
[14 15]

For playing around in GHCi, import the Nock library and use hnock to parse and evaluate Nock expressions:

*Nock> hnock "*[[[4 5] [6 14 15]] [0 7]]"
[14 15]

To evaluate raw nock Nouns, i.e. to compute nock(a) for some noun a, use the nock function:

*Nock> let expression = hnock "[[[4 5] [6 14 15]] [0 7]]"
*Nock> expression
[[[4 5] [6 [14 15]]] [0 7]]
*Nock> nock expression
[14 15]

[Skip to Readme]
Versions [faq] 0.4.0
Change log CHANGELOG
Dependencies base (>=4.12 && <5), hnock, parsec (>=3.1.13.0 && <3.2), text (>=1.2.3.0 && <1.3) [details]
License MIT
Author Jared Tobin
Maintainer jared@jtobin.io
Category Language
Home page https://github.com/jtobin/hnock
Source repo head: git clone https://github.com/jtobin/hnock
Uploaded by JaredTobin at Tue Oct 1 17:27:56 UTC 2019
Distributions NixOS:0.4.0
Executables hnock
Downloads 55 total (20 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2019-10-01 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for hnock-0.4.0

[back to package description]

hnock

Build Status MIT License

A Nock interpreter.

Install

Use a simple

stack install

to build the hnock binary and get it moved somewhere on your PATH. If you just want to build the binary, you can use stack build.

Usage

From bash, simply pipe Nock expressions into the hnock executable:

$ echo '*[[[4 5] [6 14 15]] [0 7]]' | hnock
[14 15]

For playing around in GHCi, import the Nock library and use hnock to parse and evaluate Nock expressions:

*Nock> hnock "*[[[4 5] [6 14 15]] [0 7]]"
[14 15]

To evaluate raw nock Nouns, i.e. to compute nock(a) for some noun a, use the nock function:

*Nock> let expression = hnock "[[[4 5] [6 14 15]] [0 7]]"
*Nock> expression
[[[4 5] [6 [14 15]]] [0 7]]
*Nock> nock expression
[14 15]

Testing

Use a simple stack test to run the test suite.

See Also