<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>The place where daurnimator rants.</description><title>Daurnimator's Hovel</title><generator>Tumblr (3.0; @daurnimator)</generator><link>http://daurnimator.com/</link><item><title>Getting FFmpeg on windows</title><description>&lt;p&gt;All the guides to getting ffmpeg working on windows seem to be extremely outdated; so here is a quick howto:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Download &lt;a title="MinGW installer" href="http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/mingw-get-inst-20110802/mingw-get-inst-20110802.exe/download?source=files"&gt;mingw&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Install mingw with MSYS option; it will download and setup in C:\MinGW&lt;/li&gt;
&lt;li&gt;Get the mingw coreutils extra package (can be found from &lt;a href="http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/coreutils/"&gt;here&lt;/a&gt;); &lt;a title="Coreutils extra package" href="http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/coreutils/coreutils-5.97-3/coreutils-5.97-3-msys-1.0.13-ext.tar.lzma/download"&gt;current version&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Install the coreutils extras package by un-7zipping and un-tarring it to C:\MinGW\msys\1.0\bin&lt;/li&gt;
&lt;li&gt;Download &lt;a href="http://www.tortall.net/projects/yasm/releases/yasm-1.1.0-win32.exe"&gt;yasm&lt;/a&gt;; save it as C:\MinGW\msys\1.0\bin\yasm.exe&lt;/li&gt;
&lt;li&gt;Download and extract &lt;a title="FFmpeg source snapshot" href="http://git.videolan.org/?p=ffmpeg.git;a=snapshot;h=HEAD;sf=tgz"&gt;ffmpeg source&lt;/a&gt; (I used revision 647ec6f)&lt;/li&gt;
&lt;li&gt;Edit your C:\MinGW\msys\1.0\etc\fstab file to add the location of your ffmpeg source&lt;/li&gt;
&lt;li&gt;Open MinGW shell (it should be in your start menu)&lt;/li&gt;
&lt;li&gt;change to the directory you extract ffmpeg (going via the alias you added in fstab)&lt;/li&gt;
&lt;li&gt;./configure&lt;/li&gt;
&lt;li&gt;make&lt;/li&gt;
&lt;/ol&gt;</description><link>http://daurnimator.com/post/11506463329</link><guid>http://daurnimator.com/post/11506463329</guid><pubDate>Sun, 16 Oct 2011 13:32:05 +1100</pubDate></item><item><title>Prosh Week 2010</title><description>&lt;a href="http://www.proshweek.net/"&gt;Prosh Week 2010&lt;/a&gt;: &lt;p&gt;An awesome week of fun and games at melbourne uni.&lt;/p&gt;</description><link>http://daurnimator.com/post/961754079</link><guid>http://daurnimator.com/post/961754079</guid><pubDate>Mon, 16 Aug 2010 18:13:51 +1000</pubDate></item><item><title>HTML generation with lua</title><description>&lt;p&gt;In my adventures on the web; I discovered an aid for writing HTML called &lt;a href="http://code.google.com/p/zen-coding/"&gt;zen-coding&lt;/a&gt;. Playing a bit with it, I found it lacking in some departments, and began to think that macros aren’t whats needed, but complete generation.&lt;/p&gt;
&lt;p&gt;I remembered seeing an example of some html generating lua code a while back, and for a bit of fun decided to do my own take on it…&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;local function renderattributes ( attr )&lt;br/&gt;    local t , i = { } , 1&lt;br/&gt;    for k , v in pairs ( attr ) do&lt;br/&gt;        t [ i ] = ’ ‘&lt;br/&gt;        t [ i + 1 ] = k&lt;br/&gt;        t [ i + 2 ] = ‘=”’&lt;br/&gt;        t [ i + 3 ] = v&lt;br/&gt;        t [ i + 4 ] = ‘”’&lt;br/&gt;        i = i + 5&lt;br/&gt;    end&lt;br/&gt;    return table.concat ( t )&lt;br/&gt;end&lt;br/&gt;&lt;br/&gt;local function tostringtable ( t )&lt;br/&gt;    local r = { }&lt;br/&gt;    for i , v in ipairs ( t ) do&lt;br/&gt;        r [ i ] = tostring ( v )&lt;br/&gt;    end&lt;br/&gt;    return r&lt;br/&gt;end&lt;br/&gt;&lt;br/&gt;local elementmeta = {&lt;br/&gt;    __tostring = function ( t )&lt;br/&gt;        if #t == 0 then — Self closing tag&lt;br/&gt;            return “&lt;” .. t.tag .. renderattributes ( t.attr ) .. “/&gt;”&lt;br/&gt;        else&lt;br/&gt;            return “&lt;” .. t.tag .. renderattributes ( t.attr ) .. “&gt;” .. table.concat ( tostringtable ( t ) ) .. “&lt;/” .. t.tag .. “&gt;”&lt;br/&gt;        end&lt;br/&gt;    end ;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;local escapecodes = setmetatable (&lt;br/&gt;    {&lt;br/&gt;        [“&lt;”] = “&amp;lt;” ;&lt;br/&gt;        [“&gt;”] = “&amp;gt;” ;&lt;br/&gt;        [“&amp;”] = “&amp;amp;” ;&lt;br/&gt;        [‘”’] = “&amp;quot;” ;&lt;br/&gt;    } ,&lt;br/&gt;    { __index = function ( t , k ) return string.format ( “&amp;#%03d;” , string.byte ( k ) ) end }&lt;br/&gt;)&lt;br/&gt;&lt;br/&gt;local function escapehtml ( str )&lt;br/&gt;    return ( str:gsub ( [=[[&lt;&gt;&amp;”]]=] , escapecodes ) )&lt;br/&gt;end&lt;br/&gt;&lt;br/&gt;local stringmeta = {&lt;br/&gt;    __tostring = function ( t )&lt;br/&gt;        return escapehtml ( table.concat ( t ) )&lt;br/&gt;    end&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;local function construct ( tag , contents )&lt;br/&gt;    local attr = { }&lt;br/&gt;    local r = { tag = tag , attr = attr }&lt;br/&gt;&lt;br/&gt;    for k , v in pairs ( contents ) do&lt;br/&gt;        if type ( k ) == “string” then — attribute&lt;br/&gt;            assert ( type ( v ) == “string” , “Attributes must be strings” )&lt;br/&gt;            attr [ k ] = v&lt;br/&gt;        elseif type ( k ) == “number” then — Contents&lt;br/&gt;            if type ( v ) == “string” then&lt;br/&gt;                r [ k ] = setmetatable ( { v } , stringmeta )&lt;br/&gt;            elseif type ( v ) == “number” then&lt;br/&gt;                r [ k ] = setmetatable ( { tostring ( v ) } , stringmeta )&lt;br/&gt;            else&lt;br/&gt;                r [ k ] = v&lt;br/&gt;            end&lt;br/&gt;        else&lt;br/&gt;            error ( “Bad type” )&lt;br/&gt;        end&lt;br/&gt;    end&lt;br/&gt;&lt;br/&gt;    return setmetatable ( r , elementmeta )&lt;br/&gt;end&lt;br/&gt;&lt;br/&gt;local CDATA = function ( p ) return setmetatable ( p , { __tostring = function ( t ) return “&lt;![CDATA[” .. table.concat ( tostringtable ( p ) ) .. “]]&gt;” end } ) end&lt;br/&gt;local javascriptblock = function ( p ) return construct ( “script” , { type=”text/javascript” ; “//” ; CDATA { ‘\n’ ; p ; ‘\n//’ } } ) end&lt;br/&gt;tags = setmetatable ( {&lt;br/&gt;        CDATA = CDATA ;&lt;br/&gt;        javascriptblock = javascriptblock ;&lt;br/&gt;    } ,&lt;br/&gt;    { __index = function ( t , k ) return function ( p ) return construct ( k , p ) end end }&lt;br/&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To be used like so:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;setmetatable ( _G , { __index = tags } )&lt;br/&gt;&lt;br/&gt;print ( html {&lt;br/&gt;        head {&lt;br/&gt;            title { “Text” } ;&lt;br/&gt;            javascriptblock [[alert(“XHTML compatible!” );]] ;&lt;br/&gt;        } ;&lt;br/&gt;        body {&lt;br/&gt;            div { id=”main” ;&lt;br/&gt;                img { src = “blah.jpg” };&lt;br/&gt;            }&lt;br/&gt;        }&lt;br/&gt;    } )&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Output:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;html&gt;&lt;head&gt;&lt;title&gt;Text&lt;/title&gt;&lt;script type=”text/javascript”&gt;//&lt;![CDATA[&lt;br/&gt;alert(“XHTML compatible!” );&lt;br/&gt;//]]&gt;&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;div id=”main”&gt;&lt;img src=”blah.jpg”/&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The code is quite extensible, to create a new tag/block, all you need is a table with a __tostring metamethod.&lt;/p&gt;
&lt;p&gt;Contrary to first appearances, it doesn’t just create a document from a table, but creates an internal structure of a document; which can then be generated on demand (via the recursive __tostring metamethods). This means that dynamic content can be used with the same structure:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;userloggedin = function () return true  end&lt;br/&gt;function loggedinonly ( p ) if userloggedin() then return setmetatable ( p , { __tostring = function ( t ) return table.concat ( tostringtable ( p ) ) end } ) else return “” end end&lt;br/&gt;print ( body {&lt;br/&gt;    loggedinonly {&lt;br/&gt;        div {&lt;br/&gt;            “Logged in!”&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;} )&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Obviously, to facilitate writing conditional code easier, some simple helper functions can be created:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;setpassthrough = function ( t ) return setmetatable ( t , { __tostring = function ( o ) return table.concat ( tostringtable ( o ) ) end } ) end&lt;br/&gt;&lt;br/&gt;function ifcond ( cond , t , f )&lt;br/&gt;    if cond then&lt;br/&gt;        return setpassthrough ( t )&lt;br/&gt;    else&lt;br/&gt;        if f then&lt;br/&gt;            return setpassthrough ( f )&lt;br/&gt;        else&lt;br/&gt;            return “”&lt;br/&gt;        end&lt;br/&gt;    end&lt;br/&gt;end&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Maybe when I need to write some html I can put this into practice!&lt;/p&gt;
&lt;p&gt;If you find this useful, please give me a yell!&lt;/p&gt;</description><link>http://daurnimator.com/post/603878464</link><guid>http://daurnimator.com/post/603878464</guid><pubDate>Mon, 17 May 2010 00:46:00 +1000</pubDate><category>lua</category><category>coding</category><category>html</category></item><item><title>via www.comicblasphemy.com</title><description>&lt;img src="http://26.media.tumblr.com/tumblr_l2ay6l32l41qztyaio1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;via &lt;a href="http://www.comicblasphemy.com/comics/2010-03-15.jpg"&gt;&lt;a href="http://www.comicblasphemy.com"&gt;www.comicblasphemy.com&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://daurnimator.com/post/592117180</link><guid>http://daurnimator.com/post/592117180</guid><pubDate>Wed, 12 May 2010 20:23:08 +1000</pubDate></item><item><title>Motorbike annoyances</title><description>&lt;p&gt;So I finally got my GSXR-400 back together on friday, after taking it apart three months earlier for a service… And I hear a valve that isn’t correctly adjusted. Now I have to take the tank, fan and engine cover off again to readjust a valve clearance :(&lt;/p&gt;</description><link>http://daurnimator.com/post/571175843</link><guid>http://daurnimator.com/post/571175843</guid><pubDate>Wed, 05 May 2010 02:40:48 +1000</pubDate><category>motorbike</category></item><item><title>Costumes</title><description>&lt;p&gt;Yet again I am leaving a costume to the last minute… For eng ball on Wednesday night the general theme is “Hollywood”; but each table has it’s own sub-theme.&lt;/p&gt;
&lt;p&gt;Our Theme: Toy Story.&lt;/p&gt;
&lt;p&gt;I expect I’ll end up going as Woody cause its the easiest…&lt;/p&gt;</description><link>http://daurnimator.com/post/568520266</link><guid>http://daurnimator.com/post/568520266</guid><pubDate>Tue, 04 May 2010 02:39:48 +1000</pubDate><category>social</category></item><item><title>How GHDL is awesome</title><description>&lt;p&gt;So, for a subject at uni (&lt;a href="https://handbook.unimelb.edu.au/view/2010/431-302"&gt;Digital System Design&lt;/a&gt;), we have to learn and use vhdl. Not the best language ever invented (who the hell bases a language on Ada anyway…. ew), but I suppose it gets the job done.&lt;/p&gt;
&lt;p&gt;We learnt using modelsim and quartus on the uni computers, and from the very start I thought they were terrible, terrible programs. Modelsim seems to freeze regulary during simple tasks, highlighting leaves much to be desired, compiling is extremly awkward and half the time was spent trying procedures in a slightly different order to get things compiled/running.&lt;/p&gt;
&lt;p&gt;The other night while at home I decided to give the &lt;a href="http://ghdl.free.fr/"&gt;GHDL&lt;/a&gt; suite a go, and god am I glad I did. Being able to debug in several steps was a great improvement, and gtkwave is a great waveform viewer, or at least it is for all the assignments we get for this subject. No longer do I have to use uni computers, or use the expensive ugly beast that is modelsim.&lt;/p&gt;
&lt;p&gt;I sort of enjoyed working in vhdl for a little bit there…&lt;/p&gt;</description><link>http://daurnimator.com/post/565961182</link><guid>http://daurnimator.com/post/565961182</guid><pubDate>Mon, 03 May 2010 02:15:00 +1000</pubDate><category>uni</category><category>vhdl</category></item><item><title>Google Profile</title><description>&lt;a href="http://www.google.com/profiles/115903704290634857257"&gt;Google Profile&lt;/a&gt;: &lt;p&gt;I now have a google profile!! Hooray?&lt;/p&gt;
&lt;p&gt;Now everyone can google my name and find me….&lt;/p&gt;</description><link>http://daurnimator.com/post/98925204</link><guid>http://daurnimator.com/post/98925204</guid><pubDate>Thu, 23 Apr 2009 01:17:31 +1000</pubDate></item><item><title>Easter Update</title><description>&lt;p&gt;&lt;img alt="My current symbol of easter" src="http://kiwifruit-the-blog.co.nz/images/Lindt%20Bunny.jpg" align="right" border="0" height="246" hspace="2" width="180"/&gt;I’m not so into this blog thing… Wonder if anyone ever even reads this stuff.&lt;/p&gt;
&lt;p&gt;Easter has come and gone, with a mild amount of chocolate digested. The birth of zombie jesus was remembered by some, for others, easter just brought an overwhelming amount of advertising about rabbits with eggs came into their lives.&lt;/p&gt;
&lt;p&gt;Anyway, latest and greatest is a dead hard drive(s), having lots of fun getting that going again. ddrescue to the…. rescue. Hopefully haven’t lost anything; recovered all of my boot drive, but another drive isn’t as lucky it seems, though its only stopped working after I fixed the other one!&lt;/p&gt;
&lt;p&gt;&lt;img alt="A slightly more screwed hdd" src="http://retroyakking.today.com/files/2009/01/coloureq3.jpg" align="left" height="166" hspace="2" vspace="2" width="142"/&gt;In other news; uni is always looming, hardly get any time free. Engineering mechanics is quite hard, and not the best taught subject around… Not sure how well that will come out in the end; calculus 2 is making alot more sense the second time around, probably a good thing, though it is a trudge, and I would much rather to be back in linear algebra. Engineering computation is quite easy, but I’m still getting a bit out of it, my C programming skills are less of a hodge podge, a few syntaxy things are now a heck of a lot clearer.&lt;/p&gt;
&lt;p&gt;Wish I had some pictures or something, this page is so bland…. (ok, added some, yay relevance)&lt;/p&gt;</description><link>http://daurnimator.com/post/97460201</link><guid>http://daurnimator.com/post/97460201</guid><pubDate>Sat, 18 Apr 2009 19:06:00 +1000</pubDate></item><item><title>Boxing Day Update</title><description>&lt;p&gt;Ok, well, the new linux install failed, couldn’t get it to boot from grub no matter what I did. Shall leave THAT problem for another day.&lt;/p&gt;

&lt;p&gt;In other news, I’ve finally replaced my iphone. It has been replaced by the lowly nokia 7210, and (to be delivered shortly) a sansa fuze.&lt;/p&gt;
&lt;p&gt;The Nokia 7210 SuperNova is quite a nice phone, and for only $159 (from AllPhones), its quite the bargain. Only a Series 40 phone, but thats all I need. Only thing I miss is wifi, I liked sshing in to my comp from random places :P Would now cost a fortune over gprs. I’ve already mistakenly clocked up $13.86 in GPRS charges, it seems that its $1.32 per something - more than a minute, and can’t be more than per 10KB….. Trying to figure out how to disable it permanently on the phone, and even get it barred on the carrier side. So far have found no relevant menu options :(&lt;/p&gt;
&lt;p&gt;With any luck, I’ll be able to get rockbox going on the fuze, but thats still to be delivered (and investigated).&lt;/p&gt;</description><link>http://daurnimator.com/post/66862990</link><guid>http://daurnimator.com/post/66862990</guid><pubDate>Fri, 26 Dec 2008 23:25:38 +1100</pubDate></item><item><title>Installation/FromLinux - Community Ubuntu Documentation</title><description>&lt;a href="https://help.ubuntu.com/community/Installation/FromLinux"&gt;Installation/FromLinux - Community Ubuntu Documentation&lt;/a&gt;: &lt;p&gt;Instead of burning a cd just to use it again in the same computer, I shall attempt to install linux from linux. This looks like an easy enough guide.&lt;/p&gt;</description><link>http://daurnimator.com/post/65114557</link><guid>http://daurnimator.com/post/65114557</guid><pubDate>Tue, 16 Dec 2008 18:25:57 +1100</pubDate></item><item><title>Installing Ubuntu 8.10</title><description>&lt;p&gt;I currently run Xubuntu that was once 7.10, then upgraded to 8.04.&lt;/p&gt;
&lt;p&gt;I’ve decided that while I’ve got nothing better to do, I’ll do a fresh install of ubuntu - the full version this time. Will also use the 64bit version, which I’ve been slightly hesitant to use before.&lt;/p&gt;
&lt;p&gt;I remember having all sorts of major driver issues every other time I’ve installed an operating system on this computer (I have some outdated pci cards); here’s hoping that they don’t come up again.&lt;/p&gt;
&lt;p&gt;I will keep my current xubuntu setup - and &lt;strike&gt;dual&lt;/strike&gt;,&lt;strike&gt;tri&lt;/strike&gt;,quad boot it (also have xp and osx86 installed). Now to try and find some room on my hdds (that are all full), looks like I’ll have to resize my current linux partition… yay, as least gparted makes it easy.&lt;/p&gt;</description><link>http://daurnimator.com/post/65114428</link><guid>http://daurnimator.com/post/65114428</guid><pubDate>Tue, 16 Dec 2008 18:24:53 +1100</pubDate></item><item><title>Sick days</title><description>&lt;p&gt;Yay, just as summer comes, and I’m ready to go out and do anything and everything, I get glandular fever. Hooray.&lt;/p&gt;
&lt;p&gt;Spose I was going to be inside anyway - I WAS going to get my wisdom teeth out now anyway (but they can’t, cause my throat is closed over!)&lt;/p&gt;
&lt;p&gt;Currently stuck on heavy painkillers, hoping it will go away by christmas.&lt;/p&gt;</description><link>http://daurnimator.com/post/64804060</link><guid>http://daurnimator.com/post/64804060</guid><pubDate>Mon, 15 Dec 2008 01:57:33 +1100</pubDate></item></channel></rss>

