freenode/#lisp - IRC Chatlog
Search
10:21:23
jmercouris
is there something like WITH-PACKAGE where you can use a specific package to wrap a body?
10:22:08
jmercouris
I'm imagining a way that you could have like (with-pacakge :some-package (xyz "a")) instead of having to do (some-package:xyz "a")
10:23:10
jmercouris
could you make a macro using IN-PACKAGE? how could you detect the current package? or would you need to supply that to this theoretical macro?
10:24:38
jmercouris
fascinating so you could keep a reference to that and easily make a with-package macro
10:29:07
LdBeth
jmercouris: the funny thing is if you use a macro other than in-package the compiler would not see that
10:33:06
jmercouris
maybe one does have to use in-package, perhaps in-package does something special
10:38:58
LdBeth
If the file is directly loaded (setf package) is evaluated, if the file is loaded as compiled fasl it won’t
10:42:11
LdBeth
Although CLHS has specified this, I still think this behavior could be a source of confusion.
12:01:42
no-defun-allowed
i can't be held accountable (certainly not on #lisp) for your death either
13:46:58
ck_
trafaret1: for example, you can get a list by running (loop for sym being the external-symbols in :zsort collect sym)
13:49:39
ck_
there's also do-symbols, do-external-symbols, and do-all-symbols. Let's see if I remember the bot command
14:27:38
pjb
minion: memo for jmercouris: You need a reader macro, you cannot do it with a macro (because then you won't need what symbols were qualified). You cannot use #. because you need the input stream; when loading or compiling a file, *standard-input* is not set to the source stream!
14:31:33
pjb
minion: memo for jmercouris: https://pastebin.com/qJTUxwYc (note: !?{}[] as (dispatching) reader macros are reserved for the user, so don't use them in code published in quicklisp)..
15:17:22
Josh_2
I made a (with-..) macro that uses variables that are part of the hunchentoots package (*session* and *request*) do I need to gensym or something with this type of macro?
15:18:23
Bike
you use gensyms when you want a binding that doesn't interfere with any bindings the user might have.