All Projects → SquidDev → Urn

SquidDev / Urn

Licence: bsd-3-clause
Yet another Lisp variant which compiles to Lua

Programming Languages

lua
6591 projects
language
365 projects
lisp
113 projects

Labels

Projects that are alternatives of or similar to Urn

Pyverilog
Python-based Hardware Design Processing Toolkit for Verilog HDL
Stars: ✭ 267 (-12.46%)
Mutual labels:  compiler
C Compiler
C--compiler which implements LL(1)\LR(0)\SLR\LR(1) and semantic analysis and MIPS generate
Stars: ✭ 286 (-6.23%)
Mutual labels:  compiler
Sucrase
Super-fast alternative to Babel for when you can target modern JS runtimes
Stars: ✭ 4,436 (+1354.43%)
Mutual labels:  compiler
Mosml
Moscow ML is a light-weight implementation of Standard ML (SML), a strict functional language widely used in teaching and research.
Stars: ✭ 271 (-11.15%)
Mutual labels:  compiler
Write You A Haskell
Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)
Stars: ✭ 3,064 (+904.59%)
Mutual labels:  compiler
Finn
Dataflow compiler for QNN inference on FPGAs
Stars: ✭ 284 (-6.89%)
Mutual labels:  compiler
Seq
A high-performance, Pythonic language for bioinformatics
Stars: ✭ 263 (-13.77%)
Mutual labels:  compiler
Exprtk
C++ Mathematical Expression Parsing And Evaluation Library
Stars: ✭ 301 (-1.31%)
Mutual labels:  compiler
Rascal
The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
Stars: ✭ 284 (-6.89%)
Mutual labels:  compiler
Ante
The compile-time language
Stars: ✭ 295 (-3.28%)
Mutual labels:  compiler
Vult
Vult is a transcompiler well suited to write high-performance DSP code
Stars: ✭ 272 (-10.82%)
Mutual labels:  compiler
Clangwarnings.com
A list of Clang warnings and their descriptions.
Stars: ✭ 276 (-9.51%)
Mutual labels:  compiler
Datafun
Research on integrating datalog & lambda calculus via monotonicity types
Stars: ✭ 287 (-5.9%)
Mutual labels:  compiler
Yabfc
Yet Another Brainfuck Compiler; No dependencies and from the ground up
Stars: ✭ 269 (-11.8%)
Mutual labels:  compiler
Py Backwards
Python to python compiler that allows you to use Python 3.6 features in older versions.
Stars: ✭ 299 (-1.97%)
Mutual labels:  compiler
Clang
Mirror kept for legacy. Moved to https://github.com/llvm/llvm-project
Stars: ✭ 2,880 (+844.26%)
Mutual labels:  compiler
Shecc
A self-hosting and educational C compiler
Stars: ✭ 286 (-6.23%)
Mutual labels:  compiler
Enso Archive
Looking for Enso, the visual programming language? ➡️ https://github.com/enso-org/enso
Stars: ✭ 305 (+0%)
Mutual labels:  compiler
Speedy.js
Accelerate JavaScript Applications by Compiling to WebAssembly
Stars: ✭ 300 (-1.64%)
Mutual labels:  compiler
Lbforth
Self-hosting metacompiled Forth, bootstrapping from a few lines of C; targets Linux, Windows, ARM, RISC-V, 68000, PDP-11, asm.js.
Stars: ✭ 293 (-3.93%)
Mutual labels:  compiler

Urn Travis Build Status Build status

Urn is a new language developed by SquidDev, and demhydraz. Urn is a Lisp dialect with a focus on minimalism which compiles to Lua.

What?

  • A minimal¹ Lisp implementation, with full support for compile time code execution and macros.
  • Support for Lua 5.1, 5.2 and 5.3. Should also work with LuaJIT.
  • Lisp-1 scoping rules (functions and data share the same namespace).
  • Influenced by a whole range of Lisp implementations, including Common Lisp and Clojure.
  • Produces standalone, optimised Lua files: no dependencies on a standard library.

¹: Minimalism is an implementation detail.

Features

Pattern matching

> (case '("x" (foo 2 3))
.   [(string?  @ ?x) (.. "Got a string " x)]
.   [("x" (foo . ?x)) (.. "Got some remaining values " (pretty x))])
out = "Got some remaining values (2 3)"

Various looping constructs

> (loop [(o '())
.        (l '(1 2 3))]
.   [(empty? l) o]
.   (recur (cons (car l) o) (cdr l)))
out = (3 2 1)

Powerful assertion and testing framework

> (import test ())
out = nil
> (affirm (eq? '("foo" "bar" "")
.              (string/split "foo-bar" "-")))
[ERROR] <stdin>:1 (compile#111{split,temp}:46): Assertion failed
(eq? (quote ("foo" "bar" "")) (string/split "foo-bar" "-"))
     |                        |
     |                        ("foo" "bar")
     ("foo" "bar" "")

First-class support for Lua tables

> { :foo 1
.   :bar 2 }
out = {"bar" 2 "foo" 1}

Friendly error messages

> (]
[ERROR] Expected ')', got ']'
  => <stdin>:[1:2 .. 1:2] ("]")
 1 │ (]
   │ ^... block opened with '('
 1 │ (]
   │  ^ ']' used here
> 

Getting started

We have a getting started guide to help you get set up. Or you can clone the repo and jump right in!

The website also contains documentation for all functions and macros, should you need to check how something works.

If you have any questions, would like to contribute or just feel like chatting, do join us in the #urn channel on FreeNode.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].