Git Product home page Git Product logo

conway's Introduction

Conway

This is a small side project I've been working on. Perhaps my third or fourth iteration of creating a PL and to teach myself type theory in the process. The project is in early stages and it might tend to break a lot.

If you are familiar with Scala, Ruby or Rust, you might find in Conway some similitudes. I like how such languages feels so natural so I decided to take some inspiration from them. However, currently some designs decisions are being made, hence the grammar is up to changes as long as I add more features and fix some inconsistencies. Switch to the 'functions' branch for the latest changes.

Examples

Conway can evaluate functions such as:

fn foo(): String do
  "Hi hello!"
end

fn baz(b): Bool do
  !b
end

Use the 'let' keyword to declare a new variable (Nil, by default).

=> let bar = true
=> print bar
=> true

Re assign its value.

=> bar = 'String literal here'
=> print bar
=> 'String literal here'

Dynamic variable scoping.

let a = 'Kaboom!'
{
  print a -> 'Kaboom!'
}

{
  let a = 'Oh hi Mark'
}
print a -> This variable is undeclared!

And perform some operations.

=> !true
=> false

Roadmap

  • Basic primitive types.
  • Unary operations.
  • Binary operations.
  • Variable declaration and re assignment.
  • Variable scope.
  • Code blocks.
  • Functions.
  • Design custom error types for parsing stage.
  • If-else statements.
  • Vectors.
  • Let expressions.
  • Closures.
  • A stable REPL.
  • Meaningful error messages at runtime.
  • Mutable and non-mutable variables.
  • FP features.
  • Type checking

Why Conway?

Because of Conway The Machine, the rapper :).

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.