Search
Tuesday, 17th of May 2022, 4:47:20 UTC
13:47:59
Josh_2
Good morning :sunglasses:
13:52:21
jackdaniel
mfiano: perhaps https://github.com/sharplispers/scheduler ?
13:53:49
jackdaniel
you still may run it as a separate process, but it's CL! ,)
13:56:03
mfiano
jackdaniel: Thanks for the suggestion, but I think I'll stick with bsd cron as it hooks into the mail and logging system automatically.
15:50:17
trev
would someone mind explaining how this works in plain english? https://github.com/google/lisp-koans/blob/master/koans-solved/mapcar-and-reduce.lisp#L58
15:50:38
trev
(highlighted function 'transpose)
15:54:46
Josh_2
(apply #'mapcar #'list '((a b c) (d e f))) -> (mapcar (lambda (x y) (list x y)) '(a b c) (d e f)). Something like that
15:57:07
Josh_2
(apply #'mapcar #'list '((a b c) (d e f)(g h i))) -> (mapcar (lambda (x y z) (list z y z)) '(a b c) '(d e f) '(g h i))
15:57:11
Josh_2
idk if that helps clear it up
15:58:21
Josh_2
#'apply is kewl :sunglasses:
15:58:56
easye`
ACTION waves to contrapunctus
15:59:24
easye`
CL:APPLY saved my bacon today in converting a macro to a function.
16:00:11
easye`
<https://github.com/armedbear/abcl/pull/490/files#diff-ccaa655ebf1432951ff70b34dcd6e82428cba2c5035e8077c7b183a6551bba3dR98>
16:03:28
trev
Josh_2 this probably does help, but i will need to stare at it for a while
16:03:53
Josh_2
Well if you play with #'apply you will understand that little snippet
16:14:40
Bike
trev: say you have lists = ((1 2) (3 4)). then (apply #'mapcar #'list lists) = (mapcar #'list '(1 2) '(3 4))
16:17:18
trev
dammit i'm dumb. i get it now. thanks Josh_2 and Bike
16:24:56
mfiano
trev: It does a matrix transposition. It converts rows to columns and columns to rows.
16:26:13
trev
mfiano i knew that part :D
16:27:18
trev
i wasn't realizing that mapcar takes &rest
16:28:09
mfiano
Yes, now try playing with it using lists of different lengths and see if you can understand what is happening.
16:29:19
trev
i ended up reading the docs after asking (wrong of me) and that also helped me create a mental image of how the iteration goes
Tuesday, 17th of May 2022, 16:47:20 UTC