Pretty cool. Nice example of using both generators and async/await in your async examples. I think generators are underappreciated in general.
I did a similar experiment that used what MDN calls “Advanced Generators” to push values to the next generator in a chain instead of pulling through as iterators. Just a slightly different take that you might find interesting.
Nice one! Good work.
However I’ve tested my implementation against somehing like transducers.js because I knew that yield is still a slow operation. And unfortunately them are slow. Much better with Chrome (40% faster than Firefox) but too slow. For now ;)
This week, I need to start preparing some material for a JS user’s group meeting (on transducers, of course, since that’s all I ever do for side projects any more). Also, I’ve discovered that lenses are probably very interesting to me, if I can ever wrap my head around them.
Last week I released transduce-gen that allows defining transducers using ES6 generators. Also transduce-sequence creates lazy iterables from transducers (similar to Clojure sequence, but returning ES6 iterables).
This week I’d like to get back to writing a few blog posts. I need to finish up “Transducers Explained” and also one or two articles using transducers in practical application.
Continuing to study Haskell as well….
I made it through “Learn You a Haskell” book and started on “Real World”. Also started on the CIS 194 course recommended by @bitemyapp . Almost surprisingly (to me), I’m discovering I am quite fond of Haskell. It’s a gold mine of great ideas (no surprise to many of you). I have tried to pick some of it up in the past, but it’s resonating much more with me this time around. Quite excited about it actually.
As far as other work, I spent some time cleaning up underscore-transducer, extracting transduce-unique, improving transduce-array and releasing redispatch. I also replaced the underscore dependency in underscore-transducer and used lodash-node to bundle (or not bundle) just the functions I use in the browser builds. underscore-transducer is mostly a “wrapper” around the transduce libraries now which allows anyone just to grab what they need instead of pulling everything in at once.
I created a demo of underarm, my asynchronous transducers library based on transduce-async and underscore-transducer. Right now it’s a very minimal extension of underscore-transducer, but I plan to fill it out a bit more.
Along the way, I also created any-promise and modified fs-promise, transduce-then and transduce-async to support any ES6 Promise library. Finally I created iterdone to create ES6 iterables/iterators inspired by Python itertools (more to come).
This week, I’d like to look at functions to combine multiple transducers similar to existing Rx* libraries, and add more support for other functions in the old release of underarm. And continue down the path of learning more Haskell. I’m a few chapters into “Learn You..” book and “Real World” is on the way.
I was intrigued enough after watching Duality and the End of Reactive (video) by Erik Meijer that I stole some of the concepts to create an asynchronous transducers library, transduce-async.
This week I plan on using it as a basis, along with underscore-transducer, to dust off and rewrite underarm, a toy library I wrote a couple years ago to try to understand Reactive Cocoa, Rx*. I also would like to look more into FRP concepts (arrowized, sampling rates, etc).
I’ve decided it’s past due to learn me some Haskell, so I ordered “Real World Haskell” to get started. If anybody has any other suggestions to get started, please let me know!
@bitemyapp has some great stuff up on github
Personally, I learned from Learn you a haskell for great good, but I’ve heard mixed reviews, so YMMV.
I now support both transducers-js and transducers.js in underscore-transducer. I also improved documentation and reorganized a little to allow optional loading of transduce library extensions. Also posted Transducers Explained: Pipelines.
This week I’d like to finish “Transducers Explained” with a final post, and also walk through some examples of using transducers with Node.js streams.
The second part was posted last night: Transducers Explained: Pipelines
Putting aside transducers, here’s some stuff that might interest:
Still, I would not say that it is totally unhelpful or that it isn’t correct. So I disagree with the downvotes. Also see:
http://www.reddit.com/r/haskell/comments/2cv6l4/clojures_transducers_are_perverse_lenses/ for more information. I begin to think that each time one posts something that does not appeal to the deepest fans of a language that is /not/ their favorite language, there is a downvote. And in the meanwhile, there is an upvote from those who do appreciate it. We are not being objective here, are we. Anyway, moving on.
For what it’s worth, I did find this interesting. I upvoted the list of links from the Haskell wiki so I can dig into the meaning behind the post.
The succinctness of the explanation is certainly helpful for people already familiar with Haskell and the concept of Control.Lens.Fold. That should not discredit, of course, any effort to explain perhaps difficult concepts to a wider audience. This is just a general observation, I know that was not your intent.
I did not downvote your post. I also did not upvote it. If you had posted a comment on another thread discussing transducers and mentioned the similarity to Control.Lens.Fold in Haskell and provided a link, I would have certainly upvoted it. You are right, it is helpful to realize there is a relationship to existing concepts when you are trying to understand something.
Thank you for bringing this to my attention.
Last week, I based underscore-transducer on transducers.js, then again on transducers-js. As part of that exercise, I discovered that both libraries are working towards a common protocol, so I created transduce to work with either. It’s still very early, and I’ve only tested against transducers-js, but it shouldn’t be a problem to support both. Finally, I wrote Transducers Explained: Part 1.
This week, probably more of the same. I can’t seem to get enough of these things.
I’m continuing my explorations of underscore-transducer. It started as an exercise in comprehension, but I’m having a lot of fun with it and like how things are coming together. This week, I plan on documenting and adding support for examples for transducing over streams. I also need to investigate the alternatives (transducers.js and transducers-js) and see if it makes sense to integrate with, or add dependency on one or the other.
I’ve been writing a Flask Tutorial building on the Backbone.js TodoMVC example: Flask TodoMVC. Trying to release a new article every week. This week I plan on integrating Flask Security for authentication.
The hstore and JSON unification is exciting (the post notes that it has not been committed yet). If I understand it correctly, hstore is adding nested arrays and types in addition to string key vals and the JSON storage is being modified to make use of it. This slide deck [pdf] from PGCon last May provides a good overview if you missed it.
If you check out some of the other stuff on her blog, it’s really fascinating. Something I wish I had more free time to learn about. I have no idea where to start.
I agree. Fascinating stuff.
You might be interested in introductions to digital signal processing.
The Scientist and Engineer’s Guide to Digital Signal Processing is available free (or on Amazon). It’s a good introduction with concepts explained through Fortran examples. For something more recent, I’ve heard good things about Understanding Digital Signal Processing.
Hmm, I think you mean BASIC rather than Fortran.
Indeed. My apologies. It’s been a while since I opened the book.
Don’t let the choice of language be a turnoff to anyone though. The author intentionally picked “a simplified version of BASIC” because he found it the most straightforward to “concentrate on the algorithms and techniques, without being distracted by the quirks of a particular language”. I remember finding it very effective and helped drive home the concepts without getting lost in the mathematics.