I've switched from using my own home web server of which one of the harddrives died, to using NearlyFreeSpeech.NET, an actual real live web hosting
service. So far I'm very happy with them and they give me almost exactly what I had on my own home server: ssh access, vim, php, java, etc. etc. The only notable things they don't do are (1) cron
jobs which I use currently and (2) SSL which I don't use currently. I can replace my cron job usage and I suppose I'll have to reevaluate my web hosting if I ever need SSL. At the moment many of
the server side things like Vizicious will be unavailable. I'll work on getting those working again at some point.
Internet Explorer 8 has made my plugin Feed Folder obselete in functionality and implementation -- which is good!
I made Feed Folder for IE7 because I wanted the Live Bookmarking feature from FireFox. The Feed Folder plugin for IE7 would allow you to
display your feeds as virtual folders in your Links Bar. When your feed is updated the virtual folder is updated as well with the new feed items. I use del.icio.us to store all my links so I could
add virtual folders of my daily links, my friends blogs links, quick reference links, etc. etc.
My plugin relied on shell folders to implement the virtual folders I described above, but IE8 doesn't support shell folders in the Favorites Bar. But I'm OK with Feed Folder not working in IE8
since there's a much better implementation already there. IE8 does better than my plugin on a number of points: First, there isn't the horrible perf. issue that my plugin had on Vista. Second, when
a feed is updated the virtual folder flashes to note the change in status. Third, unread items are bolded and the bolding bubbles up from feeds contained in subfolders. And lastly, the middle click
button is supported to open items in a new tab.
Accordingly, I don't plan to work on Feed Folder anymore unless someone comes up with a good reason. Instead I mark Feed Folder deprecated and suggest you use Internet Explorer 8 instead.
To use this feature in IE8 simply drag a feed from your feed list in your Favorites Center onto your Favorites Bar. Or, when viewing a feed, click on the 'Add to Favorites' Star Plus icon thing in
the upper left, and select 'Monitor on Favorites Bar'. A .url Internet Shortcut file is produced as usual, but if you open up the .url file you'll see there's some additional info about the feed.
Internet Explorer 8 Beta 1 is available now. I can finally talk about some of the stuff I've been
working on for the past year or so: activities. Activities let you select a document,
some text on a document, or a link to a document and run that selection through a web service. For example, you could select a word on a webpage and look it up in Wikipedia, select an address and
map it on Yahoo Maps, select a webpage and translate it into English with Windows Live Translator, or select a link and add it to Digg.
IE8 comes installed with some activities based on Microsoft web services but there's a page you can go to to
install other activities. However, that page is missing some of my favorites that I use all the time, like del.icio.us.
Accordingly, I've put together a page of the activities I use. MSDN has all the info on creating Activities.
Activities are very similar to other existing features in other browsers including the ability to add context menu items to IE.
There's two important differences which make activities better. Activities have a preview window that pops out when you hover over an activity, which is useful to get in place information easily
provided by developers. The other is that the interface is explicit and takes after HTML FORMs and OpenSearch descriptions. Because the interface is explicitly described in XML (unlike the context
menu additions described above which run arbitrary script) we have the ability to use activities in places other than on a webpage in the future. And because activity definitions are similar to
HTML FORMs, if your webservice has an HTML FORM describing it you can easily create an activity.
This post is about creating a server side z-code
interpreter that represents game progress in the URI. Try it with the game Lost
Pig.
I enjoy working on URIs and have the mug to prove it. Along those lines I've combined thoughts on URIs with interactive fiction. I have a
limited amount of experience with Inform which generates Z-Code so I'll focus on pieces written in that. Of course we can already have URIs
identifying the Z-Code files themselves, but I want URIs to identify my place in a piece of interactive fiction. The proper way to do this would be to give Z-Code its own mimetype and associate
with that mimetype the format of a fragment that would contain the save state of user's interactive fiction session. A user would
install a browser plugin that would generate URIs containing the appropriate fragment while you play the IF piece and be able to load URIs identifying Z-Code files and load the save state that
appears in the fragment.
But all of that would be a lot of work, so I made a server side version that approximates this. On the Web Frotz Interpreter page, enter the URI of a
Z-Code file to start a game. Enter your commands into the input text box at the bottom and you get a new URI after every command. For example, here's the
beginning of Zork. I'm running a slightly modified version of the Unix version of Frotz. Baf's Guide to the IF Archive has lists of IF games to try out.
There are two issues with this thought, the first being the security issues with running arbitrary z-code and the second is the practical URI length limit of about 2K in IE. From the Z-Code
standard and the Frotz source it looks like 'save' and 'restore' are the only commands that could do anything interesting outside of the Z-Code virtual machine. As for the length-limit on URIs I'm
not sure that much can be done about that. I'm using a base64 encoded copy of the compressed input stream in the URI now. Switching to the actual save state might be smaller after enough user
input.
To get real search I'm going to have to keep an archive of all my content on my own website. This is a pain but on the other hand it will let me easily backup my content or display old items on my
page. Why didn't I just use a prebuilt solution?
When throwing together an HTML page at work that other people will view, I stick the following line in for style. Its IE's error page CSS and contaits a subtle gradient background that I like.
2007 Dec 24, 12:41These days it seems like there's a social sharing website for everything representable as bits. Like Scribd for (mostly legal) documents, SciVee for scientific research videos, Wordie for words, and Kuler for color themes. Kuler seems
like a ridiculous website (overkill) but I had been meaning to update my homepage's color design and Kuler has an RSS based REST API.
The API lets you obtain things like the most recently added color themes or the most popular or all themes containing the color dark red, etc... So of course rather than update my website's design I
hooked up my css to the color themes coming out of Kuler. Select my main page's color theme from a list of random Kuler themes. As I'm sure
the regular readers can guess I use an xslt and blah blah blah... It looks OK with Silver Surfer and Happy Hipo but in general
changing the colors this way doesn't produce something pretty.
2007 Nov 28, 1:23One of the new Zune features that had me the most excited was the claimed improved Windows Media Center integration which unfortunately turned out to simply mean support for the Win MCE video format
(with an exception for HD). I wanted to be able to pick shows recorded by my Win MCE and have the Zune automatically sync up the
latest episodes. However, with the improved podcast support in the Zune software one can easily create a ridiculous hack to accomplish this.
The new Zune software has podcast support which does everything I'd want to do with a
Win MCE recorded TV series so the goal is to shoehorn a TV series into a Zune podcast. An overview of the steps: Create an XSLT that converts Win MCE data to a podcast, run the XSLT as a scheduled
task every few hours per TV series, setup a Web server pointed at the resulting podcasts and the Win MCE Recorded TV directory, and subscribe to the resulting podcasts in the Zune software.
I added a new task to the Scheduled Tasks to run my XSLT using my xsltproc.js script. The task runs a handful of commands that look something like the following:
C:\windows\system32\wscript.exe C:\users\dave\bin\xsltproc.js C:\Users\Dave\Documents\trunk\development\mce-zune\mce-to-podcast.xslt
C:\ProgramData\Microsoft\eHome\Recording\Recordings.xml --param title "The Daily Show With Jon Stewart" --param max 4 --param baseURI "http://groucho/" --param thisRelURI "tds.xml" -o
"D:\recorded tv\tds.xml"
For each TV series I run a command like the above and that outputs a podcast for that series into my "D:\Recorded TV\" directory.
Zune only allows http URIs for its podcasts so I installed a web server on my Win MCE server. I'm running Vista Ultimate so it was quick and easy for me to install IIS7 but any Web server will do. Then I pointed it at "D:\Recorded TV\".
Once all the above was done I just subscribed to the resulting podcasts via my Web server and viola! Since I'm forced to use a Web server I can even run the Zune software on a machine other
than my Win MCE server. You can see a screen-shot above of my Zune software showing my Colbert Report podcast.
2007 Nov 7, 5:19My Many Eyes account page. Adding this to delicious so that I don't lose track of it. Associated IBMID: dave@deletethis.netproldfilemany-eyesstatisticsvisualizationme
2007 Oct 22, 4:47I purchased the Orange Box off of Steam a bit ago and like
others before me who have discussed elsewhere, I already owned two of the five games that come from the Orange Box. However, the combined price of
HL2E2 and Portal, the two games I actually wanted was supposedly equivalent to the price of the Orange Box bundle. Incidentally, if anyone would like HL2 or HL2E1 I can gift them to you.
HL2E2 was excellent of course but the big surprise for me was Portal. (Mild spoilers follow) It has a sort of zen simplicity: there are a few simple game-play mechanics, a handful of textures and
objects, and a deceptively simple story all used well and tied together to produce an entertaining and polished game. It seems a bit short but its probably better to end with the gamer demanding
more. The humor and the sort of play within a play aspect of the game is what really sold me though. It has the funniest ending theme I've heard (also blogged by the creator). The voices of the automated turrets are so adorable I would feel compelled to hug them if they weren't
always trying to kill me. Additionally the weighted companion cube seems like an experiment in understanding gamers'
attachment to NPCs. In this case the NPC is a box and yet I still felt awful incinerating it. The whole time I was vaguely reminded of Solitary the reality show
that sticks contestants alone in small rooms forcing them to endure various tests all the while being watched by a humorous computer with a female voice. Someone should sue...
2007 Oct 14, 3:12I've updated my homepage by moving stuff about me onto a separate About page. Creating the About page was the perfect opportunity
to get FoaF, a machine readable way of describing yourself and your friends, off my to do list. I have a base FoaF file to which I add friends, projects, and accounts from delicious
using an XSLT. This produces the FoaF XML resource on which I use another XSLT to convert into HTML and produce the About page.
I should also mention a few FoaF pages I found useful in doing this:
FoaF Explorer - Turns any RDF XML FOAF resource into a webpage with links to the other people, projects, etc mentioned in the FOAF file.
FoaF-a-Matic - I used this to produce my base FoaF file.
RDF Validator - This is the closest thing I could find for validation. It does RDF in general but unfortunately not FoaF specifically. I found two
links to sites that are down or dead that claimed to do what I actually wanted.
On a similar note here's a fun tip for IE7 users I got from Eric. You can get decent ad-blocking in IE7 by putting ad servers in the restricted zone. By default script inclusion is blocked between
different zones so you can put domains that serve up ads in your restricted zone after which, normal internet zone sites won't be able to include script from them. This covers most of the ads I run
into these days.
I use Fiddler to figure out the domains that are serving up ads which incidentally also has an ad-blocking^H^H^H^H general purpose content blocking plugin. Here's
a screenshot of Slashdot and ArsTechnica from my browser. Notice the large blank areas in the screenshots:
2007 Aug 21, 4:04Seeing ErrorZilla I realized I could easily do a similar thing to the IE7 404 page using the same
technique I used for the XML view and the feed view.
2007 Jul 13, 8:30I bought an external backup drive a few weekends ago. I've previously setup a Subversion repository so I decided to move everything into the repository and
then back it up. So in went the contents of all of my %USERPROFILE% and ~ directories with a bit of sorting and pruning. Not too much though given its much easier to dump in everything and search for
what I want then to take the time to examine and grade each file. What follows are the notes I took while setting this up. It takes me a bit of time to look up the help on each command so I figure
I'll write it all down here for the benefit of myself and potentially others...
Setting Up the Backup Drive For Linux
I first changed the filesystem on the drive to ext3. I plugged it into my USB2.0 port and ran fdisk:
sudo fdisk /dev/sda
Useful commands I used to do this follow mostly in order:
m
help
p
print current partitions
d
delete current partition
n
create new partition (I used the defaults)
w
write changes and exit
Then I formatted for ext3.
sudo mkfs.ext3 /dev/sda1
I made it easy to mount:
sudo vim /etc/fstab
# added line to end:
/dev/sda1 /media/backup ext3 rw,user,noauto 0 0
After all that its easy to make a copy of the Subversion repository:
mount /media/backup
cp -Rv /home/dave/svn /media/backup/users/dave/
umount /media/backup
Next on the agenda is to add a cron job to do this regularly.
Subversion Command Reference
On a machine that has local access to the Subversion repository you can check out a specific subdirectory as follows using the file scheme:
svn co file:///home/dave/svn/trunk/web/dave%40deletethis.net/public_html
Note also that although one of my directories is named 'dave@deletethis.net' Subversion requires the '@' to be percent-encoded.
Other useful subversion commands:
svn help
help
svn list file:///home/dave/svn/
list all files in root dir of svn depot
svn list -R file:///home/dave/svn/
list all files in svn depot
svn list -R file:///home/dave/svn/ | grep \/$
list all directories
svn status
List status of all files in the working copy directory as in - modified, not in repository, etc
svn update
Brings the working copy up to date wrt the repository
svn commit
Commit changes from the working copy to the repository
svn add / move / delete
Perform the specified action -- occurs immediately
Setting up Windows Client for Auto Auth into SVN
When using an SVN client on Windows via svn+ssh its useful to have the Windows automatically generate connections to the SVN server. I use putty on my Windows machines so I read the directions on using public keys with putty.
putty.exe dave@deletethis.net
cd .ssh
vim authorized_keys # leave the putty window open for now
puttygen.exe
Click the 'generate' button
Move the mouse around until finished
Copy text in 'Public key for pasting into OpenSSH authorized_keys file:' to putty window & save & close putty window
Enter Key passphrase & Comment in puttygen
Save the private key somewhere private pageant.exe
'Add Key' the private key just saved.
Checking out using Tortoise SVN
On one of my Windows machines I've already installed Tortoise SVN. Checking out from my SVN repository was really easy. I just right clicked in Explorer in a directory and selected "SVN Checkout...".
Then in the following dialog I entered the svn URI:
Note again that the '@' that is part of the directory name is percent-encoded as '%40' while the '@' in the userinfo is not.
Windows Command Line Check Out
On my media center I didn't want to install Tortoise SVN so rather I used the command line tool. I setup pageant like before the only
difficulty was getting the SVN command line tool to use putty. With the default configuration you can use the SVN_SSH environment variable to point at a compliant SSH command line tool. The trick is
that its interpreted as a backslash escaped string. So I set mine thusly:
set SVN_SSH=C:\\users\\dave\\bin\\putty\\plink.exe
2007 Jun 7, 5:29The other day I had the best idea for my Wii remote. Clearly I should use it to control the rotation of Tetris pieces in my N-dimensional
Tetris game Polytope Tetris. One of the issues I described with Polytope Tetris is user input. Given a Wii remote the
user could rotate a piece through 3 dimensions in a manner that's much easier to adjust to than particular keys on the keyboard.
Anyway, I did a little research into how this might work. I knew that the Wii remote used infrared for absolute positioning and
Bluetooth for everything else (LEDs, speaker, accels.) I bought a Bluetooth adapter for my PC after realizing that none of my
computers had one already. I used GlovePIE to ensure that my Wii remote could connect and successfully communicate with my computer.
GlovePIE is actually pretty cool -- it provides a simple script layer over the Wii remote to control things like your mouse.
Since Polytope Tetris is in Java I looked for and found a Java library for operating with the Wii remote and a long forum thread discussing its use. I then read up on Bluetooth in Java. Apparently JSR 82 is the name of the standard that describes the API a Bluetooth stack should expose
in Java. That is, to get Bluetooth working in Java one needs an additional package for Java that actually implements the Bluetooth Java API. This package would depend on the system so I suppose I
can't fault Sun for not including it... Where to find such a package? I found a comparison list of implementations and tried the ones
that support javax.bluetooth. Noneofthem worked for me because none can address USB devices it seems or they cost money and I couldn't get the trial version working. I also tried
bluesock (not listed on the previous list) which seemed promising and could produce an address for my Wii remote as a connected device but couldn't use
that address.
My first thought for this was that I could embed enclosures into the feed display. For instance, have controls for youtube.com videos or podcast audio files directly in the feed display. However, I
found that I can't use object or embed tags that rely on ActiveX controls in the page or in frames in the feed display.
With that through I decided I could at least add support for some RSS extensions. Thanks to IE7's RSS platform which provides a
normalized view of RSS feeds it was really easy to do this. I went to several popular RSS feeds and RSS feeds that I like and took a look at the source to see what extensions I might want to add
support for.
For digg.com I added support for their RSS extension which includes digg count, and submitter name and icon. I
added the digg count in a box on the right and tried to make it fit in stylistically. For the iTunes RSS extension
I add the feed icon, feed author, and descriptions. I was surprised by how much of the podcasts content was missing from the feed view. I also added support for a few other misc things: the slash RSS extension's section and department, the feed description to the top of the feed display, and the atom author icon.
This time around I've started to add support for the XPointer Framework to my XML source view and
I've added installation instructions. The framework consists of a series of pointer segments each of which has a scheme name followed
by data in parenthesis. For example 'scheme1(data1)scheme2(data2)scheme3(data3)'. A pointer segment resolves to a portion of the XML document based on the data and the scheme name. The whole pointer
resolves to the first segment that successfully resolves. That is, from the example, if scheme1 resolves to nothing and scheme2 resolves to something then that's used and scheme3 is ignored. In
addition to the framework I've added support for the xmlns scheme which binds namespace prefixes to a namespace URI and the element scheme which is a simple way to resolve to particular elements in an XML. I also have limited support for the xpointer scheme the content of which is resolved as an XPath with some extra functions (which I don't support --
hence the limited). I've also thrown in schemes for the two SelectionLanguage values supported by msxml3.
2007 May 11, 8:55Last time, I had written some resource tools to allow me to view and modify Windows module resources in my ultimate and noble quest to
implement the XML content-type fragment in IE7. Using the resource tools I found that MSXML3.DLL isn't signed and that I can replace the XSLT embedded resource with my own, which is great news and
means I could continue in my endevour. In the following I discuss how I came up with this replacement for IE7's XML source view.
At first I thought I could just modify the existing XSLT but it turns out that it isn't exactly an XSLT, rather its an IE5 XSL. I tried using the XSL to XSLT converter linked to on MSDN, however the resulting document still
requires manual modification. But I didn't want to muck about in their weird language and I figured I could write my own XSLT faster than I could figure out how theirs worked.
I began work on the new XSLT and found it relatively easy to produce. First I got indenting working with all the XML nodes represented appropriately and different CSS classes attached to them to make
it easy to do syntax highlighting. Next I added in some javascript to allow for closing and opening of elements. At this point my XSLT had the same features as the original XSL.
Next was the XML mimetype fragment which uses XPointer, a framework around various different schemes for naming parts of an XML document. I focused on the
XPointer scheme which is an extended version of XPath. So I named my first task as getting XPaths working.
Thankfully javascript running in the HTML document produced by running my XSLT on an XML document has access to the original XML document object via the document.XMLDocument property. From this this I can execute XPaths, however there's no builtin way to map from the XML nodes selected by
the XPath to the HTML elements that I produced to represent them. So I created a recursive javascript function and XSLT named-template that both produce the same unique strings based on an XML node's
position in the document. For instance 'a3-e2-e' is the name produced for the 3rd attribute of the second element of the root element of the XML document. When producing the HTML for an XML node, I
add an 'id' attribute to the HTML with the unique string of the XML node. Then in javascript when I execute an XPath I can discover the unique string of each node in the selected set and map each of
them to their corresponding positions in the HTML.
With the hard part out of the way I changed the onload to get the fragment of the URI of the current document, interpret it as an XPath and highlight and navigate to the selected nodes. I also added
an interactive floating bar from which you can enter your own XPaths and do the same. On a related note, I found that when accessing XML files via the file URI scheme the fragment is stripped off and
not available to the javascript.
2007 May 9, 4:15I read about text/xml URI fragment resolution a few months ago. I was interested to find another kind of fragment reference other than the text/html URI
fragment but of course I didn't find an implementation in IE, Firefox, or Opera. I decided to see how much work would be required to implement this in IE.
In IE and Firefox when you open an XML file that doesn't have an XML stylesheet the XML source is rendered with syntax highlighting. In IE I also noticed that the gold bar appears when you open an
XML file off of your local machine. To me this suggested that the XML source was being rendered as HTML which I assumed was produced by running an XSLT on the source XML file. If so, I figured I
could modify the XSLT to implement text/xml URI fragments. I ran FileMon to see if iexplore.exe loaded an
XSLT file when opening an XML file. Only the XML file and MSXML3.DLL were opened and no XSLTs were loaded as files. My next hope for modifying the XSLT was if it existed as a resource in MSXML3.DLL.
I did a findstr on the DLL for SCRIPT and found an XSLT so I decided to check for resources in MSXML3.DLL. Unfortunately my previous resource viewer didn't work correctly so I decided to write my
own.
I created resource tools to view and modify resources in Windows modules. The viewer outputs HTML with links to the
individual resources of a module using the res URI scheme that's built into IE. The modifier is a simple command line tool that
replaces or adds one resource at a time to a module.
Using these tools I found that the XSLT was stored as a resource in MSXML3.DLL. I'll talk more about the existing XSLT and the one I replaced it with next time.resourcetechnicalxmlmsxmlresxsltxsl