Bluish Coder

Programming Languages, Martials Arts and Computers. The Weblog of Chris Double.


2007-05-29

Another Offline Web Application Example

Mark Finkle has put together a simple demonstration application that uses the offline APIs in Firefox, including source.

In other offline application news, John Resig has written about how the offline/online notifications work.

Tags: mozilla 

2007-05-29

Support for HTML Video element in Firefox

The WHATWG HTML 5 working draft has a specification for a 'video' element.

I briefly mentioned in a previous post that I was working on implementing this tag natively in Firefox. The intent is to display Ogg Theora encoded video without needing any plugins, similar to the recent demonstration of Theora playback using a video element by Opera. Opera have a post about it on their labs page.

I've made steady progress and can currently display Ogg Theora encoded videos using the video element. I've done a screencast of a simple page with a Theora video to give an idea of how it works. The video looks choppy in the screencast due to the way the screencasting software captures the screens. It didn't look like that when I played it, honest :-). The screencast is also quite large, at about 7MB. It's a pity we don't already have browsers with <video/> support so I don't have to embed large flash files for screencasts!

The example in the screencast shows a simple video element usage:

<video style="width:320; height: 240;" id="v" src="test.ogg"></video>

The DOM object created by this element has a Javascript API that can control playback. The button on the page uses this to start the video:

<button onclick="document.getElementById('v').play()">Play</button>

I'm not finished with the implementation, and have yet to implement the full WHATWG specification, but it's coming along nicely. I'll post more on my weblog as I get closer to finishing it.

The snippet of video in the screencast is of James Hill playing 'Allegro Con Brio' on the ukulele. You can see this and more in the original WMV format on the video page of his website. James is an amazing ukulele player. His musics CD's are great and he will apparently be in Auckland, New Zealand in November 2007 to attend the Ukulele Festival of 2007.

Tags: mozilla 

2007-05-26

Factor Article Manager Source

At the beginning of the year I wrote an 'Article Manager' web application in Factor. The idea was to have a simple way of writing short articles and snippets of information, that could be tagged and navigated. I wanted something small and easy to use, suited for this purpose. In about 8 hours I threw together the article manager and put a running version at http://articles.bluishcoder.co.nz as a demo.

The article manager system can run multiple sites in a single Factor instance, with each site having its own collection of articles, tags, etc. Multiple users are supported as well as a separation between article authors and site administrators. This is what I originally wrote the basic authentication code for.

The markup language used or writing articles is 'Wiky' and is done using client side Javascript. The articles themselves are stored in a SQLite database.

I originally wrote it because I maintained a site by hand that had indexed articles and it was getting difficult to update the tags and articles by hand. The site gets a reasonable amount of traffic and I moved it over to a Factor Article Manager system earlier this year and it has been running not stop without problem since.

At the time I didn't put the source in the main Factor distribution but a few weeks ago I tidied it up, got it working with the latest Factor release, and put it in 'apps/article-manager'. Factor 0.89 includes it and after loading the module you can browse the help which explains how to configure it.

Tags: factor 

2007-05-26

Ogg Theora support for Factor

A month or two back I did more work on my Ogg bindings for Factor. I didn't blog about it but I added Ogg Theora playback support and moved the Vorbis playback into a generic 'ogg-player' application written in Factor.

This is now in the standard Factor distribution. You can play Theora video files by loading the apps/ogg-player module and running:

"myfile.ogg" play-theora-file
Tags: factor 

2007-05-12

Factor Space Invaders Updated

I've updated my space invaders emulator written in Factor to work with the new Factor GUI system. This means that Space Invaders can run in a seperate window from the main Factor GUI and you can even run multiple instances at a time.

While the emulator is running you can still use the Factor GUI to browse, run code, etc. You could even browse the 8080 CPU emulator data structures and memory while it is running.

A screenshot of two running space invaders instances is here.

As the emulator is a Factor gadget, hopefully it will run unchanged on Mac OS X and Windows. The updated emulator will be available in the upcoming Factor 0.81 or you get can get it from my darcs repository at: http://www.bluishcoder.co.nz/repos/factor

The code is in contrib/space-invaders/cpu-8080.factor and contrib/space-invaders/space-invaders.factor. Don't forget to read the help file.

Screenshot of Space Invaders Emulator

Tags: factor 


This site is accessable over tor as hidden service 6vp5u25g4izec5c37wv52skvecikld6kysvsivnl6sdg6q7wy25lixad.onion, or Freenet using key:
USK@1ORdIvjL2H1bZblJcP8hu2LjjKtVB-rVzp8mLty~5N4,8hL85otZBbq0geDsSKkBK4sKESL2SrNVecFZz9NxGVQ,AQACAAE/bluishcoder/-61/


Tags

Archives
Links