Lately I've been feeling homesick for Self, so I used Lively Kernel to
create a sorta-kinda vaguely Self-like environment for Javascript. There are lots of rough edges and bugs and missing features, but you can try it out at: http://adamspitz.com/Lively-Outliners/example.xhtml (and the code is at http://github.com/AdamSpitz/Lively-Outliners) It isn't much. The main thing is object outliners (http://selflanguage.org/documentation/published/object-focus.html) - similar to inspectors, in that they let you look at an individual object, but with enough programming features (you can edit methods, organize slots into categories, attach comments to objects or slots, drag an arrow to set the contents of a slot, etc.) that they're used for writing code as well. In Self we use these as a replacement for both inspectors and code browsers. The idea is to give you the feeling of getting your hands directly on your objects, rather than feeling like you're using a tool that shows you a view of an object that's hidden behind the scenes somewhere. There's also a transporter system (http://research.sun.com/self/papers/transporter.html) for organizing objects into modules and filing them out as .js files. (The demo isn't quite fully-functional; I had trouble getting WebDAV working on my server. But I rigged up a little CGI script so that when you file out a module you can download the .js file through your web browser.) Anyway, I don't really trust this thing with my code yet. (I'm using it to manage most of its own code, but I double-check the filed-out .js files to make sure they look OK.) But I wanted to show it to the LK community, to get a sense of whether anybody here is interested in this kind of thing. (I could use some advice on how to make it play more nicely with the rest of LK.) This thing was fun to put together - LK is a nice platform to build on. :) Adam |
Hi Adam -
It seems very nice work! :-) I create an object with state and behavior but then I could not figure out how to store it. Should I use modules for this? I attached a picture, so that everyone can see that it indeed looks and feels very much like self. - Jens - SafariSchnappschuss003.png (97K) Download Attachment |
In reply to this post by Adam Spitz
Hi Adam -
This is really cool (and thanks, Jens for sending out a picture). We are planning several things that may also help you going forward: general serialization to JSON, and some playing around with OMeta for Smalltalk-on-LK experiments. Jens and Robert are working on a road map for a bunch of projects at HPI this spring. It's great to have you playing around with LK and Self-like experiments. I have wanted to revisit our Morphic from the standpoint of flexibility for deconstruction/reconstruction - something that Self under Randy and Dave did really well; we lost a bit ot that in Squeak and a bit more in Lively. Cool stuff! - Dan ------------------------------------ >Lately I've been feeling homesick for Self, so I used Lively Kernel to >create a sorta-kinda vaguely Self-like environment for Javascript. > >There are lots of rough edges and bugs and missing features, but you >can try it out at: > > http://adamspitz.com/Lively-Outliners/example.xhtml > > (and the code is at http://github.com/AdamSpitz/Lively-Outliners) > >It isn't much. The main thing is object outliners >(http://selflanguage.org/documentation/published/object-focus.html) - >similar to inspectors, in that they let you look at an individual >object, but with enough programming features (you can edit methods, >organize slots into categories, attach comments to objects or slots, >drag an arrow to set the contents of a slot, etc.) that they're used >for writing code as well. In Self we use these as a replacement for >both inspectors and code browsers. The idea is to give you the feeling >of getting your hands directly on your objects, rather than feeling >like you're using a tool that shows you a view of an object that's >hidden behind the scenes somewhere. > >There's also a transporter system >(http://research.sun.com/self/papers/transporter.html) for organizing >objects into modules and filing them out as .js files. (The demo isn't >quite fully-functional; I had trouble getting WebDAV working on my >server. But I rigged up a little CGI script so that when you file out >a module you can download the .js file through your web browser.) > >Anyway, I don't really trust this thing with my code yet. (I'm using >it to manage most of its own code, but I double-check the filed-out >.js files to make sure they look OK.) But I wanted to show it to the >LK community, to get a sense of whether anybody here is interested in >this kind of thing. (I could use some advice on how to make it play >more nicely with the rest of LK.) > >This thing was fun to put together - LK is a nice platform to build on. :) > > >Adam >_______________________________________________ >lively-kernel mailing list >[hidden email] >http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel |
In reply to this post by Lincke, Jens
Jens Lincke wrote:
> I create an object with state and behavior but then I could not figure out > how to store it. Should I use modules for this? Yes. I guess I need some documentation about this. :) The Self tutorial has some information on the module system (http://selflanguage.org/_static/tutorial/Tutorial/Language/ImportantObjects/Modules.html), most of which applies to my system too, but here are some quick instructions: 1. Make a slot called JensObject on the Global object. Make it point to your object (by dragging its arrow). Then right-click the slot and choose "be creator." Right-click the slot again and choose "set module..." to put the slot into a new module. 2. Right-click your object and choose "set module..." to put all of the object's slots into the same module. 3. Right-click the world and choose "file out module..." to create a .js file. The idea is that (for now, anyway) the slots in your module need to be reachable via a path of "creator slots" from the Global object. (The outliners also use this creator-slot information to display names for the objects - rather than having an object keep track of its own name, it can deduce its name by examining the path of creator slots from the Global object.) The UI for assigning slots to modules is still a bit clunkier than I'd like - in Self there's a mechanism for automatically guessing which module a slot should belong to, so you usually don't need to do it manually. Adam |
In reply to this post by Adam Spitz
Dan Ingalls wrote:
> We are planning several things that may also help you going forward: general serialization to JSON, and some playing around with OMeta for Smalltalk-on-LK experiments. Jens and Robert are working on a road map for a bunch of projects at HPI this spring. Cool! I admit that I've been feeling tempted to try the Smalltalk thing myself. :) And the serialization thing sounds like it could be useful too. How long do I need to wait before I can hear the details? :) > It's great to have you playing around with LK and Self-like experiments. I have wanted to revisit our Morphic from the standpoint of flexibility for deconstruction/reconstruction - something that Self under Randy and Dave did really well; we lost a bit ot that in Squeak and a bit more in Lively. Can you give me an example of the kind of flexibility you mean? (It's been a while since I played with Squeak.) Adam |
Adam wrote...
> > It's great to have you playing around with LK and Self-like experiments. I have wanted to revisit our Morphic from the standpoint of flexibility for deconstruction/reconstruction - something that Self under Randy and Dave did really well; we lost a bit ot that in Squeak and a bit more in Lively. > >Can you give me an example of the kind of flexibility you mean? (It's >been a while since I played with Squeak.) Yes. To a fair extent in Self, if you pulled, eg, a listPane out of a browser, I think it was not that difficult to use it for something else. We need to review at how widgets are composed in order to maximize this flexibility. I think Fabrik is the best way to do this for a significant class of apps, but iit is made for it. It may be possible to go fairly far with even the simpler morphs. Another example is tearing menu items off to make buttons, and dropping buttons in menus to make new items. That kind of thing. - D |
In reply to this post by Adam Spitz
>>Can you give me an example of the kind of flexibility you mean? (It's
>>been a while since I played with Squeak.) > > Yes. To a fair extent in Self, if you pulled, eg, a listPane out of a browser, I think it was not that difficult to use it for something else. We need to review at how widgets are composed in order to maximize this flexibility. I think Fabrik is the best way to do this for a significant class of apps, but iit is made for it. It may be possible to go fairly far with even the simpler morphs. Another example is tearing menu items off to make buttons, and dropping buttons in menus to make new items. That kind of thing. Ah. :) Yeah, that'd be cool. Let's do that. :) I've been having some fun implementing a few more of Self's ideas in my Lively Outliners thing ( http://adamspitz.com/Lively-Outliners/ ): - Some animation stuff. I've got my outliner morphs zooming in and out of the world (rather than suddenly appearing or disappearing), using a few cartoon-style animation techniques (http://selflanguage.org/documentation/published/animation.html) like motion blur, slow-in/slow-out, anticipating a motion with a quick contrary motion, etc. (I played with some sound effects too, using HTML5's audio facilities, but the sounds got irritating pretty quickly. :) - "Poses" for seeing relationships between objects. If you ask an object how it fits into the inheritance tree, rather than opening up a separate tool like an Inheritance Hierarchy Browser, the objects themselves zoom into position to make a tree shape. (There's also an Undo to make them zoom back to their previous positions.) Fits with the whole "making the objects feel real" philosophy - an object shouldn't be in two places at once, so they've gotta zoom around a lot. :) - Along the same lines, I've been experimenting with implementing other features using poses rather than tools. For example, as an alternative to having a TestRunner window with a list of the test cases, I've got TestCaseMorphs (one representing each test case). You ask to see all the tests, the TestCaseMorphs zoom onto the screen, and you can either hit the Run button on an individual test or you can drag a SelectionMorph around them and say "run all of these tests." (And I've got something similar for filing out modules - you ask to see all the changed modules, the ModuleMorphs zoom onto the screen, and you can select them all with a SelectionMorph and say "file out.") Adam |
In reply to this post by Adam Spitz
> We are planning several things that may also help you going forward: general serialization to JSON, and some playing around with OMeta for Smalltalk-on-LK experiments. Jens and Robert are working on a road map for a bunch of projects at HPI this spring.
By "general serialization", are you talking about some kind of mechanism for saving a snapshot of a running system? (I've seen the "save current world" thing, but if I understand correctly that's just saving the morphs, not all the objects in the image.) Sorry to be impatient. :) I know you'll announce this stuff when you're good and ready. I've just really been feeling the lack of a snapshotting mechanism, so if you guys aren't doing it then I'll take a crack at it myself. (If I understand correctly, it's not possible to write Javascript code to get a proper snapshot of everything, since local variables aren't accessible. But I could maybe hack together something that would sorta work OK most of the time.) Adam |
Free forum by Nabble | Edit this page |