4 ms·
The influence of Self
- masklinn 4y agoThe weirdest part of self is how influential the runtime tech was compared to the langage. 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.
- munificent 4y ago> 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-javascript-8c1ce3bffb17 https://medium.com/@_benaston/lesson-1a-the-history-of-javas...
- crabmusket 4y agoI can't find your quoted text on that page, but here is the primary source: https://brendaneich.com/2008/04/popularity/ https://brendaneich.com/2008/04/popularity/
- munificent 4y agoOops, sorry, I copy-pasted the wrong link. Thanks for the correction.
- masklinn 4y ago> It doesn't look like philosophical inspiration because Eich was told to make the language's syntax resemble Java. 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.
- BrendanEich 4y agoScope in early JS was handled through a parent slot. Self was a big influence but I had no time to honor it properly. JS had ten days till a demo to prove to factions in Netscape and to most of Sun (Bill Joy was ally) that it had a role to play. See https://www.youtube.com/watch?v=krB0enBeSiE&t=2176s https://www.youtube.com/watch?v=krB0enBeSiE&t=2176s (earlier if you have time).
- munificent 4y ago> Lars Bak was of course hired by Google to build V8, which was released in 2008. Within a few years, most of the techniques pioneered in Self had made their way into the major JS engines. 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.
- keewee7 4y agoSome of the Danish people behind V8 and Dart are now working on the impressive Toit language for embedded IoT: https://github.com/toitlang https://github.com/toitlang
- pjmlp 4y agoThey left Dart after the whole DartiumVM failure and the pivot into Dart 2.0 with strong typing. You'll notice that Toit is also dynamically typed.
- rileyphone 4y agoBased on https://mrale.ph/dartvm/ https://mrale.ph/dartvm/, it looks like there are two way Dart gets optimized now - either through a JIT like V8, or AOT compilation with a fallback for the methods that can't be devirtualized. The JIT still performs better, but the AOT code starts up faster. The next challenge is to combine them and eliminate cold starts with dynamic optimization.
- mraleph 4y ago> The JIT still performs better, but the AOT code starts up faster. 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.
- gumby 4y agoGood article. Self was a research language; its output was papers and talks. Nobody ever tried to make it a "real" language in any sense. It's like Carl Hewett's development of Actors -- nobody tried to use his codebase other than him AFAIK, but the work was very influential. 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.
- cmrdporcupine 4y agoI don't think they tried to make a product from Self, really, but it was definitely a real language with an extremely optimized runtime and a quite complete user interface. Many many hours of intense engineering went into that. 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.
- kragen 4y agoi tried getting it to compile with current c++ compilers for a few days but without great success. i understand others have now bridged that gap
- gumby 4y ago> I don't think they tried to make a product from Self, really, but it was definitely a real language with an extremely optimized runtime and a quite complete user interface. Many many hours of intense engineering went into that. 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.
- dang 4y agoRelated: Organizing Programs Without Classes (1991) [pdf] - https://news.ycombinator.com/item?id=26888479 https://news.ycombinator.com/item?id=26888479 - April 2021 (6 comments) Self – Fun Through Simplicity - https://news.ycombinator.com/item?id=24329910 https://news.ycombinator.com/item?id=24329910 - Aug 2020 (9 comments) Call with David Ungar (2015) [video] - https://news.ycombinator.com/item?id=23800625 https://news.ycombinator.com/item?id=23800625 - July 2020 (4 comments) Organizing Programs Without Classes (1991) [pdf] - https://news.ycombinator.com/item?id=22120836 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 https://news.ycombinator.com/item?id=20782896 - Aug 2019 (1 comment) Self Programming Language - https://news.ycombinator.com/item?id=20496570 https://news.ycombinator.com/item?id=20496570 - July 2019 (40 comments) New release of Self programming language - https://news.ycombinator.com/item?id=14409088 https://news.ycombinator.com/item?id=14409088 - May 2017 (37 comments) Morphic: The Self User Interface Framework - https://news.ycombinator.com/item?id=9858651 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 https://news.ycombinator.com/item?id=9555710 - May 2015 (2 comments) New release of Self programming language - https://news.ycombinator.com/item?id=7047953 https://news.ycombinator.com/item?id=7047953 - Jan 2014 (42 comments) The status of the Self language - https://news.ycombinator.com/item?id=1957511 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 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 https://news.ycombinator.com/item?id=1091916 - Feb 2010 (1 comment) Self: The Power of Simplicity - https://news.ycombinator.com/item?id=771222 https://news.ycombinator.com/item?id=771222 - Aug 2009 (8 comments) Really not that much. Others?
- pvg 4y agoThere's probably a lot more in the 'influence on JVM things' side but it's pretty hard to search. There's also stuff like https://news.ycombinator.com/item?id=14481339 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 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.
- fzzzy 4y agoI was fascinated by Self back in the day. The way any slot can be a parent and multiple slots could be a parent providing multiple inheritance seemed like magic. You could just change them at runtime as well, possibly massively changing the behavior of the system. In retrospect multiple inheritance wasn't the greatest in practice. 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.
- cmrdporcupine 4y agoRe: prototype OO and LambdaMOO and so on, there was also CoolMUD (also by Stephen White, who wrote TinyMUCK, and then wrote the first version of MOO before Pavel Curtis took it over) and also ColdMUD by Greg Hudson, which was then forked into Genesis. Those two were more "pure" prototype OO languages, in the sense that they didn't have "magical properties" like permissions and locations built in like MOO, and they provided multiple inheritance and, in the case of ColdMUD, also had lambdas and lightweight objects ("frobs") and in the case of CoolMUD a simple form of federation/object distribution. I recently dug up and archived the original ColdMUD sources at https://github.com/rdaum/coldmud 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?
- earleybird 4y agoMissing is NewtonScript - https://en.wikipedia.org/wiki/NewtonScript https://en.wikipedia.org/wiki/NewtonScript
- DonHopkins 4y agoI wrote this in a discussion with Tom Lord in 2006 (a couple years before Lars Bak developed V8 at Google), after I ran into Dave when he was interviewing at Laszlo Systems, and he showed a demo of his latest Self system: >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). https://en.wikipedia.org/wiki/V8_(JavaScript_engine) https://en.wikipedia.org/wiki/V8_(JavaScript_engine)