thuna` has quit [Remote host closed the connection]
akoana has joined #commonlisp
holycow has quit [Quit: Lost terminal]
bilegeek has joined #commonlisp
random-nick has quit [Ping timeout: 245 seconds]
NotThatRPG has joined #commonlisp
dinomug has joined #commonlisp
akoana has quit [Quit: leaving]
waleee has quit [Ping timeout: 245 seconds]
dcb has quit [Quit: MSN Messenger 4.0.2]
habamax has quit [Ping timeout: 246 seconds]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
diod has joined #commonlisp
rtypo has quit [Ping timeout: 264 seconds]
bird_ has quit [Ping timeout: 260 seconds]
diod has quit [Quit: Client closed]
bird_ has joined #commonlisp
oneeyedalien has joined #commonlisp
habamax has joined #commonlisp
ika_ has joined #commonlisp
<ika_>
hi folks
<beach>
Hello ika_.
<ika_>
what is the difference between (funcall 'func-name params...) and (funcall #'func-name params...) ?
<beach>
It differs when func-name is the name of a local function.
<beach>
Introduced by flet or labels.
<ika_>
oh yeah i got it
<beach>
Then the first form refers to the global function with that name, and the second form refers to the local function with that name.
<beach>
ika_: Are you new here? I don't recognize your nick.
<ika_>
so the former passes a quoted symbol and the latter passes a function object, so if the symbol is bound to another thing in the local scope if might return different result while the latter always returns the correct(meant) one
<ika_>
beach: yes i am
<beach>
Welcome!
<ika_>
thanks!
<beach>
Sort of...
<beach>
FUNCALL takes a "function designator" as an argument. So #'NAME is shorthand for (FUNCTION NAME), and FUNCTION is a special operator that returns the function with the name NAME.
<beach>
And if FUNCALL instead receives a function name (instead of a function) it looks up that name in the global environment.
<ika_>
oh it looks it up the global environment?
<beach>
It has no other choice since the lexical run-time environment is not available to it.
<beach>
FUNCALL is a global function, and all it has access to is the global environment.
<ika_>
huh
<ika_>
interesting
<beach>
Lexical environments are available only at compile time. It was done this way so that it would be easier for people who implement Common Lisp to write optimizing compilers.
<beach>
You can perhaps appreciate this better if, instead of (FUNCALL 'NAME) you would write (FUNCALL (READ)). I mean 'NAME is just a form that evaluates to the symbol NAME, and you can substitute any form that evaluates to a name.
<beach>
Then you can see that the symbol given to FUNCALL can be known only at run-time.
notzmv has joined #commonlisp
<ika_>
oh
<ika_>
i get it now
<ika_>
im gonna go test some more cases
yewscion has quit [Remote host closed the connection]
<ika_>
thanks
yewscion has joined #commonlisp
<beach>
Pleasure.
mxmkm has joined #commonlisp
oneeyedalien has quit [Quit: Leaving]
msavoritias has joined #commonlisp
habamax has quit [Ping timeout: 272 seconds]
ika_ has quit [Ping timeout: 245 seconds]
bilegeek has quit [Quit: Leaving]
ika_ has joined #commonlisp
mxmkm has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.0.92)]
habamax has joined #commonlisp
Oladon1 has joined #commonlisp
Oladon has quit [Ping timeout: 272 seconds]
oneeyedalien has joined #commonlisp
Cymew has joined #commonlisp
oneeyedalien has quit [Quit: Leaving]
randm has quit [Remote host closed the connection]
randm has joined #commonlisp
azimut has joined #commonlisp
Brucio-61 has quit [Ping timeout: 264 seconds]
ika_ has quit [Remote host closed the connection]
ika_ has joined #commonlisp
ika_ has quit [Remote host closed the connection]
<Shinmera>
aeth: I implemented v-clip exactly according to the original (absolutely awful) C++ implementation and I get the same results in both.... but the results are wrong for some cases
Oladon1 has quit [Quit: Leaving.]
shka has joined #commonlisp
Brucio-61 has joined #commonlisp
igemnace has joined #commonlisp
Inline has joined #commonlisp
silasfox has joined #commonlisp
overclucker has quit [Ping timeout: 252 seconds]
habamax has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
overclucker has joined #commonlisp
pve has joined #commonlisp
<Shinmera>
Anyway, now to translate ~6k lines of C++ for convex decomposition :u
LW has joined #commonlisp
LW has quit [Client Quit]
pranavats has left #commonlisp [Error from remote client]
<beach>
Wow! Good luck!
<Shinmera>
Thanks, I'll need it :/
dino_tutter has joined #commonlisp
bendersteed has joined #commonlisp
ika_ has joined #commonlisp
woudshoo has joined #commonlisp
woudshoo` has joined #commonlisp
woudshoo has quit [Ping timeout: 272 seconds]
rogersm has quit [Quit: Leaving...]
Inline has quit [Quit: Leaving]
mgl has joined #commonlisp
molson__ has quit [Remote host closed the connection]
mgl has quit [Quit: Client closed]
woudshoo` has quit [Ping timeout: 272 seconds]
<Shinmera>
The nice thing at least is that I don't need to worry about allocation with this, since the algorithm will only be run statically. Unlike the collision detection stuff, which has to avoid producing garbage :/
attila_lendvai has joined #commonlisp
<Shinmera>
Doing all this stuff one of my biggest wishes is that there were an easier way to do stack allocation. To do it at all you have to very carefully design the interfaces and very specifically massage the construction point (you have to call the structure constructor directly).
<Shinmera>
I understand why things are the way they are, I'm just shouting at the clouds, I suppose.
dinomug has quit [Remote host closed the connection]
pranavats has joined #commonlisp
jmdaemon has quit [Ping timeout: 258 seconds]
mgl has joined #commonlisp
ika_ has left #commonlisp [ERC 5.5 (IRC client for GNU Emacs 28.2)]
<mgl>
I seem to recall that there were some guidelines on when to directly expose a generic function and when to put a normal function in front for more flexibility (e.g. to be able to add keyword args without having to change all method definitions or to require &ALLOW-OTHER-KEYS).
<mgl>
There was a question in there, but I ran out of #\?.
Lord_of_Life_ has joined #commonlisp
<beach>
You shouldn't have to add &ALLOW-OTHER-KEYS to method definitions.
Lord_of_Life has quit [Ping timeout: 272 seconds]
<beach>
My memory says that it is as if methods are called with :ALLOW-OTHER-KEYS T.
<beach>
Of course, if your generic function initially does not allow keyword arguments at all, then you need to add &KEY or &REST to methods.
<beach>
All this from memory; I may have gotten some things wrong.
Lord_of_Life_ is now known as Lord_of_Life
<Shinmera>
you need either &key or &rest in the method lambda list if the generic function has &key
<beach>
So my memory was right.
<Shinmera>
methods can add additional keys on their own that aren't part of the generic function, but *must* allow all keys that are part of the generic function.
<Shinmera>
methods can also specify &allow-other-keys on their own to simply ignore keys they don't care about. If the generic function has &allow-other-keys, all methods implicitly allow other keys, too.
<Shinmera>
whether they have &allow-other-keys or not
<beach>
Hmm.
<paulapatience>
mgl: If you want do dispatch on keyword or optional arguments, you need to make them required in the generic function and write a nongeneric function that supplies the defaults (if that was the question)
<paulapatience>
s/do dispatch/to dispatch/
<mgl>
The whole &key bit was just an example of what I vaguely recall these aforementioned guidelines were about.
<beach>
Shinmera: Right. So a method can have &REST and still accept keyword arguments. Thanks for the details.
<Shinmera>
yes
<mgl>
To ask the original question differently, do you sometimes put a plain function in front a generic function for the flexibility it provides? If so, under what circumstances?
<Shinmera>
notably if the generic function does not have &allow-other-keys, using &rest in a method that just delegates to another function via apply, you will probably need to add &key &allow-other-keys to avoid it erroring due to unaccepted keys.
<Shinmera>
mgl: I don't think I've ever done so, not with the same signature.
<Shinmera>
sometimes it can be useful to have control inversion by flipping the order, allowing overriding in more complicated ways, but I've never done so purely for "internal organisation" as you seem to be thinking about
habamax has joined #commonlisp
tyson2 has joined #commonlisp
<mgl>
I'm thinking about how to future proof a design. I'd like to have the option of adding arguments to the function without requiring or even *allowing* methods to have keys. Hence, having a normal function that calls a generic function is an obvious choice, but the resulting parallel definitions have a cumbersome feel to them, and I'm wondering if
<mgl>
there are other factors that would make me climb down from the fence (on one side).
<Shinmera>
I like not thinking about things I can't predict too much :)
<Shinmera>
I'm also a bit confused about your application. If you allow users to define their own methods than either way they'll have to update *something* or it won't integrate properly anymore. If you don't, then who cares, you can add &key to the generic function and internal methods yourself. The calling code doesn't need to be updated.
<mgl>
I wouldn't even consider this scheme if it's all code that *I* can change, but exposing an interface introduces a lot of friction.
remexre has quit [Read error: Connection reset by peer]
<Shinmera>
If you expect to possibly extend things with keywords later, just slap the &key on the generic function now and be done with it
remexre has joined #commonlisp
silasfox has quit [Quit: Connection closed]
<mgl>
We kind of got bogged down in discussion of the specifics of keyword arguments, because those are the only things that came to my mind when I asked the original question. I'm aware of the possible choices there, but they have drawbacks. Maybe there are no other considerations to have, but those are what I'm looking for.
<mgl>
Sorry about the vagueness.
thollief has joined #commonlisp
attila_lendvai_ has joined #commonlisp
scymtym has joined #commonlisp
attila_lendvai has quit [Ping timeout: 272 seconds]
alendvai__ has joined #commonlisp
attila_lendvai_ has quit [Read error: Connection reset by peer]
czy has quit [Ping timeout: 258 seconds]
Gleefre has joined #commonlisp
alendvai__ has quit [Read error: Connection reset by peer]
attila_lendvai_ has joined #commonlisp
shka has quit [Ping timeout: 272 seconds]
random-nick has joined #commonlisp
ming_ has joined #commonlisp
yewscion has quit [Read error: Connection reset by peer]
waleee has joined #commonlisp
shka has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
shka has quit [Read error: Connection reset by peer]
shka has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
notzmv has quit [Ping timeout: 272 seconds]
pranavats has joined #commonlisp
green_ has quit [Quit: Leaving]
seanw has joined #commonlisp
jladd has quit [Ping timeout: 250 seconds]
diod has joined #commonlisp
jladd has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
NotThatRPG has joined #commonlisp
rtypo has joined #commonlisp
NotThatRPG has quit [Client Quit]
NotThatRPG has joined #commonlisp
Josh_2 has quit [Ping timeout: 245 seconds]
Gleefre has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tyson2 has joined #commonlisp
habamax has quit [Remote host closed the connection]
Brucio-61 has quit [Ping timeout: 240 seconds]
scymtym has quit [Ping timeout: 240 seconds]
son0p has quit [Ping timeout: 245 seconds]
NotThatRPG has joined #commonlisp
attila_lendvai_ is now known as attila_lendvai
zxcvz has joined #commonlisp
bendersteed has quit [Quit: bye]
thuna` has joined #commonlisp
Brucio-61 has joined #commonlisp
AetherWind has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
waleee has quit [Ping timeout: 258 seconds]
waleee has joined #commonlisp
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
dino_tutter has quit [Ping timeout: 245 seconds]
eddof13 has joined #commonlisp
gxt__ is now known as gxt
notzmv has joined #commonlisp
tyson2 has quit [Ping timeout: 252 seconds]
diod has quit [Quit: Client closed]
LW has joined #commonlisp
LW has quit [Client Quit]
diod has joined #commonlisp
Cymew has quit [Ping timeout: 258 seconds]
diod has left #commonlisp [#commonlisp]
NotThatRPG has quit [Remote host closed the connection]
AetherWind has quit [Quit: leaving]
NotThatRPG has joined #commonlisp
AetherWind has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
AetherWind has quit [Ping timeout: 240 seconds]
waleee has quit [Ping timeout: 245 seconds]
mgl has quit [Quit: Client closed]
ming_ has quit [Remote host closed the connection]
ming_ has joined #commonlisp
dcb has joined #commonlisp
random-nick has quit [Ping timeout: 272 seconds]
morganw has joined #commonlisp
Oladon has joined #commonlisp
random-nick has joined #commonlisp
tyson2 has joined #commonlisp
dino_tutter has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ming_ has quit [Ping timeout: 272 seconds]
yewscion has joined #commonlisp
bilegeek has joined #commonlisp
semz has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
semz has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
NotThatRPG has joined #commonlisp
igemnace has quit [Remote host closed the connection]
AetherWind has joined #commonlisp
masinter has quit [Ping timeout: 272 seconds]
Lyrebird has joined #commonlisp
waleee has joined #commonlisp
masinter has joined #commonlisp
tyson2 has joined #commonlisp
selfish has joined #commonlisp
tevo has quit [Ping timeout: 272 seconds]
Lyrebird has quit [Quit: Lost terminal]
selfish has quit [Client Quit]
alcor has joined #commonlisp
tevo has joined #commonlisp
tevo has quit [Client Quit]
tyson2 has quit [Remote host closed the connection]
msavoritias has quit [Remote host closed the connection]
jmdaemon has joined #commonlisp
doulos05_ has quit [Ping timeout: 260 seconds]
doulos05 has joined #commonlisp
AetherWind has quit [Quit: leaving]
AetherWind has joined #commonlisp
bilegeek has quit [Quit: Leaving]
tevo has joined #commonlisp
Everything has quit [Quit: leaving]
yewscion has quit [Remote host closed the connection]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thollief has quit [Ping timeout: 246 seconds]
thollief has joined #commonlisp
eddof13 has joined #commonlisp
attila_lendvai has quit [Ping timeout: 245 seconds]
thollief has quit [Quit: Leaving]
masinter has quit [Ping timeout: 272 seconds]
yewscion has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AetherWind has quit [Quit: Sleep.ZZZzzz]
akoana has joined #commonlisp
alcor has quit [Remote host closed the connection]
notzmv has quit [Ping timeout: 272 seconds]
Josh_2 has joined #commonlisp
NotThatRPG has joined #commonlisp
<Josh_2>
hi hi :trumpet: Is #'change-class a particularly intense task? If there are no new initargs and the new class is a direct subclass?
<Josh_2>
In context the slowest part would be grabbing the info from the db rather than maybe performing a change class at the final step
<Josh_2>
Okay from what I can see it makes almost no difference whatsoever
<Josh_2>
maybe few more cycles here and there :shrug:
<bike>
it usually requires conses, and implementations may not bother optimizing out the initargs check
<bike>
requires consing*
<Josh_2>
Okay :thumbsup:
Kongo04 has joined #commonlisp
<Josh_2>
I dont think its going to matter. Less effort to just change class right at the end than fiddle with my database
<bike>
as usual, profile, premature optimization is the root of all evil, etc. i wouldn't be surprised if a database query will be more important for performance
Kongo04 has quit [Quit: Client closed]
Kongo04 has joined #commonlisp
<Josh_2>
Yep
<Josh_2>
I think you are right
<Josh_2>
Although now I have to have my <class> <class testing> <class deleted> <class testing deleted> :joy:
<Josh_2>
Nothing more methods wont fix :joy:
White_Flame has quit [Remote host closed the connection]
White_Flame has joined #commonlisp
tyson2 has joined #commonlisp
shka has quit [Ping timeout: 260 seconds]
notzmv has joined #commonlisp
dra has joined #commonlisp
dra has joined #commonlisp
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
dino_tutter has quit [Ping timeout: 245 seconds]
azimut has quit [Ping timeout: 240 seconds]
enzuru has quit [Ping timeout: 258 seconds]
pve has quit [Quit: leaving]
akoana has quit [Remote host closed the connection]
jmdaemon has quit [Ping timeout: 260 seconds]
Everything has joined #commonlisp
akoana has joined #commonlisp
yewscion has quit [Remote host closed the connection]
morganw has quit [Remote host closed the connection]
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
eddof13 has joined #commonlisp
robin has quit [Read error: Connection reset by peer]
habamax has joined #commonlisp
robin has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
son0p has joined #commonlisp
cjrf has joined #commonlisp
robin has quit [Read error: Connection reset by peer]