Older blog entries for company (starting at number 49)

YOOOUUUUUTUUUUUBE

GO Swfdec!

6 months of work, I'm now gonna go partying.
See you at Cebit.
PS: For the brave people: The code is in git.

Syndicated 2007-03-15 18:06:01 from Swfblag

Miguel links to a blog post by Anne Zelenka (read the comments!) about how open Flash is and how good an open Flash would be. I think one point they all don't see in their "an open spec would be enough" is the work necessary to produce an open spec.

Now let me get this straight. Adobe has a spec for the SWF format, and they have lots of documentation on Actionscript, so producing some spec would be easy. But the problem is that the existing specs only describe correct behavior, but not the more important part on how to treat errors. Consider an example where the spec might say something like "height: Integer - the height of the current movie". So what happens when your code does height = new Object()? It's written down nowhere. In the current closed world, the solution is easy: the accepted behavior is what the Adobe Flash player does. So if you want to write an open Flash Player like Swfdec, you don't need a spec, you need patience and lots of test cases. Because there'll surely be a Flash somewhere that does height = new Object () or height = height / 0 or height = "Hello World" or...

A good example of how hard it is to handle the unexpected right is Acid2 for CSS. And in the case of Acid2, there even exists a spec about how to handle all the errors. (I was going to link to something I read by I think HÃ¥kon Lie about why having a defined way of handling errors is important as opposed to just aborting, but I can't find it in Google.) And error handling mechanisms are an important part of an implementation. The Mozilla team needed 1.5 years to correct their error handling. So if you figure out something new and exciting about Flash, it can easily mean you have to redesign a large part of your player. So it's important to know beforehand and should be part of the spec.

And while we're talking about necessary rewrites: A part that no spec talks about is implementation complexity. If a function is O(1) in the official player while it is O(N) in yours, you have a problem when someone calls it excessively in a loop. And then there's probably code relying on timeouts, data input or the phase of the moon.

Another thing I've been wondering about lately is the complexity of implementing a standard. I have no clue how Flash relates to SVG in complexity, but SVG has an open spec and that one is 4 years old. Do we have any SVG compliant implementations by now? HTML has a free spec, too. It took the Mozilla team 6 years from open sourcing to a release for their browser. So if a complete Free Flash specification started to exist tomorrow, would it take 5 years to implement?

An open Flash spec would definitely make Flash inch closer to World Domination, but it'd still take a very long time to make it really Free. Open sourcing the player would probably make that happen way faster.

Syndicated 2007-03-07 08:35:44 from Swfblag

I did it

So I've just managed to finish my Christmas present only a week late, but anyway, after 3 months of not hacking on anything else, I've finally released Swfdec 0.4 and its companion, Swfdec Mozilla 0.4.


The good news: The mozilla plugin is now almost 100% compatible with South Park Studio. So you can do this. (Yes, that's an SVG taken from the Flash)
Unfortunately there's no UI for it yet. Implementing Flash is kind of a huge task afterall.

And finally, here's the disclaimer: This software is not rock-solid. So if the plugin kills your browser, don't blame me. File a bug or talk to the list instead.

Happy new year!

Syndicated 2006-12-29 15:36:02 from Swfblag

So, talking about the MS/Novell deal has been declared stupid by dobey even though according to other hackers 80 percent of hackers think that there is nothing wrong with it. jclinton has issued a statement condemning this action. Perhaps he said it best

"Since you guys are all buddy, buddy and everything, I'm sure it wouldn't be too hard for you to take a few minutes of his time to explain the spirit of Free Software to Steve."
Personally I think that if people weren't outraged about it, we'd have already lost to MS.

Update: Iain has said that if more people think like this he will do what he is told and stop blogging completely.

Syndicated 2006-11-11 12:05:43 from Swfblag

Flash

So about a month ago Federico blogged a Youtube link again. That made me wonder about Free Flash decoders and I had a look around. In the end I started hacking on David's Swfdec, since it has all the goodies: Cairo for beautiful Graphics, GStreamer for sound, David's excellent code (the SWF parsing code is awesome) and of course it was written in Gnome C.

Long story short: I haven't had this much fun in hacking for ages. I think I haven't done much else in the past month but hacked on Swfdec and watched lots of stupid Flash movies lots of times.

So what's the current state? It's still very far from finished since Flash is huge. It's a graphics framework (think GDK) with a scripting engine (think Javascript). But if you're adventurous, bored or both, feel free to check out the sources from git://people.freedesktop.org/~company/git/swfdec and play with them. They might even play back some weird flash file. For now I'll continue to make FLash files work one by one. Next stop: South Park.

PS: Before someone asks: Gnash is low quality, written in C++ with Boost, requires Copyright assignment, svn doesn't even compile and it does less than my current Swfdec, so I didn't hack on it.

Syndicated 2006-10-12 08:07:44 from Swfblag

Selection Fun

Do you know this: You select some text with the mouse and after you did this you wonder why you missed the last or the first letter?
I asked some people around me and they have that problem. Today I got annoyed enough to venture into the deep world of selecting text to figure out what the reason for this could be.

So I started my journey by looking into the GtkEntry source code. And the first thing I found where two things I didn't know. The first is a workaround for this problem: You can shift-click to extend the selection.
The second: If you start selecting with a double-click (triple-click), you'll only select full words (lines).

And I found out what the problem is: When selecting text, you don't select letters, you select gaps. What does that mean? If you click on a letter, Gtk selects the closest gap for you. So if you click on the left half of the letter, the gap in front of the letter is taken, if you click on the right half, the gap on the right is taken. If you want to try: The best letter is an "m", at least with Vera. So, go, enter "mmmmm" in your location bar and try it. :)

This seemed like an obvious usability issue to me, so I thought that other toolkits would get it right. And then I found - for the first time ever - that everyone: Gtk, Qt, XUL, Gecko and Windows, they all behave the same. This got me thinking: Are you actually supposed to select gaps? I mean, it's very likely that I am wrong and the rest of the world is right and not vice versa. But actually, all the people I asked said they knew that problem.

So I'm currently a little lost. Should I really file bugs with literally everyone or did I miss something? I've filed a bug with Gtk, but I'm wondering if I it's really wrong and I should file bugs with Qt, Mozilla, Abiword, ...?!

Syndicated 2006-08-31 16:09:53 from Swfblag

I need to follow up on David's Post about Foundation membership because it fits so well:

As much as it is a nice feeling to feel welcome when you've got your confirmation email, it's a weird feeling when you get the email that you will be no longer a member now, because you didn't do the work to renew it, even though you're still very involved with GNOME.
This is the only reason why I am no longer a foundation member.

Syndicated 2006-07-28 21:16:49 from Swfblag

Who let this crap into Gtk? I'm really annoyed that such code ended up there, because that code not only works bad, but also is conceptual crap. I'm talking about the dnd code. So what's wrong with it? I'll start with the worst things:

  1. You have to provide a function that creates a new window if the tab is dragged off the notebook. So what's wrong with gtk_notebook_set_window_creation_hook? It's global. Every self-respecting programmer should know by now that globals are bad, mkay? Especially so in libraries. Anyone remember XSetErrorHandler? So just assume for a moment, that you were using a docking library (like the Gimp or Gdl) that wants to support floating docks and you want to make some of your own notebooks detachable. Who sets the hook?
  2. To figure out if dragging from one notebook to another is allowed, one has to set a group id. And this is a (positive) integer. Hi namespace collision. By now I'd thought that it was common knowledge to use strings or pointers for such a thing. But apparently it's not. So what ID is the docking library using now? Just pick one and hope?
  3. Detaching tabs only works if you drag them to the desktop. Don't ever try this with a fullscreen app.
  4. Reordering is implemented without drag'n'drop to give nice visual feedback. Unfortunately detaching is implemented with drag'n'drop. So once you've gone over the threshold to start a drag, the UI looks completely different. Even if you later on move the mouse over the notebook again, it doesn't change back.
  5. There is absolutely no visual feedback (aka highlighting) when doing a drag.
  6. The code for reordering (or dragging) tabs in a small notebook (where the arrows are visible and preferrably only one notebook is visual at any time) does not work in any reliable way.
  7. There are lots of different annoying drawing glitches from flickering to drawing tabs in weird places during reordering and dragging.
These are lots of reasons that would have gotten me patches rejected almost everywhere in the gnome stack. So why did the normally excellent Gtk quality control fail to work in the notebook case?

Syndicated 2006-07-20 08:43:14 from Swfblag

If anyone is interested and able to speak German there's an interview about Swfdec I recently did. I think it turned out quite nice.

<ds> dude. zzuf rocks

Anybody coding an app that has to handle untrusted input should have used zzuf. A lot.

40 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!