Archive for the ‘News’ Category

Yet More Work On The Blog

Saturday, October 4th, 2008

Theres been quite a lot of work going into the blog under the surface recently. The most important being an update to the current version of…well everything. The most obvious ramification of this process have been the change in theme, back to the default bundled theme (not counting the header color which is modifiable in the settings page of the them). I intend to keep this version which is considerably faster (than K2) and I think still more than usable, while I start developing a completely new theme for the blog (no time frame however, as per usual).

The other change is not particularly obvious, but basically the site is now under the Git DVCS. This will make it significantly simpler to manage any updates of the site while concurrently maintaining the code I write for the plugins and visual style. Basically the site is maintained through a collections of branches which are rebased into the deployed branch which is finally published to the server. The files on the server are then reset to the latest version of the deployed branch. The side affect of this being, I can update any single piece using its corresponding feature branch and simply rebase the dependent branches to the last patch on that branch, while any changes after the branch or merge point are simply re-applied afterwards (by Git, not me). Update…fix conflicts…push…done!

So I promised more actual posts I believe, I am getting to it, albeit slowly.

For some background into the lack of actual language related work I’ve produced lately it helps to understand, arguably the most important, project that I’m working on right now. The Mention Programming Language is a new language that I’ve had in the works since the very beginning of this blog. At one point I even had some pages dedicated to the language. Don’t bother looking, there are no posts about the language yet… I decided very early on to develop the language in the dark, at least until I was sure that it would lead to an actual release of some sort (I’ve worked on quite a few dead language designs over the years).

So Mention is a functional programming language with strong influences from Haskell, and Smalltalk. Yup, you heard right, the design of the language is a dynamic one, which despite the Haskell based syntax will provide a myriad of dynamic features like delegation and accessors more, much more reminiscent of Smalltalk than Haskell. There are a couple of other minor influences that creep in there every so often, due to other languages I’ve worked with or investigated (the design), but those are the main ones.

There’s only one problem, however. I don’t understand the math (lambda calculus and type theory) needed to implement the language yet. I’m getting there but it is taking a little while. The good news is that this wont stop me from posting for much longer. Some of the posts might be about specific things relating the the theory, but the real problem was my lack of a mathematical background. Thanks to my undergrad math text that problem is much less of an issue now and it the Mention project should be getting underway properly very soon, expect some posts on the non-implementation issues like the syntax high level semantics.

On another issue might now be obvious why I haven’t finished the Scheme parsing library and the corresponding series about its design and implementation… I’m not working in Scheme anymore. There is still plenty I could say about the design of Scheme and Lisp dialects, but I’ll leave that for later, but what I would like to add in post in the near future is the relationship between laziness + monads and strictness + mutable-state. For this comparison I’ll be using Scheme and Haskell (don’t worry…the code will only be for examples in both cases). What won’t be happening is any more posts or work on the Scheme parser itself.

– Lorenz

New URL, Update your bookmarks…

Tuesday, September 16th, 2008

After sitting on the domain name associated with my online handle (Krysole), I’ve finally decided it was time to move my blog to an URL using its own namesake.

What does this mean?

From now on the proper URL for A Lexical mistake is simply alexicalmistake.com

The configuration for the site seems to properly redirect pretty much everything to the new URL (including permalinks… I’ll keep the old URL pointing to the site for this very reason).

On another issue, the blog very much isn’t dead, it just seems that way because I’ve been somewhat preoccupied lately. The main reason for this is my move to Linux, or more specifically Ubuntu. I’ve also been transitioning most of my mac dependencies to their web equivalents (Google reader, etc).

The point is I should be back to posting biweekly again (or close too), very soon now.

– Lorenz

Experiments in Emacs

Saturday, July 26th, 2008

One of the most difficult challenges facing me when beginning to work with both Erlang and Haskell, was the significant lack of good IDEs… Well, at least that was the theory, anyway. Instead it turned out to be a real motivator to finally get around to investigating the only IDE that counts.

The real problem wasn’t that I couldn’t use Emacs for basic editing, rather I didn’t really have any idea how to use any of the extra features. Essentially it was like working with a semi-decent TextEdit.app, with code highlighting and unfamiliar keyboard shortcuts. Even after reading some of Steve Yegge’s essays I still didn’t really have any idea what I was doing.

Ok, so basically I’m now writing this in Emacs’ SGML mode and carefully trying to get around the perverse limitations of Wordpress. (Where the heck did the allow raw HTML checkbox go for author text?) Ironically I don’t think I’ve yet gained the productivity advantages from my efforts yet, but honestly that can probably just be attributed to a slow down in my typing speed and the rather unexpected work schedule I’ve been (you never realize just how much you appreciate sleep until you don’t get enough).

If I haven’t gained any real productivity, the question becomes why then am I still using Emacs to write this post? Well, as it turns out its not actually too bad for even when you don’t know all of the keyboard commands (all commands come from the keyboard, and most important commands really never migrate to them menu or at least don’t indicate they’re keyboard equivelent).

