gtinspector deconstructed

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

gtinspector deconstructed

Tudor Girba-2
Hi,

I took a bit of time to describe how the GTInspector works, what makes it different, and to provide hints for several usage scenarios.

It's a long post, I know :), but please take a look. As you might know, this is the default inspector in the Moose image, but it can also be loaded in a fresh Pharo image.

I am particularly interested in the following:
- if you never used it, and tried it now, what don't you like?
- if you used it, was there anything that you did not know?
- and of course, what do you like about it?

Cheers,
Doru

--

"Every thing has its own flow"

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

Re: [Pharo-dev] gtinspector deconstructed

Sven Van Caekenberghe-2
Hi Doru,

On 19 Dec 2013, at 07:50, Tudor Girba <[hidden email]> wrote:

> Hi,
>
> I took a bit of time to describe how the GTInspector works, what makes it different, and to provide hints for several usage scenarios.
> http://www.humane-assessment.com/blog/the-moldable-gtinspector-deconstructed
>
> It's a long post, I know :), but please take a look. As you might know, this is the default inspector in the Moose image, but it can also be loaded in a fresh Pharo image.
>
> I am particularly interested in the following:
> - if you never used it, and tried it now, what don't you like?
> - if you used it, was there anything that you did not know?
> - and of course, what do you like about it?
>
> Cheers,
> Doru
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"

I read the blog post and installed the code in my working Pharo 3 image. First off, I like the debugger, it feels polished, and I like the inspector, it is quite interesting. The clear tables for instance variables names and values and dictionary keys and values are much better. SequenceableCollection indexes would be nice. Paging is cool.

I miss an option to go back to less columns, like from 1 to 2 and back to 1, I can’t seem to deselect something in the first one, which would be a way to let the second one disappear again. I hope I am making myself clear ;-)

We have specialised inspectors for Integer and Float (and maybe some more) standard in Pharo, showing more high level virtual fields, it would be nice if you could implement those as well, maybe as alternative views.

Which brings me to my final question: how do I write simple custom inspectors, given that I am not familiar with Glamour/Moose - that could maybe be another blog post ?

Anyway, thanks for pushing this !

Sven

PS: I wonder whether it would be possible to have both types of inspectors/debuggers available at the same time, so that one can switch on the fly, compare them, use one or the other depending on the task ?

--
Sven Van Caekenberghe
http://stfx.eu
Smalltalk is the Red Pill


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

Re: [Pharo-dev] gtinspector deconstructed

Tudor Girba-2
Hi Sven,


On Thu, Dec 19, 2013 at 9:29 PM, Sven Van Caekenberghe <[hidden email]> wrote:
Hi Doru,

On 19 Dec 2013, at 07:50, Tudor Girba <[hidden email]> wrote:

> Hi,
>
> I took a bit of time to describe how the GTInspector works, what makes it different, and to provide hints for several usage scenarios.
> http://www.humane-assessment.com/blog/the-moldable-gtinspector-deconstructed
>
> It's a long post, I know :), but please take a look. As you might know, this is the default inspector in the Moose image, but it can also be loaded in a fresh Pharo image.
>
> I am particularly interested in the following:
> - if you never used it, and tried it now, what don't you like?
> - if you used it, was there anything that you did not know?
> - and of course, what do you like about it?
>
> Cheers,
> Doru
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"

I read the blog post and installed the code in my working Pharo 3 image. First off, I like the debugger, it feels polished,

Thanks. The debugger is particularly interesting when you get into supported specific cases. But, already Andrei and Alex worked on a cool extension for the debugger that highlights on the stack the entries that come from the same class or from the same package. This is quite educating. Both debugging and inspecting are so under developed that we have a ton of potential in front of us. But, let's talk about this in a separate thread :).

 
and I like the inspector, it is quite interesting. The clear tables for instance variables names and values and dictionary keys and values are much better.

Thanks.

 
SequenceableCollection indexes would be nice. Paging is cool. 

What do you mean by indexes? The position of an item in the collection?
 

I miss an option to go back to less columns, like from 1 to 2 and back to 1, I can’t seem to deselect something in the first one, which would be a way to let the second one disappear again. I hope I am making myself clear ;-)

Yes, I agree. This is an extension I want for Glamour in general: to grow a pane to fill the window (similar to what happens in Eclipse). This will help you switch between floating navigation mode and more in-depth work mode.

 
We have specialised inspectors for Integer and Float (and maybe some more) standard in Pharo, showing more high level virtual fields, it would be nice if you could implement those as well, maybe as alternative views.

Certainly. That is the whole idea: create more dedicated presentations to serve dedicated use cases. I do not know the use case for this, but let's make an exercise out of it. Can you tell me what exactly would be interested in seeing? So, if you have an Integer or a Float what code would you like to trigger and have presented?

 
Which brings me to my final question: how do I write simple custom inspectors, given that I am not familiar with Glamour/Moose - that could maybe be another blog post ?

