Team Canada needs some more muscle over at Project Euler. There are no Canadians at 100% genius level. Currently rayfil is at 96% but that's the closest we have. Although you have to give him extra points for writing his solutions in Assembler. I answered a few this weekend myself but I'm back to the grind again now so I'll have to put that pass time on the back burner for a while.
PNG Rant
I've been running wallpapers I find online through pngout for quite some time now and am thoroughly impressed with the results. I unleash it upon /usr/share/pixmaps/*png yearly as well. How can one not get satisfaction out of making a file smaller and losing nothing in the process? This habit has left me a little shocked with the results I've been gathering. The subjective observation I'm left with is that over 90% of the images I find lying around can be recompressed losslessly with a fairly sizable saving. It should be standard procedure for a publish-once, subscribed-many medium to ensure optimal size to save on bandwidth, but this just isn't happening....
Quickly, pngout is a closed-source png written by Ken Silverman (yep, of Ken's Labyrinths fame) recompressor which pretty much always beats optipng -o7, pngcrush and advpng in terms of filesize.
I don't use browser disk caches so I searched my homedir for a cache of PNGs. It turns out the only place I hadn't unleashed pngout on was my .themes directory. There weren't too many files in there but I only have a few minutes to whip this together so someday I'll post more convincing results, but for the moment here's what I have...
299 files. Before pngout, took 468473 bytes of disk space, after pngout, took 164470 bytes. 304003 bytes saved. (64% savings) If you want to duplicate these tests, here's my terrible sample data. (Compressed paq8o2 tarball)
Multiply every unoptimized png downloaded from the web by every uncached browser hit it receives and realize how big of a deal this is...
Friday, September 07, 2007 |
0
comments
Labels: compression
months and months of PAQ
Exciting stuff... PAQ8M has narrowed the gap with StuffIt in terms of lossless JPEG compression. For those unfamiliar with PAQ compression, I highly recommend checking it out. For the uninitiated you're probably best off checkout out LPAQ1 on your non-JPEG data first as it can run in a sane amount of time.
Tuesday, August 14, 2007 |
1 comments
Labels: compression
Google Calculator... an excellent desktop application
Ages ago I decided to come up with the craziest unit conversion request that google could answer. You'll all be pleased to know that 80 cubic light years in half teaspoons is a valid conversion.... Anyone have any better? Also... Cubic light years. Anyone beat me to typing that into Google?
Wednesday, August 01, 2007 |
0
comments
CBC Radio 3 Podcast CUE files...
So I've been recommending CBC Radio 3 Podcast to everyone I know. The only thing they're missing for their multi-format podcast (they even have OGGs!) would be CUE files. So here's my contribution:
CBCR3_2007-06-01.cue Cue file for #106?

Friday, June 01, 2007 |
0
comments
Labels: cbcradio3
Strange Research Encounters
Ran into this strange link while digging up references. Also, nerd lolz: "Do not plan a bridge capacity by counting the number of people who swim across the river today" - Heard at a presentation.
Sunday, April 15, 2007 |
0
comments
WRT PAQ XML Compression
While brainstorming ideas for testing the metascheduler I'm building I thought to look into data compressors again... Specifically the PAQ family of compressors. The latest update is PAQ8jc (fixed tarball). I whipped up an ebuild and took it town using Intel's C++ library. I tested it out on a 1.8M XML file:
reference 1.8M gzip -9 168K bzip -9 108K PAQ8jc -5 61K PAQ8jc -7 61K (2 bytes smaller, but longer runtime/memusage)
Okay... So this shows that if I feel like getting my hands dirty with C++, there's actually some value in parallelizing this algorithm.
Something that caught my eye while looking into this is XML-WRT. It's a fantastic project which scratches an itch I developped in the middle of a lecture on WebServices some time ago. XML-WRT can be thought to work in two distinct steps; substitute common tagnames, attributes etc with shortened tokens; run result through zlib or FastPAQ depending on user preference. I tested its WRTified zlib/fastpaq targets on a the 15M Locations.xml file from gnome-applets (wow that's big):
reference 15M gzip -9 2.0M bzip2 -9 1.2M xml-wrt -2 1.8M (zlib default after wrt) xml-wrt -3 1.7M (zlib best after wrt) xml-wrt -10 693K (FastPAQ normal) xml-wrt -11 693K (FastPAQ best)
I also tested it on a 684M XML database (the default buffer size is too small for dictionary generation on this particular file):
reference 684M gzip -9 102M bzip2 -9 74M xml-wrt -l10 ---- xml-wrt -l10 -b100 51M
What I want you to take away from this is that xml-wrt/PAQ is pretty slick and actually quite usable. xml-wrt -10 will actually complete in a sane timeframe. PAQ8jc on the same file however will take literally ages and probably won't serve any practical purpose for you...
Wednesday, November 29, 2006 |
0
comments
Labels: compression
Silly typo
If you get the following obscure error message while submitting a seemingly simple service request to a Globus service it's because you're attempting to speak HTTP to an HTTPS container as the last reply in this bug tells us...
java.io.IOException: Token length 1347375956 > 33554432
Monday, November 27, 2006 |
0
comments
Labels: globus
lo disappeared you say?
sigh and lol:
%ifconfig
?_ Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:176 errors:0 dropped:0 overruns:0 frame:0
TX packets:176 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:31442 (30.7 Kb) TX bytes:31442 (30.7 Kb)
Friday, November 24, 2006 |
0
comments
Labels: gentoo
Pure Pwnage
One of the great things about living in Toronto is that occasionally you can play spot-the-celebrity. For example, I'm 90% sure I spotted Pure Pwnage Dave today while walking back to my house. This guy:
Anyhow, today brings little news other than a continuing frustration with Gnome's Bonobo component. Also, I too am keeping an eye out for an F-Spot replacement. The problem here is that I have a library of 5000 images complete with tags that I will have to transition to whichever new program I find. This of course means I'll have to write my own tag converting-importing library. If only Google would release a new version of Linux Picasa...
Wednesday, November 22, 2006 |
1 comments
Labels: gaming
Crawling back to Ratpoison
Now that I've successfully ooed and awed everyone I know with Compiz/Beryl, it's time to cut the fat, go back to basics and increase productivity. That means it's Ratpoison time again. :) A year has passed and we're still at version 1.4.0. Good! My ratpoisonrc will still work:
# .ratpoisonrc # By Jason Gorski # -- Display/interaction prefs defpadding 0 0 0 0 defbarborder 0 defborder 0 defbarpadding 0 0 0 0 defwinliststyle column defwingravity center warp off set resizeunit 50 # -- Bindings escape C-t bind Q quit bind d only definekey top s-h focusleft definekey top s-j focusdown definekey top s-k focusup definekey top s-l focusright definekey top s-semicolon prior definekey top s-apostrophe next # s is super, S is shift, M is meta definekey top s-1 exec rpws 1 definekey top s-2 exec rpws 2 definekey top s-3 exec rpws 3 definekey top s-4 exec rpws 4 definekey top s-a exec gnome-terminal definekey top s-M-a exec xterm definekey top s-s exec firefox definekey top s-d exec gmrun #definekey top M-f exec ratbat bind b exec ratpoison -d :0.0 -c "exec test -e 'currentbgs/widescreen.jpg' && feh --bg-scale 'currentbgs/widescreen.jpg'" # -- One-time banish exec rpws init 4 startup_message off echo Ready...
Friday, November 17, 2006 |
0
comments
Labels: ratpoison
Gentoo ICC
Recently I switched back from Ubuntu to Gentoo. When I made the switch, I decided to bring my ICC license with me. Since that time I've managed to get 795 ebuilds to install using ICC 9.1 and 164 which I've had to revert to GCC 4.1 for compile time and/or runtime reasons. If it sounds like this is something you'd like to try out, you can find some of my tools dumped over at GoogleCode: [gentooiccduo]. Which is admittedly a bit of a misnomer as the tools are no longer specific to Intel Core Duo machines. :)
(I should disclaim that these "tools" of which I speak are nothing more than a handful of modified ebuilds, a bash script, and a compendium of CFLAG exclusions)
Sunday, November 12, 2006 |
0
comments
Labels: gentoo
Vim-Blogger Blogging
It's leet, but not quite tpope ready. So you'll have to wait.
Update #1: Sup sup
Update #2: More -n More -n More whitespace. :)
Update #3: Now I have to read about Markdown symtax... sigh
#!/bin/sh
[ -f "/tmp/findhashed.bad" ] && rm /tmp/findhashed.bad
did=0 didnt=0
echo -n "Scanning"
for i in /bin/** /usr/bin/**; do
[ ! -r "${i}" -o ! -x "${i}" -o -h "${i}" ] && continue
if [ $(file "${i}" | awk '{print $2;}') = "ELF" ]; then
readelf -d "${i}" 2>/dev/null|grep GNU_HASH 2>&1 > /dev/null
if [ $? -eq 0 ]; then
((did++))
else
((didnt++))
echo $i >> /tmp/findhashed.bad
fi
fi
# Progress indicator
[ $((($did + $didnt)%14)) = 0 ] && echo -n .
done
total=$(($did + $didnt))
echo "Done"
echo "Of $total elf binaries:"
echo " $did contain a GNU_HASH section"
echo " $didnt do NOT contain a GNU_HASH section"
pctdid=$(($did*100/$total))
echo " $pctdid% are linked with new binutils! Now, on to Bdirect and prelink..."
echo "Ctrl-C to NOT view the list of offending executables."
read
less /tmp/findhashed.bad
Saturday, November 11, 2006 |
0
comments
Labels: vim