freenode/#lisp - IRC Chatlog
Search
6:39:16
pjb
(defun combinations (list n) (cond ((zerop n) '()) ((= 1 n) (mapcar (function list) list)) (t (mapcan (lambda (rest) (mapcan (lambda (first) (list (cons first rest))) list)) (combinations list (1- n)))))) (combinations '(a b c) 3) #| --> ((a a a) (b a a) (c a a) (a b a) (b b a) (c b a) (a c a) (b c a) (c c a) (a a b) (b a b) (c a b) (a b b) (b b b) (c b b) (a c b) (b c b) (c c b) (a a c) (b a c) (c a c) (a b c) (b b c) (c b c) (a
17:23:53
samlamamma
You know, Lisp is really the ultimate CRUD-application builder. Just provide the definition of your data and Lisp can generate all the code to transfer it between your app, the database, the protobuf layer, what have you.
18:06:29
beach
ACTION learned a new acronym today: https://en.wikipedia.org/wiki/Create,_read,_update_and_delete
18:13:28
beach
Databases seem to imply copying, and copying is contrary to the semantics of Common Lisp, so I am trying to figure out ways of managing data without copying it.
18:21:03
shka_
beach: yeah, you see this is stuff used to build every single webapp, and since it is used to build every single webapp efforts has been made to make it painless even though it still sucks
18:23:49
shka_
at this point potential for the change is minimal, everybody wants to have database in a separate docker etc.
18:29:08
asarch
And when you write your own implementation, how do you know if it is 100% compatible with the standard?
18:29:40
jackdaniel
asarch: there are ansi-tests written by pfdietz, they are very useful when looking for non-conformities