| description | Planet SLUG - http://planet.slug.org.au/ |
|---|---|
| language | en |
| link | http://planet.slug.org.au/ |
http://buggy.id.au/2010/09/02/jquery-ui-sortable/
Recently I’ve been playing with a list of lists using the jQuery UI sortable component. Graphically it looks something like:
The HTML for this is pretty simple
<ul class="lists">
<li>
<h1>List 1</h1>
<ul id="list_1" class="list">
<li id="item_1">Item 1</li>
<li id="item_2">Item 2</li>
<li id="item_3">Item 3</li>
</ul>
</li>
<li>
<h1>List 2</h1>
<ul id="list_2" class="list">
<li id="item_4">Item 4</li>
<li id="item_5">Item 5</li>
<li id="item_6">Item 6</li>
</ul>
</li>
<li>
<h1>List 3</h1>
<ul id="list_3" class="list">
<li id="item_7">Item 7</li>
<li id="item_8">Item 8</li>
<li id="item_9">Item 9</li>
</ul>
</li>
</ul>
I want the user to be able to re-order the lists, the items in each list and move items from one list to another. 18 lines of Javascript later I had it handling this perfectly and displaying alerts telling me where items were moved to, the list they were in and if the lists were re-ordered.
$(function() {
$(".lists").sortable({
forcePlaceholderSized: true,
stop: function(event, ui) {
var list = ui.item.children('ul').attr('id').replace('list_', '');
window.alert('Moving list ' + list + ' to position ' + ui.item.index());
},
});
$(".list").sortable({
connectWith: ".list",
forcePlaceholderSized: true,
stop: function(event, ui) {
var item = ui.item.attr('id').replace('item_', '');
var list = ui.item.parent().attr('id').replace('list_', '');
window.alert('Moving item ' + item + ' to list ' + list + ' position ' + ui.item.index());
},
});
});
I love jQuery and jQuery UI.
http://jamespurser.com.au/blog/lca2011-mobile-foss-miniconf
Well it seems that my insanity knows no bounds. During the LCA2011 call for papers I had an idea for a mini conf based on the ever growing arena of FOSS based mobile systems.
It turns out that I'm not the only one interested in this :)
I got the okay a couple of days ago and today I was told that I could start talking about it. So the next step is going to be setting up the site for the miniconf and working out Call for Papers and so on.
W00t.
http://jamespurser.com.au/blog/android-market-still-closed-australian-paid-apps
Sigh, so close and yet so far.
This morning a message hit the Android Australia mailing list claiming that Australia had been added to the small list of countries that were allowed to sell Apps in the Android market.
Alas, it wasn't so. Instead it appears that Australias addition to the list was in error and we are still part of the great unwashed who are unable to take advantage of googles sales infrastructure.
Come on guys and gals at Google! You have an excellent product and people want to be able to take advantage of it, people are begging to be able to give you money via whatever cut you take via the marketplace, why are we being locked out? Why are you ensuring that those of us outside of the US/UK have to turn to iphone development to make our mark in the mobile world?
Sigh.
http://jamespurser.com.au/blog/iphone-open-australia-search-update
Just a quick update on the iphone version of the openaustralia search app:
House of Reps Search:
Currently hardcoded to search by postcode. Need to include a Picker so that people can choose how they search for their members, however, the Picker widget on the iPhone is hucking fuge! Seriously, the thing looks like something out your local hotels Pokie room.
Senate Search:
Nothing done here yet
Hansard Search:
While the general search functionality hasn't been touched yet, I've started working on the Rep related Hansard search, tends to crash right now, but still going :)
My Rep:
Nothing done as yet.
If you want to have a look at the horror that is my objective c then have a gander over here
http://bethesignal.org/blog/2010/09/01/best-scott-pilgrim-meta-review-ever/

