<sneek>tohoyn, daviid says: these are Gtk-Warnings, i'd be happy to try to help, but as usual, i need a code snipset to reproduce ... you may also ask on #gtk using irc.gnome.org ***KM4MBG is now known as jackhill
<tohoyn>daviid: what criteria should be fulfilled to make an alpha release of G-Golf in debian? <daviid>tohoyn: in debian i don't know, but upstream, the 'Using G-Golf' must be complete, and more examples, iamworking on both ... <avp>Hello Guilers! Is there a way to serialize a lambda to a file? <avp>I need to generate a code with a reference to a user procedure. If the procedure is defined in some module, I can simply print its name and resolve it from the module when the code is read from a file. But if the procedure is anonymous, then I need a way to store it as well, ideally as the same lambda as it was in the source code. <leoprikler>avp not always, but `procedure-source' might give you what you're looking for <avp>leoprikler: Thanks, I checked this procedure before asking my question, but the source is not always available; in my tests it returned #f for all cases. <tohoyn>avp: would it be easier to use the Tree-IL source of the procedure? <avp>It's possible to set procedure source by means "(set-procedure-property! a-procedure 'source '(lambda ...))" <avp>I looked into the souce code of "libguile/procprop.c" and basically 'procedure-source' tries to get a procedure property named 'source'. <avp>tohoyn: Interesting idea. So I compiled a lambda to Tree-IL, how do I call that? <tohoyn>avp: should it be compiled to guile bytecode and load it with load-compiled? <tohoyn>daviid: about the gtk warnings, it's not a g-golf bug. evince gives similar warnings for me. <tohoyn>avp: are you using the user procedures from guile or C? <avp>sneek: later tell tohoyn I'm using user procedures from Guile (Scheme). <avp>That's a good point. But I think the procedure can get its bindings from the same modules as when it was evaluated first time, because the same set of modules will be present. <RhodiumToad>lambda captures local lexical bindings, which you're not going to be able to get from any module <avp>But if we can somehow translate a lambda into its source form and then store it as a piece of data (a list), we can read and evaluate it again. <avp>And then new lambda capture whatever it has around at the time of the evaluation. <avp>Maybe I should require that a procedure always must be written in a module so I can avoid this problem altogether. <RhodiumToad>it looks like event-source is something that is only relevant at run time <avp>RhodiumToad: The thing is that I have a state machine that produced another state machine. <avp>There's a parser for PlantUML format that reads a state machine description and turns it into a working state machine in memory; and then you can take that new state machine and compile it to a Scheme code so you don't have to parse PlantUML again to get this state machine. <RhodiumToad>ok, but what about that requires serializing the event-source? <avp>RhodiumToad: Hmm, it seems that the problem arises ony when a user writes a FSM by hand as the event source can be specified as a procedure from a module or a lambda. If I require that when a FSM is generated the event source must always be a procedure from a module, the problem dissapears. <avp>I think I figured out how to solve that problem, more or less. Thanks everybody for help. <roptat>leoprikler, what's a pseudo-stream? <leoprikler>anything that behaves like an SRFI forgot the number stream <roptat>one of the issues I have is that I need to sort the list and then process it <roptat>the processing now takes more time than reading the file, although it still takes 2 minutes to read a 52MB file <roptat>well, maybe I can't go below that too much, there are 100 000 entries, so that's roughly 1ms per entry <avp>Guilers, is there an "official" implementaton of "set" data structure for Guile? (And same question for "stack".) <RhodiumToad>srfi-1 has list-based sets, or you can use a hashtable <RhodiumToad>(list-based sets don't perform very well for obvious reasons) <avp>RhodiumToad: Thanks. <avp>Having a good abstraction would be nice though. <RhodiumToad>i.e. push by consing on the front of a list, pop by taking the cdr <avp>I used GOOPS to implement a mutable stack and a set. <avp>Not very pleasant from the functional perspective indeed. But works. ;-) <leoprikler>you could do it like the cool kids and use trees <avp>leoprikler: Thanks, I'll try to boost my functional coolness later, when I solve more important issues in my project. ;-) <vijaymarupudi>daviid: a question about g-golf, I was curious why g-golf's startup time is significantly longer than pygobject-introspection, do they do something at compile time that g-golf does in runtime? <chrislck>ooh craftinginterpreters.com mentions Guile...