At the end of the post, there is a "Be moldable" section in which I am hinting at the process. Essentially, you have to extend your object with a method that follows this pattern:

YourClass>>gtInspectorYourPresentationIn: composite
     <gtInspectorPresentationOrder: 30>
     composite "followed by Glamour code to construct presentations"

The post shows this example:
RGMethodDefinition>> gtInspectorSendersIn: composite
     <gtInspectorPresentationOrder: 30>
     composite list
          title: 'Senders';
          display: [ self compiledMethod implementors ] 

So, to find more examples, simply search for senders of #gtInspectorPresentationOrder: (or just inspect the symbol to see what happens :)), and you will see all extensions in the image.

I would like to make all presentation tabs to give you the possibility to jump to the implementation so that you can see more examples (like with halos). In any case, I will write another post with some more implementation examples.

 
Anyway, thanks for pushing this !

Thanks for looking into it :)


Sven

PS: I wonder whether it would be possible to have both types of inspectors/debuggers available at the same time, so that one can switch on the fly, compare them, use one or the other depending on the task ?

Marcus says that there is an intention of having multiple alternative tools be described via pragmas and be switchable from the settings browser. However, I am not really convinced this is the way to go. I would be more interested in what does not work to make one work smoothly.

But, besides the Float and Integer views, do you happen to have something else that you cannot do as easily with the GTInspector?

Cheers,
Doru

 
--
Sven Van Caekenberghe
http://stfx.eu
Smalltalk is the Red Pill





--

"Every thing has its own flow"

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

Re: [Pharo-dev] gtinspector deconstructed

Sven Van Caekenberghe-2

On 19 Dec 2013, at 22:08, Tudor Girba <[hidden email]> wrote:

SequenceableCollection indexes would be nice. Paging is cool. 

What do you mean by indexes? The position of an item in the collection?

Yes,

I miss an option to go back to less columns, like from 1 to 2 and back to 1, I can’t seem to deselect something in the first one, which would be a way to let the second one disappear again. I hope I am making myself clear ;-)

Yes, I agree. This is an extension I want for Glamour in general: to grow a pane to fill the window (similar to what happens in Eclipse). This will help you switch between floating navigation mode and more in-depth work mode.

That would be cool.

We have specialised inspectors for Integer and Float (and maybe some more) standard in Pharo, showing more high level virtual fields, it would be nice if you could implement those as well, maybe as alternative views.

Certainly. That is the whole idea: create more dedicated presentations to serve dedicated use cases. I do not know the use case for this, but let's make an exercise out of it. Can you tell me what exactly would be interested in seeing? So, if you have an Integer or a Float what code would you like to trigger and have presented?

Some of this got lost when EyeInspector got introduced, here are some screenshots from an older image:


I can think of alternative representations for lots of classes.

Which brings me to my final question: how do I write simple custom inspectors, given that I am not familiar with Glamour/Moose - that could maybe be another blog post ?

At the end of the post, there is a "Be moldable" section in which I am hinting at the process. Essentially, you have to extend your object with a method that follows this pattern:

YourClass>>gtInspectorYourPresentationIn: composite
     <gtInspectorPresentationOrder: 30>
     composite "followed by Glamour code to construct presentations"

The post shows this example:
RGMethodDefinition>> gtInspectorSendersIn: composite
     <gtInspectorPresentationOrder: 30>
     composite list
          title: 'Senders';
          display: [ self compiledMethod implementors ] 

So, to find more examples, simply search for senders of #gtInspectorPresentationOrder: (or just inspect the symbol to see what happens :)), and you will see all extensions in the image.

I would like to make all presentation tabs to give you the possibility to jump to the implementation so that you can see more examples (like with halos). In any case, I will write another post with some more implementation examples.

Yes, I read everything, and I did some code reading, but I felt a bit helpless ;-)

Anyway, thanks for pushing this !

Thanks for looking into it :)


Sven

PS: I wonder whether it would be possible to have both types of inspectors/debuggers available at the same time, so that one can switch on the fly, compare them, use one or the other depending on the task ?

Marcus says that there is an intention of having multiple alternative tools be described via pragmas and be switchable from the settings browser. However, I am not really convinced this is the way to go. I would be more interested in what does not work to make one work smoothly.

I don’t mean switching using a Setting (although that would be good to have too), I meant command-i for normal inspectors, command-shift-i for GT inspectors, or something like that.


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

Re: [Pharo-dev] gtinspector deconstructed

Tudor Girba-2
In reply to this post by Tudor Girba-2
Also, as you pointed out, it is indeed better for a SequenceableCollection to show the indexes for each item. So, now the inspector shows it as well.

Inline image 1

Cheers,
Doru




On Sat, Dec 21, 2013 at 11:45 PM, Tudor Girba <[hidden email]> wrote:
Hi Sven,

Thanks for the suggestions. Integer and Float now have specific extensions to the State presentation.

Inline image 3

Inline image 1

You can see more details about how this works here:

Cheers,
Doru





--

"Every thing has its own flow"

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