Here’s what I’m saying: I’m a woman, I’m in my late thirties, I can’t handle first-person shooters, I’m afraid of Comic-Con, and I really, really liked Scott Pilgrim vs. The World.
I hope I’m not, you know, blowing your mind.
– Linda Holmes in her incredibly cool meta-film-review, ‘Scott Pilgrim’ Versus The Unfortunate Tendency To Review The Audience
http://horms.org/pleb_blossom/permalink/2010/2010-08-31T17_09_06.shtml
I'm going solo, working for myself at
Horms Solutions,
a boutique free and open source software consultancy.
http://bethesignal.org/blog/2010/08/31/the-naked-and-famous/
If your eclectic tastes include legendary modern music-as-art heroes such as Radiohead, MGMT, Florence and the Machine, Nine Inch Nails and How to Destroy Angels, you simply must check out upcoming New Zealand band The Naked and Famous.
Their debut album will be released in early September, but they’ve put out some mind-blowingly good singles already… here’s Young Blood:
Update: Okay, I can’t just link the one. Here are my other favourites so far…
https://jeremy.visser.name/2010/08/28/python-iview-in-a-flash/
At the beginning of this month, I gave a talk at the South Coast Linux Users Group called Python-iView in a flash. (Pun intended.)
While attending the talk would have given you the real deal, I’ve put my slides up for anybody who is interested.
I use SVG graphics in the presentation, and because Google and Mozilla can’t agree on a way to get transparent SVG working consistently, you’ll only see images if you use Google Chrome (sorry about that). It’s because I only get transparency in Chrome if I use <img />, but I only get SVG at all in Firefox if I use <object />.
http://soniahamilton.wordpress.com/2010/08/28/four-lions-great-film/
Great film – “Four Lions”.
It’s about four would-be Jihadists from England trying reach heaven by blowing something big up – eg the local chemist. The only problem is that these guys are stupid, out-and-out muppets - think suicide crow-bombs, guys eating (and choking on) their SIM card to “evade detection”, secret messages between animated puffins, idiots with Cornish accents arguing over who is “more Jihadi”, …
Seriously funny.
http://jamespurser.com.au/blog/open-australia-search-iphone-version
Okay, I finally decided to put bit to processor and start an iphone version of the Open Australia Search app that I've been writing for Android.
Now, my knowledge of Objective-C and apple development is miniscule, so what's up there now is just enough to build and present the "front view" off the app, but I've already had offers of help from people more experienced in this strange and esoteric environment so we'll see how we go.
Anyways, here's the source:
http://code.google.com/p/openaustraliasearch/
And here's the very, very rough design document I did on the train last night:
http://code.google.com/p/openaustraliasearch/wiki/DesignDocument
Oh and as gentle reminder for those of you with android devices, version 0.3.2 has been released. Use the QR Code below to install it:
http://jamespurser.com.au/blog/so-our-pariament-hung
If you, like me, have been bemoaning the general publics complete lack of knowledge about how the government works, then rejoice. For the hung parliament has made everyone sit up and say "huh?" At which point the edumacation starts.
The result from Saturdays election really has thrown everyone for a loop hasn't it. Instead of the predicted close call (let's face it, everyone thought that the Coalition would scrape it in by the skin of their teeth) we now have the prospect of a government cobbled together from either one of the major parties with the support of four, possibly five, relatively unknown men.
Exciting isn't it :)
What has been interesting has been the reaction to the idea of a true Coalition government (not the Liberal/National coalition, which lets face it, is essentially the Liberal party with a couple of Nationals hanging on for dear life). The media has gone completely ape poo over the idea. Predicting doom and disaster with great wailings and gnashing of teeths, while those that I've spoken to "on the street" seem to be loving it. Watching Gillard and Abbott have to completely change tack and start running what is essentially a mini-election has given people hope that the system isn't irretrievably broken.
I do find it kind of amusing to read and hear those who declare that because Tony Windsor, Bob Katter and Rod Oakshot are ex-nationals and so called "conservative" politicians that their only moral move would be to join the Coalition in government. This after all three have copped any amount of political crap from the Coalition in the past, especially from the Nationals. They seem to be forgetting that Katter, Windsor and Oakshot represent a Country Party that has long died off elsewhere, and indeed they represent a type of MP that is in very short supply, a true local representative.
For the next few weeks we will, as the old chinese curse goes, "be living in interesting times". Whether the big three will throw their lot in with the Coalition or Labor, the major parties have been put on notice that they can't take the electorate for granted any more. Change will have to occur if they wish to stem the tide of resentment and anger that has been building over the past fifteen to twenty years.
If they don't change they're going to be left behind and someone new will step in to fill their shoes.
That someone may just be the Greens. If any party could be said to have won the election, it's the Greens. When the new senate sits, they will be in control, their 9 senators putting them in prime position to ensure that any legislation that comes through the Senate will have to either meet with their approval, or that of the Coalition. This is the first time that the Greens have been in this position in the Federal parliament, and it will be interesting to see how they handle the power.
Of course it's not just in the Senate that the Greens will hold special sway. Thanks to the Labor party implosion, general disaffection with the majors and the retirement of Lindsay Tanner, the Greens were able to hold on to take the seat of Melbourne. This means that in this hung parliament they could have the power to make or break a government (especially if which every coalition is formed only hits 76 seats).
To tell you the truth, I'm not sure who's more worried.
http://www.technovelty.org/code/debug-info-symbols.html
In a previous post I mentioned split debugging info.
One addendum to this is how symbols are handled. Symbols are separate to debugging info (i.e. the stuff about variable names, types, etc you get when -g is turned on), but necessary for a good debugging experience.
You have a choice, however, of where you leave the symbol files. You can leave them in your shipping binary/library so that users who don't have the full debugging info available will still get a back-trace that at least has function names. The cost is slightly larger files for everyone, even if the symbols are never used. This appears to be what Redhat does with it's system libraries, for example.
The other option is to keep the symbols in the .debug files along-side the debug info. This results in smaller libraries, but really requires you to have the debug info files available to have workable debugging. This appears to be what Debian does.
So, how do you go about this? Well, it depends on what tools you're using.
For binutils strip, there is some asynchronicity between the --strip-debug and --only-keep-debug options. --strip-debug will keep the symbol table in the binary, and --only-keep-debug will also keep the symbol table.
$ gcc -g -o main main.c $ readelf --sections ./main | grep symtab [36] .symtab SYMTAB 00000000 000f48 000490 10 37 53 4 $ cp main main.debug $ strip --only-keep-debug main.debug $ readelf --sections ./main.debug | grep symtab [36] .symtab SYMTAB 00000000 000b1c 000490 10 37 53 4 $ strip --strip-debug ./main $ readelf --sections ./main.debug | grep symtab [36] .symtab SYMTAB 00000000 000b1c 000490 10 37 53 4
Of course, you can then strip (with no arguments) the final binary to get rid of the symbol table; but other than manually pulling out the .symtab section with objcopy I'm not aware of any way to remove it from the debug info file.
Constrast with elfutils; more commonly used on Redhat based system I think.
eu-strip's --strip-debug does the same thing; leaves the symtab section in the binary. However, it also has a -f option, which puts any removed sections during the strip into a separate file. Therefore, you can create any combination you wish; eu-strip -f results in an empty binary with symbols and debug data in the .debug file, while eu-strip -g -f results in debug data only in the .debug file, and symbol data retained in the binary.
The only thing to be careful about is using eu-strip -g -f and then further stripping the binary, and consequently destroying the symbol table, but retaining debug info. This can lead to some strange things in backtraces:
$ gcc -g -o main main.c
$ eu-strip -g -f main.debug main
$ strip ./main
$ gdb ./main
GNU gdb (GDB) 7.1-debian
...
(gdb) break foo
Breakpoint 1 at 0x8048397: file main.c, line 2.
(gdb) r
Starting program: /home/ianw/tmp/symtab/main
Breakpoint 1, foo (i=100) at main.c:2
2return i + 100;
(gdb) back
#0 foo (i=100) at main.c:2
#1 0x080483b1 in main () at main.c:6
#2 0x423f1c76 in __libc_start_main (main=Could not find the frame base for "__libc_start_main".
) at libc-start.c:228
#3 0x08048301 in ?? ()
Note one difference between strip and eu-strip is that binutils strip will leave the .gnu_debuglink section in, while eu-strip will not:
$ gcc -g -o main main.c $ eu-strip -g -f main.debug main $ readelf --sections ./main| grep debuglink [29] .gnu_debuglink PROGBITS 00000000 000bd8 000010 00 0 0 4 $ eu-strip main $ readelf --sections ./main| grep debuglink $ gcc -g -o main main.c $ eu-strip -g -f main.debug main $ strip main $ readelf --sections ./main| grep debuglink [27] .gnu_debuglink PROGBITS 00000000 0005d8 000010 00 0 0 4
http://www.hezmatt.org/~mpalmer/blog/general/my_hero.html
I just have to say that this bull is my hero. That is all.
http://www.mega-nerd.com/erikd/Blog/CodeHacking/DDC/llvm_milestone2.html
For a couple of weeks after AusHac 2010 I didn't manage to find any time to working on DDC at all, but I'm now back on it and late last week I reached the second milestone on the LLVM backend for DDC. The backend now has the ability to box and unbox 32 bit integers and perform simple arithmetic operations on valid combinations of them.
Disciple code that can currently be compiled correctly via LLVM includes basic stuff like:
identInt :: Int -> Int identInt a = a plusOneInt :: Int -> Int plusOneInt x = x + 1 addInt :: Int -> Int -> Int addInt a b = a + b addInt32U :: Int32# -> Int32# -> Int32# addInt32U a b = a + b addMixedInt :: Int32# -> Int -> Int addMixedInt a b = boxInt32 (a + unboxInt32 b) cafOneInt :: Int cafOneInt = 1 plusOne :: Int -> Int plusOne x = x + cafOneInt
where Int32# specifies an unboxed 32 bit integer and Int32 specifies the boxed version.
While writing the Haskell code for DDC, I'm finding that its easiest to generate LLVM code for a specific narrow case first and then generalize it as more cases come to light. I also found that the way I had been doing the LLVM code generation was tedious and ugly, invloving lots of concatenation of small lists. To fix this I built myself an LlvmM monad on top of the StateT monad:
type LlvmM = StateT [[LlvmStatement]] IO
Using this I can then generate a block of LLVM code as a list of LlvmStatements and add it to the monad using an addBlock function which basically pushes the blocks of code down onto a stack:
addBlock :: [LlvmStatement] -> LlvmM ()
addBlock code
= do state <- get
put (code : state)
The addBlock function is then used as the base building block for a bunch of more specific functions like these:
unboxInt32 :: LlvmVar -> LlvmM LlvmVar
unboxInt32 objptr
| getVarType objptr == pObj
= do int32 <- lift $ newUniqueReg i32
iptr0 <- lift $ newUniqueNamedReg "iptr0" (pLift i32)
iptr1 <- lift $ newUniqueNamedReg "iptr1" (pLift i32)
addBlock
[ Comment [ show int32 ++ " = unboxInt32 (" ++ show objptr ++ ")" ]
, Assignment iptr0 (GetElemPtr True objptr [llvmWordLitVar 0, i32LitVar 0])
, Assignment iptr1 (GetElemPtr True iptr0 [llvmWordLitVar 1])
, Assignment int32 (Load iptr1) ]
return int32
readSlot :: Int -> LlvmM LlvmVar
readSlot 0
= do dstreg <- lift $ newUniqueNamedReg "slot.0" pObj
addBlock [ Comment [ show dstreg ++ " = readSlot 0" ]
, Assignment dstreg (Load localSlotBase) ]
return dstreg
readSlot n
| n > 0
= do dstreg <- lift $ newUniqueNamedReg ("slot." ++ show n) pObj
r0 <- lift $ newUniqueReg pObj
addBlock [ Comment [ show dstreg ++ " = readSlot " ++ show n ]
, Assignment r0 (GetElemPtr True localSlotBase [llvmWordLitVar n])
, Assignment dstreg (Load (pVarLift r0)) ]
return dstreg
readSlot n = panic stage $ "readSlot with slot == " ++ show n
which are finally hooked up to do things like:
llvmVarOfExp (XUnbox ty@TCon{} (XSlot v _ i))
= do objptr <- readSlot i
unboxAny (toLlvmType ty) objptr
llvmVarOfExp (XUnbox ty@TCon{} (XForce (XSlot _ _ i)))
= do orig <- readSlot i
forced <- forceObj orig
unboxAny (toLlvmType ty) forced
When the code generation of a single function is complete it the list of LlvmStatement blocks is then retrieved, reversed and concatenated to produce the list of LlvmStatements for the function.
With the LlvmM monad in place converting DDC's Sea AST into LLVM code is now pretty straight forward. Its just a matter of finding and implementing all the missing pieces.
http://www.mega-nerd.com/erikd/Blog/FP-Syd/fp-syd-27.html
On Thursday August 12th, we held the 27th meeting of the Sydney Functional Programming group. The meeting was held at Google's Sydney offices and we had about 20 people show up to hear our two presenters.
First up we had Ben Lippmeier presenting the Haskell library REPA for doing high performance operations on regular, shape polymorphic, parallel arrays. Ben showed us some code for written with the REPA library. The interesting thing about the code was that even though REPA allows parallel execution on multiple cores, this parallel code is not vastly different from how someone would write the code to execute on a single code. Ben also provided some benchmarking figures comparing the multicore Haskell/REPA code performing well against single core code written in C.
Our second presenter for the evening was Simon Winwood who presented on the subject of the Template Haskell, which allows type safe, compile time meta programming. The need for templating in a powerful and flexible language like Haskell is obviously much less than in languages like C++, but still useful for some tasks like quasi-quotation. The mechanics of TH as such that it allows conversion between Haskell's concrete syntax and abstract syntax trees which can be manipulated by Haskell code. One downside of TH is that code relying on regularly breaks when new versions of the GHC compiler are released.
A big thanks to Ben and Simon for presenting and Google for providing the meeting venue and refreshments.
http://bethesignal.org/blog/2010/08/20/franklin-street-statement-pdf/
The Franklin Street Statement can be found on the web in the form of a fairly ugly blog post, which does not befit a document of such importance… and for that matter, neither does the printed form of that page.
I wanted a nice paper copy of the statement to put in a prominent position on my desk, and figured it would make sense to share my rendering. It may be an interesting thing to hand out at developer conferences or Software Freedom Day events.
The document is set in Free typefaces, Liberation Serif and League Gothic — appropriate, given that League is a wonderful Free alternative to Franklin Gothic! I know, I know, you see what I did there. Now… Download the Franklin Street Statement PDF!
Note: I wish the source ODF had survived the wrath of OpenOffice.org’s “eat my document” crash recovery feature, but at least the resulting PDF is fairly easy to edit.
http://soniahamilton.wordpress.com/2010/08/18/resetting-alom-password-on-solaris/
Or, after RTFM’ing, an easier way: SunDocs Recovering ALOM passwords:
~ ~ ~
Some notes on how to reset the ALOM password on Solaris (done on a VT240).
ALOM has sc> prompt. Get to OBP using “console -f”
OBP (Open Boot Prompt) has ok prompt. Get to ALOM using “#.”
Power switch has 4 positions: Normal (|), Locked (padlock), Diagnostics (wave), Forced Off (circle-bar). Ensure powerswitch is in Normal position.
Replace disks with disks from another system that has a known password, then boot. (Also, try a boot cd). At root prompt:
# cd /usr/platform/`uname -i`/sbin # ./scadm userpassword admin (set to default ie sun123) # #. (return to ALOM) sc>resetsc sc>poweroff -f
Remove power cords, return old hard disks, turn back on. These last steps aren’t necessary, but it’s good to check that the ALOM password has indeed been reset.
Some good links:
http://bethesignal.org/blog/2010/08/18/wired-tired-expired/
Glyn Moody pointed out an awful article written by Chris Anderson (of Long Tail infamy) and Michael Wolff, “The Web is Dead. Long Live the Internet”. It is almost Nick Carr-esque in its pursuit of overwrought claims with little to no basis in fact.
The lunacy of this article will resonate with anyone remotely connected with the technology industry, let alone those involved in software and web development.
But here are my favourite bits of abject cluelessness:

