Moose/Glamour is cool (and I have questions!)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Moose/Glamour is cool (and I have questions!)

Mariano Martinez Peck
Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you. Basically, I only have the browsers for the moment. My knowledge is very limited in the Slang to C translator, or machine code simulation. However, the "real VM hackers" will try to provide me such functionalities.

Having said that, there are 3 browsers:

1) VMBrowserSlang:  shows only packages and classes which are written in slang. When you select a method, you have 2 panels: smalltalk code and C translated code.
Screenshot: http://img857.imageshack.us/i/vmbrowserslang.png/

2) VMBrowserMethods:  shows all packages and classes of the system and for every method, you have 3 panels: smalltalk code, bytecodes and machine code (using the simple mapping)
Screenshot: http://img862.imageshack.us/i/vmbrowsermethods.png/

3) VMBrowserMappings: this is for you Eliot!!  Basically, it  shows all packages and classes of the system and for every method, you have 5 panels: smalltalk code and one panel per strategy to map to machine code (simple cogit, sista, etc).
Screenshot:  http://img4.imageshack.us/f/vmbrowsermappings.png/

As you can see the idea is to see the different stages of our code at the same time: smalltalk code, bytecodes, machine code, etc. The idea is to easily learn.

Now...the questions:

1) how can I put a title to the browsers ?  In this case, they all are subclasses from GLMGlobalBrowserTemplate.

2) Is there a way to easily "close" and auto-adjust subpanes?  For example, look this screenshot: http://img4.imageshack.us/f/vmbrowsermappings.png/
there are 5 panes that are rendered when a method is selected. I would love that somehow (which a little X in the tab title, or a checkbox somewhere with the available panes), one or more of those panes can be automatically removed (and if added again even better). And when I remove one of them, the others auto-adjust to ocupy the full container. It is really difficult to explain by email..

Thanks in advance

--
Mariano
http://marianopeck.wordpress.com


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

Mariano Martinez Peck


On Tue, Apr 19, 2011 at 11:39 PM, Mariano Martinez Peck <[hidden email]> wrote:
Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you. Basically, I only have the browsers for the moment. My knowledge is very limited in the Slang to C translator, or machine code simulation. However, the "real VM hackers" will try to provide me such functionalities.

Having said that, there are 3 browsers:

1) VMBrowserSlang:  shows only packages and classes which are written in slang. When you select a method, you have 2 panels: smalltalk code and C translated code.
Screenshot: http://img857.imageshack.us/i/vmbrowserslang.png/

2) VMBrowserMethods:  shows all packages and classes of the system and for every method, you have 3 panels: smalltalk code, bytecodes and machine code (using the simple mapping)
Screenshot: http://img862.imageshack.us/i/vmbrowsermethods.png/

3) VMBrowserMappings: this is for you Eliot!!  Basically, it  shows all packages and classes of the system and for every method, you have 5 panels: smalltalk code and one panel per strategy to map to machine code (simple cogit, sista, etc).
Screenshot:  http://img4.imageshack.us/f/vmbrowsermappings.png/

As you can see the idea is to see the different stages of our code at the same time: smalltalk code, bytecodes, machine code, etc. The idea is to easily learn.

Now...the questions:

1) how can I put a title to the browsers ?  In this case, they all are subclasses from GLMGlobalBrowserTemplate.


I answer my self

buildBrowser

    browser := GLMTabulator new.
    browser title: 'A Cool title'.

 
2) Is there a way to easily "close" and auto-adjust subpanes?  For example, look this screenshot: http://img4.imageshack.us/f/vmbrowsermappings.png/
there are 5 panes that are rendered when a method is selected. I would love that somehow (which a little X in the tab title, or a checkbox somewhere with the available panes), one or more of those panes can be automatically removed (and if added again even better). And when I remove one of them, the others auto-adjust to ocupy the full container. It is really difficult to explain by email..

Ok...I found the method populate: #selection icon: GLMUIThemeExtraIcons glamorousCancel entitled: 'Close'  with: [:text :aClass | self halt. ].
so that I can use it like this:

sourceCodeIn: a
    | lintBrowser |
    (a text)
        title: 'Method source';
        display: [ :class :method | class sourceCodeAt: method ];
        forSmalltalk: [ :class | class ];
        populate: #selection icon: GLMUIThemeExtraIcons glamorousCancel entitled: 'Close'  with: [:text :aClass | self halt. ].

 
but still, I don't know how to remove the current code pane from the super container.

Thanks


Thanks in advance

--
Mariano
http://marianopeck.wordpress.com




--
Mariano
http://marianopeck.wordpress.com


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

Mariano Martinez Peck


On Wed, Apr 20, 2011 at 1:03 AM, Mariano Martinez Peck <[hidden email]> wrote:


On Tue, Apr 19, 2011 at 11:39 PM, Mariano Martinez Peck <[hidden email]> wrote:
Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you. Basically, I only have the browsers for the moment. My knowledge is very limited in the Slang to C translator, or machine code simulation. However, the "real VM hackers" will try to provide me such functionalities.

Having said that, there are 3 browsers:

1) VMBrowserSlang:  shows only packages and classes which are written in slang. When you select a method, you have 2 panels: smalltalk code and C translated code.
Screenshot: http://img857.imageshack.us/i/vmbrowserslang.png/

2) VMBrowserMethods:  shows all packages and classes of the system and for every method, you have 3 panels: smalltalk code, bytecodes and machine code (using the simple mapping)
Screenshot: http://img862.imageshack.us/i/vmbrowsermethods.png/

3) VMBrowserMappings: this is for you Eliot!!  Basically, it  shows all packages and classes of the system and for every method, you have 5 panels: smalltalk code and one panel per strategy to map to machine code (simple cogit, sista, etc).
Screenshot:  http://img4.imageshack.us/f/vmbrowsermappings.png/

