libera/#commonlisp - IRC Chatlog
Search
22:48:30
jcowan
moon-child: No. The main difference is that you fold using a plain function and you reduce using a monoid.
22:49:48
jcowan
In a monoid, you always statically know the start value, instead of it being passed to the fold: thus the normal + monoid returns 0 if applied to zero arguments. Third, fold can be done in parallel because a monoid is guaranteed to be associative.
1:20:03
pjb
phoe: (mapcar (let ((s 0)) (lambda (i) (incf s i))) (iota 10)) #| --> (0 1 3 6 10 15 21 28 36 45) |#
1:26:29
moon-child
(actually, I would have expected the former to perform better, but sbcl seems to generate the same code for both)
1:32:14
pjb
If you look at the code of the minimal-compiler, (or just compiler), it would be obvious why the same is generated.
5:16:58
kami_
I'm trying to 'translate' this code: https://github.com/metacall/core/blob/develop/source/tests/metacall_node_test/source/metacall_node_test.cpp#L78
5:19:52
kami_
I'm creating a server where people have the option to provide their own functions as hooks into the standard processing of some resources
5:33:53
moon-child
kami_: I expect you need to define the allocator_std_type structure before you can use it
5:35:47
kami_
moon-child: thanks. I'm bad at communicating things properly. The headers were grovelled with c2ffi, I'll paste the definition
6:43:29
beach
By popular demand, I have been working on creating an index of SICL-related documents. This is what I have so far: http://metamodular.com/SICL and I continue working on it, adding one or two new items per day until it is done.