November 2010
1 post
4 tags
node-canvas open sourced
Today we open sourced our latest LearnBoost project, node-canvas, a canvas implementation for nodejs. The project is certainly a work in progress but we implement a large portion of the api, as well as node-specific additions such as Canvas#toBuffer() and Canvas#createPNGStream().
Introduction Screencast
Github page
Examples
Shown below is the test suite running side by side with the browser...
September 2010
3 posts
2 tags
Jade Templates Introspection
The Jade Template Engine for Node now have the ability to manipulate themselves based on the parse tree constructed from a nested block. This has extreme potential, in that developers can now alter jade templates dynamically, constructing their own syntactic sugar.
One of my favorite (but not only) use-cases for this functionality, would be that of a database record edit form. Typically your...
3 tags
C Indentation Based Language Lexer Tutorial
C Indentation Based Language Lexer Tutorial
In this tutorial I wanted to show you how you can start your own programming language, starting by creating what is commonly referred to as a lexer or scanner. The grammar for our “language” will be indentation based much like Python, however will implement a tiny subset of tokens for illustration purposes. If you prefer, you may also jump...
2 tags
C Insertion Sort
So I wanted to investigate different sorting algorithms for a few personal projects, and I thought while I was doing so that I would write little tutorials for each algo :) why not! First we have one of the most basic sorting algorithms, the Insertion Sort.
Explanation
As illustrated by this video, the insertion sort works much like you might sort a deck of cards laying infront of you on a...
2 tags
"Mastering Node" - Open Source NodeJS eBook →
August 2010
4 posts
3 tags
Jade Screencast - Template Engine For NodeJS
Introduction
This screencast covers an introduction to the Jade Template Engine for Node. Jade is an indentation based template engine inspired by Haml, with added support for the popular Express web development framework.
Iteration, Conditionals, and Debugging
Learn how to iterate objects and arrays, template conditionals, the debug option and how Jade’s error reporting works in this...
3 tags
nDistro Screencast - NodeJS Deployments In Seconds
I decided to take some time and go screencast-happy today, the first screencast is an introduction to my nDistro nodejs distribution toolkit. nDistro allows you to create node deployments in a matter of seconds.
Ps. Dont mind my annoying bird! here is the screencast
2 tags
Getting Started With Express
In this short tutorial for Node Knockout we will be creating a small application using the popular Express framework.
Express is a light-weight Sinatra-inspired web development framework. Express provides several great features such as an intuitive view system, robust routing, an executable for generating applications and much more.
Installation
To get started with Express we first have to...
July 2010
4 posts
2 tags
nDistro - Node distribution toolkit
nDistro is a small bash project that allows you to define, and install node distributions within seconds. This means no GIT dependency, no compiling node from source with Make, no need to install node then install npm (node’s package manager).
nDistro distributions are easy to create, share, and install. Before we get into the details lets install nDistro:
$ cd /usr/local/bin &&...
2 tags
Express 1.0beta
Yesterday I released Express 1.0.0beta, a Sinatra inspired Node web development framework.
The beta is a near re-write consisting of roughly 300 commits, introducing new features,
removing legacy code, and improving documentation. Express now runs on the Connect middleware framework, which replaces the
previous concept of a Plugin. The performance of express has also been optimized and can
now...
5 tags
Node JavaScript Test Coverage
Today I released Expresso 0.4.0, a TDD framework for node which uses my node-jscoverage project to instrument your library, providing optional test coverage reporting when the —cov flag is used.
Expresso
If you dont know anything about expresso, it executes tests in parallel, so even ~1000 assertions against live http servers can execute in less than a second. By doing so we unfortunately...
3 tags
Jade - Haml killer for nodejs
Last night I open sourced my latest project Jade, a template engine for node, focusing on readability, error handling and performance. Jade spawned from several needs, first I was tired of debugging poor JavaScript template implementations, or finding work-arounds for common issues, secondly I love haml’s syntax, however I feel it could be revamped to provide a more enjoyable experience, and...
June 2010
3 posts
3 tags
Connect vs JSGI
Last week Kris Zyp posted JSGI vs Connect, claiming that Connect is slower than JSGI.
Another claim is that JSGI is far more intuitive, which I consider false. First of all the library does not follow common nodejs idioms, and the configuration also causes the “boomerang effect”, although in the end only the community will decide what they want.
Krisbenchmarks generally consisted...
3 tags
Connect - Middleware For NodeJS
Yesterday myself and Tim Caswell open-sourced
the first Ext JS nodejs project, Connect.
Connect is an abstraction layer, providing node developers with an effective, high performance solution
for rapid development using interchangable components called “middleware”.
Middleware
Middleware provides node developers with simple “plug and play” modules,
which may be stacked...
2 tags
Expresso - TDD Framework For NodeJS
A few days ago I rolled out a new TDD framework for Node. Although node has many BDD and TDD frameworks to offer, I wanted a simple, fast, and thin layer built upon node’s core assert module. Among other features I wanted an executable that I could re-use for my future node projects, this project is named expresso.
Performance
Although expresso stands short in the reporting department,...
May 2010
1 post
V8 Development Introduction →
April 2010
8 posts
8 tags
Express vs Sinatra Benchmarks
So I have been setting up benchmark scripts for Express today, and so far some of the results have been quite interesting! The numbers shown should be taken lightly, however they consistently show that Express is quite fast.
If you are interested in benchmarking your own web applications you might want to read my last article ApacheBench Gnuplot Graphing Benchmarks.
All of the following...
4 tags
ApacheBench GnuPlot Graphing Benchmarks
In this post I am going to be showing you how you can get set up creating http benchmark graphs using Gnuplot and ApacheBench. The ApacheBench or ab executable is packaged with Apache’s httpd, however it can be installed stand-alone as well from Google Code.
The Application
First things first, below we have an insanely simple NodeJS application, that will respond with the string Hello...
2 tags
NodeJS Package Manager
If you use node you may have heard of the Kiwi Package Manager, if not its simply a package management system for node modules. Although development of kiwi is still early, its already 100% usable and available to the community.
Installing Packages (seeds)
Kiwi’s packages aka seeds, are simply tarballs abstracted using the extension “.seed”. Installing the latest version of a...
3 tags
V8 Cookbook →