Wednesday, November 25, 2009

Restoration of the Old Kingdom

It starts off with a boy escaping punishment from his mother via a secret passage to a cavern...

Years later, when the boy is a young man, his mother is making them move for away. As he packs up his belongings, he is distracted by a rabbit bounding off towards the village. Once there, he is confronted by a group looking to go on an short adventure, led by a wiseman . Hoping to make his last day in his hometown a good one, he accompanies them.

They make their way to a market house at the end of a valley, where the young man had been employed previously, but they must make their way past the valley, and the wiseman discovers that it's blocked off only by a wall of the market. Unfortunately for the market owner, one of them barrels through rows of stock, then breaks through the wall. Not wanting to be stopped, they ran through.

The group happens upon a cave, and enter it as directed by the wiseman. The journey here becomes quite dangerous, with the final section requiring them to walk across the top of stalagmites that project upward out of a searing-hot spring.

Once in the final room of the cave, they discover a door at the top, much to their surprise. The young man stands, almost in a trance, at the entrance to the final room as memories from his late father fill his mind. He begins to manipulate hidden switches throughout the room, causing fire to rise from all sides, finally resulting in a major quake.

Outside, light begins to fill the area around the hill containing the cave, and the quake causes much of it to collapse. After the dust clears, a castle is revealed, and the song familiar to everyone who remembers the old kingdom that resided in the area is played from the bell towers. They exclaim, "The king has returned!" and run to the castle to greet him, only to come upon the young man. After an awkward pause, someone familiar to the old king says, "You look just like him... You must be his son!" The people rejoice, as the old kingdom can now be restored.

Once sat upon the throne, the young man realizes that this cavern of his youth was the throne room of the old castle. He also found out his father's death led to the collapse of the old kingdom, and his that mother wanted to keep him isolated from anything involving it.

Tuesday, November 10, 2009

Wikipedia Graph Generator

I've been working on this project for the past month or so, but since it pretty much works I've lost interest. For those interested, this sort of graph is an example of generated output, and shows pages as vertices and inter-page links as directed edges. The scripts can be found here:

Since the data set is quite large (the PostgreSQL database dump compressed is over 550 MB), it'd be much easier for anyone who wants to check this out to generate the data. The process is as follows:


If the above image doesn't load, open the image location in a separate window or tab.

  1. Run psql -U postgres wikidown2 < schema_create2
  2. Download this file from Wikipedia: enwiki-latest-pages-articles.xml.bz2 (5.3 GB)
  3. Run enwiki-latest-pages-articles.xml.bz2 pages.lst links.lst I originally used CSV here, but switched to an ASCII group separator later. The '.csv' suffixes are vestigial.
  4. Run links.lst links-sorted.lst.
  5. Run pages.lst pages-presorted.lst.
  6. Run sort -k1nru pages-presorted.lst pages-sorted.lst.
  7. Unfortunately, due to the behavior of Python's hash algorithm and Postgres's tree algorithm, there will be a duplicate title. The only real solution is to keep trying the following steps and edit pages.lst accordingly. Remember than whenever you delete a row in pages.lst, you must also delete links in links.lst that point to it.
  8. Run bzip2 links.lst and bzip2 pages.lst.
  9. Run pages.lst.bz2 links.lst.bz2. This step is considerably faster if both files are mounted in tmpfs (RAM), but only if your machine has enough RAM. tmpfs is not available on Windows.

Once you've run those steps, you can run

Saturday, November 7, 2009

Addendum: "Leaf Hat Linux" Stickers

In response to my previous post, it appears that I'll have to have 1000 printed and they'll be 4" wide by 2" tall. I'll raise the price to $0.40 per sticker, but will only charge $3.00 per ten stickers or $20.00 per hundred stickers.

Sorry for the inconvenience; it was news to me too. The quality won't suffer, though, since it's all still not rastorized.

"Leaf Hat Linux" Stickers

I'm having 500 "Leaf Hat Linux" stickers printed. These are high-quality stickers, with no rasterization done at any point, and will be 3.5" wide by 1.25" tall.

If anyone wants one or more, contact me. I'll probably set the price at $0.35 per sticker.