A statically typed lisp, without a GC, for real-time applications.
Go to file
2016-06-13 15:46:02 +02:00
bin more searching... 2016-04-14 23:12:28 +02:00
emacs pop-to-buffer is better 2016-04-13 21:13:59 +02:00
examples can detect stack overflow in bytecode 2016-06-13 15:46:02 +02:00
img more logo versions, research 2016-05-20 13:42:15 +02:00
lisp bugfix with (:Array "T") 2016-06-09 11:03:21 +02:00
out cleaner solution to keeping 'out' directory around 2016-06-08 09:13:54 +02:00
shared Revert "Fixed build on Linux, removed implementation code from header files, fixed compiler warnings." 2016-06-09 20:16:19 +02:00
src can detect stack overflow in bytecode 2016-06-13 15:46:02 +02:00
.gitignore Revert "Fixed build on Linux, removed implementation code from header files, fixed compiler warnings." 2016-06-09 20:16:19 +02:00
CMakeLists.txt Revert "Fixed build on Linux, removed implementation code from header files, fixed compiler warnings." 2016-06-09 20:16:19 +02:00
globfiles.cmake CMake support for the c source 2016-02-17 08:23:10 +01:00
INSTALL.md how to find libffi 2016-06-09 19:31:26 +02:00
LANGUAGE.md example of generic structs 2016-06-01 18:58:26 +02:00
LIBRARIES.md fix 2016-04-27 21:14:56 +02:00
LICENSE added a license 2016-01-19 13:29:06 +01:00
Makefile Revert "Fixed build on Linux, removed implementation code from header files, fixed compiler warnings." 2016-06-09 20:16:19 +02:00
MANUAL.md tips 2016-04-26 00:56:08 +02:00
README.md typo 2016-06-10 09:02:41 +02:00
RESEARCH.md research 2016-06-13 11:54:18 +02:00
TODO.md cleanup 2016-06-10 15:41:11 +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 existing C code

Learn more

A Small OpenGL/GLFW Example

(import gl)

(defn init []
  0f)

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

(defn draw [state]
  (let [t @state
        steps 100
        step (/ 1f (itof steps))]
    (for (i 0 steps)
      (let [r (* step (itof i))
            r2 (+ r step)]
        (draw-line (* r (cosf (* t r)))
                   (* r (sinf (* t r)))
                   (* r2 (cosf (* t r2)))
                   (* r2 (sinf (* t r2))))))))

(defn spin []
  (glfw-app "Spin" init 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 @e_svedang
  • 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