{"id":15033109,"url":"https://github.com/bakpakin/fennel","last_synced_at":"2025-05-14T22:08:35.417Z","repository":{"id":38983152,"uuid":"65159560","full_name":"bakpakin/Fennel","owner":"bakpakin","description":"Lua Lisp Language","archived":false,"fork":false,"pushed_at":"2025-04-28T00:16:11.000Z","size":3252,"stargazers_count":2612,"open_issues_count":10,"forks_count":129,"subscribers_count":52,"default_branch":"main","last_synced_at":"2025-05-14T22:08:29.347Z","etag":null,"topics":["compiler","language","lisp","lua"],"latest_commit_sha":null,"homepage":"https://fennel-lang.org","language":"Fennel","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bakpakin.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-08-07T23:55:24.000Z","updated_at":"2025-05-14T21:23:36.000Z","dependencies_parsed_at":"2024-04-16T06:23:20.034Z","dependency_job_id":"313422bf-ab83-422c-91c9-2bc91b35f8cc","html_url":"https://github.com/bakpakin/Fennel","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakpakin%2FFennel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakpakin%2FFennel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakpakin%2FFennel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakpakin%2FFennel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bakpakin","download_url":"https://codeload.github.com/bakpakin/Fennel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235700,"owners_count":22036964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","language","lisp","lua"],"created_at":"2024-09-24T20:20:07.784Z","updated_at":"2025-05-14T22:08:30.394Z","avatar_url":"https://github.com/bakpakin.png","language":"Fennel","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fennel\n\n[Fennel][1] is a lisp that compiles to Lua. It aims to be easy to use,\nexpressive, and has almost zero overhead compared to writing Lua directly.\n\n* *Full Lua compatibility* - You can use any function or library from Lua.\n* *Zero overhead* - Compiled code should be just as efficient as hand-written Lua.\n* *Compile-time macros* - Ship compiled code with no runtime dependency on Fennel.\n* *Embeddable* - Fennel is a one-file library as well as an executable. Embed it in other programs to support runtime extensibility and interactive development.\n\nAt [https://fennel-lang.org][1] there's a live in-browser repl you can\nuse without installing anything. At [https://fennel-lang.org/see][3]\nyou can see what Lua output a given piece of Fennel compiles to, or\nwhat the equivalent Fennel for a given piece of Lua would be.\n\n## Documentation\n\n* The [setup](setup.md) guide is a great place to start\n* The [tutorial](tutorial.md) teaches the basics of the language\n* The [rationale](rationale.md) explains the reasoning of why Fennel was created\n* The [reference](reference.md) describes all Fennel special forms\n* The [macro guide](macros.md) explains how to write macros\n* The [API listing](api.md) shows how to integrate Fennel into your codebase\n* The [style guide](style.md) gives tips on how to write clear and concise code\n* The [Lua primer](lua-primer.md) gives a very brief intro to Lua with\n  pointers to further details\n\nFor more examples, see [the cookbook][2] on [the wiki][7].\n\nThe [changelog](changelog.md) has a list of user-visible changes for\neach release.\n\n## Example\n\n#### Hello World\n```Fennel\n(print \"hello, world!\")\n```\n\n#### Fibonacci sequence\n```Fennel\n(fn fib [n]\n  (if (\u003c n 2)\n      n\n      (+ (fib (- n 1)) (fib (- n 2)))))\n\n(print (fib 10))\n```\n\n## Differences from Lua\n\n* Syntax is much more regular and predictable (no statements; no operator precedence)\n* It's impossible to set *or read* a global by accident\n* Pervasive destructuring anywhere locals are introduced\n* Clearer syntactic distinction between sequential tables and key/value tables\n* Separate looping constructs for numeric loops vs iterators instead of overloading `for`\n* Comprehensions result in much more succinct table transformations\n* Opt-in mutability for local variables\n* Opt-in nil checks for function arguments\n* Pattern matching\n* Ability to extend the syntax with your own macros\n\n## Differences from other lisp languages\n\n* Its VM can be embedded in other programs with only ~200kb\n* Access to [excellent FFI][4]\n* LuaJIT consistently ranks at the top of performance shootouts\n* Inherits aggressively simple semantics from Lua; easy to learn\n* Lua VM is already embedded in databases, window managers, games, etc\n* Low memory usage\n* Readable compiler output resembles input\n* Easy to build small (~250kb) standalone binaries\n* Compilation output has no runtime dependency on Fennel\n\n## Why not Fennel?\n\nFennel inherits the limitations of the Lua runtime, which does not offer\npre-emptive multitasking or OS-level threads. Libraries for Lua work\ngreat with Fennel, but the selection of libraries is not as extensive\nas it is with more popular languages. While LuaJIT has excellent\noverall performance, purely-functional algorithms will not be as\nefficient as they would be on a VM with generational garbage collection.\n\nEven for cases where the Lua runtime is a good fit, Fennel might not\nbe a good fit when end-users are expected to write their own code to\nextend the program, because the available documentation for learning\nLua is much more readily-available than it is for Fennel.\n\n## Resources\n\n* Join the `#fennel` IRC chat [Libera.Chat][9] \n* The chat is also bridged [on Matrix][10] if you prefer\n* The [mailing list][5] has slower-paced discussion and announcements\n* Report issues on the mailing list, [Sourcehut todo][11]\n* The mirror on [Github][12] is for people who haven't made a Sourcehut account\n* You can browse and edit [the Wiki][7]\n* View builds in Fennel's [continuous integration][8]\n* Community interactions are subject to the [code of conduct](CODE-OF-CONDUCT.md).\n\n## Building Fennel from source\n\nThis requires GNU Make and Lua (5.1-5.4 or LuaJIT).\n\n1. `cd` to a directory in which you want to download Fennel, such as `~/src`\n2. Run `git clone https://git.sr.ht/~technomancy/fennel`\n3. Run `cd fennel`\n4. Run `make fennel` to create a standalone script called `fennel`\n5. Run `sudo make install` to install system-wide (or `make install\n   PREFIX=$HOME` if `~/bin` is on your `$PATH`)\n\nIf you don't have Lua already installed on your system, you can run\n`make fennel-bin LUA=lua/src/lua` instead to build a standalone binary\nthat has its own internal version of Lua. This requires having a C\ncompiler installed; normally `gcc`.\n\nSee the [contributing guide](CONTRIBUTING.md) for details about how to\nwork on the source.\n\n## License\n\nUnless otherwise listed, all files are copyright © 2016-2024 Calvin\nRose and contributors, released under the [MIT license](LICENSE).\n\nThe file `test/faith.fnl` is copyright © 2009-2023 Scott Vokes, Phil\nHagelberg, and contributors, released under the [MIT license](LICENSE).\n\nThe file `style.txt` is copyright © 2007-2011 Taylor R. Campbell,\n2021-2023 Phil Hagelberg and contributors, released under the\nCreative Commons Attribution-NonCommercial-ShareAlike 3.0\nUnported License: https://creativecommons.org/licenses/by-nc-sa/3.0/\n\n[1]: https://fennel-lang.org\n[2]: https://wiki.fennel-lang.org/Cookbook\n[3]: https://fennel-lang.org/see\n[4]: http://luajit.org/ext_ffi_tutorial.html\n[5]: https://lists.sr.ht/%7Etechnomancy/fennel\n[7]: https://wiki.fennel-lang.org/\n[8]: https://builds.sr.ht/~technomancy/fennel\n[9]: https://libera.chat\n[10]: https://matrix.to/#/!rnpLWzzTijEUDhhtjW:matrix.org?via=matrix.org\n[11]: https://todo.sr.ht/~technomancy/fennel\n[12]: https://github.com/bakpakin/Fennel/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbakpakin%2Ffennel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbakpakin%2Ffennel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbakpakin%2Ffennel/lists"}