As you can see the idea is to see the different stages of our code at the same time: smalltalk code, bytecodes, machine code, etc. The idea is to easily learn.

Now...the questions:

1) how can I put a title to the browsers ?  In this case, they all are subclasses from GLMGlobalBrowserTemplate.


I answer my self

buildBrowser

    browser := GLMTabulator new.
    browser title: 'A Cool title'.

 
2) Is there a way to easily "close" and auto-adjust subpanes?  For example, look this screenshot: http://img4.imageshack.us/f/vmbrowsermappings.png/
there are 5 panes that are rendered when a method is selected. I would love that somehow (which a little X in the tab title, or a checkbox somewhere with the available panes), one or more of those panes can be automatically removed (and if added again even better). And when I remove one of them, the others auto-adjust to ocupy the full container. It is really difficult to explain by email..

Ok...I found the method populate: #selection icon: GLMUIThemeExtraIcons glamorousCancel entitled: 'Close'  with: [:text :aClass | self halt. ].
so that I can use it like this:

sourceCodeIn: a
    | lintBrowser |
    (a text)
        title: 'Method source';
        display: [ :class :method | class sourceCodeAt: method ];
        forSmalltalk: [ :class | class ];
        populate: #selection icon: GLMUIThemeExtraIcons glamorousCancel entitled: 'Close'  with: [:text :aClass | self halt. ].

 
but still, I don't know how to remove the current code pane from the super container.


I found something similar, but still don't know how to make it work:

removePaneIndex: i
    | paneRemoved |
    paneRemoved := self panes removeAt: i.
    paneRemoved unregisterFromAllAnnouncements.
    self announce: (GLMPaneRemoved pane: paneRemoved fromBrowser: self )


thanks for any help

mariano

 
Thanks


Thanks in advance

--
Mariano
http://marianopeck.wordpress.com




--
Mariano
http://marianopeck.wordpress.com


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

Tudor Girba
Hi Mariano,

On 20 Apr 2011, at 01:10, Mariano Martinez Peck wrote:

> On Wed, Apr 20, 2011 at 1:03 AM, Mariano Martinez Peck <[hidden email]> wrote:
>
>
> On Tue, Apr 19, 2011 at 11:39 PM, Mariano Martinez Peck <[hidden email]> wrote:
> Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you. Basically, I only have the browsers for the moment. My knowledge is very limited in the Slang to C translator, or machine code simulation. However, the "real VM hackers" will try to provide me such functionalities.
>
> Having said that, there are 3 browsers:
>
> 1) VMBrowserSlang:  shows only packages and classes which are written in slang. When you select a method, you have 2 panels: smalltalk code and C translated code.
> Screenshot: http://img857.imageshack.us/i/vmbrowserslang.png/
>
> 2) VMBrowserMethods:  shows all packages and classes of the system and for every method, you have 3 panels: smalltalk code, bytecodes and machine code (using the simple mapping)
> Screenshot: http://img862.imageshack.us/i/vmbrowsermethods.png/
>
> 3) VMBrowserMappings: this is for you Eliot!!  Basically, it  shows all packages and classes of the system and for every method, you have 5 panels: smalltalk code and one panel per strategy to map to machine code (simple cogit, sista, etc).
> Screenshot:  http://img4.imageshack.us/f/vmbrowsermappings.png/
>
> As you can see the idea is to see the different stages of our code at the same time: smalltalk code, bytecodes, machine code, etc. The idea is to easily learn.

Sounds great. This is exactly the spirit of Moose.

Could you add a post on your shiny new blog about this? Maybe some code as well? I would love to link to it from the Moose website.


> Now...the questions:
>
> 1) how can I put a title to the browsers ?  In this case, they all are subclasses from GLMGlobalBrowserTemplate.
>
>
> I answer my self
>
> buildBrowser
>
>     browser := GLMTabulator new.
>     browser title: 'A Cool title'.

:)

>  2) Is there a way to easily "close" and auto-adjust subpanes?  For example, look this screenshot: http://img4.imageshack.us/f/vmbrowsermappings.png/
> there are 5 panes that are rendered when a method is selected. I would love that somehow (which a little X in the tab title, or a checkbox somewhere with the available panes), one or more of those panes can be automatically removed (and if added again even better). And when I remove one of them, the others auto-adjust to ocupy the full container. It is really difficult to explain by email..
> Ok...I found the method populate: #selection icon: GLMUIThemeExtraIcons glamorousCancel entitled: 'Close'  with: [:text :aClass | self halt. ].
> so that I can use it like this:
>
> sourceCodeIn: a
>     | lintBrowser |
>     (a text)
>         title: 'Method source';
>         display: [ :class :method | class sourceCodeAt: method ];
>         forSmalltalk: [ :class | class ];
>         populate: #selection icon: GLMUIThemeExtraIcons glamorousCancel entitled: 'Close'  with: [:text :aClass | self halt. ].
>
>  
> but still, I don't know how to remove the current code pane from the super container.
>
>
> I found something similar, but still don't know how to make it work:
>
> removePaneIndex: i
>     | paneRemoved |
>     paneRemoved := self panes removeAt: i.
>     paneRemoved unregisterFromAllAnnouncements.
>     self announce: (GLMPaneRemoved pane: paneRemoved fromBrowser: self )

You are trying to reason about your browser from a user interface perspective. Glamour is at a higher level of abstraction and it is meant to not mix the browsing model with rendering.

It looks to me like what you are trying to achieve is that you want to present the same object in 5 different ways, and only look at some of them as you wish.

The straightforward way to achieve this would be by using multiple presentations (like you did for Class list / Hierarchy). You would still not have the ability of removing a presentation, but you could put them in tabs.

