mudasobwa
Cure - a new language compiled to BEAM
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three killer-features:
- Dependent types (think Idris) with SMT-solvers
- FSMs with SMT-validation as a language primitive
- No
if-then-elseconstruct.
I created Cure more as an ad-hoc DSL, rather than as a general purpose language. Currently it is in the proof of concept stage, although everyone might grab it, compile it, write and execute some code with it.
I am very open to suggestions, improvements, hints, and “this is all crap” comments.
Most Liked
AstonJ
Congratulations @mudasobwa ![]()
I’ve moved the thread here from libraries as it does not appear to be used within Elixir (if it is let me know and we can move it back).
Must admit I do not know much about FSMs and SMT verification myself (and I can’t be the only one) so it may be worth explaining in a bit more detail why those things are important enough to become a fundamental compelling part of your/a new language ![]()
mudasobwa
Not yet. Technically, this is not the first priority because effects make it drastically harder to use SMT solvers, and Cure is supposed to be used to implement critical parts of the logic and then call it from other BEAM langs.
My bad. I posted an announce too early because after a months deeply in, I was under the wrong impression that everything is evident and clean ![]()
That’s definitely not the killer feature. Despite I have put some effort to optimization, Cure does not aim to be faster. It aims to be proved to be error-free.
Disclaimer. I got a COVID and I am off the grid until next week or so. Thanks everyone for understanding. I see there is an interest in what I am doing and therefore I’ll start with a proper timeline, and feature plan. Until now I was in a rush to make it work from Cure code through type checker, code gen and runtime, which is confusing for newcomers.
mudasobwa
Cure gets REPL!
It’s not yet 102% polished, but one already can play with the language without a create-new-project hassle.
It’s probably a good time to try it and report issues.
❯ ./cure help
Cure 0.23.0 -- Dependently-typed language for the BEAM
Usage: cure <command> [options] [arguments]
Commands:
compile <file|dir> Compile .cure files to BEAM bytecode
run <file> Compile and execute a .cure file
check <file> Type-check without compiling
lsp Start the Language Server Protocol server
stdlib Compile the standard library
doc [path|dir] Generate HTML documentation
fmt [path|dir] Format .cure source files (algebra by default; --safe, --aggressive, --check)
repl Interactive Cure session (multi-line, :help for commands)
watch [path] Recompile/check/test on every save
new <name> Scaffold a new project (--lib | --app | --fsm)
init <name> Same as `new --lib`
deps Resolve project dependencies
test [--cover] Run .cure tests under test/, optionally with coverage
bench [path] Run .cure benchmarks under bench/
explain <Eddd> Explain an error code
why <Eddd> Alias for `explain`
doctor Environment + project + source health report
fix [--dry-run] Apply safe project-wide code fixes
...
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance










