A MacBook user reviewing Microsoft’s Surface Book laptop.
Month: January 2018
Redux in a single line of RxJS.
Redux in a single line of RxJS.
action$.scan(reducer, initstate).subscribe(renderer)
The scan() operator in RxJS is just like reduce() operator in most fuctional libraries except for one thing, it emits partial reductions continuously as a stream which you can subscribe to. This is applied to a stream of actions (actions$) and the reducer is a pure function which is applied to each action in turn with the signature.
(state, action) => newstate
The state is the “accumulator” of the reduction and scan() emits a stream of states as its output. The render object is an Observer which is like a listener with callbacks for next(value), error(err) and complete().
What would a programmer want to learn mathematics for?
What would a programmer want to learn mathematics for?
Steve Yegge from before Google decided to hogtie him and put him in a gimp suit. He’s recently resurfaced and is blogging again but here’s one from the olden days.
Web Workers have been a standardised part of the browser since IE10.
Web Workers have been a standardised part of the browser since IE10. It’s triangle shame that so few people program with them.
Workerize (by Jason Miller of Preact fame) enables you to easily fire off any function as an asynchronous worker thread.
The First Law of Stupidynamics

The First Law of Stupidynamics
Stupidity is neither created nor destroyed.
No ad should be allowed to execute code.
No ad should be allowed to execute code.
Debugging

Via Jay Gischer
Via Jay Gischer
Circa 1970
Another attempt to explain Haskell to the wilfully ignorant.
Another attempt to explain Haskell to the wilfully ignorant.
This post is an experiment I decided to attempt after conversations with Ben Lesh and some other folks. I will assume as little knowledge of Haskell as I possibly can here. Later we’ll talk about some tools we have in Haskell to make the pattern more conceptually compact.
Via Emlyn O’Regan
Via Emlyn O’Regan
Originally shared by Mark Lewis
I read quite a few articles on driverless cars. This is the first one in a while that I have felt really has creative elements to it. They might be pushing the idea a bit too far, but it is a very interesting idea and goes beyond some of my previous thinking in different areas. What I liked most though was how the author points out that the auto industry could produce enough autonomous cars to replace all human-driven cars in a rather short period of time. That’s significant. The timeline for scaling up autonomous ride sharing is one of the things I’ve worried about the most, but apparently, if current production switched over to fully autonomous, it would produce a complete global supply of such cars in a rather short period of time because so many fewer cars are needed if the cars aren’t left sitting in parking lots all the time.