libera/#commonlisp - IRC Chatlog
Search
16:00:39
beach
lisp123: Your SPECIAL declaration is not "attached to" the lambda-list variable G, because for that to be the case, it has to be first in the DEFUN body.
16:00:44
pjb
lisp123: if you declare it special: (defun compose (f g) (declare (special g)) #'(lambda (x) (declare (special g)) (funcall f (funcall g x)))) then the lambda will perhaps refer to the same dynamic variable that is now the parameter of compose, but since it's not called WHEN compose is evaluated, it won't be!
16:01:30
beach
lisp123: So it is a "free declaration", and it affects only references, as the Common Lisp HyperSpec page says. Not any binding like the lambda-list variable is.
16:01:35
pjb
lisp123: on the other hand, if you call the anonymous function returned by compose WHEN there is a dynamic variable named g defined that moment (= temporal scope), then then it will be able to call it.
16:01:52
pjb
lisp123: but since in general, random dynamic variables are unbound, you get this error.
16:05:15
pjb
lisp123: you should read more Asimov! eg. "Gimmick Three" https://en.wikipedia.org/wiki/Gimmicks_Three
16:05:54
pjb
lisp123: you cannot emprison the devil in a thick eternal bronze cube. Because he can travel back in time, before the cube existed, and escape!
16:06:14
lisp123
beach & pjb: thanks, it doesn't make too much sense, but if I read it enough times hopefully it will
16:07:01
pjb
lisp123: in the case of this compose function, if you want g to be special, then you don't need it as a parameter to compose.
16:07:52
lisp123
pjb: I was trying to break this "closures can only exist over lexical variables." by making it special
16:12:20
pjb
If you call h in a loop, you can even change the *trace-composed-functions* binding in another thread (or in the body of the loop) >:-}~
16:20:48
Nilby
lisp123: I was first exposed to lisp around the age of 10, and I am very old. I only stopped using other languages about 16 years ago.
16:23:07
Nilby
lisp123: My dad thought it would stop me from getting in trouble to put me in front of a teletype at MIT. He was very wrong.
16:33:31
Nilby
lisp123: In my case it didn't matter since I was born with a severe allergy to academia. It mearly gave me a warped and mostly incorrect ideas about robots, programming languauges, and the future.
16:40:23
etimmons
borodust: I noticed that in CLAW repos you like to include the foreign lib's repo as a submodule. Have you messed around at all with having ASDF build the foreign lib for you?
16:42:25
borodust
etimmons: i do link foreign lib repos in wrapper projects and primary reason is to have specific version of headers
16:43:44
borodust
etimmons: it's hard to get things goind in native way across different platorms (different knobs needed to be triggered to build properly), implementing that in asdf feels like being a total nightmare
16:46:22
etimmons
borodust: That's fair! Kind of just wondering how you ensure the header version matches the lib version if you use the system's lib
16:47:34
borodust
etimmons: btw, also when putting bindings into a quicklisp dist i strip everything foreign - no headers, no c/c++ code, no foreign project as a whole
16:48:18
borodust
meaning user won't be able to build foreign library at all by using system from a dist at all
3:55:39
beach
We are making great progress with SICL code generation, so I am quite pleased with that. I can see the light at the end of the tunnel.
3:56:45
Michal
Well that is great :) I read about it from time to time, so looking forward to seeing it. Well let me make it on-topic :)
3:57:06
Michal
I was curious on if there was a way to search for existing functions loaded in my image by their name or docstring