JavaScript owes a lot to Self, not only in its runtime but also its prototype-based object design (though perhaps that's something of a liability since class-based object systems turned out to be more popular.)
Yes but it's really good for building better object systems, especially with newer features like proxies. In the SELF days they implemented Smalltalk with prototypes and found that it was faster than normal Smalltalk implementations.
I find JavaScript itself to be a pretty usable language (maybe somewhere between Python (easier) and Java (harder) or C++ (harder still)), but the browser DOM environment is a pain to deal with.
After understanding Self, I didn't find JavaScript's prototype system hard to understand.
If only it had been made open source 25, 30 years ago when I was really excited about this stuff. I have no idea why they kept it locked up inside Sun for so long.
The whole Smalltalk ecosystem was super-expensive and proprietary. I can't really blame them because open source playbooks weren't understood at that time but it sure was a mistake.
I appreciate Sun creating things like Java and improving the performance of the JVM (adopting ideas from this Self runtime etc.) I don't know whether it made any money for them, but it certainly helped the rest of the computing field / industry.
Regarding Self's limited adoption, I think JavaScript showed that a Self-like system could be effective and popular if it used C-like syntax rather than Smalltalk-like syntax and shipped in every web browser.
There is a lot to be learned from reading historical CS texts. It helps us see how developers worked under constraint of historical hardware and it also helps us find commonalities to modern problems. There is a lot to be said about software engineering challenges that are a problem today and a problem decades ago. This creates a clearer picture of blind spots in the industry and reading outdated texts can be a fruitful endeavor despite seeming counterintuitive. I have a small collection of CS books that I have purchased from a used bookstore and I always walk away with new insights when I read them even if the information is outdated.
Thank you for your tone. I agree! Had Starting Forth, Thinking Forth, and Elizabeth D Rather books at one time. Reread TCL the Misunderstood (Antirez), every few years for the memoizing bit. Etc.
To the critics of parent, the reason we add dates and people make such posts is so HN users can know if it is something they read or something new or just something new to them. So when OP forgets the date, we make a post with the date so OP or the mods can edit the title.
I will read it, closely, but was all hopped-up expecting some new implementation, as I am down the Smalltalk rabbit hole lately, including watching lots of old videos. And perusing https://selflanguage.org
DonHopkins 35 days ago | parent | context | favorite | on: Help us raise $200k to free JavaScript from Oracle
SelfishScript. JavaScript credits Self as inspiration, but misses all the important things about Self.
JavaScript copied:
The name "Java", cynically chosen for marketing misdirection, not technical truth.
The word "prototype" from Self, but turned it into a quirky pseudo-class system. Instead of living objects delegating naturally, with multiple inheritance dynamically changeable at runtime, JavaScript glued on a weird constructor-function pattern that always confuses people, with constructors you have to call with new but can also uselessly call as normal functional foot-guns.
JavaScript missed:
The fluid, live object experience (JavaScript dev environments were never designed around exploration like Self’s Morphic).
The elegance of uniformity (JavaScript bolted on primitives, type coercions, and special cases everywhere).
The idea that the environment mattered as much as the language. Netscape didn’t ship with the kind of rich, reflective tools that made Self shine.
And most important of all: Self's simplicity! The original Self paper (Ungar & Smith, 1987, “Self: The Power of Simplicity”) was all about stripping away everything unnecessary until only a uniform, minimal object model remained. The title wasn’t ornamental, it was the thesis.
Simplicity. Uniformity. Minimal semantics. A clean consistent model you can hold in your head. Less semantic baggage frustrating JIT compiler optimization. Dynamic de-optimization (or pessimization as I like to call it).
Self proved that expressive power comes from radical simplicity.
JavaScript showed that market dominance comes from compromise (worse is better, the selfish gene).
JavaScript should be called SelfishScript because it claimed Self’s legacy but betrayed its central insight: that simplicity is not just aesthetic, it’s the whole design philosophy.
senderpath [Dave Ungar] 33 days ago [–]
Yes, indeed! It's a design philosophy, and one that the market does not always reward. I suspect that for many, it is either not salient, or unimportant. Design is subjective, and multi-dimensional.
Thank you, Don for seeing and writing about this dimension.
DonHopkins on Nov 9, 2022 | parent | context | favorite | on: The influence of Self
I 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).
> but JavaScript totally missed the boat on efficient compile-ability, which is the most interesting thing about Self
That's making much use of hindsight though: the creators of Self didn't think it would run fast, until it did [0]. The HOPL paper on Self [1] spends many words recounting the challenge of making Self fast.
[0] This is arguably a stronger claim than what appears in HOPL; I think it's from a talk by Dave Ungar, I'd have to check.
This is a classic paper and descendents of its ideas show up in modern JITs for highly dynamic languages.
JavaScript owes a lot to Self, not only in its runtime but also its prototype-based object design (though perhaps that's something of a liability since class-based object systems turned out to be more popular.)
JavaScript's form of prototype OO is remarkably awful and confusing.
Yes but it's really good for building better object systems, especially with newer features like proxies. In the SELF days they implemented Smalltalk with prototypes and found that it was faster than normal Smalltalk implementations.
https://www.researchgate.net/profile/Mario-Wolczko/publicati...
I find JavaScript itself to be a pretty usable language (maybe somewhere between Python (easier) and Java (harder) or C++ (harder still)), but the browser DOM environment is a pain to deal with.
After understanding Self, I didn't find JavaScript's prototype system hard to understand.
I guess you are on the "liability" side, possibly.
It makes a lot more sense in languages like lua.
These days the entire runtime is open source and easy to get
Decent readable C++, too. With a modern CMake build, the whole bit.
https://github.com/russellallen/self
If only it had been made open source 25, 30 years ago when I was really excited about this stuff. I have no idea why they kept it locked up inside Sun for so long.
The whole Smalltalk ecosystem was super-expensive and proprietary. I can't really blame them because open source playbooks weren't understood at that time but it sure was a mistake.
I appreciate Sun creating things like Java and improving the performance of the JVM (adopting ideas from this Self runtime etc.) I don't know whether it made any money for them, but it certainly helped the rest of the computing field / industry.
Regarding Self's limited adoption, I think JavaScript showed that a Self-like system could be effective and popular if it used C-like syntax rather than Smalltalk-like syntax and shipped in every web browser.
Java, and all living JITs, are hollow parodies of the Self environment.
Sure, if you want Java to be like Self. If you want Java to be closer to C++ it's a lot more reasonable.
(1989)
There is a lot to be learned from reading historical CS texts. It helps us see how developers worked under constraint of historical hardware and it also helps us find commonalities to modern problems. There is a lot to be said about software engineering challenges that are a problem today and a problem decades ago. This creates a clearer picture of blind spots in the industry and reading outdated texts can be a fruitful endeavor despite seeming counterintuitive. I have a small collection of CS books that I have purchased from a used bookstore and I always walk away with new insights when I read them even if the information is outdated.
Thank you for your tone. I agree! Had Starting Forth, Thinking Forth, and Elizabeth D Rather books at one time. Reread TCL the Misunderstood (Antirez), every few years for the memoizing bit. Etc.
To the critics of parent, the reason we add dates and people make such posts is so HN users can know if it is something they read or something new or just something new to them. So when OP forgets the date, we make a post with the date so OP or the mods can edit the title.
nothing better to add?
I will read it, closely, but was all hopped-up expecting some new implementation, as I am down the Smalltalk rabbit hole lately, including watching lots of old videos. And perusing https://selflanguage.org
One of my all time favorite and most influential papers! ("You're soaking in jit!")
But I always thought "dynamic deoptimization" should have been called "pessimization".
https://news.ycombinator.com/item?id=33527561
DonHopkins on Nov 9, 2022 | next [–]
A Conversation with Bjarne Stroustrup, Carl Hewitt, and Dave Ungar
https://web.archive.org/web/20150428011217/http://channel9.m...
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!
https://news.ycombinator.com/item?id=45315685
DonHopkins 35 days ago | parent | context | favorite | on: Help us raise $200k to free JavaScript from Oracle
SelfishScript. JavaScript credits Self as inspiration, but misses all the important things about Self.
JavaScript copied:
The name "Java", cynically chosen for marketing misdirection, not technical truth.
The word "prototype" from Self, but turned it into a quirky pseudo-class system. Instead of living objects delegating naturally, with multiple inheritance dynamically changeable at runtime, JavaScript glued on a weird constructor-function pattern that always confuses people, with constructors you have to call with new but can also uselessly call as normal functional foot-guns.
JavaScript missed:
The fluid, live object experience (JavaScript dev environments were never designed around exploration like Self’s Morphic).
The elegance of uniformity (JavaScript bolted on primitives, type coercions, and special cases everywhere).
The idea that the environment mattered as much as the language. Netscape didn’t ship with the kind of rich, reflective tools that made Self shine.
And most important of all: Self's simplicity! The original Self paper (Ungar & Smith, 1987, “Self: The Power of Simplicity”) was all about stripping away everything unnecessary until only a uniform, minimal object model remained. The title wasn’t ornamental, it was the thesis.
Simplicity. Uniformity. Minimal semantics. A clean consistent model you can hold in your head. Less semantic baggage frustrating JIT compiler optimization. Dynamic de-optimization (or pessimization as I like to call it).
Self proved that expressive power comes from radical simplicity.
JavaScript showed that market dominance comes from compromise (worse is better, the selfish gene).
JavaScript should be called SelfishScript because it claimed Self’s legacy but betrayed its central insight: that simplicity is not just aesthetic, it’s the whole design philosophy.
senderpath [Dave Ungar] 33 days ago [–]
Yes, indeed! It's a design philosophy, and one that the market does not always reward. I suspect that for many, it is either not salient, or unimportant. Design is subjective, and multi-dimensional.
Thank you, Don for seeing and writing about this dimension.
https://news.ycombinator.com/item?id=33527618
DonHopkins on Nov 9, 2022 | parent | context | favorite | on: The influence of Self
I 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)
> but JavaScript totally missed the boat on efficient compile-ability, which is the most interesting thing about Self
That's making much use of hindsight though: the creators of Self didn't think it would run fast, until it did [0]. The HOPL paper on Self [1] spends many words recounting the challenge of making Self fast.
[0] This is arguably a stronger claim than what appears in HOPL; I think it's from a talk by Dave Ungar, I'd have to check.
[1] https://dl.acm.org/doi/10.1145/1238844.1238853