Coder Social home page Coder Social logo

wronglisp's Introduction

A really stupid implementation of the SKI calculus, mostly designed to troll Brian McKenna. Matching braces are whitespace. Mismatched braces are significant. The leading brace in a mismatched brace indicates the syntactic position of the combinator, while the trailing mismatched brace indicates the combinator type and the associativity. For example, the famed SII(SII) combinator expression is represented as the following:

[(}[}{[}(}))

For a less hideous example, consider SKSK:

[(]{){])

We can "desugar" this a bit by breaking things up with whitespace:

[ (] {) {] )

The trailing ) indicates that the leading mismatch (the [) is representing an S combinator, and the associativity indicates that all three arguments are satisifed. The first argument is an unapplied K combinator, as indicated by the trailing ]. The second argument is an unapplied S combinator, though you will note that the leading mismatched brace is a { this time rather than a [, just to keep things confusing. The second mismatch with a trailing ] is of course another unapplied K combinator.

Anyway, this whole language is utterly hideous, but the implementation was fun and it made Brian squirm, so it was totally worth it. The cake comes together in the WrongLisp object, which contains a parseEval function.

You will need to publish-local a master build of gll-combinators in order to compile and run this project.

wronglisp's People

Contributors

djspiewak avatar

Stargazers

Dmitry Malikov avatar Daniel Ribeiro avatar Rick Elrod avatar Ceri Storey avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.