GLMPaneRemoved is an internal announcement and it should not be used through scripting. If you need a user interface interaction that does not match your desire, you should create your own browser or presentation type. Just do not mix the UI with the conceptual browser.

Cheers,
Doru


> thanks for any help
>
> mariano
>
>  
> Thanks
>
>
> Thanks in advance
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"No matter how many recipes we know, we still value a chef."







_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

Mariano Martinez Peck


On Wed, Apr 20, 2011 at 10:28 AM, Tudor Girba <[hidden email]> wrote:
Hi Mariano,

On 20 Apr 2011, at 01:10, Mariano Martinez Peck wrote:

> On Wed, Apr 20, 2011 at 1:03 AM, Mariano Martinez Peck <[hidden email]> wrote:
>
>
> On Tue, Apr 19, 2011 at 11:39 PM, Mariano Martinez Peck <[hidden email]> wrote:
> Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you. Basically, I only have the browsers for the moment. My knowledge is very limited in the Slang to C translator, or machine code simulation. However, the "real VM hackers" will try to provide me such functionalities.
>
> Having said that, there are 3 browsers:
>
> 1) VMBrowserSlang:  shows only packages and classes which are written in slang. When you select a method, you have 2 panels: smalltalk code and C translated code.
> Screenshot: http://img857.imageshack.us/i/vmbrowserslang.png/
>
> 2) VMBrowserMethods:  shows all packages and classes of the system and for every method, you have 3 panels: smalltalk code, bytecodes and machine code (using the simple mapping)
> Screenshot: http://img862.imageshack.us/i/vmbrowsermethods.png/
>
> 3) VMBrowserMappings: this is for you Eliot!!  Basically, it  shows all packages and classes of the system and for every method, you have 5 panels: smalltalk code and one panel per strategy to map to machine code (simple cogit, sista, etc).
> Screenshot:  http://img4.imageshack.us/f/vmbrowsermappings.png/
>
> As you can see the idea is to see the different stages of our code at the same time: smalltalk code, bytecodes, machine code, etc. The idea is to easily learn.

Sounds great. This is exactly the spirit of Moose.

Could you add a post on your shiny new blog about this? Maybe some code as well? I would love to link to it from the Moose website.


Yes, it is planned. But I am waiting for the "backend". I mean, I am waiting for some Eliot changes to be able to get the simulated machine code, and hopefully the same from Dave about C code.
As soon as I have one of those, I post it.
 

> Now...the questions:
>
> 1) how can I put a title to the browsers ?  In this case, they all are subclasses from GLMGlobalBrowserTemplate.
>
>
> I answer my self
>
> buildBrowser
>
>     browser := GLMTabulator new.
>     browser title: 'A Cool title'.

:)

>  2) Is there a way to easily "close" and auto-adjust subpanes?  For example, look this screenshot: http://img4.imageshack.us/f/vmbrowsermappings.png/
> there are 5 panes that are rendered when a method is selected. I would love that somehow (which a little X in the tab title, or a checkbox somewhere with the available panes), one or more of those panes can be automatically removed (and if added again even better). And when I remove one of them, the others auto-adjust to ocupy the full container. It is really difficult to explain by email..
> Ok...I found the method populate: #selection icon: GLMUIThemeExtraIcons glamorousCancel entitled: 'Close'  with: [:text :aClass | self halt. ].
> so that I can use it like this:
>
> sourceCodeIn: a
>     | lintBrowser |
>     (a text)
>         title: 'Method source';
>         display: [ :class :method | class sourceCodeAt: method ];
>         forSmalltalk: [ :class | class ];
>         populate: #selection icon: GLMUIThemeExtraIcons glamorousCancel entitled: 'Close'  with: [:text :aClass | self halt. ].
>
>
> but still, I don't know how to remove the current code pane from the super container.
>
>
> I found something similar, but still don't know how to make it work:
>
> removePaneIndex: i
>     | paneRemoved |
>     paneRemoved := self panes removeAt: i.
>     paneRemoved unregisterFromAllAnnouncements.
>     self announce: (GLMPaneRemoved pane: paneRemoved fromBrowser: self )

You are trying to reason about your browser from a user interface perspective.


Yes, in fact I was doing that ;)
 
Glamour is at a higher level of abstraction and it is meant to not mix the browsing model with rendering.


ok...
 
It looks to me like what you are trying to achieve is that you want to present the same object in 5 different ways, and only look at some of them as you wish.


Yes. If you imagine that "the same object" is a method, then yes. The problem is that imageine this:
http://img862.imageshack.us/i/vmbrowsermethods.png/

