GithubHelp home page GithubHelp logo

Comments (5)

csabahruska avatar csabahruska commented on May 27, 2024

Our vision is stick the project to LLVM and ideally (future work) we could expose LLVM prim types and primops in GRIN also.
From this perspective GRIN is LLVM + Sum Types.
LLVM saves us lots of work:

  • high quality instruction selection
  • GC compiler support in machine code generator
  • support for many CPU targets, including web assembly

It does everything what an optimizing compiler could do for an imperative language i.e. C++.
GRIN's job is to do the what LLVM can not understand.

The current GRIN primop set was created for the prototype. It needs some redesign to support real world language front-ends.

Regarding your suggestion, I do not think that Prim should be added to Val because those are for values in the first order language.

BTW, extending the current primop set is the very next on our TODO list. You can join at the design phase.
It would be better to discuss design ideas on examples. Could you give us some uses cases?

from grin.

csabahruska avatar csabahruska commented on May 27, 2024

I've found your GRIN_NOTES.

the entrypoint to the program is called 'grinMain' - can we make this configurable?

Maybe in the future, but this should not be a blocker issue for you.

Why is Program a constructor for Exp? It should be its own type. Those datatypes should mimic the abstract syntax from the paper.

The GRIN is AST is squeezed into a single Exp type to support recursion schemes naturally. This could be unusual because it's more common to have separated Program/Exp/Alt/etc. data types. But that is incompatible with the recursion-schemes library. In GRIN the AST well formedness is checked by the linter.

Variables in your language need to be fetched from

This is not true. The only constraint is that nodes can not contain node values, only pointers to node values.

If you have questions feel free to ask on gitter:
https://gitter.im/Grin-Development/Lobby

from grin.

LightAndLight avatar LightAndLight commented on May 27, 2024

I'll follow up on the gitter so we don't pollute this thread.

from grin.

csabahruska avatar csabahruska commented on May 27, 2024

I'm working on external definition support for GRIN.
This will allow front-end developers to introduce new primitive operations and primitive types easily.

from grin.

Anabra avatar Anabra commented on May 27, 2024

External definitions were added to GRIN, should we close this thread?

from grin.

Related Issues (20)

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.