Archive for February 2008

Online videos, to a VCD, via Linux

With the upcoming elections, there have been some most interesting videos posted on Google Video and YouTube. The opposition is broadcasting on YouTube, sitting on social networks (Anwar and PKR, are on MySpace, Friendster, Facebook). The Internet is becoming more mainstream, for elections and politicians. What does this mean for the 2008 general elections? Definitely, not a 90%+ majority for the ruling Barisan Nasional, I do hope.

Anyway, on to working with video. Lets say, you have found an interesting video on Google Video, and feel that it is your sworn duty to share it with the poor who do not have access to the Internet. Google Video, on the right hand column, allows you to download it for the Video iPod/Sony PSP. Perfect.

What about interesting videos on YouTube? Naturally, you will use youtube-dl. Beware, this software changes often, as and when YouTube changes their protocol, so check back constantly if things stop working. Getting things in .FLV format, is kind of painful, which is why you’ll use ffmpeg to transform your video: ffmpeg -i foo.flv -y foo.avi.

Now, what about creating a VCD or DVD? Whats the easiest way? Hands down, you want DeVeDe. Its available in Fedora, apparently has got some bugs in Ubuntu (something about sound going wonky). Its dead easy to use. It works with Google Video MP4’s as well as AVI files you’ve converted from ffmpeg.

Let DeVeDe do its thing (which is creating a .cue and .bin file), and then, its time to write to a CD. To create a VCD? cdrdao write --device /dev/sr0 movie.cue. I understand, K3B has got all the gizmos to create this in GUI form, but that involves installing KDE libraries, and I’m sure I can use my disk space in a more efficient way. I found HOWTO Make a video (S)VCD a handy guide.

Wait… and you’ll soon have a CD that you can pop into a DVD/VCD player and enjoy viewing.

Technorati Tags: , , , , , , ,

Software Freedom Day 2007, Beijing Report

On IRC, I told Pia, that I enjoyed the Beijing SFD tremendously, and they should definitely win for 2007. I did make a note that if it was required, I would blog about it… She mentioned that it probably wouldn’t matter, because they were a contender already. Nonetheless, I figured that eventually I’d blog about it – turns out its come many months later, generally inspired by Peter Junge’s blog post. Lucky for me, all this isn’t just coming off from memory, but my trip report, that was on an internal mailing list!

First up, some quick resources: the winning report, photos, including the ones from the speaker dinner, held after the event, and the winning announcement. Granted, it was one of three events that won, but I’m happy and proud to have been associated with the Beijing event!

I had 20 minutes in total to get the message across, and there were always interesting questions that required entertaining. So my talk was entitled, Growing with MySQL. The slides themselves are pretty sparse, and I had my talk simultaneously translated (good thing I had some practice in Japan, beforehand), so all in all, I had less time to get my message across.

However, the room was full, and it was one of those amazing standing room audiences that I so always like to see. In actuality, with questions, I overran, and gave a 30 minute talk, with generally no objections from the audience (or organisers).

Attendance at the event, in total, must have been about 700-800 folk. There were 500 showbags, and they were all finished by lunchtime. I caught up with Lalo (ex-Exoweb colleague), who handed me a nice pink Software Freedom Day t-shirt. Lets just say, you’ve got to be sure of your masculinity, before putting it on :)

I fielded some interesting questions, and the usual “How come Enterprise sources aren’t available if you don’t pay? How is that freedom?” of questions, to which I always honestly inform the questioner, that you’d get it at the BitKeeper source tree, available online.

During the event, I continually did plug, a MySQL Partner in China, Great Open Source, mainly because they were my excellent hosts, and they’re the focal point for all things MySQL in Beijing. The crowd was always interested in hearing that MySQL had a Cluster Team, that worked out of the Great Open Source offices, and I also mentioned a Summer of Code 2007 student, Jin Chen, who’s Chinese in origin, but is in Canada completing her studies at the moment,

The university that hosted us? Tsinghua University. This university is apparently ranked number one in China, though there’s a continuing battle with Peking University for the coveted spot.

Now, a few things I learned:

  1. OpenOffice.org has been forked, and there is a RedFlag Office now. I amused the RedFlag Office folk at the booth, when I showed them the easter egg (Help->Ctrl+SDT) which brings up the credits. They were impressed when they saw my name float by.
  2. There are about five known forks of MySQL in China. They are just basically renamed to something else, and rebuilt. Seems uncouth, and I understand things are being done to fix this.
  3. Mandriva and Red Flag seem to be pretty active in the Chinese market. Ubuntu is gaining great traction and momentum, thanks in large to Amy Jiang and her crew.
  4. Further language assistance from MySQL needs to happen so that more Chinese can take part in the Quality Contributor Program.

