Exotic Programming Language #1 : Factor

Factor is a dynamically typed concatenative programming language whose design and implementation is led by Slava Pestov. Factor’s main influences are Joy, Forth, Lisp and Self. As of December 2007, the current version of Factor is 0.91. A 1.0 release is planned in 2008.

Factor is a general purpose, dynamically typed, stack-based programming language. The Factor implementation includes a VM together with an extensive library. The VM is written in C and provides basic runtime support and memory management. The library provides building blocks for applications. Factor is compiled to machine code, and on Mac OS X, can be used to build stand-alone native applications.

Factor began as a scripting language in a Java game project and quickly grew into a general-purpose language. While this was happening, the limitations of the Java virtual machine were making themselves apparent, and an effort to write a native Factor implementation with a minimal core in C was kicked off. The native implementation was bootstrapped from Java Factor, and soon thereafter native Factor became the de facto implementation, work on the Java implementation stopped.

Factor development is led by Slava Pestov, with extensive help from a community of contributors and testers.

Starting a tour of Exotic Programming languages

Since two dozen years I have a love affair going on with exotic, unknown programming languages. I believe at a certain point every serious programmer tend to develop his own programming language. I myself attempted to develop a kind of language to describe visual interface for my BBS around 1987. Computer interface where mostly text based and I use to create menu interface with ASCII code, producing beautiful low resolution colored pixels. But since I had an early experience with vector display on the PLATO terminal system from Control Data Corporation I designed a kind of visual description language. It was kind of elementary, features vectors, shapes, texts with fill and outline control in a resolution independent matrix. Unfortunately I wasn’t skilled enough to produce an implementation and it never existed in another form as my handwritten notes. However when many years later I discovered QuickDraw, the Macintosh graphic toolbox and Postscript, I was proud of myself at least of being able to spot the structural problem in describing screen by pixels (resolution) and think around a similar solution as the genius of the time.

My first real computer was probably a calculator, a Texas instrument 58c I played with it for a few monthes, learning its logic, primitive algorythms made of sequences of maximum 5000 instructions… but I really started programming in a little known language, Forth. It was the only programming language available on my white Jupiter ACE. I immediately loved the beauty of it’s simplicity. With the included manual I could learn the language in a day. Only a LIFO stack to push and pop data and a few instruction to solve about any problem. I could not do any floating point calculations but it was a great exercise for the mind to try reducing complex problem to the shortest suite of simple instructions. It was 1985 and about the same time I bought myself a book which was a general overview of programming languages. It featured quick review of BASIC, FORTRAN, PASCAL, ADA, LISP, and more. I still own a copy somewhere and this book opened my mind to a form of human creation that since then fascinate me : the art of designing programming languages which in the hand of programmers can theoretically solve any computing problem.

I am always looking for those new languages and it’s my main subject of conversation whenever I meet one of those contemporary geniuses that do real programming. So I decided it was about time I share my discoveries in this modest geek blog.