Maybe at some point I only need the smalltalk code and the machine code (I don't need the machine code). Tomorrow I may need only the bytecodes and the machine code. Etc...so, creating a new browser for each possible combination is not a good idea. Even more in this case: http://img4.imageshack.us/f/vmbrowsermappings.png/
where I have 5 panels.
But notice that when I need some panels, I need them at the same time, because this is exactly for learning how to map from  smalltalk to bytecodes, or from btyecodes to machine code, or from....so tabs doesn't work in this case.

 
The straightforward way to achieve this would be by using multiple presentations (like you did for Class list / Hierarchy).

I didn't get it. I didn't do anything special by myself in Class list / Hierarchy
I just change #classCategoriesIn:  to list certain packages instead of all of the image.
 
You would still not have the ability of removing a presentation, but you could put them in tabs.

But tabs doesn't work in this case.
 

GLMPaneRemoved is an internal announcement and it should not be used through scripting. If you need a user interface interaction that does not match your desire, you should create your own browser or presentation type. Just do not mix the UI with the conceptual browser.

Thanks, it is a good point. Any "recommendation" of where I can take a look to customize that? Should I create a subclass from GLMTabulator  and you that from my browsers instead ?
Should I add stuff like #removeColumn to my subclass of GLMTabulator ?    Sorry for the newbie question..I am just getting started ;)

Cheers

Mariano
 

Cheers,
Doru


> thanks for any help
>
> mariano
>
>
> Thanks
>
>
> Thanks in advance
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"No matter how many recipes we know, we still value a chef."







_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--
Mariano
http://marianopeck.wordpress.com


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

Tudor Girba
Hi,

On 20 Apr 2011, at 13:09, Mariano Martinez Peck wrote:

>
>
> On Wed, Apr 20, 2011 at 10:28 AM, Tudor Girba <[hidden email]> wrote:
> Hi Mariano,
>
> On 20 Apr 2011, at 01:10, Mariano Martinez Peck wrote:
>
> > On Wed, Apr 20, 2011 at 1:03 AM, Mariano Martinez Peck <[hidden email]> wrote:
> >
> >
> > On Tue, Apr 19, 2011 at 11:39 PM, Mariano Martinez Peck <[hidden email]> wrote:
> > Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you. Basically, I only have the browsers for the moment. My knowledge is very limited in the Slang to C translator, or machine code simulation. However, the "real VM hackers" will try to provide me such functionalities.
> >
> > Having said that, there are 3 browsers:
> >
> > 1) VMBrowserSlang:  shows only packages and classes which are written in slang. When you select a method, you have 2 panels: smalltalk code and C translated code.
> > Screenshot: http://img857.imageshack.us/i/vmbrowserslang.png/
> >
> > 2) VMBrowserMethods:  shows all packages and classes of the system and for every method, you have 3 panels: smalltalk code, bytecodes and machine code (using the simple mapping)
> > Screenshot: http://img862.imageshack.us/i/vmbrowsermethods.png/
> >
> > 3) VMBrowserMappings: this is for you Eliot!!  Basically, it  shows all packages and classes of the system and for every method, you have 5 panels: smalltalk code and one panel per strategy to map to machine code (simple cogit, sista, etc).
> > Screenshot:  http://img4.imageshack.us/f/vmbrowsermappings.png/
> >
> > As you can see the idea is to see the different stages of our code at the same time: smalltalk code, bytecodes, machine code, etc. The idea is to easily learn.
>
> Sounds great. This is exactly the spirit of Moose.
>
> Could you add a post on your shiny new blog about this? Maybe some code as well? I would love to link to it from the Moose website.
>
>
> Yes, it is planned. But I am waiting for the "backend". I mean, I am waiting for some Eliot changes to be able to get the simulated machine code, and hopefully the same from Dave about C code.
> As soon as I have one of those, I post it.
>  
>
> > Now...the questions:
> >
> > 1) how can I put a title to the browsers ?  In this case, they all are subclasses from GLMGlobalBrowserTemplate.
> >
> >
> > I answer my self
> >
> > buildBrowser
> >
> >     browser := GLMTabulator new.
> >     browser title: 'A Cool title'.
>
> :)
>
> >  2) Is there a way to easily "close" and auto-adjust subpanes?  For example, look this screenshot: http://img4.imageshack.us/f/vmbrowsermappings.png/
> > there are 5 panes that are rendered when a method is selected. I would love that somehow (which a little X in the tab title, or a checkbox somewhere with the available panes), one or more of those panes can be automatically removed (and if added again even better). And when I remove one of them, the others auto-adjust to ocupy the full container. It is really difficult to explain by email..
> > Ok...I found the method populate: #selection icon: GLMUIThemeExtraIcons glamorousCancel entitled: 'Close'  with: [:text :aClass | self halt. ].
> > so that I can use it like this:
> >
> > sourceCodeIn: a
> >     | lintBrowser |
> >     (a text)
> >         title: 'Method source';
> >         display: [ :class :method | class sourceCodeAt: method ];
> >         forSmalltalk: [ :class | class ];
> >         populate: #selection icon: GLMUIThemeExtraIcons glamorousCancel entitled: 'Close'  with: [:text :aClass | self halt. ].
> >
> >
> > but still, I don't know how to remove the current code pane from the super container.
> >
> >
> > I found something similar, but still don't know how to make it work:
> >
> > removePaneIndex: i
> >     | paneRemoved |
> >     paneRemoved := self panes removeAt: i.
> >     paneRemoved unregisterFromAllAnnouncements.
> >     self announce: (GLMPaneRemoved pane: paneRemoved fromBrowser: self )
>
> You are trying to reason about your browser from a user interface perspective.
>
>
> Yes, in fact I was doing that ;)
>  
> Glamour is at a higher level of abstraction and it is meant to not mix the browsing model with rendering.
>
>
> ok...
>  
> It looks to me like what you are trying to achieve is that you want to present the same object in 5 different ways, and only look at some of them as you wish.
>
>
> Yes. If you imagine that "the same object" is a method, then yes. The problem is that imageine this:
> http://img862.imageshack.us/i/vmbrowsermethods.png/
>
> Maybe at some point I only need the smalltalk code and the machine code (I don't need the machine code). Tomorrow I may need only the bytecodes and the machine code. Etc...so, creating a new browser for each possible combination is not a good idea. Even more in this case: http://img4.imageshack.us/f/vmbrowsermappings.png/
> where I have 5 panels.
> But notice that when I need some panels, I need them at the same time, because this is exactly for learning how to map from  smalltalk to bytecodes, or from btyecodes to machine code, or from....so tabs doesn't work in this case.

It looks to me like you basically want to parameterize the structure of the browser and you are mainly worried for code reuse.

If this is the case, the bottom part should probably become one single pane and in there you could put a separate browser. Like that you could implement multiple browsers for the lower part and compose them programatically.

You could also use a DynamicPresentation that decides what presentations should go inside at runtime, but it is less likely that you will need that.

> The straightforward way to achieve this would be by using multiple presentations (like you did for Class list / Hierarchy).
>
> I didn't get it. I didn't do anything special by myself in Class list / Hierarchy
> I just change #classCategoriesIn:  to list certain packages instead of all of the image.
>  
> You would still not have the ability of removing a presentation, but you could put them in tabs.
>
> But tabs doesn't work in this case.
>  
>
> GLMPaneRemoved is an internal announcement and it should not be used through scripting. If you need a user interface interaction that does not match your desire, you should create your own browser or presentation type. Just do not mix the UI with the conceptual browser.
>
> Thanks, it is a good point. Any "recommendation" of where I can take a look to customize that? Should I create a subclass from GLMTabulator  and you that from my browsers instead ?
> Should I add stuff like #removeColumn to my subclass of GLMTabulator ?    Sorry for the newbie question..I am just getting started ;)

No, the GLMTabulator is not what you want.

Please, read the Glamour chapter from the Moose Book first, and then we can resume the discussion on what can be done.

Cheers,
Doru


> Cheers
>
> Mariano
>  
>
> Cheers,
> Doru
>
>
> > thanks for any help
> >
> > mariano
> >
> >
> > Thanks
> >
> >
> > Thanks in advance
> >
> > --
> > Mariano
> > http://marianopeck.wordpress.com
> >
> >
> >
> >
> > --
> > Mariano
> > http://marianopeck.wordpress.com
> >
> >
> >
> >
> > --
> > Mariano
> > http://marianopeck.wordpress.com
> >
> > _______________________________________________
> > Moose-dev mailing list
> > [hidden email]
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "No matter how many recipes we know, we still value a chef."
>
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"We can create beautiful models in a vacuum.
But, to get them effective we have to deal with the inconvenience of reality."


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

Mariano Martinez Peck


On Wed, Apr 20, 2011 at 1:46 PM, Tudor Girba <[hidden email]> wrote:
Hi,

On 20 Apr 2011, at 13:09, Mariano Martinez Peck wrote:

>
>
> On Wed, Apr 20, 2011 at 10:28 AM, Tudor Girba <[hidden email]> wrote:
> Hi Mariano,
>
> On 20 Apr 2011, at 01:10, Mariano Martinez Peck wrote:
>
> > On Wed, Apr 20, 2011 at 1:03 AM, Mariano Martinez Peck <[hidden email]> wrote:
> >
> >
> > On Tue, Apr 19, 2011 at 11:39 PM, Mariano Martinez Peck <[hidden email]> wrote:
> > Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you. Basically, I only have the browsers for the moment. My knowledge is very limited in the Slang to C translator, or machine code simulation. However, the "real VM hackers" will try to provide me such functionalities.
> >
> > Having said that, there are 3 browsers:
> >
> > 1) VMBrowserSlang:  shows only packages and classes which are written in slang. When you select a method, you have 2 panels: smalltalk code and C translated code.
> > Screenshot: http://img857.imageshack.us/i/vmbrowserslang.png/
> >
> > 2) VMBrowserMethods:  shows all packages and classes of the system and for every method, you have 3 panels: smalltalk code, bytecodes and machine code (using the simple mapping)
> > Screenshot: http://img862.imageshack.us/i/vmbrowsermethods.png/
> >
> > 3) VMBrowserMappings: this is for you Eliot!!  Basically, it  shows all packages and classes of the system and for every method, you have 5 panels: smalltalk code and one panel per strategy to map to machine code (simple cogit, sista, etc).
> > Screenshot:  http://img4.imageshack.us/f/vmbrowsermappings.png/
> >
> > As you can see the idea is to see the different stages of our code at the same time: smalltalk code, bytecodes, machine code, etc. The idea is to easily learn.
>
> Sounds great. This is exactly the spirit of Moose.
>
> Could you add a post on your shiny new blog about this? Maybe some code as well? I would love to link to it from the Moose website.
>
>
> Yes, it is planned. But I am waiting for the "backend". I mean, I am waiting for some Eliot changes to be able to get the simulated machine code, and hopefully the same from Dave about C code.
> As soon as I have one of those, I post it.
>
>
> > Now...the questions:
> >
> > 1) how can I put a title to the browsers ?  In this case, they all are subclasses from GLMGlobalBrowserTemplate.
> >
> >
> > I answer my self
> >
> > buildBrowser
> >
> >     browser := GLMTabulator new.
> >     browser title: 'A Cool title'.
>
> :)
>
> >  2) Is there a way to easily "close" and auto-adjust subpanes?  For example, look this screenshot: http://img4.imageshack.us/f/vmbrowsermappings.png/
> > there are 5 panes that are rendered when a method is selected. I would love that somehow (which a little X in the tab title, or a checkbox somewhere with the available panes), one or more of those panes can be automatically removed (and if added again even better). And when I remove one of them, the others auto-adjust to ocupy the full container. It is really difficult to explain by email..
> > Ok...I found the method populate: #selection icon: GLMUIThemeExtraIcons glamorousCancel entitled: 'Close'  with: [:text :aClass | self halt. ].
> > so that I can use it like this:
> >
> > sourceCodeIn: a
> >     | lintBrowser |
> >     (a text)
> >         title: 'Method source';
> >         display: [ :class :method | class sourceCodeAt: method ];
> >         forSmalltalk: [ :class | class ];
> >         populate: #selection icon: GLMUIThemeExtraIcons glamorousCancel entitled: 'Close'  with: [:text :aClass | self halt. ].
> >
> >
> > but still, I don't know how to remove the current code pane from the super container.
> >
> >
> > I found something similar, but still don't know how to make it work:
> >
> > removePaneIndex: i
> >     | paneRemoved |
> >     paneRemoved := self panes removeAt: i.
> >     paneRemoved unregisterFromAllAnnouncements.
> >     self announce: (GLMPaneRemoved pane: paneRemoved fromBrowser: self )
>
> You are trying to reason about your browser from a user interface perspective.
>
>
> Yes, in fact I was doing that ;)
>
> Glamour is at a higher level of abstraction and it is meant to not mix the browsing model with rendering.
>
>
> ok...
>
> It looks to me like what you are trying to achieve is that you want to present the same object in 5 different ways, and only look at some of them as you wish.
>
>
> Yes. If you imagine that "the same object" is a method, then yes. The problem is that imageine this:
> http://img862.imageshack.us/i/vmbrowsermethods.png/
>
> Maybe at some point I only need the smalltalk code and the machine code (I don't need the machine code). Tomorrow I may need only the bytecodes and the machine code. Etc...so, creating a new browser for each possible combination is not a good idea. Even more in this case: http://img4.imageshack.us/f/vmbrowsermappings.png/
> where I have 5 panels.
> But notice that when I need some panels, I need them at the same time, because this is exactly for learning how to map from  smalltalk to bytecodes, or from btyecodes to machine code, or from....so tabs doesn't work in this case.

It looks to me like you basically want to parameterize the structure of the browser and you are mainly worried for code reuse.


Now, it is not about code reuse, but about usability. You way want to decide "at runtime" which panels to open and which ones to close. And even do it in the same browser instance that you have open. In addition, imagine having 20 diffeerent browsers (for each conbination) and the "user" having to open ONE of them in particular for any case...complicated.

 
If this is the case, the bottom part should probably become one single pane and in there you could put a separate browser. Like that you could implement multiple browsers for the lower part and compose them programatically.

You could also use a DynamicPresentation that decides what presentations should go inside at runtime, but it is less likely that you will need that.


Maybe I do ;)  I'll take a look
 
