kaleidoscope
egison
Our great sponsors
kaleidoscope | egison | |
---|---|---|
9 | 11 | |
1,017 | 900 | |
- | 0.7% | |
0.0 | 0.0 | |
about 4 years ago | over 1 year ago | |
Haskell | Haskell | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
kaleidoscope
- Implementing a JIT Compiled Language with Haskell and LLVM (2017)
-
Should I abandon using haskell for my compiler?
Comparing the haskell and cpp implementations of the LLVM tutorial lead me to believe it might be faster to learn haskell and implement the compiler in haskell than to implement it in cpp.
-
What would be your programming language of choice to implement a JIT compiler ?
I think for writing compilers Haskell deserves to make the list. It is really excellent at creating DSLs. https://www.stephendiehl.com/llvm/
-
Proposal to Merge Pyston with Cpython
I'm no expert, but you might be interested in: https://llvm.org/docs/tutorial/
There's also a Haskell version if you'd prefer: https://www.stephendiehl.com/llvm/
Idk how to do this in python as I'm not really good with it, but in C, to make your compiler a JIT, you would `mmap` a region as writeable, write the machine code to it that you already know how to generate, `mprotect` it as PROT_EXEC instead of PROC_WRITE, cast the pointer to the region to a function pointer, and then call it. These functions may be available in the python sys package but I don't really know.
I've implemented a "JIT" that takes machine code as hex and does this. Warning: it's complete garbage with no error checking but is a good proof of concept. https://gist.github.com/martinjacobd/3ee56f3c7b7ce621034ec3e...
- Why does Rust have parameters on impl?
-
Implementing a LLVM Micro C compiler in Haskell
This is amazing. I tried following Stephen Diehl's JIT compiler in LLVM tutorial[0] a few years ago but it was already outdated (the llvm-hs library changed quite a bit), and subsequent web searches didn't turn up much.
For those interested in tutorials like this, I'd also recommend a very literate Haskell compiler for the PCF language to C[1], which is essentially lambda calculus with some primitives.
[0] https://www.stephendiehl.com/llvm/
[1] https://github.com/jozefg/pcf/
- Resources for Amateur Compiler Writers
-
Need some help with monad transformers
I'm currently working with llvm-hs-pure and am struggling to properly emit code for a module. I basically followed https://www.stephendiehl.com/llvm/#chapter-3-code-generation and have types like:
-
Advanced books / tutorials about Haskell?
http://www.stephendiehl.com/llvm/ Implementing a JIT Compiled Language with Haskell and LLVM Nice tutorial. Requires knowledge of monads, applicatives, transformers. Deep enough and more or less 'real world'.
egison
- The Egison Programming Language
-
Languages with interesting pattern matching design ?
Look into egison, a "Pattern-Match-Oriented language": https://www.egison.org/
-
Regex-Like Pattern Matching on Arrays/Lists [Question]
Have a look at Egison. It should be a source of inspiration to anyone doing generalised pattern matching. [_,_/2] ~= [2,1]|[6,3] in particular is even clearer in Egison: $p :: #(p / 2).
-
What are some pros and cons of languages that force particular casings for identifiers of a specific purpose?
I think this is a bad idea. In fact, Egison offers a precedent with a better approach. The offered alternative is strictly more powerful as it allows you to refer to a single subpattern multiple times in a greater pattern, and even marks a computable expression you can use in patterns, allowing code like
-
Let's talk about interesting language features.
Egison language. Research language that does some really neat stuff with pattern matching.
-
I want to know about some weird non esoteric programming languages
Egison is weird https://www.egison.org -- it takes a single concept (pattern matching) and pushes it as far as it will go.
What are some alternatives?
hyper-haskell-server - The strongly hyped Haskell interpreter.
dhall - Maintainable configuration files
idris - A Dependently Typed Functional Programming Language
unbound - Replib: generic programming & Unbound: generic treatment of binders
egison-tutorial - The Egison tutorial
ajhc - A fork of jhc. And also a Haskell compiler.
haskelm - Haskell to Elm translation using Template Haskell. Contains both a library and executable.
pcf - A small compiler for PCF
uu-cco - Tools for the CCO (Compiler Construction) course at the UU (Utrecht University)
llvm-hs-pretty - Pretty printer for LLVM AST to Textual IR