This is a POC project and attempt to develop a language for AI. Cone-lang is a functional language, which handles with side-effect by algebraic effect handlers, supports autodiff and integrates with python seamlessly.
- Functional programming
- Support tensor type and operations
- Support autodiff
- Support algebraic effect handlers
- Seamlessly integrate with python
- Use python package as package management
fun sin(x: f32) : f32
fun cos(x: f32) : f32
diff sin wrt(x) = cos
diff sin(x, dx) -- will call sin's diff function
Learning from Koka-lang, the type annotation of function as below:
fun foo(x: i32) : e i32
| | |
arg-type effect-type result-type
Inline python code and generate the python package for package release
fun sin(x: a) : a {
inline_python<a>("____result = sin(x)")
}
Install stack
curl https://get-ghcup.haskell.org -sSf | sh
Run mnist example
stack run -- run examples/mnist