richardoneill.com.au » Homepage

Latest Articles

Photo of the week: Grassy Field

1 November 2007 Photography

Grassy Field

2 comments

My LOLCode Interpreter

31 October 2007 Programming, PHP

LOLCode Book

I had 2 hours to kill so I thought I'd write a LOLCode interpreter.

I know there's already a few LOLCode interpreters around, but I couldn't help myself. Plus I've always been interested in interpreter design.

It's still a work in progress at this stage, so a lot of the language hasn't been fully implemented.

Here are two working programs...

Hello World


BTW the classic hello world program
HAI
VISIBLE "Hello world!"
KTHXBAI

Output:

LOLCode Hello World

Accepting User Input


HAI
VISIBLE "Hello there, what is your name?!"
I HAS A NAME ""

BTW ask for the users name
GIMMEH NAME

BTW welcome the user
VISIBLE "Welcome to LOLCode " N NAME N "!"
KTHXBAI

Output:

LOLCode Accepting User Input

0 comments

Ron Paul Filter for Reddit

30 October 2007

If you're addicted to reddit.com like me, you'll understand my frustration with all those Ron Paul links. Especially if you don't live in the US, and don't really know who the guy is.

If anyone is interested, I've written a small Greasemonkey script which hides all reddit links that include the text "Ron Paul".

To install, download the Greasemonkey file and drag it onto your firefox window.

ronpaul.user.js

1 comments

Photo of the week: Powerlines

16 October 2007 Photography

Taken at 6AM on Kambah Pool road.

Powerlines

0 comments

Photo of the week: Two Kangaroos

9 October 2007 Photography

Two Kangaroos

0 comments

Photo of the week: Highway Underpass

2 October 2007

Highway Underpass

2 comments

Photo of the week: Algae

25 September 2007 Photography

Algae

1 comments

Photo of the week: Cotter River 2

17 September 2007 Photography

Cotter River

0 comments

PHP Command Line Tip

11 September 2007 PHP, Programming

Here's a quick tip for working with the command line in PHP.

If you've ever run a PHP script via the command line, you would have noticed that output from the script is not printed until the script has finished.

If you need your output displayed in real time, you can open a stream to the command line...

$stdout = fopen('php://stdout', 'w');

Simply write any output to the stream and it will be printed on the command line in real time...

fwrite($stdout, "Hello CLIn");

0 comments

Photo of the week: Railway Tracks

10 September 2007 Photography

Railway Tracks

1 comments

Canberra Web Design