Just thought I should let you know, if you see ‘j2d2’ follow you, that’s me. It’s my nonrobotic, alter-ego on tumblr. wanna take a look?
Differences between Node.js and Erlang →
I was inspired by a tweet from Chris Dixon to find some data comparing Erlang and Node.js. I find the data interesting, so I’m posting it here too. The basic idea is to compare Node.js’s performance against another asynchronous system, Erlang. Erlang is the reigning concurrent networks and some folks from the Node.js have been making some fishy claims about how “I/O has been...
ZeroMQ: Super Sockets
I spoke about ZeroMQ to NYCPython tonight as part of a PyCon 2011 recap. Thank you to Spotify for hosting the event! Follow up links My simple ZMQ examples 0MQ Guide PDF of slides, in case Flash isn’t working for you.
Parsing is hard; let’s go shopping.– Jorge Ortiz (@jorgeortiz85)
The hardest thing is to go to sleep at night, when there are so many urgent...– Donald Knuth
Simple example of function composition in Haskell
I’m watching A Taste Of Haskell by Simon Peyton Jones. One of the features he talks about, function composition, resonated with me as a useful example of how functional programmers think about problems. Function composition is important to functional programming languages because it lets us put functions together, to get a desired result, and none of the linked functions require storing...
nosql: Josh Berkus: Better than MongoDB is Web scale. Original title and link: Scale Fail (NoSQL databases © myNoSQL) HA
Computer science also differs from physics in that it is not actually a science....– Richard Feynman, Feynman Lectures on Computation, 1970
Brene Brown: The power of vulnerability
Instantiating AWS Micro Instances with Erlang
After writing a lot of Python code recently, I’ve been wanting to work in another language for a few days. It’s a bit like a mental vacation, if you pick the right language to play with. I chose the black sand beaches of Erlang. About The Code The idea is to simply connect to Amazon’s API and request some number of AWS micro instances be instantiated. Most of Amazon’s...
Matt Spitz from Meebo discusses the benefits of using coroutines to build massively concurrent web applications. I really dig coroutines. Brubeck, my web framework, uses at least three coroutines for handling each web request. Microarmy also uses coroutines to parallelize each SSH request. When I use coroutines, I typically also use a scheduler and my coroutines are usually implemented as...
"Errors" On Floating Point Calculations
A bunch of floating point errors
I spent some time hacking on a new testing tool today. The idea is to quickly turn on some number of AWS micro instances and have them slam a webserver simultaneously, using siege. Siege is a pretty flexible load testing tool. You can configure different payloads and frequencies and all kinds of good stuff. So the trick for microarmy is to get Siege on a bunch of computers quickly and coordinate...
SSH with Python's paramiko
The paramiko module is a robust way to support SSH from inside Python. It’s documentation, however, is not straight-forward. After googling around for a little bit I was able to put a few functions for simplifying the experience. Hopefully readers of this blog find it useful. def ssh_connect(host, username, private_key, port=22): """Helper function to initiate an ssh connection to a...
Ranking Methods in Machine Learning →
By Dr. Shivani Agarwala
When people give you advice, they’re really just talking to themselves in the...– Austin Kleon (via marco)
Meandering In Ocaml
Ronald has been talking about Ocaml for a little while now. He’s usually on point when he finds a new language so when he started talking about Ocaml, I put it in my list of things to play with soon. Installing Ocaml If you’re just reading about Ocaml, then skip to the next section. If you want to know how to install Ocaml, keep reading. As you may know from previous posts,...
Runnable Ascii Art
orbitz: I just made a python module caleld queue_monad.py
orbitz: that's going tohave ot change soon
apgwoz: post the source!
orbitz: it's empty righ tnow :)
orbitz: It's pretty lame anyways, it just lets me compose functions wiht shortcircuit
jdroid-: some module
orbitz: so i can do runQueue(compose([f1, f2, f3, f4]))
jdroid-: use greenlets
orbitz: and f2 can stop the hwoel thing if it knows it's got the goods
orbitz: I'll use buttlets
apgwoz: i'd rather use bluelets
jdroid-: let (_|_) = f a b;;
orbitz: _|_ is bottom in haskell
orbitz: I think you mean: let (_|_) = f a p;;
orbitz: in haskell you could do
orbitz: let f a p = ( . )( .)
orbitz: let f a p = ( . )( . ) i like my titites even
orbitz: not sure if that will compile, probably
orbitz: Prelude> let f a p = ( . )( . )
orbitz: Prelude> :t f
orbitz: f :: t -> t1 -> (a1 -> b -> c) -> a1 -> (a -> b) -> a -> c
n8han/All-Aboard - GitHub →
coderspiel: Almost-realtime streaming API for train departure statuses that I presented at last night’s Hack and Tell. Implemented in Scala with Unfiltered and Netty—you know the drill. curl -i http://technically.us:7979/ny This presentation, from last night’s Hack & Tell, rocked. The speakers keep getting better and better! I posted a panoramic to the meetup page too:...
Some Black Magic Python for n00bs
I had lunch with an old friend yesterday and we were discussing Python. He had a background in Perl and PHP so I knew some of the higher-order aspects of Python wouldn’t be clear to him yet. He also had rudimentary knowledge of Python decorators, a tool I use all the time. In an effort to help, I wrote up some code that demonstrates some of these concepts. I think it will be useful to...
Lexical "Closures" Using Lambda in Python
First, I’m simplifying information from this post on Stack Overflow. The Issue Lambda, in Python, is not lexically scoped. This can lead to tricky bugs if you’re not careful. Consider the following code. def foo(): print 'Foo!' Simple enough. A function foo prints the string ‘Foo!’. Let’s play with the scoping of Python and figure out what happens when...
Speed tests for *json and cPickle in Python
I have been mulling over some changes I need to make to DictShield to make the document serialization options friendlier to caching. Initially, I thought I’d pickle the python objects and store that. So I figured I’d build a pickling layer for DictShield that would be cache friendly. >>> import cPickle >>> import datetime >>>...