> The straightforward way to achieve this would be by using multiple presentations (like you did for Class list / Hierarchy).
>
> I didn't get it. I didn't do anything special by myself in Class list / Hierarchy
> I just change #classCategoriesIn:  to list certain packages instead of all of the image.
>
> You would still not have the ability of removing a presentation, but you could put them in tabs.
>
> But tabs doesn't work in this case.
>
>
> GLMPaneRemoved is an internal announcement and it should not be used through scripting. If you need a user interface interaction that does not match your desire, you should create your own browser or presentation type. Just do not mix the UI with the conceptual browser.
>
> Thanks, it is a good point. Any "recommendation" of where I can take a look to customize that? Should I create a subclass from GLMTabulator  and you that from my browsers instead ?
> Should I add stuff like #removeColumn to my subclass of GLMTabulator ?    Sorry for the newbie question..I am just getting started ;)

No, the GLMTabulator is not what you want.

Please, read the Glamour chapter from the Moose Book first, and then we can resume the discussion on what can be done.


Thanks for pointing out that.  I will read it along the week and I will come back after.
 
Cheers,
Doru


> Cheers
>
> Mariano
>
>
> Cheers,
> Doru
>
>
> > thanks for any help
> >
> > mariano
> >
> >
> > Thanks
> >
> >
> > Thanks in advance
> >
> > --
> > Mariano
> > http://marianopeck.wordpress.com
> >
> >
> >
> >
> > --
> > Mariano
> > http://marianopeck.wordpress.com
> >
> >
> >
> >
> > --
> > Mariano
> > http://marianopeck.wordpress.com
> >
> > _______________________________________________
> > Moose-dev mailing list
> > [hidden email]
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "No matter how many recipes we know, we still value a chef."
>
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"We can create beautiful models in a vacuum.
But, to get them effective we have to deal with the inconvenience of reality."


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--
Mariano
http://marianopeck.wordpress.com


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

