Git Product home page Git Product logo

july-lisp's Introduction

July

What is july?

July is an experimental, interpretted, lexically-scoped Lisp dialect built in pure Elixir. While not suitable for solving large, real world problems; it is a joy to use for solving tiny problems and great fun to hack on. July is heavily inspired by Scheme, Clojure and Elixir.

WARNING: Full of fun bugs and bad error messages! (For now...)

What does it look like?
(import 'math)
(import 'coll)

(defun fizzbuzz [n]
  (match (list (mod-0? n 5) (mod-0? n 3))
    [(#t #t)  'fizzbuzz]
    [(#f #t)  'fizz]
    [(#t #f)  'buzz]
    [_ n]))

[|>
  (range 1 100)
  (map fizzbuzz)]

Solves the classic "FizzBuzz" problem for integers 1-100

Table of contents

Installation

Requires Erlang 17+ and Elixir 1.1+ to be installed and on your path!

July is still in it's infancy and there's no de facto way to get it up and running. There's currently three options:

  1. Launching the REPL and evaluating files through the provided escript (recommended)
  2. Launching the REPL in IEx and evaluating files inside the REPL
  3. Directly invoking the evaluator

Regardless of what option you choose, you're going to need to clone the repository and jump to the directory:

git clone https://github.com/Rob-bie/July
cd dir

Launching the REPL and evaluating files through the provided escript

july
july "path-to-file.july"

or

escript july
escript july "path-to-file.july"

Launching the REPL in IEx and evaluating files inside the REPL

IEx -S mix
iex(1)> July.Repl.JulyRepl.start_repl
july@repl(1)> (eval-file "path-to-file.july")

Directly invoking the evaluator

IEx -S mix
iex(1)> July.Evaluator.eval("(eval-file \"path-to-file.july\")")

Jump into July

...

july-lisp's People

Contributors

rob-bie avatar

Stargazers

 avatar Michał Łępicki avatar Christian Bäuerlein avatar Julian Pokrovsky avatar  avatar Chris Denniston avatar Tasshin Fogleman avatar DRJ avatar

Watchers

DRJ avatar James Cloos avatar  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.