<PuercoPop>
Was there ever a proposal for packages to use symbols?
<beach>
For what?
dominic34 has joined #lisp
<PuercoPop>
As their mainly, although it doesn't make sense, to what package would the symbol belong to if the package doesn't exist when the form is being read
<beach>
As the name, you mean? Yes, that would be complicated indeed.
<PuercoPop>
yeah as their name (there was supposed to be name between their and mainly :v)
<beach>
One could possibly imagine a single pre-existing package that would then be the home package for all package names.
<PuercoPop>
The keyword package could do
<beach>
Maybe so, yes.
karlosz has joined #lisp
shangul has joined #lisp
iAmDecim has joined #lisp
iAmDecim has quit [Ping timeout: 240 seconds]
elxbarbosa has quit [Remote host closed the connection]
notzmv has joined #lisp
notzmv has quit [Changing host]
notzmv has joined #lisp
_paul0 has joined #lisp
iAmDecim has joined #lisp
gravicappa has joined #lisp
Jesin has joined #lisp
paul0 has quit [Ping timeout: 264 seconds]
Necktwi has quit [Ping timeout: 258 seconds]
Necktwi has joined #lisp
dominic35 has joined #lisp
dominic34 has quit [Ping timeout: 258 seconds]
dominic35 is now known as dominic34
narimiran has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
iAmDecim has quit [Ping timeout: 240 seconds]
duuqnd has joined #lisp
dominic34 has quit [Quit: dominic34]
dominic34 has joined #lisp
terpri__ has joined #lisp
terpri_ has quit [Ping timeout: 240 seconds]
aaaaaa has quit [Quit: leaving]
zulu-inuoe_ has quit [Read error: Connection reset by peer]
Alloc has quit [Ping timeout: 256 seconds]
Alloc has joined #lisp
Bourne has quit [Ping timeout: 240 seconds]
orivej_ has quit [Ping timeout: 260 seconds]
shangul has quit [Ping timeout: 240 seconds]
elxbarbosa has joined #lisp
Bourne has joined #lisp
shangul has joined #lisp
torbo has quit [Remote host closed the connection]
kopiyka has quit [Remote host closed the connection]
kopiyka has joined #lisp
shangul has quit [Ping timeout: 256 seconds]
shangul has joined #lisp
prite has quit [Ping timeout: 246 seconds]
PuercoPop has quit [Quit: WeeChat 1.9.1]
charles63 has joined #lisp
Necktwi has quit [Ping timeout: 240 seconds]
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
bilegeek has quit [Quit: Leaving]
iAmDecim has joined #lisp
rumbler31_ has quit [Ping timeout: 258 seconds]
iAmDecim has quit [Ping timeout: 240 seconds]
ibinderwolf has quit [Read error: Connection reset by peer]
ibinderwolf has joined #lisp
ajithmk has joined #lisp
iAmDecim has joined #lisp
zaquest has quit [Quit: Leaving]
charles63 has quit [Remote host closed the connection]
nicktick has quit [Ping timeout: 256 seconds]
ebzzry has joined #lisp
dominic34 has quit [Ping timeout: 256 seconds]
toorevitimirp has joined #lisp
ebzzry has quit [Quit: WeeChat 2.8]
iAmDecim has quit [Ping timeout: 256 seconds]
Oladon has quit [Quit: Leaving.]
bocaneri has joined #lisp
zaquest has joined #lisp
space_otter has quit [Remote host closed the connection]
iAmDecim has joined #lisp
jeosol has quit [Remote host closed the connection]
jonatack has quit [Remote host closed the connection]
VincentVega has quit [Remote host closed the connection]
Bourne has quit [Read error: Connection reset by peer]
jonatack has joined #lisp
VincentVega has joined #lisp
aap_ is now known as aap
kar7hik has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
kar7hik has quit [Remote host closed the connection]
hendursaga has quit [Ping timeout: 240 seconds]
Oddity_ has joined #lisp
dominic34 has quit [Ping timeout: 240 seconds]
Bourne has joined #lisp
Oddity has quit [Ping timeout: 244 seconds]
shka_ has joined #lisp
scymtym has quit [Ping timeout: 240 seconds]
shifty has quit [Ping timeout: 260 seconds]
mangul has joined #lisp
shangul has quit [Ping timeout: 240 seconds]
mangul has quit [Ping timeout: 256 seconds]
schweers has quit [Remote host closed the connection]
EvW has joined #lisp
aeth has quit [Quit: ...]
aeth has joined #lisp
cosimone has joined #lisp
scymtym has joined #lisp
liberliver1 has joined #lisp
liberliver has quit [Read error: Connection reset by peer]
jesse1010 has joined #lisp
liberliver has joined #lisp
wxie has joined #lisp
liberliver1 has quit [Ping timeout: 265 seconds]
tutti has joined #lisp
prite has joined #lisp
aaaaaa has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
jonatack has quit [Read error: Connection reset by peer]
Necktwi has joined #lisp
heisig has joined #lisp
zooey has quit [Remote host closed the connection]
zooey has joined #lisp
tourjin has joined #lisp
gravicappa has quit [Ping timeout: 258 seconds]
shangul has joined #lisp
gravicappa has joined #lisp
iamFIREc1 has joined #lisp
iamFIREcracker has quit [Ping timeout: 258 seconds]
shangul has quit [Ping timeout: 264 seconds]
brj has quit [Ping timeout: 265 seconds]
EvW has quit [Ping timeout: 240 seconds]
brj has joined #lisp
iAmDecim has joined #lisp
random-nick has joined #lisp
shangul has joined #lisp
mangul has joined #lisp
iAmDecim has quit [Ping timeout: 265 seconds]
shangul has quit [Ping timeout: 258 seconds]
cosimone has quit [Quit: Quit.]
cosimone has joined #lisp
nicktick has joined #lisp
mangul is now known as shangul
<phoe>
but if they're going to be from a single package, what's the real point, then?
<phoe>
then (find-package string) becomes just (find-package (find-symbol string :keyword))
shangul has quit [Ping timeout: 265 seconds]
shangul has joined #lisp
Josh_2 has joined #lisp
<Josh_2>
Morning
<Josh_2>
with the MOP can I create a metaclass that will add slots to my class based on the slot-value of another slot?
shangul has quit [Ping timeout: 240 seconds]
cosimone has quit [Read error: Connection reset by peer]
tutti has quit [Ping timeout: 240 seconds]
jonatack has joined #lisp
cosimone has joined #lisp
rogersm has joined #lisp
Alloc has joined #lisp
gxt has quit [Ping timeout: 240 seconds]
mseddon has joined #lisp
schweers has joined #lisp
<phoe>
I guess so, sure
Inline has joined #lisp
<Josh_2>
basically I would like to have a slot within a class with a set name like 'symbol-slots' then when I (make-instance 'special-class :symbol-slots '(a b c d e)) then I will get an instance with the slots symbol-slots a b c d and e.
rogersm has quit [Quit: Leaving...]
VincentVega has quit [Remote host closed the connection]
<Josh_2>
so the initarg :symbol-slots would be converted to effective slots and appended to my instance
VincentVega has joined #lisp
<phoe>
this sounds like a method on INITIALIZE-INSTANCE that accepts :SYMBOL-SLOTS and goes CALL-NEXT-METHOD with an appropriately frobbed :DIRECT-SLOTS argument
<jmercouris>
it is possible, I'm just suggesting that you may wish to go another route if you will find yourself doing things like this
<Josh_2>
Well the link to their site is dead and those docs aren't exactly accessible
<jmercouris>
Understood
<Josh_2>
I was basically just messing around and seeing if I *could* do it because I thought it would be a nice way for users to interact with request objects
<jmercouris>
it is possible
<Josh_2>
instead of having to look through a list they could just set/get from a slot, a slot that is dynamically added depending on some data that is passed
<jmercouris>
hm
<jmercouris>
a slot that is dynamically added...
<Josh_2>
it was a "hmm It's 3am and I'm laying in bed thinking about this" moment
<jmercouris>
well, it is possible to update the instances
<jmercouris>
you could also copy the values to a new instance
wsinatra has quit [Ping timeout: 260 seconds]
<_death>
sounds like work for change-class to me
<jmercouris>
I agree with _death
<Josh_2>
well the slots would have to be appended based on the value of an initarg when calling make-instance
<Josh_2>
hmm
<_death>
assuming it's something along the lines of "state pattern"
<jmercouris>
what is 'state pattern'?
<jmercouris>
Josh_2: why use slots when you may use another data structure?
<jmercouris>
why not a linked list of properties
<Josh_2>
Yes thats what I'm doing right now
<phoe>
or a hashtable
<jmercouris>
UNLESS you will specialize upon these slots
<Josh_2>
using change-class would require creating a class based on what I have parsed
<jmercouris>
Yes
<jmercouris>
then you will want to redefine the old class
<jmercouris>
that's exactly what I linked to you in my pull request
<jmercouris>
you see, we can have (foo) extend (foo)
<jmercouris>
we replace a class in-place and change its slots etc
<_death>
if the set of properties is not fixed, then just keep a plist
v0|d has quit [Remote host closed the connection]
<Josh_2>
I'm currently just using an alist
<jmercouris>
A L I S T
<Josh_2>
works just fine, but now my curiosity has peaked :P
<jmercouris>
piqued*
<jmercouris>
reminds me of sneak mountain
<jmercouris>
s/sneak mountain/stealth mountain
<Josh_2>
yes
<Josh_2>
piqued :P
<jmercouris>
"Stealth Mountain (@StealthMountain) is a Twitter bot with a single, simple purpose: It searches for tweets in which a person has typed the words “sneak peak” when they meant to type “sneak peek,” then publishes a reply informing the author of his error. "
<_death>
if the objective is to learn about the MOP, then I remember AMOP had an example concerning dynamic slot storage
gko_ has joined #lisp
<Josh_2>
Yes I have read that example
FreeBirdLjj has joined #lisp
<Josh_2>
but they have all their slots predefined but wish to only allocate slots when needed
<_death>
I see.. well, the last time I did something with the MOP was years ago, so someone else may be of help ;)
FreeBirdLjj has quit [Ping timeout: 260 seconds]
iAmDecim has joined #lisp
wsinatra has joined #lisp
iAmDecim has quit [Ping timeout: 264 seconds]
bsd4me has joined #lisp
IPmonger has joined #lisp
IPmonger has quit [Remote host closed the connection]
wsinatra_ has joined #lisp
treflip has quit [Quit: WeeChat 2.6]
orivej has joined #lisp
<jmercouris>
I'm having some trouble with a macro of indeterminate length
<phoe>
hm?
<phoe>
what do you mean?
<jmercouris>
so I am trying to define a defmacro that operates on a list
<phoe>
wait a second though, CL:LIST is predefined
<jmercouris>
well, in this case, yes
<jmercouris>
but pretend it is a list of arbitrary length
<jmercouris>
because that is in fact what it is
<phoe>
what is the call to your macro supposed to look like pre-expansion?
<jmercouris>
that is "Source"
tourjin has joined #lisp
<jmercouris>
so you will say something like (macroxyz source)
<jmercouris>
and it will produce the expansion
Alloc has quit [Ping timeout: 240 seconds]
<phoe>
(macroxyz (list (a nil nil) (b nil nil)))?
<jmercouris>
for example, yes
<phoe>
if this is a nested list, then this requires either code walking or evaluation
Alloc has joined #lisp
<phoe>
I still don't understand what you are trying to do
<jmercouris>
it is not a nested list
<jmercouris>
I'm sorry let me make a practical example
<phoe>
yes, please do
<jmercouris>
give me one more moment
<phoe>
the CL:LIST call confuses me
<jmercouris>
1
<jackdaniel>
you 1) did not paste the macro itself; 2) you did not state the problem correctly
<jmercouris>
OH! is that so?
<jackdaniel>
what is it you want to splice? how does it splice?
<phoe>
hey cmon guys
<phoe>
no fighting here now
<jackdaniel>
how do you want it to be spliced
<phoe>
let's get the communication done first and then let's discuss things
* jackdaniel
points out that there was no answerable question stated
<jackdaniel>
and it is quite surprising given that a considerable wall of text has been written ,)
<jmercouris>
you know what is surprising to me?
<jmercouris>
how socially insensitive you are
<phoe>
heyyyyyyy jmercouris jackdaniel
<jackdaniel>
please do not attack me presonally, it is a last warning
<phoe>
calm down both of you, will you?
<phoe>
stirring this further will bring no good to either of you or to #lisp, and right now it's both of you stirring this up
<jackdaniel>
phoe: hm, I consider myself perfectly calm, what i'm saying is that he should state a question which could be reasoned about (i.e correctly state the problem), not really sure how is this stirring things
<jackdaniel>
as of personal attacks, I'm sure it is a reasonable thing to ask to not to that
<jmercouris>
I hope that explains my context a little bit better
davepdot_ has joined #lisp
vutral has joined #lisp
<jmercouris>
actually I do not need the gensym...
<jmercouris>
I've rewritten and destroyed the macro several times, still not able to achieve what I am trying to...
<phoe>
okay, so the macro itself is QRT
<jmercouris>
correct
terpri__ is now known as terrpi
<jmercouris>
and in execute-extended-command it would be applying like this: (qrt optional-arguments)
<phoe>
is it called like (qrt a b c)?
<phoe>
wait
<phoe>
(qrt (a b c))
<jmercouris>
yes
<phoe>
if these come from the DEFINE-COMMAND lambda list, you might want to use ALEXANDRIA:PARSE-ORDINARY-LAMBDA-LIST to get the required/optional/keyword/whatever arguments and such
<jmercouris>
the ,@operator is really messing with me
<phoe>
but anyway
<jmercouris>
phoe: I am using that
<phoe>
perfect
<jmercouris>
I have just nicknamed it to alex
<phoe>
let's consider QRT to be a function for a while
<phoe>
oh, and define-condition inside conditions.lisp
<phoe>
even though that one is really boring except for report methods, because it expands into DEFCLASS :D
<jmercouris>
starred, thank you
wxie has quit [Ping timeout: 258 seconds]
<jmercouris>
also, above you meant (macroexpand-1 '(qrt (a b c)))
<phoe>
uhhhh, actually, no
<phoe>
because I was sneaky and modified the macro lambda list
<jmercouris>
oh :-)
<phoe>
but I didn't tell you about that fact
<phoe>
sorry
Oddity__ has joined #lisp
ghard has quit [Remote host closed the connection]
<jmercouris>
Oh, that's fine
Oddity_ has quit [Ping timeout: 260 seconds]
davepdot_ has quit [Remote host closed the connection]
davepdotorg has joined #lisp
patlv has joined #lisp
<phoe>
anyway, I think this is how such situations should be handled - in case of not enough information or a poorly specified problem, 1) please ask for more details instead of stating the obvious, 2) please provide more details even if the obvious was stated
<jmercouris>
1
<jmercouris>
it was a poorly defined problem, because I didn't understand it
<phoe>
truth be told, this might have ended with a firestorm, some banhammering, and overall bad smell on #lisp if I weren't here to calm things down a bit
<phoe>
and I absolutely *DON'T* want to need to say such things
<phoe>
cmon, let's just be excellent to one another.
<jmercouris>
I will do my best
* phoe
afk for real life things
<phoe>
<3
pfdietz has joined #lisp
tourjin has quit [Ping timeout: 260 seconds]
zigpaw1 has quit [Ping timeout: 240 seconds]
save-lisp-or-die has quit [Ping timeout: 260 seconds]
sjl_ has joined #lisp
zigpaw1 has joined #lisp
shangul has joined #lisp
toorevitimirp has quit [Ping timeout: 258 seconds]
xlei has quit [Ping timeout: 256 seconds]
pfdietz has quit [Remote host closed the connection]
<jmercouris>
just thought you may be interested later when you have time
bitmapper has joined #lisp
patlv has quit [Quit: patlv]
yitzi has joined #lisp
<gendl>
Hi, is there a supported way to compile slime's .el files to .elc?
xlei has joined #lisp
<jmercouris>
this is the wrong channel
<gendl>
emacs 27.1 warns that package cl is deprecated if we are requiring it at load time. If we can load .elc files, apparently this warning will not happen.
<jmercouris>
I would try #emacs
<gendl>
jmercouris: this isn't the right channel for slime questions? Is there a #slime channel?
<mfiano>
File a bug ticket with whoever wrote code using the very old cl library. They should be using cl-lib now.
<mfiano>
But yes, wrong channel
<jmercouris>
there is a #slime channel
<gendl>
just found the #slime channel, thanks. btw it looks like slime depends on 'cl just for two symbols.
<phoe>
the patch should be trivial then
shangul has quit [Ping timeout: 240 seconds]
<phoe>
(hopefully!)
iAmDecim has quit [Ping timeout: 256 seconds]
<mfiano>
(or was it lib-cl?...I forget)
stepnem has quit [Ping timeout: 240 seconds]
stepnem has joined #lisp
shangul has joined #lisp
theseb has joined #lisp
dpd88 has joined #lisp
<terpri>
cl-lib, yes
mangul has joined #lisp
<mfiano>
I see. I didn't have enough interest in the real inferior-lisp to go refresh my memory.
shangul has quit [Ping timeout: 240 seconds]
rippa has joined #lisp
Alloc has quit [Ping timeout: 260 seconds]
Alloc has joined #lisp
shangul has joined #lisp
mangul has quit [Ping timeout: 258 seconds]
phadthai has quit [Remote host closed the connection]
cosimone has joined #lisp
cosimone has quit [Client Quit]
cosimone has joined #lisp
<jmercouris>
ha! :-D
vutral has quit [Quit: Connection closed for inactivity]
jgodbout has joined #lisp
chiota has joined #lisp
cosimone has quit [Quit: Quit.]
cosimone has joined #lisp
elxbarbosa has joined #lisp
shangul has quit [Ping timeout: 256 seconds]
narimiran has quit [Ping timeout: 256 seconds]
jgodbout has quit [Quit: Leaving]
dominic34 has joined #lisp
phadthai has joined #lisp
jgodbout has joined #lisp
dominic34 has quit [Remote host closed the connection]
iamFIREc1 has quit [Ping timeout: 265 seconds]
heisig has quit [Quit: Leaving]
davepdotorg has quit [Quit: Leaving...]
Cymew has quit [Ping timeout: 264 seconds]
gko_ has quit [Ping timeout: 258 seconds]
jibanes has quit [Ping timeout: 258 seconds]
lottaquestions has joined #lisp
davepdotorg has joined #lisp
jibanes has joined #lisp
ggole has quit [Quit: Leaving]
jasom_ has joined #lisp
VincentVega has quit [Ping timeout: 245 seconds]
jack has joined #lisp
jack is now known as Guest41072
jackdaniel has quit [Disconnected by services]
Guest41072 is now known as jackdaniel
trn has quit [Remote host closed the connection]
prite has quit [Ping timeout: 258 seconds]
Misha_B has quit [Remote host closed the connection]
davepdotorg has quit [Remote host closed the connection]
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ has joined #lisp
trn has joined #lisp
Lord_of_Life_ is now known as Lord_of_Life
lispyone__ has quit []
lispyone__ has joined #lisp
lispyone__ has quit [Client Quit]
vutral has joined #lisp
jackdaniel1 has joined #lisp
jackdaniel has quit [Disconnected by services]
jackdaniel1 is now known as jackdaniel
bsd4me has left #lisp ["Leaving"]
prite has joined #lisp
dominic34 has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
yitzi_ has joined #lisp
<Josh_2>
I found a better way to do what I wanted
rumbler31_ has joined #lisp
<Josh_2>
I am already storing an association between strings and symbols, I can just create slots from the symbols and use those within compute-slots
<Bike>
not sure i understand. you have a keyword argument called "initargs"? what's special-slot look like?
<Bike>
also, the direct slots need to actually be in the direct slots of the class. they're not, here
<Josh_2>
hmmm
<Bike>
you can't just add effective slots that don't correspond to any direct slots, as far as i know
<Josh_2>
hmmmmmmmmmmm
<Bike>
effective slots don't have readers or writers, so the information would be discarded, anyway
<Josh_2>
special-slot is a standard-slot-definition
<Bike>
if you want instances of your metaclass to have extra slots the easiest thing to do is just to define a superclass for all the instances, and put those slots in the superclass
<Bike>
what is special-slot a subclass of?
<Josh_2>
standard-slot-definition
<Bike>
so it's not direct OR effective?
<Bike>
i don't know if that's allowed, and if it is, the rest of the system is going to ignore it unless you put in special processing
<Josh_2>
oof
<Josh_2>
I did try direct earlier
<Josh_2>
I will try that again
<Bike>
okay, just
<Bike>
what are you trying to do overall?
<Josh_2>
add slots based on a list that gets updated
<Bike>
add slots to what? a class?
<Josh_2>
an instance
<Josh_2>
so how do I associate an effective slot with a direct slot ?
<Bike>
compute-slots does that. but i think you're maybe in the wrong area here.
<Bike>
slot definitions are properties of classes. classes have slot definitions. instances do not have slot definitions, they have slots.
<Bike>
In this scenario, do you have different instances of the same class that have different accessible slots?
<Josh_2>
yes but when you compute-slots you can add slots
<Josh_2>
hmmm I doubt it but I suppose It's possible
<Bike>
compute-slots is called when you define a class. it's not called for every instance, or anything like that.
<Josh_2>
oof I forgot about that
<Josh_2>
thats the second time today
<Josh_2>
well scrap that idea
<Bike>
You need to decide what exactly you want. A class that can have slots added and removed is a lot different from flexible instances.
<Josh_2>
I tried the class slots added/removed earlier
<Josh_2>
gave up on that idea
<Bike>
Forget questions of w hat you can do. What do you WANT to do?
<Bike>
Precisely?
simendsjo has quit [Ping timeout: 240 seconds]
<Josh_2>
update a class' slots when I parse a new header
<Josh_2>
so basically redefine a class with a new slot each time I find a new header, and then create an instance of that
<Bike>
Could you just redefine the class? You might not even to do anything fancy with mop.
<Josh_2>
yes
<Josh_2>
Can't do it manually be recompiling the defclass macro
<Bike>
What?
<Josh_2>
well I want to add the slots automatically
<Josh_2>
so the next time an instance is created it has the new slots
<Bike>
If you redefine a class, all the instances will be updated to match it.
<phoe>
automatically when *what* happens
<Bike>
If you just evaluate a new DEFCLASS form with the extra slot.
<Bike>
and of course any instances made in the future will also match the class.
<Josh_2>
well It's okay if the others are updated
<phoe>
Josh_2: can you give us some sort of example syntax/code that you want to have?
<phoe>
maybe we can match this better to what is actually possible with the standard classes
<Josh_2>
I basically did. In the plaster code there is a list called *slots-needed* now imagine that every once in a while a new symbol is added automatically and the class 'request' would need to update itself with the new slot
<Josh_2>
and I guess all current instances, although I'd prefer if I could stop that
<phoe>
you can't stop that
<Bike>
Why would you want instances of the same class to have different slots? That's confusing.
<phoe>
if you redefine a class, then all instances of it must get updated.
<Bike>
Are you sure you don't just want a new class?
<phoe>
if anything, you--- yes, this
<Josh_2>
well in this case they won't be used for long so would get garbage collected
<Josh_2>
It's okay if they get updated, thats fine
theseb has quit [Quit: Leaving]
<Bike>
okay. so just do (eval `(defclass classname (supers...) ,@*slots-needed*)) when you change *slots-needed*.
<Bike>
and if that's what you want you can do that a little better with ensure-class instead, but it's still like a line of code.
<phoe>
or use the functional equivalent of C2MOP:ENSURE-CLASS
<phoe>
oh yes
<Josh_2>
Yes
<Josh_2>
ensure-class is what I was thinking
<Josh_2>
I was also thinking of making the slots dynamic like in the AMOP example
vutral has quit [Quit: Connection closed for inactivity]
<Josh_2>
as I assume many of the slots won't be used
<Bike>
I really don't understand your architecture here. How many instances of this class are relevant at any given time?
<Bike>
It sounds like just one instance?
toorevitimirp has joined #lisp
simendsjo has joined #lisp
<Josh_2>
Don't take it seriously I'm basically just messing about
<Josh_2>
just experimenting ¯\_(ツ)_/¯
<Josh_2>
it will be just one if It's working on a single thread
hendursaga has quit [Quit: hendursaga]
hendursaga has joined #lisp
hiroaki has joined #lisp
Alloc has quit [Ping timeout: 260 seconds]
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
Alloc has joined #lisp
simendsjo has left #lisp ["ERC (IRC client for Emacs 27.1.50)"]
mmmattyx has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
liberliver has quit [Remote host closed the connection]
hiroaki has quit [Ping timeout: 260 seconds]
liberliver has joined #lisp
toorevitimirp has joined #lisp
shangul has quit [Ping timeout: 240 seconds]
duuqnd has quit [Remote host closed the connection]
liberliver has quit [Ping timeout: 240 seconds]
ggoes has quit [Quit: WeeChat 2.3]
ggoes has joined #lisp
ggoes has quit [Client Quit]
ggoes has joined #lisp
hiroaki has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
rogersm has joined #lisp
narimiran has joined #lisp
mseddon has quit [Quit: Leaving]
dominic35 has joined #lisp
dominic34 has quit [Ping timeout: 246 seconds]
dominic35 is now known as dominic34
sympt_ has joined #lisp
Necktwi has quit [Ping timeout: 246 seconds]
sympt has quit [Ping timeout: 256 seconds]
iAmDecim has joined #lisp
rogersm has quit []
Necktwi has joined #lisp
pfdietz has joined #lisp
save-lisp-or-die has joined #lisp
scymtym has quit [Ping timeout: 244 seconds]
<_death>
I guess what Josh_2 is trying to do is usually a basic feature of frame based systems..
yitzi_ has quit [Read error: Connection reset by peer]
<_death>
for example, Parmenides (which can be made to run on today's CL implementations with a few easy tweaks) has add-slot <classname> <slot-name> <slot-contents> &key cache
<Lycurgus>
i knew of it (parmenides) but now it occurs in the context of relief from encumbered frame systems
<_death>
what do you mean? (I played with it some years ago, but otherwise don't have much experience with those)
<Lycurgus>
what do I mean by what?
<_death>
relief from encumbered frame systems
<Lycurgus>
ah
<Lycurgus>
various frame systems that are embedded in sundry cog arches
<Lycurgus>
so that you have to buy the whole arch to use the frame sys
<_death>
I see
<Lycurgus>
and sometimes literally buy
<_death>
another one is KR, which comes with garnet (recently mentioned on r/Common_Lisp)
<Lycurgus>
yeah that's what i don't want - "comes with"
<Lycurgus>
has that been brought up in current mcclim oder btw?
<Lycurgus>
(garnet)
<_death>
well, garnet depends on KR, not the other way around
shka_ has quit [Ping timeout: 246 seconds]
cosimone has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 265 seconds]
<_death>
there must be some frame representation systems based on CLOS
wsinatra has joined #lisp
pfdietz has quit [Remote host closed the connection]
edgar-rft has quit [Quit: Leaving]
Lycurgus has quit [Quit: Exeunt]
iAmDecim has quit [Ping timeout: 240 seconds]
IPmonger has joined #lisp
<_death>
I guess gbbopen could be said to have one
IPmonger has quit [Remote host closed the connection]
jeosol has joined #lisp
rumbler31 has joined #lisp
hiroaki has quit [Ping timeout: 240 seconds]
scymtym has joined #lisp
namosca has joined #lisp
save-lisp-or-die has quit [Remote host closed the connection]
EvW has quit [Ping timeout: 260 seconds]
jeosol has quit [Remote host closed the connection]
jeosol has joined #lisp
jasom_ has quit [Ping timeout: 240 seconds]
sjl_ has quit [Ping timeout: 240 seconds]
elxbarbo` has quit [Remote host closed the connection]
namosca has quit [Quit: leaving]
jcowan has joined #lisp
Necktwi has quit [Ping timeout: 246 seconds]
<jcowan>
What's the general view in the CL community about error conditions? Is it usual to just use condition type ERROR or to create your own subtype?
retropikzel has quit [Remote host closed the connection]
<Xach>
jcowan: it is pretty common to create your own conditions of the approprite type, which is often (but not always) a subtype of error.
<Xach>
appropriate, rather.
rumbler31 has quit [Remote host closed the connection]
<Xach>
the condition is super useful for gathering relevant info about the problem
<Xach>
and the custom condition helps distinguish your condition from others that aren't of interest
<Xach>
sjl: did i miss a pr for your mercurial repos?
<phoe>
jcowan: (error "foo ~A" bar) is common, but custom condition types are so much better
<phoe>
I try to make custom condition types wherever and however I can
<Xach>
thanks
Necktwi has joined #lisp
<jcowan>
phoe: Well, yes, but then you are Lord High Conditioner
<Xach>
I usually think of (error "foo ~A" bar) as the quick and dirty first version and refine as time allows and need dictates
<phoe>
sure, feel free to disregard my opinion as appropriate :D
<jcowan>
The debate I'm having with a colleague is this. Given a document that is MIME-labeled with an unknown encoding name, what to do? We agree that returning NIL is a bad idea; I think the situation is rare enough that returning a generic condition type is enough, whereas my cow orker is strongly in favor of a unique type. Disregard for the moment the question of relevant information; the datum argument is enough.
<Xach>
I would make a unique type, and if the data isn't important, it would be as simple as (define-condition unknown-encoding-error (error) ())
<phoe>
the above becomes impossible with a cl:error.
<Xach>
There are so many other errors that might happen and being able to distinguish is very helpful later, as phoe suggests.
<phoe>
which means that the programmer cannot customize program behavior in case an unknown MIME label is encountered
<phoe>
and either you need to use a catch-all ERROR handler or drop into the debugger.
<Xach>
phoe: LIES.
<phoe>
Xach: hey wait how
<Xach>
phoe: you make a satisfies type that searches for strings in the error report text
<phoe>
other than via parsing the simple-error
<phoe>
eugh
* phoe
pukes
<Xach>
don't puke, it's actually pretty handy for errors you don't control
torbo has joined #lisp
<Xach>
and you don't have to change (much) if the stuff is fixed later
<phoe>
yes, and it's ugly as holy hell because of sloppy condition programming
<Xach>
Ugly Yet Handy is the CL motto
<phoe>
we're suddenly back to using grep inside Lisp code
iAmDecim has joined #lisp
<Xach>
but it's an abstraction layer away
<Xach>
so the handling code is not ugly
<phoe>
s/grep/cl:search
dominic34 has quit [Remote host closed the connection]
<phoe>
well, correct, it's the SATISFIES type that is ugly.
<phoe>
the handler itself is okay.
<Xach>
yes
<Xach>
and the need to do it is ugly
<jcowan>
Well. The answer to that would have been to use predicates rather than types in handler-bind. But nooooo.
<Xach>
"i'm not wrong, the spec/compiler/world is wrong"
<Xach>
phoe: but, at least you can do it once, and use it N times
<phoe>
yes
<phoe>
and contain the ugliness
<Xach>
maybe satisfies types are actually beautiful
<phoe>
still, using a a SATISFIES type plus a named function that searches for substrings in condition reports is more ugly than using a proper condition type.
<phoe>
well they say beauty is in the eye of the beholder
<phoe>
do they satisfy you?
<Xach>
yes
<phoe>
well then
<Xach>
phoe: oh
<phoe>
jcowan: listen to Xach
jdz has quit [Ping timeout: 240 seconds]
<jcowan>
Well, it seems you agree at least on the first-order advice: use a unique type.
<Xach>
i think i've also seen wrappers that promote vague errors to more specific things
<fwoaroof[m]>
I also like the ability to do (or parse-error type-error)
jdz has joined #lisp
<jcowan>
My colleague is often very very very annoying. He makes up for this by sometimes (often?) being very very right.
Inline has quit [Ping timeout: 258 seconds]
<phoe>
Xach: so, basically, they fix things for the original programmers
<jcowan>
fwoaroof[m]: Well, a macro would handle that for you.
<fwoaroof[m]>
Xach: that's my preference, for simple conditions: do the ugly string thing, but do it in a wrapper that signals a unique condition type
<fwoaroof[m]>
jcowan: why write a macro when I can just use a type?
<phoe>
jcowan: (handler-bind (((or foo bar baz) #'handle-condition)) ...)
<phoe>
that's a valid type
<fwoaroof[m]>
Also (and base-condition-1 base-condition-2) for the common subclasses of two conditions might occasionally be useful
<jcowan>
I mean, write a macro that can do OR-types and AND-types for you and use it instead of handler-bind
<phoe>
oh
<fwoaroof[m]>
Again, I think types in handler-bind was the right decision
<fwoaroof[m]>
Sure, you can do predicates or whatever, but I actually like the type system in CL :)
<jcowan>
It's certainly a reasonable choice, but if you have predicates you can easily get types; vice versa, not so much.
<fwoaroof[m]>
SATISFIES is a type :)
* jcowan
handwaves
<fwoaroof[m]>
So, they're isomorphic
cgay has joined #lisp
iAmDecim has quit [Ping timeout: 240 seconds]
mmmattyx has quit [Quit: Connection closed for inactivity]
EvW has joined #lisp
iAmDecim has joined #lisp
stepnem has quit [Ping timeout: 240 seconds]
<Josh_2>
How do I translate this? (eval-when (load eval compile) .. ) to It's CL equiv?
<jcowan>
At one time I tried to convince eval-when on SBLC that I wanted a function needed only to expand a macro to be present at compile time but not runtime, but I was never able to get it to work with both compile-file and load.
frgo has joined #lisp
Necktwi has quit [Ping timeout: 264 seconds]
<fwoaroof[m]>
"deprecated"
chiota has quit [Quit: Lost terminal]
iAmDecim has joined #lisp
CrazyEddy has quit [Ping timeout: 240 seconds]
rumbler31_ has quit [Ping timeout: 256 seconds]
save-lisp-or-die has quit [Remote host closed the connection]
iAmDecim has quit [Ping timeout: 265 seconds]
iAmDecim has joined #lisp
Bike has quit [Quit: Lost terminal]
Bourne has quit [Ping timeout: 260 seconds]
spacebat2 has quit [Ping timeout: 260 seconds]
spacebat2 has joined #lisp
bilegeek has quit [Quit: Leaving]
<sveit>
hello; this is similar to a question i have asked before, but is it known/specified if inlining of function calls happens before or after compiler macros are run?
pve has quit [Quit: leaving]
iAmDecim has quit [Ping timeout: 258 seconds]
jeosol has quit [Remote host closed the connection]
<phoe>
AFAIK compiler macros are allowed to be used instead of inlined function bodies
<phoe>
so compiler macros are earlier I guess
jasom_ has joined #lisp
mangoicedtea has joined #lisp
<sveit>
phoe: thanks. to confirm, i mean if G would have been inlined and F has a compiler macro definition, the F compiler has a chance to see G in (F (G x))?