Havoc's Blog

this blog contains blog posts

Month: November, 2010

A Sequential, Actor-like API for Server-side JavaScript

Idea: how a JavaScript request handler could look When I saw node.js, we’d been writing a huge pile of JavaScript code for litl based on gjs (gjs is a custom-built JavaScript runtime, created for native desktop/mobile/consumer-gadget apps rather than server-side code). At litl, we use a syntax for asynchronicity invented by C. Scott Ananian – […]

Playing a sound file

Is there really no Linux API to just play a file? Something like: id = cache_file(“foo.ogg”); // cache the sample play(id); // play to default device libcanberra seems to only support playing stuff from a sound theme, not a file. PulseAudio seems to require setting up a main loop thing, creating a context, converting the […]

Take risks in life, for savings choose a balanced fund

Many of us read one or two investment books, and take away that younger people should take more risk. If you buy a “target date retirement” fund in your 20s, you might end up invested 85% or more in stocks. If you’re in the tech industry, young, fired up about entrepreneurship, immune to risk — you […]