freenode/#lisp - IRC Chatlog
Search
22:10:29
Xach
rename-package provides an escape hatch for dealing with potential package-name conflicts between independently created projects.
22:11:47
Xach
If you had asked "does anyone do this?" I suspect the answer is "Very few". But I do feel some comfort in there being an option.
0:11:30
AeroNotix
I just had a whacky idea of layering a description similar to what PAT uses, to both create the model and the executable CSP code
4:09:01
asarch
If I already have installed some packages with QuickLisp and SBCL, is it ok to load other packages with CLISP? I mean, both actually save the package information in $HOME/.cache/common-lisp
4:39:40
MichaelRaskin
Xach: jcowan: I think there was a talk on ELS about automating use of rename-package — it was described as a mostly sufficient escape hatch in practice.
6:35:49
mange
I'm also not sure I understand the question, but ',(wrap-1 'macro-arg) would be closer.
6:39:04
beach
mange: Your second one gives a "comma not inside backquote". If I replace the ' by `, then the result is not the same.
6:44:52
mange
I'm not sure it will be possible. You need to pass a value into #'wrap-1 that will unquote itself in the expansion. Can you change wrap-1?
6:46:50
mange
Or, alternatively, can you rely on wrap-1 to always do a simple wrapping like it currently does?
6:49:07
beach
These are condensed examples of something much more complex, so in reality wrap-1 does much more and I want to reuse it if possible.
6:50:46
MichaelRaskin
If wrap-1 is given as a function, it is undistinguishable from (defun wrap-1 (form) (list 'bar form)))
6:54:32
no-defun-allowed
i want to write an async client for cl-decentralise which will register listener functions on cl-d channels whenever a certain message is received
6:56:56
beach
I want to write a function wrap-3 so that if I type (wrap-3 'some-form) I get the same result as if I type (wrap-2 'some-form), but instead of mentioning BAR explicitly in the body of the function, I want wrap-3 to call wrap-1 to obtain the same result.
7:00:48
MichaelRaskin
Because ,(list (first '`a) (wrap-1 (second '`,macro-arg))) happens to work on SBCL
7:03:49
beach
Anyway, thanks everyone. It appears that any solution will be more complicated than just repeating the body of the wrap-1 function inside wrap-3.
7:04:32
MichaelRaskin
You can also just put a wrap-1 call there, which will give a different expansion but the same functionality
7:04:46
mange
If you're willing to have wrap-1 be (defun wrap-1 (form) ``(bar ,,form)) then I think you can do it, but it will mean that other calls need to have an extra quote.
7:05:35
MichaelRaskin
But yeah, implementation is free to treat `form as _any_ form that evaluates to the correct result
7:05:55
jackdaniel
mange: as I understand it wrap-1 may have arbitrary expansion, this is just an example
7:06:56
mange
jackdaniel: Yeah, but the approach of "add an extra layer of quasiquotes" may be able to be applied more generally.
7:09:36
MichaelRaskin
Actually, just putting unadorned (wrap-1 macro-arg) should be a viable strategy
7:19:18
beach
Not just that. I think I can do it if the expansion of wrap-3 is allowed to contain a call to wrap-1. But I do want the immediate output of wrap-3 to be the same as that of wrap-2.
7:21:44
MichaelRaskin
I think it is provably impossible without modifying wrap-1. There are multiple posible read results of `, and if you want your code to look the same as if ` was written, input-output relation of wrap-1 is not wnough
7:28:07
beach
Anyway, I have several ideas now. Thanks to everyone. Time to go do something else for a while.
8:31:28
beach
Hmm. CALL-METHOD and MAKE-METHOD are some of the most complicated macros (or rather forms that wrap some other forms in those macros) I have ever attempted to write. In case anybody wondered, that's what the exercise was about.
9:36:35
beach
j`ey: Er, no. It doesn't provide anything except code to compile any Common Lisp form.
9:38:28
beach
SICL, on the other hand has as a goal to be a fully conforming Common Lisp implementation. But it is not finished yet, so there is still some code missing.