The influence of Self
dubroy.com
dubroy.com
Sort of coming full circle: After working on V8 for many years, Lars pitched Google on the idea to build a new language and VM. They felt they'd started to hit the wall with how fast they could make V8 because of JavaScript's fundamentally mutable nature.
That became Dart and one of the reasons they believed the Dart VM would significantly outperform JS VMs was because even though Dart 1.0 was essentially dynamically typed, it was class-based, and the inheritance hierarchy and field set of each class are fixed. Therefore, you don't need all of the clever "hidden class" optimization tricks they invented way back then.
You'll notice that Toit is also dynamically typed.
I should update that side note because a lot of things has changed. It should probably say something like:
> Theoretically, Dart VM JIT should have best peak performance, while Dart VM AOT has best startup time. In reality the comparison is quite complicated. AOT has seen a lot of work in the last few years, which made it faster than JIT in some aspects e.g. both direct and highly polymorphic method calls are usually faster in AOT. JIT's peak performance has been languishing in a state of neglect, but it still runs circles around AOT in some cases due to aggressive inlining.
Something like this.
Honestly these experimental languages are crucial for science and better off being left alone. C++ has suffered in being both a research language and a production* language, and the people in the latter camp are frustrated by the people in the former camp.
* I mean "production" in the sense of shipping code, not in the computer science sense.
I remember being excited when it was open sourced, finally.. but nothing ever came of it. It was actually quite readable, the C++ VM implementation.
Well, the performance and the runtime were the point of the experiment, right?
I didn't mean to denigrate the effort that went into it, I just meant that I don't think anyone tried to make it anything beyond a research effort (in the sense that, say, the rust, clojure, or ruby folks have tried to do).
In our current world things that aren't been trumpeted widely are often not considered worthwhile. But I remember Self being incredibly influential, including on my own work. As in, how science actually works.
>I just ran into Dave Ungar (of Self fame), and mentioned how ironic it was that JavaScript pointed to Self as its inspirational prototype (vis-a-vis JavaScript's prototype based object system), but JavaScript totally missed the boat on efficient compile-ability, which is the most interesting thing about Self. (I mean, anybody can make a prototype oop system that runs slow, but it takes a fucking genius to come up all the brilliant stuff in Self, like the aggressive inlining compiler (it has no byte code interpreter, just a bad-ass compiler), incremental compilation, polymorphic inline cache, coupled with dynamic de-optimization to make it debuggable). He gave a cool Self demo of writing a straightforward factorial function, then editing the source to the system's multiplication operator, so it would return a different result if you multiplied something by 1,000,000. Then he showed how it affected the factorial function, as well as the rest of the system, which incrementally recompiled itself as needed. All that and perfect debuggability, too! About JavaScript, he retorted that it was actually possible to efficiently compile JavaScript if you were really devious enough. Too bad the art of designing languages so you don't have to be devious in order to compile them, was lost of so many popular bad language designers (PHP, JavaScript, Perl, etc).
The LambdaMoo language was also prototype based, and I think both languages were designed around the same time. I wonder if there was any influence in any direction. LambdaMoo only had a single parent slot, but you could delegate a method to another utility object to achieve a kind of mix in functionality.
Then later there was a fork of LambdaMoo called Stunt that added multiple inheritance, maps, and json support. It sure seems like Stunt would be fun to program in even though I didn't do anything complicated in it.
There's also Io which is prototype based and very minimalistic. It has much better interoperability with C and could be a very light scripting language for something in C.
I recently dug up and archived the original ColdMUD sources at https://github.com/rdaum/coldmud. There's a link to the (still maintained and used) Genesis fork from there. CoolMUD may have been lost to time.
There was also FMPL, which was a nice and interesting scheme-inspired MOOish thing that was made by Jonathan Blow, who has since apparently gone on to become a famous game developer. (I messaged him a couple weeks ago asking if the sources were around anywhere and he thinks they're lost.)
I don't think there's necessarily any straight line from Self to LambdaMOO, but I always wanted to ask Stephen White about it. It may be more that he fell into the prototype model naturally just from how authoring in those kinds of MUDs work. (Then again LPmud/LPC looked nothing like that)
In a bout of unemployment after the .com crash I wrote my own language/server in a similar vein. But it had multiple dispatch and other stuff going on. Of course never finished.
Anyways, I could go on at length on this topic. You probably know all this already. Thanks for bringing this into this thread. I wonder if we knew each other?
Javascript is it’s most well known descendent and absolutely nothing like it, all the inheritance was clearly an implementation convenience rather than any sort of philosophical inspiration.
I don't believe that's true. Eich said: "I’m not proud, but I’m happy that I chose Scheme-ish first-class functions and Self-ish (albeit singular) prototypes as the main ingredients." [1]
It doesn't look like philosophical inspiration because Eich was told to make the language's syntax resemble Java. But as I understand it, it was a very deliberate choice on Eich's part.
[1]: https://medium.com/@_benaston/lesson-1a-the-history-of-javas...
It’s not just that, it’s also the inaccessibility (`__proto__` has only ever been an implementation detail), and the inability to copy what Self actually called prototypes (had to wait until Object.assign before that was a built-in feature).
Eich did not just provide a Java paint in the form of ctors, none of the prototypal features were easily and portably accessible until ES6. And since that also added class sugar, that’s what most everyone went with and the saviour of prototypal javascript was also its killer.
Not to mention Self built much of the langage features upon delegative inheritance, something JS very much didn’t do e.g. scoping in Self is handled through parent slots.
Organizing Programs Without Classes (1991) [pdf] - https://news.ycombinator.com/item?id=26888479 - April 2021 (6 comments)
Self – Fun Through Simplicity - https://news.ycombinator.com/item?id=24329910 - Aug 2020 (9 comments)
Call with David Ungar (2015) [video] - https://news.ycombinator.com/item?id=23800625 - July 2020 (4 comments)
Organizing Programs Without Classes (1991) [pdf] - https://news.ycombinator.com/item?id=22120836 - Jan 2020 (1 comment)
Environment and the programming language Self, part 4 - https://news.ycombinator.com/item?id=20782896 - Aug 2019 (1 comment)
Self Programming Language - https://news.ycombinator.com/item?id=20496570 - July 2019 (40 comments)
New release of Self programming language - https://news.ycombinator.com/item?id=14409088 - May 2017 (37 comments)
Morphic: The Self User Interface Framework - https://news.ycombinator.com/item?id=9858651 - July 2015 (2 comments)
David Ungar: Seven Paradoxes of Object-Oriented Programming Languages - https://news.ycombinator.com/item?id=9555710 - May 2015 (2 comments)
New release of Self programming language - https://news.ycombinator.com/item?id=7047953 - Jan 2014 (42 comments)
The status of the Self language - https://news.ycombinator.com/item?id=1957511 - Dec 2010 (23 comments)
Self language still alive - new release for Linux, Mac - https://news.ycombinator.com/item?id=1520246 - July 2010 (8 comments)
Dave Ungar at Stanford U: Self language creator on its history and influence - https://news.ycombinator.com/item?id=1091916 - Feb 2010 (1 comment)
Self: The Power of Simplicity - https://news.ycombinator.com/item?id=771222 - Aug 2009 (8 comments)
Really not that much. Others?
https://news.ycombinator.com/item?id=14481339
Interestingly, you're the one and only person who has posted a url mentioned in the footnote of the current submission:
https://news.ycombinator.com/item?id=188325
At the time, it looks you were also (give or take) the one and only person who cared.
As it is I was looking for one of the original videos demoing Self at Sun and it's basically impossible to find right now via YouTube's search.
(September 30, 2009) David Unger, from IBM Research, discusses how his experience in computer science has led him to the conclusion that even if your ideas succeed, the real legacy is the people.
https://web.archive.org/web/20150403234147/https://channel9....
https://donhopkins.com/home/movies/BjarneCarlDaveLangNEXT_mi...
They have a fascinating (and polite, respectful) argument about shared memory, message passing, locks, synchronization, and lock free message passing!