billhails / cekf Goto Github PK
View Code? Open in Web Editor NEWLow level (C) implementation of a CEK machine with an additional "F" failure continuation supporting amb
License: GNU General Public License v3.0
Low level (C) implementation of a CEK machine with an additional "F" failure continuation supporting amb
License: GNU General Public License v3.0
The run-time engine of this project is some of the earliest code, and the tooling for code generation wasn't there at that time. Now the code-generation is more mature it would be good to replace all that hand-written boilerplate with generated code, reducing the maintenance overhead and gaining access to extra features that the CG provides.
Tuples only, a tuple returned from a function should be directly unpackable without requiring a switch, i.e.
#(a, b) = somefunc();
This will need to be at least opt-out, maybe some special comment or directive to tell the TPMC to allow them for specific functions.
i.e. fn (a) { fn (b) { a + b } }(2, 3)
best left until after #84
alias string = list(char)
is the main driver.
infix 55 left >>= fn(l, r) { ... }
prefix 45 $ fn(a) { ... }
suffix 60 ! factorial
The main thing to figure out is scoping, it should be relatively easy to add these to a parser but they may also need to be removed when they go out of scope.
see MACROS for initial ideas
The ANF conversion code is messy and potentially has bugs, which are likely adding unnecessary let bindings which will significantly slow down the run-time. The current plan is to write the ANF conversion in F Natural itself, then convert that to C. Problem is that the ANF examples to hand are written in scheme using CPS, making conversion from F Natural to C non-trivial.
a / b
because there is a canonical form (via gcd).b
would be bound to 1
if the argument was an integer.(a + 2) * b
a
and b
, and a ** 2
would require a
a + b
, b
would be bound to 0i
if the actualAs with Haskell, (2+)
etc.
should be like print
but then exits.
depends on #83
call/cc
will complicate this of course, because continuations are re-usable.NaN etc.
some progress already made with the ParserInfo
struct but cant_happen
is being used everywhere for conditions that are just errors in the input.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.