source/projects/lilith
2021-08-21 17:20:13 -06:00
..
src Convert lilith to a runnable 2021-08-21 17:20:13 -06:00
test/python Get arrays and mappings working 2021-08-21 17:14:57 -06:00
BUILD Convert lilith to a runnable 2021-08-21 17:20:13 -06:00
README.md Initial deeply busted Lilith state for LangJam 2021-08-20 23:16:59 -06:00
setup.py Initial deeply busted Lilith state for LangJam 2021-08-20 23:16:59 -06:00

Lilith

The theme of the jam is "first-class comments".

// foo bar baz
; text that the parser throws away

(def <name> <value>)
(def ^{:doc "foo bar baz"} <name> <value>)
"""modules have __doc__ as a property defined by the FIRST heredoc-string in the file"""

def foo(a, b):
    """Adds a and b.

    >>> foo(1, 2)
    3
    """

    return a + b

(defn foo [a b]
    "Adds a and b

    >>> (foo 1 2)
    => 3
    "
    (+ a b))
  • Object code
  • .... Other media?
(defn foo [a b]
    (!doc "")
    (!doctest "")
    (!test "")

    (!impl
       (+ a b)))
(defn foo [a b]
    "---
    doc: |
       Adds a and b

    ---
    doctest:
      - in: (foo 1 2)
        out: 3
    "
    )
#+TITLE: foo
* my bullet
  #+BEGIN_SRC clojure
    (defn foo [a b] (+ a b))
  #+END_SRC

org-babel org-babel-tagle

(defn foo [] ..)

####################################################################################################