freenode/#lisp - IRC Chatlog
Search
21:23:14
earl-ducaine
The paragraph I was remembering was in cltl, related to parse-macro, a suggested function that didn't make it into the standard. https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node102.html
21:23:40
earl-ducaine
In particular: However, parse-macro is worth having anyway, since any program-analyzing program is going to need to define it, and the implementation isn't completely trivial even with destructuring-bind to build upon.
21:25:31
aeth
earl-ducaine: It looks like the function phoe wrote *is* parse-macro, but without the environment stuff?
21:27:11
aeth
I'm surprised there isn't one for lambda, like the one I wrote. Happens all the time in mapcar.
21:36:42
Bike
parse-macro is more complicated because it handles &whole differently from destructuring-bind
21:58:48
Duns_Scrotus
why does funcall look in the function namespace but apply looks in the value namespace
23:40:24
Xach
Shinmera: http://report.quicklisp.org/2018-08-29/failure-report/staple.html#staple-server has my log
2:41:21
lyf[kde]
Using CSP, I can wrap the continuations, to implement event loops and to optimize tail calls, but CSP is handly only when it comes to tail calls.
3:26:42
lyf[kde]
Here is one creative implementation: https://github.com/mystor/breaktarget/blob/master/src/lib.rs This library (in Rust) uses panic unwinding to its advantage.
3:32:17
no-defun-allowed
panic! is pretty much "all shit went south" so it seems like a bad idea to reuse that for normal program flow
3:39:28
lyf[kde]
Stack as in BFS, DFS... In DFS you have a todo queue. In BFS you have a todo stack. You can also implement DFS as a recursive function without the todo collection.
3:40:27
Bike
you can use an explicit stack in a limited context to do something like continuations, s ure
3:41:34
ealfonso
is there a built-in "which" in CL/sbcl to find the absolute path to an executable given its name? I tried looking at SB-EXT:RUN-PROGRAM's implementation which accepts a :search flag: https://github.com/sbcl/sbcl/blob/e98378ca004ef6d101b384f6c3130f24b7a1bc1f/src/code/run-program.lisp but can't figure it out
3:56:46
mange
lyf[kde]: If you're trying to implement call/cc in another language you could try something like http://www.schemeworkshop.org/2007/procPaper4.pdf, but it's pretty hard to do manually.
5:55:31
aeth
stylewarning: It depends. If it's something like shortening names to make them easier to type, that usually makes things worse, just get some form of autocomplete. But if it's removing a variable, that often makes the code clearer imo.
6:01:53
aeth
stylewarning: mapcar itself is sort of an example of this. It's basically just maplist where you're calling car on every variable.
6:02:05
aeth
a one variable version could be implemented as trivially as: (defun mapcar* (function list &rest more-lists) (declare (ignore more-lists)) (maplist (lambda (x) (funcall function (car x))) list))
6:59:30
slyrus1
Shinmera: it's probably not relevant given iclendar, but did have you seen my https://github.com/slyrus/soiree/blob/master/icalendar.lisp
8:08:36
Shinmera
iclendar can't parse things as it is, only produce them, but I would certainly welcome a parser addition to it.
8:14:09
slyrus1
It would be great if all of these were combined into one library/suite that could read and write icalendar/vcard and talk to caldav/carddav servers.
8:17:43
slyrus1
soiree does parsing but not serializing, iclendar looks like it does serialzing but not parsing...