0x0f0f0f / gobba Goto Github PK
View Code? Open in Web Editor NEWA purely functional dynamically typed programming language.
Home Page: https://0x0f0f0f.github.io/gobba-book/
License: MIT License
A purely functional dynamically typed programming language.
Home Page: https://0x0f0f0f.github.io/gobba-book/
License: MIT License
Minicaml needs a logo! Let me know if you have a small cute drawing of a camel or anything related to functional programming that may fit. I'll add you in the thanks section of README and the paper.
If a function in minicaml is pure and does only numerical computations, it should be (possibly) integrable or differentiable.
Differentiation should be straightforward to implement, it should be an interpretation of expressions different from evaluation, returning new expressions. Gradients can be easily obtained by iterating single variable derivation over the body of a "nested" lambda. The concrete syntax for derivation should be derive (some n-ary function)
.
Single variable integration should be done in a similar manner to derivation. The concrete syntax integrate (some 1-ary function)
should return a new function denoting the indefinite integral (antiderivative). The concrete syntax integrate from x to y (some 1-ary function)
should return the definite integral calculated as in the second fundamental theorem of calculus. To compute multiple integrals the integrate over (domain) (some n-ary function)
concrete syntax should be used. It is to be discussed if the integration (domain)
should be expressed as a sequence of inequalities, separated by ;
. If so, the interpretation of (domain)
expressions should not be normal evaluation, but a process that extracts the integration boundaries for each nested integral.
Computing indefinite multiple integrals is to be debated. See this stackexchange post.
Implementing differentiation implies implementing the algebra of limits and infinite values. I am not sure if to include the Infinity
value as a first class value of the language, and therefore extending the numerical primitives so that they can compute in the algebra of limits.
minicaml
is no longer mini
at ~2.1k lines of code, and while it still has a lot in common with OCaml, the syntax has diverged and the name minicaml
may be misleading for newcomers.
I thought about gobba
(camel hump in Italian) name with a .gob
extension for language files.
Let me know if you have any other ideas for a project name (or if you like the current name).
There's a problem with laziness in recursion (with laziness in recursion (with laziness in recursion (with laziness ...))).
Non-recursive lazy functions work as expected, but as soon as a lazyfun
is declared in a let rec
statement, evaluation is stuck in an endless loop and stack overflows. After investigating a bit (trying factorial and fibonacci functions) I've found out that the problem occurs when arguments are passed to the recursive application. It seems that LazyExpression
s passed as recursive application arguments never get evaluated.
Here's the example I've tried
let rec fib = lazyfun n -> if n < 2 then n else (fib (n - 1)) + (fib (n - 2)) in fib 5
Here's the factorial example
let rec fact = lazyfun n -> if n < 2 then n else n * fact(n - 1) in fact 5
Implement static typing for expressions and function:
Should the definition for function expressions be like this
type expr =
...
| Lambda of ide * expr
so that a function that takes 3 arguments becomes (Lambda ("x", (Lambda ("y", Lambda ("z", ...body...))))
Or should i keep the list style?
type expr =
...
| Lambda of ide list * expr
where a function that takes 3 arguments is
(Lambda (["x"; "y"; "z"], ...body...)
I think the latter is easier to read, but the first one makes currying and static type inference easier.
x.y
syntax for accessing the y
property of a dictionary x
Fix the algorithm that completes/shows hints for module properties. https://github.com/0x0f0f0f/gobba/blob/master/lib/completion.ml
exceptions should be values, but they should float towards the top.
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.