Even more importantly perhaps is the gains that I’ve achieved in other tasks…writing blog posts in Emacs may not be any faster for me (although I do seem to see much more of the post at any one time)…but writing code sure is. I seriously doubt that I’d change from using things like XCode for Cocoa applications or DrScheme for PLT Scheme applications (although I may change my mind on Scheme), but at least I have direct access to the REPL in Haskell and Erlang.

The way most of the editing modes in Emacs actually work, it essentially will even load up a file your working directly into a REPL running side by side in another text buffer. From there you can test smaller parts of your program or even just run the whole thing from the top if you needed to. Anyone who’s worked with a Lisp dialect or even Python or Erlang (among others) should be able to apreciate that.

There are a couple of things that have been bugging me so far. The first is the lack of a spell checker. Emacs does have built-in support for ispell, but as you probably guessed, it doesn’t work on my machine (actually it isn’t even installed on my cygwin install). Too make matters worse, I still need to teach Emacs how to find my Cygwin install and use programs from it before the windows paths…ugh…

And the other thing doesn’t even have anything to do with Emacs, but rather, its a limitation with the Haskell code I’m working on. Essentially I don’t have a framework for OpenGL work that allows me to substitute the code on my side of the framework after the application has been started…or more to the point I can’t stop the application after it has started, forcing me to quit the entire REPL every time I test the Game.

Of course the simple workaround is to just keep restarting the REPL or move out of Emacs into a Cygwin shell, but its still very inconvenient (damn you GLUT).

All in all I can only really see how it goes, but at the very least it should make life just that little bit easier. At worst, I’ll just have to resort to my aging Mac Powerbook (for the BSD layer).

Until next time…

– Lorenz

More Parsing and Lisp

Friday, February 22nd, 2008

The predicated parsing language (MMeta) is still very much on the way, and it’s starting to really shape up finally. So far the dialect of the parsing language is tailoring quite effectively to the PLT-Scheme target language and I hope to release a simple pair of scheme source files with the basic interface, and the pre-translated parser.

The parsing engine really is purely predicated, and still requires functional actions and predicates (since it doesn’t do any dual mode parsing like ANTLR 3 does, when it generates backtracking code), but on the whole, the tricks you can do with it are still very effective.

Once I get the architecture working properly, I’ll try to bolster its functionality to my original intentions for the parsing language, and also do a proper article on it, that describes the algorithms used to power the language and also, how to apply it effectively (a practical look at the language and its implementation).

On a less interesting note, I’ll be back at uni very soon, and that means that while I believe the parser and its documentation will still be up within a couple of weeks, it may take somewhat longer before I can get a good start on the Mention programming language itself (the Virtual Machine actually, but that’s still a start).

Because of this I’ve taken the brief general design description of the Mention language down until I have both, finished the page in question, and actually have some code worth checking out. I will still keep up the updates coming for those who are interested in the language.

– Lorenz

Evil Schemes to stop the Squeaking

Wednesday, February 6th, 2008

After working on the Squeak based Mention prototype for some time now, I’ve come to the conclusion that its finally time to put the prototype to rest. Yes, I realize that it have never actually worked yet, but the truth is, Squeak still lacks significant services for language research and development.

The final nail in this case, goes out to the Transcript window, now defunct for god knows why. I actually considered attempting to find a fix for it, or even fixing it myself, and then I realized the obvious. I don’t like Squeak. Its always flakey, or broken, or difficult, or anything but genuinely useful!

I’m sure there are plenty of things it does well if you’re interested in Seaside, but I’m not.

Then I considered the last language I was working on (a concept Lisp that was intended to integrate newer Object-Oriented ideas like Traits). The interesting thing about Lisp is that it handles the Virtual Machine work like there’s no tomorrow. Its also simpler and console based, and you can generate lambdas without even really thinking twice. Hugely important if you want to quickly prototype some high level stuff, that also needs to run reasonably efficiently (not stuff that’s directly part of the language, but rather the VM’s implementation itself).

So, I’ve decided to finally get around to learning the thinking mans Lisp, Scheme. Scheme may not be massively different from other Lisps (i.e. Common Lisp), but it does tend to do things in a somewhat more straightforward fashion. The biggest example I can think of is that it is a Lisp-1 language, which means that there is only one namespace. This is a big plus in my book, for languages that do not provide separate syntaxes for selectors and variables. Mention of course has two namespaces, due to the selector syntax involved in sending messages. On the other hand, selectors in Mention and Smalltalks in general do not always correspond to the same function object.

If all goes well, I should get started writing actual code within a couple of weeks, with a reasonable understanding of Scheme. Since I already know a reasonable amount of Common Lisp I don’t believe it will take too long to learn, but you never really know with close cousins in the languages world.

I would also like to take the time to note that I’ll be developing a reworking of the OMeta parsing architecture for PLT-Scheme (or some other dialect if I swap away from PLT, but that seems unlikely). This parser framework is called MMeta, as I’ve probably mentioned (no pun intended) before, and will serve as the basis for the compiler and parser used throughout the Mention implementation and within the implementation. The PLT-Scheme variation of the actual parsing code (and the S-Expression support), will be referred to as MMeta-L (for Lisp).

– Lorenz