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.
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 Hovingimport “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
Thanks for posting this interesting interview. I’m hoping to use this
language when it finally appears, so any information is of interest.
So good to see that Amiga are making a come back. Can`t wait to use OS5.x and AmigaDE on the new Zico specs (PPC etc,). Then finally I can get rid of this Windows “pap” and run a real stable OS like AmigaOS.
Got to rush! – I got a morris dancing lesson!
This Wouter van Oortmerssen guy, really sounds like he know the strenghts an weaknesses of his language, nice to hear from someone who doesn’t try to push his product in all directions.
Looking forward to check it (and AmigaDE)out, hope it’s easy to learn:)
Regards
Troels E -Looking forward to an Amiga comback:)
Great to see that SHEEP isnt turning out like haskel. I saw some code when they first started writing it and it looked like haskel, which i absolutly HATE.
SHEEP will be great for Amiga. I hear AREXX was a brilliant script and i never used it but seems like the idea of being able to do what AREXX did is a great idea.
I dont know if I shall use SHEEP much on AmigaOS5x86. Hell, i dont even know if it will be there. Who knows how the DE will be integrated into the AmigaOS. But i sure wouldnt mind having a look at it.
ARexx is good mainly because it appeared early in the Amiga’s history,
so that all good programs can be scripted with the same language. That
makes it easy to write a single script that uses the facilities of 2
or 3 programs. For example, you could call up a 3D renderer from a DTP
program to generate some 3D text for a headline.
Also, some programs, such as the Bars&Pipes sequencer, can send ARexx
commands to another program at a specified time. This gives powerful
control for multimedia applications.
In principle, I believe Applescript ought to be able to do the same
things, but it arrived too late, by which time programs such as
Director had their own private scripting language.
SHEEP will be there at the beginning of the AmigaDE, which is good.
Recently we have been having doubts that Amica Inc can pull off the seemingly impossible and relaunch the next Amiga with supporting the hardware and software, not just vaporware.
Since this is a recent interview, I want to hope the plans are still on track…`cos Sheep sounds great!
I`d love to write some server side stuff in this, on an AmigaOne (or AmigaTwo and see how it compares to Java for speed and flexiability.
Well, SHEEP is being written for the DE, not for AmigaOS.
At present the Tao-based OS and the AmigaOS are completely different
and isolated from each other. Although there are plans announced for
“merging” the two, IMO this will be very difficult and will take a
long time. They have nothing in common, and neither has memory
management etc or is remotely to be considered as a server OS.
I expect to use Perl for Server side scripting for the foreseeable
future.
It already comes with the Amiga Software Development Kit which is available right now (version 1.01 with better soon to come) see http://www.amiga.com/“>Amiga for details and to find a distributer.
This sounds like it is going to be a very nice programming language, i’d love to hear more about SHEEP as work on it continues to progress…
Thanks Wouter, for putting my name in
It will be out soon anyway…