Skip to content
/ spaceman Public

A Whitespace Interpreter written in Haskell

License

Notifications You must be signed in to change notification settings

ft/spaceman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spaceman — A Whitespace Implementation
--------------------------------------

Spaceman is a whitespace interpreter written in Haskell. It uses Megaparsec for
parsing purposes and a simple stack  machine that reflects the operation of the
whitespace language.


Quickstart:

    % cabal configure
    % cabal build
    % cabal run spaceman -- ./examples/hello-world.ws
    Hello World!
    % cabal run spaceman -- ./examples/count.ws
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    % cabal run spaceman -- ./examples/sudoku.ws
    Sudoku Solver - written in Whitespace!

            Instructions:

    Please enter a 9x9 grid of numbers (0-9).
    Do not put spaces between the numbers.
    '0' represents an empty cell:

    530070000
    600195000
    098000060
    800060003
    400803001
    700020006
    060000280
    000419005
    000080079

    Please be patient.
    Easy sudokus typically take a minute or two on my Core 2 Duo.

     534 678 912
     672 195 348
     198 342 567

     859 761 423
     426 853 791
     713 924 856

     961 537 284
     287 419 635
     345 286 179

    Success!

About

A Whitespace Interpreter written in Haskell

Resources

License

Stars

Watchers

Forks

Packages

No packages published