IRC channel logs


back to list of logs

<tohoyn>daviid: I sent you a demo application for a typing error in G-Golf/GTK.
<tohoyn>daviid: the application consists of several modules so it was better to send it by e-mail
<tohoyn>daviid: if there are problems in the demo just contact me
<tohoyn>daviid: the error occurs in line 62 in file panes.scm
<dhruvin>guile beginner question: How do I create a json-mapping for an existing srfi-9 record? AFAIK, both define-json-mapping and define-json-type create new record types.
<dhruvin>For example: I have a module person with <person> record, and I want to have json->person and person->json generated from it in a different module, using aforementioned module.
<unmatched-paren>hello! before i waste a lot of my time, it's possible to use guile as an extension language for an application programmed purely in guile, right? the other way is to program it in c and link in libguile, of course, but i don't really want to go near c unless i absolutely have to
<ArneBab>dhruvin: does it work to import the other module? (I did not try that yes, sorry)
<lilyp>unmatched-paren: obviously, just arrange for your code to call some hook or callback and you're good to go
<unmatched-paren>lilyp: yeah, i would have been quite surprised if it wasn't possible, just wanted to make sure; thanks :)
<lilyp>dhruvin: why do you need an existing SRFI-9 record? Is that perhaps hidden in a module outside of your control?
<lilyp>In any case, you could use record introspection to get a list of fields, read the JSON into an alist, map each field to a value and finally call the record constructor with an ordered value "set"
<daviid>sneek: later tell tohoyn ok, i'll look at it and get back... tx for the exanple to reproduce ...
<sneek>Will do.
<jpoiret>is it possible to raise an exception from within a exception-handler in the original dynamic environment, like with-throw-handler?