Quite some time ago (May 2011), I first heard about batman.js. It's homepage was still a bit empty, but gave a pretty good example of we're the framework was headed.
It's written in CoffeeScript and so far it's been pretty amazing. It's concise and once you understand how it works, pretty simple to use.
This is also where some of the pain is: the documenation leaves a lot to desire, but the development team's helpfulness more than compensates for it.
I'm planning to put some useful snippets on this site as I go about discovering and continue working with batman.js.
I'll start off with a small snippet for a Regular Expression Validator I wrote:
Use with:
Read More →
After reading an article on Fast, easy, realtime metrics using Redis bitmaps and seeing they used a Java implementation of BitSet, I really wanted a native JavaScript implementation.
Looking at what they did for Java it wasn't too difficult to implement this for JavaScript. The result is up on GitHub.
Read More →
Aristo or on github Aristo is a beautiful theme
for web applications.
I had seen a Compass plugin for it, but I wanted a "native" node.js port.
Stylus seemed like the right tool for the job, so I just did it.
The result is called stylus-aristo and available on github.
Read More →
Today, after a long wait is part 4 of the node.js and ZeroMQ series. This part is about XRequest and XReply sockets also called XREQ and XREP sockets.
There isn't a lot of documentation about this. As I understand it, these socket types allow you to asynchronously implement the request response pattern. Pretty much like REQ/REP actually, but I've found XREQ/XREP to be more stable.
Read More →
Though Wordpress is a good product, I decided to move away from it for this site. I'm still using it on other sites of mine though.
This site is now generated from a series of Markdown files, currently using a product called Jekyll. Currently it provides pretty much the same functionality website wise, ofcourse I now lost the administration interface.
The site is content wise complete, though the theme could use a little more.
Read More →
For quite a while now I use VirtualBox as the virtualization software of my choice. I've used others, but the fact that it's free is a big benefit. It's also possible to use VirtualBox from the commandline.
Assume that I have a VM called 'ubuntu-server', which uses 'ubuntu' as hostname. To start the VM I do the following:
alias vbm=VBoxManage
vbm startvm --type headless ubuntu-server
ssh ubuntu
To shut the VM down you can do the following:
Read More →
Since I wanted to run a nodejs site on a small Ubuntu machine, without any compile tools installed, I had two options: pre compile it and try to transfer it binary, or see if someone already did this. Browsing for a solution for the latter I came across this launchpad page.
All in all it's as simple as:
Read More →
Today, in part 3 of the series on node.js and zeromq: Request & Reply. This pattern is meant for clients asking multiple requests to (multiple) servers. Contrary to TCP/IP, in zeromq it doesn't matter whether the server or the client does the bind. In the below case, the servers do the connect and the client does the bind. The most stable part of your architecture needs to do the bind.
requestreplyserver.js:
Read More →
While I'm at it, evaluating zeromq that is, I might as well publish examples for all usage patterns, so today follows Publish/Subscribe. The pattern is used to distribute data from one publisher to many subscribers. Both sockets are again uni-directional.
publishsubscribeserver.js:
Read More →
While trying to evaluate zeromq and it's use with node.js, I quickly put together the following small experiment, which shows two unidirectional sockets. One is a "server" and can only push (send) messages, the other is a "client", which can only pull (receive) messages:
pipeline_server.js:
Read More →