Lain is a LISP dialect used as a templating and scripting engine.

The Lain parser used to exist at the core of oscean before the migrationg to a fully static website, but it can still be found in various projects of the Nataniev ecosystem, such as in the ronin and paradise applications. The parser takes a Lain Library.

Templating With Lain

(link "home")                             {(link "home")}
(link "home" "local")                     {(link "home" "local")}
(link "")              {(link "")}
(link "" "external")   {(link "" "external")}
(bold "bold")                             {(bold "bold")}
(ital "italic")                           {(ital "italic")}
(bold (link "home" "bold link"))          {(bold (link "home" "bold link"))}

Programming With Lain

(add (sub 5 3) 2)                         ; Basic Math
(λ (a b c) (concat a b c))                ; Lambda
(def obj:foo "bar")                       ; Creating object
(obj:foo)                                 ; Reading object parameters
(def _sidebar (dom:create "sidebar"))     ; Creating DOM elements

Last update on 19Q06, edited 5 times. +22/29fh