Giter Club home page Giter Club logo

kaleidoscope's People

Contributors

bencochran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kaleidoscope's Issues

Needs a little standard library

For example (in C):

double putchard(double c) {
    return (double)putchar((double)c);
}

Just a few utilities that aren’t expressible in the native Kaleidoscope code.

Add a `main`

Right now, we have no way to generate a value main definition.

I think I want to solve this by requiring a def main() with zero parameters. Then during codegen we can special-case main and generate it to return an int (maybe casting the function body’s result?). That way we can actually execute the resulting code.

Types?

As I work (#5) on adding a putchard (that just casts to int and calls putchar) and printd (that calls to printf("%f", value)), it would be nice to be able to express these natively as some sort of extended Expression (instead of writing them each by hand as I am now).

I don’t want to add types to the Kaleidoscope language itself, just augment the parsed expressions with types and add the ability to construct other-typed expressions in code.

Unit tests?

I’m… not exactly sure how to unit test code generation. Just rely on LLVM doing the right thing and cross my fingers?

Add Readme

Should explain how to get LLVM.swift building. And how to run the output.

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.