Skip to content

Latest commit

 

History

90 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lisp Flavoured Nim

LFN is a Lisp dialect that compiles to Nim. It processes s-expressions into Nim AST via macros, giving you Lisp syntax with full access to the Nim ecosystem and type system. Inspired by Hylang. Docs are hosted here, and release builds are here.

Quick example

(import std/strutils)

(proc greet ((name string)) (: string)
  (toUpperAscii name))

(echo (greet "lfn"))

Compile and run:

lfn compile hello.lfn && ./hello
# LFN

Building

Requires Nim >= 2.2.4.

nimble build

This produces a bin/lfn binary. To run it against a file:

lfn check   file.lfn   # type-check only
lfn compile file.lfn   # compile to binary

Documentation

Examples

The examples/ directory contains runnable .lfn programs covering types, loops, error handling, macros, pragmas, and Nim interop.

License

LFN — Lisp Flavoured Nim
Copyright (C) 2025 George Watson

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

About

Lisp Flavoured Nim

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages