IRC channel logs
2017-08-20.log
back to list of logs
<wingo>rekado_: i thought i traced there and then after another 10 hours of tracing i was more confused! will work on it tho. <amz3`>ACTION trying to add auto indentation to my editor <amz3`>seems like the first step is to convert scheme to an ast <amz3`>does something like that exist in guile? <amz3`>I was under the impression that scheme syntax was its *own* ast <amz3`>so not sure how this will help <amz3`>manumanumanu: what's your next project? <djcb>trying to use meson for my guile/c project (with installing go files, snarfing etc.) <djcb>did anyone already do something similar? <djcb>meson the hipster build system <amz3`>first time I read about meson myself <djcb>see the fine guile reference manual for snarfing <djcb>basically, making c function visible to guile <manumanumanu>amz3`: I have some small kinks to iron out of the loops (adding your own sequences, etc), other than that I am thinking of writing a library to conveniently translate "cat hello | wc -l ..." into scheme. <manumanumanu>and talking about that: how would one close wc -l and still get the output from it? <amz3`>manumanumanu: ha, I have patch for that <manumanumanu>in chez you get a couple of ports, and it is just a matter of closing the correct one. <amz3`>yes, guile has that, but the procedure is not public yet <amz3`>manumanumanu: so you know 'chez', what lead you to move to guile? <amz3`>manumanumanu: the example use html2text, which requires you to close the input port before being able to retrieve the result in the output port, markdown command works similarly <amz3`>manumanumanu: that said, "cat hello | wc -l ..." is different in that there is pipe <amz3`>stis: what's the advantage of using cps instead of prompts? <amz3`>In the context about your parser combinator library <stis>no buildup of stack, perfect to combine with fibers if you like, you can maintain the "stack" separate from the guile stack, which I like as a concept and I can add features that else needs perhaps hacks inside guile . <stis>The combinators is ontop of a logic solver like prolog or kanren, and the feature of having cps is nice some times <stis>for core functionality, they are interchangeable <stis>Ig I had a solver with prompts in stead, I would have used that actually. <stis>I actually took guile-log logic engine and ported it to pure guile scheme with no c-code addition and ontop of that made a separate self containe parser combinartor engine that has all the features of the one in guile-log <amz3`>so stis parser is using kanren to implement parser combinators? is that correct? <stis>no but a similar macrology, easy to make a kanren out of it <dmiles>oh i remember a feature i wanted to think would be usefull in guilelog (i couldnt remember it a couple years ago i think) would be the abily to construct a loop and have the interaton of that loop leached by prolog.. example (create-intervar ?MyVar (map (lambda () '(1 2 3 4 5 6))) <dmiles>so the ?MyVar gets initially 1 and leave a coice point.. on REDO its gets 2 <dmiles>i guess somewhere in the loop there would be a (bind ?MyVar ...) that makes the loop pause right there and return control <dmiles>or even a (yeild ...) that binds the var to the ... <dmiles>so like (create-intervar ?MyVar (foreach ((number '(1 2 3 4 5)) (letter '(a b c d e))) (yield (list number letter)))) <dmiles>and then the inversion of this to.. (do ()()((prolog-has-redo)) (display ?MyVar )) <dmiles>Oh i guess it needs to make thje clas happen to <ennoausberlin>Hello guix, does someone know a few real world examples for the PEG parser implementation of guile. I read the manual, but didnt fully understand <amz3`>and I don't know example code using peg parser <amz3`>ennoausberlin: what are you trying to parse? <ennoausberlin>amz3`: logfiles. Just to understand how peg works. Some lines contain info some other error messages. <ennoausberlin>For now I modified the passwd example, but logfiles structure does not fit <amz3`>why nobody tried to push parser combinators? <amz3`>afaict ennoausberlin is on a hell of ride with peg parser <amz3`>ennoausberlin: afaik it's easier to work with paser combinators that PEG <ijp>many implementations of parser combinators in non-lazy languages are annoying and leak that non-laziness <ijp>I wrote an iteratee based version ages back, but then iteratees became unfashionable <amz3`>what do you mean by "leak that non-laziness" ? <amz3`>what language is lazy outside haskell?