Cesar’s Vanilla Blog

White and creamy wtf

Refractor, aka prism-ext, aka Prism for Firefox, aka…

Whatever you call it1, it is finally here (yeah, this is coming a few days late. But if it wasn’t so high on my to-do list, this would come 2 weeks later). Congratulations to everyone who helped push this release. Mozilla Labs did a good job of outlining the features, though only briefly mentioned one of the most valuable (this is subject here) feature of the extension: easier webapp distribution.

Refractor makes use of the link tag in web pages to identify webapps. The line itself is quite simple

<link href="gmail.webapp" rel="webapp" title="Google Mail">
Yeah, no </link> or />. That's HTML for ya'!

Not to say that sharing webapps before was in any way difficult, but I think being happily notified is nicer than finding and downloading and running and installing. Especially if there is a lot to try.

There are still some things left to be done. I want to see

  1. Recommend addons/plugins with certain webapps (ie. google gears with google reader for offline support, flash for youtube)
  2. Choose website styles/themes
  3. World Domination

I would also like to see some things done to Prism :

  1. Greater interaction with the desktop. I want to double-click a odt and open it up in google docs. No excuses!
  2. Linux requirements says that hal and dbus are required. Maybe we can do something cool here with webapp.js?
  3. Allow people to change their preferences such as proxy and access things like password manager

This is a prototype, with plenty of bugs (I found one just doing this post), but we fix them as we get them.
[1]Refractor, if I recall the story correctly, was coined by Mark Finkle as it reminded him of what happens when light hits a prism : it refracts. Well, it was certainly more creative than prism-ext, while being less obtuse then Abbe prism.

Update : Thanks Percy Cabello for pointing out a mistake

March 12, 2008 Posted by | Mozilla, Seneca | , , | 8 Comments

Old man winter came for a visit

Hard to believe that spring is only a few weeks away!

I only dreamed of these kind of days as a kid.

March 9, 2008 Posted by | Toronto | , | 1 Comment

Customizing the Web

WARNING — An overenthusiastic developer with ksnapshot post.

Something fun I came across while watching Prism being developed is adding bits of Javascript to pages to change their behavior and look. Greasemonkey is a Firefox extension that helps you manage these Javascript files and applies these files to web pages. While fun and sometimes handy, I haven’t found it overly useful.

I then came across Stylish, another extension except this one changes CSS. When combined with some good stylesheets, they make for a good, sometimes drastic changes (click on the preview for a bigger picture) :

stylish facebook

stylish ftp

Google reader with a Mac OS theme. Oooh, pretty.

stylish google reader

stylish Wikipedia

Youtube. Despite not having Flash in this profile, I couldn’t resist.

stylish youtube
After finding a few cool ones for google maps, I made it into a prism web bundle (not perfect) to make it look more like a desktop application.

Prism Google Maps

What’s really nice is that Google maps did not change, I changed Google maps. If this was a Flash application, I certainly wouldn’t know how to do it. I can guess that it would be a lot more work. Then again, Flash can do things that the web yet can’t. But we’ll get there.

November 9, 2007 Posted by | Mozilla, Seneca | , | 1 Comment

How to get into Open Source

This isn’t easy to explain. I tried today, and I sorta lost myself and cut it shorter than I should have. But why is it important? Because people actually believe that you cannot get started unless you are already involved.

My involvement in open source begins Summer of ’06. While I was already working with the Linux OS and in the Linux club, I never got involved in anything else. My good friend Tom got word that Mozilla (he was partially working on it, I don’t know the exact involvement of how he came into it), was looking to port distcc to Windows and use the Microsoft Visual C++ compiler. I thought it was an interesting idea (actually, deep down, I honestly didn’t think we were going to take it as far as we did. I think that without that Open Source course, it may have never happened), and went with it. In the beginning, it was hard to be enthusiastic about something you cannot say you made, and you don’t understand. I didn’t make distcc, I was reading its cryptic code (cryptic at the time. Now I would love to write code like they did). Once we chose it as our course project, the deal was cemented. I had to work on it, commitment was mandatory.

And that commitment gave me many highs and lows. The high we got when we finished porting all the functions and passed all the testcases, and the low we got when it didn’t work for the first time. The excitment of distcc building Mozilla over Cygwin, the whimper after it failed midway. The orgasmic feeling after a four line patch did it, and it built, and we could finally go home. Happy. That was after months of work on the project.

