[squeak-dev] [Question] How do I use the OmniBrowser?

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

Re: [squeak-dev] Re: [Question] How do I use the OmniBrowser?

David Röthlisberger-2

> That's the price to pay for having an intrusive browser....
> Browser assumptions about the semantics of #break #halt or any other
> messages cannot be more than speculation...
> ...Speculation that we all agreed on some conventions that certainly are
> not part of Smalltalk.
>
> Apart
> - adhering these conventions (but we should not take this decision for
> the sole reason of conforming to a tool, why let a Browser be that
> tyrannic?)

Certainly you don't have to adhere to these conventions, but then you
might have to accept that the tool doesn't do what it is intended to do.
  Every tool has some conventions it relies on, in particular code
browsers. It's difficult, in particular in Smalltalk, to build a useful
code browser that does not rely on any conventions...
You don't have to organize methods in protocols, but then you have to
accept that you just get one category 'unclassified', rendering the
whole method protocol column useless.
The same with #break: if you re-implement that method in your subclasses
of Object, then you give this method (probably) a different meaning than
Object did. A code browser typically goes for the default behavior in a
Squeak image, it can't (and IMHO doesn't have to) assume that other
applications shadow behavior of #break, #halt, whatever.
I really don't see anything intrusive or tyrannic here. In the end, all
you get when you re-implement #break is a (possibly) wrong icon for a
method invoking your #break implementation. Things could be worse...

> - let the browser inferring receiver type (after all, most usages are
> probably self break, so that might be a hint),

Was also thinking about this first. But here you rely on even more
unsure conventions...

> - or using a statically typed language (oh no!)

Better not. ;)

> the last alternative I see is to add yet another Preference...

Evil, evil. ;)

> ... or maybe make the tools more general? Like:

This would certainly be interesting to have.

> - let user peek some lint rules (eventually by package or class)
> - process these rules and mark all methods using a questionable
>   message/pattern
>   (using a Wrapper, like a QuestionableCompiledMethod,
>   or adding yet another CompiledMethod attribute).
> - let the browser lazily highlight such marked methods,
> - and in a greater effort let it explain which part of code is
>   questionable and why (require using more details....)
> - let the user provide hints for immunizing some known_to_be_ok methods
>   against pedantic warnings (using annotations or method attributes?)
>   Beware, such hint should survive code externalization...


Cheers,
David



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [Question] How do I use the OmniBrowser?

Colin Putney
In reply to this post by Avi Bryant-2

On 30-Sep-08, at 11:43 AM, Avi Bryant wrote:

> On Tue, Sep 30, 2008 at 11:37 AM, David Röthlisberger
> <[hidden email]> wrote:
>>
>>> Ditto.  #br is a horrible selector, we're not suffering from a  
>>> shortage of
>>> vowels, #br stands for break, the selector should be #break just  
>>> as "a"
>>> means anchor.
>>
>> yeah, but there's no #a method implemented in Object that has a  
>> particular
>> meaning as #break has, right?
>
> Is Object>>break mentioned anywhere in Squeak documentation? I never
> knew about it until now.  It also has no senders (for somewhat obvious
> reasons), so there would be no problem changing it to something else
> like #breakpoint.
>
> Even without that, though, I don't think there's a real issue here.
> If you're inside canvas code and want a breakpoint, use some other
> receiver - the comment in the #break method itself uses "nil break" as
> an example.

The original issue was that OB uses a flag icon to call attention to  
senders of #halt and #break. In rendering methods, that's a false alarm.

It seems like #break is only used by the tools, so it would better to  
change that than Seaside.

Colin
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [Question] How do I use the OmniBrowser?

Philippe Marschall
2008/10/1, Colin Putney <[hidden email]>:

>
> On 30-Sep-08, at 11:43 AM, Avi Bryant wrote:
>
>> On Tue, Sep 30, 2008 at 11:37 AM, David Röthlisberger
>> <[hidden email]> wrote:
>>>
>>>> Ditto.  #br is a horrible selector, we're not suffering from a
>>>> shortage of
>>>> vowels, #br stands for break, the selector should be #break just
>>>> as "a"
>>>> means anchor.
>>>
>>> yeah, but there's no #a method implemented in Object that has a
>>> particular
>>> meaning as #break has, right?
>>
>> Is Object>>break mentioned anywhere in Squeak documentation? I never
>> knew about it until now.  It also has no senders (for somewhat obvious
>> reasons), so there would be no problem changing it to something else
>> like #breakpoint.
>>
>> Even without that, though, I don't think there's a real issue here.
>> If you're inside canvas code and want a breakpoint, use some other
>> receiver - the comment in the #break method itself uses "nil break" as
>> an example.
>
> The original issue was that OB uses a flag icon to call attention to
> senders of #halt and #break. In rendering methods, that's a false alarm.
>
> It seems like #break is only used by the tools, so it would better to
> change that than Seaside.
Or just change the detection code to check if the receiver of #break
is a variable or argument called html or renderer.

