midori, gnash

Partially from a comment from Jeff and mostly because Firefox 3 is giving me the shits, I started looking around for another browser. I gave kamikaze (or something – can’t remember exactly) a go, but that crashed as soon as i typed in a url. I also tried some pure java browser, but that’s got a long way to go yet, it’s rendering is all over the place (although interestingly it starts up faster and uses less memory than firefox). Midori on the other hand looks kinda interesting.

Surprised how fast it starts up, but of course it still isn’t quite ready, and has a few usability issues, but it could get there one day, and maybe if the code-base isn’t such a giant as firefox it wont be hard to customise. It wont run gmail yet, and the network seems to lock up too often. Pages take a bit longer to load and render less incrementally. But if a few other issues were worked out i’m sure I could live with that. I didn’t try epiphany but maybe once they’re done a webkit release i’ll look into it, I think ditching the renderer abstraction and going with a single implementation is a very wise idea – more projects could probably learn from this.

Since i’m on a 64 bit box there is no flash player for it (i’m not going to run nspluginwrapper), so I tried gnash. Hmm, it kinda works. Actually it works well enough to play most advertising just fine (although not great quality), and none of the video sites. Which is really the opposite of what anyone might want. If black listing was in the main menu and it went fully to sleep in hidden tabs – and video worked – it’d be a real winner.

On an unrelated note – if you’re ever trying to compile ffmpeg with ac3 support and it doesn’t seem to want to turn it on …

 ./configure --enable-decoder=ac3 --enable-gpl

And not:

 ./configure --enable-decoder=ac3 --enable-gpl --enable-liba52

Since it doesn’t work – although everything I saw said it should. In the end I just used mencoder (and that took a while to work out – although the answer ended up being in the manual). I was trying to convert a blender generated mjpeg avi into a dvd-compatible video spliced with silence for a dvd menu, and ffmpeg insisted I needed ac3, even though the source had no sound.

This was all a pain to find out. Another frustrating google search experience. You’re either hitting multiple copies of the same mail archive but in different ad-supported wrappers, or you get some comment of the lines of ‘install another package’. Nobody seems to know how to compile things from source any more.

Everyone just seems to want their code free as in beer, but none of that messy source please.

I think this a fundamental problem with the Open Source marketing ‘movement.’ By ignoring and de-valuing the Free nature of Free Software and focusing purely on the mechanism of development they have devalued the ‘Source’ part as well.

And speaking of source … along the way I thought I needed mjpegtools and had to resort to source to get it. Oh but it’s in C++. Great – every time i’ve tried to build anything C++ i’ve run into problems – and not just with gcc 3.4 on Fedora 9, i’ve had problems many times before too. Another application that needs patching just to compile because the compiler and the language moved on. I patched one of the tools and got it to build but lost interest when I realised I didn’t need it after all.

I’m still plugging away at my cms in between all these other side quests. I’ve integrated my flex based texinfo parser now, and cleaned up a few little things. Internally i’m using length+pointer based strings rather than 0-terminated. Both so it is binary-safe, and so I can reference string fragments without having to copy them around. I got sick of forming output strings by outputting tiny fragments in the right sequence (exactly like StringBuilder.Append), and implemented some custom printf format handlers. That way I can pass my special string * directly to obstack_printf and it stores the result, and even does html entity conversion or url encoding to boot. Oh, and sick of having to call ‘init’ functions in main I’m using static constructors too. __attribute__ ((constructor)); on a prototype, and it will get called automagically before main is entered. Horrah for gcc extensions.

I was also wondering how to implement some sort of namespace mechanism. texinfo has the solution there – it doesn’t really have namespaces apart from the current manual. So the namespace is like a single-level directory, when you have the nodes stored in separate files by (processed) node name. Since that is all I really need, that is what I will use, and not so oddly enough it fits well with the texinfo cross reference commands (they specify the manual(/’namespace’) as a separate part). I store the whole namespace/node name as a key of each ‘node’, and it makes looking up all or specific names in a given namespace very easy. Berkeley DB has a mechanism where is can compress keys if they share a common prefix, so i’m using that and it should make the overhead of storing the full path in each key low, although you wont be able to change the namespace after it is created (at least, not cheaply). (at least that is my understanding, the documentation isn’t very clear on when it helps a data-set, and google was no help).

Hmm, indices and structure next I guess. Enough of the parts are there, I need to start tying them together.

7 thoughts on “midori, gnash”

  1. Midori’s performance of course depends heavily on WebKit. It sounds to me like your distro has an old / badly packaged WebKit, because I just tested, and GMail works fine for me in Midori. I maintain the Midori / WebKit packages for Mandriva; we currently have WebKit svn 34503 built with –enable-svg-experimental , and Midori git from June 17th. As I said, GMail is fine; I can read my mail and compose new mail, etc. Page rendering times for me with Midori seem pretty quick too.

    It’s pretty easy to do a build of Epiphany-webkit. I find that in basic fundamentals it works great, but the deal-breaker for me is that plugins don’t work with the Webkit backend, particularly the AdBlock plugin. I can’t live without AdBlock.

  2. Hey there, I am curious for any thoughts you have on Arora http://code.google.com/p/arora/ which is also webkit based. The startup is quick and while basic it has a lot of the basics, is quite stable and gmail works (as long as you don’t log in with the Remember Me checkbox). Although it uses QtWebKit it works very well with the Gtk Qt style and it picks up the gnome icons.

  3. well i found totem+gstreamer was asking for money to play mpegs so i removed it – and along went gnash with it. i saw mention of swfdec around but didn’t get around to looking into it – there are only so many hours in the day and i’m already burning the midnight oil just trying to do the things I want let alone look at things i’m forced to. but if swfdec uses gstreamer then i wont bother, and will do without flash on that machine.

    i just installed what was available in the default yum setup on fc9 – i just thought i’d try it out, and mentioned it here because i thought it had some positives. i’m not sure I care enough to really hunt around for everything though, at least not yet.

    actually on a whim i did checkout webkit from cvs. and waited. over a gigabyte. Hmm. suddenly i lost most interest in bothering with browsers – the complexity and size is just stupid/crazy and I don’t have the time right now to play with such a body of code.

    i was only looking at the gtk+ based ones, so i avoided arora intentionally. it’s just a personal thing.

  4. You can build swfdec stable against ffmpeg, if you want to. But if you do that, you can just install GStreamer and gstreamer-ffmpeg which gives you the same thing.

    And yes, the size of code required to build a browser is scary. And it isn’t helped by the fact that they all just ship a large monolithic blob of code instead of properly splitting it into reusable parts. But then, a browser is like a desktop confined to a window, so it has to be huge.

Leave a Reply

Your email address will not be published. Required fields are marked *