These are chat archives for ramda/ramda

18th
Oct 2015
Raine Virta
@raine
Oct 18 2015 05:20
@Avaq I use transduce-stream in ramda-cli and it's worked so far
Niloy Mondal
@niloy
Oct 18 2015 06:30
What is a transducer, I searched google but it gave me stuff related to electronics
Niloy Mondal
@niloy
Oct 18 2015 06:36
Thanks
Aldwin Vlasblom
@Avaq
Oct 18 2015 07:35
@raine When I tried to use it on an object steam, it raised: TypeError: Invalid non-string/buffer chunk
Also there's transduce/transduce-stream#2
Raine Virta
@raine
Oct 18 2015 07:36
yes, you need to initialize the stream as an object stream
Aldwin Vlasblom
@Avaq
Oct 18 2015 07:36
But that might be false.
Aldwin Vlasblom
@Avaq
Oct 18 2015 07:38
Oh. I wasn't aware it even took other options. Thanks! :D
Raine Virta
@raine
Oct 18 2015 07:39
it's quite normal in stream APIs
Aldwin Vlasblom
@Avaq
Oct 18 2015 07:39
Haven't used 'em much.
David Chambers
@davidchambers
Oct 18 2015 07:41
@raine, I don't have an explanation for TypeError: function () {} does not have a method named "toString". I'd need to dig into the changes between 0.15 and 0.16.
Raine Virta
@raine
Oct 18 2015 07:41
thanks, so probably not an intended change
David Chambers
@davidchambers
Oct 18 2015 07:41
Unintentional, I believe.
Aldwin Vlasblom
@Avaq
Oct 18 2015 07:51
@raine Thank you very much sir! The transducer solution is so much cleaner than the through2 solution. :)
Raine Virta
@raine
Oct 18 2015 09:57
what are good resources if one wants to learn about parsing? i want to parse code block locations in markdown files and get back line numbers so that i can edit them. is using something like jison the right approach?
Martin Algesten
@algesten
Oct 18 2015 10:36
at work we currently favor pratt parsing, this article is what got us going. http://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-expression-parsing-made-easy/
it deals with operator precedence in a very elegant way.
Stefano Vozza
@svozza
Oct 18 2015 18:42

there's a transduce function in highland:
http://highlandjs.org/#transduce

i'm almost sure bacon.js and kefir.js have one too