#esolang #poetry #interpreter #cli #esopo

app ashpaper-bin

CLI for ashpaper, an inpterpreter for Esopo language AshPaper conceived by William Hicks

7 releases

0.2.1 Oct 23, 2019
0.2.0 Oct 22, 2019
0.1.4 Oct 21, 2019

#39 in Emulators

Download history 21/week @ 2019-11-27 7/week @ 2019-12-04 53/week @ 2019-12-11 7/week @ 2019-12-25 14/week @ 2020-01-01 14/week @ 2020-01-08 49/week @ 2020-01-15 1/week @ 2020-01-22 9/week @ 2020-02-12 15/week @ 2020-02-19 14/week @ 2020-02-26 14/week @ 2020-03-04 7/week @ 2020-03-11

89 downloads per month

MIT license

29KB
566 lines

Build Status Crates.io Version Crates.io

ashpaper-bin

CLI for the ashpaper crate, an inpterpreter for Esopo language AshPaper conceived by William Hicks. Now you can run poetry-programs from the command line!

Usage

Take the following "poegram" called 'lovely-poem.eso' (in this repositories poetry directory):

lovely poem

  it is a calculator, like a
      poem, is a poem, and finds
        factori-
          als
  The input is the syllAbles
in the title, count them, as one counts
  (q) what other poem, programs can be writ
  (a) anything a Turing
    machine-machine-machine
    would do
re/cur
    sion works too, in poems, programs, and this
       a lovely.
poem or a calculator or nothing
how lovely can it be?

You can run it with:

ashpaper lovely-poem.eso

And it will print the following to stdout:

24

When RUST_LOG=info is set (i.e., running RUST_LOG=info ashpaper lovely-poem.eso), you can get at program evaluation info. Here's what lovely-poem.eso looks like.

instruction                                         |  r0  |  r1  |  stack
--------------------------------------------------- | ---- | ---- | -------
lovely poem                                         |  4   |  0   | []
                                                    |  4   |  0   | []
  it is a calculator, like a                        |  4   |  4   | []
      poem, is a poem, and finds                    |  4   |  4   | []
        factori-                                    |  4   |  4   | [4]
          als                                       |  4   |  1   | [4]
  The input is the syllAbles                        |  4   |  -1  | [4]
in the title, count them, as one counts             |  3   |  -1  | [4]
  (q) what other poem, programs can be writ         |  3   |  4   | []
  (a) anything a Turing                             |  3   |  12  | []
    machine-machine-machine                         |  3   |  12  | [12]
    would do                                        |  3   |  2   | [12]
  it is a calculator, like a                        |  3   |  5   | [12]
      poem, is a poem, and finds                    |  3   |  12  | []
        factori-                                    |  3   |  12  | [12]
          als                                       |  3   |  1   | [12]
  The input is the syllAbles                        |  3   |  -1  | [12]
in the title, count them, as one counts             |  2   |  -1  | [12]
  (q) what other poem, programs can be writ         |  2   |  12  | []
  (a) anything a Turing                             |  2   |  24  | []
    machine-machine-machine                         |  2   |  24  | [24]
    would do                                        |  2   |  2   | [24]
re/cur                                              |  2   |  2   | [24]
    sion works too, in poems, programs, and this    |  2   |  24  | []
       a lovely.                                    |  2   |  24  | []
poem or a calculator or nothing                     |  10  |  24  | []
how lovely can it be?                               |  10  |  24  | []

Issues

This project is really bare bones atm, if you find something broken, please raise an issue ❤️ ❤️

Dependencies

~4.5MB
~100K SLoC