abergel
In reply to this post by Mariano Martinez Peck
> Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you.


+1
It is much faster to create a browser in glamour than with OB. I am not sure how Glamour scale, but it has impressed me for how easy it is to create a browser.

Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

Tudor Girba
Hi,

On 4 May 2011, at 16:30, Alexandre Bergel wrote:

>> Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you.
>
>
> +1
> It is much faster to create a browser in glamour than with OB. I am not sure how Glamour scale, but it has impressed me for how easy it is to create a browser.

When you say scale, what do you mean?

Cheers,
Doru



> Alexandre
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"We cannot reach the flow of things unless we let go."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

abergel
To have a large browser with multiple panes. When I said "I am not sure", I instead meant "I do not know".
Glamour is really cool.

Alexandre



On 4 May 2011, at 12:32, Tudor Girba wrote:

> Hi,
>
> On 4 May 2011, at 16:30, Alexandre Bergel wrote:
>
>>> Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you.
>>
>>
>> +1
>> It is much faster to create a browser in glamour than with OB. I am not sure how Glamour scale, but it has impressed me for how easy it is to create a browser.
>
> When you say scale, what do you mean?
>
> Cheers,
> Doru
>
>
>
>> Alexandre
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "We cannot reach the flow of things unless we let go."
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

Tudor Girba
Hi Alex,

I asked because maybe we can just build a proof of concept, or a benchmark to check for this.

Cheers,
Doru


On 4 May 2011, at 19:39, Alexandre Bergel wrote:

