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/> | News: ELS'22 this Monday (2022-03-21), see https://european-lisp-symposium.org
lisp123 has joined #commonlisp
livoreno has quit [Ping timeout: 272 seconds]
lisp123 has quit [Ping timeout: 256 seconds]
livoreno has joined #commonlisp
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
Oddity has joined #commonlisp
epolanski has quit [Quit: Connection closed for inactivity]
rawley has quit [Read error: Connection reset by peer]
rawley_ has joined #commonlisp
rawley_ has quit [Remote host closed the connection]
rawley_ has joined #commonlisp
random-nick has quit [Ping timeout: 256 seconds]
molson has quit [Remote host closed the connection]
molson has joined #commonlisp
s-liao has joined #commonlisp
rawley_ has quit [Quit: Leaving]
rawley has joined #commonlisp
rawley has quit [Client Quit]
rawley has joined #commonlisp
lisp123 has joined #commonlisp
rustacean has joined #commonlisp
rustacean has quit [Client Quit]
razetime has joined #commonlisp
Inline has joined #commonlisp
unixlisp has joined #commonlisp
Inline__ has quit [Ping timeout: 260 seconds]
unixlisp has left #commonlisp [#commonlisp]
s-liao has quit [Quit: Client closed]
razetime has quit [Ping timeout: 240 seconds]
razetime has joined #commonlisp
wyrd has quit [Quit: Lost terminal]
phantomics has quit [Ping timeout: 240 seconds]
lisp123 has quit [Remote host closed the connection]
aeth has quit [Ping timeout: 260 seconds]
aeth has joined #commonlisp
semz_ has joined #commonlisp
wyrd has joined #commonlisp
semz has quit [Ping timeout: 260 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
<beach> Good morning everyone!
mon_aaraj has quit [Ping timeout: 272 seconds]
mon_aaraj has joined #commonlisp
aeth has quit [Ping timeout: 260 seconds]
lisp123 has joined #commonlisp
aeth has joined #commonlisp
<rawley> Good morning :)
<beach> rawley: Are you new here? I don't recognize your nick.
<rawley> Yeah, just joined a few days ago
<beach> Great! Welcome!
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
<rawley> Thanks! I'm mostly a Clojure dev but I really like CL as well, hoping I pick up a bit from hanging out in here.
<beach> I am sure you will.
rawley has quit [Remote host closed the connection]
Bike has quit [Quit: Connection closed]
Mandus has quit [Ping timeout: 260 seconds]
Mandus has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
<lisp123> The best message one can get: "When you're reading this message, Hunchentoot has been properly installed."
Mandus has quit [Ping timeout: 272 seconds]
Mandus has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 260 seconds]
lisp123 has joined #commonlisp
akoana has quit [Quit: leaving]
waleee has quit [Ping timeout: 252 seconds]
waleee has joined #commonlisp
Everything has joined #commonlisp
hashfunc1880 has joined #commonlisp
<hashfunc1880> is there a way to test if a given symbol is part of a certain class?
<beach> Er, what?
<beach> Symbols are not "part of" classes.
waleee has quit [Ping timeout: 260 seconds]
waleee has joined #commonlisp
<hashfunc1880> beach: for example:
<hashfunc1880> given (DEFCLASS A () ((VAR :ACCESSOR VAR)))
<hashfunc1880> (SYMBOL-FUNCTION 'VAR) => #<STANDARD-GENERIC-FUNCTION TOP::VAR (1)>
<hashfunc1880> is there a way to find out that VAR is associated with class A?
<beach> The symbol is not "part of" or "associated with" the class. The symbol names a generic function that has a method that specializes to the class. And, yes, there are ways to find that out. Some of that might require the MOP.
Guest74 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
rotateq has joined #commonlisp
<beach> So you need to find out whether the symbol names a generic function, or whether (SETF <that-symbol>) names one. Then you need to find out whether that generic function has a method that specializes to the class. It is not clear what you want, so the details will vary. For example does (defmethod VAR2 (a b (c A) d) ...) count?
lisp123 has quit [Ping timeout: 260 seconds]
<beach> So I guess you can use FBOUNDP first.
<beach> clhs fboundp
<beach> Then FDEFINITION to get to the definition.
<beach> clhs fdefinition
<beach> Then TYPEP to figure out whether the definition is a generic function.
<beach> Then GENERIC-FUNCTION-METHODS to get to the list of methods.
<beach> mop generic-function-methods
<beach> Then METHOD-SPECIALIZERS to get to the list of specializers for each method
<beach> mop method-specializers
<beach> Then FIND-CLASS to get to the class metaobject from the class name.
<beach> Then EQ to check whether one of the specializers is that class.
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
<beach> hashfunc1880: Does that make sense to you?
<hashfunc1880> beach: ok thanks. i just added (EQ (TYPE-OF (SYMBOL-FUNCTION VAR)) 'STANDARD-GENERIC-FUNCTION). but that is turning out to be too loose of an approach. ideally, i guess i just want if the symbol is either a 'STANDARD-GENERIC-FUNCTION (like a member function) or if it's the name of a class itself.
lisp123 has joined #commonlisp
<hashfunc1880> beach: yeah, some of it does, i'll have to read more into it
<hashfunc1880> *most of it does i think
<beach> Maybe if you tell us what you are trying to do, it would be easier to give advice, because you are mixing up several things.
<beach> First of all, functions can be named (SETF <symbol>) so symbols are not enough to find out whether there is (say) a slot writer.
waleee has quit [Ping timeout: 260 seconds]
lisp123 has quit [Ping timeout: 256 seconds]
<beach> Second, a symbol "is" not a standard generic function. It can name one, but it isn't one. And generic functions don't necessarily have names in the global environment, so there could be a generic function with a specilizer that you can't find with FDEFINITION (or SYMBOL-FUNCTION if you insist on using only symbols).
<beach> Third, there is no such thing as a "member function" in Common Lisp.
waleee has joined #commonlisp
<beach> A slot reader or a slot writer is just a method on a generic function, and that method happens to specialize to the class with the slot.
<beach> Fourth, TYPE-OF is not a good plan. Use TYPEP instead.
<hashfunc1880> beach: ok, yeah i'm going to change it to typep in this case. i think i'll just have to stick with just checking if the symbol names a standard-generic-function for now.
<hashfunc1880> i'm also unable to use the function GENERIC-FUNCTION-METHODS
<beach> It is not in the standard, as I told you. It is in the mop.
<hashfunc1880> like my environment says that GENERIC-FUNCTION-METHODS is undefined
<hashfunc1880> oh i see
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` is now known as X-Scale
<rotateq> hashfunc1880: Which implementation do you use? SBCL?
<beach> It is best to use the closer-mop library.
lisp123 has joined #commonlisp
<rotateq> Yes for most nowadays used implementations. :)
<rotateq> Ah it has even a file for the Mezzano operating system.
<beach> You could also use this one perhaps:
<beach> mop s-d-g-f
<lisp123> whats the best logo these days
<lisp123> for lisp
<beach> The lizard, definitely.
<lisp123> (or variations of it)
<beach> Yeah.
<lisp123> I'm partial to that as well
<rotateq> The green multiple eyed alien is cute, but more unofficial maybe.
<beach> It was made by a real artist, and that person explicitly allowed us to use it freely. I forget the details.
<rotateq> Oh cool.
<lisp123> Nice
<hashfunc1880> rotateq: i use sbcl
<beach> rotateq: If you target only young nerds who are into sci-fi, then you can use that one. I personally think it is silly.
lagash has quit [Ping timeout: 252 seconds]
<rotateq> hashfunc1880: Okay so without a doubt you can use closer-mop there too like many other people. :)
<hashfunc1880> ah sbcl itself has alot of the mop functions it seems
<lisp123> I like its catchphrase "Made with secret alien technology" or something like that, but the 5 eyes is a lil bit off putting to me
jeosol has joined #commonlisp
<rotateq> beach: Ah no problem.
<lisp123> https://groups.google.com/g/comp.lang.lisp/c/dOS2dMSSTHg/m/9vvnfwFUOY0J -> thread on the lizard (nothing special, just in case someone wants to kill time reading the past)
<rotateq> hashfunc1880: closer-mop is a portable system that calls the implementation specific things, like with CFFI for the foreign function interface capabilities
<rotateq> lisp123: Just five? I thought nine.
<lisp123> rotateq: looks like it depends on the version, i can see the 9 one now as well
<rotateq> maybe the point of view :)
<hashfunc1880> rotateq: ok thanks
<rotateq> So it gives you to write portable code too.
waleee has quit [Remote host closed the connection]
hashfunc1880 has quit [Ping timeout: 240 seconds]
waleee has joined #commonlisp
waleee has quit [Ping timeout: 260 seconds]
waleee has joined #commonlisp
lisp123 has quit [Ping timeout: 272 seconds]
rgherdt has joined #commonlisp
waleee has quit [Ping timeout: 240 seconds]
waleee has joined #commonlisp
nature has joined #commonlisp
aartaka has joined #commonlisp
Josh_2 has joined #commonlisp
<Josh_2> Hey
<Josh_2> How do I write a (deftype <name> () `(satisfies <pred>)) in a defmacro?
<Josh_2> <pred> is generated by arguments passed to defmacro, I can get (satisfies <pred>) or `(satisfies ,<pred>) but not `(satisfies <pred>) :(
<aeth> you can use ' instead of ` in the deftype body
<Josh_2> ah
<Josh_2> I didnt know that, thanks
<aeth> np
<aeth> it's only ` by convention because sometimes you have to do something like this: (deftype <name> (x) `(simple-array 'double-float (,x)))
<aeth> and it looks better if you always use the `
semz_ is now known as semz
<aeth> but in a macro, nobody will see it
<Josh_2> Okay sweet, thanks for the info
waleee has quit [Ping timeout: 256 seconds]
waleee has joined #commonlisp
waleee has quit [Ping timeout: 240 seconds]
waleee has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
nature has quit [Remote host closed the connection]
waleee has joined #commonlisp
admich has joined #commonlisp
dieggsy has quit [Quit: You have been kicked for being idle]
waleee has quit [Ping timeout: 256 seconds]
waleee has joined #commonlisp
shka has joined #commonlisp
waleee has quit [Remote host closed the connection]
waleee has joined #commonlisp
lisp123 has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
waleee has joined #commonlisp
pve has joined #commonlisp
lisp123_ has joined #commonlisp
waleee has quit [Ping timeout: 260 seconds]
lisp123 has quit [Read error: Connection reset by peer]
lisp123 has joined #commonlisp
lisp123_ has quit [Ping timeout: 252 seconds]
nature has joined #commonlisp
cage has joined #commonlisp
rustacean has joined #commonlisp
razetime has quit [Ping timeout: 272 seconds]
lisp123 has quit [Remote host closed the connection]
prokhor__ has joined #commonlisp
<prokhor__> hi all
<prokhor__> Question: I am trying to get some old SW running.
<prokhor__> It defines a homedir:
<prokhor__> (defparameter *mysys-home* (make-pathname :directory
<prokhor__> (pathname-directory (or *load-pathname* (user-homedir-pathname)))))
<prokhor__> then it defines some logical host:
<prokhor__> (setf (logical-pathname-translations "MYSYS")
<prokhor__> (list (list "**;*.*"
<prokhor__> (merge-pathnames "**/*.*" *mysys-home*))))
<prokhor__> when i use (translate-logical-pathname "mysys:test.lisp") it works fine...
<prokhor__> unfortunately, that old code uses e.g. (load "mysys:test"),
<prokhor__> when I try sth like: (translate-logical-pathname "MYSYS:A;B;C.D")
<prokhor__> it always complains:
<prokhor__> *** - TRANSLATE-PATHNAME: replacement pieces ((:DIRECTORY "a" "b") "c" "d" NIL) do not fit into
<prokhor__> #P"/home/prokhor/**/*.*"
<prokhor__> how can i get (load "mysys:test") to work for /home/user/test.lisp ?
<prokhor__> i am talking about clisp -sry, forgot to mention
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
dra has joined #commonlisp
Dynom has joined #commonlisp
Oddity has quit [Ping timeout: 240 seconds]
dbotton has quit [Quit: Connection closed for inactivity]
rain3 has quit [Remote host closed the connection]
<pjb> prokhor__: you need an entry for "**;*"
<cage> Hi! can i build and executable with ASDF passing the build-path to asdf:make as: (asdf:make :foo :build-pathname "../foo")?
treflip has joined #commonlisp
tyson2 has joined #commonlisp
rgherdt has quit [Ping timeout: 260 seconds]
wacki has joined #commonlisp
random-nick has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
s-liao has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
dlowe has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
rustacean is now known as razetime
razetime has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
razetime has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
razetime has quit [Read error: Connection reset by peer]
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
yewscion has joined #commonlisp
razetime has joined #commonlisp
Everything has quit [Quit: leaving]
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
s-liao has joined #commonlisp
Bike has joined #commonlisp
igemnace has joined #commonlisp
kevingal has joined #commonlisp
aeth has quit [Ping timeout: 260 seconds]
aeth has joined #commonlisp
phantomics has joined #commonlisp
s-liao has quit [Quit: Client closed]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
s-liao has joined #commonlisp
treflip has quit [Remote host closed the connection]
gxt has quit [Ping timeout: 240 seconds]
gxt has joined #commonlisp
dbotton has joined #commonlisp
s-liao has quit [Quit: Client closed]
psf has quit [Ping timeout: 252 seconds]
psf has joined #commonlisp
kevingal has quit [Ping timeout: 250 seconds]
domovod has joined #commonlisp
rain3 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
rawley has joined #commonlisp
igemnace has quit [Remote host closed the connection]
prokhor has joined #commonlisp
lagash has joined #commonlisp
kevingal has joined #commonlisp
wacki has quit [Remote host closed the connection]
waleee has joined #commonlisp
lisp123 has joined #commonlisp
mon_aaraj has quit [Ping timeout: 272 seconds]
mon_aaraj has joined #commonlisp
wacki has joined #commonlisp
lisp123 has quit [Ping timeout: 245 seconds]
waleee has quit [Ping timeout: 250 seconds]
fitzsim has joined #commonlisp
waleee has joined #commonlisp
mon_aaraj has quit [Ping timeout: 250 seconds]
mon_aaraj has joined #commonlisp
aeth has quit [Ping timeout: 250 seconds]
tyson2 has joined #commonlisp
aeth has joined #commonlisp
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
waleee has quit [Ping timeout: 245 seconds]
waleee has joined #commonlisp
kevingal has quit [Ping timeout: 252 seconds]
waleee has quit [Ping timeout: 250 seconds]
waleee has joined #commonlisp
waleee has quit [Quit: WeeChat 3.4.1]
razetime has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
tyson2 has quit [Remote host closed the connection]
domovod has quit [Quit: WeeChat 3.4]
tyson2 has joined #commonlisp
parjanya has quit [Ping timeout: 268 seconds]
rain3 has quit [Ping timeout: 240 seconds]
treflip has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
Guest98 has joined #commonlisp
treflip has quit [Remote host closed the connection]
<Guest98> Hi everyone, is there a way for me to turn a lambda list that a function returns into a function object that I can call in another function ? :)
<Bike> what about the code? a function has code, not just a lambda list.
<Guest98> if my function returns a lambda list, how can I call it as a function
<beach> Do you mean "lambda expression" rather than "lambda list"?
<rotateq> Yes I wondered what could be meant by that.
<Guest98> I guess, I was told it was a lambda list elsewhere, I can show you the error code but where should I post it ?
<beach> (funcall (compile nil <lambda-expression>) ...)
<beach> Guest98: The lambda list is just the list of parameters.
<beach> You can't call a list of parameters.
<Guest98> OH not thats not what I want
<Guest98> its an actual lambda expression
<Guest98> let me try this compile function
<beach> Then compile it and call the result.
<beach> Don't hesitate to have a look in the glossary for "lambda list" and "lambda expression".
<Guest98> Will do
<Guest98> Seems like it worked but its telling me I have a compilation error, Ill try for a while and get back to you guys if I get stuck again, thanks  :)
<Guest98> By glossary you mean the cliki ?
<rotateq> No the hyperspec.
<Guest98> oooh the CLHS okay thanks
<rotateq> So the official ANSI specification for Common Lisp.
<Guest98> yep, I see now, thanks
<rotateq> good :)
<Guest98> Its working now btw, thanks everyone
tyson2 has quit [Remote host closed the connection]
<rotateq> You mean really working or that it doesn't give warnings or signal errors anymore? :)
Colleen has quit [Quit: Colleen]
pjb has quit [Read error: Connection reset by peer]
knusbaum has joined #commonlisp
simendsjo has joined #commonlisp
jack_rabbit has quit [Ping timeout: 256 seconds]
jack_rabbit has joined #commonlisp
knusbaum has quit [Ping timeout: 268 seconds]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
simendsjo has quit [Ping timeout: 268 seconds]
Colleen has joined #commonlisp
triffid has quit [Ping timeout: 240 seconds]
triffid has joined #commonlisp
Oddity has joined #commonlisp
kevingal has joined #commonlisp
rawley has quit [Ping timeout: 252 seconds]
Bike has quit [Quit: Connection closed]
Bike has joined #commonlisp
amb007 has quit [Ping timeout: 268 seconds]
parjanya has joined #commonlisp
orestarod has joined #commonlisp
rgherdt has joined #commonlisp
wacki has quit [Quit: Leaving.]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
Dynom has quit [Quit: WeeChat 3.4]
rotateq has quit [Quit: ERC (IRC client for Emacs 27.2)]
admich has quit [Remote host closed the connection]
rawley has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
cosimone has joined #commonlisp
rawley has quit [Remote host closed the connection]
cosimone has quit [Read error: Connection reset by peer]
rawley has joined #commonlisp
masinter has joined #commonlisp
wyrd has quit [Ping timeout: 240 seconds]
perrierjouet has quit [Ping timeout: 272 seconds]
Algernon69 has joined #commonlisp
brandflake11 has joined #commonlisp
wyrd has joined #commonlisp
akoana has joined #commonlisp
Algernon69 has quit [Ping timeout: 252 seconds]
nature has quit [Ping timeout: 240 seconds]
jack_rabbit has quit [Ping timeout: 272 seconds]
cosimone has joined #commonlisp
knusbaum has joined #commonlisp
pjb has joined #commonlisp
orestarod has quit [Ping timeout: 252 seconds]
hashfunc1880 has joined #commonlisp
kevingal has quit [Remote host closed the connection]
raeda has quit [Quit: Leaving]
jack_rabbit has joined #commonlisp
knusbaum has quit [Ping timeout: 256 seconds]
kevingal has joined #commonlisp
aeth has quit [Ping timeout: 252 seconds]
aeth has joined #commonlisp
yewscion has quit [Ping timeout: 272 seconds]
pve has quit [Quit: leaving]
hhh92 has joined #commonlisp
perrierjouet has joined #commonlisp
Bike has quit [Quit: Lost terminal]
hineios has quit [Quit: The Lounge - https://thelounge.chat]
hhh92 has quit [Quit: Leaving]
hhh92 has joined #commonlisp
hhh92 has quit [Client Quit]
hineios has joined #commonlisp
trumae has joined #commonlisp
hhhh92 has joined #commonlisp
hhhh92 has quit [Client Quit]
flip214 has quit [Read error: Connection reset by peer]
hhhh92 has joined #commonlisp
Guest98 has quit [Quit: Client closed]
flip214 has joined #commonlisp
pillton has joined #commonlisp
MajorBiscuit has joined #commonlisp
szkl has joined #commonlisp
shka has quit [Ping timeout: 256 seconds]
biluga_felpucia has joined #commonlisp
Noisytoot has quit [Ping timeout: 250 seconds]
igemnace has joined #commonlisp
random-nick has quit [Ping timeout: 272 seconds]
tyson2 has joined #commonlisp
Noisytoot has joined #commonlisp
biluga_felpucia has quit [Quit: Leaving]
biluga_felpucia has joined #commonlisp
hhhh92 has quit [Remote host closed the connection]
biluga_felpucia has quit [Quit: Leaving]
hhhh92 has joined #commonlisp
dra has quit [Ping timeout: 252 seconds]