Blog Closed

This blog has moved to Github. This page will not be updated and is not open for comments. Please go to the new site for updated content.

Tuesday, May 6, 2008

MATLAB Wishlist, Redux

A user "Andrew" left a comment on my earlier "MATLAB Wishlist" post to alert me of a few changes to MATLAB that satisfied some of my requests. In response, I took some time to browse through the documentation, and here is what I came up with:
  • Object Orientation: MATLAB, at least as of r2008a (I don't know where a changelog might be, so I don't know when this feature was added) has better support of classes and objects through the classdef keyword. It may not be as robust an implementation as I've become accustomed to with the forward-thinking Perl 6 crowd, but it certainly satisfies my request.
  • Multithreading: MATLAB has implicit multithreading (or, as Parroteers would say, "auto-threading") that helps with things like vectorized operations. This is part of the implementation of a builtin function, and operates in a way that is invisible to the user. My version of MATLAB (r2006a) doesn't seem to support this, but r2008 does. Explicit multhreading, however, still isn't a part of basic M code as far as I can see. That doesn't mean it isn't there, it just means that I couldn't find it under a name that I would recognize. Also, I have noticed the addition of task scheduling, using a timer object and a callback function. If the current operating thread doesn't suspend when the timer fires that would, indeed, create a multithreading situation. It wouldn't take more then a little brainpower and a few extra hours in your day to create a nice multithread library, if that was the case.
I will note however, that there is a Parallel Computing Toolbox which does provide multithreading capabilities of some sort. From what I gather, you must interface directly with a specific scheduler object by passing in a callback, and then retrieve the callback results from the scheduler. This is certainly an interesting implementation, and would seem to satisfy a second wishlist request if you purchase the additional toolbox, that is.

Two of my other requests, namespacing and code embedding don't seem to have been satisfied yet, but they were relatively minor in comparison. Considering that MATLAB already ships with an installation of ActivePerl, it would seem possible for them to find some kind of way to mix it in to the ordinary M code scripts. When you reach a "START_PERL" tag in your code, the M code interpreter could create a sandbox, set up the variables, and pass the code to a Perl interpreter object. I can't be the only person who feels that the vast CPAN library system wouldn't be a boon to MATLAB development.

Either way, I think this is a good testiment to the use of high-quality proprietary software. Instead of waiting for me to get my fat butt in gear and writing these things myself, a team of professional developers have implemented the solution for me. MATLAB is the perfect example of a piece of software that I am willing to purchase, because it's high-quality and it's feature set is increased regularly. That doesn't mean that I'm not going to write my own port of it, it just means I like MATLAB too.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.