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...
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...
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...
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...
"Mastering Node" - Open Source NodeJS eBook →
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...
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
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...
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 &&...
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...
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...
Jade - Haml killer for nodejs
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...
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...
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,...
V8 Development Introduction →
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...
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...
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...
V8 Cookbook →