But through that, people did take notice. Mike Shaver(++) did, and was so happy/grateful/pressured, he even offered me an internship at Mozilla. That experience made all the pain of looking through megs of distcc log files worth it (I’m sorry to say that Tom was done school by the time my internship started. I also owe him a big thank you). What made the Mozilla experience unique, is that they wanted you to see what Mozilla was really about. After all, who takes you on a plane and fills out your visa work, and sends out thousands of miles away to do work? Mozilla did, and it ended up being one of my most wonderfully enriching personal experiences.

Once I got there, word spread around. I was actually glad that some of the build team mentioned distcc. Though, as far as I know, its not being used for tinderboxes (this may be due to the introduction of dual-core and quad-core processors, and the overhead of sending this over desktop machines, inefficient. I honestly don’t know if MSYS is the savior for this), its nice getting recognition for something you have done.

And it is that internship that pushed me towards the deeper end of the Mozilla platform. I still have a long ways to go before towards understanding how things still work, but I’m getting there.

Working on Open Source still requires a fair deal of effort, and you really need the motivation to keep you going once you get started. It is incredibly easy, and sometimes tempting to give up. But true character comes out when you spend days on a problem, that shows determination. Anyone, can just give up. And so many people do. I even do it sometimes.

I invite others to post on their blog on how they got involved. Show some other people you didn’t spontaneously spawned and just knew what to do.

October 5, 2007 Posted by | Mozilla, Seneca | , | 4 Comments

A welcomed surprise

The day after came back from Mountain View, and I needed to make a Ubuntu Server CD (your desire to lynch me may diminish if you read the entire post). I went to my father’s machine to do the burning, and I was astounded by what I saw. Firefox on the desktop, and I did not install it. I got so excited I needed some new pants. You do not understand, I didn’t think this was even possible. The last time I put Firefox on his desktop, he promptly uninstalled it. I checked the add/remove programs and checked how frequently it was used. frequently, it said. I even saw some bookmarks, and that just warmed my heart. They must be doing something right after all.

September 5, 2007 Posted by | Seneca | Leave a comment

WebRunner in the works

I have been spending a bit of time in the Mark Finkle‘s idea of WebRunner. There has been a few discussions on it how far along to take it, and even what we should do with it.

There has been some discussion about shipping it with Firefox 3, but I think that has been put behind in favor of an extension to Firefox so we can follow our own timeline. Luckily, FF3 has a new neat feature that allow you to pass the -app parameter to run a xul application. Nifty.

So I am releasing a very beta release WebRunner Extension. It comes bundled with the latest stable release of WebRunner. It is also a simple demonstration of what I think might be the right direction, but I may be totally off. I look forward to comments and constructive criticism, not for a tongue lashing and threats of bodily harm (unless you attended the webrunner meeting).

There are two ways to start WebRunner: On the fly and tagging a bookmark.

If you tag a bookmark as “webapp”, the next time you visit that page you will be prompted if you want to open that page in webrunner. This suffers from slow response and a few bugs, which consequently will cause two prompts to come up (simply cancel the second prompt). This also doesn’t allow you to specify whether you want to show the navigation/statusbar/location bar.

The other way is to do it on the fly. Under the tools menu, there is a “WebRunner” menuitem which will prompt you for things to show. It will open Webrunner after you click ok.

Neither method is as flexible as .webapp files, at this point in time. I’m trying to stay away from .webapp files, since the implementation is still volatile. This might be used as a desktop application, or not. I don’t know.

You can give it webrunner_ext.xpi (linux, windows) a try. You need a recent trunk build of FireFox however, or grab a nightly. Please also note that WebRunner uses a different profile than your Firefox when running, so none of your preferences/saved passwords are transferred.

August 23, 2007 Posted by | Mozilla, Seneca | 7 Comments

MAR generator release 0.3

This is pretty important, since the last two had a nasty bug in them that could cause the world to implode, and the MAR file to hold the wrong data. Sorry.

Here are some of the highlights :

  • Fish-like mascot
  • You can now localize it
  • More modular. You can probably work on it now ;)
  • You can extract MAR files to a directory.
  • Bugs fixed, and bugs created

I did a test with another MAR files taken from Mozilla’s ftp site. When I extracted/recreated the MAR file, there only seemed to be one small difference between them. For some reason, update.manifest’s permissions shows up as 0666 rather than 0644.

But the file sizes/names/count all seem to be equivalent. Go figure.

There is still the issue of doing partial MAR files. This may end up coming later, or sooner if someone wants to send in a patch.

In the meantime, here is the source and linux(!) build :

MAR generator v0.3 – source
MAR generator v0.3 – linux

August 7, 2007 Posted by | Mozilla, Seneca | 2 Comments

Release early, release often

I got grilled by David Humphrey today for my lousy first release, but I know he was just trying to encourage me to do better in the special way that I require. Here is an excerpt from our conversation :

