September 2010
1 post
3 tags
Rethinking the MPS II compilation chain
During summer I’ve spent a lot of time looking at how Qi compiles to Common Lisp.
The thing is that I’ve written the MPS II macros to expand into something that looks like it’s been hand coded. That’s been sort of a corner stone in the idea behind MPS and MPS II. The reason is because I wanted to allow easy inspection of the generated code to allow finding bugs and other...
May 2010
2 posts
1 tag
Obscure Programming Languages Exploration Group
A couple of days ago @niclasnilsson and I started talking about starting an Obscure[1] Programming Languages Exploration Group here in Gothenburg. Earlier today we met for lunch together with @jorgen99 to discuss how to go about it.
There’s nothing much decided yet about form or content but a few things are worth mentioning anyway. Mostly because I’d love to hear your thoughts on...
2 tags
Finishing up MPS II
Today I added the last of the missing functionality in MPS. With the last commit I’ve got 11 functions in the public API. They are (in alphabetical order): agenda, assert-facts, clear, deffacts, defrule, facts, halt, modify-fact, reset, retract-facts and run. Some of these could have been left out and some should probably work differently from how I’ve implemented them now but...
April 2010
1 post
4 tags
Introducing slime-lispunit
For a couple of weeks now I’ve been playing around with Lisp-unit and Slime. The idea is to provide some basic TDD support for Common Lisp programmers. The result is slime-lispunit.el and the code can be found on GitHub. Unfortunately, at the moment, it requires my fork of lisp-unit to work. I’ll try to either have my changes merged with the original or modify slime-lispunit.el to work...
March 2010
4 posts
1 tag
Ada Lovelace day
Today is Ada Lovelace Day, a day to recognize women’s contributions in technology and science. People around the world are contributing blog posts, videos, cartoons and podcasts to draw attention to women and the amazing work they do or have done.
I’m fortunate enough to know several talented women who work in IT and have had the pleasure to work with a few of them. But for today, I...
4 tags
TDD and SLIME
I’ve finally gotten used to the rhythm of test-first development. It took me a while to get here, but now, I wouldn’t dream of writing code without tests.
Even though there are plenty of test frameworks available for Common Lisp, no one has bothered connecting one with SLIME. Personally, I find that very odd since unit tests are meant to be run often. The test suite should evolve at...
4 tags
A walk through of the compilation process
MPS II integrates seamlessly with the Common Lisp compilation chain. This means, among other things, that if your Lisp implementation produce compiled code; then your rules will be compiled as well.
This integration is achieved using macros. Macros make it very easy to transform source code from one shape to another and it all happens before compilation time, so once all macros have been...
4 tags
A first look at compiling a defrule
Currently, the code in the MPS II git repository, is only capable of reading a defrule form and printing out the Common Lisp code it compiles into. There are several issues still to fix, but the overall structure of how a defrule is turned into Common Lisp code is there.
February 2010
2 posts
2 tags
Things to fix in MPS II
Apart from some re-structuring and making the code more readable and easier to understand I also want to fix a few things that I’ve left out in MPS. There are several things that are broken or missing, depending on how you choose to see it.
Most notably the packaging is all wrong and the Not-CE (conditional element) can only handle one Pattern-CE. There are a couple of other minor things as...
2 tags
MPS II
Minimal Production System (MPS) is an attempt to write a fully functional CLIPS-like Production system in less than 1000 lines of Common Lisp code. As of today (2010-02-23) mps.lisp consists of ~700 lines of code and works pretty well. It’s not fast (compared to CLIPS) but it’s not slow either (compared to Lisa).
MPS II is (going to be) a cleaned up version of MPS. There are a number...