Saturday, April 5, 2014

Announcing jsmime 0.2

Previously, I've been developing JSMime as a subdirectory within comm-central. However, after discussions with other developers, I have moved the official repository of record for JSMime to its own repository, now found on GitHub. The repository has been cleaned up and the feature set for version 0.2 has been selected, so that the current tip on JSMime (also the initial version) is version 0.2. This contains the feature set I imported into Thunderbird's source code last night, which is to say support for parsing MIME messages into the MIME tree, as well as support for parsing and encoding email address headers.

Thunderbird doesn't actually use the new code quite yet (as my current tree is stuck on a mozilla-central build error, so I haven't had time to run those patches through a last minute sanity check before requesting review), but the intent is to replace the current C++ implementations of nsIMsgHeaderParser and nsIMimeConverter with JSMime instead. Once those are done, I will be moving forward with my structured header plans which more or less ought to make those interfaces obsolete.

Within JSMime itself, the pieces which I will be working on next will be rounding out the implementation of header parsing and encoding support (I have prototypes for Date headers and the infernal RFC 2231 encoding that Content-Disposition needs), as well as support for building MIME messages from their constituent parts (a feature which would be greatly appreciated in the depths of compose and import in Thunderbird). I also want to implement full IDN and EAI support, but that's hampered by the lack of a JS implementation I can use for IDN (yes, there's punycode.js, but that doesn't do StringPrep). The important task of converting the MIME tree to a list of body parts and attachments is something I do want to work on as well, but I've vacillated on the implementation here several times and I'm not sure I've found one I like yet.

JSMime, as its name implies, tries to work in as pure JS as possible, augmented with several web APIs as necessary (such as TextDecoder for charset decoding). I'm using ES6 as the base here, because it gives me several features I consider invaluable for implementing JavaScript: Promises, Map, generators, let. This means it can run on an unprivileged web page—I test JSMime using Firefox nightlies and the Firefox debugger where necessary. Unfortunately, it only really works in Firefox at the moment because V8 doesn't support many ES6 features yet (such as destructuring, which is annoying but simple enough to work around, or Map iteration, which is completely necessary for the code). I'm not opposed to changing it to make it work on Node.js or Chrome, but I don't realistically have the time to spend doing it myself; if someone else has the time, please feel free to contact me or send patches.


Company Switzerland said...

There are several advantages of forming a company in Switzerland, according to the World Bank report on ease of doing business. Please consider registering a company in Switzerland, especially, if your country of domicile has certain complications (namely political, regulatory or tax-related).

Roxane Fabin said...

Wondering where to get an Online Matlab Tutor? At Matlab Assignment Help, we offer timely classes for all Matlab students in need. Other than the tuition classes, we also complete your assignments ensuring that you get the top grade in your class. Our prices are fair because we understand that most students don’t have a source of income. However, the fair price does not mean the quality of work is compromised. Visit our website “ Matlab Homework Help”today and talk to an expert.

sadiya perween said...

My control systems solution was great but unfortunately, it was delivered a day after the deadline. I took Matlab assignment help from here because I had read some really good reviews about MatlabAssignmentExperts and especially where the customers were happy about their assignments being delivered on time and sometimes even a few days before the deadline. I had a totally different experience and the only reason I was able to beat my deadline was that I had given the Matlab assignment helperwho handled my task the wrong deadline. Still, the platform isn’t so bad because I got a decent grade from the solution they prepared but they should address the late delivery issue asap.