IRC channel logs

2021-07-27.log

back to list of logs

<calher>Any good version control repositories of Haunt sites that I can browse?
<civodul>calher: here's one: https://git.savannah.gnu.org/cgit/guile/guile-web.git/tree/
<calher>Does Haunt impact or dictate my URI structure?
<Izem>how do I enter guile debugger from within guile?
<Izem>also, what are the debug levels?
<apteryx_>daviid: eh -- I ended up working around it. I'm parsing dbus-send output with a PEG parser and when an item's value was empty it was inserting value instead of (value "some-string"), causing the structure to be non-uniform. I could fix it at the parser level by preserving double quotes, so the value is never 'empty'.
***chris2 is now known as Guest5418
***Guest5418 is now known as chrislck
<lloda>what is a good way to provide options for a module
<lloda>say you have a module that provides a reader extension and you want to be able to configure a couple things about how it works
<wingo>lloda: a first-class module facility would be nice, wouldn't it :)
<tohoyn>lloda: a config file containing an association list of options?
<wingo>lloda: i would use parameters tho. have the module export the parameters
***chris2 is now known as Guest5805
<lloda>thx wingo tohoyn
<lloda>i've used parameters before for the same thing, seems be the option with least friction
<lloda>i'll do that then
<lloda>i've never used a language that has 1st class modules but it sounds awesome
<dsmith-work>UGT Greetings, Guilers
<taw10>I'm trying to create an SRFI-9 record from C by using scm_call with scm_c_public_ref to get the record constructor out of the module which contains my define-record-type. However, I get "Wrong type to apply: #<syntax-transformer make-my-record>". Is there something fundamental I'm missing?
<taw10>According to the manual, define-record-type binds make-my-record to a function for constructing a record. If make-my-record is syntax rather than procedure, then my approach won't work?
<tohoyn>taw10: it looks like make-my-record is a macro
<tohoyn>taw10: are you trying to call it with scm_call?
<dsmith-work>So the Good Question here is: Is it possible to evaluate a macro from C, and how to do it?
<taw10>tohoyn: Yes, exactly
<taw10>I can get round it by creating a real procedure which uses the macro
<taw10>My reason for wanting to do it is a bit weird. I'm trying to make Guile bindings for a C object which is essentially an opaque hash table of "things", where each "thing" is itself an opaque record. The records can't be exposed to Guile directly because they have "foreign" memory semantics. I was trying to solve the problem by turning the whole thing into a real Guile hash table of SRFI-9 records
<taw10>I think I might have just figured out a better solution to the whole thing, though
<Sheilong>Is it possible to append two bytevectors or do I need to create a new one with appropriated size and copy the contents of both bytevectors?
<leoprikler>Sheilong: the latter, probably
<leoprikler>taw10: GOOPS offers some facilities to deal with foreign records and you can probably (ab)use (wrapped) pointers to an extent as well
<leoprikler>I'm not sure how closely you want to access the hash's data, but chances are it's probably easier with Scheme-side FFI.
<stis>tja guilers!
<civodul>hey!
<civodul>any persistent set implementation people would recommend?
<civodul>guile-pfds has one, but i wonder if there's something simpler around
<civodul>(there are also intsets in Guile but i need arbitrary objects)
<pizzapal>how does one go about adding a read option for guile? i am trying to make logic variables where ?x has a symbol-property called #:logic-var, but i would like for it to be that any symbol starting with '?' is given that property.
<dsmith-work>sneek: botsnack
<sneek>:)
<taw10>leoprikler: I think you're right. Thanks!
<civodul>pizzapal: i cannot think of an easy way to do that; that said, i'd refrain from giving variables special semantics based on their name
<civodul>it can be quite surprising
<dsmith-work>!uptime
<sneek>I've been running for 5 days
<sneek>This system has been up 6 days, 6 hours, 9 minutes
<pizzapal>oh yeah, i agree, but in this case they definitely have their own special semantics, like they're bound with unification instead of assignment and stuff