• About
  • Projects
  • Sources
  • Tools

Oliver Steele

Languages of the real and artificial

Home ::

What I didn’t get to

By oliver - Posted on January 1st, 2008
Tagged:  
  • JavaScript
  • Libraries
  • Open Source
  • OpenLaszlo
  • Projects

Here are some of the weekend projects that I didn’t finish this year. These aren’t good enough to put on my project list or my sources page. Some of these aren’t even working, and some of them I might not finish at all (most of my weekends are spoken for). And some of them I can’t bear to look at (I’m not proud of the code, and don’t want to be judged by it…), but I’m making myself put them out there anyway. I feel bad for the neglected little things, trapped on my hard drive, and I’d like to let them see the sun, even if just briefly before they flicker out and die.  read more »

  • oliver's blog
  • 4 comments

Sequentially: Temporal and Frequency Adverbs for JavaScript

By oliver - Posted on November 24th, 2007
Tagged:  
  • JavaScript
  • Libraries
  • Projects

Sequentially is a JavaScript library for asychronous programming. It makes it easy to define functions that are called later, or periodically, or that can be called only a certain number of times, or only at a certain frequency.  read more »

// Call a function f five times in a row
f.only(5).repeatedly()
// Call f five times, at one second intervals
f.only(5).periodically()
// Make a new function g that calls through to f at most five times,
// no matter how often g is called
var g = f.only(5)
// Make a new function g that calls f at most once per minute,
  • oliver's blog
  • Add new comment

Functional Javascript 1.0.2

By oliver - Posted on November 11th, 2007
Tagged:  
  • JavaScript
  • Libraries
  • Projects

Thanks to everyone who has commented or contributed, praised or pitched in —- I’ve released an update to Functional Javascript, with these changes:

New features

- Rhino compatibility. I think —- at least it loads now, and a couple of hand tests work; i have yet to port the testing tool. (Credit: Reginald Braithwaite)

Optimizations

- More efficient Array.slice. (Credit: Dean Edwards) – Memoize Function.lambda. (Credit: henrah)  read more »

  • oliver's blog
  • 3 comments

Functional JavaScript

By oliver - Posted on July 22nd, 2007
Tagged:  
  • JavaScript
  • Libraries
  • Projects

Functional is a JavaScript library for functional programming. It defines the standard higher-order functions (map, reduce, filter) that you can read about elsewhere on the web. It also defines functions for partial function application and function-level programming: curry, partial, compose, guard, and until. Finally, it introduces “string lambdas”, which let you write 'x -> x+1', 'x+1', or even '+1' as synonyms for function(x) {return x+1}.  read more »

  • oliver's blog
  • 19 comments

Wide URLs with WideURL.com

By oliver - Posted on April 1st, 2006
Tagged:  
  • Amusements
  • Projects

For years now, I’ve been a great fan of TinyURL.com. That web site allows you to create a short representation of a longer URL, for use in email.

One of the problems with those URLs, though, and with URLs in general, is that they’re misleadingly short. A particular web page may have a lot of significance, but if it doesn’t take up much of your message, there’s just no way for the recipient to see this at a glance.

WideURL.com fixes this. It creates an URL with more visual impact.

For example, here’s the WideURL for this post: http://wideurl.com/aitch-tee-tee-pea-colon-double-slash-oh-ess-tee-double-ee-ell-ee-dot-see-oh-em-slash-aye-are-see-aitch-eye-vee-ee-ess-slash-two-double-zero-six-slash-zero-four-slash-doubleyou-eye-dee-ee-you-are-ell.  read more »

  • oliver's blog
  • 7 comments

A Functional Diversion

By oliver - Posted on March 24th, 2006
Tagged:  
  • Amusements
  • Projects

Even my friends who aren’t into functional programming find something curously relaxing about this. (And the companion site here.)

I bought foldr.com a year ago when I thought I might do something like Flickr for other types of information. I didn’t realize until last week what I was sitting on. :-)

Update: The use of the infinity symbol sparked a lively discussion on LtU.

  • oliver's blog
  • 1 comment

JavaScript Gradient Roundrects

By oliver - Posted on March 23rd, 2006
Tagged:  
  • JavaScript
  • Libraries
  • Projects

JavaScript Gradient Roundrects adds gradient roundrects to an HTML page, without images. It uses the WHATWG canvas tag if it’s available. Otherwise it uses a stack of divs, whose heights are adaptively chosen according to the height of the graded element, the color components, and the radius curvature. There’s a demo here.

