We use cookies and other tracking technologies to improve your browsing experience on our site, analyze site traffic, and understand where our audience is coming from. To find out more, please read our privacy policy.

By choosing 'I Accept', you consent to our use of cookies and other tracking technologies.

We use cookies and other tracking technologies to improve your browsing experience on our site, analyze site traffic, and understand where our audience is coming from. To find out more, please read our privacy policy.

By choosing 'I Accept', you consent to our use of cookies and other tracking technologies. Less

We use cookies and other tracking technologies... More

Login or register
to publish this job!

Login or register
to save this job!

Login or register
to save interesting jobs!

Login or register
to get access to all your job applications!

Login or register to start contributing with an article!

Login or register
to see more jobs from this company!

Login or register
to boost this post!

Show some love to the author of this blog by giving their post some rocket fuel 🚀.

Login or register to search for your ideal job!

Login or register to start working on this issue!

Login or register
to save articles!

Login to see the application

Engineers who find a new job through Blockchain Works average a 15% increase in salary 🚀

You will be redirected back to this page right after signin

Sheepda integration

Issue Open
Pull requests: 0
Contributors: 0
Level: Intermediate
  • Clojure
  • $150
Issue Open
Pull requests: 0
Contributors: 0
Level: Intermediate
  • Clojure
  • $150

On GitHub

Klipse is a Javacript plugin for embedding interactive code snippets in tech blogs. A simple client-side code evaluator pluggable on any web page: clojure, ruby, javascript, python, scheme, es2017, jsx, brainfuck, c++, reagent, lua, ocaml, reasonml, prolog, common lisp
More info >

Issue posted by: 
jtolio's avatar

JT Olio

Description

Sheepda is a lambda calculus interpreter written in Go. Because it's in Go, GopherJS can compile it to Javascript.

Try this in your HTML somewhere:

<script src="https://jtolds.github.io/sheepda/sheepdajs.js"></script>
<script>
  var output_type = "result";  // can also be "output" or "parse"
  var code = "(\\x.x \\y.y)";
  var result = sheepda.eval(code, output_type);  // returns [output, error]
  if (result[1] != "") {
    console.log(result[1]);
  } else {
    console.log(result[0]);
  }
</script>

If you want to rebuild https://jtolds.github.io/sheepda/sheepdajs.js from source, install Go and GopherJS and run

go get github.com/jtolds/sheepda/bin/sheepdajs
gopherjs build github.com/jtolds/sheepda/bin/sheepdajs

Lambda calculus is super basic - so much so that it's not useful without a ton of definitions. You might be interested in including some prelude code like https://github.com/jtolds/sheepda/blob/master/interview-probs/prelude.shp that you prepend to any code the user provides. https://jtolds.github.io/sheepda/ gives the user a choice via a checkbox.

    Use Open Source Issues to hire or get hired

    On GitHub

    Klipse is a Javacript plugin for embedding interactive code snippets in tech blogs. A simple client-side code evaluator pluggable on any web page: clojure, ruby, javascript, python, scheme, es2017, jsx, brainfuck, c++, reagent, lua, ocaml, reasonml, prolog, common lisp
    More info >

    Issue posted by: 
    jtolio's avatar

    JT Olio

    Use Open Source Issues to hire or get hired

    Sheepda integration
    View on GitHub