NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yitzi has quit [Remote host closed the connection]
b00p has joined #commonlisp
<pfdietz>
:)
akoana has quit [Quit: leaving]
b00p has quit [Quit: Leaving.]
NotThatRPG has joined #commonlisp
thuna` has quit [Remote host closed the connection]
bilegeek has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1.50)]
eddof13 has joined #commonlisp
azimut has quit [Ping timeout: 246 seconds]
eddof13 has quit [Client Quit]
avocadoist has quit [Ping timeout: 246 seconds]
jello_pudding has quit [Ping timeout: 240 seconds]
jello_pudding has joined #commonlisp
molson has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 252 seconds]
dcb has quit [Quit: MSN Messenger 4.0.4]
splittist has quit [Server closed connection]
splittist has joined #commonlisp
mrcom has quit [Ping timeout: 244 seconds]
Pixel_Outlaw has quit [Quit: Leaving]
mrcom has joined #commonlisp
bilegeek has quit [Quit: Leaving]
contrapunctus has joined #commonlisp
pfdietz has quit [Quit: Client closed]
pranavats has quit [Ping timeout: 240 seconds]
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
dtman34 has quit [Ping timeout: 260 seconds]
wonko-the-sane has quit [Quit: leaving]
shka has joined #commonlisp
rgherdt has joined #commonlisp
LW has joined #commonlisp
dmho has quit [Server closed connection]
dmho has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
dtman34 has joined #commonlisp
amb007 has joined #commonlisp
tibfulv has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
igemnace has joined #commonlisp
Cymew has joined #commonlisp
msavoritias has joined #commonlisp
conjunctive has quit [Server closed connection]
conjunctive has joined #commonlisp
igemnace has quit [Read error: Connection reset by peer]
dino_tutter has joined #commonlisp
rainthree has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
dnhester26 has joined #commonlisp
varjag has joined #commonlisp
igemnace has joined #commonlisp
rtypo has joined #commonlisp
mgl has joined #commonlisp
rainthree3 has joined #commonlisp
rainthree has quit [Read error: Connection reset by peer]
Inline has joined #commonlisp
attila_lendvai has joined #commonlisp
rainthree has joined #commonlisp
habamax has joined #commonlisp
rainthree3 has quit [Ping timeout: 246 seconds]
iquites has quit [Server closed connection]
iquites has joined #commonlisp
lottaquestions_ has quit [Quit: Konversation terminated!]
contrapunctus has left #commonlisp [#commonlisp]
lottaquestions has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
contrapunctus has joined #commonlisp
pfdietz has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
dinomug has quit [Remote host closed the connection]
sgithens_ has quit [Server closed connection]
sgithens_ has joined #commonlisp
random-nick has joined #commonlisp
pfdietz has quit [Quit: Client closed]
pfdietz has joined #commonlisp
dnhester26 has quit [Ping timeout: 248 seconds]
cstub has joined #commonlisp
wonko-the-sane has joined #commonlisp
even4void has quit [Ping timeout: 255 seconds]
even4void has joined #commonlisp
rogersm has quit [Read error: Connection reset by peer]
rogersm has joined #commonlisp
kstuart has joined #commonlisp
dnhester26 has joined #commonlisp
anticrisis has quit [Read error: Connection reset by peer]
herjazz has joined #commonlisp
kstuart has quit [Ping timeout: 240 seconds]
azimut has joined #commonlisp
avocadoist has joined #commonlisp
cayley5 is now known as cayley10
rogersm has quit [Read error: Connection reset by peer]
cayley10 is now known as cayley5_
cayley5 has joined #commonlisp
bjorkintosh has quit [Ping timeout: 240 seconds]
iska has joined #commonlisp
jjnkn has joined #commonlisp
dino_tutter has quit [Ping timeout: 264 seconds]
pranavats has joined #commonlisp
kevingal has joined #commonlisp
kevingal_ has joined #commonlisp
dino_tutter has joined #commonlisp
thuna` has joined #commonlisp
jello_pudding has quit [Ping timeout: 264 seconds]
jonatack has quit [Ping timeout: 255 seconds]
jonatack has joined #commonlisp
dnhester26 has quit [Ping timeout: 252 seconds]
jello_pudding has joined #commonlisp
b00p has joined #commonlisp
tyson2 has joined #commonlisp
vjalmr has joined #commonlisp
cstub has quit [Quit: Leaving]
rainthree has quit [Read error: Connection reset by peer]
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
pyooque has joined #commonlisp
puke is now known as Guest6095
Guest6095 has quit [Killed (tungsten.libera.chat (Nickname regained by services))]
pyooque is now known as puke
b00p has quit [Ping timeout: 240 seconds]
mgl has quit [Quit: Client closed]
rainthree has joined #commonlisp
alexsotodev has quit [Ping timeout: 240 seconds]
b00p has joined #commonlisp
<jjnkn>
hi, i'm learning about methods and there is something i'd like to get advice on; i'm trying to generate methods with macros; in particular, my macro should be able to generate multiple methods that have the same parameter specializers; as far as i understand, the method system doesn't allow this; so how can i benefit from type specialisation in this case? is it possible to perform some compile-time
<jjnkn>
magic here?
<beach>
What would it mean to have more than one method with some particular specializers?
<jjnkn>
i should provide more details, return values of my methods don't matter, their purpose is to perform validation, so they either raise a condition or don't; therefore, it would be enough to simply run them sequentially
herjazz has quit [Quit: leaving]
zxcvz has joined #commonlisp
<beach>
Well, that's not how the object system works.
<beach>
You could have two methods with the same specializers if they have different qualifiers, but then you would need to define your own method combination.
<beach>
And conditions are not "raised". They are "signaled".
mooseball has joined #commonlisp
bjorkint0sh has joined #commonlisp
<beach>
If defining a method with the same specializers as an existing method would result in the new method being added, then each time you load your system again, you would get more and more methods.
bjorkintosh has quit [Ping timeout: 245 seconds]
<beach>
And if you made a mistake in a method code and attempted to define it again, the incorrect method would not be removed.
<jjnkn>
okay, how about this: in my macro i check if a method with given parameter specializers already exists, and if it does (call it 1st method) i "wrap" it into the 2nd method (the one being defined by the macro)
<jjnkn>
that's where i think some compile-time magic should happen, as i know little about compile-time evaluation in Common Lisp
<beach>
You can't call methods. You call generic functions, and the generic function selects which methods to call an in which order.
<_death>
you could define a single method with a body that's built out of multiple forms.. or keep multiple functions around to call
<beach>
You can stick your functions in a hash table and call each function in the hash table.
<jjnkn>
i have already tried the hash table approach, but couldn't replicate type specialisation, since a key will correspond to a single type (i.e., functions keyed on 'string will not be found for (simple-array character)
<beach>
Maybe if you tell us what you are trying to accomplish, we could suggest a solution that works.
dnhester26 has joined #commonlisp
<_death>
you could, again, define a single method with multiple forms for a particular class if needed, but have the GF use progn method combination so that methods defined for superclasses would also be called by the GF
b00p has quit [Quit: Leaving.]
rainthree3 has joined #commonlisp
Inline has quit [Ping timeout: 260 seconds]
<_death>
still it's now unclear why you're talking about types in general (and not classes)
<jjnkn>
i'm trying to create a system to define classes with validation of their slots; validation takes place when a slot's value is being set; i want my validators to specialise on the type of value being set
<jjnkn>
let me provide an example
<jjnkn>
say we have a class ORDER which has a slot DATE
<_death>
CLOS does not support dispatching on types in general, so if you wish to do that you'd have to write your own dispatching code
<jjnkn>
i want to be able to set a DATE from a string (e.g, 2022-01-01) and from an integer (e.g., unix time)
<jjnkn>
for both string and integer i want to provide validators
avocadoist has quit [Ping timeout: 255 seconds]
<jjnkn>
and, most importantly, i want to be able to have multiple validators for each type
<jjnkn>
_death: what do you mean? am i misunderstanding the concept of method parameter specialization?
<beach>
You can't use arbitrary types as specializers.
avocadoist has joined #commonlisp
<beach>
Only classes and EQL specializers.
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1.50)]
<beach>
So you can't say (defmethod foo ((bar (integer 1 3))) ...)
LW has quit [Quit: WeeChat 3.8]
alexsotodev has joined #commonlisp
<jjnkn>
i'm confused... first of all, is (integer 1 3) a valid type?
<beach>
Sure.
<phoe>
but it is not a valid class
<_death>
you could have something like (loop for validator in (slot-validators object 'date) when (validates-type-p validator object 'date new-value) do (validate object 'date validator new-value)) and have some fallback when there's no appropriate validator
<jjnkn>
does it represent an integer that is either 1 or 3?
<phoe>
it represents an integer between 1 and 3, inclusive
<_death>
(validates-type-p should also take a validator; this snippet was for illustration purposes only)
<beach>
jjnkn: To get either 1 or 3 you could use the type (member 1 3)
<jjnkn>
well, in any case my validators don't require such intricate types
LW has quit [Client Quit]
<jjnkn>
it is enough for them to use classes as type specializers
<jjnkn>
_death: i am considering roughly the same approach as you proposed, but wanted to find out whether i could employ generic functions for my purposes
Cymew has quit [Ping timeout: 252 seconds]
<beach>
jjnkn: If you insist on wanting several methods with the same specializers, I think the answer is no.
pfdietz has quit [Quit: Client closed]
<_death>
is it important to define validators for a given slot separately and incrementally? if not, why not a simple (deftype order-date () '(or (and string (satisfies date-string-p)) (integer 0))) and have :type order-date for the slot? in fact to me it seems poor to have a slot contain multiple representations of a date after validation.. I would just pick a single representation and validate possible inputs elsewhere as part of translating
<_death>
into that representation
pfdietz has joined #commonlisp
mgl has joined #commonlisp
NotThatRPG has joined #commonlisp
<jjnkn>
_death: i'm not familiar with the DEFTYPE form but regarding the 2nd part of your message: a slot can contain a single, fundamental, representation, but can be set from different ones by means of translating inputs
<jjnkn>
i'm still not certain whether it's a must to be able to define validators incrementally
<jjnkn>
seeing that it's not a trivial task, i'm probably going to stick with a simpler non-incremental approach for now
<_death>
and order should probably be specialized as well
<jjnkn>
yes, something like that
<_death>
it's kind of weird to set date to something and then get it back and it's a different object, so I'm not sure I would use such methods for that (although it should return new-value)
<_death>
*use setf methods for that.. I'd maybe have a set-date GF that takes a "date designator"
rainthree3 has quit [Quit: Leaving]
<jjnkn>
my system will also allow to read slot values in different representations
<jjnkn>
in fact, a representation is allowed only if it has a mapping function from the fundamental type (for setting the slot) and a corresponding inverse function (for reading the slot)
<jjnkn>
i meant a mapping function that maps NEW-VALUE to a value of the fundamental type
<jjnkn>
and an inverse that does the opposite
zxcvz has quit [Quit: zxcvz]
<_death>
so that's another reason not to use the accessor.. you'd want to provide the desired representation type as an argument, like (get-date order 'iso8601-with-fries)
<jjnkn>
that's exactly how i'm designing it
<jjnkn>
it will not be a reader function defined by DEFCLASS but my own
<jjnkn>
there are also performance considerations: for example, if the inverse mapping function is computationally expensive
<_death>
anyway, if you want validate or translate from multiple representations having the same class, you need to handle that yourself in a single method
<jjnkn>
yeah, that's what i'm going to do for now, thanks for the input
Inline has joined #commonlisp
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
xaltsc has joined #commonlisp
dtman34 has quit [Ping timeout: 240 seconds]
mooseball has quit [Quit: Leaving]
kevingal_ has quit [Ping timeout: 260 seconds]
kevingal has quit [Ping timeout: 260 seconds]
dnhester26 has quit [Ping timeout: 258 seconds]
thollief has joined #commonlisp
dtman34 has joined #commonlisp
Brucio-61 has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
dino_tutter has quit [Ping timeout: 260 seconds]
eddof13 has joined #commonlisp
jmdaemon has quit [Ping timeout: 264 seconds]
Inline has quit [Quit: Leaving]
igemnace has quit [Read error: Connection reset by peer]
Inline has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jcowan has quit [Server closed connection]
jcowan has joined #commonlisp
<Posterdati>
cffi is still broken on netbsd and openbsd
thuna` has quit [Remote host closed the connection]
igemnace has joined #commonlisp
didi has joined #commonlisp
<didi>
Is this expected? I have the following file https://paste.debian.net/hidden/00bb7521 . I then eval in another package (defvar *bar* foo:*foo*) and (eq *bar* foo:*foo*) => t. All is good. But, if I compile the file in SLIME using C-c C-k, (eq *bar* foo:*foo*) => nil. I'm using SBCL.
<ixelp>
Debian Pastezone
mgl has quit [Quit: Client closed]
eddof13 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
<gilberth>
It is. When you compile and load that file foo:*foo* is set again with DEFPARAMETER to a new (3 . 4) different from the previous one that *BAR* still has.
<didi>
oic
<didi>
gilberth: Thank you.
<didi>
So I need to think of another way of setting a sentinel that I can test using EQ and that will survive recompilations.
<gilberth>
s/defparameter/defvar/ does the trick.
<gilberth>
DEFVAR only sets the variable when it has no value yet, while DEFPARAMETER always sets the variable.
eddof13 has quit [Ping timeout: 244 seconds]
<didi>
gilberth: Ah, so that's it. Thank you.
wonko-the-sane has quit [Quit: leaving]
mrcom has quit [Remote host closed the connection]
mrcom has joined #commonlisp
mrcom has quit [Read error: Connection reset by peer]
cage has joined #commonlisp
mrcom has joined #commonlisp
mrcom has quit [Read error: Connection reset by peer]
mrcom has joined #commonlisp
attila_lendvai has quit [Ping timeout: 240 seconds]
Fade has quit [Remote host closed the connection]
mrcom has quit [Read error: Connection reset by peer]
mrcom has joined #commonlisp
Fade has joined #commonlisp
rogersm has joined #commonlisp
OlCe has joined #commonlisp
Fade is now known as Fade
overclucker has quit [Ping timeout: 240 seconds]
overclucker has joined #commonlisp
yitzi has joined #commonlisp
avocadoist has quit [Ping timeout: 258 seconds]
thonkpod has quit [Ping timeout: 240 seconds]
kevingal has joined #commonlisp
thonkpod has joined #commonlisp
mgl has joined #commonlisp
<Posterdati>
gsll is broken again on openbsd :)
waleee has joined #commonlisp
<Josh_2>
Wish there was a minimal version of clog
<Josh_2>
adding it as dependency broke my build pipeline because it depends on sqlite... :sob:
deriamis_ has joined #commonlisp
<Josh_2>
Version of clog without gui, without sqlite, only websocket!!
<ixelp>
GitHub - fukamachi/cl-dbi: Database independent interface for Common Lisp
<Josh_2>
There might be a few
<Josh_2>
Personally I just use Postgres
kevingal has quit [Remote host closed the connection]
b00p has quit [Quit: Leaving.]
akonai has quit [Ping timeout: 252 seconds]
tyson2 has joined #commonlisp
<jjnkn>
when i tried cl-dbi i encountered an issue with executing multiple sql statements at once; i wanted to run an sql script, so i just read the whole file and tried to execute its contents but cl-dbi signaled an error
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
jjnkn has quit [Quit: leaving]
fitzsim has quit [Remote host closed the connection]
xmachina has quit [Quit: WeeChat 4.0.4]
xmachina has joined #commonlisp
mrcom has quit [Read error: Connection reset by peer]
rainthree has quit [Quit: Leaving]
mrcom has joined #commonlisp
jryans has quit [Server closed connection]
jryans has joined #commonlisp
b00p has joined #commonlisp
jello_pudding has quit [Ping timeout: 246 seconds]
<Posterdati>
fixed!
didi has left #commonlisp [O bella ciao bella ciao bella ciao, ciao, ciao.]
xmachina has quit [Quit: WeeChat 4.0.4]
jello_pudding has joined #commonlisp
msavoritias has quit [Remote host closed the connection]
msavoritias has joined #commonlisp
overclucker has quit [Ping timeout: 240 seconds]
overclucker has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
pfdietz has quit [Quit: Client closed]
msavoritias has quit [Read error: Connection reset by peer]
anticrisis has joined #commonlisp
contrapunctus has joined #commonlisp
xmachina has joined #commonlisp
<Josh_2>
Some choices with CLOG annoy me :skull:
<Josh_2>
I wish I could specify the listening URL :skull:
<Josh_2>
It is omnificent :sunglasses:
avocadoist has joined #commonlisp
cstub has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
mgl has quit [Quit: Client closed]
mgl has joined #commonlisp
NicknameJohn has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.1]
attila_lendvai has joined #commonlisp
thollief has quit [Quit: Leaving]
b00p has quit [Quit: Leaving.]
azimut has quit [Ping timeout: 246 seconds]
b00p has joined #commonlisp
b00p has quit [Client Quit]
azimut has joined #commonlisp
pfdietz has joined #commonlisp
dlowe has quit [Ping timeout: 244 seconds]
azimut has quit [Ping timeout: 246 seconds]
tyson2 has quit [Remote host closed the connection]
yitzi has quit [Remote host closed the connection]
azimut has joined #commonlisp
Josh_2 has joined #commonlisp
shka has quit [Ping timeout: 260 seconds]
kevingal has joined #commonlisp
NicknameJohn has quit [Remote host closed the connection]
NicknameJohn has joined #commonlisp
avocadoist has quit [Remote host closed the connection]
mgl has quit [Quit: Client closed]
<gendl__>
Hi, is it true that Bordeaux-threads doesn't have shared read-locks and write-locks, where multiple readers can hold the lock at the same time as long as no writer holds the lock? You'd have to implement those yourself?
attila_lendvai has quit [Ping timeout: 260 seconds]
<gendl__>
(i know there's a pretty formulaic way to build readlocks/writelocks given basic mutexes and condition variables)