With apologies to the ever-entertaining Onion, I’m announcing the 0.2.0 release of Heist, henceforth to be known as “the one with the lists”. To recap, Heist is a Scheme interpreter I’m writing in Ruby in order to teach myself a few things about how languages work while I read Structure and Interpretation of Computer Programs [...]
There seems to be a tradition of some two years’ standing that dictates I must release some piece of open source software on or around my birthday. A couple of years ago it was Flagger, a Rails plugin for doing useful things with boolean ‘flag’ columns in your database, and last year it was (with [...]
In my last post I wrote about how to write your own mini-language in Ruby by abusing method_missing and operator overloading. I know, I know, it totally blew your mind and whatever, but I missed out this huge part of the language I was demonstrating: the rules. And without the rules, all it’s good for [...]
Well, it’s been a couple of months. Rest assured I’ve still been hacking away; JS.Class will be getting hashes and constants at some point in the future, I’ve got a bunch of improvements to make on Bluff, and I’ve been contributing to PDoc which is a really promising JavaScript doc engine from Tobie Langel that [...]
I’ve been putting together a presentation to be given internally at work on what Ojay is and why we’re doing it. It occurred to me that I’ve not spoken very much about it here, hoping the documentation and examples would speak for themselves. So, today I’m going to go through how to take an animation [...]
In response to Dustin Diaz (you’ll need a JavaScript 1.8 capable browser, or Ojay): var arr = ['a', 'b', 'c', 'c', 'd','e', 'e', 'e', 'e', 'e', 'f', 'e', 'f', 'e', 'f', 'a', 'a', 'a', 'f', 'f', 'f']; arr.reduce(function(memo, letter) { var last = memo[memo.length - 1]; if (!last || last[0] != letter) memo.push([letter]); else last.push(letter); [...]
It’s been about four months since our last release (and I really did want this to happen about a month ago, but I’ve only so much time), and now we have a new version of Ojay for you to download and play around with. It’s a drop-in replacement for 0.1.x so you really have no [...]
Last week, I had the enviable task of creating a skinnable version of the YouTube player using JavaScript; something that would drop some HTML into the page that could be styled using CSS. Naturally, I wanted to package it up as a reusable class so you could, if required, create several videos on a single [...]
I’ve been writing some code examples for some of the UI components I’m writing for Ojay, and I need to display the implementation code and stylesheet on the page. Pretty standard fare: here’s a UI example, and here’s the code you need to implement it. Easy. Trouble is, I don’t want to duplicate the code [...]
Seems my functional posts have been generating an obscene amount of traffic lately (thank you, Reg). In which spirit, here’s a little suggestion for anyone designing a JavaScript library. I was reading about Oliver Steele’s MIT-licensed Functional library earlier, and came across this little gem (modified slightly to my whims): /** * Returns a function [...]
© The If Works. Powered by WordPress using the DePo Skinny Theme.