Live data from Hacker News

Rich Hickey – Inside Transducers [video]

youtube.com

1–10 of 50 posts

Re: Rich Hickey – Inside Transducers [video]

#2
Again a more technical talk. I really liked it. Specially the end bit about pipelines, that seams like it would be really usful.

Transducers overall are quite intressting, I am exited to see what other transducer context people come up with.

Re: Rich Hickey – Inside Transducers [video]

#4
post #3

For those not familiar with Clojure, here's a great demonstration of the concept done up in JavaScript: http://jlongster.com/Transducers.js--A-JavaScript-Library-fo...

From that link:

"The reduce function is the base transformation; any other transformation can be expressed in terms of it (map, filter, etc)."

This seems so obvious in retrospect -- I can't believe I had never made that connection before.

Re: Rich Hickey – Inside Transducers [video]

#5
post #4
post #3

For those not familiar with Clojure, here's a great demonstration of the concept done up in JavaScript: http://jlongster.com/Transducers.js--A-JavaScript-Library-fo...

From that link: "The reduce function is the base transformation; any other transformation can be expressed in terms of it (map, filter, etc)." This seems so obvious in retrospect -- I can't believe I had never made that connection before.

I had a similar epiphany while learning about regular expressions in Perl. That connection with text processing is what helped me understand list comprehensions. They seem strikingly similar.

For JS, I personally prefer lo-dash for this kind of work, or dropping in polyfills from MDN.

For some context, here are .map functions applied to normal arrays http://jsperf.com/native-vs-array-js-vs-underscore/54

I've been looking for similar libraries that work on typed-arrays because they are so much more efficient when working with web-workers or with raw canvas data. My attempts at hacking it in feel like they are just bad ideas: http://jsperf.com/float32array-map/2

Re: Rich Hickey – Inside Transducers [video]

#7
post #4
post #3

For those not familiar with Clojure, here's a great demonstration of the concept done up in JavaScript: http://jlongster.com/Transducers.js--A-JavaScript-Library-fo...

From that link: "The reduce function is the base transformation; any other transformation can be expressed in terms of it (map, filter, etc)." This seems so obvious in retrospect -- I can't believe I had never made that connection before.

For me the "ephiphany" was when I realized reduce don't need to be (T,T)->T, but can be (T1, T2) -> T1.

Re: Rich Hickey – Inside Transducers [video]

#8
post #3

For those not familiar with Clojure, here's a great demonstration of the concept done up in JavaScript: http://jlongster.com/Transducers.js--A-JavaScript-Library-fo...

There is also Transducers Explained [1] if you are familiar with JavaScript.

(Shameless plug in the hope it may be helpful to someone)

[1]: http://simplectic.com/blog/2014/transducers-explained-1/

Re: Rich Hickey – Inside Transducers [video]

#9
post #5
post #4

Earlier quoted context omitted.

From that link: "The reduce function is the base transformation; any other transformation can be expressed in terms of it (map, filter, etc)." This seems so obvious in retrospect -- I can't believe I had never made that connection before.

I had a similar epiphany while learning about regular expressions in Perl. That connection with text processing is what helped me understand list comprehensions. They seem strikingly similar. For JS, I personally prefer lo-dash for this kind of work, or dropping in polyfills from MDN. For some context, here are .map functions applied to normal arrays http://jsperf.com/native-vs-array-js-vs-underscore/54 I've been loo…

Most people use underscore/lodash for this stuff. The difference is that the js transducers libraries don't create intermediate arrays, only do enough work to produce the requested output, and work on top of anything that can be coerced into the iteration protocol. I've seen demos of using Facebook's Immutable JS, CSP.js [1], and I don't see why you couldn't put them on top of Typed Arrays or a FRP library like Kefir.

[1] http://jlongster.com/s/nationjs-slides/

Re: Rich Hickey – Inside Transducers [video]

#10
post #9
post #5

Earlier quoted context omitted.

I had a similar epiphany while learning about regular expressions in Perl. That connection with text processing is what helped me understand list comprehensions. They seem strikingly similar. For JS, I personally prefer lo-dash for this kind of work, or dropping in polyfills from MDN. For some context, here are .map functions applied to normal arrays http://jsperf.com/native-vs-array-js-vs-underscore/54 I've been loo…

Most people use underscore/lodash for this stuff. The difference is that the js transducers libraries don't create intermediate arrays, only do enough work to produce the requested output, and work on top of anything that can be coerced into the iteration protocol. I've seen demos of using Facebook's Immutable JS, CSP.js [1], and I don't see why you couldn't put them on top of Typed Arrays or a FRP library like Kefir…

Yeah, the overhead of creating intermediate typed arrays is exactly what I'm trying to avoid with this.
Post reply on HN