mudasobwa

mudasobwa

Creator of Cure

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-else construct.

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

AstonJ

Congratulations @mudasobwa :tada:

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 :icon_biggrin:

mudasobwa

mudasobwa

Creator of Cure

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 :slight_smile:

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

mudasobwa

Creator of Cure

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
  ...

Where Next?

Popular in Discussions Top

WildYorkies
It seems that the more I read, the more I find Elixir users speaking about all the ways that Elixir is not good for x, y, and z use cases...
New
laiboonh
Hi all, I am trying to convince my team to use liveview over the current react. What are some of the points where one should consider us...
New
nburkley
AWS re:Invent is on at the moment with some interesting announcements. One new feature in particular is the Lambda Runtime API for AWS La...
New
Crowdhailer
I’ve been hearing much about the new formatter and it’s something I have been keen to try. I find examples buy far the most illuminating...
248 19327 150
New
ejpcmac
I have discovered Nix last month and I am currently on my way to migrating to it—both on macOS at home and the full NixOS distrubution at...
New
restack_oslo
Hello, Please pardon me for any faux paux. I am 46 and this is my first time on a forum of any kind. I wanted to to get answers from tho...
New
ben-pr-p
In general I’ve been sticking to this community style guide GitHub - christopheradams/elixir_style_guide: A community driven style guide ...
New
tomekowal
Hey guys! I want to create a toy project that shows a chart of temperature over time and updates every 5 seconds. I feel LiveView is per...
New
Markusxmr
Since Drab has been developed for a while in the open, introducing the Liveview functionality in a way it happend appears to undermine th...
New
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New

Other popular topics Top

malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
Lily
In templates/appointment/index.html.eex: &lt;%= for appointment &lt;- @appointments do %&gt; &lt;tr&gt; &lt;td&gt;&lt;%= appoi...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52673 488
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement