Giter Club home page Giter Club logo

toy-hisp's Introduction

Hisp

A toy compiler for and learning about functional language implementation. Oh, and Haskell.

The language is, roughly speaking, the lambda calculus with a few built-in functions and support for numbers. The output of the compiler is currently a snapshot of the initial program heap; the runtime then performs graph-reduction on this heap until it reaches an answer.

Plans

  • Support for multiple functions
  • Support for types!
  • Some sort of bytecode to compile to
  • Self-hosting

Installation notes

  • I use a truckload of GHC extensions, including Template Haskell, so I doubt this'll work on any other compilers.
  • C++ compilation is done with Scons and relies heavily on C++11. GCC 4.8.2 should be enough.

toy-hisp's People

Contributors

jesyspa avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

toy-hisp's Issues

Clean up Serialization interface

At the moment, serialization takes and returns data using the MemoryInfo struct, which does the job but doesn't provide quite enough info. Perhaps have it take and return a space, one we get those working? The fact there's owning pointers being passed around doesn't help matters, either.

Make the compiler emit hic files

Yay, no more generation of C++! Anyway, we need to write a new back-end which will be able to create the files our loading system can use.

Factor out Space class

An allocation space could be represented fairly well by a dedicated class. It would need functions for allocating an object, iterating over all objects, and deallocating the space. Maybe also something for object migration.

Add alignment checks

At the moment, we assume any object can be allocated at any address. That's probably... not true.

Factor out Debugger/Logger class

At the moment, any kind of debugging or logging happens by calling free functions that print to standard error. Some kind of more systematic solution would be nice; in particular, being able to configure where the output is sent and what kind of data should be logged (and in what format!) would be nice.

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.