IRC channel logs

2023-01-23.log

back to list of logs

<daviid>sneek: later tell akirakyle back to your earlier quiz, in nowhere in the gsk_container_node_new documentation can you read that its children arg can be NULL, where did you get it may accept NULL?
<sneek>Will do.
<daviid>sneek: later tell akirakyle (gdk-content-formats-new '() 0) => $7 = #<pointer 0x5607749bf860> - works fine, so i am not sure why you mentionned it ... but why you would want to do that is a mistery, as this gives you an immutable struct, see in the manual '... GdkContentFormats is an immutable struct. After creation, you cannot change the types it represents. Instead, new GdkContentFormats have to be created.'
<sneek>Got it.
<akirakyle>.
<sneek>akirakyle, you have 2 messages!
<sneek>akirakyle, daviid says: back to your earlier quiz, in nowhere in the gsk_container_node_new documentation can you read that its children arg can be NULL, where did you get it may accept NULL?
<sneek>akirakyle, daviid says: (gdk-content-formats-new '() 0) => $7 = #<pointer 0x5607749bf860> - works fine, so i am not sure why you mentionned it ... but why you would want to do that is a mistery, as this gives you an immutable struct, see in the manual '... GdkContentFormats is an immutable struct. After creation, you cannot change the types it represents. Instead, new GdkContentFormats have to be created.'
<akirakyle>thanks sneek :)
<akirakyle>daviid: I got the idea that gsk_container_node_new should accept a zero length array from reading the implementation here https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gsk/gskrendernodeimpl.c#L2742
<akirakyle>daviid: But now I see that the difference between gdk_content_formats_new and gsk_container_node_new is in the gobject introspection metadata, where gdk_content_formats_new has a (nullable) annotation, which I guess is what leads the docs to explicitly say the arg can be NULL
<akirakyle>daviid: Sorry for causing noise with this non-issue
<akirakyle>daviid: Did you get my message from earlier today though? I'm curious whether you see the same crash I do with the example I sent only when disabling guile's auto compile
<daviid>akirakyle: np - yes i did see, it could very well be a guile interpreter/compiler issue, but before we spend time, again, why would you even want to do this? then, we can debug, try to, can you 1st reduce this to a much smaller snipset? the imprtant part of the error is 'Zero values returned to single-valued continuation', which means that some proc/method does not return a value, when the interpreter expect one and the compiler doesn't
<daviid>seem to ...
<akirakyle>daviid: That explanation of what that error message means is very helpful. I can try to make it more minimal. Are you asking what my overall goal is or asking again why I'm interested in defining my own pango renderer?
<daviid>akirakyle: why would you want to set GUILE_AUTO_COMPILE=0? the only situation you would do that is for s script that 'd be installed in $prefix/bin, the purpose would be to actually use-modules (compiled/iń©nstalled), parse the command-lind args if any, then call 'animate' ...
<akirakyle>daviid: In fact that explanation of what error message means was so helpful I was able to figure out my bug almost immediately. Now I'm not sure if this is something that is "my fault" or guile's but I had been under the impression that forms like (let ((_ (something))) ...) were fine in guile when you only care about the side effect (something),
<akirakyle>but it seems guile complains. This also explains why it only happens when compilation is disabled, since I imagine such forms are "optimized away" by compilation.
<akirakyle>daviid: I was disabling guile's auto compile because on some more complicated code, I was seeing potentially non-deterministic behavior, and disabling auto compilation was an attempt to try to see if I could gain any better info on were I was going wrong.
<daviid>akirakyle: ah ok, you shouldn't write code that calls upstream and can potentially be eluded by the compiler, rather, use a nested let, or a (let ((dummy (begin (draw-layout renderer layout 0 0) 'ok)) ...) body) ... also, avoid _ as a name
<akirakyle>daviid: It seems the issue is the opposite in this case: when compiled the code is fine, but guile complains about trying to bind #<unspecified> to _.  My guess is the compiler sees that _ does not appear in the let body and thus doesn't attempt to bind #<unspecified> to a symbol. I also now realize where my mistaken belief that this form was
<akirakyle>fine: syntax case usually uses _ to bind to the first symbol (which you almost never care about since you know what it is anyways). Also maybe this just reveals my habits having been taught using SML :)
<daviid>akirakyle: if the compiler drops the binding, it drops the call in the compiled call, and you endup with a code that misses a maybe indispensable call for it to work reliably ... i would use nested let - https://paste.centos.org/view/8261d59d
<rlb>/msg wingo fwiw - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026200#30 As mentioned, I don't really know what the difficulties are.
<rlb>
<akirakyle>daviid: Yup that's what I'm using now!
<lloda>a problem with srfi-71 is that emacs doesn't indent it properly
<drakonis>fosdem soon
<drakonis>next week will be a good week.
<old>What are the talks related to Guile?
<old>I know that flatwhatson will talk about pre-scheme
<old>Any other interesting stuffs to binge on?
<mfiano>I didn't check the schedule yet. Is wingo not giving one of his famous fosdem talks this year?
<mfiano>There seems to be a r7rs scheme being introduced that is hosted on...JS
<mfiano>I'm not seeing anything particularly interesting besides the only one I knew about, flatwhatson's.
<mfiano>I'm sure I'll binge on most of it though :)
<drakonis>mfiano: there's a wingo talk, yes.
<drakonis>there's a will byrd talk too
<drakonis> https://fosdem.org/2023/schedule/track/declarative_and_minimalistic_computing/
<drakonis> https://fosdem.org/2023/schedule/event/langrunsbackwards/ this is very much just logic programming
<mfiano>Oh yes, I remember seeing that now.
<mfiano>ACTION is not very interested in Guix
<mfiano>Apart from that it's written in mostly Guile
<sneek>dsmith-work: Greetings
<dsmith-work>Hey hey!
<dsmith-work>sneek: botsnack
<sneek>:)
<apteryx>should this be possible? (match some-number (SYMBOL-OF-NUMBER-VARIABLE 'match!))
<apteryx>or does SYMBOL-OF-NUMBER-VARIABLE actually need to be a number literal?
<apteryx>perhaps that's a better scenario for case
<old>apteryx: I don't think so. I've tried before to `match' a variable to AF_UNIX and AF_INET without success
<old>(match (sockaddr:fam) ((or AF_INET AF_INET6) do-inet...) (AF_UNIX do-unix...))
<old>Does not work. Had to do: (let ((fam (sockaddr:fam)) (cond ((or (= AF_INET fam) (= AF_INET6)) do-inet...) ((= AF_UNIX fam) do-unix...))
<old>)
<old>`case' use `eq?'. I think it can work for numbers?
<apteryx>thanks for confirming
<apteryx>I usedcase
<apteryx>and cond somewhere else where I needed a more complex comparison
<sneek>chrislck: Greetings
<lilyp>I'm surprised = worked for you
<old>lilyp: What are you referring to?
<apteryx>how can I query the size of a file?
<apteryx>ah, stat:size
<lloda>old: eq? generally doesn't work with numbers, but case uses eqv? not eq?