yitzi has quit [Remote host closed the connection]
azimut has joined #commonlisp
molson has joined #commonlisp
JuanDaugherty has joined #commonlisp
<jmercouris>
is there something I am missing, but does ASDF compile files in parallel? systems in parallel?
<bike>
It does not
<bike>
there was a project to do that, POIU, but i don't think it was ever really operable
<jmercouris>
I see, thanks bike
<aeth>
iirc, from the time I asked a similar question (which could've been 5+ years ago) there are actually two issues at hand
<aeth>
parallel at the ASDF level and parallel at the implementation (e.g. SBCL) level
<aeth>
the latter should be much easier, but there are also not really long per-file compilation times except maybe in e.g. ECL... a few outliers like ironclad (cryptography) with SBCL, but I think that eventually got fixed
<aeth>
the former has the issue of the many global state things that affect compilation
<aeth>
e.g. *read-default-float-format* defaults to SINGLE-FLOAT but might be DOUBLE-FLOAT and that's going to change a lot (though you can avoid accidentally making it DOUBLE-FLOAT with a proper parallel compilation process)
<aeth>
but, there's like 30 of those things
<bike>
sbcl stopped the compiler from grabbing the world lock in... 2018, looks like
<aeth>
ASDF is also written in a very unusual style by CL standards, too. The only program I've seen written that way.
<bike>
poiu worked by just forking the lisp process, anyway, so no problem there
<aeth>
bike: I guess I did ask about it > 5 years ago, then. Maybe me asking was one of the inspirations to not lock, maybe not.
<bike>
and of course there are other build systems these days. maybe forge can do something, since it's already oriented to work with like a build farm. heck if i know
JuanDaugherty has quit [Quit: JuanDaugherty]
<aeth>
Imo, it definitely seems more and more out of place over time that fresh compilations (e.g. when upgrading SBCL versions) take any noticable amount of time at all when it's all single threaded in an era when everyone's probably on 8+ core machines.
tyson2 has quit [Remote host closed the connection]
Pirx has quit [Ping timeout: 272 seconds]
larix1 has quit [Ping timeout: 255 seconds]
nyx_land has quit [Read error: Connection reset by peer]
nyx_land has joined #commonlisp
makomo has quit [Ping timeout: 272 seconds]
dcb has quit [Read error: Connection reset by peer]
dcb has joined #commonlisp
<jcowan>
aeth: I personally am using a 2-core laptop for many years now
beach` has joined #commonlisp
beach has quit [Ping timeout: 248 seconds]
<aeth>
jcowan: My laptop is also dual core, with 8 GB RAM, from around 2017 (Kaby Lake?)... the timing is a bit bad because it was right before AMD's Zen started driving the core count up a lot for x86-64, to the point where a similar tiered/priced laptop now would probably be 8+ core
<jcowan>
if thee and me are not on 8-core machines, then it is false that everyone is on 8-core machines
<aeth>
the equivalent to my laptop would be 8 if AMD, and surprisingly 10 if Intel (though that would be 2 p 8 e, and the 8 AMD cores thus have more hardware threads, 16 vs 12)
<aeth>
("U" model laptop CPU)
<jcowan>
Every time something breaks, I ask whether it will cost more to fix on my warranty-plan than to replace. So far, always yes. (The warranty-plan costs me US$15/month and pays for everything but parts.)
<aeth>
Well, my laptop is my only machine with so few cores now. And the Steam HW survey shows 0.09% single core and 6.61% dual core and 0.32% tricore: https://store.steampowered.com/hwsurvey/
<ixelp>
Steam Hardware & Software Survey
<aeth>
although fwiw it's only for people who game and I haven't bothered trying to run Steam on my laptop in years
<aeth>
4 core will stay around much longer because it's the new low end and even new devices are being sold with that
Pixel_Outlaw has joined #commonlisp
<aeth>
It does look like I was wrong about 8 cores, though. 92.98% have > 3 core, 69.6% have > 5 core, and 34.6% have > 7 core, with 6 core as the most popular. On the Steam Hardware Survey, where the lowest end machines won't even bother with.
danza_ has joined #commonlisp
Oladon has joined #commonlisp
habamax has joined #commonlisp
Oladon has quit [Quit: Leaving.]
dcb has quit [Quit: MSN Messenger 4.1.0]
beach` is now known as beach
bilegeek has quit [Quit: Leaving]
danza__ has joined #commonlisp
danza_ has quit [Read error: Connection reset by peer]
akoana has joined #commonlisp
danza__ has quit [Ping timeout: 255 seconds]
igemnace has joined #commonlisp
danza__ has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
contrapunctus has quit [Ping timeout: 258 seconds]
akoana has quit [Quit: leaving]
attila_lendvai_ has joined #commonlisp
<White_Flame>
I was finally able to go from my long-ailing 2-core i7-7200u, to an 8-core 7840U
<White_Flame>
It runs common lisp quite well
<White_Flame>
(and I thought this was lispcafe, sorry)
rgherdt has joined #commonlisp
contrapunctus has joined #commonlisp
<danza__>
oh nice i will check that channel out
dinomug has quit [Remote host closed the connection]
attila_lendvai_ has quit [Ping timeout: 245 seconds]
<danza__>
haha cool i will join a bunch of those now! =D
<danza__>
thanks
shka has joined #commonlisp
pve has joined #commonlisp
igemnace has quit [Remote host closed the connection]
liminality has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
vxe420 has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
OlCe has quit [Remote host closed the connection]
Lord_Nightmare has quit [Remote host closed the connection]
Lord_Nightmare has joined #commonlisp
vxe420 has joined #commonlisp
OlCe has joined #commonlisp
dino_tutter has joined #commonlisp
makomo has joined #commonlisp
dajole has quit [Quit: Connection closed for inactivity]
danza_ has joined #commonlisp
danza__ has quit [Read error: Connection reset by peer]
donleo has joined #commonlisp
jeffrey has joined #commonlisp
anticrisis has quit [Read error: Connection reset by peer]
dino_tutter has quit [Ping timeout: 264 seconds]
newbie has joined #commonlisp
cage has joined #commonlisp
danza_ has quit [Ping timeout: 260 seconds]
limiduality has joined #commonlisp
liminality has quit [Read error: Connection reset by peer]
attila_lendvai_ has joined #commonlisp
simendsjo has joined #commonlisp
simendsj` has joined #commonlisp
simendsjo has quit [Remote host closed the connection]
simendsj` has quit [Remote host closed the connection]
simendsjo has joined #commonlisp
Pirx has joined #commonlisp
zxcvz has joined #commonlisp
tok has joined #commonlisp
attila_lendvai_ has quit [Ping timeout: 260 seconds]
cage has quit [Remote host closed the connection]
newbie has quit [Ping timeout: 272 seconds]
semarie has quit [Quit: WeeChat 4.0.5]
limiduality has quit [Ping timeout: 240 seconds]
<phantomics>
Quick question: is there any way to use cl-who to generate HTML from a list built at runtime as opposed to invoking it as a macro?
<phantomics>
Say I have a list like '(:div :class "something" "Text"), is there a simple way to convert that to HTML using cl-who?
cstub has joined #commonlisp
<pve>
phantomics: I might be wrong, but I think cl-who is built in such a way that you need to use eval to accomplish that.
<phantomics>
Ok, I know I can wrap it in the macro and use eval but I'd rather avoid that
<phantomics>
I'm looking into CXML, can't use spinneret because it includes XML tags
<pve>
When I used cl-who some time ago I did it with eval and everything worked great.
newbie has joined #commonlisp
habamax has quit [Remote host closed the connection]
semarie has joined #commonlisp
<Gleefre>
Hm, I'm looking at update-instance-for-redefined-class now and I have a question
<Gleefre>
In the syntax there is '&rest initargs &key &allow-other-keys'
<Gleefre>
Can initargs be non-empty?
alphacentauri has joined #commonlisp
<bike>
not as far as i'm aware. it's a weirdness in the standard.
<bike>
i guess you could define a method on it that does call-next-method with initargs?
<Gleefre>
Ah, I see.
<Gleefre>
So it should be safe to assume that make-instances-obsolete will call it without key arguments, right?
<bike>
makes-instances-obsolete will probably not call update-instance-for-redefined-class directly at all, really
yitzi has joined #commonlisp
<Gleefre>
Well... Yes, seems like it, but update-instance-for-redefined-class would be called on the instance between make-instances-obsolete and accessing it, I guess.
<bike>
yeah.
<bike>
with null initargs, probably.
<Gleefre>
Found the description of such call: "The arguments to update-instance-for-redefined-class are this transformed instance, a list of added-slots to the instance, a list discarded-slots from the instance, and the property-list containing the slot names and values for slots that were discarded and had values."
<Gleefre>
No mention of initargs, so I will assume they are null
<Gleefre>
Thanks for help!
<bike>
no problem.
JuanDaugherty has joined #commonlisp
random-nick has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
liminality has joined #commonlisp
Lycurgus has joined #commonlisp
Lycurgus has quit [Quit: leaving]
simendsjo has quit [Ping timeout: 260 seconds]
newbie has quit [Ping timeout: 260 seconds]
Lycurgus has joined #commonlisp
Gleefre has joined #commonlisp
jonatack has quit [Ping timeout: 240 seconds]
Lycurgus has quit [Client Quit]
liminality has quit [Ping timeout: 240 seconds]
JuanDaugherty has quit [Quit: JuanDaugherty]
jonatack has joined #commonlisp
liminality has joined #commonlisp
cstub has quit [Read error: Connection reset by peer]
cstub has joined #commonlisp
larix1 has joined #commonlisp
cstub has quit [Quit: Leaving]
mason has quit [Ping timeout: 255 seconds]
mason has joined #commonlisp
amb007 has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
<Gleefre>
Is it possible to make class redefinition thread safe?
<beach>
I would think so. Do you suspect otherwise?
<Gleefre>
Well, kind of?
<Gleefre>
Old reader / writer / accessor methods are deleted when the class is redefined
<beach>
What is the basis of your suspicion?
<Gleefre>
So if there was an operation in progress in another thread that wants to say set a slot of an instance, it might not be able to
<beach>
Are you saying the slot reader/writer/accessor has already started execution in the other thread, or it is about to?
<Gleefre>
Yes, something like that
<beach>
Which one?
<Gleefre>
Let me come up with a minimal example I guess
cage has joined #commonlisp
jon_atack has joined #commonlisp
<beach>
If a generic function is given some instance, and the generic dispatch finds an effective method, then that method should work on the instance that was given.
<Gleefre>
(Not sure if that's the only possible error, but that's one I was hitting randomly)
gothnbass has joined #commonlisp
jonatack has quit [Ping timeout: 252 seconds]
<Gleefre>
So *seems* like the old method was deleted, then the generic function was called, but the new method wasn't yet defined
<beach>
I think you need to define "thread safety" then. Because, to me, it merely means that the system is not crashing or giving the wrong answer.
<Gleefre>
Ok, sure
<Gleefre>
I'm not interacting with threads a lot, so the terminology might be off
<beach>
Your example does not seem to expose any thread-safety problem.
P1RATEZ has joined #commonlisp
tyson2 has joined #commonlisp
<Gleefre>
What I'd like to be able to do is to make sure that each time I call (incf (x foo)) it finishes successfully
<Gleefre>
Plus I might have several threads with instances running; and I'd like to be able to redefine the class so that none of them signals an error because of such "interruption"
<Gleefre>
Maybe that's possible with some sort of a global lock around (defclass ...) ?..
<Gleefre>
[ and probably (incf (x foo))
<beach>
I suspect that would be tricky, because your FOO is going to be an obsolete instance after your class was redefined. To get what you want, FOO would have to be altered atomically as a result of the class being redefined.
<beach>
Yes, I think you would need a global lock and you would need to update every existing instance of the redefined class before you unlock the lock.
gothnbass is now known as Equill
<beach>
Since typically a class would not contain references to its instances, you would then have to do the equivalent of a global garbage collection.
<Gleefre>
Hm, do I need to update them before unlocking if I have only "atomic" calls like (incf (x foo))?
<Gleefre>
Then on the next "atomic" call it would update the instance via say the make-instances-obsolete automatically because it was accessed again?
<beach>
The new X might refer to a slot that does not exist in FOO.
<beach>
Imagine your redefinition adds several slots before the one with X as an accessor.
<beach>
Then the new X would access a slot that is beyond the end of FOO, unless FOO has been updated.
<Gleefre>
If I understand correctly, the call (x foo) would automatically update the instance
<beach>
Sure.
<Gleefre>
Ok, that sounds good :D. The problem for me is the locking part then only.
<beach>
But I am not sure this has to do with thread safety.
<Gleefre>
In some sense I want to have atomic operations during execution of which the class definition cannot change
<Gleefre>
I'm thinking about it as "thread safety", maybe I'm wrong :I
<Gleefre>
I'm not sure what kind of lock to use though. Seems like I want to be able to (1) during such atomic blocks ensure that the class is not redefined (2) when redefining a class, "stop" new blocks from executing, "wait for others", then redefine and "release" the "stop sign".
<Gleefre>
Hm... One more thing - it seems like redefining methods in general is not "thread safe" in the meaning that the error "there is no applicable method" can be easily signaled during the method redefinition
<bike>
it is required that the REMOVE-METHOD generic be called, and then the ADD-METHOD generic be called after that. so it would be difficult to make it atomic. which is probably what you should say rather than thread safe.
<Gleefre>
Ah, yes, atomicity it is [ probably ]
<bike>
(if an operation is "atomic", it is impossible for another thread to "see" a state from during the operation, rather than from before or after it)
<Gleefre>
It seems that all implementation have non-atomic defmethod, yes.
<Gleefre>
That kinda makes it possible to hit weird bugs for game engines with live redefinition support it seems
<Gleefre>
[ those that use CLOS methods as part of their API ]
<bike>
i think what you were saying earlier about not knowing what kind of lock to use is a good hint as to how difficult it would be to make everything atomic.
<Gleefre>
Yeah, I understand.
<Gleefre>
I guess I'll leave it as it is for now, as hitting the bug with say 60fps is unlikely, and it being handled incorrectly by the "global" handler-bind seems even more unlikely.
attila_lendvai_ has joined #commonlisp
<Gleefre>
And it affects the development cycle only, as the shouldn't be any class/method redefinition at runtime
yitzi has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
P1RATEZ has quit [Remote host closed the connection]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
igemnace has joined #commonlisp
cstub has joined #commonlisp
rbcarleton has joined #commonlisp
makomo has quit [Ping timeout: 255 seconds]
akoana has joined #commonlisp
rbcarleton has quit [Remote host closed the connection]
zaymington has quit [Remote host closed the connection]
zaymington has joined #commonlisp
cstub has quit [Quit: Leaving]
dajole has joined #commonlisp
makomo has joined #commonlisp
cstub has joined #commonlisp
Lycurgus has joined #commonlisp
rgherdt_ has joined #commonlisp
JuanDaugherty has joined #commonlisp
rgherdt has quit [Ping timeout: 264 seconds]
JuanDaugherty has quit [Quit: JuanDaugherty]
akoana has quit [Quit: leaving]
tyson2 has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Lycurgus has quit [Quit: leaving]
cstub has quit [Read error: Connection reset by peer]
cstub has joined #commonlisp
cstub has quit [Client Quit]
cstub has joined #commonlisp
igemnace has quit [Read error: Connection reset by peer]
tyson2 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
zxcvz has quit [Quit: zxcvz]
cage has quit [Quit: rcirc on GNU Emacs 29.1]
igemnace has joined #commonlisp
<mfiano>
Gleefre: You don't need atomicity here. You just need a good synchronization point for some thunks to be sent to a thread-safe queue. Virality Engine had to solve this problem, because on at least SBCL, redefining methods will sometimes not get seen next frame, or only part of the generic function's updated state is seen, or something else weird. We also do a lot of CHANGE-CLASS at runtime, so
<mfiano>
needed it for another reason.
zaymington has quit [Remote host closed the connection]
zaymington has joined #commonlisp
pve has quit [Quit: leaving]
limiduality has joined #commonlisp
liminality has quit [Read error: Connection reset by peer]
<Gleefre>
mfiano: I suppose that would mean the need of wrapping your definitions methods in some macro / hooking into the REPL/slime ?
azimut has quit [Ping timeout: 256 seconds]
<Gleefre>
Intresting in any case, maybe will take a look later :)
<mfiano>
I don't remember the details of our implementation, but I'm sure we could hunt it down in #bufferswap if you ask
rgherdt_ has quit [Ping timeout: 258 seconds]
easye has quit [Remote host closed the connection]
<mfiano>
There are a few other things that need to be done for interactivity to not upset an interactively developed game.
<mfiano>
or remove one of those words. Too tired
zaymington has quit [Remote host closed the connection]
nonagonal has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
<mfiano>
Gleefre: I will say, section 8.4 of Sly's manual goes a long way though.
<mfiano>
That is, instead of your game loop running from Sly's REPL via the invocation of your application (or another thread, which is another solution), you run Sly INSIDE your game loop, which gives some benefits for live coding, especially when the debugger is invoked.
<Gleefre>
Hm, if you run slime/sly (or rather swank/slynk) from inside of you game, does that mean you need to run it from command line?
alphacentauri has quit [Quit: WeeChat 4.1.0]
<mfiano>
Nope. Sly (and SLIME though undocumented) has functions to make it think it isn't in your game loop so that it doesn't appear to be blocking
<mfiano>
You start Sly as normal with the same configuration
alphacentauri has joined #commonlisp
<Gleefre>
Interesting
<Gleefre>
I will try to remember to visit you at #bufferswap for details some time later then :D
<Gleefre>
Thanks for hints!
<mfiano>
You basically call a function every N unit of time to unblock the REPL and allow the L to work, where N is something infrequent in game terms, but frequent in human terms
alphacen1 has joined #commonlisp
alphacentauri has quit [Ping timeout: 272 seconds]
alphacen1 has quit [Client Quit]
<mfiano>
The quicklisp project live-support uses this mechanism as a portability wrapper around either Sly, SLIME, or none (in which case it blocks on the CLI if running your Lisp implementation interactively)
<mfiano>
I will say though, a lot more than what live-support provides is needed to be fully correct
<mfiano>
For example, you will need a debugger hook, or your physics system can get your game state into impossible situations (entities stuck inside walls etc). You need to reverse time by tracking how long the debugger session was active, etc.
anticrisis has joined #commonlisp
<mfiano>
(since the main thread is also the main lisp implementation thread)
<mfiano>
Regarding the class/method recompilation:
<mfiano>
Both SLY and SLIME both compile and receive Emacs commands on a DIFFERENT thread, hence the thread-safe queue.