The event was generally fabulous. Walking around the show floor, speaking to people, being the only English talk in the audience of entirely Chinese talks (!), spreading the good word of MySQL and open source in general, I had a fabulous time at Software Freedom Day, Beijing, 2007. I guess I was just lucky to be in Beijing at that point in time anyway (literally, a transit between Japan and Germany). I’m also extremely greatful to my hosts: Great Open Source (Claude, George, Frank, Grace), the SFD organisers and team in general, and Ken & Michael who had a dinner with me (Exoweb management folk).

Technorati Tags: , , , , , , , ,

Just registered for the MySQL Conference & Expo 2008

I just registered for the MySQL Conference and Expo 2008. Note that early registration closes on February 26, 2008, so if you register now, you get a really nice discount. For what its worth, speakers were given a little discount code to give away  (20% off the conference price tag), and if you’re a blog reader, and the 20% discount will help you attend the conference, by all means drop me an email (firstname at mysql dot com).

Technorati Tags: , , , ,

LDAP vs. DBMS (or migrating to fedora directory server)

Via the Fedora Miniconf, I attended Del Elson’s talk on Migrating to Fedora Directory Server. Interesting scripts, and glue code was presented, the slides (verbose, good) are online, but there’s no video :(

Tiny amount of notes:
LDAP vs. DBMS

  • directory has one schema, one “row” type (“object”). RDBMS has many tables
  • directory => optimised for reads, slow for writes
  • directory has an adaptable and mutable schema format – good for storing information about “people”
  • think about the fact, that people usually have more than one phone number…
  • access protocol – ldap vs. sql

Technorati Tags: , , ,

An introduction to ANTLR (sparse notes)

I attended Clinton Roy’s excellent session titled An introduction to ANTLR: A parser toolkit for problems large and small. Now that the slides, and the video (1, 2) are online, I don’t know if my bits of notes are of any use (I made them while the tutorial was in progress), but they’re sitting on my desktop, and really should just get published. The files referenced below, you get via checking out the Antlr Tutorial Preparation wiki page.

Why use Antlr?
To parse configuration files, syntax highlighting, Domain Specific Languages (DSL), interpreters, translation/transformation.

Generates easy to follow code, LL(*) parsing algorithm. Bison is more powerful than Antlr. Compined lexer, and parser generator.

fun (int a, char b); <– as you do LL, till you hit the “;”, you have no idea if you’re dealing with a function or a declaration. Of course, there are look-ahead LL parsers too. An LL3 parser, which can see 3 tokens ahead, you still can’t see ahead enough, till you hit the ;. This is why, there exists an LL(*) – pick the smallest look-ahead, your grammar would need

Antlr, will help you get rid of using regular expressions.

Island grammars – one language, inside another (like HTML, inside PHP, or Doxygen inside C) are supported by Antlr.

Antlr Wiki is good, but hard to find things. Mailing list is great. The book by Terrence Parr is good, but out-dated, so go ahead, and get the online PDF version. A new cookbook/recipe list is coming out soon.

Using AntlrWorks. java -jar antlrworks.jar

conffile.g parses a = 1, b = foo.

IDENT   :       (‘_’|’a’..’z’|’A’..’Z’)(‘_’|’a’..’z’|’A’..’Z’|’0′..’9′)*;
NUMBER  :       ‘0’..’9’+;
WS      :       ‘\r’ | ‘\n’ | ‘ ‘ {$channel=HIDDEN;};

The above are lexer rules. WS = whitespace. It reads from bottom up. White space, a number (0-9). IDENT will match foo, foo, foo1, but not 1foo (identifiers don’t start with numbers).

{$channel=HIDDEN;} <– IDENTs and NUMBERs get through the channel get through the parse. The whitespace, the parser sees them, but it will ignore them (i.e. hide them).

[-(byte@hermione)-(pts/6)-(11:21am:31/01/2008)-]
[-(/tmp/antlrworks)> l
total 248
drwxrwxr-x  2 byte byte   4096 2008-01-31 11:20 ./
drwxrwxrwt 44 root root 192512 2008-01-31 11:20 ../
-rw-rw-r–  1 byte byte    340 2008-01-31 11:20 conffile__.g
-rw-rw-r–  1 byte byte   8492 2008-01-31 11:20 conffileLexer.java
-rw-rw-r–  1 byte byte   4180 2008-01-31 11:20 conffileParser.java
-rw-rw-r–  1 byte byte     28 2008-01-31 11:20 conffile.tokens

conffile__.g – lexer file
conffile.tokes – tokens

CMinus.g takes input, which is a C program. Go to the interpreter, and you can then see the entire parse tree. Very impressive!

Technorati Tags: , ,

MySQL Miniconf videos, from linux.conf.au 2008

If you couldn’t make the MySQL MiniConf at linux.conf.au 2008, no worries – there’s recorded video!

For a full list of available miniconf talks that were recorded, check out what the LCA team has to offer. I’m surprised the LinuxChix talks never made it online (there was a really interesting memcache talk there…)!

If you download all the OGGs above, you’ll be down about 451MB. If you’re bandwidth starved, I have them on my laptop and will gladly share them on a thumb-drive.

Technorati Tags: , , , , ,


i