> To have a large browser with multiple panes. When I said "I am not sure", I instead meant "I do not know".
> Glamour is really cool.
>
> Alexandre
>
>
>
> On 4 May 2011, at 12:32, Tudor Girba wrote:
>
>> Hi,
>>
>> On 4 May 2011, at 16:30, Alexandre Bergel wrote:
>>
>>>> Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you.
>>>
>>>
>>> +1
>>> It is much faster to create a browser in glamour than with OB. I am not sure how Glamour scale, but it has impressed me for how easy it is to create a browser.
>>
>> When you say scale, what do you mean?
>>
>> Cheers,
>> Doru
>>
>>
>>
>>> Alexandre
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>>
>> "We cannot reach the flow of things unless we let go."
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"When people care, great things can happen."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

abergel
> I asked because maybe we can just build a proof of concept, or a benchmark to check for this.

I have written some benchmarks for Mondrian some times ago. I promised to Ivan, one of my student, than I will revive them to monitor the evolution of the benchmark on MrHolmes (http://mrholmes.dcc.uchile.cl:9090/MrHolmes)

Alexandre

>
>
> On 4 May 2011, at 19:39, Alexandre Bergel wrote:
>
>> To have a large browser with multiple panes. When I said "I am not sure", I instead meant "I do not know".
>> Glamour is really cool.
>>
>> Alexandre
>>
>>
>>
>> On 4 May 2011, at 12:32, Tudor Girba wrote:
>>
>>> Hi,
>>>
>>> On 4 May 2011, at 16:30, Alexandre Bergel wrote:
>>>
>>>>> Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you.
>>>>
>>>>
>>>> +1
>>>> It is much faster to create a browser in glamour than with OB. I am not sure how Glamour scale, but it has impressed me for how easy it is to create a browser.
>>>
>>> When you say scale, what do you mean?
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>>
>>>> Alexandre
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "We cannot reach the flow of things unless we let go."
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "When people care, great things can happen."
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

Stéphane Ducasse
In reply to this post by abergel
Alex and other glamour users

what is really important is that you do not write a long single method
but a lot of little ones so that your code looks like normal smalltalk and not like a class = a script.
I think that this is important for the future of glamour.

stef



>> Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you.
>
>
> +1
> It is much faster to create a browser in glamour than with OB. I am not sure how Glamour scale, but it has impressed me for how easy it is to create a browser.
>
> Alexandre
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

abergel
I agree. But the very nice things, is to see the flow of the browser in only one method. In OB, that was not the case. No idea what get refreshed when you click on a node. You had to go on the definition of a node to see whether it does a refresh, and then, you had to check who has subscribed to the announcement.

It is true that people have tendency to write script in Mondrian and Glamour in a long method since these frameworks requires you to write blocks instead of creating classes. However, nothing prevent one from modularizing scripts.

Cheers,
Alexandre


On 5 May 2011, at 01:56, Stéphane Ducasse wrote:

> Alex and other glamour users
>
> what is really important is that you do not write a long single method
> but a lot of little ones so that your code looks like normal smalltalk and not like a class = a script.
> I think that this is important for the future of glamour.
>
> stef
>
>
>
>>> Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you.
>>
>>
>> +1
>> It is much faster to create a browser in glamour than with OB. I am not sure how Glamour scale, but it has impressed me for how easy it is to create a browser.
>>
>> Alexandre
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

Stéphane Ducasse

On May 5, 2011, at 6:38 PM, Alexandre Bergel wrote:

> I agree. But the very nice things, is to see the flow of the browser in only one method.

I can tell you don't do that!
This is my main point against Glamour.
You want object and not script programming.

> In OB, that was not the case. No idea what get refreshed when you click on a node. You had to go on the definition of a node to see whether it does a refresh, and then, you had to check who has subscribed to the announcement.
>
> It is true that people have tendency to write script in Mondrian and Glamour in a long method since these frameworks requires you to write blocks instead of creating classes. However, nothing prevent one from modularizing scripts.

well.....
I will not comment on that.
Do not write long methods.

>
> Cheers,
> Alexandre
>
>
> On 5 May 2011, at 01:56, Stéphane Ducasse wrote:
>
>> Alex and other glamour users
>>
>> what is really important is that you do not write a long single method
>> but a lot of little ones so that your code looks like normal smalltalk and not like a class = a script.
>> I think that this is important for the future of glamour.
>>
>> stef
>>
>>
>>
>>>> Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you.
>>>
>>>
>>> +1
>>> It is much faster to create a browser in glamour than with OB. I am not sure how Glamour scale, but it has impressed me for how easy it is to create a browser.
>>>
>>> Alexandre
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

Tudor Girba
Hi,

On 5 May 2011, at 20:38, Stéphane Ducasse wrote:

>
> On May 5, 2011, at 6:38 PM, Alexandre Bergel wrote:
>
>> I agree. But the very nice things, is to see the flow of the browser in only one method.
>
> I can tell you don't do that!
> This is my main point against Glamour.
> You want object and not script programming.

This is not an issue and it actually never was. If you take a look, you will see that most browsers have their own class now and multiple small methods inside.

Cheers,
Doru



>> In OB, that was not the case. No idea what get refreshed when you click on a node. You had to go on the definition of a node to see whether it does a refresh, and then, you had to check who has subscribed to the announcement.
>>
>> It is true that people have tendency to write script in Mondrian and Glamour in a long method since these frameworks requires you to write blocks instead of creating classes. However, nothing prevent one from modularizing scripts.
>
> well.....
> I will not comment on that.
> Do not write long methods.
>
>>
>> Cheers,
>> Alexandre
>>
>>
>> On 5 May 2011, at 01:56, Stéphane Ducasse wrote:
>>
>>> Alex and other glamour users
>>>
>>> what is really important is that you do not write a long single method
>>> but a lot of little ones so that your code looks like normal smalltalk and not like a class = a script.
>>> I think that this is important for the future of glamour.
>>>
>>> stef
>>>
>>>
>>>
>>>>> Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you.
>>>>
>>>>
>>>> +1
>>>> It is much faster to create a browser in glamour than with OB. I am not sure how Glamour scale, but it has impressed me for how easy it is to create a browser.
>>>>
>>>> Alexandre
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"We are all great at making mistakes."








_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

simondenier

Well maybe it's true that Mondrian/Glamour make it easy to hack some tools which are not so easy to build cleanly with objects. I never finished (or have yet to finish) the clean implementation of Package Blueprints, it's not easy to find the right balance of responsibility between objects.

On 5 mai 2011, at 21:19, Tudor Girba wrote:

> Hi,
>
> On 5 May 2011, at 20:38, Stéphane Ducasse wrote:
>
>>
>> On May 5, 2011, at 6:38 PM, Alexandre Bergel wrote:
>>
>>> I agree. But the very nice things, is to see the flow of the browser in only one method.
>>
>> I can tell you don't do that!
>> This is my main point against Glamour.
>> You want object and not script programming.
>
> This is not an issue and it actually never was. If you take a look, you will see that most browsers have their own class now and multiple small methods inside.
>
> Cheers,
> Doru
>
>
>
>>> In OB, that was not the case. No idea what get refreshed when you click on a node. You had to go on the definition of a node to see whether it does a refresh, and then, you had to check who has subscribed to the announcement.
>>>
>>> It is true that people have tendency to write script in Mondrian and Glamour in a long method since these frameworks requires you to write blocks instead of creating classes. However, nothing prevent one from modularizing scripts.
>>
>> well.....
>> I will not comment on that.
>> Do not write long methods.
>>
>>>
>>> Cheers,
>>> Alexandre
>>>
>>>
>>> On 5 May 2011, at 01:56, Stéphane Ducasse wrote:
>>>
>>>> Alex and other glamour users
>>>>
>>>> what is really important is that you do not write a long single method
>>>> but a lot of little ones so that your code looks like normal smalltalk and not like a class = a script.
>>>> I think that this is important for the future of glamour.
>>>>
>>>> stef
>>>>
>>>>
>>>>
>>>>>> Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you.
>>>>>
>>>>>
>>>>> +1
>>>>> It is much faster to create a browser in glamour than with OB. I am not sure how Glamour scale, but it has impressed me for how easy it is to create a browser.
>>>>>
>>>>> Alexandre
>>>>>
>>>>> --
>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "We are all great at making mistakes."
>
>
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
Simon Denier




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Moose/Glamour is cool (and I have questions!)

Tudor Girba
Hi,

I take issue with "hacking" in relation to Glamour / Mondrian :)). I think many problems come from the point of view through which these tools are meant to be built.

