Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Zelex/jo_clojure
Fast Embeddable Clojure in C/C++
https://github.com/Zelex/jo_clojure
c clojure cpp language
Last synced: 2 months ago
JSON representation
Fast Embeddable Clojure in C/C++
- Host: GitHub
- URL: https://github.com/Zelex/jo_clojure
- Owner: Zelex
- License: mit
- Created: 2022-03-03T19:59:46.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-20T21:47:24.000Z (8 months ago)
- Last Synced: 2024-08-03T21:02:50.022Z (5 months ago)
- Topics: c, clojure, cpp, language
- Language: C++
- Homepage:
- Size: 3.32 MB
- Stars: 144
- Watchers: 7
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-lisp-languages - jo_clojure - C] Fast Embeddable Clojure in C/C++, including persistent datastructures and STM (Languages / C/C++)
README
# JO Clojure
Author Jon Olick. @JonOlick on twitter.
A Fast, (soon to be) Embeddable Clojure-like language implementation in C/C++.
The near-term goal is to re-make clojure in an embedable form.
The long-term goal is to add types/functions for machine learning, tensors, etc...
# Usage:
* For the REPL: jclj
* For running a script: jclj file.clj# Currently:
* Native implementation of almost entire core lib. See TODO.md
* Parses code into native structures (AST), then executes. Essentially interpreted - though does some clever things here and there.
* Lazy sequences
* Startup time is ridiculously fast by comparison to clojure
* Implementations of persistent lists, vectors, hash-map, hash-set, matrix
* Software Transactional Memory (STM)
* Atoms
* IO# Differences:
* IO is very different than clojure's IO cause JVM Clojure's IO functions are practically non-existant.
* Software Transactional Memory (STM) now works seamlessly with Atoms - thus refs are only useful if you need the history feature?
* Not entirely complete implementation (yet). There is a LOT to do.
* See TODO.md for information on what is left to do.# Future:
* Compile to C/C++ code so you can compile a native executable.
* Save/Restore program state (continue later, saved in binary format).
* Native types and operations for Matrices and Tensors.
* Automatic Parallelization.
* sorted-set
* sorted-map
* refs
* agents
* other etc....# Compile/install:
Unix:
Run `make` to build and `make install` to install to `/usr/local/bin` (might require `sudo`)Windows:
Run `c.bat` for Microsoft C/C++ compiler. Run `make` for mingw gcc.