Flame for the iPhone

I’ve been playing with iPhone development recently, and have ported Flame to it. Well, re-implemented, really – Flame is written in Python and there’s no PyObjC for the iPhone, and nor is there likely to ever be. But Objective-C is getting easier as I get practice, and this app even has a modicum of proper memory management.

This time, the source lives in GitHub/jerakeen as git seems like the cool kid this week and I need the practice. I’d expect it to build and run in the simulator just fine, and it runs on my device, so it’ll run on yours if you know the magic hoops to jump through. It’s possible that this app might actually make it to the App Store at some point, though it’s somewhat niche.. You never know.

Let me know if you have ideas for improvements. For a start, I’d like certain services to be linkable – HTTP servers should open their web page in Mobile Safari if clicked, for instance.

More UTF8 pain

Does no-one in the world care about non-ASCII characters? It’s pathetic. I’m trying to make HTML form uploads work for files with non-ASCII characters in their names, and I’m hitting the stupidest problems.

The main bugbear is mozilla – you can’t upload files with wide characters in their names. At all. Piece of shit. Safari seems to be encoding the upload filenames with some made-up encoding that I can’t figure out, so that’s out of luck. At least safari sends the actual contents of the files.

The one browser I’ve tried that works flawlessly is Internet Explorer. Microsoft, at least, seem to care about the non-US market.

safari and password fields

Today I discovered that safari ‘magically’ downgrades latin-1 input in form password fields to their nearest ascii equivalents – typing ‘pásswörd’ into a password box actually submits ‘password’. But you can cut and paste non-ascii in and it works fine. I’m very confused.

tabbed browsing

Dave Hyatt, the insane fool who is the public face of Safari, has actually asked for comments about the UI of Safari. So naturally every single comment and trackback mentions tabbed browsing. Hell, there’s even a comment saying roughly ‘I’ve never used tabbed browsing, but lots of people clearly like it, so they should put it in’. I consider this another good reason to kill all humans.

My house as a whole isn’t a big fan of tabbed browsing. blech will grouch on about them for hours. hitherto has actually ranted in a public place about them. But given the massive number of pro-tab advocates out there, I find myself needing to stick an oar in and splash as many people as possible as well, just to keep things even. And not only that, but I have the opportunity to trackback to someone who’s invited it. Oh, the excitement.

So. Tabbed browsing. it’s been around a while, I personally first remember it in Opera, but my first serious exposure to it was in Galeon, under Gnome 1. And verily, it was Good. I could put my browser on one virtual desktop, set all links to open in tabs, and then click links merrily from other apps. When I was done, I’d go back to the desktop that held my web browser, and gosh, look, there’s a big heap of links here! Shiny! When I switched to Phoenix (or whatever it’s called nowadays) under Gnome 2, I used in exactly the same way. And it was still good. And faster than galeon, even.

But that’s all missing the point. I was forced to use tabs there because the window-switching system is totally brain-dead under Gnome. I typically have 20+ browser windows open. Hell, I can have 40 if I get distracted. (aside: I loved galeon for this – the crash recovery was second to none. I’m afraid to open that many windows under any other operating system because if the browser dies, I lose them all.)

The problems with window-based browsing:

  • Opening links pops a window to the top of the stack. I hope Alt-Tab works properly, because it’s a pain finding what you were just doing otherwise.
  • If I’m using a taskbar, all the window buttons get tiny. I can’t pick the browser I want. I can’t pick any other app either, for that matter. All the buttons say ‘Docu…’ – really handy, that.
  • If I’m using some sort of window list, all my non-browser windows are hidden in the huuuge list of browsers. Oh, and the 10 windows called ‘Terminal’, that was great too.
  • I’m not even going to describe what the Alt-Tab list looked like. Ok, I am. 40 ‘web’ icons. Brilliant.

I’m now on a different platform. I use a mac. And the mac has per-application switching. So my Command-Tab list is manageable, I can switch between a relatively small number of running apps using the dock. And once I’m using the app, I can have a window list of all the windows belonging to that application. So I know I want a terminal, so I switch to the terminal app, and then I can flick through the terminals I have open until I find the right one. I can switch to the web browser, and easily get a list of open web browser windows. In fact, I can click and hold on the web browser icon, and jump straight to a required web browser with one (long) click. Handy.

Essentially, the task/window switching on the mac isn’t like windows. It’s very different, much more than appears superficially. Under windows, and under linux, tabbed browsing seems to work, giving you the same ‘switch to app, then decide what window I want’ behavior. It’s a different interface on the whole MDI nightmare that windows suffered from for so long. Under linux… hell, linux is a world to itself, as per usual, and I’m not going to judge it. But the mac has a way of dealing with this problem. It’s always had a way of dealing with this problem. People need to stop coming up with other ways to solve it, ways that aren’t as good.

Oh. And an actual feature I would like? It would be nice to be able to click on an RSS feed from a site, and have NetNewsWire subscribe to it. So I need the ability to set programs to be run for specific MIME-types. That would be nice.

Web browser features

blech and I have been talking recently about things that web browsers really should do. We both get annoyed when browsers won’t save the state of opened windows (pith helps here for our web browser of choice, but that’s not the point. It should be app-level – Galeon was superb in this respect.), but there’s other, smaller, things that browsers could do to help people.

For a start, they need to understand the concept of a ‘dirty’ (changed/unsaved state) window, and prompt the user if they try to close it, in the same way that you can’t just close a changed document. Changing data in a form makes a window dirty. A page that’s the result of a POST request is dirty. In short, if I’m looking at state that can’t be retrieved from a bookmark of the current page, the window is dirty.

Form field contents should be remembered completely. Safari is very good about this already, and does some clever tricks somewhere to figure out which forms expect, say, my email address, and fill it in automatically. IE does this too, and it’s a good start. But I’d prefer every form I ever fill in to have it’s state remembered by the browser. I want to bookmark a page with filled-in forms, and have them stored in the bookmark. And I want to hit ‘back’ and have the forms still filled in with whatever I left in them. The number of times I’ve put something long and complicated into a webmail client, hit ‘send’, seen a timeout error, and lost what I was writing forever… I have the habit of putting the contents of big Textareas into the clipboard before hitting the submit button. This isn’t the habit of a man with working technology.

2lmc , as always, have an opinion on this, which is what sparked this ramble off.