Description #
Fennel is a small, functional, Lisp-like language that compiles to Lua. It is designed for simplicity, extensibility, and seamless integration with Lua, often used in game scripting and embedded systems.
History #
Created by Andrea Leopardi in 2016, Fennel fills the gap for developers wanting Lisp syntax with Lua performance and ecosystem compatibility. It has gained popularity in the Neovim and game dev communities.
Hello World Code #
(print "Hello, World!")
How to Run #
Option 1: Online
Try Fennel online at Fennel REPL.
Option 2: Local
- Install Lua (https://www.lua.org)
- Install Fennel compiler:
luarocks install fennel
- Run Fennel code with:
fennel hello.fnl
Key Concepts #
- Lisp syntax with s-expressions
- Compiles to efficient Lua code
- Supports macros and metaprogramming
- Easy embedding in Lua applications
- Functional programming constructs
- Minimal runtime overhead
- Simple tooling and REPL support
- Used extensively for Neovim plugin development
- Compatible with Lua libraries
- Open source and community-driven
Try It Online #
Fun Facts #
- Fennel combines the expressiveness of Lisp with Lua’s speed and simplicity.
- It is frequently used to write Neovim configurations and plugins.
- The language supports powerful macro systems for metaprogramming.
- Fennel’s compiler is implemented in Lua itself.
- It is popular in game development for lightweight scripting.