Blog
Page: 0 ... 5 ... 10 ... 15 ... 20 ... 25 27 28 29 30 31 32 33 34 35 ... 40 ... 45 ... 50 ... 55 ... 60 ... 65 ... 70 ... 75 ... 80
Imap Implementation
Date: 29/5/2008
Recent progress with the Imap rewrite:
  • When you click on a folder, email downloads from the server and is cached on the local disk. Clicking on it after loading it once (and restarting) is almost instant, but the flags for each email are updated some time after the folder is displayed. For instance if you select a folder that has since had email deleted using a different client, the deleted email initially appear (they are in the local cache) but after Scribe has finished querying the server the local copies disappear, so as to match the server.
  • I maintain a index of meta data associated with the local files. Included entries for deleted email. Each entry has the server's ID, the current flags (\Seen \Answered etc) and the local file name of the message.
  • When you click on a folder it reads the server's list of email and updates the local meta data and files using messages between the UI and worker threads. This seems to be reaching some sort of stability.
  • I've removed the duplicate "Flags" int from the IMAP mail class and starting using the real IMAP flags structure that the protocol handling class uses. This means that some Scribe flags are not supported at the moment (although I could re-add support using the meta data fields). This is things like the "forwarded" and "bounce" flags.
Basically it looks like the syncing between the local cache and the server is starting to work. Folders have been syncing nicely for a while now. But getting all the email to sync nicely is a lot harder. Work continues.

I also use Thunderbird for IMAP so that I can check Scribe's output against a known good client. This means that I get to experience Thunderbird's crappy IMAP implementation. Wow, and this is supposed to be a great IMAP implementation? Hmmm, I think "Not So Much!". For starters it can lock the GUI up a fair bit when selecting the inbox first thing in the morning, things seem to get stuck a bit. But most annoying is the new mail flag gets set all the time when an incoming email is filtered to a sub-folder and set to "read". Which means that every few minutes Thunderbird sticks it's little "new mail" icon in the system tray, even though it's not mail I care about, just mailing list chatter. *sigh*

So now you don't have to wonder why my vigor to write a good IMAP implementation is so high.
(2) Comments | Add Comment

Lil Avisynth Script
Date: 21/5/2008
I was playing around with AviSynth yesterday and came up with a cool little script that makes a movie out of a series of images such in the style of the Apple photo screen saver, i.e. the photos are slowly zoomed for a number of seconds and then cross faded to the next photo.

# this is the output size
x = 800
y = 600

# This is the length of each photo in frames...
seg_len = 150
# This is the length of the cross fade in frames...
seg_fade = 20


function Asp(clip c1, float a)
{
	c1a = float(c1.Width) / float(c1.Height)
	c1x = c1a < a ? c1.Width : c1.Height * a
	c1cx = c1x < c1.Width ? (c1.Width - c1x) / 2 : 0
	c1y = c1a < a ? c1.Width / a : c1.Height
	c1cy = c1y < c1.Height ? (c1.Height - c1y) / 2 : 0
	return Crop(c1, int(c1cx), int(c1cy), -int(c1cx), -int(c1cy))
}

a = float(x) / float(y)
c1 = Asp(ImageSource("image1.jpg", 0, seg_len), a)
c2 = Asp(ImageSource("image2.jpg", 0, seg_len), a)
c3 = Asp(ImageSource("image3.jpg", 0, seg_len), a)
out = Dissolve( \
			Animate(0,seg_len, "LanczosResize", \
				c1, x, y, 0.0,  0.0,  c1.Width, c1.Height, \
				c1, x, y, 32.0, 32.0, c1.Width-64.0, c1.Height-64.0), \
			Animate(0,seg_len, "LanczosResize", \
				c2, x, y, 32.0,  32.0,  c2.Width-64.0, c2.Height-64.0, \
				c2, x, y, 0.0, 0.0, c2.Width, c2.Height), \
			Animate(0,seg_len, "LanczosResize", \
				c3, x, y, 0.0,  0.0,  c3.Width, c3.Height, \
				c3, x, y, 32.0, 32.0, c3.Width-64.0, c3.Height-64.0), \
				seg_fade)

return out


I could easily see this being used to generate nice slide shows for a DVD or something. Have a app that takes group of photos as input, spits out a dynamically generated script in the same form as above, render it to mpeg2 with a soundtrack and dump to VIDEO_TS. If only there was a good free MPEG2 encoder for windows... *sigh*

(And no mencoder is not a good MPEG2 encoder, it's barely functional)
(1) Comment | Add Comment

How much offline IMAP functionality?
Date: 16/5/2008
So when Scribe v2 is offline I'm going to make the IMAP folders not editable. Or at least your edits may be lost. For instance deleting an IMAP folder won't do anything if you're offline.

Is that reasonable?

Or do you as a user expect that sync will happen in both directions?

At the moment I'm assuming the content on the IMAP server is the latest and making the local cache match that.
(5) Comments | Add Comment

Imap Deletion Behaviour
Date: 14/5/2008
Whats the standard user agent behaviour for deletion of mail and folders stored on an IMAP server?

Do the items just disappear never to be seen again?

Or do they go into a trash folder?
(5) Comments | Add Comment

Panther Support Dropped
Date: 13/5/2008
In the upcoming round of Mac releases I'm dropping explicit support for Panther. Supported OS's will be 10.4.11 and the latest 10.5 release. I will try and make a PPC build as well as an x86 build but they'll likely be separate releases so that the download size is reasonable. Otherwise Scribe will be like a 4mb download instead of a 2.1mb download.
(0) Comments | Add Comment

Mac Native
Date: 10/5/2008
I know that it's been a long time between drinks regarding Mac releases. And thats mostly because I've been very busy with other projects. But the last few weeks I've been working more and more on the Mac codebase. I've spent a lot of time re-working the drag and drop support. Which apart from not looking any different is becoming more reliable and flexible. Secondly I'm working on compatibility with standard Mac key bindings, for instance hiding a window. And now I'm playing with the native Mac file open dialogs. I've got a basic implementation working. Now it's a case of mapping all the parameters to the various Mac APIs.

As for the various apps I've ported, I've got i.Mage working quite well on Mac and i.Hex has been ported as well. The Scribe port is undergoing day to day testing. I've changed some things in the receive code to log all the accesses to the mail transfer status variable which has been getting corrupted by something. So far so good.

I'm also planning to play with some of the native controls inside the context of an Lgi application. Which hopefully will make the app look and feel more native. I'm wondering if I can make the toolbars extend the title bar down over the buttons. Hmmmm.
(2) Comments | Add Comment