Giter Site home page Giter Site logo

fisp's Introduction

fisp

A lisp interpreter implemented in F#.

This loosely follows the tutorial set out in Build Your Own Lisp

Goals of the project:

  • Create my second language interpreter
  • Learn Lisp

Notes

In the notes folder, I plan on writing my thoughts about this project periodically. They're categorized by date, so feel free to take a look if you're curious what is going on with this project lately.

Language Spec

Here are the things that I this version of Lisp to do:

Numbers

Can perform basic arithmetic:

fisp> + 1 2
3
fisp> * 1 2
2
fisp> / 2 1
2
fisp> - 1 2
- 1

But arithmetic is limited to 2 expressions

fisp> + 1 2 3
Error: + operator requires 2 expressions, 3 given

Divide by zero is not allowed:

fisp> / 10 0
Error: Cannot divide by zero

Boolean Logic

True and false are simple values:

fisp> #t
#t
fisp> #f
#f

Several boolean operators exist:

fisp> > 1 0
#t
fisp> > 0 1
#f

Strings

String literals are supported:

fisp> "Hello world"
"Hello world"

Todo

  • See what error message this expression gives and why that is: (+ (5 10) (+ 15 20))
  • Work on supporting escaped strings (see LexerTests.fs for a unit test on the subject)
  • Investigate what Lisp/Racket does when combining expressions of different types. Should these give parser errors:
    • ((+ 1 "hello world"))
    • ((+ ()))
  • How does Lisp/Racket do string concatenation. Through a basic operator (+) or some defined method
  • See what is breaking unicode support for strings, is it REPL or something internal to language.

fisp's People

Contributors

morgankenyon avatar

Watchers

 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.