random-jellyfish has quit [Ping timeout: 246 seconds]
holycow has quit [Quit: Lost terminal]
random-nick has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
ryanbw has quit [Ping timeout: 260 seconds]
brokkoli_origin has quit [Remote host closed the connection]
brokkoli_origin has joined #commonlisp
mesuutt has quit [Ping timeout: 252 seconds]
X-Scale has quit [Quit: Client closed]
dom2 has joined #commonlisp
X-Scale has joined #commonlisp
waleee has quit [Ping timeout: 264 seconds]
X-Scale has quit [Quit: Client closed]
<qhong>
Any idea how to load specific version of a system with ultralisp? E.g. I want sharplispers/lparallel, but (ql:quickload "lparallel") loads lmj/lparallel
ronald_ has joined #commonlisp
ronald has quit [Read error: Connection reset by peer]
mesuutt has joined #commonlisp
X-Scale has joined #commonlisp
josrr has quit [Remote host closed the connection]
gty has joined #commonlisp
gty has quit [Remote host closed the connection]
mesuutt has quit [Ping timeout: 260 seconds]
pfdietz has joined #commonlisp
mzan has joined #commonlisp
deadmarshal_ has quit [Quit: IRCNow and Forever!]
deadmarshal_ has joined #commonlisp
mesuutt has joined #commonlisp
mesuutt has quit [Ping timeout: 260 seconds]
ronald_ has quit [Ping timeout: 260 seconds]
poplin has quit [Ping timeout: 256 seconds]
poplin has joined #commonlisp
ronald has joined #commonlisp
nij- has joined #commonlisp
mesuutt has joined #commonlisp
<nij->
What are some practical use case of compiler macros? From the spec, they seem to be "macros" which may or may not be expanding the form. It seems ambiguous, and may cause troubles while debugging.
<beach>
Yes, debugging might be more complicated. The main use for compiler macros, I think, is to avoid the parsing overhead of keyword arguments when possible.
<nij->
How does it help that..?
<beach>
I think there are some good examples in Constrictor. Let me see...
<paulapatience>
You can also optimize based on the value of the arguments
<paulapatience>
You can force-inline functions for those implementations which ignore the inline declaration
istewart has quit [Quit: Konversation terminated!]
mesuutt has quit [Ping timeout: 255 seconds]
<paulapatience>
On the number of arguments too
<nij->
Why don't use normal macros, which are guaranteed to transform your lisp forms?
<paulapatience>
On the types of arguments if you have access to them, e.g., through Trucler
<beach>
nij-: A name can not be associated both with a function and a macro.
<paulapatience>
Because you can still pass the functions as arguments by sharp quoting them
<beach>
nij-: Check out the compiler macro on MAPC in Constrictor.
<beach>
nij-: It takes advantage of the situation where the number of lists given is 1 or 2.
<beach>
nij-: In the general case, when the number of list arguments is not known, there must be a loop over the contents of each list, as you can also see in the MAPC function.
<nij->
Right. I will check it tomorrow (it's getting late here).
<beach>
nij-: And that loop involves consing as well.
<younder>
The more interesting case is cl-ppcre. The compiler macro checks if the regexp string is constant and if so generates code for parsing THAT string at compile time. If it is not it needs to be done at runtime.
<nij->
younder constant? Aren't all strings constant?
<beach>
nij-: What younder means is if the argument is a literal string.
<younder>
NO the format string can be a variable.
<younder>
well format ARGUMENT
<beach>
nij-: And strings are not "constant" in any other respect. You can modify the contents of a string unless it is a literal string.
<ixelp>
cl-ppcre/api.lisp at 714ee6c550b2cf7d6345bf806c9c6fb00c622b1f · edicl/cl-ppcre · GitHub
<nij->
beach Right.
<nij->
beach I also see why it's useful for mapc. Thanks!
<beach>
Sure.
<beach>
I thought I would mention Constrictor to remind people of its existence.
<beach>
Am I right that SBCL does not expand compiler macros when the DEBUG quality is 3?
<aeth>
define-compiler-macro is sort of like a fancy, mostly-manual inlining, where if it doesn't work, there's a function to fall back to
<aeth>
possibly using keywords, constant strings, or perhaps even constant type specifiers (symbols-or-lists-of-symbols)
<aeth>
you'll still have the (slow) function to fall back to if the compiler macro doesn't work
domovod has joined #commonlisp
<beach>
I think you need to explain what "doesn't work" means in this context.
<aeth>
afaik, even something as simple as (let ((s "foo")) (your-compiler-macro-or-function s)) would pessimize a compiler macro that attempts to optimizes on a constant string? but the fallback path should produce identical results as the compiler macro path, just at runtime instead of compilation time
<aeth>
you can also have an incorrect compiler macro, a different kind of doesn't work
<aeth>
that is not what I meant
wacki has joined #commonlisp
<beach>
Here is a better description I think: A compiler macro is able to examine a function form to determine whether the particular form makes it possible to do some compile-time calculation and/or to substitute some form that is less costly to evaluate at run time.
<beach>
When the code of the compiler macro determines that no particular optimization is possible, it can decline, so that the original function form is used.
nij- has quit [Ping timeout: 268 seconds]
nij- has joined #commonlisp
<nij->
Note taken :) Thanks!
<beach>
... where "function form" is defined in section 3.1.2.1.2.3.
synchromesh has quit [Read error: Connection reset by peer]
ronald has quit [Read error: Connection reset by peer]
holycow has joined #commonlisp
pve has joined #commonlisp
zetef has joined #commonlisp
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mm007emko has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
mm007emko has joined #commonlisp
X-Scale has quit [Quit: Client closed]
Pixel_Outlaw has quit [Quit: Leaving]
domovod has quit [Ping timeout: 252 seconds]
robin_ has joined #commonlisp
robin has quit [Ping timeout: 268 seconds]
admich1 has quit [Ping timeout: 272 seconds]
mesuutt has joined #commonlisp
admich1 has joined #commonlisp
mesuutt has quit [Ping timeout: 272 seconds]
iNomad has quit [Ping timeout: 256 seconds]
iNomad has joined #commonlisp
rgherdt has joined #commonlisp
amb007 has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
danza has quit [Ping timeout: 260 seconds]
poplin has quit [Read error: Connection reset by peer]
davep has joined #commonlisp
zetef has quit [Ping timeout: 255 seconds]
poplin has joined #commonlisp
shka has joined #commonlisp
jamesmartinez has quit [Quit: Connection closed for inactivity]
poplin has quit [Read error: Connection reset by peer]
poplin has joined #commonlisp
pok has quit [Ping timeout: 256 seconds]
zetef has joined #commonlisp
mesuutt has joined #commonlisp
poplin has quit [Ping timeout: 256 seconds]
poplin has joined #commonlisp
mesuutt has quit [Ping timeout: 256 seconds]
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
King_julian has joined #commonlisp
dino_tutter has joined #commonlisp
<Shinmera>
beach: fwiw rather than keyword processing, the most common use for compiler macros is some form of load-time-value shenanigan to constant-fold a subform
<Shinmera>
eg cl-ppcre compiles the regexes ahead of time that way
<beach>
Yes, I see.
<Shinmera>
In that way they can be more useful than inlining, because they can fold things the compiler could not know to fold on its own
Demosthenex has quit [Ping timeout: 255 seconds]
<Shinmera>
I suppose if we had a system for the compiler to know about argument purity and side-effects, it could figure out more stuff to constant-fold on its own, but alas.
<beach>
Indeed. I seem to remember someone saying that that's why SBCL has a different mechanism for stuff like that. I forget the name.
danse-nr3 has joined #commonlisp
poplin has quit [Ping timeout: 252 seconds]
danse-nr3 has quit [Remote host closed the connection]
danse-nr3 has joined #commonlisp
alcor has joined #commonlisp
mesuutt has joined #commonlisp
King_julian has quit [Quit: leaving]
zetef has quit [Ping timeout: 256 seconds]
deadmarshal_ has quit [Quit: IRCNow and Forever!]
mgl_ has joined #commonlisp
Demosthenex has joined #commonlisp
zetef has joined #commonlisp
deadmarshal_ has joined #commonlisp
domovod has joined #commonlisp
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
deadmarshal_ has quit [Quit: IRCNow and Forever!]
davep has quit [Quit: Connection closed for inactivity]
random-jellyfish has joined #commonlisp
random-jellyfish has quit [Changing host]
random-jellyfish has joined #commonlisp
deadmarshal_ has joined #commonlisp
mesuutt has quit [Ping timeout: 252 seconds]
makomo has quit [Ping timeout: 256 seconds]
random-jellyfish has quit [Ping timeout: 255 seconds]
makomo has joined #commonlisp
X-Scale has joined #commonlisp
mesuutt has joined #commonlisp
random-jellyfish has joined #commonlisp
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
admich1 has quit [Ping timeout: 246 seconds]
zetef has quit [Ping timeout: 252 seconds]
admich1 has joined #commonlisp
random-nick has joined #commonlisp
thuna` has quit [Remote host closed the connection]
zetef has joined #commonlisp
danse-nr3 has quit [Remote host closed the connection]
X-Scale has quit [Ping timeout: 250 seconds]
<scymtym>
another possible use of compiler macros that is rarely mentioned is compile-time error checking. i guess cl-ppcre does that as well
jonatack has quit [Ping timeout: 256 seconds]
jonatack has joined #commonlisp
mm007emko has quit [Read error: Connection reset by peer]
danse-nr3 has joined #commonlisp
mm007emko has joined #commonlisp
danse-nr3 has quit [Ping timeout: 240 seconds]
Lord_of_Life has quit [Ping timeout: 260 seconds]
danse-nr3 has joined #commonlisp
Lord_of_Life has joined #commonlisp
zetef has quit [Remote host closed the connection]
zetef has joined #commonlisp
poplin has joined #commonlisp
poplin has quit [Read error: Connection reset by peer]
poplin has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
X-Scale has joined #commonlisp
danse-nr3 has quit [Remote host closed the connection]
poplin has quit [Read error: Connection reset by peer]
poplin has joined #commonlisp
adlai has quit [Ping timeout: 256 seconds]
davep has joined #commonlisp
zetef has quit [Ping timeout: 272 seconds]
poplin has quit [Read error: Connection reset by peer]
domovod has quit [Ping timeout: 268 seconds]
poplin has joined #commonlisp
domovod has joined #commonlisp
poplin has quit [Ping timeout: 240 seconds]
mesuutt has quit [Ping timeout: 272 seconds]
yitzi has joined #commonlisp
attila_lendvai has joined #commonlisp
mesuutt has joined #commonlisp
olnw has quit [Ping timeout: 244 seconds]
olnw has joined #commonlisp
rogersm has joined #commonlisp
zetef has joined #commonlisp
ronald_ has quit [Ping timeout: 255 seconds]
ronald has joined #commonlisp
<green_>
It looks like I have a deadlock in my lparallel-using code (on sbcl). The JVM has a nice feature whereby you can trigger thread dumps by sending it a signal. I don't suppose sbcl has something similar that I'm not finding, does it?
puke has quit [Ping timeout: 260 seconds]
puke has joined #commonlisp
kevingal has joined #commonlisp
kevingal_ has joined #commonlisp
<scymtym>
SBCL has an automatic deadlock detector. therefore, the progress in your program is probably blocked by some other effect that is not strictly a deadlock. to dump all threads, you can MAP the function SB-DEBUG:PRINT-BACKTRACE over all threads
domovod has quit [Ping timeout: 240 seconds]
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 255 seconds]
zetef has quit [Remote host closed the connection]
<green_>
can you somehow tell print-backtrace which thread to print? I don't see that.
nij- has joined #commonlisp
random-jellyfish has quit [Ping timeout: 256 seconds]
<ixelp>
cl-ppcre/api.lisp at 714ee6c550b2cf7d6345bf806c9c6fb00c622b1f · edicl/cl-ppcre · GitHub
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
<nij->
Wait, but no, this checks if the REGEX string is faulty at load time, not compile time.. (and load time happens ahead of runtime) right?
random-jellyfish has joined #commonlisp
<bike>
correct on both counts.
<green_>
it turns out that interrupt-thread runs the function asynchronously, so the output is all mangled. You need to stash each thread dump somewhere, and then dump everything cleanly.
mm007emko has quit [Ping timeout: 256 seconds]
mm007emko has joined #commonlisp
<nij->
Not sure if without-interrupts help? "The interrupt is asynchronous, and can occur anywhere with the exception of sections protected using sb-sys:without-interrupts." https://www.sbcl.org/manual/#Asynchronous-Operations
mm007emko has quit [Read error: Connection reset by peer]
<ixelp>
SBCL 2.4.3 User Manual
mm007emko has joined #commonlisp
<bike>
it probably wouldn't, since they want interrupts in this case. it's just that interrupts are asynchronous by nature.
<ixelp>
New files · ocicl/ace.core@e0db719 · GitHub
pfdietz has quit [Quit: Client closed]
<nij->
Sometimes the real error happens ahead. And in the bottom you can only see COMPILE-FILE-ERROR.
<nij->
Perhaps with declaration debug 3 may make the report clearer?
<green_>
It's the "(define-compiler-macro line-and-column-numbers". We get the error when this expands in check.lisp. So, it looks like google has some private changes to sbcl that this is wrapping.
<nij->
Different sbcl versions could lead to errors like this too. I was in a "project", and for stability we had to lock the version of sbcl and QL.
<nij->
green_ How did you locate the error? Did you just declare debug to 3?
prokhor has quit [Ping timeout: 255 seconds]
prokhor has joined #commonlisp
rgherdt_ has joined #commonlisp
King_julian has joined #commonlisp
rgherdt has quit [Ping timeout: 256 seconds]
King_julian has quit [Client Quit]
<nij->
I have a hard time understand what an eval environment is.. https://novaspec.org/cl/26_1_Glossary#evaluation_environment . It is a special run-time environment - "a run-time environment in which macro expanders and code specified by eval-when to be evaluated are evaluated." But.. I can't think of a run-time env in which that doesn't happen. Any example?
<ixelp>
26.1 Glossary | Common Lisp Nova Spec
<beach>
nij-: This one is used at compile time only.
<nij->
How do you tell that from the spec?
<beach>
nij-: So it is entirely possible that, if you have (EVAL-WHEN (:COMPILE-TOPLEVEL) (DEFUN FOO (..) ...)), then FOO might not be defined when compilation is finished.
<beach>
nij-: You go to the section on compilation semantics.
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
<beach>
For an evaluation to be "initiated by the compiler", it has to be in (eval-when (:compile-toplevel) ...)
<beach>
nij-: Otherwise, the compiler does not evaluate stuff. It just translates code to some other format.
waleee has joined #commonlisp
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
X-Scale has joined #commonlisp
<green_>
nij- , to find the error, I simply grepped for the error message, saw that it was a compiler macro, and the modified the code to remove the compiler macro -- and it worked.
danse-nr3 has quit [Ping timeout: 246 seconds]
mesuutt has quit [Ping timeout: 240 seconds]
danse-nr3 has joined #commonlisp
yitzi has quit [Remote host closed the connection]
mesuutt has joined #commonlisp
mesuutt has quit [Ping timeout: 246 seconds]
kevingal_ has quit [Ping timeout: 255 seconds]
kevingal has quit [Ping timeout: 255 seconds]
dom2 has quit [Ping timeout: 252 seconds]
dom2 has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
jmercouris1 has joined #commonlisp
jmercouris1 has quit [Client Quit]
admich1 has quit [Ping timeout: 240 seconds]
admich1 has joined #commonlisp
domovod has joined #commonlisp
kevingal has joined #commonlisp
kevingal_ has joined #commonlisp
random-jellyfish has quit [Ping timeout: 255 seconds]
danse-nr3 has quit [Ping timeout: 268 seconds]
wacki has joined #commonlisp
mesuutt has joined #commonlisp
mesuutt has quit [Ping timeout: 240 seconds]
mesuutt has joined #commonlisp
cage has joined #commonlisp
emaczen has joined #commonlisp
mesuutt has quit [Ping timeout: 264 seconds]
zxcvz has joined #commonlisp
HerlockSholmes has joined #commonlisp
X-Scale has quit [Quit: Client closed]
decweb has joined #commonlisp
Eoco has quit [Ping timeout: 255 seconds]
Eoco has joined #commonlisp
mathrick has quit [Remote host closed the connection]
mathrick has joined #commonlisp
rainthree has joined #commonlisp
Eoco has quit [Remote host closed the connection]
Eoco has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
mgl_ has quit [Ping timeout: 256 seconds]
mesuutt has joined #commonlisp
jon_atack has joined #commonlisp
HerlockSholmes has quit [Ping timeout: 252 seconds]
jonatack has quit [Ping timeout: 256 seconds]
mesuutt has quit [Ping timeout: 255 seconds]
jonatack has joined #commonlisp
jon_atack has quit [Ping timeout: 260 seconds]
szkl has quit [Quit: Connection closed for inactivity]
rgherdt_ has quit [Ping timeout: 260 seconds]
ronald has quit [Ping timeout: 256 seconds]
admich1 has quit [Ping timeout: 255 seconds]
rogersm has joined #commonlisp
Pixel_Outlaw has joined #commonlisp
emaczen has quit [Read error: Connection reset by peer]
emaczen has joined #commonlisp
admich1 has joined #commonlisp
amb007 has joined #commonlisp
mesuutt has joined #commonlisp
akoana has joined #commonlisp
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
mesuutt has quit [Ping timeout: 260 seconds]
emaczen has quit [Ping timeout: 256 seconds]
OlCe has quit [Remote host closed the connection]
rainthree has quit [Ping timeout: 264 seconds]
rogersm has quit [Remote host closed the connection]
<nij->
It only says that "The New Mode column indicates the new processing mode. A dash ( — ) indicates the compiler remains in its current mode." But it doesn't explain what the "new processing mode" is.
<nij->
(The table is really confusing to me..)
tibfulv has quit [Remote host closed the connection]