jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
dre has joined #commonlisp
taiju has joined #commonlisp
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
ldb has joined #commonlisp
ldb has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
ec has quit [Remote host closed the connection]
azimut has quit [Read error: Connection reset by peer]
gxt has quit [Read error: Connection reset by peer]
ec has joined #commonlisp
azimut has joined #commonlisp
gxt has joined #commonlisp
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
pranavats has quit [Ping timeout: 248 seconds]
cowboy8625 has joined #commonlisp
azimut_ has joined #commonlisp
edgar-rft has quit [Ping timeout: 244 seconds]
azimut has quit [Ping timeout: 258 seconds]
thuna` has quit [Ping timeout: 265 seconds]
waleee has quit [Ping timeout: 265 seconds]
<cowboy8625> do yall use slime in emacs for CL?
sjl has quit [Quit: WeeChat 3.6]
<Bike> cowboy8625: it is pretty common, yes.
jmdaemon has quit [Ping timeout: 265 seconds]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
ec has quit [Ping timeout: 258 seconds]
epony has joined #commonlisp
<kakuhen> I use Emacs with SLY but it's basically the same thing as SLIME, ignoring stickers
<kakuhen> well, there is a caveat of slynk backends being broken on ABCL, so you can't use SLY if you use ABCL
ttree has joined #commonlisp
<kagevf> jcowan: yeah, good point to be aware of
<kagevf> _death: yeah, I'll review those sections of PCL and cltl2 ... good idea good idea ...
gateway2000 has quit [Quit: Leaving]
ec has joined #commonlisp
hashfunc has joined #commonlisp
jeosol has joined #commonlisp
edgar-rft has joined #commonlisp
cosimone has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
taiju has quit [Ping timeout: 268 seconds]
jeosol has quit [Quit: Client closed]
karlosz has quit [Remote host closed the connection]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
<dre> what are sly stickers?
<dre> I'm making an addon for SLYNK to neovim
jmdaemon has joined #commonlisp
jeosol has joined #commonlisp
<kagevf> dre: check out this video: https://www.youtube.com/watch?v=0DLdQ6yb7h8 ... it covers sly stickers ... I'm personally not a sly user, but stickers looks like a pretty useful feature
<dre> thanks, helpful
SR-71 has joined #commonlisp
aartaka has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
SR-71` has joined #commonlisp
SR-71` has quit [Remote host closed the connection]
SR-71 has quit [Ping timeout: 264 seconds]
pillton has joined #commonlisp
_cymew_ has joined #commonlisp
pranavats has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
rgherdt has joined #commonlisp
<neominimum> Hi all! How does one indicate that a method specialises on an instance that is a subclass of STANDARD-CLASS. I don't know how to find the name for a class of foo #<STANDARD-CLASS FOO>. If I want to specialise on #<FOO {some-number}> Then I write (obj foo) but I don't know what the specializer should be in the former case.
<beach> Are you looking for an EQL specializer maybe?
<beach> The AMOP uses the preposition "to" for specialization, and I think it is good practice to follow that convention, so "a method ON a generic function specializes TO something".
<beach> neominimum: Perhaps you can tell us what the nature of the object is that, when given to the generic function, will make the method applicable.
frgo has quit [Ping timeout: 264 seconds]
<beach> But you can find the class of any object by using CLASS-OF. And you can fine the name of that class by using CLASS-NAME.
<beach> clhs class-of
<beach> mop class-name
<neominimum> That may be what I am looking for. Okay, the object is one that is returned from say (find-class 'foo)
<beach> Well, the class of that object is a metaclass object.
<neominimum> The method should be applicable to all (find-class 'name) where name designates a subclass of foo
<beach> So depending on how the class FOO was defined, it could be STANDARD-CLASS, BUILT-IN-CLASS, or some implementation-defined class.
<beach> And you are not allowed to define a method that is applicable when given only instances of classes defined in the standard.
<beach> So then you might have to define a different metaclass for FOO.
<neominimum> Okay the generic function takes two parameters the first being an instance of standard-object
<neominimum> the second being an instance of a class
<beach> OK, but you are not allowed to define a method (defmethod bar ((x standard-object) (y standard-class)) ...) because it would be applicable when given only instances of standardized classes.
Cymew has joined #commonlisp
<neominimum> by standardized classes are you saying classes subclassed from standard-class?
<beach> I said "standardized classes" by which I mean classes that are specified in th e standard.
<neominimum> thanks
<beach> Sure.
<beach> Let's see if I can find the relevant passage...
<beach> clhs 11.1.2.1.2
<specbot> Constraints on the COMMON-LISP Package for Conforming Programs: http://www.lispworks.com/reference/HyperSpec/Body/11_abab.htm
<beach> item 19.
<beach> Oh, but wait, your generic function is your own yes?
<beach> Then the restriction doesn't apply.
<beach> You can do what you want with your own generic functions.
<beach> However, it is often not useful to specialize to STANDARD-CLASS or BUILT-IN-CLASS.
<neominimum> Yes I see that too "Defining a method for a standardized generic function ..."
<neominimum> Yes it is my own creation, mwahahaha!
<beach> Heh.
jeosol has quit [Ping timeout: 252 seconds]
igemnace has joined #commonlisp
<neominimum> So, does that mean I could write (eql (find-class 'foo))? And expect it to work? Or are there constraints for eql specifiers.
<beach> That would work.
<beach> The restriction doesn't mention what kind of specializer is used. Only when the method is applicable. But again, on your own generic function, you can do what you want.
<beach> And, yes, an EQL specializer is often more useful in cases like this. Especially if you don't really know who defined the class FOO.
<neominimum> Ah yes it does work, now I just need to find one that applies to all subclasses of FOO.
<beach> If you control the definition of FOO, another option is to define a metaclass for FOO which is typically a subclass of STANDARD-CLASS.
<beach> Then you can specialize to that metaclass.
<neominimum> Right, I'll give that a try. Thanks beach
<beach> Sure.
azimut_ has quit [Remote host closed the connection]
azimut has joined #commonlisp
azimut has quit [Ping timeout: 258 seconds]
MajorBiscuit has joined #commonlisp
ttree has quit [Ping timeout: 252 seconds]
shka has joined #commonlisp
m5zs7k has quit [Ping timeout: 252 seconds]
m5zs7k has joined #commonlisp
bilal has joined #commonlisp
hashfunc has quit [Remote host closed the connection]
MajorBiscuit has quit [Quit: WeeChat 3.5]
cosimone has joined #commonlisp
dre has quit [Quit: Leaving]
MajorBiscuit has joined #commonlisp
snits has quit [Ping timeout: 268 seconds]
snits has joined #commonlisp
Catie has quit [Ping timeout: 244 seconds]
jdz has quit [Ping timeout: 264 seconds]
cosimone` has joined #commonlisp
cosimone has quit [Ping timeout: 265 seconds]
razetime has joined #commonlisp
makomo has quit [Ping timeout: 268 seconds]
makomo_ has quit [Ping timeout: 268 seconds]
razetime has quit [Ping timeout: 268 seconds]
razetime_ has joined #commonlisp
snits has quit [Ping timeout: 268 seconds]
jdz has joined #commonlisp
whereiseveryone_ has quit [Write error: Connection reset by peer]
payphone has quit [Remote host closed the connection]
djhaskin987 has quit [Remote host closed the connection]
theothornhill has quit [Write error: Connection reset by peer]
jasom has quit [Remote host closed the connection]
artyn has quit [Remote host closed the connection]
sirufer has quit [Remote host closed the connection]
chiheisen has quit [Remote host closed the connection]
\f has quit [Write error: Connection reset by peer]
axvr has quit [Remote host closed the connection]
ggb_ has quit [Remote host closed the connection]
sm2n has quit [Remote host closed the connection]
alethkit has quit [Remote host closed the connection]
ardon has quit [Remote host closed the connection]
mcoll has quit [Remote host closed the connection]
ashpool has quit [Remote host closed the connection]
Schnouki has quit [Write error: Broken pipe]
milesrout has quit [Remote host closed the connection]
hannibal_ad_port has quit [Write error: Broken pipe]
srhm has quit [Write error: Connection reset by peer]
nytpu has quit [Remote host closed the connection]
whereiseveryone has joined #commonlisp
Schnouki has joined #commonlisp
sm2n has joined #commonlisp
chiheisen has joined #commonlisp
ardon has joined #commonlisp
payphone has joined #commonlisp
theothornhill has joined #commonlisp
srhm has joined #commonlisp
ashpool has joined #commonlisp
axvr has joined #commonlisp
razetime_ has quit [Ping timeout: 268 seconds]
artyn has joined #commonlisp
djhaskin987 has joined #commonlisp
hannibal_ad_port has joined #commonlisp
razetime has joined #commonlisp
mcoll has joined #commonlisp
\f has joined #commonlisp
ggb has joined #commonlisp
milesrout has joined #commonlisp
alethkit has joined #commonlisp
sirufer has joined #commonlisp
nytpu has joined #commonlisp
jasom has joined #commonlisp
waleee has joined #commonlisp
makomo has joined #commonlisp
scymtym has quit [Ping timeout: 260 seconds]
Brucio-61 has quit [Ping timeout: 268 seconds]
aartaka has quit [Ping timeout: 265 seconds]
_cymew_ has quit [Ping timeout: 265 seconds]
aartaka has joined #commonlisp
aartaka has quit [Read error: Connection reset by peer]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 252 seconds]
Brucio-61 has joined #commonlisp
waleee has quit [Ping timeout: 268 seconds]
scymtym has joined #commonlisp
livoreno has joined #commonlisp
Guest2 has joined #commonlisp
Guest2 has quit [Client Quit]
jmdaemon has quit [Ping timeout: 250 seconds]
Dynom_ has joined #commonlisp
Dynom_ is now known as Guest4639
random-nick has joined #commonlisp
perrierjouet has joined #commonlisp
chipxxx has joined #commonlisp
frgo has joined #commonlisp
pillton has quit [Remote host closed the connection]
jeosol has joined #commonlisp
pve has joined #commonlisp
bilal has quit [Ping timeout: 244 seconds]
makomo has quit [Ping timeout: 255 seconds]
cosimone` has quit [Ping timeout: 244 seconds]
thuna` has joined #commonlisp
tyson2 has joined #commonlisp
Noisytoot has quit [Ping timeout: 265 seconds]
karlosz has joined #commonlisp
morganw has joined #commonlisp
Noisytoot has joined #commonlisp
Noisytoot has quit [Read error: Connection reset by peer]
Noisytoot has joined #commonlisp
makomo has joined #commonlisp
waleee has joined #commonlisp
makomo has quit [Ping timeout: 268 seconds]
cosimone has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 268 seconds]
jeosol has quit [Quit: Client closed]
livoreno has quit [Remote host closed the connection]
livoreno has joined #commonlisp
makomo has joined #commonlisp
MajorBiscuit has joined #commonlisp
_cymew_ has joined #commonlisp
let-over-lambda has joined #commonlisp
_cymew_ has quit [Ping timeout: 265 seconds]
cage has joined #commonlisp
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
szkl has joined #commonlisp
gateway2000 has joined #commonlisp
Noisytoot has quit [Ping timeout: 260 seconds]
Noisytoot has joined #commonlisp
Brucio-61 has quit [Ping timeout: 244 seconds]
scymtym has quit [Ping timeout: 250 seconds]
mister_m` is now known as mister_m
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
causal has joined #commonlisp
scymtym has joined #commonlisp
Brucio-61 has joined #commonlisp
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
azimut has joined #commonlisp
_cymew_ has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
makomo has quit [Ping timeout: 265 seconds]
mgxm_ has quit [Ping timeout: 255 seconds]
chipxxx has quit [Read error: Connection reset by peer]
epolanski has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
snits has joined #commonlisp
snits has quit [Ping timeout: 244 seconds]
razetime has quit [Ping timeout: 264 seconds]
razetime has joined #commonlisp
ttree has joined #commonlisp
tyson2 has joined #commonlisp
tyson2` has joined #commonlisp
cosimone has quit [Remote host closed the connection]
tyson2 has quit [Ping timeout: 265 seconds]
jdz has quit [Quit: I'm done]
_cymew_ has quit [Ping timeout: 268 seconds]
Cymew has quit [Ping timeout: 268 seconds]
tyson2` has quit [Ping timeout: 265 seconds]
tyson2 has joined #commonlisp
orestarod has joined #commonlisp
Noisytoot has quit [Read error: Connection reset by peer]
eddof13 has joined #commonlisp
thuna` has quit [Quit: out]
Noisytoot has joined #commonlisp
waleee has joined #commonlisp
_cymew_ has joined #commonlisp
attila_lendvai has quit [Ping timeout: 244 seconds]
_cymew_ has quit [Ping timeout: 268 seconds]
_cymew_ has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 244 seconds]
morganw has quit [Remote host closed the connection]
jdz has joined #commonlisp
Noisytoot has quit [Excess Flood]
Noisytoot has joined #commonlisp
razetime has quit [Remote host closed the connection]
igemnace has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 265 seconds]
Noisytoot has quit [Excess Flood]
Noisytoot has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
Noisytoot has quit [Excess Flood]
Noisytoot has joined #commonlisp
Noisytoot has quit [Read error: Connection reset by peer]
Noisytoot has joined #commonlisp
thuna` has joined #commonlisp
lottaquestions has quit [Quit: Konversation terminated!]
tyson2 has quit [Remote host closed the connection]
gateway2000 has quit [Remote host closed the connection]
jolby has joined #commonlisp
Noisytoot has quit [Remote host closed the connection]
Noisytoot has joined #commonlisp
attila_lendvai has joined #commonlisp
cosimone has joined #commonlisp
makomo_ has joined #commonlisp
makomo has joined #commonlisp
Noisytoot has quit [Excess Flood]
Noisytoot has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
akoana has joined #commonlisp
Noisytoot has quit [Excess Flood]
Noisytoot has joined #commonlisp
cosimone has quit [Ping timeout: 268 seconds]
Lord_of_Life has quit [Ping timeout: 244 seconds]
Lord_of_Life has joined #commonlisp
NotThatRPG has joined #commonlisp
<gendl> Hi, I asked this before but does anyone know how I can print a startup message in *slime-repl...* buffer upon connection?
<gendl> I want to do this from the swank side not from slime
<_death> I'd look into swank::*new-connection-hook*
Catie has joined #commonlisp
morganw has joined #commonlisp
epolanski has quit [Quit: Connection closed for inactivity]
<gendl> I tried adding a hook to swank:*new-connection-hook* but got no output.
<aeth> is it going to the right *standard-output* ?
<gendl> It's going to (connection.user-io conn)
<aeth> anything you print could output to *slime-repl foo* or to *inferior-lisp* depending on the *standard-output*
<gendl> where conn is the argument to the hook function
<aeth> when you mess with threads, they mostly go to *inferior-lisp* unless you rebind *standard-output* on creation of the thread. But this is with threads, but before the SLIME REPL so it's weirder
<gendl> I'll look into streams a bit more, thanks.
<_death> gendl: maybe force output as well?
<gendl> Ok
<gendl> How do I force output?
<_death> clhs force-output
<gendl> Okie
jmdaemon has joined #commonlisp
<_death> well, it looks like those streams get set up by slime-repl.. so you may need to get a hook running afterwards..
jolby has quit [Quit: Client closed]
jolby has joined #commonlisp
jdz has quit [Quit: I'm done]
<_death> having a *create-repl-hook* in swank-repl that gets run in create-repl seems to work, if a bit crude
aartaka has joined #commonlisp
jdz has joined #commonlisp
thuna` has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
makomo has quit [Quit: WeeChat 3.5]
<gendl> _death thanks I'll try replicating that. Then I'll come back to ask you why you feel it's crude.
Noisytoot has quit [Excess Flood]
<_death> if it gets the job done then it's ok ;)
_cymew_ has quit [Ping timeout: 268 seconds]
jdz has quit [Quit: I'm done]
jdz has joined #commonlisp
Noisytoot has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdz has quit [Quit: I'm done]
jdz has joined #commonlisp
Noisytoot has quit [Remote host closed the connection]
Noisytoot has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
rgherdt has joined #commonlisp
<gin> (cond ((f) (g))) -- Is it possible to store the result of (f) in a variable and then pass it to g? Like (cond ((setf result (g)) (g result)). Is there another way to do this?
attila_lendvai has quit [Ping timeout: 268 seconds]
<_death> that's the usual way.. I suppose some may like anaphora (acond)
eddof13 has joined #commonlisp
<gin> _death: thx!
<gin> acond seems to bind the result to IT. what does IT stand for? the English pronoun "it"?
<_death> yes
<pjb> gin: (cond ((let ((r (f))) (when r (g)))) …)
<pjb> gin: when you give only a test in a cond clause, it's result is returned: (cond (nil) (42) (t)) #| --> 42 |#
Noisytoot has quit [Ping timeout: 252 seconds]
Noisytoot has joined #commonlisp
<pjb> s/it's/its/ of course
snits has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<gin> thx
<gin> (format nil "~{~a~}" '("foo" "bar" "baz")) ; <-- works fine. but is there any format control to make this work too? (format nil "<some magic here>" "foo" "bar" "baz")
<Alfr> gin, ~A~A~A would come to mind.
<gin> I meant that there are arbitrary number of arguments. sorry should have mentioned that clearly in my question.
makomo_ has quit [Quit: WeeChat 3.5]
makomo has joined #commonlisp
<Alfr> gin, ~@{~a~} (I think.)
aartaka has quit [Ping timeout: 265 seconds]
<susam> Yes, indeed. Example: (format nil "~@{~a~}" "foo" "bar" "baz")
<Alfr> gin, but that will eat all remaining arguments.
aartaka has joined #commonlisp
<gin> great thx. yes, I do want all remaining arguments to be eaten. this is perfect. thx Alfr, susam
Noisytoot has quit [Ping timeout: 244 seconds]
Guest4639 has quit [Quit: WeeChat 3.6]
epolanski has joined #commonlisp
jolby has quit [Quit: Client closed]
Noisytoot has joined #commonlisp
<aeth> or, in general, you can replace the NIL in the FORMAT with a stream variable from WITH-OUTPUT-TO-STRING
<aeth> and use multiple FORMATs or use FORMAT in a LOOP or in a DOLIST or do whatever else you want.
jolby has joined #commonlisp
<aeth> since now the string is returned from WITH-OUTPUT-TO-STRING instead of from FORMAT itself
VincentVega has joined #commonlisp
<gendl> _death: it is working, brilliant!
<gendl> Now I have to figure out how to package this.
<gendl> and whether I should be submitting an MR to the slime proj, to add that hook call there in create-repl.
aartaka has quit [Ping timeout: 244 seconds]
NotThatRPG has quit [Ping timeout: 265 seconds]
aartaka has joined #commonlisp
jolby has quit [Quit: Client closed]
aartaka has quit [Ping timeout: 244 seconds]
jolby has joined #commonlisp
pve has quit [Quit: leaving]
selfish has quit [Read error: Connection reset by peer]
tevo has joined #commonlisp
VincentVega has quit [Remote host closed the connection]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #commonlisp
VincentVega has joined #commonlisp
Noisytoot has quit [Remote host closed the connection]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Noisytoot has joined #commonlisp
blihp has joined #commonlisp
Noisytoot has quit [Excess Flood]
Noisytoot has joined #commonlisp
eddof13 has joined #commonlisp
<gin> is there a CLHS function or a popular idiom for doing this (if (plusp x) x nil)
<gin> if nothing, I'll just use the above code
<aeth> you could do (and (plusp x) x)
<aeth> but this is one of those things on IRC where eventually there will be 10 different ways to do it posted
<gin> thx
<aeth> if you want to avoid an error it's (and (realp x) (plusp x) x)
<aeth> (plusp will error on nonnumbers and on complex)
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<susam> also, (when (plusp x) x)
<aeth> no
<aeth> WHEN is technically valid here, but is semantically for a side-effects thing
<aeth> gives you a whole giant implicit PROGN to work with
akoana has quit [Quit: leaving]
<White_Flame> I'd prefer the AND version here as well
jeosol has joined #commonlisp
waleee has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
jsatk___ is now known as jsatk
frgo has quit []
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
[deleted] has joined #commonlisp
orestarod has quit [Ping timeout: 244 seconds]
cowboy8625 has quit [Quit: WeeChat 3.5]
livoreno has quit [Ping timeout: 260 seconds]
morganw has quit [Remote host closed the connection]
[deleted] has quit [Ping timeout: 268 seconds]
jolby has quit [Quit: Client closed]
<mathrick> so I have (check-type condition simple-condition) in my code, and it signals this: The value of CONDITION is SIMPLE-ERROR, which is not of type SIMPLE-CONDITION.
<mathrick> but: (subtypep 'simple-error 'simple-condition) => T
<mathrick> what gives?
<mathrick> same with ETYPECASE
<mathrick> ooooh, I see, that's because I'm actually looking at the *symbol* 'SIMPLE-ERROR, not the type
shka has quit [Ping timeout: 264 seconds]
tyson2 has joined #commonlisp
Colere has quit [Ping timeout: 264 seconds]
<gin> if one thread does (setf a 10) and another thread does (setf a 20) without any synchronization, is it possible that we will have a corrupt value in a? that is, a value that is neither 10 nor 20?
random-nick has quit [Ping timeout: 252 seconds]
<hayley> No one has put forward a memory model for Common Lisp yet.
<hayley> But, based on what implementations and instruction sets I've poked at, the answer is probably no.
blihp has quit [Read error: Connection reset by peer]
<hayley> The only place corruption can occur is when threads need to update more than one word (e.g. element of a complex double floats array, hash table entry) or less than one byte (e.g. bit in a bit vector).
<gin> thx hayley!
<White_Flame> the language makes no claim as to what might happen; it's a combination of implementatio & hardware that happens to affect it
<mathrick> AFAIK, the language doesn't make a single mention of threading or concurrency anywhere, so it's entirely outside of the spec
Colere has joined #commonlisp