Sadly, exams have proven to take up more time than expected. Today’s exam was ok, easier than I expected. Also easier than previous exams from this lecturer. At least my last exam is on Wednesday, so after that I’m free.
I have however managed to do some investigative work.
I looked at pynie, to determine whether there’s anything worth reusing. As it happens, pynie hasn’t been working for quite a while now. I tried to bring it out of bitrot, but I didn’t have enough knowledge of NQP/PCT and didn’t bother to do more than make it build. Furthermore, PCT isn’t particularly friendly towards python developers.
Allison suggested that I might reuse the tests, but the rest is of little use. The bootstrap tests can’t easily use a python testing tool, since it during boostrap Python code can’t run yet. Py.test might help with that, but I’m not sure I should bother using it (as opposed to unittest).
I had planned to decide this week between using 6model or building my own object model over Parrot’s existing objects. While 6model appears to be able to fully support Python, I’m reluctant to jump in and use it while it’s still an external dependency. I don’t particularly want to pioneer in the usage of 6model on parrot, I’d much rather someone with more 6model experience did that instead.
I’ve started playing with the ‘ast’ module in Python3. I’ve figured out how to walk the AST, now I have to decide what to do with it. One option might be trying to transform it to PAST and letting parrot generate the code, but afaik PAST doesn’t have a textual form that I could target. The other option is linearising the AST and generating PIR, which is likely the one I’ll take unless things change or someone tells me it’s a stupid idea.
As you can infer from the title, I’m quite excited about my latest progress.
Firstly, Browse can now save bookmarklets. When you trigger the palette (right click) on a bookmarklet, the ‘Download link’ option in the palette is replaced with a ‘Save bookmarklet’ option. A new toolbar appears where all the bookmarklets are lined up as buttons. They work rather well and are saved through to SSBs.
Secondly, userstyles now work. There’s a new button in the edit toolbar (I’m open to suggestions about the UI) that opens a small window with a gtksourceview inside. You can write (or copy/paste) CSS in there and click ‘Save’. The CSS is immediately applied to the page and is saved in a file in the activity preferences.
There’s another small feature I’ve added. When you create an SSB, the activity preferences of Browse (without caches and cookies) are saved in the SSB bundle. When first run, they are copied over to that specific SSB’s activity data.
Here are some screenshots:
You can get this commit and try it out.
- GMail – probably the most complex, its offline feature is almost a unittest for Gears. With a lot of emails, it should show performance issues with Gears in Sugar. It also has several themes (some of which would look alright inside Sugar) and even allows users to choose their own colours.
- Google Calendar – there have been several interface customisations using userstyles and userscripts. It should be easy enough to make one for Sugar
- Google Docs (in particular, writer) – also quite complex, with a lot of Gears usage for the offline feature. Documents are plain HTML 4 (not quite valid), interesting
- MindMeister - very interesting, possible educational value
- Buxfer - impressive web app, seamless use of Gears. option to store the data only on the client with Firefox extension (firebux).
- Passpack - interesting use of client-side encryption (passpack.com can’t see your passwords). Gears for resource caching. 3 offline clients: desktop, AIR and Gears.
- Zoho Writer (and other docs) – much heavier and slower than google docs, interface tries to mimic MS Word and is probably very hard to customize. Plus, I already have an office suite on the list
- Google Books – not much of a web app, I can’t see how it would help to have it in a separate activity
I welcome any feedback and will probably edit the list accordingly.
I really hate my name. I have two surnames, sometimes spelled with a hyphen, sometimes without. Even fellow Romanians often have trouble understanding my name, let alone Brits. It was sooo hard to get the insurance company to admit I had payed for the insurance.
My laptop was (accidentally) damaged, and since it was insured I had to send it to be repaired or it would look suspicious. Its disc drive wasn’t working and the (flimsy) case was bent, but it was otherwise fine. Thankfully, I had a backup (Time Machine) and I use Dropbox for my important files, so none of my data was lost. Quick tip: don’t buy apple products if you can help it (mine was a gift).
Anyway, now I have to use Uni or friends’ computers, most of which run Windows. I’ve got some portable apps in my Dropbox (including portablegit) and I use loads of web services, so for anything but actual development I’m fine. I should be able to develop even if my laptop (or the XO) doesn’t get delivered on time, by borrowing my girlfriend’s computer. There’s also a fedora cluster in the Uni, but I’d probably have to set up a chroot/virtualbox vm.
Since I have less distractions, I’ve had time to think and do some research. I’ve looked at other SSBs and other efforts to add desktop features to browsers and the other way round, to see how they do things. Here’s what I found:
- Adobe AIR - basically a flash element that can embed web pages if it really wants to (ironic, right?). It has some desktop integration features, but it really fails at native look & feel. It provides filesystem access and several ways to store data. Decent security system.
- Prism - very simple SSB. SSBs created with it are applications in the desktop (icons, can have file associations, etc.) and recently they can minimize to the system tray. It has notifications, in the form of systray/dock icon changes and popup alerts. It also has a feature I really want to steal, the Refractor Firefox extension, which allows the creation of SSBs from inside Firefox.
- Gears - very popular for taking web apps offline, especially in open source. It does three important things: local storage via SQLite, WorkerPool and some desktop integration (including some filesystem access). It also very recently got a Geolocation API and it will soon (enough) get a Notifications API. What I really like about it is its non-intrusiveness. It adds some features that are really needed for developing web applications to most browsers that matter (including some mobile ones) without a separate runtime or alien technologies. Google Chrome uses Gears to create SSBs, but they don’t really do much besides being separate windows with no chrome (no systray, no notifications).
Wishlist for Webified:
- An option in Browse to ‘create new activity from this website’
- Gears, saving its state to the Journal.
- GreaseMonkey and Stylish (or perhaps steal Prism’s?) – essential for customisation and native look & feel
- Bookmarklets as toolbar buttons. There are tons of bookmarklets out there and they are used in the same way toolbar buttons are, they just usually reside on another bar.
- Ability to install bundles of userscripts, userstyles and bookmarklets to make SSBs more sugar-y. Or perhaps even include bundles for very popular websites. A bit like Prism’s bundles, but not necessarily with stuff specific to Webified.
This is just a wishlist, I probably won’t be able to get everything done during GSoC. My plan outlined here stays mostly unchanged. But I have had time to think more about these things and how I’d like them to work.