tyson2 has quit [Remote host closed the connection]
dcb has quit [Quit: MSN Messenger v2.16.1]
avocadoist has quit [Read error: Connection reset by peer]
avocadoist has joined #commonlisp
avocadoist has quit [Client Quit]
avocadoist has joined #commonlisp
avocadoist has quit [Read error: Connection reset by peer]
avocadoist has joined #commonlisp
avocadoist has quit [Read error: Connection reset by peer]
avocadoist has joined #commonlisp
avocadoist has quit [Client Quit]
avocadoist has joined #commonlisp
Demosthenex has quit [Ping timeout: 240 seconds]
avocadoist has quit [Client Quit]
avocadoist has joined #commonlisp
Demosthenex has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
<mariari>
I really should make a bug report for ccl, their coverage tool can't handle unicode being in files
notzmv has joined #commonlisp
<beach>
Is there a maintainer for CCL these days?
<mariari>
I'd assume there is?
<beach>
Well, rme used to be the maintainer, but he hasn't been here for the past 5 years. But maybe he is just no longer using IRC, or maybe someone else took his place as the maintainer.
<mariari>
I like using ccl as my second compiler I test things on and to make sure my code is somewhat compliant
<mfiano>
The maintainer mentioned he didn't have anymore time a couple years ago.
<mfiano>
I'm not sure if that has changed.
<beach>
mariari: I see. Maybe if CCL is no longer maintained, you could use ECL instead, since jackdaniel is actively maintaining it. Or, I guess, you could take on the maintenance of CCL.
<mariari>
I really should use ECL as a third compiler I test against
Bike has quit [Ping timeout: 246 seconds]
minion has joined #commonlisp
minion has quit [Remote host closed the connection]
specbot has joined #commonlisp
specbot has quit [Remote host closed the connection]
minion has joined #commonlisp
minion has quit [Remote host closed the connection]
minion has joined #commonlisp
minion has quit [Remote host closed the connection]
specbot has joined #commonlisp
specbot has quit [Remote host closed the connection]
specbot has joined #commonlisp
specbot has quit [Remote host closed the connection]
minion has joined #commonlisp
minion has quit [Remote host closed the connection]
minion has joined #commonlisp
specbot has joined #commonlisp
<beach>
I can't figure out all the cases that EXPORT must handle. Suppose EXPORT is called in order to export SYMBOL from PACKAGE. Suppose that there is some package P that uses PACKAGE, and SYMBOL would cause a name conflict with some external symbol S in a package Q used by P. What resolutions are possible? The standard doesn't say.
<beach>
I am thinking: 1. Do not export SYMBOL from PACKAGE. 2. Import SYMBOL into P and make it a shadowing symbol. 3. Import S into P and make it a shadowing symbol. Any objections?
<mfiano>
There exists a DSL on SBCL to allow the user to configure what shall happen on package variance. I would be lost if I couldn't specify what should happen myself, on a per case basis.
avocadoist has quit [Quit: Konversation terminated!]
avocadoist has joined #commonlisp
_cymew_ has joined #commonlisp
<beach>
I see. Also, there might be several reasons for abandoning the EXPORT so the resolution in each case would have to be delayed until it is clear that the EXPORT should happen. And I can't even imagine what happens in the presence of threads. I suppose there must be some mutual exclusion so that only one thread can do these operations.
<mfiano>
That is the case on SBCL at least
Oladon has quit [Quit: Leaving.]
<mfiano>
There is a lock. I remember reading the package defining code recently and it does some crazy things, but the lock stuck out to me as needed.
<Alfr>
beach, I think you can't do 2, if P also exports S.
ym has joined #commonlisp
<beach>
Alfr: The specific case I mentioned is when S is not present in P, so it can't be exported. If S is present in P, then the dictionary entry on EXPORT says what to do.
Bike has joined #commonlisp
<Alfr>
beach, no, I mean that S external to Q which is used by P, not the SYMBOL we wish to export from PACKAGE.
<beach>
But S can not be exported by P unless it is present in P.
<beach>
And the specific case I mentioned is when S is not present in P, but only accessible by inheritance.
<Alfr>
beach, but you said above that P uses Q, thus S would be accessible in P.
<beach>
Accessible yes, but not present.
<beach>
The case when it is present is covered by the dictionary entry.
rgherdt has joined #commonlisp
<beach>
So I guess for this operation, a lock must be acquired for PACKAGE, P, and every Q that is used by P. Since the package graph is not necessarily acyclic, care must be taken here.
<Alfr>
beach, but you can export accessible symbols, not only present ones.
<jackdaniel>
re ECL maintanance, it is not only me, the bus factor is in fact 2 :) Marius Gerbershagen does a great work
<beach>
Alfr: But when you do, it becomes present.
<Alfr>
beach, ah ... got it, thanks. :)
<beach>
Sure.
Cymew has joined #commonlisp
pve has joined #commonlisp
avocadoist has quit [Ping timeout: 246 seconds]
rgherdt has quit [Read error: Connection reset by peer]
rgherdt has joined #commonlisp
shka has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
pranavats has joined #commonlisp
notzmv has quit [Ping timeout: 256 seconds]
igemnace has joined #commonlisp
avocadoist has joined #commonlisp
makomo has joined #commonlisp
LW has joined #commonlisp
LW has quit [Client Quit]
attila_lendvai has joined #commonlisp
easye has quit [Remote host closed the connection]
attila_lendvai has quit [Read error: Connection reset by peer]
karlosz has quit [Quit: karlosz]
attila_lendvai has joined #commonlisp
<phoe>
ym: varjag: read the iolib manual and install libfixposix first
<phoe>
this library is kind of notorious for having foreign C header dependencies
<phoe>
and it's notorious for having them at compilation time
<phoe>
s/this library/iolib/
<varjag>
will totally do if i ever get to using iolib
<phoe>
:D
random-nick has joined #commonlisp
<ym>
phoe, thanks, will try it.
<ym>
Wow! It works!
<ym>
Thanks again, phoe!
karlosz has joined #commonlisp
foretspaisibles has quit [Quit: Client closed]
attila_lendvai has quit [Read error: Connection reset by peer]
karlosz has quit [Client Quit]
karlosz has joined #commonlisp
attila_lendvai has joined #commonlisp
karlosz has quit [Ping timeout: 256 seconds]
waleee has joined #commonlisp
<ym>
Pointless though.
karlosz has joined #commonlisp
<pve>
Sometimes I'd like to have separately loadable modules, which would require an asd file per module. That's totally fine, but hypothetically, if everyone did so and the number of asd files in quicklisp went up by 10x, would it be a problem for asdf?
<pve>
or would it be a non-isssue?
<beach>
I don't think it is a problem. I have an ASDF file per module, and I have quite a lot of modules.
<pve>
beach: That's good to hear, thanks.
<beach>
Just for my own projects I have more than 500 ASDF system definitions.
notzmv has joined #commonlisp
<beach>
In total on my computer, I have more than 2000.
<phoe>
remember that you can always create asdf module objects in memory from some other source
<phoe>
ASDF:LOAD-ASD is just one way of doing that
<phoe>
if you have some means of automating that for your language/implementation then maybe that could work for you too
<pve>
so at startup, asdf only scans for any available asd files, but doesn't process them further?
<pve>
until load-system is called
<beach>
I think that's true.
karlosz has quit [Quit: karlosz]
<pve>
phoe: i've never considered creating modules some other way.. I wonder what cool things could be done with that.
tyson2 has joined #commonlisp
<phoe>
the ASD file is just a text description of what a module object should be like
<phoe>
you can create modules programmatically too, if the source code way is too cumbersome
<phoe>
I don't know how to utilize this fact in practice though
<pve>
I must admit that it can get a little tedious to make the asd files for each module, so I've resorted to a templating solution using quickproject :)
<phoe>
d'oh, I've been using it forever
<pve>
yea I've been using quickproject for a long time too, but now I made a little thing on top of quickproject to give a little extra convenience
<phoe>
how much? maybe it could get merged upstream eventually
szkl has joined #commonlisp
<pve>
basically I added a way to choose a template using a symbol from a directory of templates, so like (make-project "cool-idea" :template :basic) would take the template from "my-templates/basic/" and put the "cool-idea" into a default directory (from which I move it elsewhere if the cool idea works out)
NotThatRPG has joined #commonlisp
<pve>
also I added an :if-exists parameter for the target directory
<phoe>
sounds a bit closer to cl-project then
<phoe>
I assume it could work, yes
<pve>
oh, I don't know that one
makomo has quit [Ping timeout: 260 seconds]
<pve>
note that I didn't modify quickproject, I just made a tiny separate system specifically for "cool ideas" that may or may not work out, so I can quickly create them from the repl
<pve>
but then I noticed it works really well for making modules to existing systems too :)
<phoe>
yes, I see
makomo has joined #commonlisp
notzmv has quit [Ping timeout: 265 seconds]
azimut has joined #commonlisp
kami has joined #commonlisp
<kami>
Hello #commonlisp
<beach>
Hello kami.
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
dtman34 has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
dtman34 has joined #commonlisp
<knusbaum>
Hello!
piethesailor has joined #commonlisp
<knusbaum>
Is there a common way of expressing interfaces in common-lisp? Like a set of generic functions that form an "interface" you want to implement?
<knusbaum>
I ask because I'd like to be able to confirm at compile-time that I've specialized all of a set of generic functions on a type. That way I don't accidentally forget to implement something.
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
<beach>
Yes, you typically define a bunch of "protocol generic functions" and "protocol classes" and you export their names from a dedicated package.
<knusbaum>
Cool what makes a class a "protocol class"? I think I'm doing something similar like that now, where I just have an empty class which serves as an "abstract base class".
<beach>
That's fine.
<knusbaum>
Then I specialize my "protocol generic functions" on the base class and just throw an error.
Gleefre has quit [Ping timeout: 245 seconds]
<knusbaum>
But I'd like to be able to check that a "concrete" class actually specializes the generic functions.
<beach>
You don't have to do that. You will automatically get an error signaled (not "thrown") if there is no applicable method.
<knusbaum>
signaled, yes. Still trying to update my terminology from the C++/Java brain-worm. :)
<ixelp>
protest/base.lisp at master · phoe/protest · GitHub
<knusbaum>
Next, is this a reasonable thing to do?
<beach>
knusbaum: Sure.
<phoe>
(protest:define-protocol-class ...) for defining a class that is impossible to instantiate directly but possible to instantiate subclasses of
<knusbaum>
Cool. I don't just want to cargo-cult practices from the other OOP languages I've used.
<beach>
knusbaum: But usually, the test suite would immediately fail if some method is missing.
<knusbaum>
beach, Right. Tests should catch this. But I'd like to fail immediately on compile just in case I forget a test or something.
triffid has quit [Quit: triffid]
<knusbaum>
I'm forgetful and I need the computer's help to not do dumb things.
<knusbaum>
phoe, neat, I'll check out protest.
<beach>
knusbaum: That is going to be tricky in general, because not all generic functions have methods that specialize to all your instantiable classes.
<knusbaum>
Because of inheritance, presumably?
White_Flame has quit [Remote host closed the connection]
<beach>
Because your module could have several protocol classes and some generic functions may specialize to only one of them.
<phoe>
inheritance actually makes things a bit easier because of Liskov substitution principle
<knusbaum>
beach, I'm not following.
<phoe>
specializing on class X means that all subclasses of X are suitable there too
White_Flame has joined #commonlisp
<beach>
knusbaum: Imagine the typical scenario where you draw shapes on window-like things. You may have a protocol generic function say CONVEX-P that has a method that specialized only to SHAPE.
<knusbaum>
right.
<jackdaniel>
knusbaum: check out the idea of "traits"
<beach>
knusbaum: So any attempt to check whether CONVEX-P has a method that specializes to an instantiable subclass of WINDOW will fail.
<knusbaum>
beach, right, ok. That's what I was thinking.
<knusbaum>
because specializer-direct-generic-functions won't return CONVEX-P for window, since it's not specialized on the subclass.
<beach>
Exactly.
<knusbaum>
Even though I can call CONVEX-P on a window
<phoe>
you'll likely get NO-APPLICABLE-METHOD signaled at that point
<beach>
You could all it, but an error will be signaled.
<beach>
*call it
<beach>
knusbaum: So either way, there is some manual work to do, like make a list of which generic functions must have methods that specialize to which instantiable classes.
<knusbaum>
Ahh, but that's what I want. If window doesn't implement CONVEX-P
<phoe>
more like "if CONVEX-P has no method specializing on WINDOW"
<knusbaum>
beach, yes, that's exactly what I want. (ensure-implements 'class '(generic-function-1 generic-function-2))
<phoe>
in CL, methods don't belong to classes but to generic functions
<jackdaniel>
phoe: method is a specialization itself
<knusbaum>
phoe, yes I know. Just sloppy wording, sorry.
<phoe>
jackdaniel: aaaaa
<phoe>
more like "if CONVEX-P has no specialization on WINDOW"
<phoe>
knusbaum: it actually becomes important wrt multimethods
<jackdaniel>
what is a multimethod?
<beach>
knusbaum: And that's not quite enough, because of multiple dispatch. You may want to express that some function say SHAPE-INTERSECTS-SHAPE has a method that specializes to both arguments.
triffid has joined #commonlisp
<phoe>
jackdaniel: aaaaaaa
<phoe>
knusbaum: it actually becomes important wrt multiple dispatch
* phoe
hides in a hole
<jackdaniel>
at this point I'm afraid to ask what is a multiple dispatch
<knusbaum>
beach, Yeah, I'm aware of that. Not sure if I can inspect the types of the arguments to say *which* parameter needs to be the one that is specialized for the type.
<knusbaum>
Fortunately, I'm not specializing on multiple types right now, so the existence of a specialization for my type is enough to signify the presence of the one I want.
<knusbaum>
But super cool I can do it.
<knusbaum>
*multiple types within one generic function parameter list*
<jackdaniel>
I wonder what protocol classes per se bring to the table
<jackdaniel>
they certainly take a way a possibility to implement the protocol for objects that are not instances of the protocol class subclass
<knusbaum>
For me, it's mostly programmer convenience. Just a way to express that a certain class implements a set of methods.
<knusbaum>
*set of generic functions
<knusbaum>
In fact, if I can check that, I'll get rid of the actual protocol classes altogether, because they would serve no purpose to me.
<jackdaniel>
I mean - you may have a set of generic functions that define a protocol - that's fine; but the protocol class is just an inconvenient stand-in for nothing
<knusbaum>
Right, exactly.
<phoe>
unless you want to specialize on the protocol class itself
<knusbaum>
The only thing is it *might* be useful to tie a bunch of classes together in a hierarchy for documentation purposes, but that's kind of lame to me. I'll probably just get rid of them.
<knusbaum>
phoe, yes.
<beach>
jackdaniel: It allows the module to define auxiliary methods that specialize to the protocol class. It can then be sure that such a method is applicable to instances of subclasses.
<knusbaum>
And because of multiple inheritance, any class that you want to implement the interface you should be able to just add the protocol class to the list of superclasses, I think.
<jackdaniel>
beach: if the protocol says, that (for example) the function sheet-parent may be called only on sheets, then not specializing the argument sheet gives you possibility to implement the protocol for a class that is not under your control (it is the premise behind traits btw)
rgherdt has quit [Remote host closed the connection]
rgherdt_ has joined #commonlisp
<phoe>
jackdaniel: having a protocol class doesn't obstruct this
<jackdaniel>
phoe: you either specialize default methods to the protocol class or you don't - in the first case it obstructs this, in the second case the protocol class has no practical purpose
<beach>
jackdaniel: My favorite example is again something like GEOMETRIC-FIGURE which may have a BOUNDING-RECTANGLE function. The protocol class can then contain a cache of the bounding rectangle, and an :AROUND method can check whether the bounding rectangle is valid and return it.
<beach>
Clearly, for this idea to work, every geometric figure must be an instance of a subclass of the protocol class.
<jackdaniel>
but then the protocol class contains the implementation (i.e it is not empty), so it would be better called standard-geometric-figure
<beach>
I never said it should be empty.
Gleefre has joined #commonlisp
<beach>
Just "not instantiable".
<beach>
You can name it what you want.
<knusbaum>
Is there a simple way to make a class non-instantiable without messing up subclasses? I was playing with signalling an error in initialize-instance on the protocol class, but then subclasses would fail to initialize as well.
<beach>
knusbaum: That's what define-protocol-class does.
<knusbaum>
oh, there's actually a define-protocol-class. neat.
<jackdaniel>
OK, then I'll name it "not instantiable class", because calling it "protocol class" makes a heavy impression that anything that implements the protocol must be a subclass of the protocol class
<jackdaniel>
I think that the word "abstract" fits the bill even better
<beach>
Whatever.
<jackdaniel>
perhaps a clear terminology is overrated
<knusbaum>
Only works on sbcl right now, of course.
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Ping timeout: 240 seconds]
attila_lendvai_ has quit [Read error: Connection reset by peer]
attila_lendvai_ has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
KvL has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
KvL has joined #commonlisp
tyson2 has joined #commonlisp
pranavats has joined #commonlisp
ym has quit [Remote host closed the connection]
NicknameJohn has joined #commonlisp
johnjaye has quit [Ping timeout: 240 seconds]
NotThatRPG has quit [Ping timeout: 248 seconds]
NotThatRPG_ has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 28.2]
_cymew_ has quit [Ping timeout: 260 seconds]
NotThatRPG_ has quit [Ping timeout: 248 seconds]
jonatack has joined #commonlisp
attila_lendvai_ has quit [Read error: Connection reset by peer]
attila_lendvai_ has joined #commonlisp
attila_lendvai_ has quit [Read error: Connection reset by peer]
attila_lendvai_ has joined #commonlisp
attila_lendvai_ has quit [Read error: Connection reset by peer]
attila_lendvai_ has joined #commonlisp
<jackdaniel>
knusbaum: use closer-mop for portability
waleee has joined #commonlisp
johnjaye has joined #commonlisp
rgherdt_ has joined #commonlisp
tyson2 has quit [Ping timeout: 240 seconds]
rgherdt has quit [Ping timeout: 260 seconds]
rgherdt_ is now known as rgherdt
johnjaye has quit [Ping timeout: 268 seconds]
igemnace has quit [Remote host closed the connection]
karlosz has joined #commonlisp
johnjaye has joined #commonlisp
pve has quit [Quit: leaving]
shka has quit [Ping timeout: 240 seconds]
tyson2 has joined #commonlisp
<knusbaum>
jackdaniel, THANKS! I couldn't find a portable mop library.
johnjaye has quit [Ping timeout: 240 seconds]
johnjaye has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
morganw has quit [Remote host closed the connection]
attila_lendvai_ has quit [Read error: Connection reset by peer]
attila_lendvai_ has joined #commonlisp
alendvai__ has joined #commonlisp
attila_lendvai_ has quit [Ping timeout: 256 seconds]
<char[m]>
Hey Bike for ctype extension list-of, I noticed that the disjoin/2 has the elements of list-of become disjoined into a single list-of ctype. Does this make the most sense? How would one represent the type describing a list of integers OR a list of strings as apposed to a list containing possibly both integers and strings?
<Bike>
I think you're right, the disjunction shouldn't collapse like that
<char[m]>
Cool. I'll take care of it with my other -of extensions.
rgherdt has quit [Remote host closed the connection]
<Bike>
the general rule i was going for is that the type operations like disjunction and conjunction should be exact rather than approximate
<Bike>
but probably in this case i thought "ok it's like a cons type" rather than getting into it
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
alendvai__ has quit [Read error: Connection reset by peer]
alendvai__ has joined #commonlisp
gxt__ has quit [Ping timeout: 240 seconds]
gxt__ has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
tyson2 has quit [Remote host closed the connection]
karlosz has quit [Ping timeout: 240 seconds]
pranavats has joined #commonlisp
notzmv has quit [Ping timeout: 260 seconds]
lucasta has joined #commonlisp
NotThatRPG has joined #commonlisp
Prokhor_ has joined #commonlisp
alendvai__ has quit [Read error: Connection reset by peer]
alendvai__ has joined #commonlisp
czy has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NotThatRPG has joined #commonlisp
dieggsy has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lucasta has quit [Remote host closed the connection]