Latest updates

JSLint CommonJS front-end

I've made a simple command line front-end for JSLint which is compatible with CommonJS implementations such as Narwhal. The front-end supports all JSLint configuration options through switches as well as configuration through a JSON file. Additionally, the front-end can be used in stream processing, for example, to pipe in a file.

XSLTJSON Lite

Posted on Saturday 8 May 2010

Today in the category “software I finished over a year ago and forgot about completely” ― XSLTJSON Lite ― a XSLT 1.0 stylesheet to transform arbitrary XML to the JSONML format. It isn't as full featured as its bigger brother XSLTJSON, but might come in handy for developers who do not have access to an XSLT 2.0 processor.

jQuery 1.4.2 support

Posted on Saturday 20 March 2010

Just a quick note: all my projects relying or extending jQuery now support jQuery 1.4.2. Almost none of the projects required any changes, except for the jQuery Text Overflow plugin, which is now at version 0.14 and works with both jQuery 1.3.2 and 1.4.2.

TeX line breaking algorithm in HTML5 Canvas

Posted on Saturday November 7 2009

I spent some time over the last few weeks implementing the Knuth and Plass line breaking algorithm (as used in TeX and LaTeX) using JavaScript and the HTML5 canvas element. The code is still quite rough, but early results are quite promising and in my opinion better than what browsers commonly implement. The example page contains an example paragraph, some rough documentation and a rather random collection of ideas and notes.

Grid layout update & jQuery UI integration demo

Posted on Saturday November 7 2009

The jLayout grid layout received a small bug fix and a new feature; you can now specify how you want the grid to be filled in, from left to right and top to bottom, or top to bottom and left to right. There is also a new demo showing how easily jQuery UI components can be integrated with jLayout.

jQuery text overflow plugin: inline markup support

Posted on Saturday September 12 2009

The jQuery Text Overflow plugin now supports truncating text nodes with inline markup. This means you can now call the plugin on any DOM element, and not have to worry about it removing your inline markup or creating invalid markup.

Plotting with JavaScript, Canvas & Interval Arithmetic

Posted on Wednesday September 2 2009

I decided to have some fun with the new features in Firefox 3.5 and reimplemented the function plotting from my (still unreleased) chart library using the HTML5 Canvas element and Web Workers. Charts are plotted using interval arithmetic. The basic idea behind this is to recursively subdivide the range in which to plot a function. It keeps subdividing the range until the subdivisions are smaller than one screen pixel. At that point it will plot a pixel on that location. This pixel is then guaranteed to contain the correct solution. This also means that plots are always correct, in that they have no missing singularities or artifacts that are difficult to plot using other methods (well, that's the theory anyway―the interval arithmetic implementation I wrote does not guarantee correctness.) Web workers are used to run some of the recursive subdivisions in separate "threads" for better performance.

Equations are parsed using a Shunting Yard parser and converted internally to interval arithmetic. Most common mathematical operators are supported, such as: sin, cos, sqrt, abs, fmod, exp, log, et cetera. The code is still very much alpha quality, but I thought it might be interesting to put it online. You can find it right here: http://www.bramstein.com/projects/interplot/plot.html.

JavaScript Preprocessor

Posted on Monday August 10 2009

I spent the weekend working on a new project: a simple JavaScript preprocessor to enable conditional compilation in JavaScript code using the syntax of the C preprocessor (well, a subset of.) This will hopefully make it easy to generate multiple versions of your project to―for example―create a debug build, or a specialized version designed to work in restrictive environments. It can be called from JavaScript, an Ant build script, or the command line.

New jLayout algorithm, examples & plugin update

Posted on Thursday July 30 2009

As promised a new layout algorithm: flow layout. The flow layout algoritm lays out components in rows with components overflowing to new rows if there is not enough horizontal space. The jQuery jLayout plugin has also been updated with a minor bug fix for nested border layouts. There are also three new examples, a nested resizable border layout, a resizable layout with guides, and an example of a smoothly resizing layout.

Book Review: JQuery UI 1.6: The User Interface Library for jQuery

Posted on Wednesday July 29 2009

I recently started using the jQuery UI library in a work project so I was rather interested when I noticed a book had been published on this library by Dan Wellman. You can read my review of “jQuery UI 1.6: The User Interface Library for jQuery” in the articles book review section.

Archived news