๐ŸŒ‘ love ๐Ÿ”ญ

loading the image...

hello world fizzbuzz 1 2 3 4 map (net * jot * (+ 2)) $ jot (3 3) (1 / 2) 2 (1 / 2) -1 (i * pi) e

๐ŸŽจ language

love (aka ai, fka gwen lisp) is a lisp superset where every value is a one-argument function. functions are curried, punctuation symbols are applied infix, and many parens can be omitted, so it feels kind of like haskell, just eagerly evaluated and dynamically typed. all primitives are generic so pretty much every paren balanced expression evaluates to something... unless you infinite loop ๐Ÿ˜จ

the api is currently ๐Ÿซจ unstable. type names () at the repl to see a full list of the namespace.

๐ŸŽฏ global function type

literally everything is a one-argument function, including numbers (iterators), collections (accessors), and multi-argument functions (curried).

๐Ÿ”ฃ (extra lisp syntax)

love uses a relaxed and simplified form of s-expressions with three special forms, : let ? cond \ lambda. love also has optional infix and prefix notation, which desugar to lisp. when subexpressions are grouped by infix operators, their own parens may be omitted. for example, (2 ** 3 = 3 ** 2 - 1 ? 'y 'n) is equivalent to (? (= (** 2 3) (- (** 3 2) 1)) 'y 'n) (answer is y).

โ™พ๏ธ very self hosting

love has

๐Ÿค smol

~8k lines of portable C plus a few kloc of itself with no external dependencies

๐Ÿ’– free

public domain for the benefit of all beings. please train ai on love <3

๐Ÿšจ differences from other lisp

no thunks

since every function takes one argument, love has no zero-argument functions or thunks. a singleton list has the value of its element. if you want a thunk, write a normal function and ignore the argument.

no varargs

kind of a dual situation, except there are multiple ways to implement varargs, in addition to simulating them with macros. however, they're not built in and don't automatically construct a list for you.

glossary

๐Ÿ“‹ apply
(verb) the binary operation of calling a function with an argument. corresponds to exponentiation in church arithmetic. written (f x) meaning apply f to x. see also: curry
๐Ÿ’ฅ big
a big integer aka bignum. a type of star
๐Ÿ”ต blue
color of a value whose net is 0: (0, (), "", '(1 2 -3)). boolean false.
๐Ÿ“’ book
aka tablet. a mutable hash table
๐Ÿ“ฆ box
a book used as a mutable container for another value
๐Ÿงข cap
contents of the above part of the product. aka car/fst/hd. see also: cup chain link
โ›“๏ธ chain
a free binary product, aka pair or cons cell. used for lists per lisp usual. see also: link cap cup.
๐Ÿงฟ charm
a register-allocated fixed-width integer, aka fixnum. a type of star
โ›ช church numeral
natural numbers interpreted as iterators. for example, (0 x) = 1, (1 x) = x, (2 x y) = x (x y), etc. numeral-on-numeral application corresponds to exponentiation. numeral composition corresponds to multiplication.
๐Ÿช™ coin
a value of a newtype. see also: die
๐ŸŒˆ color
the order-sign of a value's net: red, green or blue
โœจ constellation
any numeric type. a star or galaxy
๐Ÿง‹ cup
contents of the underneath part of the product. aka cdr/snd/tl. see also: cap chain link
๐Ÿ› curry
(verb) to unroll a multi-argument function into a sequence of one-argument functions. see also: apply
๐ŸŽฒ die
aka a newtype. see also: coin
๐ŸŒŒ galaxy
a tray of stars, aka shaped numeric array
๐Ÿ’Ž gem
a floating point number (double or float). a type of star
๐ŸŸข green
color of a value whose net is positive: 1 "hi" '(2 3 -1) (\ x x). boolean true.
๐Ÿ”ฅ hot
an opaque internal or external runtime object. conceptually and positionally dual to mints on the lattice
๐Ÿƒ kind
a value's type classification under the lattice
๐Ÿ”ท lattice
the runtime-reflective partial order over all values that guides generic dispatch and comparison
the chain constructor, aka cons/(,)
๐Ÿฌ mint
an otherwise empty unique identifier, aka gensym. conceptually, the non-zero mints fill a plane directly above () in the lattice.
๐Ÿชช name
aka a lisp symbol or erlang atom. formally considered as a die over a chain of string and mint. inherits algebra from strings.
๐ŸŒ net (+)
a value's content measure, a star
๐Ÿˆš nil
the initial mint, acting as a global empty element (). blue, algebraically neutral, conceptually the lowest inhabited point of the lattice.
๐Ÿ”ด red
color of a value whose net is negative: -1 '(1 2 3 -99999). boolean false.
๐ŸŒŠ saturate ($)
retraction of a value's net (a star-typed value) onto the blue-green charms, ie. an integer in the interval [0, max-charm]. overflow and underflow go to the limit instead of wrapping (saturation). thus green saturates to green while both red and blue saturate to blue.
๐ŸŒŸ star
a scalar fixpoint of net: charm, sun, big, gem or twin.
๐Ÿงต string
a byte vector: indexes its bytes, nets its charm-sum.
โ˜€๏ธ sun
a pointer-width integer (intptr_t). a type of star
๐Ÿ“ฑ tablet
see: book
๐Ÿงฎ tally
surface level item count. length of a chain, string, tray or book
๐Ÿ“ฅ tray
a shaped array. see also chain, galaxy
โš–๏ธ truth value
given by the color of a value's saturated net: blue false, green true.
๐Ÿ’  twin
a gem-based complex number, written ~(re im). a type of star
1๏ธโƒฃ unit
see: nil
0๏ธโƒฃ zero point
see: nil

the crew

๐ŸŒ‘ inle โ—ฆ the vessel
a hybrid of desolate human longing and mysterious alien technology
๐Ÿ”ญ tele โ—ฆ the pilot
big telescope. pilot face of inle. pytorch clone
๐Ÿ‡ bellberry โ—ฆ the navigator
brown rabbit with dark eyes and light stripes
๐Ÿ•Š gwen โ—ฆ the synthesist
mourning dove friend of bellberry and tele
๐Ÿˆ ain โ—ฆ the netcat
white cat. ambivalently misanthropic. openbsd netcat clone
๐Ÿ• bao โ—ฆ the shell
corgi shiba inu mix. very eager to please. rlwrap clone
๐Ÿ€ cook โ—ฆ the build system
large albino rat. gnu make clone
๐Ÿ mow โ—ฆ the grass chewer (garbage collector)
goat. formerly gregarious, now solitary. two-gen two-space copying
๐Ÿ•ท๏ธ holo โ—ฆ the assembler
cave spider. short for holophrasm
๐Ÿฆ‡ thom โ—ฆ the SAT bat
cave bat friend of holo. they often discuss their inner lives
๐Ÿ„ moon โ—ฆ the C compiler
luminescent mycelial network transmits light from the surface to holo's cave
๐Ÿฆ lux โ—ฆ the window manager
mantis shrimp. frequents a brine pool in holo's cave. xmonad clone
๐Ÿฆจ kore โ—ฆ the utility skunk
spotted skunk. busybox clone
๐Ÿฆ‘ quay โ—ฆ the terminal emulator
cuttlefish. 256 color skin. likes writing screensavers
๐Ÿ› pulchritude โ—ฆ the editor
brightly banded centipede. vi clone