JavaScript then, Objective-C now? HTML then, XML now? What the fuck have you been smoking, Chris Anderson? … and don’t tell me it was some “junior staffer” subbing the living crap out of your stupid lack of perspective.

… and then this little gem to finish things off, ignoring years of evidence that we enjoy temporary dalliances with convenience before returning to (often quite) revolutionary openness:
The Internet is the real revolution, as important as electricity; what we do with it is still evolving. As it moved from your desktop to your pocket, the nature of the Net changed. The delirious chaos of the open Web was an adolescent phase subsidized by industrial giants groping their way in a new world. Now they’re doing what industrialists do best — finding choke points. And by the looks of it, we’re loving it.
I’ll make my own bold, unsubstantiated claim… Wired: Tired and expired.
Glad I have that off my chest. Thank you, ball boys.
* * *
Update: Check out this hilarious take-down from Boing Boing … with facts! … and analysis! … and pretty graphs!
http://chesterton.id.au/blog/2010/08/16/wordpress-nginx-admin/
I won’t go into too many details, I got everything I learned from google and my customisations aren’t very ground breaking.
Jdub tweeted about the wordpress apc object cache being updated. So I (re)installed that. I had it installed a while ago, but a wordpress upgrade broke it. http://wordpress.org/extend/plugins/apc/
Everyone knows about wp-super-cache, and there’s some good nginx recipes and discussions on the internet already about how to run the two together.
My blog isn’t very big, or updated very often, so I tried setting wp-super-cache to preload cache files once a day. Except after the first day, it seemed to get stuck and wouldn’t regenerate them. So now, it just generates (and compresses) them after the first visit and I’ve configured it so spiders can generate them, which isn’t the default. The cached files are set to expire after a day.
I’ve noticed recently that spiders are sometimes using the short url form ?p=100 rather than the long SEO style urls. With my nginx config, it won’t serve a super-cached file using the short url form. It won’t serve a super-cached file if the url has a ? in it.
This was new to me, a wordpress plugin called wp-minify. It’s an awesome idea. It combines multiple css (and, separately, js) links into one, minified version, and compresses and caches the result. So the browser only has to make one css get and one js get. Just helps pages load that little bit quicker. Good for the search engines, good for the users.
I set nginx to gzip text output, as well as look for a pre gzipped file first. So I basically ran:
for a in `find /www -name "*.js" -o -name "*.css" -o -name "*.html"`;do cat $a |gzip -c > $a.gz ;done
wp-recaptcha is a pain the bum when it comes to page load times, it slows the page display to one second. But it does a good job of stopping boring spam comments. auxesis suggested moving the <script src=…> to the end to the dom, which I’ve done, and that does help with the feel, it doesn’t reduce overall load time though. It’s just that I couldn’t find a good way to do it, and I’m going to have to merge my changes with every upgrade.
That’s about it I think, the name of the game was to decrease page load times.
http://bethesignal.org/blog/2010/08/15/packet-and-denby/

