Hi,
my vacation is over, I have to continue working on
something else. Therfore I have less time now to
continue with the Self port. I think that there is
not missing too much to finally get a running system
(with all the applications :-)). It all comes down to
the stack walking code.
In order to give others the chance to participate, too,
I have put the stuff on the web server. Everybody who
likes to see Self on Linux as soon as possible, and
knows how to use a debugger is invited to help fixing
the remaining problems. I will continue, too, of course.
Maybe, I also made some mistakes...
http://www.cichon.de/self/
-gordon
--
----------------------------------------------------
Gordon Cichon email: Gordon(a)Cichon.de
------------------------------------------------------------------------
eGroup home: http://www.eGroups.com/list/self-interest
Free Web-based e-mail groups by eGroups.com
The number one complaint by far that people have about Self is that
it doesn't run on their machines. So it isn't surprising that the
question I get asked most often is how do I intend to address the
portability problem.
Paul Wilson calls "snarfing" (in his excellent pages about implementing
scheme - check out http://www.cs.utexas.edu/users/oops/ ) the act of
implementing a feature in a language by simply stealing it from the
underlying system. You could, for example, implement recursion in a
Logo written in C by creating a stack array and having an explicit
stack pointer that must be carefully kept updated. Or you could
simply *snarf* the recursion already available in C.
Snarfing makes it much easier to get started by reducing the number
of things you have to worry about to obtain a working system. But it
creates a tight dependence between the implementing and implemented
systems, greatly reducing portability. And in the case of bootstrapping
(such as tinySelf on Self 4.0 or a Lisp written in Lisp) it becomes
an obstacle to be removed before the system can run "stand alone".
TinySelf 1 was written in Self 4.0 back in 1997 as a quick and dirty
test to see if parallel execution of Self programs was possible. I
haven't finished debugging it yet and it was never intended to be
the base for something better - tinySelf 2 is to be written from
scratch instead. Even so, looking at what tinySelf 1 snarfs from the
underlying Self 4 helps give us a sense of what must be done next:
- the whole memory system. There is no separation between tinySelf 1
objects and Self objects. So tinySelf doesn't have to worry about
allocation, garbage collection, it has no notion of maps and uses
mirrors to access slots and things. The need to create mirrors for
every object it uses is the main performance problem in this
implementation.
- all the primitives except '_Restart'. TinySelf would just do a
"perform: primitiveSelector" in Self to get things done except
the Self VM doesn't like that. So each primitive is wrapped in
a trivial method and tinySelf asks Self to "perform" that instead.
- the parser. When you give tinySelf an expression to evaluate, it
uses Self to parse that into an object, which is then available
at the tinySelf level due to the shared memory system.
So if tinySelf 2 is to run on systems other than Self 4, the first
thing it must do is implement the above things itself and not snarf
them.
A second portability problem is that there are too many primitives
making Self 4's interface to the system on which it runs "too wide".
The UI is the best example - while Self exposes all of the X Window
API in the form of dozens of primitives, Squeak only requires a
primitive to copy a bitmap from an internal form object to the
frame buffer in order to work. Porting Squeak involves only writing
a simple piece of code, while making Self run on Win32 or the Mac
would involve adding a layer to essentially emulate X Windows on
them (though such layers are available, so it might not be that
much work). So one thing that would improve portability would be
to "narrow down" the interface to the implementation platform by
reducing the number of primitives. Unlike Squeak, Self doesn't not
have a performance problem of things implemented using the language
instead of primitives.
After considering several options, I decided on an alternative for
tinySelf 2 which isn't minimal but which should make it easier for
other people to port it to various platforms. The main objects
involved are:
- compiler. This object takes bytecodes and using the current
cpuDescription object is generates machine language code. More
than one variation can exist, such as the current NIC and SIC.
- cpuDescription. This encapsulates all the characteristics of a
given cpu (X86, PowerPC, Sparc, ARM, Trimedia, etc.) so the other
objects can be more portable. The level of detail here can be
as high as needed - the X86 object can later be complemented with
486, Pentium, K6, MII, PentiumPro and so on objects. This will
boost performance as the compiler will be able to tune the
instruction scheduling to the actual hardware.
- platformDescription. This encapsulates the "drivers" part of
the system. Some platforms are Win32, POSIX and BarePC. This
is the only place in the system where non Self code, assembly
language, in this case, is allowed. These tend to be abstract
objects - when combined with a cpuDescription object they form
a concrete combo called a host object.
- emulator. Given a host object, it can "run" code written for that
host.
- umbilical. This object connects two executions of Self: the
motherSelf and the babySelf. They might run on separate machines
connected by a LAN or serial port, as two processes in a native
OS connected by that OS's IPC or the babySelf might run in the
emulator running inside the motherSelf. Whatever the case, this
object allows motherSelf to have complete control of babySelf
and includes a protocol to allow objects to flow back and forth
between them.
- reflectiveVM. This includes memory allocation, garbage collection,
multithreading, message passing, etc. all written in Self.
So the first step is to get all this (except for the reflectiveVM)
running in Self 4.0. A host object containing the X86 cpuDescription
and the POSIX platformDescription must be created and the emulator
is started up. The compiler, running in Self 4, gets to work on
the umbilical object and the resulting X86 code is used to "boot"
the emulator. Then the compiler generates code for the reflectiveVM
and the compiler itself and sends it over the umbilical to the
tinySelf 2 running inside the emulator. At some point this tinySelf
is complete enough that saving a snapshot should result in a file
that can actually run by itself on an Intel Linux machine!
Note that the emulator isn't strictly necessary. The previous steps
could have been done by connecting the umbilical to an actual Intel
Linux machine instead. But doing it via an emulator is much more
convenient since you can single step, examine memory, etc. Having
two paths to babySelf (the umbilical object and the emulator's UI)
makes it much easier to see what is going on. Of course, if the
emulator isn't accurate then things will crash when trying it out
on the actual hardware. But these bugs will be eliminated in time
and it will become easier and easier to do new ports.
It is interesting to compare this with the Squeak approach. They need
an external system (the C compiler) to avoid having to deal with
different CPUs. The problem is that this external system is only
available when generating an new VM, not at runtime like the compiler
described here. They moved most platform stuff into "black boxes" -
some hand written C files. In contrast, the system I proposed is
totally self contained (like many Forths) and takes full advantage
of the power of Self (like multiple inheritance, polymorphism...).
I still have a few things to do before I start working on this, but
it is my hope that someday you will have tinySelf coming soon to a
computer near you.
-- Jecel
------------------------------------------------------------------------
eGroup home: http://www.eGroups.com/list/self-interest
Free Web-based e-mail groups by eGroups.com
I am going to update the Self web pages here at Sun, and would like to
have links to all current and relevant Self work.
If you are doing or even know of some Self-related project, please send
me a URL if you have one. Even send me the obvious ones I should
know about, I would consider it a favor to have it show up in my mail
rather than to have to do the virtual archeology necessary to unearth
the info from my jumbled files or my own brain...
You can reply directly to me
randall.smith(a)sun.com
Thanks!
--Randy
------------------------------------------------------------------------
eGroup home: http://www.eGroups.com/group/self-interesthttp://www.eGroups.com - Simplifying group communications
I use Self on SunOS 5.6/Solaris 2.6 and the only problem I had was
when you selected some text there would be a primitive fail as it
tried to copy your selection to the X Window clipboard. The following
patch eliminates the nasty notifiers by not calling the primitive
anymore:
http://www.lsi.usp.br/~jecel/release/patches/xlibPatch.self
-- Jecel
------------------------------------------------------------------------
eGroup home: http://www.eGroups.com/group/self-interesthttp://www.eGroups.com - Simplifying group communications
Hello Mathias,
I have installed Self 4.0 on a Sun SPARCstation2 that runs Solaris 2.6 and it seemed to run OK. Unfortunately, I had to uninstall it very quickly, as I hadn´t the necessary permission to use the disk space (nor the CPU cycles) and I don´t know
if there is something wrong. But I know it will start. Install it and try it, too, it is worth. If you find something wrong, please tell me. I´m interested in it.
Regards,
Douglas
ifw98041(a)informatik.fh-muenchen.de wrote:
> Content-Type: text/plain
> Subject: Self on Solaris 2.6?
> X-Mailer: www.eGroups.com Message Poster
> MIME-Version: 1.0
> Message-ID: <pid26626.1999.April.23.4:08.83524.@egroups.com>
> Content-Type: text/plain
> Date: Fri, 23 Apr 1999 11:08:29 -0000
> In-Reply-To:
> From: ifw98041(a)informatik.fh-muenchen.de
> To: self-interest(a)egroups.com
>
> Hello,
> For preparing a small lecture in a course on conecpts of modern programming languages I am participating, I would like to play a bit with the Self4.0 system. On the Release Download Webpage it says, Self would run with Solaris 2.3 and 2.4.
> My question now is, if it would run under v2.6 of Solaris, too, since this seems to be the OS version all of our SUN workstations are runnig with here at FH Muenchen (University of Applied Sciences Munich)
> Has anybody tried it on 2.6?
>
> Thanks in advance
> Mathias
>
> ------------------------------------------------------------------------
> V-Tech Computer For Kids! Challenge your kids with activities in math,
> trivia, vocabulary, spelling, grammer! Looks just like your PC! No-
> Hassle Returns*Satisfaction Guaranteed*Only $90.00 Free Freight in US
> http://clickhere.egroups.com/click/144
>
> eGroup home: http://www.eGroups.com/group/self-interest
> http://www.eGroups.com - Simplifying group communications
------------------------------------------------------------------------
eGroup home: http://www.eGroups.com/group/self-interesthttp://www.eGroups.com - Simplifying group communications
Hello,
For preparing a small lecture in a course on conecpts of modern programming languages I am participating, I would like to play a bit with the Self4.0 system. On the Release Download Webpage it says, Self would run with Solaris 2.3 and 2.4.
My question now is, if it would run under v2.6 of Solaris, too, since this seems to be the OS version all of our SUN workstations are runnig with here at FH Muenchen (University of Applied Sciences Munich)
Has anybody tried it on 2.6?
Thanks in advance
Mathias
------------------------------------------------------------------------
eGroup home: http://www.eGroups.com/group/self-interesthttp://www.eGroups.com - Simplifying group communications
ian(a)monk.cgocable.ca wrote:
>
> Well, I have nothing else to ask if any (let's say, Gordon's one) Self for Linux is no available. It's quite shame to not having Self on Linux. Why Self creator didn't had in mind portability.. just like Squeak (pretty neat) ?
I would guess that working for Sun made the Self team see things a
little differently than most of us regarding which machines were the
most "interesting".
Squeak is very portable, but that has a great cost in terms of
performance. The only way you can have portability is by ignoring
the special characteristics of all the different machines. But the
way to make things fast is by taking all these special features
into account.
I am looking at Ian Piumarta's new Jitter 2 compiler for Squeak and
it is very interesting. It tries to improve performance without
hurting portability. That is a noble goal, and I described in
previous email to this list my own ideas about how to get there.
-- Jecel
------------------------------------------------------------------------
eGroup home: http://www.eGroups.com/group/self-interesthttp://www.eGroups.com - Simplifying group communications
Well, I have nothing else to ask if any (let's say, Gordon's one) Self for Linux is no available. It's quite shame to not having Self on Linux. Why Self creator didn't had in mind portability.. just like Squeak (pretty neat) ?
Ian
------------------------------------------------------------------------
eGroup home: http://www.eGroups.com/group/self-interesthttp://www.eGroups.com - Simplifying group communications
1
0
No Subject
by jbgarcia@pi.seinv.uvigo.es
18 Apr '99
18 Apr '99
Hi again. ;-)
No, Gordon, I can't do the next step.
By doing 'make lists' in ../linux/generated, I got the output:
cwdROOT*, no such file or directory
makeList*, no such file or directory
make: error 127
make: error 1
But these programs really are there, in self/bin/shell and in
self/vm....(I don't remember exactly where). I tried to execute the make
with the programs copied into the directory, but it didn't work. What's
the trouble now ?
I've tried also all the rest of the steps, and it didn't work none
of them.
Regards,
jose
------------------------------------------------------------------------
eGroup home: http://www.eGroups.com/list/self-interest
Free Web-based e-mail groups by eGroups.com
> All:
>
> Do I understand this correctly: Is Self 4 available on Linux?
>
>
>
Well.. I am attemping to install Self for Linux, yes, but it is a
limited version, it isn't (I think) the complete 4 version.
(If you are interested in the graphic world, I'm afraid that it
is not released yet.)
Visit the page of the author, Gordon Cichon, where I donwloaded
the software:
www.cichon.de/self
There are a lot of explanations into this page.
Regards,
jose
------------------------------------------------------------------------
eGroup home: http://www.eGroups.com/list/self-interest
Free Web-based e-mail groups by eGroups.com