https://github.com/rktjmp/fennel-cljlib
fork https://gitlab.com/andreyorst/fennel-cljlib
https://github.com/rktjmp/fennel-cljlib
Last synced: about 2 months ago
JSON representation
fork https://gitlab.com/andreyorst/fennel-cljlib
- Host: GitHub
- URL: https://github.com/rktjmp/fennel-cljlib
- Owner: rktjmp
- License: mit
- Created: 2022-11-11T04:02:37.000Z (almost 3 years ago)
- Default Branch: fix-require-calls-in-macros
- Last Pushed: 2022-11-11T04:07:52.000Z (almost 3 years ago)
- Last Synced: 2025-03-22T08:18:55.409Z (7 months ago)
- Language: Fennel
- Size: 353 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Fennel Cljlib
Experimental library for the [Fennel](https://fennel-lang.org/) language, that adds many functions from [Clojure](https://clojure.org/)'s standard library.
This is not a one-to-one port of Clojure `core`, because many Clojure features require certain facilities from the runtime.
This library implements lazy sequences, transducers, immutable tables, sets and vectors, transients, and a lot of functions from the `core` namespace.
Some semantics like concurrency, or dynamic scope is not supported by Lua runtime at all.
Therefore, certain functions were altered to better suit the domain.## Installation
Clone library into your project or put it as a git submodule:
$ git clone --recursive https://gitlab.com/andreyorst/fennel-cljlib cljlib
Make sure to set up the `FENNEL_PATH` and `LUA_PATH` environment variables to include the installation directory:
FENNEL_PATH="cljlib/?/init.fnl;$FENNEL_PATH"
LUA_PATH="cljlib/?/init.lua;$LUA_PATH"Or pass them via command line arguments:
$ fennel --add-fennel-path "cljlib/?/init.fnl" --add-package-path "cljlib/?/init.lua"
Now you can require `:cljlib` from Fennel:
``` fennel
(local clj (require :cljlib))
(import-macros cljm :cljlib)
```Alternatively, precompile the library to make it load slightly faster:
$ cd cljlib; make
This will compile `init.fnl` into the `cljlib.lua` file, with all dependencies included.
It is also possible to use this library directly from Lua this way.## Documentation
Documentation is auto-generated with [Fenneldoc](https://gitlab.com/andreyorst/fenneldoc) and can be found [here](https://gitlab.com/andreyorst/fennel-cljlib/-/tree/master/doc).
# Contributing
Please make sure you've read [contribution guidelines](https://gitlab.com/andreyorst/fennel-cljlib/-/tree/master/CONTRIBUTING.md).