20:55 <@dave> "I haven.t done extensive testing yet. Though, its simple enough that it probably won.t break on you." (Cesar)
20:55 <@dave> come on!
20:55 <@dave> http://cesarmoco.wordpress.com/2007/07/30/a-mar-generator-release/
20:55 <@dave> I also can't go on vacation with students writing things like that!
20:55 < cesar> ;)
20:56 <@dave> "Needs some documentation. But at this point, you can probably figure it out."
20:56 <@dave> it gets worse
20:56 < cesar> its a first release. Hey, release early release often right?
20:56 <@dave> I'll be waiting on the "often"
20:56 < cesar> when did I write that?
20:56 <@dave> yesterday
20:56 <@dave> !?!

In hopes of generating more steam, I worked some more on this little XUL app and come with you with pictures and a release.

First, the screenshot. Although not appealing, please do notice that I have tabs and a proper menubar. Classy

version 0.2 screenshot

Also, the help menu has a contents submenu that may actually help. There is also a progress bar, which didn't work/exist in the previous version. There is also some bug fixes, but it isn't documented anywhere.

Anyways, I did a MAR archive of a mozilla object directory of a debug xulrunner build. I got a 255MB MAR (mind you, this is including libraries as well as object files, Makefiles, and pretty much everything), and it --seemed-- to work (ie. it finished). However, I still don't have extract functionality. Hopefully I will have another release this week.

Here is a breakdown oh what's going on :

  • Explanation of application appearing to 'hang' in the help menu. As well as documentation, both code and user
  • Better (still needs improvement) structure of code
  • Stuck an observer pattern in there for those brave enough to venture into the code.
  • Visually kicks more ass.

Wish me luck!

Linux : MAR_generator-v2.tar.bz2 - version 0.2

I am getting closer to getting a mini-mac and windows. Apologies to those developers who want to try it out.

August 1, 2007 Posted by | Mozilla, Seneca | 1 Comment

A MAR generator, release

I have received some comments on the MAR component patch. Most of it regarding a Interface change, which I am not prepared to do at the moment. There is also a bzip2 issue that still needs to be addressed.

So while wondering how to get that issue resolved, I decided to create a small (a little on the ugly side) XUL app that will generate a complete MAR file that is compatible (I believe that to be true right now, unless I overlooked something) with the Mozilla update system. That is, files are bzip2′d before being put inside the archive.

I haven’t done extensive testing yet. Though, its simple enough that it probably won’t break on you.

There are known issues with it right now that will be fixed with time :

  • Its not localized yet, as I hardcoded all the messages.
  • It’s one xul file with js in it, so the project still needs to be structured properly.
  • One thing you may have to change is the location of the bzip2 utility. Until the bzip2 issue is resolved, the xulapp calls an outside process to handle the compression. The default is /bin/bzip2. If your system has it in a different location, you will need set the appropriate setting in defaults/preferences/prefs.js (there are only two setting at the moment).
  • I don’t know how to properly use threads, from JS. I can’t create JS threads, and settimeout() won’t work for what I need to do.
    Until that is resolved, the xul window will appear to freeze until the MAR file has been created. This is normal.
  • Needs some documentation. But at this point, you can probably figure it out.
  • The MAR file should be created in a temporary environment. After you copied the mar file, feel free to delete the remaining files. You can’t specify where to save yet
  • It will recurse and copy all files from the root directory and above. There is no way to select certain files, yet.
  • You cannot extract MAR files yet.

If your feeling brave or just interested. You can grab a linux build

MAR_generator.tar.bz2 – version 0.1

Windows and MAC builds too someday. Hopefully soon! *hint hint, nudge nudge*

July 30, 2007 Posted by | Mozilla, Seneca | Leave a comment

A long overdue update

Just because I haven’t blogged in a while, doesn’t mean nothing has been going on. Hopefully, blogging isn’t any indication of how much work your doing (in fact, the people that tend to get the most done tend to blog the least!).

Personally, I’ve been keeping busy. I set up a Picasa photo album on Google (only 1 gig of space?) and put up a bunch of photos of all the interesting things I have done.

Professionally (yay), I’ve been working on creating a MAR component as a first step towards hopefully making it easier for xulapp developers to easily update their xulapps. It won’t get into the tree (as it probably shouldn’t), but there are several xul applications out there that don’t have the ability to update to the next version without completely reinstalling the application.

Of course, my work doesn’t solve the problem completely. There is still the question of developers uploading MARs and the infrastructure in place for users to get them (aus3 anyone?).

One step at a time.

July 24, 2007 Posted by | Mozilla, Seneca | Leave a comment

Follow

Get every new post delivered to your Inbox.