Politics, Programming and Possibilities
25 Nov
This open letter is the product of a long and thoughtful process that I’ve been paying attention to, associated with a mailing list led by Jon Pincus.
23 Nov
I’m playing with Node.js right now for one of my side projects and found that it was a little more difficult to read a file than I had anticipated. First, I looked for an “obvious” function that would read in an entire file, but there didn’t seem to be anything like Ruby’s IO.read (I was wrong, however, see the posix.cat solution below).
var prepareTemplate = function(file, callback) {posix.open(file, posix.O_RDONLY).addCallback(function(fd) {if (fd) {posix.read(fd, 100000, 0).addCallback(function(data, bytes_read) {var template = jsont.fromString(data);callback(template);});posix.close(fd);} else {sys.puts(”Unable to read file: ” + file);}});};
/Users/duanejohnson/Projects/hello.js:15posix.open(file, process.O_RDONLY);^TypeError: Bad argument
var prepareTemplate = function(file, callback) {posix.open(file, posix.O_RDONLY).addCallback(function(fd) {if (fd) {posix.open(file, process.O_RDONLY, 438).addCallback(function(fd) {
var data = posix.cat(file).wait();
22 Nov
Kelty and I just went for a walk in Millenium Park and happened across an End the Fed rally. It was neat to see support for Ron Paul’s “Audit the Federal Reserve” bill there.
Sent from my iPhone19 Nov
The House Financial Services Committee has approved Rep. Ron Paul’s measure to drastically expand the government’s power to audit the Federal Reserve.