Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andreyorst/fennel-cljlib
Port of clojure.core namespace to Fennel (mirror)
https://github.com/andreyorst/fennel-cljlib
clojure fennel
Last synced: 12 days ago
JSON representation
Port of clojure.core namespace to Fennel (mirror)
- Host: GitHub
- URL: https://github.com/andreyorst/fennel-cljlib
- Owner: andreyorst
- License: mit
- Created: 2021-08-22T16:58:51.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T16:33:33.000Z (10 months ago)
- Last Synced: 2024-01-15T05:55:20.276Z (6 months ago)
- Topics: clojure, fennel
- Language: Fennel
- Homepage: https://gitlab.com/andreyorst/fennel-cljlib
- Size: 587 KB
- Stars: 31
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Lists
- awesome-stars - fennel-cljlib
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 dynamic scope and parallelism are not supported by Lua runtime at all.
Therefore, certain functions were altered to better suit the domain or omitted entirely.## Installation
Grab the [cljlb.fnl][1] file, and copy it somewhere into your project.
Now you can require `:cljlib` from Fennel:``` fennel
(local clj (require :cljlib))
```To use macros provided by the library, due to the implementation of how macros are stored an additional `require` step in the `import-macros` call is required:
```fennel
(import-macros cljm (doto :cljlib require))
```Alternatively, the library can be precompiled so it will load slightly faster:
$ fennel -c cljlib.fnl > cljlib.lua
However, this way the macros provided by this library will not be available.
## Documentation
Documentation is auto-generated with [Fenneldoc][2] and can be found [here][3].
# Contributing
Please make sure you've read [contribution guidelines][4].
In order to work on the library, edit the `src/cljlib.fnl` file, then run the following command in the project root:
fennel utils/build
This produces a self-contained version of the library with all dependencies properly included.
Tests can be ran with:
fennel utils/run-tests
[1]: https://gitlab.com/andreyorst/fennel-cljlib/-/raw/master/cljlib.fnl
[2]: https://gitlab.com/andreyorst/fenneldoc
[3]: https://gitlab.com/andreyorst/fennel-cljlib/-/blob/master/doc/cljlib.md
[4]: https://gitlab.com/andreyorst/fennel-cljlib/-/tree/master/CONTRIBUTING.md