Note: This is an exploratory post, where I will write about some ideas that are still fresh in my mind and need consolidation. Any mistake, lack of objectivity/rigor, that you find, please let me know. I also tried to balance between being practical and respecting the nomenclature. I started this post with Haskell and Swift in mind, but decided to remove references to the former wherever I saw fit. Finally, the code presented has been built against Xcode 6.1.1.
via Boost the Performance of an AngularJS Application Using Immutable Data – Minko Gechev’s blog.
I have affinity to functional programming since my first year in college. During my initial contact with a purely functional programming language (Haskell in my case) I didn’t really understand all the advantages it provides, everything was reduced to just writing a cool recursive functions and solving algorithmic problems.
Last couple of years I had the hard task to write a complex UI. A lot of user inputs, which can change the model from different places and potentially lead to inconsistent state of the application, a lot of bugs, which are hard to debug and find. Later ReactJS was released and I noticed the concept of the “pure functions” in their UI components. A react component gets rendered the same way when it receives the same input parameters and it has the same state (if you implement it properly). React even provides the PureRenderMixin, which can make the “pure component” rendering even faster!
React is awesome, there are no two opinions. I’m also huge AngularJS fan. A few years ago I wrote the firstAngularJS Style Guide, “AngularJS in Patterns”, AngularAOP and a few other AngularJS modules/components/examples, which got popular. So I started wondering whether I can use the same idea of immutability of the model in AngularJS, at least for accelerating the data-binding watchers.
via thoughtbot/Argo · GitHub.
The Greek word for swift and the ship used by Jason, son of Aeson, of the Argonauts. Aeson is the JSON parsing library in Haskell that inspired Argo, much like Aeson inspired his son Jason.
NOTE: The master branch of Argo is pushing ahead with Swift 1.2 support. Support for Swift 1.1 can be found on branch swift-1.1 and in the 0.3.x versions of tags/releases.
via joewalnes/websocketd · GitHub.
websocketd is a small command-line tool that will wrap an existing command-line interface program, and allow it to be accessed via a WebSocket.
WebSocket-capable applications can now be built very easily. As long as you can write an executable program that reads STDIN and writes to STDOUT, you can build a WebSocket server. Do it in Python, Ruby, Perl, Bash, .NET, C, Go, PHP, Java, Clojure, Scala, Groovy, Expect, Awk, VBScript, Haskell, Lua, R, whatever! No networking libraries necessary.