Interview: Wouter van Oortmerssen on SHEEP

Wouter van Oortmerssen is a living legend in the Amiga community. Mostly known about his ability to design and code a whole bunch of programming languages throughout the years, interpreted or compiled (counted 38 so far). Today we host a mini-interview with Wouter regarding the SHEEP programming language. SHEEP is a new scripting/querying/ipc/programming language he is doing for Amiga Inc. “Expect familiar beginner friendly syntax and semantics coupled with multimethods, automatic memory management without garbage collection (linearity), powerful datatypes, pattern matching, strong and dynamic typing living together in harmony, integrated access to all the new Amiga OS features, and optional compiled output comparable to C in speed and size.1. Please explain to us very briefly what SHEEP really is and what it can do.

Wouter van Oortmerssen: The core purpose of SHEEP is “system scripting language” for the new Amiga OS, i.e. it allows one to quickly and easily glue components together and get specific tasks done in a beginner friendly way.

A beloved, fluffy sheep for SHEEP mascot
2. Why the need for a new language for the new AmigaOS? Could not AREXX adapted to the new system? What are the benefits of using SHEEP?

Wouter van Oortmerssen: The new Amiga OS (DE) opens up so many possibilities for scripting, this really goes beyond what Arexx used to do. It is not just IPC, but also working directly with components, making queries etc. You could take an existing language and simply hack all required new functionality into it, but this would result in a language that is needless complicated and/or messy. In language design there is so much to gain from designing for a specific goal, making a much cleaner and simpler language possible.

And SHEEP is not really a “new” language from a beginner point of view, care has been taken that atleast for simple stuff, it is very similar to other friendly languages such as basic, arexx, & python.

Finally, the scope for SHEEP goes much beyond these languages. It was designed to scale up much better, and also fill the gap that languages like E used to fill: friendly, yet with features for structuring larger amounts of code and generating good code. The current version of SHEEP can already beat GCC (both without optimisation) and will only grow stronger once its optimizer is implemented.

3. I read that “SHEEP” is a temporary code name. Have you decided in the permanent name?

Wouter van Oortmerssen: “SHEEP” is not a code name, nor temporary. πŸ™‚

4. How is SHEEP compares technically, algorithmically and programmatically to Python?

Wouter van Oortmerssen: Syntactically there are many similarities, such as the keyworded syntax and the “significant indentation”. Semantically, SHEEP leans more towards functional programming, and has strong polymorphism build on multimethods, rather than Python’s regular OO.

Technically, SHEEP has the potential to compete with C/C++, whereas Python is only available as interpreted language (and even if it was compiled, it wouldn’t have the same scope for fast code & optimisation).

5. How “much” object-oriented SHEEP is? Can it match Java and Python in OOP levels?

Wouter van Oortmerssen: Depends on your perspective. Multimethods give more powerful polymorphism than OO, but SHEEP doesn’t do inheritance in the classical sense. Therefore one shouldn’t call SHEEP “OO” (if that matters).

6. How is the compiler work progressing these days? Can you only interpret or even compile SHEEP code today?

Wouter van Oortmerssen: A little secret: the compiler and interpreter are actually one and the same program, with the only difference that the “interpreter” compiles directly to memory with optimisations switched off, and executes it, whereas the compiler produces an independant exe (or VP tool, in this case).

The idea of having a seperate interpreter was ditched because the compiler can generate executable code from source for even huge 50k scripts in less that 0.01 second, and the memory overhead is minimal.

7. Rebol is the ultimate Internet scripting language. Can SHEEP compete with it?

Wouter van Oortmerssen: General purpose languages generally have a hard time competing with special purpose languages. SHEEP will not have special datatypes for URLs and such (they are strings), nor does it necessarily have internet related functions as builtins. But what it does do is make access to whatever component provides this very easy. Your “send an email” example program may be a bit longer in SHEEP, but not fundamentally more complicated.

8. Can SHEEP be integrated into Java or C++? Are there bindings in the works?

Wouter van Oortmerssen: SHEEP can readily work with VP and C/C++… I haven’t tried Java yet but if C can interface with Java, then so can SHEEP πŸ™‚

More importantly, the component nature of the new Amiga OS will make specific language interopability issues a thing of the past.

9. Please write for us a small program in SHEEP that shows the power, ease of use and speed of developement of the language.

Wouter van Oortmerssen: Boy you are demanding… power of the language would probably involve multimethods etc, and none of the graphical examples I have use those πŸ™‚

Ease of use of development… you’ll have to take my word for it πŸ™‚

Here’s a program that draws a pythagoras tree:

— Tree of Pythagoras
— based on an old E example by Raymond Hoving

import “ave”

define pythtree ax:real ay:real bx:real by:real depth:int do
cx = ax-ay+by
cy = ax+ay-bx
dx = bx+by-ay
dy = ax-bx+by
ex = 0.5*(cx-cy+dx+dy)
ey = 0.5*(cx+cy-dx+dy)
c = -1-depth*$100020
ave_line cx cy ax ay c
ave_line ax ay bx by c
ave_line bx by dx dy c
ave_line dx dy cx cy c
ave_line cx cy ex ey c
ave_line ex ey dx dy c
if depth < 12 then pythtree cx cy ex ey depth+1 pythtree ex ey dx dy depth+1 end end width = 640 height = 480 ave_openwindow "Pythagoras Tree" width height 0 pythtree width/2-width/12 height-20 width/2+width/12 height-20 0 ave_update repeat until ave_getmessage = 'Q'

The output of the above program - Click for a larger version

The output of the above program – Click for a larger version


  1. 2001-10-12 7:32 pm
  2. 2001-10-12 9:51 pm
  3. 2001-10-12 10:29 pm
  4. 2001-10-13 2:55 am
  5. 2001-10-13 9:20 am
  6. 2001-10-13 7:09 pm
  7. 2001-10-13 7:52 pm
  8. 2001-10-14 9:15 pm
  9. 2001-10-17 2:36 am
  10. 2001-11-17 8:18 pm
  11. 2001-12-19 4:54 am