Cheers
Philippe


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [Question] How do I use the OmniBrowser?

Damien Cassou-3
In reply to this post by hh2@lexdb.net
Hi Hannes,

On Tue, Sep 30, 2008 at 11:29 AM, [hidden email] <[hidden email]> wrote:
> Thank you, Damien,  for your hint. But I prefer loading only a few packages
> through the package Universe.


When you do that, you use the main part of my work, i.e., maintaining
the Universe :-).


> DEVELOPER IMAGES
> You load quite a number of packages into the dev images as you write in
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-September/131354.html
> (list of installed packages in the dev images)
>
> But you write that you do not run the tests in the images
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-September/131371.html


Because Laurent Laffont does this for me :-) (thank you Laurent).

> I appreciate the work you are doing (keeping track of interesting packages
> to load, know where to get them from, communicate with package developers)
> but the work is not complete.
> My understanding of a distribution is that the burden of the _tests_ is not
> put onto the consumer.


I agree, it should be put on the Squeak release team and I guess they
agree. I can't fix Squeak. The dev images are not a fork, it's only
packages put into a base image.


> However what I am interested in are the "loading scripts" to avoid having to
> click around in the UniverseBrowser. This means having a kind of loading
> script I can adapt to my needs.

I attached the script to this email. This script uses Universe to load
the different things including the package ImageForDevelopers comming
from SqueakSource. This package configure the image (documentation,
omnibrowser by default, clean tools flap, icon...). If you need more
info please tell me.

--
Damien Cassou
Peter von der Ahé: «I'm beginning to see why Gilad wished us good
luck». (http://blogs.sun.com/ahe/entry/override_snafu)



makeImages.sh (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [Question] How do I use the OmniBrowser?

Damien Cassou-3
On Wed, Oct 1, 2008 at 8:36 AM, Damien Cassou <[hidden email]> wrote:
> I attached the script to this email.

There is a small typo in the name of the generate-squeak-dev method.

--
Damien Cassou
Peter von der Ahé: «I'm beginning to see why Gilad wished us good
luck». (http://blogs.sun.com/ahe/entry/override_snafu)


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [Question] How do I use the OmniBrowser?

David Röthlisberger-2
In reply to this post by Philippe Marschall

>>> Even without that, though, I don't think there's a real issue here.
>>> If you're inside canvas code and want a breakpoint, use some other
>>> receiver - the comment in the #break method itself uses "nil break" as
>>> an example.
>> The original issue was that OB uses a flag icon to call attention to
>> senders of #halt and #break. In rendering methods, that's a false alarm.
>>
>> It seems like #break is only used by the tools, so it would better to
>> change that than Seaside.
>
> Or just change the detection code to check if the receiver of #break
> is a variable or argument called html or renderer.

yes, I also wanted to go for that. In that case you confirm that almost all Seaside
applications either use 'html' or 'renderer' as a name for the receiver of
#break?

David



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [Question] How do I use the OmniBrowser?

Philippe Marschall
2008/10/1 David Röthlisberger <[hidden email]>:

>
>>>> Even without that, though, I don't think there's a real issue here.
>>>> If you're inside canvas code and want a breakpoint, use some other
>>>> receiver - the comment in the #break method itself uses "nil break" as
>>>> an example.
>>>
>>> The original issue was that OB uses a flag icon to call attention to
>>> senders of #halt and #break. In rendering methods, that's a false alarm.
>>>
>>> It seems like #break is only used by the tools, so it would better to
>>> change that than Seaside.
>>
>> Or just change the detection code to check if the receiver of #break
>> is a variable or argument called html or renderer.
>
> yes, I also wanted to go for that. In that case you confirm that almost all
> Seaside applications either use 'html' or 'renderer' as a name for the
> receiver of
> #break?
or simply r, yes.

Cheers
Philippe


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [Question] How do I use the OmniBrowser?

Yar Hwee Boon-3
h too.

--
Hwee-Boon

On Wed, Oct 1, 2008 at 7:11 PM, Philippe Marschall
<[hidden email]> wrote:

> 2008/10/1 David Röthlisberger <[hidden email]>:
>>
>>>>> Even without that, though, I don't think there's a real issue here.
>>>>> If you're inside canvas code and want a breakpoint, use some other
>>>>> receiver - the comment in the #break method itself uses "nil break" as
>>>>> an example.
>>>>
>>>> The original issue was that OB uses a flag icon to call attention to
>>>> senders of #halt and #break. In rendering methods, that's a false alarm.
>>>>
>>>> It seems like #break is only used by the tools, so it would better to
>>>> change that than Seaside.
>>>
>>> Or just change the detection code to check if the receiver of #break
>>> is a variable or argument called html or renderer.
>>
>> yes, I also wanted to go for that. In that case you confirm that almost all
>> Seaside applications either use 'html' or 'renderer' as a name for the
>> receiver of
>> #break?
>
> or simply r, yes.
>
> Cheers
> Philippe
>
>
>
>

12