IRC channel logs
2025-02-07.log
back to list of logs
<lloda>what is the difference between a #<program ...> and a #<procedure ...> ? <apteryx>wingo: I was looking at your 15 years old commit ad05d4e8c6 which added the HTTP request module. It contains (set-port-encoding! port "ISO-8859-1") in its read-request procedure, which appears to cause problems when the body contains UTF-8 multi-byte characters (they get substituted into '?', as you can see e.g. in the diff at https://issues.guix.gnu.org/63508#4). See some investigation done in <https://issues.guix.gnu.org/69381>. Do <apteryx>you know if this could be changed to use UTF-8 without consequences? <wingo>i don't know, at the time you needed to read the headers as latin-1 <wingo>i think the intention was to reset the encoding once the headers were parsed <wingo>but it was a long time ago :) <wingo>istr that utf-8 in headers might be possible now (i.e. that the standard might have changed) <apteryx>wingo: hi! :-) thanks for your answer. I'll take some time to familiarize myself with the topic more and perhaps come back with some fresh thoughts/ideas. <dthompson>wingo: ^ these were the patches I mentioned awhile back that enable jit on windows, amongst other things. seems like something that should be merged. <mra>i'm working on throwing together some simple guile bindings for a c library, and i'm struggling to find if there is a standard way to represent enums? like, if i have a type `enum Foo` and a function `void baz(Foo foo)`, is there a "canonical" way of providing bindings for Foo? <civodul>mra: hi! you’d just define constants for each value of the enum <mra>by constants you just mean a `(define foo_1 1)` and so on for each of the variants? there's no special notion of "constants" in guile, is there? <daviid>mra: you might look at nyacc and its ffi-helper, which will provide you with C lib binding 'for free', and has a bunch of examples you can look at - https://www.nongnu.org/nyacc/ <mra>daviid: oh, thanks. that looks quite helpful. i've been trying to mess around with writing wayland compositors in guile for a while, so i need a bunch of bindings <mra>that could save me a bunch of time <daviid>mra: the auther of nyacc and ffi-helper also has a wayland compositor project in guile, don't know where the code is though, anyone here knows? <daviid>mwette: i just wrote about nyacc, the ffi-helper ... mra is working on a wayland compistor in guile, i menrionned yu have such a project as well, but forgot where the code is ... <mra>"working on" is generous. i've just been tinkering a bit <daviid>right, and mwette has a tremendous experience 'with all this', so you'd benefit, and might be better to contribute to the efort then start e new separate attempt ... <mra>oh, i agree! i'd love to contribute to an existing project if there is one <mwette>on github.com/mwette/guile-wl-play is "all-guile" wayland client code i played with; IIRC I also played once w/ generating ffi for wlroots but don't remember where that went -- I think I gave up <mra>oh, it's a client, not a compositor? <mwette>right. compositor is much harder <mwette>But there is code to generate the protocol i/f for guile, and needed socket C-api code w/ sendmsg/recvmsg <mwette>Another option is to use wlroots, w/ ffi maybe. <mwette>not sure which includes are needed <mra>i was going to look at using wlroots <mra>mwette: I'll be sure to ping you if I make any meaningful progress!