IRC channel logs


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.
<wingo>on my list.
<rekado_>wingo: thanks! This sounds hairy.
<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`>oh reading about it on wikipedia,
<amz3`>what does snarfing mean?
<amz3`>or mean?
<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
<amz3`>got it
<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?
<manumanumanu>should I manually write an eof to the port?
<amz3`>manumanumanu: ha, I have patch for that
<amz3`>I think
<amz3`>let me look it up
<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?
<manumanumanu>amz3`: chez is not as much fun.
<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: really
<manumanumanu>sweet. thank you
<amz3`>manumanumanu: that said, "cat hello | wc -l ..." is different in that there is pipe
<manumanumanu>I know. I have to find a nice schemey syntax for it
<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`>makes sens
<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
<dmiles>the call*
<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`>it's not guix
<amz3`>it's not #guix
<ennoausberlin>amz3`: You are right. :) I visit both channels. Just a typo
<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>Peg looks like a powerful tools. I
<ennoausberlin>want to master it, like regex
<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
<ennoausberlin>amz3`: found
<ennoausberlin>thanks for the pointer
<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?