* TODO =assert_equal_type= macro in testing * DONE use an enum for builtin identifiers CLOSED: [2018-10-11 Do 17:15] * TODO dont create new nils or builtins, but store one of each globally * TODO source code locations for errors * Build-in forms ** DONE + CLOSED: [2018-09-18 Di 12:14] ** DONE - CLOSED: [2018-09-18 Di 12:14] ** DONE * CLOSED: [2018-09-18 Di 12:14] ** DONE / CLOSED: [2018-09-18 Di 12:14] ** TODO > ** TODO < ** TODO = ** DONE if CLOSED: [2018-09-18 Di 12:14] ** DONE and (short circuiting) CLOSED: [2018-10-05 Fr 22:21] ** DONE or CLOSED: [2018-10-05 Fr 22:21] ** DONE not CLOSED: [2018-10-05 Fr 22:21] #+begin_src emacs-lisp (not 1) ;; == (not . (1 . nil)) (not (expression 1 3)) ;; == (not . ((expression . (1 . (3 . nil))) . nil)) (not) ;; == (not . nil) (not 1 2) ;; == (not . (1 . (2 . nil))) #+end_src #+RESULTS: : t ** DONE first (car) CLOSED: [2018-10-08 Mo 20:28] ** DONE rest (cdr) CLOSED: [2018-10-08 Mo 20:28] ** DONE pair (cons) CLOSED: [2018-10-08 Mo 20:28] ** TODO load (import) ** DONE define CLOSED: [2018-10-08 Mo 20:28] ** TODO lambda ** TODO progn ** DONE eval CLOSED: [2018-10-08 Mo 20:28] (setq condition (quote (= a 10))) (setq a 10) (eval condition) (setq a 11) (eval condition) ** DONE quote CLOSED: [2018-10-08 Mo 20:28] ** DONE list CLOSED: [2018-10-08 Mo 21:06] #+begin_src emacs-lisp (quote (cons 2 (cons 3 (cons 4 ())))) ;; (cons 2 (cons 3 (cons 4 nil))) (quote (2 . (3 . (4 . ())))) ;; (2 3 4) #+end_src #+begin_src emacs-lisp (list (cons 2 (cons 3 (cons 4 ())))) ;; ((2 3 4)) (list (quote(2 . (3 . (4 . ()))))) #+end_src ** DONE print CLOSED: [2018-10-08 Mo 20:28] ** DONE read CLOSED: [2018-10-08 Mo 20:28] ** DONE type CLOSED: [2018-10-08 Mo 21:30] ** TODO info * Types - Symbol - Number - String - pair (cons-cell) - lambda function lambda - built-in function * Arbeitsweise 1) Parse to AST 2) Start with namespace only containing the built-ins 3) every AST node has its own namespace, inherting the one from its parent (pointer / references) because when a function sets a variable within an upper namespace it should infact change the environment even if the function exited (progn (setq x 4)(* x 2))