Comments (5)
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.
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.
I'll follow up on the gitter so we don't pollute this thread.
from grin.
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.
External definitions were added to GRIN, should we close this thread?
from grin.
Related Issues (20)
- Clang dependency for tests HOT 2
- How to cite paper HOT 3
- Lambda/GrinCodeGenBoxed.hs does not exist
- SimpleDeadParameterElimination causes "undefined variable" errors
- Question: does GRIN requires a runtime? HOT 1
- What LLVM versions are supported by the codegen? HOT 1
- InlineApply causes non-defined function when self recursive HOT 1
- Confused about non-covered alternatives and RunPure HOT 3
- Foreign pointer primitive type HOT 5
- Binary download?
- Windows support?
- Fix E2E tests for OSX HOT 1
- Clean FFI and primitive operations. This should be modular and specific to frontends.
- Modular PrimOps HOT 4
- Specification of the undefined value semantics
- SparseCaseOptimisation removes useful alternatives HOT 8
- Stop pipeline on errors and add --continue-on-lint option for the current behavior. HOT 3
- Counting Immutable Beans HOT 6
- Improve case hoisting
- Fix data dependencies in pipeline
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grin.