I also wrote a JavaScript CSS parser that lets you attach gradients to an element without writing code. You do this by including CSS inside a div tag whose class is ‘style’.  read more »

  • oliver's blog
  • 5 comments

Inline JavaScript Console

By oliver - Posted on March 4th, 2006
Tagged:  
  • JavaScript
  • Libraries
  • Projects

Last week for the first time I did some serious browser JavaScript programming. I put the following tools to good use, but ran against limits with each of them:

  • fvLogger
is terrific, but doesn’t include an evaluator. You have to reload your page each time you want to query a new value.
  • Rhino is great for pure logic, but you can’t use it with anything that use a browser API. In fact, you can’t use it with anything that uses anything that uses a browser API. This means, for example, that you can’t use it with a library that uses Prototype, without writing some mock objects first.
 read more »

  • oliver's blog
  • 11 comments

Readable JavaScript Values

By oliver - Posted on March 4th, 2006
Tagged:  
  • JavaScript
  • Libraries
  • Projects

One problem with JavaScript development is that the string representation of a value doesn’t tell you much about the value. For example, [null], [undefined], and '' all display as the empty string. [1,2}, [[1,2]], and [[1],[2]] all display as 1,2 (and so does "1,2"). And ({a: 1}), ({b: 2}), and new MySwankyNewObject() all display as [object Object].

If you use an IDE for development, this may not be a problem. Probably the IDE has its own string representation; even if it doesn’t, you can generally drill into objects by clicking on them. This doesn’t help those us of who prefer REPL development or printf-style debugging. When you display a debugging value (to the browser status line, to the alert() dialog, or to the Rhino console), you’d like some indication of what it actually is. And JavaScript doesn’t generally tell you, at least when the value is more complex than a string, number, or boolean.  read more »

  • oliver's blog
  • 7 comments

Canvas with Text

By oliver - Posted on February 28th, 2006
Tagged:  
  • JavaScript
  • Libraries
  • OpenLaszlo
  • Projects

The two times that I’ve used the WHATWG canvas element recently, I’ve wanted a canvas with string rendering. The most recent time that I’ve used the OpenLaszlo drawview class (which has substantially the same API), I’ve wanted string rendering too.

The graph in reAnimator is a drawview, but with text labels for the edges. And the graph and parse tree in the Graph and Parse tabs of reMatch both use WHATWG canvas for lines, but text for labels. (These tabs are only visible in Firefox, for now.)

TextCanvas.js implements the canvas context extended with labels, for DHTML. And “textdrawview.lzx” implements drawview extended with labels. They share the same API, so that I can write graphics libraries (such as graph drawing) that work with both DHTML and OpenLaszlo. That API is described here.  read more »

  • oliver's blog
  • 1 comment
123next ›last »

Recent

  • Smiley Socket
  • Commit Policies
  • My Git Workflow
  • Pneumococoa
  • My No TV
  • The Biofuel Economy
  • Ambimation
  • jQuery Profile Plugin
  • The Shadow of a Legacy
  • Minimizing Code Paths in Asychronous Code
more

Categories

  • Amusements (10)
  • Essays (20)
  • Family (8)
  • General (9)
  • Health (1)
  • Illustrations (10)
  • Inventions (2)
  • JavaScript (24)
  • Libraries (21)
  • Math Education (9)
  • OpenLaszlo (31)
  • Programming (7)
  • Programming Languages (6)
  • Projects (23)
  • Python (3)
  • Ruby (7)
  • Software (3)
  • Open Source (4)
  • XML (6)
  • Software Development (8)
  • Systems Thinking (6)
  • Technology (7)
  • Tips (5)
  • Visualizations (13)
  • Words (8)

Navigation

  • Recent posts
  • Tools

Syndicate

Syndicate content

About

Oliver Steele lives in Western Massachusetts and commutes to downtown LA, where he is bringing an operating system from handwaving to reality. He was the architect of OpenLaszlo, the author of PyWordNet and other open source projects. His interests include programming languages, knowledge representation, information visualization, and math education. [more]

Tools

  • reAnimator
  • reWork

Amusements

  • Aargh
  • foldr
  • WideURL.com

Popular

  • Functional JavaScript
  • JavaScript Memoization
  • Overloading Semicolon
  • reAnimator
  • The IDE Divide
  • Visualizing Basic Algebra
Copyright 1995-2008 by Oliver Steele. All rights reserved.