If you will try to build a regular user interface with Glamour, it will probably be very costly. If, on the other hand, you successfully map your problem, and not the tool you have a priori in mind, on the mechanisms of Glamour, then you get productive.

For example, the code of DSM does not work well with Mondrian because the abstractions of Mondrian are not quite suitable for what DSM wanted to get (e.g., a table). So, the code is not elegant. What would be needed is a new abstraction in which this code can look nice. This abstraction is probably offered by EyeSee now.

The same with Glamour. Glamour is good for some things, and not so good for others. For example, it is not that good for building user interfaces with side-effects. On the other hand, it is possible to build a new kind of implicit browser that does provide the mechanism you need to describe your requirement.

All in all, it depends :).

Cheers,
Doru


On 5 May 2011, at 22:45, Simon Denier wrote:

>
> Well maybe it's true that Mondrian/Glamour make it easy to hack some tools which are not so easy to build cleanly with objects. I never finished (or have yet to finish) the clean implementation of Package Blueprints, it's not easy to find the right balance of responsibility between objects.
>
> On 5 mai 2011, at 21:19, Tudor Girba wrote:
>
>> Hi,
>>
>> On 5 May 2011, at 20:38, Stéphane Ducasse wrote:
>>
>>>
>>> On May 5, 2011, at 6:38 PM, Alexandre Bergel wrote:
>>>
>>>> I agree. But the very nice things, is to see the flow of the browser in only one method.
>>>
>>> I can tell you don't do that!
>>> This is my main point against Glamour.
>>> You want object and not script programming.
>>
>> This is not an issue and it actually never was. If you take a look, you will see that most browsers have their own class now and multiple small methods inside.
>>
>> Cheers,
>> Doru
>>
>>
>>
>>>> In OB, that was not the case. No idea what get refreshed when you click on a node. You had to go on the definition of a node to see whether it does a refresh, and then, you had to check who has subscribed to the announcement.
>>>>
>>>> It is true that people have tendency to write script in Mondrian and Glamour in a long method since these frameworks requires you to write blocks instead of creating classes. However, nothing prevent one from modularizing scripts.
>>>
>>> well.....
>>> I will not comment on that.
>>> Do not write long methods.
>>>
>>>>
>>>> Cheers,
>>>> Alexandre
>>>>
>>>>
>>>> On 5 May 2011, at 01:56, Stéphane Ducasse wrote:
>>>>
>>>>> Alex and other glamour users
>>>>>
>>>>> what is really important is that you do not write a long single method
>>>>> but a lot of little ones so that your code looks like normal smalltalk and not like a class = a script.
>>>>> I think that this is important for the future of glamour.
>>>>>
>>>>> stef
>>>>>
>>>>>
>>>>>
>>>>>>> Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you.
>>>>>>
>>>>>>
>>>>>> +1
>>>>>> It is much faster to create a browser in glamour than with OB. I am not sure how Glamour scale, but it has impressed me for how easy it is to create a browser.
>>>>>>
>>>>>> Alexandre
>>>>>>
>>>>>> --
>>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>>
>> "We are all great at making mistakes."
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> Simon Denier
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"From an abstract enough point of view, any two things are similar."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev