Hi All,
I'm playing with the 4.3 Mac Demo.snap image. I'm looking at the tutorial there. I've created lots of slots. I'm seeing how Morphic in that tutorial is similar to the Morphic I've used (but not programmed) in Squeak. It's all pretty cool.
One of the things I want to get a grip on is prototypical inheritance as it relates to Self and JavaScript. I understand one lead to the other. I feel on safe ground saying that a lot of people like JavaScript, but mainly use it like C. Or they replicate classical inheritance. Have you seen a book of JavaScript design patterns? Don't bother.
I'd really like to say to somebody: "You know, you JS programmer you. Your conception of how to use JS sucks. The reason is you don't understand prototypical inheritance. Here's what you need to know..."
And then a light would go on over their head, and they'd use JS the way it's meant to instead of the hack that it usually is.
I'm going to read the Wiki page on Prototype-based programming, but anything you could contribute would be great.
Chris
On Thu, Jul 30, 2009 at 6:56 AM, brassplumebrassplume@yahoo.com wrote:
I'm going to read the Wiki page on Prototype-based programming, but anything you could contribute would be great.
Some links that might interest you:
A post of mine on using prototype based inheritance: http://www.bluishcoder.co.nz/2009/07/prototype-based-programming-languages.h...
'Attack of the Clones' paper - describes design patterns using prototypes. http://crpit.com/abstracts/CRPITV13Noble.html
Organizing programs without classes - another good paper http://research.sun.com/self/papers/organizing-programs.html
Unfortunately JavaScript doesn't allow easy manipulation of the prototype slot making some usage of prototype design patterns difficult.
Chris.
Looks like a bounty of resources. Thanks, Chris. I'm going to read and reflect on this stuff. I look forward to being able to ask you a question or two about it in the near future. Cool stuff.
Chris
Hi Chris,
Great to see you're interested in Self! Can I suggest that you try out the newer 4.4 preview release - it should be faster and nicer looking on a Mac (and if you are on a Macbook you can scroll the world from the trackpad which is really helpful)
Chris Double's links are good to read, especially his first link to his blog post which sets out the different approaches of Javascript and Self.
(Also, if you want to see how Javascript could/should be used checkout Dan Ingall's Lively Kernel at http://livelykernel.sunlabs.com/ which has a version of the Self UI 'Morphic' in Javascript)
Russell
brassplume wrote:
Hi All,
I'm playing with the 4.3 Mac Demo.snap image. I'm looking at the tutorial there. I've created lots of slots. I'm seeing how Morphic in that tutorial is similar to the Morphic I've used (but not programmed) in Squeak. It's all pretty cool.
One of the things I want to get a grip on is prototypical inheritance as it relates to Self and JavaScript. I understand one lead to the other. I feel on safe ground saying that a lot of people like JavaScript, but mainly use it like C. Or they replicate classical inheritance. Have you seen a book of JavaScript design patterns? Don't bother.
I'd really like to say to somebody: "You know, you JS programmer you. Your conception of how to use JS sucks. The reason is you don't understand prototypical inheritance. Here's what you need to know..."
And then a light would go on over their head, and they'd use JS the way it's meant to instead of the hack that it usually is.
I'm going to read the Wiki page on Prototype-based programming, but anything you could contribute would be great.
Chris
Hi Russell,
Thanks for the tip. 4.4 it is. No trackpad, unfortunately. My MacBookPro is from 2007. No worries, though.
Thanks for connecting the dots about Lively Kernel. I saw something about that about a year ago or more on Squeak News. I need to look at that.
I've been reading some papers and started on Chris's blog. The wiki page says Self is a protest against proceeding from taxonomy to behavior. To me that says its a protest against going from the general to the specific. Self is about going from specific and then grouping things later under general labels. Organizing Programs Without Clases uses the word flexible repeatedly. I guess that comes from the lower level of granularity used in Self with the key unit of construction being the slot.
It's a cool summer project.
Chris
"Self is about going from specific and then grouping things later under general labels" - this sounds about right :)
If you can scroll up and down using two fingers on your macbook then try it in Self 4.4 - it might work. You don't need the latest Macbook, I don't think.
- Russell
brassplume wrote:
Hi Russell,
Thanks for the tip. 4.4 it is. No trackpad, unfortunately. My MacBookPro is from 2007. No worries, though.
Thanks for connecting the dots about Lively Kernel. I saw something about that about a year ago or more on Squeak News. I need to look at that.
I've been reading some papers and started on Chris's blog. The wiki page says Self is a protest against proceeding from taxonomy to behavior. To me that says its a protest against going from the general to the specific. Self is about going from specific and then grouping things later under general labels. Organizing Programs Without Clases uses the word flexible repeatedly. I guess that comes from the lower level of granularity used in Self with the key unit of construction being the slot.
It's a cool summer project.
Chris
self-interest@lists.selflanguage.org