IRC channel logs

2023-03-06.log

back to list of logs

<zamfofex>Hello, everyone! I’ve been reading the Guile manual to try to learn about Guile a bit more thoroughly. I have two (similar) questions. The first question is: Besides the fact that keywords are self‐evaluating and symbols aren’t, is there any difference between what they are meant to represent? As in, what (if anything) would have prevented whomever designed Scheme from just using symbols everywhere rather than keywords too?
<zamfofex>The second question is: Is there any difference between vhashes and hash tables? It feels like this would be a common question, but the manual doesn’t address it at all! The sections on either describe how they each differ from alists, but not between themselves. The difference from alists state for each seems effectively identical, almost as they were describing the same thing with different words.
<zamfofex>Now that I think about it, I also don’t think I understand how vlists are meant to differ from vectors.
<mwette>hashs are mutable, vhashes are not, and a-lists are not
<mwette>(a-lists in general, but you can force it things with set-car! set-cdr!
<zamfofex>Ah! So I suppose that’s also the difference between vlists and vectors, given that vhashes are based on vlists and I think I remember seeing that vectors are mutable.
<mwette>In scheme, ! in a procedure name is usually an indication of mutation
<zamfofex>I see! I think I was able to infer that.
<mwette>I believe vhash, vlist etc based on http://lampwww.epfl.ch/papers/idealhashtrees.pdf
<dsmith>I've been able to connect to oftc with erc and hexchat, but unable with the guile web interface to irc.
<dsmith>This fails https://kiwiirc.com/nextclient/irc.libera.chat/?nick=guile-guest#guile
<dsmith>When I try to use that for oftc
<dsmith>lloda: How do you build/regenerate the guile-cairo docs?
<dsmith>lloda: Seeing errors like this: https://paste.debian.net/1273072/
<daviid>dsmith: i guess you understandably don't have (gnome gw support gtk-doc)
<daviid>that is a guile-gnome module
<daviid>dsmith: here is the module http://git.savannah.gnu.org/cgit/guile-gnome.git/tree/glib/gnome/gw/support
<daviid>i hve no idea how lloda rebuilds the doc, he would have to have a working guile-gnome installation as well ...
<lechner>Hi, someone who would know once told me that 'load' behaves exactly as if the code were in that place in the source file, but that is not so. Some syntax constructs (or something else) in a new Guix service (cachefilesd) behaves differently. Most notably, the define-configuration mechanism does not allow for fields to be set when 'load is used. Is this known, or perhaps worth documenting?
<daviid>dsmith: sorry, i didn't think it would that 'difficult' to update and rebuild the guile-cairo doc
<daviid>dsmith: i think you might submit a patch with the code and the test, then a seperate patch with the doc but saying you can't check/rebuild as you don't have a working guile-gnome environment ...
<abcdw>mwette: IDK exact number, 15-20 I guess, maybe more.
<dsmith>daviid: I haven't dug into it too deeply yet. Just got back from visiting my son. Been gone all day.
<abcdw>mwette: Following #wayland on OFTC, connected to it for a few months, everything LGTM.
<daviid>dsmith: sure, i wanted to answer 'straight' away that you unlikely will be able to rebuild the doc ... unless you have or are willing to build/install guile-gnome ...
<daviid>dsmith: so, my advise is my last sentence before these last 2: submit teo patches, one with the code and the test, then one with the doc, explaining that you can't check/rebuild ...
<abcdw>mwette: 15 number of function is around 50+ I think.
<abcdw>s/15/15-20 was a number of structs,/
<dsmith>daviid: Ok.
<mwette>abcdw: I could create i/f w/ nyacc . It would help w/ the bytestrurctures if you use that.
<daviid>dsmith: ok great - i wouldn't want you t spend too much time o this, let's see if lloda has an environmnt to check/rebuild the doc ... if not, we'll think about a soluton ...
<mwette>abcdw: here: https://paste.centos.org/view/e7e5ec8f
<old>abcdw: here's my latest work on that: https://paste.sr.ht/~old/d5ddec7463a280faf020fed18d2f5e5c3fd03a63
<old>Got nested-struct, union, enum
<old>There's commented examples at the bottom
<abcdw>mwette: Wow! Thank you.
<abcdw>old: Looks neat, do you plan to make a library out of it?
<abcdw>mwette: It seems the generated definition for TSParser is incorrect, the type of it is fh-void, while I would expect it to be a complicated nested structs.
<abcdw>mwette: It's probably because nyacc looked at api.h, but not parser.c
<cow_2001>is there such a thing as get-line-if-there-is-one-but-if-there-isnt-just-skip-it?
<cow_2001>it's like an event loop here in this pipe and each event is a line
<flatwhatson>cow_2001: i guess you could check whether a port is "readable" (eg. peek-char on a non-blocking port) to decide whether to do a full get-line
<lloda>daviid: yeah i can regen the doc, idr what i had to install as it was a while ago, but i have a machine where make generate-defuns works
<sneek>chrislck: wb!!
<mwette>abcdw: I'm guessing TSParser is an opaque pointer, common usage in C.
<old>abcdw: Soon yes. I'm in my way of making high level C interface and C procedure
<old>Something like: (define-c-procedure (can-be-pass-as-a-C-callback (x <int>) (y <int>)) (+ x y)))
<old>then I think I will do some cleanup/testing then documentation and announcement on ML and Guix packaging
<old>(define-c-procedure (can-be-pass-as-a-C-callback (x <int>) (y <int>) -> <int>) (+ x y)))*
<unmatched-paren>is there some way in guile to call a procedure with an environment?
<unmatched-paren>eg: (call-with-environment (let ((x 11)) (the-environment)) (lambda () x)) -> 11
<mwette>unmatched-paren: not sure: at set-current-nodule
<mwette>^ maybe set-current-module can help
<mwette>or eval : (eval exp env)
<sneek>dsmith: Greetings!
<dsmith>sneek, botsnack
<sneek>:)
<dsmith>Doesn't eval takes an environment?
<dsmith>Ahh, as mwette already said