Monday, July 14, 2008

Dreaming in Lisp

I've got my graphics drawing bindings working last week (Cairo) and now I have a chunk of my text typesetting (Pango) library working. I got so far as to get some text from Pango drawn with Cairo in Lisp. It's a big step for me. Once I get Pango and Cairo Settled I can start fixing and updating the OpenGL bindings. I have a list of problems to figure out, such as listing all usable fonts in the system, creating blocks of text with different properties, etc. Then I can start in earnest.

I know I've been vague while talking about my project. Honestly, I didn't know if it would even be useful but I've talked about it for over a year while I've changed my ideas over and over again. Now I'm almost back where I started but this time, I know where I am and where I want to go. For those who use Lisp, this is the simple definition, a multithreaded 3D Emacs written in Common Lisp. For everyone else, it's a three-dimensional graphics drawing package with a language included. Is this a game engine? Yes and no. It can be, but instead think of working with your computer in three dimensions without needing another application. Emacs is a text editor, it can only show text and limited graphics. This will be able to handle that and much, much more. A web page would simply be a set of layered rectangles. Documents can be this way as well. The fluid structure of Lisp will allow the data to define how is displayed.

This would be enough to use my project, but if we added a remote database, Globally Unique Identifiers (GUIDs), a little encryption, and several users and locations it can allow users to keep the same desktop everywhere they have a computer. They could also see who else is on and, with permission, send them a message. Since, in Lisp, data is code the data could be text, animated graphics, a shared document, or something like a webpage. All this and more. Part of this is a lack of imagination. I can't predict how an application will be used.

I know cliki has asked for a game engine, it can be a game engine. Only this should allow the developers to change things on the fly. Don't like what an item looks like, switch to an edit mode and change it. Want to change the behavior of an enemy, edit the code and watch it run around. The applications are staggering. Getting data from the real world doesn't become a chore; want the weather to reflect a real place? Look it up with Lisp calls.

Granted I want to change a lot about how I use a computer, but I think the way we have used them are simplistic and only give a fraction of their power. This will be an interface for anyone, but one that will grow with the user. This is a graphical user interface for smart people, not dummies. There are more things to add, integrated version control, a Lisp sandbox, audio and video codecs, multiple-users editing a 'file'. Collaborating will become normal, not special, sharing with friends will become simple and safe. This can happen, and it's a good thing.


  1. Wow. I really like your idea. I've been thinking along the line you are for a while, but not being a professional programmer (i did applied maths, and am working as a traffic engineer), I find it hard to do/start projects like that. I had thought of using the graphics interface to program with. Basically recursively drawing s-exps to the screen in 2D or 3D (while also drawing other things such as monsters, items, libraries, etc. in the same way).

  2. Why use pango and all its dependencies ? I think you should try
    to avoid C dependencies and keep mostly lisp libraries. Have you taken a look at vecto, cl-vectors and zpb-ttf ? These are 100% common lisp libraries that should allow you to read and rasterize truetype fonts and use them with cl-opengl.

    If you pull in pango/glib/fontconfig and all this mess it becomes harder to port your program to windows/osx.

  3. Wow, it's been a while since I've checked my blog. I was a little disheartened when I didn't think anyone was reading my blog. So, thank you for commenting.

    I like the idea of using a pure Lisp solution anonymous. I didn't know about those projects (not uncommon since I'm a Lisp newbie). At the time I also believed Lisp was slower than native C. Now that I know better I feel better about using them.