Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

2.3 KiB

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]

(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)))
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]

  (quote (cons 2 (cons 3 (cons 4 ()))))
  ;; (cons 2 (cons 3 (cons 4 nil)))
  (quote (2 . (3 . (4 . ()))))
  ;; (2 3 4)
  (list (cons 2 (cons 3 (cons 4 ()))))
  ;; ((2 3 4))
  (list (quote(2 . (3 . (4 . ())))))

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))