IRC channel logs

2023-01-28.log

back to list of logs

<lilyp>is the socket thing fixed in 3.0.9?
<lilyp>(or was that already fixed earlier and I merely forgot)
<old>Almost done with a GOOPS wrapper for libev btw
<old>I think I've got the lifetime of foreign objects right.
<mfiano>Nice. What do you plan on using the event loop for?
<old>For guile-parallel
<mfiano>Ah
<old>sleep of userspace threads, userspace condition variable, userspace mutexes
<old>And also for asynchronous read of file
<old>The API is quite easy to use so I think it could benifit other projects as well
<old>s/benifit/benefit
<mfiano>don't forget the tests :)
<old>Sure!
<old>rule #1 of software dev
<mfiano>:)
<mfiano>I'd be interested when it is ready with docs for my small brain to comprehend :)
<old>Sure. I'll make an announcement on guile-user
<mfiano>Hmm, I didn't know about that one
<mfiano>I am only subscribed to bug-guile.gnu.org
<old> https://savannah.gnu.org/mail/?group=guile
<mfiano>Alright I'm all set there now :)
<cow_2001>somewhere on lecture 5A of 6.001's playlist
<mfiano>The more I read about Guile and read its code, the more I like it. Thanks everyone that helped make it what 3.0.9 is today :)
<mfiano>Just finished reading R7RS after another full read of the Guile manual (haven't read it in a year or two), and finally ready to start porting many years of CL code over.
<mfiano>Hope I can be another source of cool software written in GUile that people can use :)
<mfiano>Anyway, good night. Off to bed after a nice day learning a lot :)
<mfiano>Side note: old: looks like wingo posted a blog article today related to our previous program memory discussion.
<mfiano>o/
<old>live coincidence are sometime weird
<old>s/live/life
<stis>God dag, guilers!
<ArneBab>stis: Moin stis :-)
<ArneBab>mfiano: sounds great!
<mfiano>:)
<old>Question for the GOOPS gurus here.
<old>If I have a class A and B where B inherit from A.
<old>A define a #:getter and a #:init-value for slot S.
<old>B redefine slot S with only a #:init-form
<old>Thus B is only a kind of specializaton of A.
<old>Question 1. Is A.S and B.S the same in term of the memory layout allocated for the instances?
<old>Question 2. I can not use the #:getter of A on a B instance anymore because of that. I guess I would have to redefine the #:getter in B also. Why is that?
<old>Example: https://paste.sr.ht/~old/f253f2458ece388d31e6b91448d1bf1eaa0293ac
<mfiano>I don't know the answer to your questions, but I can share that in CLOS we would not specify B.S in B's definition as to not lead to problems like this one. Unfortunately it looks like GOOPS doesn't have syntax to do what CL users would do instead.
<mfiano>I am curious in the answers though!
<old>I guess I could use a #:init-form (init-memory) in A. Then specialize that method for B instead.
<old>Not sure how I can pass the instance to the init-form though. I don't that that's doable
<old>s/don't that's/don't think that's
<mfiano>> old: s/live/life -- well it was actually "live" too, since it was published about the same time :D
<old>true hehe
<old>Oh well I think what I want to do is doable by redefining the initialize method for <bar>
<mfiano>In CL we have :default-initargs
<old>No need to redefine the slot in it. Just need to specialize the initialization method
<mfiano>I am not sure ifg Guile has something analogous
<old>Not quite.
<mfiano>This would solve your problem
<mfiano>That is, in CL, we have 2 forms in a class definition. The first form, is a list of slot specifications. The second form is a list of class options.
<old>Someone could rewrite/extend to customize the protocol of GOOPS in theory
<old>to get what CL offers
<mfiano>In CL the second form of B would be something like: (#:init-keywords #:slot-keyword-from-A some-new-value)
<old>I see
<mfiano>That way you inherit the slot but only change it's initializer
<mfiano>its*
<mfiano>I am sure there is a more goopy way to do it though
<mfiano>Luckily I am a CLOS wizard and I am about to start a large GOOPS-based project, so I am sure I will discover some tricks soon.
<old>what project will that be?
<old>hmm I can also use a #:init-value and #:init-keyword
<old>Then I could just pass #:memory to make
<mfiano>Well, I don't like to talk about it until I know if it will at least work and not be an incomplete/failed idea.
<mfiano>Most of my projects never see the light of day
<mfiano>But it will be graphics-related
<mfiano>Nice!
<mwette>ACTION added docstrings to (struct) pack, unpack: https://paste.debian.net/1268777/
<old>okay! Keep us up to date!
<daviid>old: '... B redefine slot S with only a #:init-form ...' in gops, there is no such thing as slot specialization, ther was but it has been removed (destroyed imo) in favor of 'constant slot access time ... so, in your class B, S is a new slot, it has nothing to do with the one you defined in A, even though B inherits A ...
<daviid>so, to your 2 quiz, because, there are totally diff slots ...
<daviid>'... Someone could rewrite/extend to customize the protocol of GOOPS in theory ...' too (far too) low level to user customize, but in theory, you could dig into those changes and build your own goops system - you'd have to clone guile for that, you won't get maintainer's 'authorization'/green light on this, as they deliberately deleted the feature ...
<daviid>old: i suggest you just fully redefine the slot, or as you said, customize the initialize method, but don't loose to much time 'complaining', it surprsingly does not follow the protocol, but relatively easy to overcome ...
<sneek>dsmith: wb
<dsmith>sneek botsnack
<sneek>:)
<daviid>old: for 'advanced' slot 'computation/customization', we use the mop ...
<old>daviid: I see thank you
<daviid>old: welcome - you'll find excellent mop examples in dthompson's projects, starling i.e. - https://git.dthompson.us/starling.git/tree/starling/node.scm#n69
<daviid>*it surprsingly does not follow the protocol, but relatively easy to overcome ... and, to make sure, i said it but i'll say it again, this decision has been made in favor of constant slot access time - goops is (dead) fast wit that respect (as fast as record access time, afaict - no real benchmark)
<festerdam>Hi, all.
<festerdam>I know it's possible to have emojis and different characters in symbol names, but is it possible to have spaces and parentheses in symbol names? I would like to name something "alp(ttis)".
<festerdam>Or even better "alp (ttis)"
<daviid>festerdam: try string->symbol
<festerdam>daviid: Thanks. I guess I'll refrain from calling something #{alp \x28;ttis\x29;}# in my code. Is it common to have such symbols in code?