carp-lang / Carp

A statically typed lisp, without a GC, for real-time applications.
Apache License 2.0
5.51k stars 174 forks source link

Are there plans to support live coding? #1275

Open monkey-w1n5t0n opened 3 years ago

monkey-w1n5t0n commented 3 years ago

Carp has fascinated me ever since I came across it and I'm looking forward to seeing and contributing to its development.

One other project I mentally associate it with is Extempore, a similarly Haskell-and-C-inspired statically typed and inferred Lisp without a GC that's meant for high-performance, hard real-time applications with a particular focus on live coding music and graphics.

Extempore is built on top of LLVM, with a C++ runtime and a compiler written in Scheme, which compiles xtlang code into LLVM-IR. It can be downloaded for about 280MB (including some audio and image assets) and does not require installing LLVM or any other compiler (AFAIK), so getting up and running is no issue (I remember reading @hellerve's concerns about this in #329).

One interacts with it not through a dedicated REPL window but rather through the source code buffer itself, sending bits of code off to the live compiler to be JIT compiled and hot-swapped while the program is running, making possible the incremental development of a musical (or other) performance in real time.

Is this sort of live interactive compilation on the roadmap for Carp? I don't see Carp and Extempore as overlapping to the point where this would be redundant; despite their similarities they're different languages and focused on different things.

Even with Carp's focus being set on graphics and no intentions of branching into audio, I believe it would still heavily benefit from a live and interactive workflow such as can be achieved with Clojure's Quil library. I understand this is no small undertaking, so at this stage I'm just curious to see if there's general interest in pursuing this.

eriksvedang commented 3 years ago

Hi, thanks a lot for your interest! What you're describing is a long term goal for the language, but something we've chose to ignore to a large extent for now (basically to make implementing the language easier). I'd say that we will try to get to "1.0" before we make proper live coding a priority. Until then, the current simplified repl has quite a few of the benefits of a normal repl so hopefully you will try out the language anyways!