I mention in the video that it’ll end up being “like TweetDeck”. I breezed past that a tad too quickly — it’s definitely not going to be an HTML5 clone of TweetDeck! (Turns out they’re working on one of those already.)
Instead, it will take inspiration from the multi-column approach, but hopefully improve the user experience on a number of levels:
Please comment if you have any thoughts or suggestions… crimes committed by other Twitter clients, ideas for lovely web/desktop integration, and so on. Thanks!
* * *
Note that I’ve already had questions about StatusNet and identi.ca support. Thus far, they don’t have user streams, which was one of the main reasons behind building Denby. That said, it is entirely possible for the Denby server to poll the REST API (given that it already talks to Twitter’s) and send the results down the WebSockets tube… so, we’ll see.
Hmm. Perhaps this is the best way to build a user streams API for StatusNet anyway? The web app could send JSON messages to node.js, which could relay them to the intended users… via multiple protocols! Long-running HTTP, WebSockets, whatever. If anyone is inspired to do this, StatusNet could have a bi-directional WebSockets API before Twitter does!
* * *
Update: I made another quick video, showing a few improvements (including update bleeps — no chicken noises as yet), Denby in Firefox’s Prism environment, and sharing some thoughts about the web as a development platform. Enjoy!
On ABC 702 (Sydney radio) I heard the end comment by a guest on Richard Glover’s show. They likened the debate around the Australian National Broadband Network to the installation of electric power lines. It was quite interesting. Their comment … Continue reading 
http://www.hezmatt.org/~mpalmer/blog/general/anticlimax.html
This sounds exciting:
We think developers who want to work on the best, most dynamic, and most interesting open-source web technology project on the planet have no better place to work than here -
Fwowr, dynamic and interesting open-source web technology project! Sign me up!
working on Drupal.
That wasn't where I thought that was going. Those words obviously have very different meanings to different people. Never mind.
http://blog.corporatism.org/blog/2010/08/14/92/in_australia_from_178_to_169
It's a rather disorganised trip, and I know I've lost touch with many old friends, so send me an email (rob _at_ corporatism.org) or SMS me on +61434247158 and we'll see if we can meet up at some point. I'll be in Sydney for a little while at the start of the trip, and in Newcastle for a bit, but I'll probably travel up north for a couple of weeks. I'll be accompanied by Sophia.
https://jeremy.visser.name/2010/08/13/got-an-android/
This week, I got an Android phone. A Motorola Milestone, to be precise.
I’ve been looking at smartphones for a while, although not quite seriously up until now. In fact, I’m quite surprised with myself that I actually took the plunge and bought something.
Actually, the main push for me to get an Android phone was Dad, who wants me to get into app development. I initially held back because I like the concept and hackability of the Nokia N900 and the Maemo OS. Maemo uses a normal X11+GTK/Qt kind of stack, and is generally hacker friendly.
However, I don’t just want to hack for myself; I want to be able to release stuff, and if I do, I want people to be able to use it. Not only that, but with the merger of Maemo and Moblin becoming MeeGo, and the fact that MeeGo won’t be officially supported on the N900 creates furher turbulence and fractures where Android is still going strong.
The main selling point for me on the Milestone was the massive screen size, and the positive reviews of its screen size; both of which, in practice, have been fabulous. I was holding out for a glimpse of the HTC Wildfire pricing, but I decided I didn’t want a tiny 240×320 screen no matter how cheap it was.
The version I got was a UMTS 900/2100, which means it is not Next G compatible (which needs UMTS 850/2100). As I’m a Telstra user, that consequently means my coverage is not too crash hot. However, I could fix that simply by moving to Optus.
I’m not going to write a full-on review of the phone — there are plenty out there already. Any more you hear from me about this phone will be something I’ve hacked up for, hopefully, you to try.
http://www.fooishbar.org/blog/tech/lca/cfpclosing-2010-08-13-13-12.html
Just a reminder that the linux.conf.au 2011 call for papers is closing THIS SATURDAY, 14th August! If you haven't already submitted your talk, get in now while you still can ...
http://jamespurser.com.au/blog/conferences-speakers-and-lightning-talks-oh-my
Just a quick note to let you, dear reader, know a couple of things:
LCA2011 Paper Submissions
The traditional extension to the linux.conf.au paper submission process is going to close at the end of tomorrow (14th August 2010). So if you've got any last minute brain waves or inspirations get in quick.
LGWN10
For the second year in a row I'm going to be helping out with the audio recordings and general organisation of the Local Government Web Network Conference.
LGWN10 represents the only (as far as I know) grass roots conference aimed specifically at those working with the web from within the Local Government sector. It's constantly evolving and this year the morning sessions have been dedicated to four Local Government case studies, ranging from metro Councils such as Pittwater (who's going to be talking about how they pitched the use of Social Media to their senior management) to regional Councils such as Tamworth (who will be walking us through their migration from an eggs in one basket portal site policy to a more flexible online presence policy).
All in all it's going to be an excellent conf :)
http://chesterton.id.au/blog/2010/08/13/mysql-admin/
Many years ago, I was a rabid (vapid?) PostgreSQL fanboi. I took the time to study how to tune postgres, it was very rewarding to see queries go from taking 30 seconds, to completing in under a second. This involved tuning knobs in the prostres config, to adding indexes. All done manually.
If some software would only work on mysql, I wouldn’t bother looking at it.
A few years ago I wanted to run WordPress on my Linode, I gave up my extremist software bias, and uninstalled postgres, and installed mysql. To tune it, I picked one of the three or four my.cnf files provided. And that was that. Although I gave up postgres for mysql, I showed it no love.
During my recent webserver admin gorge, I came across a shell script that would help you tune mysql’s knobs. Most knobs weren’t even mentioned in my my.cnf file, so were at the default. I found much delight in it telling me to raise this, and lower that. In the end, I ended up with mysql using about the same amount of memory, but much more efficiently, by using more memory here where required, and using less memory there where not needed.
The script is called tuning-primer.sh and can be found at http://www.day32.com/MySQL/.
It took me many days to tune my mysql databases, run the script, adjust knobs, restart mysql, let it run for a day or two, and repeat. It turns out some knobs don’t need adjusting until other knobs are adjusted first, so you can’t get it right the first go. Plus I was quite cautious in how much I would adjust a knob.
There’s also another script I haven’t yet looked at called mysqltuner.pl, google will hook you up.
And here’s some music I’ve been enjoying lately from Sia, (an adelaide girl) her live performances are better than her albums. Sia – Soon We’ll Be Found (Letterman)
http://certifiedwaif.livejournal.com/385820.html
At USyd, we did all our stats in R. Now I'm working at the Department of Health, and we do most of our stats in SAS. SAS is pretty different to R, and so I've needed to work hard to try to learn it.
This is a rite of passage that most trainee biostatisticians go through, and so people have shoved various books into my hands to help me get up to speed. I'll omit the names of many of the books to protect the guilty, but the most useful book someone pressed innto my hands was The Little SAS Book, which I read cover to cover in two sittings.
The Little SAS Book is more technical than the others, hence more suitable for programmers, and actually gives you an inkling of what the designers of the language were thinking. That's helped me begin to think in the language, which is something none of the other books have helped me to do.
The best comparison I can come up with for now is that SAS is like German, whereas R is like Japanese. SAS has lots of compound statements, each of which does a lot, while R has many small statements which each do a little bit. So would you like to be able to speak German or Japanese? The correct answer is, of course, both, each at the appropriate time :)
http://jamespurser.com.au/blog/thoughts-train-dawn-chorus
Well, it's ten to seven in the morning, and I'm on the train to Sydney so I thought I would put some thoughts down.
Ding dong the witch is dead, or is she?
Last week, the Coalition finally announced their position on the Labor party's mandatory ISP filter, stating that they would oppose it or scrap it depending on whether they won or lost the election. This caused much celebration and crowing on the twitters, with many declaring the filter proposal dead, buried and cremated. "Huzzah!" they declared, "the witch is dead!".
Except of course the witch isn't dead yet.
All of those celebrating today seem to have forgotten their recent history. The filter proposal that the Labor party took to the 2007 election was an opt-in model with a much tighter purview, it was only after the election that it expanded to the beast we see today. Given that the Coalition is the party that brought the phrase "Non-core promise" to the national language, what insurance do we have that the Coalition won't change their mind after the election?
I'm going to hold off on the dancing in the streets.
Mark Latham - This elections WTF
Seriously, channel 9, do you even care about being taken seriously anymore?
There was an excellent question in last nights Q and A to Julia Gillard:
"How big a tool do you think that Mark Latham is?"
To which Julia Gillard answered reasonably well:
"There are some things that just can't be measured"
If 9 had any journalistic integrity left whatsoever they would be giving Latham the bums rush as soon as possible.
Family First - A tale of two candidates
Well hasn't the Family First twitter mess been interesting. Wendy Francis, Family First senate candidate for Queensland posted several tweets indicating that she thought that legalising gay marriage was tantamount to legalising child abuse. After copping a huge amount of flack, she pulled the tweets, but then gave an interview in which she stood by the statements and in fact went further, comparing the children of gay parents to the aboriginal stolen generation.
It went all down hill from there.
The national president of Family First tried to claim that a staffer posted the tweet, then Wendy denied that, stating she had posted it. Then of course the news had emerged that Family First had disendorsed a candidate for repudiating the views that Wendy Francis had been espousing.
Remember folks, these are the people that the Liberal party has deemed to be worthy of their first preference in the senate.
Well I'm about to hit the no signal zone so I'll sign off for now.
http://jamespurser.com.au/blog/sunday-morning-rant
Okay, it's Sunday morning, I have a coffee in hand and I haven't had a chance to blog lately, so here we go:
This election has officially jumped the shark
That's it, this election is officially a joke. Neither party is offering significantly different policies, the media seems to be more concerned about the Days of Our Lives that is the Labor leadership squabble, and now we have channel 9 bringing Mark bloody Latham into the mix as a "guest journalist"
The only real spark of interest has been watching the twitter stream when people start to have a go at the journo's for being more concerned about Rudd and Gillard than the policies the parties are putting out. I've read many complaints about how much each party is controlling their various media packs, however it takes two to tango. The media is meant to be there to hold the parties up to the light, not help them keep mushrooming the populace.
Waving Away
I've already written about this on my wave blog, however I'll mention it here as well: If Google doesn't feel it can support the development of the Wave and associated technologies then it needs to hive them off into something similar to the Apache Foundation.
The Island of Doctor Nauru
Are we so seriously damaged as a country that we can actually think that prison camps on an island as far from anywhere as possible is an acceptable solution for such a small problem as boat borne asylum seekers? Did we learn nothing from the last time this was attempted? Yeesh.
Oh and Labor you're not getting out of this one scott free. East Timor?!? If you want to help out the East Timorese economy why not give a bit on the whole oil and gas fields thing. You know, something that might actually create jobs and build an economy?
LCA2011 Miniconf Submitted
Last night I submitted the following miniconf idea to linux.conf.au:
Where the "Year of Linux on the Desktop" was always a pipe dream, and indeed has become a by word for the triumph of hope over experience, the last three years has seen the rise of FOSS on your phone.
With Google, Nokia and HP now operating fully open development platforms (including Core OS development in the case of Google and Nokia) the time has never been better for FOSS development on what is already becoming THE ubiquitous computing platform.
This miniconf would explore the FOSS mobile development landscape, from the tools available, to the platforms themselves and future plans.
LGWN10
Coming up in just over a week is the best Local Government Web Conference in Australia. I'm helping out that irrepressible foodie Reem Abdelaty by doing the audio recordings and general dogs bodying. It's going to be a blast and I love the fact that we're getting people together who have a real interest in moving their local governments towards technologies that can assist both them and their constituents.
Determining Demand
Just one more for the morning. I'm wondering if the Coalition will use the same method for determining hospital and education demand in the future as they seem to be using for the NBN. Malcolm Turnbull said yesterday that there is currently not enough demand for 100Mb/s broadband in Australia to justify building the NBN. By that reckoning, we should only fund education and hospitals to support current levels, because the future holds absolutely no change.
Sigh.
http://blog.gingertech.net/2010/08/07/websrt-and-html5-media-accessibility/
On 23rd July, Ian Hickson, the HTML5 editor, posted an update to the WHATWG mailing list introducing the first draft of a platform for accessibility for the HTML5 <video> element. The platform provides for captions, subtitles, audio descriptions, chapter markers and similar time-synchronized text both in-band (inside the video resource) and out-of-band (as external text files). Right now, the proposal only regards <video>, but I personally believe the same can be applied to the <audio> element, except we have to be a bit more flexible with the rendering approach. Anyway…
What I want to do here is to summarize what was introduced, together with the improvements that I and some others have proposed in follow-up emails, and list some of the media accessibility needs that we are not yet dealing with.
For those wanting to only selectively read some sections, here is a clickable table of contents of this rather long blog post:
The first and to everyone probably most surprising part is the new file format that is being proposed to contain out-of-band time-synchronized text for video. A new format was necessary after the analysis of all relevant existing formats determined that they were either insufficient or hard to use in a Web environment.
The new format is called WebSRT and is an extension to the existing SRT SubRip format. It is actually also the part of the new specification that I am personally most uncomfortable with. Not that WebSRT is a bad format. It’s just not sufficient yet to provide all the functionality that a good time-synchronized text format for Web media should. Let’s look at some examples.
WebSRT is composed of a sequence of timed text cues (that’s what we’ve decided to call the pieces of text that are active during a certain time interval). Because of its ancestry of SRT, the text cues can optionally be numbered through. The content of the text cues is currently allowed to contain three different types of text: plain text, minimal markup, and anything at all (also called “metadata”).
In its most simple form, a WebSRT file is just an ordinary old SRT file with optional cue numbers and only plain text in cues:
1 00:00:15.00 --> 00:00:17.95 At the left we can see... 2 00:00:18.16 --> 00:00:20.08 At the right we can see the... 3 00:00:20.11 --> 00:00:21.96 ...the head-snarlers
A bit of a more complex example results if we introduce minimal markup:
00:00:15.00 --> 00:00:17.95 A:start Auf der <i>linken</i> Seite sehen wir... 00:00:18.16 --> 00:00:20.08 A:end Auf der <b>rechten</b> Seite sehen wir die.... 00:00:20.11 --> 00:00:21.96 A:end <1>...die Enthaupter. 00:00:21.99 --> 00:00:24.36 A:start <2>Alles ist sicher. Vollkommen <b>sicher</b>.
and add to this a CSS to provide for some colors and special formatting:
::cue { background: rgba(0,0,0,0.5); }
::cue-part(1) { color: red; }
::cue-part(2, b) { font-style: normal; text-decoration: underline; }
Minimal markup accepts <i>, <b>, <ruby> and a timestamp in <>, providing for italics, bold, and ruby markup as well as karaoke timestamps. Any further styling can be done using the CSS pseudo-elements ::cue and ::cue-part, which accept the features ‘color’, ‘text-shadow’, ‘text-outline’, ‘background’, ‘outline’, and ‘font’.
Note that positioning requires some special notes at the end of the start/end timestamps which can provide for vertical text, line position, text position, size and alignment cue setting. Here is an example with vertically rendered Chinese text, right-aligned at 98% of the video frame:
00:00:15.00 --> 00:00:17.95 A:start D:vertical L:98% 在左边ć‘们可以看ĺ°... 00:00:18.16 --> 00:00:20.08 A:start D:vertical L:98% 在右边ć‘们可以看ĺ°... 00:00:20.11 --> 00:00:21.96 A:start D:vertical L:98% ...捕蝇草械. 00:00:21.99 --> 00:00:24.36 A:start D:vertical L:98% 一ĺ‡é˝ĺ®‰ĺ…¨. 非常地安全.
Finally, WebSRT files can be authored with abstract metadata inside cues, which practically means anything at all. Here’s an example with HTML content:
00:00:15.00 --> 00:00:17.95 A:start <img src="pic1.png"/>Auf der <i>linken</i> Seite sehen wir... 00:00:18.16 --> 00:00:20.08 A:end <img src="pic2.png"/>Auf der <b>rechten</b> Seite sehen wir die.... 00:00:20.11 --> 00:00:21.96 A:end <img src="pic3.png"/>...die <a href="http://members.chello.nl/j.kassenaar/ elephantsdream/subtitles.html">Enthaupter</a>. 00:00:21.99 --> 00:00:24.36 A:start <img src="pic4.png"/>Alles ist <mark>sicher</mark>.<br/>Vollkommen <b>sicher</b>.
Here is another example with JSON in the cues:
00:00:00.00 --> 00:00:44.00
{
slide: intro.png,
title: "Really Achieving Your Childhood Dreams" by Randy Pausch,
Carnegie Mellon University, Sept 18, 2007
}
00:00:44.00 --> 00:01:18.00
{
slide: elephant.png,
title: The elephant in the room...
}
00:01:18.00 --> 00:02:05.00
{
slide: denial.png,
title: I'm not in denial...
}
What I like about WebSRT:
Where I think WebSRT still needs improvements:
Note that I undertook some experiments with an alternative format that is XML-based and called WMML to gain most of these insights and determine the advantages/disadvantages of a xml-based format. The foremost advantage is that there is no automatism with newlines and displayed new lines, which can make the source text file more readable. The foremost disadvantages are verbosity and that there needs to be a simple encoding step to remove all encapsulating header-type content from around the timed text cues before encoding it into a binary media resource.
Now that we have a timed text format, we need to be able to associate it with a media resource in HTML5. This is what the <track> element was introduced for. It associates the timestamps in the timed text cues with the timeline of the video resource. The browser is then expected to render these during the time interval in which the cues are expected to be active.
Here is an example for how to associate multiple subtitle tracks with a video:
<video src="california.webm" controls>
<track label="English" kind="subtitles" src="calif_eng.wsrt" srclang="en">
<track label="German" kind="subtitles" src="calif_de.wsrt" srclang="de">
<track label="Chinese" kind="subtitles" src="calif_zh.wsrt" srclang="zh">
</video>
In this case, the UA is expected to provide a text menu with a subtitle entry with these three tracks and their label as part of the video controls. Thus, the user can interactively activate one of the tracks.
Here is an example for multiple tracks of different kinds:
<video src="california.webm" controls>
<track label="English" kind="subtitles" src="calif_eng.wsrt" srclang="en">
<track label="German" kind="captions" src="calif_de.wsrt" srclang="de">
<track label="French" kind="chapter" src="calif_fr.wsrt" srclang="fr">
<track label="English" kind="metadata" src="calif_meta.wsrt" srclang="en">
<track label="Chinese" kind="descriptions" src="calif_zh.wsrt" srclang="zh">
</video>
In this case, the UA is expected to provide a text menu with a list of track kinds with one entry each for subtitles, captions and descriptions through the controls. The chapter tracks are expected to provide some sort of visual subdivision on the timeline and the metadata tracks are not exposed visually, but are only available through the JavaScript API.
Here are several ideas for improving the <track> specification:
This is where we take an extra step and move to a uniform handling of both in-band and out-of-band timed text tracks. Futher, a third type of timed text track has been introduced in the form of a MutableTimedTrack – i.e. one that can be authored and added through JavaScript alone.
The JavaScript API that is exposed for any of these track type is identical. A media element now has this additional IDL interface:
interface HTMLMediaElement : HTMLElement {
...
readonly attribute TimedTrack[] tracks;
MutableTimedTrack addTrack(in DOMString label, in DOMString kind,
in DOMString language);
};
A media element thus manages a list of TimedTracks and provides for adding TimedTracks through addTrack().
The timed tracks are associated with a media resource in the following order:
The IDL interface of a TimedTrack is as follows:
interface TimedTrack {
readonly attribute DOMString kind;
readonly attribute DOMString label;
readonly attribute DOMString language;
readonly attribute unsigned short readyState;
attribute unsigned short mode;
readonly attribute TimedTrackCueList cues;
readonly attribute TimedTrackCueList activeCues;
readonly attribute Function onload;
readonly attribute Function onerror;
readonly attribute Function oncuechange;
};
The first three capture the value of the @kind, @label and @srclang attributes and are provided by the addTrack() function for MutableTimedTracks and exposed from metadata in the binary resource for in-band tracks.
The readyState captures whether the data is available and is one of “not loaded”, “loading”, “loaded”, “failed to load”. Data is only availalbe in “loaded” state.
The mode attribute captures whether the data is activate to be displayed and is one of “disabled”, “hidden” and “showing”. In the “disabled” mode, the UA doesn’t have to download the resource, allowing for some bandwidth management.
The cues and activeCues attributes provide the list of parsed cues for the given track and the subpart thereof that is currently active.
The onload, onerror, and oncuechange functions are event handlers for the load, error and cuechange events of the TimedTrack.
Individual cues expose the following IDL interface:
interface TimedTrackCue {
readonly attribute TimedTrack track;
readonly attribute DOMString id;
readonly attribute float startTime;
readonly attribute float endTime;
DOMString getCueAsSource();
DocumentFragment getCueAsHTML();
readonly attribute boolean pauseOnExit;
readonly attribute Function onenter;
readonly attribute Function onexit;
readonly attribute DOMString direction;
readonly attribute boolean snapToLines;
readonly attribute long linePosition;
readonly attribute long textPosition;
readonly attribute long size;
readonly attribute DOMString alignment;
readonly attribute DOMString voice;
};
The @track attribute links the cue to its TimedTrack.
The @id, @startTime, @endTime attributes expose a cue identifier and its associated time interval. The getCueAsSource() and getCueAsHTML() functions provide either an unparsed cue text content or a text content parsed into a HTML DOM subtree.
The @pauseOnExit attribute can be set to true/false and indicates whether at the end of the cue’s time interval the media playback should be paused and wait for user interaction to continue. This is particularly important as we are trying to support extended audio descriptions and extended captions.
The onenter and onexit functions are event handlers for the enter and exit events of the TimedTrackCue.
The @direction, @snapToLines, @linePosition, @textPosition, @size, @alignment and @voice attributes expose WebSRT positioning and semantic markup of the cue.
My only concerns with this part of the specification are:
The third part of the timed track framework deals with how to render the timed text cues in a Web page. The rendering rules are explained in the HTML5 rendering section.
I’ve extracted the following rough steps from the rendering algorithm:
To overcome security concerns with this kind of direct rendering of a CSS box into the Web page where text comes potentially from a different and malicious Web site, it is required to have the cues come from the same origin as the Web page.
To allow application of a restricted set of CSS properties to the timed text cues, a set of pseudo-selectors was introduced. This is necessary since all the CSS boxes are anonymous and cannot be addressed from the Web page. The introduced pseudo-selectors are ::cue to address a complete cue CSS box, and ::cue-part to address a subpart of a cue CSS box based on a set of identifiers provided by WebSRT.
I have several issues with this approach:
We’ve made huge progress on accessibility features for HTML5 media elements with the specifications that Ian proposed. I think we can move it to a flexible and feature-rich framework as the improvements that Henri, myself and others have proposed are included.
This will meet most of the requirements that the W3C HTML Accessibility Task Force has collected for media elements where the requirements relate to accessibility functionality provided through alternative text resources.
However, we are not solving any of the accessibility needs that relate to alternative audio-visual tracks and resources. In particular there is no solution yet to deal with multi-track audio or video files that have e.g. sign language or audio description tracks in them – not to speak of the issues that can be introduced through dealing with separate media resources from several sites that need to be played back in sync. This latter may be a challenge for future versions of HTML5, since needs for such synchoronisation of multiple resources have to be explored further.
In a first instance, we will require an API to expose in-band tracks, a means to control their activation interactively in a UI, and a description of how they should be rendered. E.g. should a sign language track be rendered as pciture-in-picture? Clear audio and Sign translation are the two key accessibility needs that can be satisfied with such a multi-track solution.
Finally, another key requirement area for media accessibility is described in a section called “Content Navigation by Content Structure”. This describes the need for vision-impaired users to be able to navigate through a media resource based on semantic markup – think of it as similar to a navigation through a book by book chapters and paragraphs. The introduction of chapter markers goes some way towards satisfying this need, but chapter markers tend to address only big time intervals in a video and don’t let you navigate on a different level to subchapters and paragraphs. It is possible to provide that navigation through providing several chapter tracks at different resolution levels, but then they are not linked together and navigation cannot easily swap between resolution levels.
An alternative might be to include different resolution levels inside a single chapter track and somehow control the UI to manage them as different resolutions. This would only require an additional attribute on text cues and could be useful to other types of text tracks, too. For example, captions could be navigated based on scenes, shots, coversations, or individual captions. Some experimentation will be required here before we can introduce a sensible extension to the given media accessibility framework.
http://chesterton.id.au/blog/2010/08/07/web-server-admin/
I recently swapped over from lighty to nginx, and man, am I glad I did. I have no idea about the internals, which is faster, lighter, better, etc, but nginx is way more intuitive to configure. Which in the end means my server is set up better.
That kick started my latest obsession, speeding up web servers.
I might go into details in a later post, but first, a question. I’ve got my wordpress blog loading nice and quick, except for pages where you can leave a comment, the recaptcha pluggin slows down the display of the page to 1 second. Obviously this is unacceptable. 1 SECOND!!!!!
What I would like is a “leave a comment” link to be displayed at the end of the post or comments, and clicking it would load the comment box with the recaptcha.
Any ideas how I would go about it?
I’ve tried css tricks to hide divs, but the javascript and images still load and hold up the display of the page, even though they aren’t (immediately) displayed. Annoying.
http://horms.org/pleb_blossom/permalink/2010/2010-08-06T11_54_25.shtml
I will be in Boston next week to give a presentation on
Network Bandwidth Control in Virtualized Environments at
LinuxCon
and attend the related mini-summits. Its been a while
since I've attended an event in North America, I'm looking forward to it.
http://www.mega-nerd.com/erikd/Blog/CodeHacking/Geany/gedit_geany.html
After effectively giving up on Nedit, my text editor of choice for the last fifteen years, I gave Gedit a serious try.
For a full two weeks, I stuck with Gedit, including the intense 2½ day hacking session of AusHac2010. Unfortunately, switching from a very full featured editor like Nedit to Gedit was painful. There were a bunch of features that I had grown used to that were just absent or inconvienient in Gedit. The problem is that Gedit aims to be a relatively full featured programmer's editor while still being the default easy-to-use editor in GNOME. As far as I am concerned, these two aims are in conflict, making Gedit an adequate simple text editor and a poor editor for advanced coders.
After butting my head against basic usability issues with Gedit I was even considered either modifying it extensively using plugins or maybe even forking it and maintaining a forked version. Yes, that would be a huge pain in the neck, but fortunately that will not now be necessary.
In response to my blog post titled "R.I.P. Nedit" fellow Haskell hacker and Debian Haskell Group member Joachim Breitner suggested I have a look at the Geany text editor and IDE.
Geany is obviously a tool aimed squarely as an editor for full time, committed programmers. Its also much more than just an editor, in that it has many features of an IDE (Integrated Development Environment). In fact, when I first fired it up it looked like this (click for a larger view):
On seeing this I initially thought Geany was not for me. Fortunately I found that the extra IDE-like features can easily be hidden, providing me with a simple-to-use, highly configurable, advanced text editor. The features I really like are:
There are still a few little niggles, but nothing like the pain I experienced trying to use Gedit. For instance, when run from the command line, Geany will open new files in a tab of an existing Geany instance. With multiple desktop workspaces, this is sub optimal. It would be much nicer if Geany would start a new instance if there was not already an instance running on the current workspace. After a brief inspection of the Gedit sources (Gedit has the desired feature), I came up with a fix for this issue which I will be submitting to the Geany development mailing list after a couple of days of testing.
Another minor issue (shared with Gedit) is that of fonts. Nedit uses bitmap fonts while Geany (and Gedit) use TrueType fonts. When I choose light coloured fonts on a black background I find the fonts in Geany (and Gedit) a lot fuzzier than the same size fonts in Nedit. I've tried a number of different fonts including Inconsolata but I've currently settled on DejaVu Sans Mono although I'm not entirely satisfied.
Currently my Geany setup (editing some Haskell code) looks like this:
Light text on a black background with highlighting using a small number of colours; red for types, green for literals, yellow for keywords etc.
Geany is a great text editor. For any committed coders currently using either Nedit or Gedit and not entirely happy, I strongly recommend that you give Geany a try.
http://horms.org/pleb_blossom/permalink/2010/2010-07-29T17_16_17.shtml
I have released version 1.19-rc3 of Perdition. This release fixes several problems. Perhaps most significantly, Thunderbird 3.1 can now re-connect to perdition SSL/TLS.
The code and related libraries are available as tarballs
here.
More information is available in the announcement email.
More information about perdition here.
http://horms.org/pleb_blossom/permalink/2010/2010-07-29T14_01_27.shtml
I have released version 2.0.2 of kexec-tools. the user-space portion of kexec a soft-reboot and crash-dump facility of Linux and Xen.
There are changes since 2.0.2-rc1.
The code is available as a tarball here and in git here.
More information is available in the announcement email.
kexec-tools recently moved, so the URLs above are new.
http://horms.org/pleb_blossom/permalink/2010/2010-07-29T12_23_52.shtml
My home page and blog have moved. The new locations are:
http://users.heimic.net/michaelf/2010/07/28/first-time-for-everything/
I lost my mobile last week, and unfortunately nobody handed it in. I believe I lost it outside of work in public area. Lots of foot traffic, but nobody seems to have handed in the phone.
Like they say, first time for everything. First time I have ever lost a mobile phone ever. Not overly happy, but what can you do. So iPhone 3GS is no more. It’s gone.
Now delegated to using a Nokia E71 until the completion of the contract. Oh well. The iPhone has since become a brick to whom ever found it, as it has been provider blocked by the code of the phone.
http://www.mega-nerd.com/erikd/Blog/CodeHacking/rip_nedit.html
For serious programmers, the text editor they user is an intensely personal thing. Try suggesting to an Emacs user that they should switch to Vim or vice-versa. Most would shudder at the thought.
My choice of editor for the last 15 years has been Nedit, the Nirvana Editor. Nedit has been an outstanding editor; feature full yet easy to use. When I first started using it, Nedit was a closed source binary-only download but sometime in the late 1990s, it was released under the GNU GPL.
Unfortunately Nedit has been suffering from bit rot and neglect for a number of years. The main problem is that it uses the Motif widget toolkit. For open source, there are basically two options for Motif; Lesstif, an LGPL reimplementation of Motif which has been basically unmaintained for a number of years, or OpenMotif released under a license which is in no way OSI approved. On top of that, Nedit still doesn't support UTF-8, mainly because Lesstif doesn't support it.
I have, in the past, tried to fix bugs in Nedit, but the bugs are not really in Nedit itself, but in an interaction between Nedit whichever Motif library it is linked against and the underlying X libraries. Depending on whether Nedit is linked against Lesstif and OpenMotif, Nedit will display different sets of bugs. I have tried fixing bugs in Nedit linked against Lesstif, but got absolutely nowhere. Lesstif is one of the few code bases I have ever worked on that I was completely unable to make progress on.
With Nedit getting flakier with each passing year I finally decided to switch to a new editor. I had already discounted Emacs and Vim; switching from Nedit to either of those two archaic beasts was going to be way too painful. Of all the FOSS editors available, Gedit seemed to be the closest in features to Nedit.
Unfortunately, Gedit does not compare well with Nedit feature wise. To me it seems to try to be simultaneously as simple as possible and to have as many features as possible and the features don't seem to fit together all that well from a usability point of view. On top of that, it lacks the following:
On top of that Gedit could also do with some improved key bindings and some improvements to its syntax highlighting patterns. The Ocaml syntax highlighting is particularly poor.
I'm now going to try to use Gedit, by customising its setup and and using the plugin system to see if I can regain the features that made Nedit such a pleasure to use.
http://www.mega-nerd.com/erikd/Blog/FP-Syd/fp-syd-26.html
On Thursday July 15th, we held the 26th meeting of the Sydney Functional Programming group. The meeting was held at Google's Sydney offices and we had 18 people show up to hear our two presenters.
First up we had your correspondent (thats me) with a presentation titled An LLVM Backend for DDC. This presentation covered the problems with the current C backend, gave a description of LLVM, the options for using LLVM from Haskell, why the LLVM code from GHC was chosen and how if fits into the DDC compile pipeline. Finally I demoed the very wonderful LLVM CGI script which allows you to enter a small C program and view the LLVM output.
Our second presenter for the evening was Eric Willigers who presented on the subject of the ATS programming langauge. ATS is interesting because it offers functional programming with an advanced type system with things like dependent types and linear types but has excellent performance as shown on the Computer Language Benchmarks Game. Eric was able to demonstrate dependent types on a couple of list operations which certainly showed some of the promise of dependent types. ATS certainly does seem interesting but also seems to lack quite a bit of polish.
A big thanks to Eric for presenting and Google for providing the meeting venue and refreshments.
http://www.advogato.org/person/robertc/diary.html?start=153
No, not the bzr switch… rather the book : http://www.amazon.com/Switch-Change-Things-When-Hard/dp/0385528752
Read it, its solid.
http://openskills.blogspot.com/2010/07/smalltalk-portability-sport-and-grease.html
There are many dialects of Smalltalk. The implementation of the language is very similar in them all (partly thanks to the ANSI standard), but it's not exactly the same. The differences mean that a library or application written using one Smalltalk dialect can not simply be loaded/compiled and run in another.
http://jamespurser.com.au/blog/thoughts-train-throsby-my-really-really-safe-seat
I live in the federal seat of Throsby, which encompasses a fair chunk of the Wollongong and Shellharbour LGA's and reaches into the Southern Highlands. Created in 1984, it has only had two representatives in the 36 years of its existance, both Labor. It is what could be called the stereotypical safe seat with Labor sitting on a 16.5% margin and a very large rusted on voting base.
Politically this means that Throsby tends to be used to parachute in Labor candidates, is usually at the back of the line when it comes to election sweeteners and generally gets put waaaay down the priority list for the other parties.
Just a quick aside - I'm sooo not a fan of the head office selecting candidates model that the ALP and others use. While Jennie George has proven herself to be a good representative for the region and the Labor Candidate Stephen Jones is proving that he's treating the campaign seriously, the idea that the rank and file should be overridden so easily just doesn't sit right with me.
Anyway, back onto topic.
Part of what makes Throsby a safe Labor seat is the attitude of the other parties to trying to capture it. It's a vicious circle - it's a safe Labor seat so we won't waste money on trying to capture it, so it continues to be a safe Labor seat. Oh they'll put up candidates, because they can't be seen to be dropping the seat altogether, but the campaigns are usually limp to non-existent, leaving most people to wonder who the hell it is that is looking out at them from the ballot paper.
Take for example the Nationals candidate for Throsby, Alan Hay. The only information I could find on him came from the nationals own website (he's listed under NSW candidates). From what it looks like there isn't even a brochure site for him, hell, he doesn't even rate his own page on the Nationals website.
The Liberal candidate, Juliet Arkwright at least warrants her own page on the Liberals web site, but they seem to have forgotten what she looks like, and if you want to contact her, you apparently need to go via the Liberal party offices in Sydney.
Peter Moran, the Greens candidate, also gets his own page , no, the woman dominating that page isn't the candidate for Throsby, no matter what the site says. She's Lee Rhiannon, a senate candidate and obviously more important when it comes to getting elected than Peter Moran. However if you persevere and scroll down you will actually find content from Peter himself.
Before I finish, I would like to point out that the one who seems to be doing the most work to take the seat is the one who probably needs to put in the least amount effort. Stephen Jones, the Labor candidate has been out pounding the streets, has his own web site, twitter account (which he actually utilises to communicate with people) and more.
I may not agree with his parties policies but Stephen Jones is showing a hell of a lot more respect to the people of Throsby than the others.
http://soniahamilton.wordpress.com/2010/07/20/exiting-from-consoles-attached-to-solaris-zones/
(More of a “note-to-brain” than a “how-to”).
When creating a new Solaris zone, one of the steps involves connecting to the zone’s console for the initial configuration:
# zlogin -C examplezone
The zone then runs through the sys-unconfig script, asking questions about hostname, timezone, etc. When this is finished, the doco says to exit from the console using the “~.” combination. But of course ssh grabs the “~” escape character and kills the entire ssh connection – aargghhh… Solution: different escape characters for the different ssh connections:
% ssh windows -e @ # jump host for Cisco vpn, @ escape character % ssh shamilton@1.2.3.4 -p 8022 -e % # connect to HP-NA, % escape character NA>connect ts01 # connect to terminal server ts01#telnet fubar.com # connect to console of target server - finally do stuff, then ~. # do stuff, then ~ escape character to exit zone console, to global zone
See also:
http://horms.org/pleb_blossom/permalink/2010/2010-07-20T09_55_18.shtml
Due to tyre troubles with my other two bikes I was "forced" to ride my Cannondale road bike to work this morning. The first time I've ridden it since well before Hikari was born last November. Wow, that bike is light and voom it flies. (And I put the brakes back together correctly after shipping it from Sydney!)
In semi-related news, its really warm in Tokyo at the moment.
http://jamespurser.com.au/blog/thoughts-train-election-campaign-so-far
So I'm on the train heading to Sydney and I thought I would put down some thoughts on the election campaign so far.
Well that's my thoughts from the train for this morning.
http://www.fooishbar.org/blog/tech/x/xkb-chuck-2010-07-20-00-37.html
So, #collabora was putting chunks of code into iwritelike.com, and I decided to join in the fun. While Telepathy, GStreamer and other similarly soft projects are all apparently written like Dan Brown or David Foster Wallace, I put a chunk of xkbActions.c into iwritelike.com, and apparently it's written like Chuck Norris. Brilliant.
http://www.mega-nerd.com/erikd/Blog/CodeHacking/DDC/llvm_milestone1.html
About 3 weeks ago I started work on the LLVM backend for DDC and I have now reached the first milestone.
Over the weekend I attended AusHac2010 and during Friday and Saturday I managed to get DDC modified so I could compile a Main module via the existing C backend and another module via the LLVM backend to produce an executable that ran, but gave an incorrect answer.
Today, I managed to get a very simple function actually working correctly. The function is trivial:
identInt :: Int -> Int identInt a = a
and the generated LLVM code looks like this:
define external ccc %struct.Obj* @Test_identInt(%struct.Obj* %_va)
{
entry:
; _ENTER (1)
%local.slotPtr = load %struct.Obj*** @_ddcSlotPtr
%enter.1 = getelementptr inbounds %struct.Obj** %local.slotPtr, i64 1
store %struct.Obj** %enter.1, %struct.Obj*** @_ddcSlotPtr
%enter.2 = load %struct.Obj*** @_ddcSlotMax
%enter.3 = icmp ult %struct.Obj** %enter.1, %enter.2
br i1 %enter.3, label %enter.good, label %enter.panic
enter.panic:
call ccc void ()* @_panicOutOfSlots( ) noreturn
br label %enter.good
enter.good:
; ----- Slot initialization -----
%init.target.0 = getelementptr %struct.Obj** %local.slotPtr, i64 0
store %struct.Obj* null, %struct.Obj** %init.target.0
; ---------------------------------------------------------------
%u.2 = getelementptr inbounds %struct.Obj** %local.slotPtr, i64 0
store %struct.Obj* %_va, %struct.Obj** %u.2
;
br label %_Test_identInt_start
_Test_identInt_start:
; alt default
br label %_dEF1_a0
_dEF1_a0:
;
br label %_dEF0_match_end
_dEF0_match_end:
%u.3 = getelementptr inbounds %struct.Obj** %local.slotPtr, i64 0
%_vxSS0 = load %struct.Obj** %u.3
; ---------------------------------------------------------------
; _LEAVE
store %struct.Obj** %local.slotPtr, %struct.Obj*** @_ddcSlotPtr
; ---------------------------------------------------------------
ret %struct.Obj* %_vxSS0
}
That looks like a lot of code but there are a couple of points to remember:
I have found David Terei's LLVM AST code that I pulled from the GHC sources very easy to use. Choosing this code was definitely not a mistake and I have been corresponding with David, which has resulted in a few updates to this code, including a commit with my name on it.
LLVM is also conceptually very, very sound and easy to work with. For instance, variables in LLVM code are allowed to contain the dot character, so that its easy to avoid name clashes between C function/variable names and names generated during the generation of LLVM code, by making generated names contain a dot.
Finally, I love the fact that LLVM is a typed assembly language. There would have been dozens of times over the weekend that I generated LLVM code that the LLVM compiler rejected because it would't type check. Just like when programming with Haskell, once the code type checked, it actually worked correctly.
Anyway, this is a good first step. Lots more work to be done.
I have updated Python-iView to un-break changes the ABC made to iView the other day.
If you’re using the Python-iView PPA, then you should have the update available already. If you’re using Bzr, as always, type the following to get the latest update:
$ bzr pull
Changes in this release include:
iview-cli, meaning you don’t need GTK+ installed to use it. This also means warnings aren’t thrown if you run it on a headless system.iview.cgi. To use it, read the (simplistic) installation instructions (for what is a simplistic script) in the actual file, but basically the lowdown is this: when the CGI script is active, you can retrieve iView videos over HTTP via a URL like http://localhost/cgi-bin/iview.cgi/730report_10_01_01.flv. As you can see, that would be very handy for integrating into your home media centre and the like. Obviously you need to adjust your web server ACLs to only allow localhost and RFC 1918 addresses to access the script. The script is not designed to be user-friendly — it’s meant to be versatile.set_local_only(False) is set on the iview-gtk save dialog. This lets you save to GVFS locations (e.g. sftp:// or ftp://). Why that is not default in GTK+ I am really not sure.On a side note, Whirlpool purged all material related to alternative iView access on their wiki and forums this week because they are of the opinion that alternative iView access constitutes bypassing copy protection and is thus illegal.
While I am not a lawyer, and I doubt Whirlpool consulted lawyers to reach that conclusion — and it’s better ask for forgiveness than permission — the fact remains that Python-iView is a project solely for interoperability purposes, not copyright infringement.
I pour my heart and soul into Python-iView not because I enjoy writing software, enjoy reverse engineering copy protection, or anything like that. I write Python-iView because it fulfills a need I have, and I released the software because I know there are fellow power users like me who are in the same situation and would benefit from the software in the same way.
Enjoy the new release, and viva la non mainstream!
http://blog.gingertech.net/2010/07/14/html5_media_a11y_moz_summit/
For 2 months now, I have been quietly working along on a new Mozilla contract that I received to continue working on HTML5 media accessibility. Thanks Mozilla!
Lots has been happening – the W3C HTML5 accessibility task force published a requirements document, the Media Text Associations proposal made it into the HTML5 draft as a <track> element, and there are discussions about the advantages and disadvantages of the new WebSRT caption format that Ian Hickson created in the WHATWG HTML5 draft.
In attending the Mozilla Summit last week, I had a chance to present the current state of development of HTML5 media accessibility and some of the ongoing work. I focused on the following four current activities on the technical side of things, which are key to satisfying many of the collected media accessibility requirements:
The first three now already have first drafts in the HTML5 specification, though the details still need to be improved and an external text track file format agreed on. The last has had a major push ahead with the Media Fragments WG publishing a Last Call Working Draft. So, on the specification side of things, major progress has been made. On the implementation – even on the example implementation – side of things, we still fall down badly. This is where my focus will lie in the next few months.
Follow this link to read through my slides from the Mozilla 2010 summit.
http://horms.org/pleb_blossom/permalink/2010/2010-07-13T12_01_14.shtml
I have released version 2.0.2-rc2 of kexec-tools. the user-space portion of kexec a soft-reboot and crash-dump facility of Linux and Xen. The only change since 2.0.2-rc1 is to include a number of files that were missing from the tarball which caused build failures on x86_64, ppc, ppc64 and arm.
The code is available as a tarball here and in git here.
More information is available in the announcement email.
http://jamespurser.com.au/blog/planning-alerts-android-app-version-06
Okay here's the next release of Planning Alerts AU.
This version now checks to see if GPS or Wireless Location Detection services are activated and prompts you if they aren't. Changed the Icon and marker graphics (if anyone wants to contribute graphically, please feel free :)).
So here it is:
Passed the 70-642 exam today. It’s hoped that I can complete another one by the end of August. Aiming to undertake the 70-646 probably next, then coming back to complete 70-640 to finish off the MCITP: Server Admin certification track.
http://jamespurser.com.au/blog/planning-alerts-android-app-version-04
Okay, here's version 0.4 of planningalertsau, the android app I'm building based on the Planning Alerts API.
In this version I've fixed the following:
Map crashes when there are 0 alerts
Now, there are still councils for whom Planning Alerts doesn't have results for and they are still looking for help, so if you want to contribute please head along and let them know
As always if you have a bug, please submit it here. It would be helpful if you could include the following information:
It'll help me when testing to see if the issue is a Planning Alerts or planningalertsau issue :)
http://horms.org/pleb_blossom/permalink/2010/2010-07-10T10_13_03.shtml
I have released version 1.19-rc2 of Perdition. There is a single change since 1.19-rc1 to fix a crash-bug on invocation of perdition in managesieve mode. Merge madness on my part. Thanks to Filipe Carvalho for reporting it. The fix is here.
The code and related libraries are available as tarballs
here.
More information is available in the announcement email.
More information about perdition here.
http://benno.id.au/blog/2010/07/09/building_avr_toolchain
I’ve recently got myself a couple of Arduino Duemilanove boards from Little Bird
Electronics. Now the Arduino is a pretty cool bit of kit, and it
comes with a great integrated development environment, which makes
writing simple little programs an snap. Of course, I’m too much of an
old curmudgeon to want to use and IDE and some
fancy-schmancy new language, I want make, I want
emacs, I want gcc. So I embarked on the
task of building a cross-compiler for the AVR board, that
will work on OS X.
Now, my ideal solution for this would have been to create a package
for Homebrew, my
current favourite package manager for OS X. Unfortunately, that just
isn’t going to happen right now. GCC toolchains pretty much
insist in putting things in $prefix/$target. So, in a
standard homebrew install, that would mean I need a directory
/usr/local/avr, unfortunately, Homebrew insists
your package only dump things in etc, bin,
sbin, include, share or
lib. Now, after wasting a bunch of time first fighting
GCC’s autogoat build system to try and convince it to conform
to Homebrew’s idea of a filesystem hierarchy, and then a whole
other bunch of time trying to learn Ruby and
convince Homebrew that other directories should be allowed, I took
the corwads way out and decided /opt/toolchains is
a perfectly respectable place for my cross-compilers to live.
And so, the cross compiler dance begins. We start with binutils, and as the code dictates, we start by trying with the latest version, which at time of writing is 2.20.1.
Of course, building a toolchain for a non-x86 based architecture
wouldn’t be the same if you didn’t need to patch the
source. The patches for the avr are mostly minimal; adding
some extra device definitions, for devices you probably don’t have
anyway. If you miss this step, expect some pain when you try to compile
avr-libc. I got my patches from the FreeBSD AVR binutils patchset. I try to avoid
patches I don’t need so have only applied the patch-newdevices patch. If things break for you, you might want to try the other patches as well.
$ mkdir avr-toolchain-build$ cd avr-toolchain-build$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.20.1.tar.bz2$ wget "http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/devel/avr-binutils/files/patch-newdevices?rev=1.16;content-type=text%2Fplain" -O patch-newdevices$ tar jxf binutils-2.20.1.tar.bz2$ cd binutils-2.20.1$ patch -p0 ../patch-newdevices$ cd ..$ mkdir binutils-build$ cd binutils-build$ ../binutils-2.20.1/configure --target=avr --prefix=/opt/toolchains/ --disable-werror$ make -j2$ make install$ cd ../Fairly simple, the only gotcha is the
--disable-werror, seems that binutils added the
-Werror flag to the build, good move!,
unfortunately, seems that the code isn’t warning free, so things barf
(bad move!), but it comes with a free flag to disable the
error... that’s good.
So, now we move on to GCC. Now, since I’m really only interested in compiling C code, (remember the bit about being a curmudgeon, none of this fancy C++ stuff for more, no siree!), we can just grab GCC’s core package.
Now GCC has some dependencies these days, so you need to get gmp, mpc and mpfr installed somehow. I suggest using Homwbrew. In fact it was this step with my old Mac Ports setup that forced me to switch to Homebrew; too many weird library conflicts with iconv between the OS X version and the ports version; but hey, you mileage may vary! (Note: make sure you have the latest version of Homebrew that includes my fix for building mpfr).
And of course, just like binutils, you need some patches as well.
Unfortunately things here aren’t as easy. There doesn’t appear to be
any semi-official patch for new devices for gcc 4.5.0! So, based on this
patch, I managed to hack something
together. The formats have changed a little, so I’m not 100%
confident that it works, if you are actually trying to use one of the
new devices in this patch, be a little skeptical, and
double-check my patch. If you are using an existing supported
AVR like the atmega328p, then the patch should work
fine (well, it works for me).
$ brew install gmp libmpc mpfr$ wget http://ftp.gnu.org/gnu/gcc/gcc-4.5.0/gcc-core-4.5.0.tar.bz2$ wget http://benno.id.au/drop/patch-gcc-4.5.0-avr-new-devices$ tar jxf gcc-core-4.5.0.tar.bz2$ cd gcc-core-4.5.0$ patch -p1 ../patch-gcc-4.5.0-avr-new-devices$ mkdir gcc-build$ cd gcc-build$ ../gcc-4.5.0/configure --target=avr --prefix=/opt/toolchains$ make -j2$ make install$ cd ..So, the final piece to complete the toolchain is getting a C library. You almost certainly want AVR Libc, or you can be really hard-core and go without a C library at all, your call.
$ wget http://mirror.veriportal.com/savannah/avr-libc/avr-libc-1.7.0.tar.bz2$ tar jxf avr-libc-1.7.0.tar.bz2$ mkdir avr-libc-build
$ cd avr-libc-build
$ ../avr-libc-1.7.0/configure --prefix=/opt/toolchains --host=avr --build=$ make$ make installThis should work with out any problems, however, if you messed up the new devices patches when building GCC and binutils, you might get errors at this point.
So, now we have a working GCC toolchain for the AVR we can start programming. Of course, you really want to have a good reason to do things this way, otherwise I really recommend just using the Arduino development environment..
Next time I’ll be looking at getting some example C programs running on the Arduino.
http://blog.gingertech.net/2010/07/10/media-fragment-uri-specification-in-last-call-wd/
After two years of effort, the W3C Media Fragment WG has now created a Last Call Working Draft document. This means that the working group is fairly confident that they have addressed all the required issues for media fragment URIs and their implementation on HTTP and is asking for outside experts and groups for input. This is the time for you to get active and proof-read the specification thoroughly and feed back all the concerns that you have and all the things you do not understand!
The media fragment (MF) URI specification specifies two types of MF URIs: those created with a URI fragment (“#”), e.g. video.ogv#t=10,20 and those with a URI query (“?”), e.g. video.ogv?t=10,20. There is a fundamental difference between the two that needs to be appreciated: with a URI fragment you can specify a subpart of a resource, e.g. a subpart of a video, while with a URI query you will refer to a different resource, i.e. a “new” video. This is an important difference to understand for media fragments, because only some things that we want to achieve with media fragments can be achieved with “#”, while others can only be achieved by transforming the resource into a different new bitstream.
This all sounds very abstract, so let me give you an example. Say you want to retrieve a video without its audio track. Say you’d rather not download the audio track data, since you want to save on bandwidth. So, you are only interested to get the video data. The URI that you may want to use is video.ogv#track=video. This means that you don’t want to change the video resource, but you only want to see the video. The user agent (UA) has two options to resolve such a URI: it can either map that request to byte ranges and just retrieve those – or it can download the full resource and ignore the data it has not been requested to display.
Since we do not want the extra bytes of the audio track to be retrieved, we would hope the UA can do the byte range requests. However, most Web video formats will interleave the different tracks of a media resource in time such that a video track will results in a gazillion of smaller byte ranges. This makes it impractical to retrieve just the video through a “#” media fragment. Thus, if we really want this functionality, we have to make the server more intelligent and allow creation of a new resource from the existing one which doesn’t contain the audio. Then, the server, upon receiving a request such as video.ogv#track=video can redirect that to video.ogv?track=video and actually serve a new resource that satisfies the needs.
This is in fact exactly what was implemented in a recently published Firefox Plugin written by Jakub Sendor – also described in his presentation “Media Fragment Firefox plugin”.
Media Fragment URIs are defined for four dimensions:
The temporal dimension, while not accompanied with another dimension, can be easily mapped to byte ranges, since all Web media formats interleave their tracks in time and thus create the simple relationship between time and bytes.
The spatial dimension is a very complicated beast. If you address a rectangular image region out of a video, you might want just the bytes related to that image region. That’s almost impossible since pixels are encoded both aggregated across the frame and across time. Also, actually removing the context, i.e. the image data outside the region of interest may not be what you want – you may only want to focus in on the region of interest. Thus, the proposal for what to do in the spatial dimension is to simply retrieve all the data and have the UA deal with the display of the focused region, e.g. putting a dark overlay over the regions outside the region of interest.
The track dimension is similarly complicated and here it was decided that a redirect to a URI query would be in order in the demo Firefox plugin. Since this requires an intelligent server – which is available through the Ninsuna demo server that was implemented by Davy Van Deursen, another member of the MF WG – the Firefox plugin makes use of that. If the UA doesn’t have such an intelligent server available, it may again be most useful to only blend out the non-requested data on the UA similar to the spatial dimension.
The named dimension is still a largely undefined beast. It is clear that addressing a named dimension cannot be done together with the other dimensions, since a named dimension can represent any of the other dimensions above, and even a combination of them. Thus, resolving a named dimension requires an understanding of either the UA or the server what the name maps to. If, for example, a track has a name in a media resource and that name is stored in the media header and the UA already has a copy of all the media headers, it can resolve the name to the track that is being requested and take adequate action.
But enough explaining – I have made a screencast of the Firefox plugin in action for all these dimensions, which explains things a lot more concisely than word will ever be able to – enjoy:
Click here to view the embedded video.
And do not forget to proofread the specification and send feedback to public-media-fragment@w3.org.
http://certifiedwaif.livejournal.com/385447.html
A while ago, I applied for a job as a biostatistician in public health. I made it to the interview stage, and that seemed to go quite well. They said they'd contact me in seven to ten days. I didn't hear anything for a while, but eventually I bumped into one of my referees who said he'd spoken with my interviewers, and they sounded "very positive". I poked my other referee, and he said they'd spoken to him too. So that was sounding pretty good.
On the advice of my girlfriend, I asked them how things were going, and they said they were waiting for a criminal record check to complete. Owing to my misspent youth, there's no criminal record to check, so now I was feeling very positive indeed. To cut a long story short, today they offered me a position, and I accepted.
So all's well that ends well!
https://jeremy.visser.name/2010/07/09/de-farm-flickr/
Last night I threw together a utility called De-farm Flickr. It lets you convert a static Flickr photo URL like so:
http://farm5.static.flickr.com/4007/4246714624_76febcc67d_z.jpg
…into its original photo description page.
The conversion is done in two (dead easy) stages: (1) fishing the photo ID from the URL with a regexp, and (2) sending you to http://www.flickr.com/photo.gne?id=<id>.
I don’t know if you’ve noticed, but while the photo description URLs contain the photo ID, they also contain the username which is impossible to reverse engineer from the static photo URL. That’s why I send you to the photo.gne script: it can accept just a photo ID as a parameter, and send you to the right page.
http://jamespurser.com.au/blog/planning-alerts-android-app-version-03
I finally had enough time to sit down and have another crack at the Android App I'm building based on the very cool planning alerts api.
This new release has added basic google maps integration. Once you have successfully returned a list of alerts you can hit the menu button and select Map to view the various alerts.
How to use it:
On a fresh install, before you select an option, you need to fill out your address details, to do this, select the Menu button and then Preferences. Fill out your details and you'll be set.
Future Features:
Saved Searches: Currently the app pulls down a fresh set of results with every call. This needs to be changed so that the user can select a search that they want to keep track of
Request Settings on Initial Launch: Users need to be directed to fill out their details when they first launch the app
Future Bug Fixes:
Error Handling: currently there is really very little error handling within the app. This means we have situations where the app will crash if you attempt to view a null list of alerts.
Any way here's the QR Code:
Edit:
And thanks to Simon Rumble for the first "defect" :)