True leaders are hardly known to their followers. Next after them are the leaders the people know and admire; after them, those they fear; after them, those they despise.
To give no trust is to get no trust.
When the work's done right, with no fuss or boasting, ordinary people say, Oh, we did it.
- Tao Te Ching chapter 17, translated by Ursula K. Le Guin
buglabel to the issue.
fennel module is the fundamental entry point; it provides the entire
public API for Fennel when it's used inside another program. All other modules
fennel.view are considered compiler internals and do not have a
guaranteed stable API.
src/fennel.fnl: returned when Fennel is embedded programmatically
src/launcher.fnl: handles being launched from the command line
src/fennel/repl.fnl: provides interactive development context
The core modules implement the text->AST->Lua pipeline. The AST used by the compiler is the exact same AST that is exposed to macros.
src/fennel/parser.fnl: turns text of code into an AST
src/fennel/compiler.fnl: turns AST into Lua output
src/fennel/specials.fnl: built-in language constructs written in Lua
src/fennel/macros.fnl: built-in language constructs written in Fennel
src/fennel/utils.fnl: definitions of core AST types and helper functions
Finally there are a few miscellaneous modules:
src/fennel/friend.fnl: emits friendly messages from compiler/parser errors
src/fennel/binary.fnl: produces binary standalone executables
src/fennel/view.fnl: turn Fennel data structures into printable strings
Fennel is written in Fennel. In order to get around the chicken-and-egg problem, we include an old version of the compiler that's used to compile the new version.
old/fennel.lua: older version of Fennel compiler from before self-hosting
old/launcher.lua: older version of the command line launcher
This old version (based on 0.4.2) does not have all the newer language features
of Fennel except in cases where we have explicitly backported certain
things, such as
If you want to contribute code to the project, please send patches to the mailing list. (Note that you do not need to subscribe to the mailing list in order to post to it.) We also accept code contributions on the GitHub mirror if you prefer not to use email. For smaller changes, you can also push your changes to a branch on a public git remote hosted anywhere you like and ask someone on IRC or the mailing list to take a look.
In order to get CI to automatically run your patches, they will need to have
[PATCH fennel] in the subject. You can configure git to do this automatically:
git config format.subjectPrefix 'PATCH fennel'
For large changes, please discuss it first either on the mailing list, IRC/Matrix channel, or in the issue tracker before sinking time and effort into something that may not be able to get merged.
mainbranch. The contents of this branch should be the same on Sourcehut as they are on the Github mirror. But make sure that
mainon your copy of the repo matches upstream.
make testallwill test against all supported versions, assuming they're installed. If you don't want to install every supported version of Lua, you can rely on the CI suite to test your patches.
changelog.md. Changes that affect the compiler API should update
api.mdwhile changes to the built-in forms will usually need to update
reference.mdto reflect the new behavior.
If all goes well, we should merge your changes fairly quickly.
Informal discussion of changes is easiest on the IRC/Matrix channel, but the mailing list can also be good for this. More serious proposals should go on the mailing list or issue tracker. There is a possibility that there is already a solution for your problems so be sure that there is a good use case for your changes before opening an issue.