Changes are marked in bold which could result in backwards-incompatibility.
:into clause to collect and icollect--globals "*"--require-as-include fails to find a module to includeif are treated as nil, not zero valuesIt’s Fennel’s 5th birthday! We’ve got the new accumulate macro for reducing over tables, plus a couple new repl commands and more flexibility when using include.
accumulate macro for reduce operations--skip-include option to prevent modules from being included in output,apropos pattern and ,apropos-doc pattern repl commands,complete foo repl commandfennel.syntax function describing built-ins-c alias for --compile in command line argumentsinclude and make --require-as-include resolve module names dynamically. See the require section in the referencemax-sparse-gap option in fennel.viewpick-args macrofennel.macro-path for searching for macro modules and FENNEL_MACRO_PATH environment variableThis release mostly contains small bug fixes.
_ENV as an unknown global?. when used directly on nilwhere--use-bit-lib was not propagating to the REPLThis release contains one small bug fix.
The biggest change in this release is the addition of the :until clause in all iteration forms to end iteration early.
?.where/or clauses in match--use-bit-lib flag to allow bitwise operations to work in LuaJITmacro-searchers table for finding macros similarly to package.searchers&as inside pattern matchessym function in compile scope now takes a source table second argument:until clauses for early termination in all loops:escape-newlines? and :prefer-colon? options in fennel.viewThis release mostly contains small bug fixes.
The highlight of this release is the table comprehension macros which take the place of map in other lisps. The &as clause in destructuring now allows you to access the original table even as you destructure it into its fields. The fennel.view serializer has been completely rewritten to improve indentation.
collect/icollect)fennel.viewfennel.view for better indentation handlingdoc&as... arguments consistently with Lua when requiring modules__fennelview metamethod on userdata metatables... inside eval-compilerimport-macros would not respect certain compiler options& character in identifiers; will be disallowed laterThis release adds support for reloading modules in the repl, making interactive development more streamlined.
,reload; see ,help for a full list--no-compiler-sandbox did not apply in import-macrosmacrodebug fail to print correctly: when used with methods that are not valid Lua namesThis release introduces the plugin system as well as starting to sandbox the compiler environment for safer code loading. Nothing is blocked yet, but it emits warnings when macros use functionality that is not considered safe; future versions will prevent this.
--lua CLI flag for specifying a custom Lua command/executablelist? and sym? in compiler API@This release features a version of the Fennel compiler that is self-hosted and written entirely in Fennel!
fennel.friend module is now incorporated into the compiler, not separateinclude would get skippedThis release mostly includes small bug fixes but also adds the with-open macro for automating closing file handles, etc.
$...with-open macro for auto-closing file handles--native-module and --native-library to --compile-binary commandfennel.searchModule function to module APIinclude calls would splice locals incorrectly#) couldn’t be used as multisymsinclude to ignore compiler options$HOME env var was not setThis release mostly includes small bug fixes, but also introduces a very experimental command for compiling standalone executables.
--compile-binary commandThis release adds support for Lua 5.3’s bitwise operators as well as a new way of importing macro modules. It also adds pick-values and pick-args for a little more flexibility around function args and return values. The compiler now tries to emit friendlier errors that suggest fixes for problems.
import-macros for more flexible macro module loadingrshift, lshift, bor, band, bnot, and bxormacroexpand helper to expand macro forms during compilationmacrodebug utility macro for printing expanded macro forms in REPLpick-values and pick-args macrosFENNEL_DEBUG=trace__fennelview metamethod for custom serializationdofile would report the wrong filenameinclude of Lua modules that lack a trailing newlineThis release mostly contains small bug fixes.
include could not be nested without repetitionelse to emit twice in some contextsThis release mostly contains small bug fixes.
--load FILE argument to command-line launchereach to work with raw iterator valuesThis release introduces docstrings as well as several new features to the macro system and some breaking changes; the most significant being the new unquote syntax and the requirement of auto-gensym for identifiers in backtick.
include special form to selectively inline modules in compiled outputdoc for displaying them in repl# special with lengthhashfn and # reader macro for shorthand functions like #(+ $1 $2)macro to make defining a single macro easier(comment) special which emits a Lua comment in the generated source:detect-cycles? false in fennelview to turn off “#<table 1>” outputx# syntax for auto-gensym inside backtick:one-line output in fennelview--require-as-include to inline required modules in compiled output--eval argument to command-line launcherFENNEL_PATH to path? in pattern matchingreadline.lua is available--globals and --globals-only options to launcher script(foo:bar baz); disallow : in symbolslambda argument checks when using destructuringmatchluaexpr and luastatement for a single lua special@ (unquote) with ,; comma is no longer whitespace~ in symbols other than ~=This release mostly contains small bug fixes.
not= as an alias for ~=in-scope? which caused match outer unification to fail~= comparisonsThe second minor release introduces backtick, making macro authoring much more streamlined. Macros may now be defined in the same file, and pattern matching is added.
-?> and -?>> macrosmatch macro for pattern matchingmacros@ (later changed to ,)--add-package-path and --add-fennel-path to launcher scriptThis release contains a few small bug fixes.
The first real release sees the addition of several “creature comfort” improvements such as comments, iterator support, line number tracking, accidental global protection, pretty printing, and repl locals. It also introduces the name “Fennel”.
-> and ->> macrosvar; disallow regular locals from being setglobal; refuse to set globals without itrequire-macros// for integer division on Lua 5.3+fennel.dofile and fennel.searcher for require supportpartiallocaldoto macro: for method callseachlambda/λ for nil-argument-checked functionswhen&. formpack, $, block, *break, specialdefn macroThe initial version (named “fnl”) was created in 8 days and then set aside for several years.
Fennel is copyright © 2016-2021 Calvin Rose and contributors and is released under the MIT/X11 license. This website (source) is under the same terms.