by Mike Bennett
What to know before debating type systems is a really good article discussing static and dynamic type systems and type inference. I found it via Dry Sellers CodeBetter.com blog post Sunday Thought: Embracing the Type System.
Related to that, if you’d like to learn more about type inference algorithms, have a read of Code Commit’s blog post What is Hindley-Milner? (and why is it cool?). The post gives an easy to understand overview of the Hindley-Milner type inference algorithm.
by Mike Bennett
On and off over the years I’ve developed various software projects for fun. One of those projects is called Thwonk.
Thwonk is a bit like node.js, except it’s for messaging and online communication systems. The purpose of Thwonk is to enable developers to easily and quickly create and prototype new kinds of Internet messaging and communication systems.
For example, with Thwonk you can easily develop a mailing list that trims all mailing list posts to 140 characters (a Twitter-like mailing list!). In Thwonk, this Twitter-like mailing list works as follows:
1. A message (in this case an email) arrives at a Thwonk email address, such as email@example.com
You can easily imagine other kinds of messaging rules, e.g. a mailing list where everyone on the list can only post once a day, or where all mailing list subscribers HAVE to post once a day (otherwise automatically unsubscribe them). As Thwonk matures I’ll extend it so you’ll be able to play with the rules of other online communication systems, such as web forums.
The source code for Thwonk is up on Github:
www.github.com/mikemb/thwonk (see backend dir)
This version of Thwonk compiles against the 1.6 branch of Spidermonkey on Linux. I’ll be shortly updating the code to support the recent 1.8 branch of Spidermonkey and recent versions of the mailutils dev libraries. There are automated build scripts for the backend, i.e. configure; make. Thwonk currently depends on spider monkey 1.6, libmailutils 1.2 and mysql dev libraries.
A few immediate todos are:
2. Add in documentation explaining how to get Thwonk up and running on your own server.
3. Simplify the setup and configuration (there’s a bunch of hardcoded configuration options that absolutely should be stored in the database and external configuration file – naughty me!).
5. Publish architecture documents, i.e. how do the various components and dameons in Thwonk fit together and communicate.
6. Add unit testing.
7. Add support for web services, i.e. both accept and publish message via a web API
8. Refactor Virtual File System
Over the next few weeks I’ll go into more details of Thwonk and provide examples of how to program with it. If you’re wondering how fast Thwonk is, as in how many messages it can handle per second – the non-specific answer is lots and its got a distributed architecture so it should scale across multiple cores and computers. I’ll re-run my evaluation scripts and graph the results of the number of messages it can handle per second. IIRC from the last time I tested Thwonk it was able to process messages much faster than the mail server could accept and deliver them.
Thwonk was inspired by a previous project called BumpList, which I co-created with Jonah Brucker-Cohen. Thwonk is our new project – you’re welcome to get involved!