younder has quit [Remote host closed the connection]
akoana has quit [Quit: leaving]
troojg has quit [Ping timeout: 260 seconds]
<gilberth>
"A type declaration of a symbol defined by symbol-macrolet is equivalent to wrapping a the expression around the expansion of that symbol, although the symbol’s macro expansion is not actually affected." <https://novaspec.org/cl/m_type> Emphasis me. SBCL and ECL think otherwise.
<ixelp>
type | Common Lisp Nova Spec
<gilberth>
Yet, I see (macrolet ((aux (&environment env) `',(macroexpand 'x env))) (symbol-macrolet ((x (fourty-two))) (declare (type fixnum x)) (aux))) => (THE FIXNUM (FOURTY-TWO)) with SBCL and ECL.
<bike>
huh. weird.
<gilberth>
Perhaps related: While CCL reports the TYPE declaration fine with VARIABLE-INFORMATION, SBCL doesn't.
<bike>
that honestly seems like more effort than just generating the right IR would be, but what do i know
<gilberth>
So ironically my ersatz macro expander which tries to wrap the THE around, does the right thing with both CCL and SBCL. CCL gives the macro expansion w/o the THE and VARIABLE-INFORMATION reports the type. While SBCL includes the THE and gives no type information with VARIABLE-INFORMATION. Sigh.
<ixelp>
Bug #309122 “symbol-macros and type-declarations” : Bugs : SBCL
<gilberth>
Good. So they noticed?
<bike>
in 2008, yes
<gilberth>
Not so good.
<bike>
it's even tagged "easy"
<bike>
if i'm understanding sbcl correctly, macro definitions are internally just conses with a macroexpander, rather than using the usual LEAF or LVAR or whatever that can have actual information
<bike>
in the environment
random-nick has quit [Ping timeout: 260 seconds]
<gilberth>
I find it puzzling, I CL:INSPECTed the ENV and spot: :VARS ((X SB-SYS:MACRO THE FIXNUM 42) (X SB-SYS:MACRO . 42)). Now what? Two definitions? But then I don't really care for I don't feel like digging into SBCL.
<bike>
yeah they just stick the newer one on and it's a regular old alist i guess
<gilberth>
bike: Thanks! So this time my reading skills sufficed, they think it's a bug, I can move on.
Akbar-Birbal has joined #commonlisp
<bike>
Sure thing
mwnaylor has quit [Remote host closed the connection]
mwnaylor has joined #commonlisp
dnhester26 has quit [Ping timeout: 265 seconds]
istewart has joined #commonlisp
triffid has quit [Quit: triffid]
triffid has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
rodrigo-` is now known as rodrigo-morales
rodrigo-morales has quit [Changing host]
rodrigo-morales has joined #commonlisp
buffet_ has quit [Quit: Bye!]
buffet has joined #commonlisp
kyoji has joined #commonlisp
Demosthenex has quit [Ping timeout: 252 seconds]
Demosthenex has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
triffid has quit [Remote host closed the connection]
paddymahoney has joined #commonlisp
X-Scale has joined #commonlisp
decweb has quit [Ping timeout: 260 seconds]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
triffid has joined #commonlisp
chomwitt has joined #commonlisp
wacki has joined #commonlisp
mgl__ has joined #commonlisp
shawnw has joined #commonlisp
dnhester26 has joined #commonlisp
mgl__ has quit [Ping timeout: 252 seconds]
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest71 has joined #commonlisp
chomwitt has quit [Ping timeout: 245 seconds]
dnhester26 has quit [Ping timeout: 260 seconds]
pi1 is now known as johnjaye
bitspook has joined #commonlisp
bitspook has left #commonlisp [#commonlisp]
shka has joined #commonlisp
pve has joined #commonlisp
bitspook has joined #commonlisp
Th30n has joined #commonlisp
alternateved has joined #commonlisp
torgny has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 260 seconds]
bitspook has quit [Ping timeout: 246 seconds]
amb007 has joined #commonlisp
bitspook has joined #commonlisp
X-Scale has quit [Quit: Client closed]
rainthree has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
saturn2 has quit [Ping timeout: 252 seconds]
mgl__ has joined #commonlisp
psilord has quit [Ping timeout: 252 seconds]
saturn2 has joined #commonlisp
psilord has joined #commonlisp
<paulapatience>
Am I misunderstanding the CLHS entry of print-unreadable-object? It says that if *print-readably* is true, print-unreadable-object should signal a print-not-readable error. But neither SBCL nor CCL do so.
dtman34 has quit [Ping timeout: 255 seconds]
chkhd has joined #commonlisp
dtman34 has joined #commonlisp
deadmarshal_ has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
<beach>
I don't think you misunderstood, and here SBCL signals an error.
<ixelp>
ERROR: Attempt to print object 234 on stream #<#:LIMITING-STREAM #x144175F6> .
<beach>
There too.
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
<paulapatience>
You are right.
<paulapatience>
What I was actually doing was using print-unreadable-object in a specialization of print-object, and then evaluating such an object.
<paulapatience>
I guess slime/sly ignore that error in that case.
<paulapatience>
When I explicitly use (print-object ...), the error is signaled.
<paulapatience>
Thanks.
<beach>
Sure.
<jackdaniel>
paulapatience: you should not call print-object yourself
varjag has joined #commonlisp
bitspook has quit [Ping timeout: 260 seconds]
amb007 has quit [Read error: Connection reset by peer]
bitspook has joined #commonlisp
deadmarshal_ has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<paulapatience>
jackdaniel: I wasn't going to, though I didn't know that. Basically I am implementing a readable print-object specialization for some object, and I wanted to make sure that if one of its slots contained an unreadable representation, then it would signal print-not-readable.
jadzi has joined #commonlisp
ingeniot has joined #commonlisp
attila_lendvai has joined #commonlisp
ingeniot has quit [Changing host]
ingeniot has joined #commonlisp
Guest4757 has joined #commonlisp
pabs3 has quit [Quit: Don't rest until all the world is paved in moss and greenery.]
mgl has joined #commonlisp
mgl__ has quit [Ping timeout: 265 seconds]
pabs3 has joined #commonlisp
Guest71 has quit [Quit: Client closed]
Akbar-Birbal has left #commonlisp [#commonlisp]
mmrly has joined #commonlisp
Guest71 has joined #commonlisp
Akbar-Birbal has joined #commonlisp
Guest71 has quit [Quit: Client closed]
bitspook has quit [Ping timeout: 246 seconds]
Guest4757 has quit [Quit: Lost terminal]
bitspook has joined #commonlisp
bitspook has quit [Ping timeout: 260 seconds]
mgl_ has joined #commonlisp
mgl has quit [Ping timeout: 245 seconds]
bitspook has joined #commonlisp
traidare has joined #commonlisp
<dnhester26>
mrcom: thanks for your comments. It's unclear what's happening. The file is a local project, not something loaded from quicklisp. Interestingly enough, if I run the project by doing `sbcl --load script.lisp` it uses the cache version, however, if I copy paste the contents of script into the repl after running `sbcl`, it works. The script itself is just doing (asdf:load-system "myproject") and then `(myproject:start)`
mwnaylor has quit [Ping timeout: 246 seconds]
amb007 has quit [Ping timeout: 246 seconds]
dnhester26 has quit [Remote host closed the connection]
amb007 has joined #commonlisp
chkhd is now known as chkhd`
chkhd` has quit [Quit: ZZZzzz…]
chkhd has joined #commonlisp
random-nick has joined #commonlisp
dnhester26 has joined #commonlisp
lucasta has joined #commonlisp
decweb has joined #commonlisp
mmrly has quit [Remote host closed the connection]
younder has joined #commonlisp
dnhester26 has quit [Ping timeout: 248 seconds]
mimry has joined #commonlisp
meaty has joined #commonlisp
jmiven has quit [Quit: reboot]
jmiven has joined #commonlisp
dnhester26 has joined #commonlisp
edgar-rft_ has joined #commonlisp
edgar-rft has quit [Ping timeout: 264 seconds]
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
pranav has quit [Remote host closed the connection]
ingeniot has quit [Ping timeout: 256 seconds]
chomwitt has joined #commonlisp
lieven has quit [Ping timeout: 245 seconds]
mal1 has joined #commonlisp
NotThatRPG has joined #commonlisp
NotThatRPG has quit [Ping timeout: 252 seconds]
NotThatRPG has joined #commonlisp
skeemer has joined #commonlisp
Demosthe1ex has joined #commonlisp
mal1 is now known as lieven
chkhd is now known as chkhd`
chkhd` has quit [Quit: ZZZzzz…]
Demosthenex has quit [Ping timeout: 248 seconds]
Demosthenex has joined #commonlisp
Th30n has quit [Quit: going off]
Demosthe1ex has quit [Ping timeout: 246 seconds]
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
shawnw has quit [Ping timeout: 246 seconds]
chomwitt has quit [Ping timeout: 246 seconds]
awlygj has joined #commonlisp
<skeemer>
hello everyone, i was wondering if there was a high-level network programming library for common lisp... i am thinking about something similar to "scapy" for those of you who know about python
<skeemer>
but if you don't know about python anyway, i mean something that allows me to craft packets and send them over the network
<skeemer>
or just sniff traffic on a network interface and analyze packets
<skeemer>
bjorkintosh: i already checked that, otherwise why would i ask here?
<bjorkintosh>
skeemer: it takes all kinds to make IRC you see?
<skeemer>
bjorkintosh: i don't understand your sentence
<bjorkintosh>
skeemer: some people are too lazy to do the most basic search.
<skeemer>
bjorkintosh: i see
<bjorkintosh>
but, if you've already seen that, fear not.
attila_lendvai has quit [Ping timeout: 265 seconds]
ingeniot has joined #commonlisp
ingeniot has quit [Changing host]
ingeniot has joined #commonlisp
wacki has joined #commonlisp
even4voi1 has quit [Quit: leaving]
eddof13 has joined #commonlisp
even4void has joined #commonlisp
<dnhester26>
skeemer: chunga and usocket are no good?
alcor has joined #commonlisp
<yacin>
scapy is a very high-level lib. i haven't seen anything like it in common lisp
<skeemer>
yacin: usocket it's for socket, what if i want to send an ethernet frame ?
<yacin>
¯\_(ツ)_/¯
rainthree has quit [Read error: Connection reset by peer]
<skeemer>
yacin: so there is no way in current common lisp ecosystem to do such things
<yacin>
oh i just don't know
<yacin>
but i know i haven't seen anything as fully featured as scapy. i don't think i've seen a library like that in _any_ other language, tbh
<dlowe>
oh there's a way
<dlowe>
it's a simple matter of programming
<skeemer>
dlowe: what do you mean?
<beach>
skeemer: I think dlowe means that you may have found yourself a project.
<dlowe>
I wasn't going to presume
<dlowe>
but CL compilers have all the infrastructure needed to build something like scapy, which can be done by a motivated person
<skeemer>
dlowe: great!
<dlowe>
Using less popular languages is generall akin to offroad driving :p
<dlowe>
even if you have a tank you might have to clear some roads
<dlowe>
specifically there's a C foreign function interface to make the necessary system calls, and a lot of capable fast constructs with which to decode packets
<dlowe>
The built-in always-available compiler is a real asset here, because the DSL can be compiled down to machine code.
<mrcom>
dnhester26: That's weird. --load happens after .sbclrc is run, so you should get equivalent results. Try adding this as the first line of your script, and try it --load & at repl :
<mrcom>
(format t "~:{~A~25T: ~A~%~}" (mapcar (lambda (x) (list x (symbol-value (find-symbol x 'asdf)))) '("*CENTRAL-REGISTRY*" "*USER-CACHE*" "*OUTPUT-TRANSLATIONS*")))
<mrcom>
I'm guessing USER-CACHE will be different. Maybe OUTPUT-TRANSLATIONS.
phantomics has joined #commonlisp
<mrcom>
If you're getting NILs for values, try putting that line after the "(asdf:load-system..)" form.
<phantomics>
A CLOS question: Say I have two classes that have a method in common, implemented in different ways. It may return a result or fail to find the requested thing and return nil. I now want to create a class that is a subclass of both of these.
<dnhester26>
mrcom: I didn't quite follow "--load & at repl", do you mean to add your next message it to the script that I'm loading from bash with --load?
<dnhester26>
mrcom: thanks for answering
<phantomics>
When this method is called on the subclass, it will try first the Parent Class 1 method and, if it fails to return a result, try the Parent Class 2 method. What's the best way to do something like this?
<mrcom>
dnhester26: (You're welcome!) Yeah, put it in the script, then run your script with --load, and from the repl, as you did before.
<phantomics>
What can be done instead of (call-next-method) when there are multiple parent classes that have different impls of the same method?
<dnhester26>
mrcom: ok, will try. thanks
mgl_ has quit [Ping timeout: 246 seconds]
<beach>
phantomics: Classes don't have methods. Generic functions do.
Akbar-Birbal has left #commonlisp [Error from remote client]
<beach>
phantomics: Are you saying that you have a generic function with two methods, one specialized to the first class, and the other to the second class?
chsasank has quit [Quit: Ping timeout (120 seconds)]
<dlowe>
phantomics: to answer the basis of your question, the order of inheritance is meaningful to the order that the methods are tried
<dnhester26>
Question: The following is not compiling `(defmethod send ((account <account>) (email <email>) &allow-other-keys t &rest rest)` saying `misplaced &ALLOW-OTHER-KEYS in lambda list:` but where should I put it?? I read the docs and don't get what I'm doing wrong
<beach>
dnhester26: You need a &KEY if you have &ALLOW-OTHER-KEYS.
<beach>
dnhester26: And &REST must come before &KEY.
<dnhester26>
beach: this doesn't compile either (defmethod send ((account <account>) (email <email>) &key &rest rest &allow-other-keys)
<dnhester26>
ahh ok
<beach>
dnhester26: It is explained in the section on lambda lists.
<dlowe>
phantomics: so if you have a class A that has superclasses (B C), then methods on B will be tried first when searching for the next method
<phantomics>
beach: That's correct, two methods specialized to the two classes
chsasank has quit [Read error: Connection reset by peer]
<bike>
then on B the gf will do (b-method ...), on C it will do (c-method ...), and on A which is a subclass of both will do (or (b-method ...) (c-method ...)). so if b-method returns nil it will go on to c method, but objects of the parent classes will still behave appropriately
<bike>
possibly some other operator if "fail" is more involved than returning nil
<phantomics>
Ok, so (call-next-method) needs to be called in the fail condition of method B so method C will be tried if called on a class instance inheriting from both B and C
<mrcom>
Bingo.
<dnhester26>
beach: thanks for the explanation! :D
<mrcom>
Or the "or" combination.
chsasank has joined #commonlisp
<phantomics>
So the combination is a property you put on the generic declaration
<bike>
it is a property of the generic function, yes, which is why i mentioned this only makes sense if it's a pattern with all methods here
<phantomics>
Yes, the plan is to have the method follow this pattern with all classes it applies to, so it should work
<phantomics>
I'll give it a try, thanks everyone
varjagg has joined #commonlisp
<bike>
_every_ method on the generic, not just these few
<bike>
if this is only how it works for these particular classes, and the generic has other methods that don't work this way, you probably don't want to use a method combination
<phantomics>
The method would follow this pattern for every applicable class
<beach>
phantomics: Do you mean the generic function rather than the method?
<phantomics>
Yes, every method for the generic would work that way
<bike>
okay, that's fine then.
NotThatRPG has quit [Ping timeout: 265 seconds]
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pranav has joined #commonlisp
Akbar-Birbal has left #commonlisp [#commonlisp]
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
prokhor has joined #commonlisp
prokhor__ has quit [Ping timeout: 276 seconds]
NotThatRPG has joined #commonlisp
varjagg has quit [Ping timeout: 246 seconds]
dnhester26 has joined #commonlisp
awlygj has quit [Quit: leaving]
<dlowe>
I found Keene's book OOP in CL to be very useful for understanding how it's all put together
ingeniot has quit [Quit: Client closed]
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
AndreiDuma has joined #commonlisp
chomwitt has joined #commonlisp
mgl_ has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
ingeniot has joined #commonlisp
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
ingeniot has quit [Quit: Client closed]
mgl_ has quit [Ping timeout: 252 seconds]
lucasta has quit [Remote host closed the connection]
Posterdati has quit [Ping timeout: 260 seconds]
Posterdati has joined #commonlisp
dnhester26 has joined #commonlisp
oneeyedalien has joined #commonlisp
johnjaye has quit [Ping timeout: 252 seconds]
johnjaye has joined #commonlisp
cage has quit [Remote host closed the connection]
chrcav has quit [Ping timeout: 260 seconds]
chrcav has joined #commonlisp
ingeniot has joined #commonlisp
dnhester26 has quit []
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
AndreiDuma has quit [Read error: Connection reset by peer]
AndreiDuma has joined #commonlisp
oneeyedalien has quit [Quit: Leaving]
bitspook has quit [Ping timeout: 265 seconds]
wacki has joined #commonlisp
bitspook has joined #commonlisp
bitspook has quit [Ping timeout: 246 seconds]
JuanDaugherty has joined #commonlisp
chomwitt has quit [Ping timeout: 246 seconds]
meaty has quit [Ping timeout: 246 seconds]
bitspook has joined #commonlisp
ingeniot has quit [Quit: Client closed]
bitspook has quit [Ping timeout: 265 seconds]
AndreiDuma has quit [Read error: Connection reset by peer]
AndreiDuma has joined #commonlisp
bitspook has joined #commonlisp
bitspook has quit [Ping timeout: 248 seconds]
kevingal has joined #commonlisp
bitspook has joined #commonlisp
shawnw has joined #commonlisp
<alcor>
Let's assume I bind a dynamic variable in a (LOOP …) form using a WITH *VAR* = … or a FOR *VAR* = … clause. Can I assume the original binding will get restored when the loop ends?
<bike>
yeah, that's how it works.
<bike>
a with clause pretty much just expands into a let. for will also be a let, though a little more complicated.
<aeth>
hmm, that could actually lead to an interesting pattern... binding *standard-input* and/or *standard-output* inside of a loop
<alcor>
bike: Thanks
<alcor>
It does indeed have some interesting applications, esp. when combined with something like the "strategy pattern" e.g. iterating over IO procedures (strategies) while rebinding stream parameters.
mgl_ has joined #commonlisp
<aeth>
Be careful with that kind of language in Lisp circles. Lispers tend to deny that design patterns exist in Lisp because some essay a long time ago made this claim (I think the actual claim was that _many_ common OOP design patterns as catalogued are unnecessary in Lisp).
<aeth>
So "pattern" tends to get objections. Of course, I guaranteed it because I just did.
<alcor>
I don't like this debate because saying something like "function" instead is arguably worse because these terms are very vague. I'd rather use an OOP term even if it's controversial rather than using an overloaded term that would cause misunderstandings.
<alcor>
You could say "function that does a thing" instead of "strategy" but then the sentence would make no sense.
eddof13 has quit [Quit: eddof13]
eddof13 has joined #commonlisp
ingeniot has joined #commonlisp
ingeniot has quit [Ping timeout: 256 seconds]
Pixel_Outlaw has joined #commonlisp
AndreiDuma_ has joined #commonlisp
AndreiDuma has quit [Ping timeout: 252 seconds]
younder has quit [Remote host closed the connection]
eddof13 has quit [Ping timeout: 246 seconds]
younder has joined #commonlisp
shawnw has quit [Ping timeout: 252 seconds]
cage has quit [Quit: rcirc on GNU Emacs 29.4]
younder has quit [Remote host closed the connection]
younder has joined #commonlisp
JuanDaugherty has quit [Quit: JuanDaugherty]
jon_atack has quit [Ping timeout: 248 seconds]
mgl_ has quit [Ping timeout: 246 seconds]
bitspook has quit [Ping timeout: 252 seconds]
jonatack has joined #commonlisp
AndreiDuma_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jonatack has quit [Ping timeout: 246 seconds]
mgl_ has joined #commonlisp
brokkoli_origin has quit [Ping timeout: 245 seconds]
brokkoli_origin has joined #commonlisp
bjorkintosh has quit [Ping timeout: 276 seconds]
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
jadzi has quit [Ping timeout: 260 seconds]
amb007 has quit [Read error: Connection reset by peer]