Quantcast
Channel: hyperstruct » JavaScript
Browsing index pages (10 articles)

seethrough, a simple XML/XHTML templating system for… JavaScript, this

Still following the philosophy of “what the hell are you still doing on my disk”, I released seethrough for JavaScript, a port of the XML/XHTML template engine I wrote for Erlang some time ago. It’s...

View Article


Image may be NSFW.
Clik here to view.

Synchronous invocation in JavaScript, part 4: error handling

Last time we saw how to transfer results of computations from pseudo-blocking calls back into the main process. What happens if when something goes wrong, though? In the (real) synchronous world, error...

View Article


Synchronous invocation in JavaScript, part 3: returning values

We’ve seen how to simulate a blocking sleep() in JavaScript and what happens under the hood when we do. Another scenario where a blocking call makes a big difference in terms of clarity is requesting...

View Article

Synchronous invocation in JavaScript, part 2: execution dissected

Let’s review the process definition and process constructor from part 1: 1 function proc(processDef) { 2 var process = processDef(); 3 4 function driver() { 5 var pseudoBlockingCall = process.next(); 6...

View Article

Synchronous invocation in JavaScript, part 1: problem and basic solution

(Update: a library based on this series is in use in SamePlace and is available here.) Here’s something most languages can do which JavaScript can’t (at least when hosted in the browser): print("Going...

View Article


Put the Fox in the Box

More goodies for MozRepl-equipped Firefoxes: T. V. Raman points me to a simple shell script to start and drive the browser on headless machines and to a module to drive Firefox from Emacspeak. Quote of...

View Article

SamePlace spinoffs #1: CSS Query

Before: var xulScriptlet; var blueprint = document.getElementById('blueprints').firstChild; while(blueprint) { if(blueprint.getAttribute('class') == 'scriptlet') break; blueprint =...

View Article

Image may be NSFW.
Clik here to view.

XTech

I am amiss in not mentioning XTech sooner. In a few days, I’ll be there to speak about XMPP, enabling real-time and user-to-user communication in the browser, and how that changes the rules. Last year...

View Article


Memoize in JavaScript

In JavaScript, functions are objects. No big deal, until you expand that to functions can have state, and realize that things like this become possible: function fact(n) { var memo =...

View Article


You know you’ve been courting functional programming too long…

…when even your JavaScript code starts looking like this: function applyTextProcessors(xmlFragment, textProcessors) { return textProcessors.length == 0 ? xmlFragment : applyTextProcessors(...

View Article
Browsing index pages (10 articles)


Latest Images