A statically typed lisp, without a GC, for real-time applications.
Go to file
2016-03-29 22:20:05 +02:00
bin can send file to carp on command line 2016-03-15 23:46:34 +01:00
emacs can send functions to (bake ...) 2016-03-21 08:55:11 +01:00
examples typograf can draw shapes 2016-03-29 22:20:05 +02:00
img new logo! 2016-03-23 17:35:24 +01:00
lisp started work on sending arrays as args, and allowing arrays in structs 2016-03-29 15:22:43 +02:00
out use <carp-dir>/out for all build artifacts 2016-03-15 12:55:27 +01:00
shared cleaned up in shared.h 2016-03-29 13:31:39 +02:00
src solved gc error (shadowstack needed for struct during construction) 2016-03-29 17:41:35 +02:00
.gitignore use <carp-dir>/out for all build artifacts 2016-03-15 12:55:27 +01:00
CMakeLists.txt Oops, FFI lib path should be path 2016-02-18 14:52:03 +01:00
globfiles.cmake CMake support for the c source 2016-02-17 08:23:10 +01:00
INSTALL.md new readme 2016-03-18 07:40:57 +01:00
LANGUAGE.md char syntax 2016-03-18 13:52:59 +01:00
LICENSE added a license 2016-01-19 13:29:06 +01:00
Makefile can handle int arrays as arguments to struct constructors 2016-03-29 16:34:04 +02:00
MANUAL.md new readme 2016-03-18 07:40:57 +01:00
README.md or 2016-03-24 11:32:13 +01:00
RESEARCH.md strings in rust 2016-03-28 23:05:06 +02:00
TODO.md cond macro 2016-03-29 13:19:32 +02:00
xcode.sh Script for generating and opening Xcode project 2016-02-17 09:50:04 +01:00

Carp

Join the chat at https://gitter.im/eriksvedang/Carp

Logo

WARNING! This is a research project and a lot of information here might become outdated and misleading without any explanation. Don't use it for anything important just yet!

Carp is a small programming language designed to work well for interactive and performance sensitive use cases like games, sound synthesis and visualizations.

The key features of Carp are the following:

  • Automatic and deterministic memory management (no garbage collector or VM)
  • Inferred static types for great speed and reliability
  • Live reloading of code, REPL-driven development, a fun and helpful workflow
  • Ownership tracking enables a functional programming style while still using mutation of cache friendly data structures under the hood
  • No hidden performance penalties allocation and copying is explicit
  • Very good integration with exisiting C code

Learn more

A Small OpenGL/GLFW Example

(import gl)

(defn tick [state]
  (+ state 0.033f))

(defn draw [state]
  (let [r 200f
        t (copy state)]
    (draw-line 300f
               220f
               (+ 300f (* r (cosf t)))
               (+ 220f (* r (sinf t))))))

(defn spin []
  (glfw-app "This is a demo" 0.0f tick draw default-on-keys))

To build this example, save it to a file called 'example.carp' and load it with (load-lisp "example.carp"), then execute (bake-exe spin) to build an executable, or (spin) to run the program directly from the REPL.

Contributors

  • Erik Svedäng
  • Markus Gustavsson
  • Fyodor Shchukin

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

© Erik Svedäng 2015 - 2016