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/>
abrantesasf has joined #commonlisp
jello_pudding has quit [Ping timeout: 260 seconds]
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
mingus has quit [Ping timeout: 246 seconds]
habamax has joined #commonlisp
random-nick has quit [Remote host closed the connection]
jello_pudding has joined #commonlisp
random-nick has joined #commonlisp
dcb has quit [Quit: MSN Messenger 4.0.3]
dcb has joined #commonlisp
random-nick has quit [Ping timeout: 245 seconds]
karlosz has quit [Quit: karlosz]
abrantesasf has quit [Remote host closed the connection]
azimut has quit [Remote host closed the connection]
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
azimut has joined #commonlisp
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
habamax has joined #commonlisp
hineios4 has joined #commonlisp
hineios has quit [Ping timeout: 248 seconds]
hineios4 is now known as hineios
Inline has quit [Ping timeout: 248 seconds]
ronald has quit [Ping timeout: 245 seconds]
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
habamax has joined #commonlisp
ronald has joined #commonlisp
waleee has quit [Ping timeout: 244 seconds]
akoana has quit [Quit: leaving]
habamax has quit [Ping timeout: 248 seconds]
dcb has quit [Quit: MSN Messenger 4.0.3]
dinomug has joined #commonlisp
habamax has joined #commonlisp
contrapunctus has quit [Ping timeout: 260 seconds]
pranavats has quit [Ping timeout: 245 seconds]
contrapunctus has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
jonatack has quit [Ping timeout: 245 seconds]
montxero has joined #commonlisp
bilegeek has quit [Quit: Leaving]
Guest32 has joined #commonlisp
Guest32 has left #commonlisp [#commonlisp]
semarie has quit [Quit: WeeChat 4.0.3]
semarie has joined #commonlisp
azimut has quit [Ping timeout: 246 seconds]
wonko-the-sane has quit [Quit: leaving]
johnjaye has quit [Ping timeout: 246 seconds]
pve has joined #commonlisp
grawlinson has quit [Ping timeout: 246 seconds]
pranavats has joined #commonlisp
mingus has joined #commonlisp
rtypo has quit [Ping timeout: 246 seconds]
Posterdati has quit [Remote host closed the connection]
Posterdati has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
shka has joined #commonlisp
grawlinson has joined #commonlisp
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
habamax has joined #commonlisp
grawlinson has quit [Ping timeout: 248 seconds]
grawlinson has joined #commonlisp
msavoritias has joined #commonlisp
rgherdt has joined #commonlisp
hernan_ has joined #commonlisp
ElKowar3 has joined #commonlisp
nyx_land_ has joined #commonlisp
Shinmera- has joined #commonlisp
semz_ has joined #commonlisp
equwal_ has joined #commonlisp
mister_m_ has joined #commonlisp
Perflosopher has joined #commonlisp
leeb- has joined #commonlisp
enzutwo has joined #commonlisp
tasty_ has joined #commonlisp
tasty_ has quit [Changing host]
tasty_ has joined #commonlisp
overclucker_ has joined #commonlisp
fiddlerwoaroof has joined #commonlisp
dstein64- has joined #commonlisp
etimmons_ has joined #commonlisp
light_ has joined #commonlisp
hefner_ has joined #commonlisp
aeth_ has joined #commonlisp
ronald has quit [*.net *.split]
semz has quit [*.net *.split]
tasty has quit [*.net *.split]
ElKowar has quit [*.net *.split]
Perflosopher5 has quit [*.net *.split]
dstein64 has quit [*.net *.split]
equwal has quit [*.net *.split]
enzuru has quit [*.net *.split]
etimmons has quit [*.net *.split]
aeth has quit [*.net *.split]
nyx_land has quit [*.net *.split]
fiddlerw- has quit [*.net *.split]
overclucker has quit [*.net *.split]
hefner has quit [*.net *.split]
mister_m has quit [*.net *.split]
light has quit [*.net *.split]
Colleen has quit [*.net *.split]
saturn2 has quit [*.net *.split]
hernan has quit [*.net *.split]
leeb has quit [*.net *.split]
Shinmera has quit [*.net *.split]
ElKowar3 is now known as ElKowar
equwal_ is now known as equwal
nyx_land_ is now known as nyx_land
mister_m_ is now known as mister_m
semz_ is now known as semz
dstein64- is now known as dstein64
Shinmera- is now known as Shinmera
leeb- is now known as leeb
saturn3 has joined #commonlisp
Colleen has joined #commonlisp
ronald has joined #commonlisp
etimmons_ is now known as etimmons
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
habamax has quit [Ping timeout: 256 seconds]
msavoritias has quit [Ping timeout: 260 seconds]
easye has quit [Remote host closed the connection]
easye has joined #commonlisp
igemnace has joined #commonlisp
hineios5 has joined #commonlisp
speskk has quit [Quit: Ping timeout (120 seconds)]
speskk has joined #commonlisp
hineios has quit [Ping timeout: 256 seconds]
hineios5 is now known as hineios
attila_lendvai has joined #commonlisp
resttime has quit [Changing host]
resttime has joined #commonlisp
dinomug has quit [Remote host closed the connection]
saturn3 is now known as saturn2
aeth_ is now known as aeth
msavoritias has joined #commonlisp
LW has joined #commonlisp
LW has quit [Client Quit]
dino_tutter has joined #commonlisp
donleo has joined #commonlisp
msavoritias has quit [Ping timeout: 260 seconds]
azimut has joined #commonlisp
mingus has quit [Ping timeout: 256 seconds]
mingus has joined #commonlisp
mgl has joined #commonlisp
pawa2 has joined #commonlisp
msavoritias has joined #commonlisp
fosskers has joined #commonlisp
mgl has quit [Quit: Client closed]
dnhester has joined #commonlisp
varjag has joined #commonlisp
<dnhester> Hi, I'm using `(get-properties place indicator-list)` and I'm interested in the `tail` which is a plist based on the indicator-list, and for some reason it's returning the first value, then the second, and third, but not as a list, no matter what I do, I can't access the tail, I've even wrapped the function in a (list ) and it still just has the
<dnhester> first return value of get-properties. Any ideas??
<dnhester> I'm using sbcl 2.3.4, maybe it's an implementation error??
<splittist> what about multiple-values-list ?
<splittist> (that's MULTIPLE-VALUE-LIST, of couse - no S)
<splittist> dnhester: the point being, GET-PROPERTIES is returning three values, not a three-member list
msavoritias has quit [Ping timeout: 240 seconds]
msavoritias has joined #commonlisp
habamax has joined #commonlisp
<splittist> dnhester: if you want just the tail, then (NTH-VALUE 2 (GET-PROPERTIES ...)) will work.
lucasta_ has joined #commonlisp
montxero has quit [Quit: Client closed]
<dnhester> splittist I tried `(third)` and it didn't work. I just figured now using `(multiple-value-bind)` works, but will try doing the nth-value, I thought that was to access the nth element of a list
<dnhester> Oh, I just read the docs on it, thanks!!!
<dnhester> it works! thanks so much! :D
random-nick has joined #commonlisp
<splittist> dnhester: you can have a look at http://www.lispworks.com/documentation/HyperSpec/Body/03_ag.htm for more on multiple values
<ixelp> CLHS: Section 3.1.7
<dnhester> What is the difference between `:` and `#:` as prefixes to symbols, I'm trying to google it but google is not being nice with my quotes, so the results are lousy, any docs will be appreciated!
<dnhester> @splittist thanks!
<dnhester> @splittist btw this is extremely confusing, why would they do this for `get-properties` if the whole point is to get the tail, if I wanted to get the first or second return value I would just use `getf`
<dnhester> Also, why wouldn't a function just return a list instead of having to use a special form??
davidbe has joined #commonlisp
<semz> dnhester: :foo is the (unique) symbol of name "FOO" that is interned in the "KEYWORD" package. It will always* be the same symbol every time it is read. #:foo gives you a fresh symbol of the name "FOO" that isn't interned anywhere. It'll be a different symbol every time it is read. So you'd have (eq ':foo ':foo) but never (eq '#:foo '#:foo).
<semz> * barring unintern shenanigans, but please don't unintern things from the KEYWORD package
<dnhester> @semz thanks! just solved an issue with that, the correct way was to use `intern`
<dnhester> I was using `make-symbol` and it was causing issues
herjazz has joined #commonlisp
<dnhester> @semz nope, still no luck. for some reason I have a string, and I have to provide a symbol with the name of that string, but when doing `make-symbol` I was getting a `#:ID` instead of `:ID`, but doing `intern` is not giving me `:ID`
<dnhester> How can I get just a simple `:ID`
<dnhester> ?
<semz> INTERN defaults to the current package, but the package for symbols like :foo is called KEYWORD. (intern "FOO" "KEYWORD") would produce :foo
<dnhester> ah, thanks!
<dnhester> @semz finally, it works, thanks for the explanation. Why are only symbols interned in KEYWORD have the colon, whereas symbols interned elsewhere do not?
<dnhester> Shoot, I have to run, will be back in a few hours
<beach> dnhester: You are confused. The colon character is not part of the symbol name. A symbol qualified by its package is usually written <package-name>:<symbol-name> and the colon is the "package marker". The reader uses special syntax :<symbol-name> as a shorthand for KEYWORD:<symbol-name>.
dnhester has quit [Ping timeout: 246 seconds]
<beach> dnhester: The reasons not to always return a list are: 1. Then memory would be allocated every time the function is called, and 2. A caller who wants to use only the first value would then have to take apart the list, whereas with multiple values, the remaining values can just be ignored.
msavoritias has quit [Ping timeout: 246 seconds]
mingus has quit [Ping timeout: 246 seconds]
szkl has joined #commonlisp
pfdietz has quit [Quit: Client closed]
msavoritias has joined #commonlisp
zxcvz has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
<MetaYan> beach: Thanks for the well-formulated explanation about multiple values. Caused a nice flash of insight here.
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
varjag has joined #commonlisp
fosskers has quit [Ping timeout: 246 seconds]
msavoritias has quit [Ping timeout: 252 seconds]
thuna` has joined #commonlisp
kevingal has joined #commonlisp
bitspook has joined #commonlisp
msavoritias has joined #commonlisp
jmdaemon has quit [Ping timeout: 245 seconds]
bitspook` has joined #commonlisp
bitspook has left #commonlisp [ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
bitspook` has left #commonlisp [#commonlisp]
karlosz has joined #commonlisp
pranavats has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
notzmv has joined #commonlisp
mingus has joined #commonlisp
<beach> Great!
johnjaye has joined #commonlisp
pranavats has joined #commonlisp
pawa2 has quit [Quit: leaving]
jonatack has joined #commonlisp
aartaka has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
tyson2 has joined #commonlisp
markb1 has quit [Ping timeout: 248 seconds]
mingus1 has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
mingus has quit [Ping timeout: 246 seconds]
mingus1 is now known as mingus
edgar-rft is now known as emacs-people
emacs-people is now known as edgar-rft
markb1 has joined #commonlisp
igemnace has quit [Read error: Connection reset by peer]
<varjag> is there any quick way to list all dependencies for an asdf system?
pfdietz has joined #commonlisp
<beach> (asdf/system:system-depends-on <system>)
<varjag> thanks!
<beach> Sure.
Oladon has joined #commonlisp
<varjag> ok these are only direct dependencies tho
<varjag> guess i can walk it down..
<beach> I see. I know of no existing function to do the recursion for you. But maybe it exists.
<splittist> also exported from asdf (so you can say asdf:system-depends-on). At least, it used to be.
habamax has quit [Remote host closed the connection]
igemnace has joined #commonlisp
mgl has joined #commonlisp
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
herjazz has quit [Quit: leaving]
tyson2 has quit [Remote host closed the connection]
<jcowan> beach: there is no guarantee that returning multiple values does not allocate
mgl has quit [Quit: Client closed]
<beach> jcowan: Did I say that?
<beach> I said, if it returns a list, it *does* allocate. I said nothing about the other case.
msavoritias has quit [Ping timeout: 252 seconds]
<jcowan> It is implicated though not implied
<beach> You are putting words in my mouth.
<jcowan> No, I am making a reasonable (but incorrect) inference from what you said.
<beach> jcowan: It would have been much better if you had told dnhester that, which many high-quality implementation will manage to avoid allocating memory, at least for not too many return values, with multiple values, it would not be generally possible to avoid allocation if a list were to be returned, rather than telling me something I did not say, and that I fully understand since I am writing a Common Lisp system.
<beach> s/which/while/
<beach> jcowan: And I am pretty sure, or at least I hope, that you know that I do know these things, so that you already knew that it was unnecessary to tell it to me.
dnhester has joined #commonlisp
<jcowan> Of course. But since dnhester wasn't connected at the time (they are now), I couldn't tell them anything, and I was pointing out (somewhat elliptically) that what you said was misleading (as distinct from it being wrong).
<beach> Again, then don't point that out to me, please.
<splittist> What is the history of multiple values? Are there any other languages that provide such a facility? (He asks desperately.)
<jcowan> Once was enough. But since you take offense when I did not intend to give it, I will not mention your errors in rhetoric any more, though they are just as much errors as errors in grammar or logic.
<beach> Oh, so you really meant something like "Your remark implicitly suggests that multiple values do not require allocation, but you obviously know that that is not always the case, so you should be more careful in the future to make sure no such implicit suggestions are made, so as to avoid misleading people like dnhester"? That is quite different.
<jcowan> That is what I meant, yes.
dnhester has quit [Quit: Client closed]
<beach> Well, then, you should be more careful in the future not to make a remark with a subject that is quite different from the one that you intended.
<jcowan> splittist: Returning multiple values using variables passed by reference is as old as Fortran, and returning them using pointers is as old as Algol 68. But I know of no language that treats them specially other than the Lisps.
Oladon has quit [Quit: Leaving.]
<splittist> jcowan: makes sense
<jcowan> splittist: Other than Scheme, I don't think so. Python speaks of returning multiple values, but they are
msavoritias has joined #commonlisp
<splittist> From CLtL2, Lisp Machine Lisp had multiple values.
<splittist> Or, from CLHS 1.1.2 "Sophisticated lambda lists, setf, multiple values, and structures like those in Common Lisp are the results of early experimentation with programming styles by the Lisp Machine group. Jonl White and others migrated these features to MacLisp."
donleo has quit [Remote host closed the connection]
donleo has joined #commonlisp
* jcowan nods
mgl has joined #commonlisp
<jcowan> Lua has CL-style multiple values, except that wrapping a multiple-valued expression in (otherwise redundant) parentheses reduces it to a single value.
<jcowan> So that is an exception to "just Lisp"
jonatack has quit [Ping timeout: 244 seconds]
rtypo has joined #commonlisp
tyson2 has joined #commonlisp
<splittist> Depending on what "CL-style" means (: "There is absolutely no way in Common Lisp for a caller to distinguish between returning a single value in the ordinary manner and returning exactly one ``multiple value.'' For example, the values returned by the expressions (+ 1 2) and (values (+ 1 2)) are identical in every respect: the single value 3." (CLtL2 7.10.1)
dnhester has joined #commonlisp
<dnhester> @beach @jcowan @splittis thanks for the explanations!
<beach> Pleasure.
<dnhester> On the point above (this is extremely confusing, why would they do this for `get-properties` if the whole point is to get the tail, if I wanted to get the first or second return value I would just use `getf`) though, beach do you have any idea? It seems like a blunder to me
<beach> dnhester: I don't think that's the only reason to use GET-PROPERTIES.
<dnhester> beach ah ok, other use cases, thanks
<beach> dnhester: It is also useful if you just want the first indicator among a list of indicators passed as a value.
<beach> Or if you want the first indicator and the first value.
<dnhester> Btw, an unrelated question: I have a Object which I'm encoding into JSON, and I have a list of objects to add to that object (because of a hasMany type relationship in the DB), how would I go about adding it to the Object before it gets encoded into JSON so that it's encoded as part of the object in JSON?
<beach> It would depend on how your object is represented.
<beach> If it is represented as a list, you could use APPEND or CONS.
<jcowan> splittist: That rule holds in Lua as well. By "CL-style" I meant that if more than one value is returned where one value is expected, all but the first value are implicitly dropped; if no values are returned, the value NIL is supplied. In Scheme, both of these situations are undefined-behavior, and most Schemes report an error.
<dnhester> beach I hear, but wouldn't that be easier with `(first indicators)` and `(getf (first indicators) plist)`, I understand it's two functions, but `get-properties`'s definition seems to be mainly for the `tail` case not for the first two return values, those seem like after thoughts after reading the definition of `get-properties`
<jcowan> Conceptually, returning multiple values is just the dual of accepting multiple arguments: if you return multiple values to your caller, it is equivalent to invoking your continuation with multiple arguments.
<beach> dnhester: Are you saying your object is represented as a plist?
<jcowan> ML and Haskell use currying so that all functions accept one argument and return one value.
<dnhester> beach it's represented as a CLOS Object, should I turn it into a list? how?
<splittist> jcowan: OK. But doesn't Lua require the extra parens around the call exactly in the case of expecting a single value and getting multiple?
<beach> dnhester: You probably mean that your object is represented as an instance of a standard class. Then your class should have slots for the things you want added, no?
<beach> dnhester: I am a bit lost as to why you talk about plists when you want to turn an instance of a standard class into a JSON thing.
<dnhester> beach, since it's a class that persists to a DB, and it's a 1-N relationship where the N table holds the reference to the 1 table, but when encoding it to JSON I want to include all the N values as a list part of the 1 object. I hope this is clear
<jcowan> No, in the sense that if "foo" returns 3 values, then "1 + foo()" will add 1 to the first value returned. The extra ()s are wanted when you want your function to return exactly one value after it tail-calls something that might return more: "return (foo())" will always return one value.
<beach> dnhester: The indicator in (FIRST INDICATORS) is not necessarily the first indicator on the plist that is a member of the INDICATORS list.
<dnhester> beach, sorry, the plist comment was related to the previous conversations about `get-properties` a few hours ago, my bad
<dnhester> not about the new question about json encoding
<beach> I see.
<beach> dnhester: I think you miss the logic about GET-PROPERTIES. It doesn't find the indicator in PLIST that is first in INDICATORS. It finds the first indicator on PLIST that is a member of INDICATORS.
abrantesasf has joined #commonlisp
<dnhester> beach ah, ok, now I get it (referring to the previous conversation about `get-properties`
<dnhester> thanks!
<jcowan> so (foo()) is the Lua spelling of (values (foo))
<beach> dnhester: Sure.
<beach> dnhester: With respect to your DB, I am lost. I no longer know to which object you want to add things.
<splittist> jcowan: OK. I'm really not understanding the 'note' halfway down this page: https://riptutorial.com/lua/example/4082/multiple-results
<ixelp> Lua Tutorial => Multiple results
<splittist> (Not that I'm sure I want to...)
<beach> dnhester: And I don't know anything about the tables you mention.
<beach> dnhester: From what you said, you want to add things to an object, and the object is an instance of a standard class. Then you just make sure you class has a slot for each thing you want to add, and then you just set the relevant slot.
<beach> I don't see any other interpretation of adding things to an instance of a standard class.
<splittist> dnhester: or just don't have an instance of a standard class between the result of the DB query and the JSON output
<jcowan> splittist: Tables are evidently a special case in Lua (I didn't know that, it may be a recent feature)
<dnhester> beach sorry, I'll try to explain better: I have an CLOS Object a1 I got from table A in a DB, I have a lists of objects related to the object a1 from a table B in the DB [b1, b2, ..., bn]. Now I would like to encode Object a1 to JSON, yet include the list [b1, ..., bn] as part of that JSON encoded object. Can I add a temporary field to an Object
<dnhester> for it to be encoded? Should I create another class that inherits from the first class and has that additional field? I just found something in the docs that may be related https://github.com/fukamachi/mito#class-definitions it talks about ` :ghost` is that some concept in common lisp relevant to this?
<ixelp> GitHub - fukamachi/mito: An ORM for Common Lisp with migrations, relationships and PostgreSQL support
<dnhester> splittist thanks for the idea
<jcowan> note the previous case of {foo()} insertng all the values rather than just the first value
<pfdietz> If you wanted to dynamically add slots to an object, you could create a new subclass with those slots and change-class the object to that new subclass.
<dnhester> pfdietz thanks, that's what I was wondering, I thought there might be a simpler way
<pfdietz> You could maybe also do something with MOP.
<Shinmera> just don't use objects
<beach> dnhester: I'll let others try to answer since I am still lost. Just one thing, the term "CLOS object" is meaningless since every Common Lisp datum is an object and an instance of a class, though not necessarily of a standard class.
<Shinmera> or standard-objects, rather
mingus1 has joined #commonlisp
<dnhester> I just found the docs in the source code "Option to specify slots as ghost slots. Ghost slots do not depend on a database."
<dnhester> So I can just modify the original class, thanks everyone!
msavoritias has quit [Ping timeout: 252 seconds]
mingus has quit [Ping timeout: 246 seconds]
mingus1 is now known as mingus
<jcowan> beach: What do you think is the best terminology for instances of classes defined with `class`? (This is not a rhetorical question.)
<beach> Define with DEFCLASS you mean?
<jcowan> yes
<jcowan> (Mixing terminology is a risk when you have too many languages in mind.)
<beach> By default, I call such an instance "an instance of a standard class".
<beach> Sure.
Inline has joined #commonlisp
<jcowan> Even though, say, hash tables might be instances of a standard class?
<beach> "standard object" won't do, because there are standard objects that are not instances of standard classes.
<beach> Yes, well, if the implementation represents hash tables that way, that's what they are. But I would often like to be more precise about hash tables and use "system class", to account for the possibility that they are not.
<beach> ... not instances of a standard class, I mean.
<jcowan> Right. So we might speak of "non-system classes/instances" or even of "user classes/instances".
<beach> I guess so. I guess all user-defined classes are standard classes, unless I am missing something.
<jcowan> I'm not sure of that. A class whose metaclass is not a subclass of standard-class would not be a standard class.
<bjorkintosh> aren't these things defined somewhere already?
<beach> Indeed. Structure classes and such.
lucasta_ has quit [Ping timeout: 246 seconds]
<beach> jcowan: And condition types, if you accept that they are classes.
<beach> bjorkintosh: The thing is that the standard uses the term "system class" which gives the implementation the choice of representing such a class in a special way, or using a standard class.
<beach> bjorkintosh: It gets more complicated still, because a system class may be a subclass of STANDARD-OBJECT even though it is not a standard class.
<bjorkintosh> ah.
<bjorkintosh> thanks for the clarification, beach.
<beach> Sure.
mgl has quit [Quit: Client closed]
<beach> bjorkintosh: Most Common Lisp implementations probably represent most system classes in a special way, simply because they were initially written before the standard, so CLOS was not part of Common Lisp then.
<beach> bjorkintosh: But for a new implementation like SICL, there are more choices available that will simplify the system.
<jcowan> Okay. Then since "CLOS" is not a formally defined term, but is generally understood to mean the parts of CL that specify DEFCLASS/DEFMETHOD/etc., we may informally define "CLOS class/object" as equivalent to "user-defined class/object", i.e. "a class/object of a class that is defined by DEFCLASS", possibly qualified by "with a metaclass of STANDARD-CLASS".
<beach> bjorkintosh: For example, HASH-TABLE in SICL is a subclass of STANDARD-OBJECT because it is represented in the same way as other standard objects. But it is not a standard class, because I don't necessarily want to allow things like CHANGE-CLASS or the creation of subclasses.
msavoritias has joined #commonlisp
<beach> jcowan: We could do that, but I don't like it, since the very concept of a class was introduced by CLOS. So, to me, every class is a CLOS class, which makes the term meaningless.
<jcowan> What I had in mind earlier was that an implementation might provide built-in metaclasses other than STANDARD-CLASS, STRUCTURE-CLASS, or BUILT-IN-CLASS. I don't know of any.
<beach> jcowan: Plus, you would then exclude classes that are created by MAKE-INSTANCE on STANDARD-CLASS not using DEFCLASS.
<bike> funcallable-standard-class
<jcowan> "and their subclasses", I meant. But good point.
<jcowan> beach: Hmm, I didn't consider that. I guess you can instantiate such a nameless class even though you can't subclass it.
<jcowan> So it is a second-class class. -)
<jcowan> arrgh, damn : key
<jcowan> standard-class is very underspecified
<beach> jcowan: You can also subclass it. You just pass a list of superclasses to MAKE-INSTANCE.
<beach> Oh, but wait, that may require some MOP stuff.
<beach> I can never keep them apart.
<jcowan> Yes, make-instance accepts a clas or a class name
dnhester has quit [Quit: Client closed]
<jcowan> I guess in practice you would only want a metaclass which is a subclas of standard-class.
<beach> For user stuff, I think so yes.
<jcowan> That's where Smalltalk keeps class variables: they are instance variables of the metaclass. Consequently, there is a distinct metaclass for each class.
<beach> Same in Common Lisp. CLASS-OF gives you the metaclass when applied to a class.
<jcowan> Right, but they aren't typically all distinct.
<beach> Oh, I see. Sure.
<jcowan> I should say, the metaclass of all classes tha tare not themselves metaclasses are distinct. The metaclass of all metaclasses is a special class Metaclass.
<beach> I see. I guess STANDARD-CLASS plays that role in Common Lisp.
jonatack has joined #commonlisp
<jcowan> so (class (class SomeClass)) == Metaclass for all (ordinary) classes. This is a fixpoint equation
<beach> (EQ (CLASS-OF (FIND-CLASS 'STANDARD-CLASS)) (FIND-CLASS 'STANDARD-CLASS)) => T
<pfdietz> make-instance is a generic function, so one can define additional methods as long as there's at least one argument that's not a direct instance of a standard class.   So, you could not pass a list as the class name, but you could pass some object of a user-defined class.
<pfdietz> By "one" I mean "a conforming program".
tyson2 has quit [Remote host closed the connection]
<jcowan> Good point.
<jcowan> In ST rather than the dichotomy of standard vs. built-in, you have standard vs. meta: an ordinary class cannot function as a metaclass.
<jcowan> (There are built-in classes, notably fixnum, but that's an implementation detail)
<jcowan> THere are also magic methods: thus (if-then-else p (lambda () ...) (lambda () ...)) will not work if p is not a boolean and the other two arguments are not lambdas.
abrantesasf has quit [Remote host closed the connection]
<jcowan> by "is not a boolean" I mean "is not an instance of class Boolean"
<jcowan> which has exactly two instances
<jcowan> Note that this is logically speaking implemented by method dispatch: in class True, it invokes the second argument and in class False it invokes the third argument. But in fact it is handled by the compiler.
dino_tutter has quit [Ping timeout: 256 seconds]
mgl has joined #commonlisp
donleo has quit [Ping timeout: 252 seconds]
dnhester has joined #commonlisp
dnhester has quit [Quit: Client closed]
davidbe has quit [Quit: Connection closed for inactivity]
mgl has quit [Quit: Client closed]
pranavats has joined #commonlisp
tyson2 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
dcb has joined #commonlisp
tyson2 has joined #commonlisp
NotThatRPG has joined #commonlisp
pve has quit [Ping timeout: 246 seconds]
igemnace has quit [Quit: WeeChat 4.0.3]
pve has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
pranavats has left #commonlisp [Error from remote client]
perrierjouet has quit [Quit: WeeChat 4.0.3]
mgl has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
rgherdt has joined #commonlisp
Pixel_Outlaw has joined #commonlisp
mgl has quit [Quit: Client closed]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rtypo has quit [Ping timeout: 248 seconds]
azimut has quit [Ping timeout: 246 seconds]
igemnace has joined #commonlisp
dino_tutter has joined #commonlisp
rtypo has joined #commonlisp
igemnace has quit [Quit: WeeChat 4.0.4]
kevingal has quit [Ping timeout: 246 seconds]
Volt_ has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
donleo has joined #commonlisp
_cymew_ has joined #commonlisp
tyson2 has joined #commonlisp
dino_tutter has quit [Ping timeout: 245 seconds]
malleriy has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
NotThatRPG has joined #commonlisp
malleriy has quit [Remote host closed the connection]
msavoritias has quit [Remote host closed the connection]
waleee has joined #commonlisp
tyson2 has joined #commonlisp
dcb has quit [Quit: MSN Messenger 4.0.4]
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
_cymew_ has quit [Ping timeout: 246 seconds]
igemnace has joined #commonlisp
dino_tutter has joined #commonlisp
pfdietz has quit [Quit: Client closed]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pfdietz has joined #commonlisp
attila_lendvai has quit [Ping timeout: 248 seconds]
pfdietz has quit [Ping timeout: 246 seconds]
tyson2 has quit [Remote host closed the connection]
jmdaemon has joined #commonlisp
donleo has quit [Ping timeout: 246 seconds]
donleo has joined #commonlisp
`Pixel_Outlaw has joined #commonlisp
Pixel_Outlaw has quit [Ping timeout: 252 seconds]
pfdietz has joined #commonlisp
tyson2 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
zxcvz has joined #commonlisp
attila_lendvai has joined #commonlisp
jon_atack has joined #commonlisp
jonatack has quit [Read error: Connection reset by peer]
zxcvz has quit [Quit: zxcvz]
attila_lendvai has quit [Ping timeout: 245 seconds]
masinter has quit [Ping timeout: 246 seconds]
masinter has joined #commonlisp
rgherdt has quit [Quit: Leaving]
NotThatRPG has joined #commonlisp
NotThatRPG has quit [Ping timeout: 248 seconds]
NotThatRPG has joined #commonlisp
notzmv has quit [Ping timeout: 246 seconds]
NotThatRPG has quit [Ping timeout: 246 seconds]
azimut has joined #commonlisp
igemnace has quit [Quit: WeeChat 4.0.4]
pve has quit [Quit: leaving]
shka has quit [Ping timeout: 244 seconds]
dino_tutter has quit [Ping timeout: 252 seconds]
sloanr has joined #commonlisp
NotThatRPG has joined #commonlisp
NotThatRPG has quit [Ping timeout: 248 seconds]
defaultxr has joined #commonlisp
pfdietz has quit [Ping timeout: 246 seconds]
thuna` has quit [Remote host closed the connection]
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
dra has joined #commonlisp
dra has quit [Changing host]
dra has joined #commonlisp
pfdietz has joined #commonlisp
donleo has quit [Ping timeout: 248 seconds]
karlosz has quit [Quit: karlosz]
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life has joined #commonlisp
sloanr has quit [Ping timeout: 252 seconds]
habamax has joined #commonlisp