PharoCompatibility (was Re: NBHelp in Squeak (Re: [squeak-dev] Re: Why FFI is not included with latest squeak ?))

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

PharoCompatibility (was Re: NBHelp in Squeak (Re: [squeak-dev] Re: Why FFI is not included with latest squeak ?))

Frank Shearar-3
On 25 August 2012 22:12, H. Hirzel <[hidden email]> wrote:
> Igor,
>
> Below are the instructions for loading PetitParser manually. NBHelp
> needs PetitParser.
> The Monticello configuration needs to be adapted so that it works fine
> for Squeak as well.
<snip>

> How to load NBHelp in Squeak 4.3
> ================================
>
> Load Pharo compatibility package for Squeak
> -------------------------------------------
>
> Load
> [PharoCompatibility](http://www.squeaksource.com/PharoCompatibility)
> by Frank Shearar
>
> This package contains as the only method
>
>     Symbol>>isBinary
>         ^ self precedence = 2.

Are there any objections to folding this single method into trunk?

frank

Reply | Threaded
Open this post in threaded view
|

Re: PharoCompatibility (was Re: NBHelp in Squeak (Re: [squeak-dev] Re: Why FFI is not included with latest squeak ?))

Levente Uzonyi-2
On Sun, 26 Aug 2012, Frank Shearar wrote:

> On 25 August 2012 22:12, H. Hirzel <[hidden email]> wrote:
>> Igor,
>>
>> Below are the instructions for loading PetitParser manually. NBHelp
>> needs PetitParser.
>> The Monticello configuration needs to be adapted so that it works fine
>> for Squeak as well.
> <snip>
>> How to load NBHelp in Squeak 4.3
>> ================================
>>
>> Load Pharo compatibility package for Squeak
>> -------------------------------------------
>>
>> Load
>> [PharoCompatibility](http://www.squeaksource.com/PharoCompatibility)
>> by Frank Shearar
>>
>> This package contains as the only method
>>
>>     Symbol>>isBinary
>>         ^ self precedence = 2.
>
> Are there any objections to folding this single method into trunk?

I'd like to see a comment about what it means and that it's the same as
#isInfix. Maybe the implementation could be simply: ^self isInfix


Levente

>
> frank
>
>

Reply | Threaded
Open this post in threaded view
|

Re: PharoCompatibility (was Re: NBHelp in Squeak (Re: [squeak-dev] Re: Why FFI is not included with latest squeak ?))

Frank Shearar-3
On 26 August 2012 14:28, Levente Uzonyi <[hidden email]> wrote:

> On Sun, 26 Aug 2012, Frank Shearar wrote:
>
>> On 25 August 2012 22:12, H. Hirzel <[hidden email]> wrote:
>>>
>>> Igor,
>>>
>>> Below are the instructions for loading PetitParser manually. NBHelp
>>> needs PetitParser.
>>> The Monticello configuration needs to be adapted so that it works fine
>>> for Squeak as well.
>>
>> <snip>
>>>
>>> How to load NBHelp in Squeak 4.3
>>> ================================
>>>
>>> Load Pharo compatibility package for Squeak
>>> -------------------------------------------
>>>
>>> Load
>>> [PharoCompatibility](http://www.squeaksource.com/PharoCompatibility)
>>> by Frank Shearar
>>>
>>> This package contains as the only method
>>>
>>>     Symbol>>isBinary
>>>         ^ self precedence = 2.
>>
>>
>> Are there any objections to folding this single method into trunk?
>
>
> I'd like to see a comment about what it means and that it's the same as
> #isInfix. Maybe the implementation could be simply: ^self isInfix

That sounds like a good idea.

frank

> Levente
>
>>
>> frank
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: PharoCompatibility (was Re: NBHelp in Squeak (Re: [squeak-dev] Re: Why FFI is not included with latest squeak ?))

Hannes Hirzel
The class #Symbol in Pharo 1.4 has the two methods

    isBinary
        "Answer whether the receiver is a binary message selector."

              ^ self precedence = 2

and


    isInfix
        "Answer whether the receiver is an infix message selector."

            ^ self precedence = 2



The implementation tells us that they are synonyms there.


The class #Symbol in Squeak 4.3#12192 does not have the method #isBinary

but #isInfix is there


    isInfix
    "Answer whether the receiver is an infix message selector."

    ^ self precedence = 2


>From my point of view there is no problem of including  #isBinary

--Hannes


On 8/26/12, Frank Shearar <[hidden email]> wrote:

> On 26 August 2012 14:28, Levente Uzonyi <[hidden email]> wrote:
>> On Sun, 26 Aug 2012, Frank Shearar wrote:
>>
>>> On 25 August 2012 22:12, H. Hirzel <[hidden email]> wrote:
>>>>
>>>> Igor,
>>>>
>>>> Below are the instructions for loading PetitParser manually. NBHelp
>>>> needs PetitParser.
>>>> The Monticello configuration needs to be adapted so that it works fine
>>>> for Squeak as well.
>>>
>>> <snip>
>>>>
>>>> How to load NBHelp in Squeak 4.3
>>>> ================================
>>>>
>>>> Load Pharo compatibility package for Squeak
>>>> -------------------------------------------
>>>>
>>>> Load
>>>> [PharoCompatibility](http://www.squeaksource.com/PharoCompatibility)
>>>> by Frank Shearar
>>>>
>>>> This package contains as the only method
>>>>
>>>>     Symbol>>isBinary
>>>>         ^ self precedence = 2.
>>>
>>>
>>> Are there any objections to folding this single method into trunk?
>>
>>
>> I'd like to see a comment about what it means and that it's the same as
>> #isInfix. Maybe the implementation could be simply: ^self isInfix
>
> That sounds like a good idea.
>
> frank
>
>> Levente
>>
>>>
>>> frank
>>>
>>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: PharoCompatibility (was Re: NBHelp in Squeak (Re: [squeak-dev] Re: Why FFI is not included with latest squeak ?))

David T. Lewis
In reply to this post by Levente Uzonyi-2
On Sun, Aug 26, 2012 at 03:28:37PM +0200, Levente Uzonyi wrote:

> On Sun, 26 Aug 2012, Frank Shearar wrote:
>
> >On 25 August 2012 22:12, H. Hirzel <[hidden email]> wrote:
> >>Igor,
> >>
> >>Below are the instructions for loading PetitParser manually. NBHelp
> >>needs PetitParser.
> >>The Monticello configuration needs to be adapted so that it works fine
> >>for Squeak as well.
> ><snip>
> >>How to load NBHelp in Squeak 4.3
> >>================================
> >>
> >>Load Pharo compatibility package for Squeak
> >>-------------------------------------------
> >>
> >>Load
> >>[PharoCompatibility](http://www.squeaksource.com/PharoCompatibility)
> >>by Frank Shearar
> >>
> >>This package contains as the only method
> >>
> >>    Symbol>>isBinary
> >>        ^ self precedence = 2.
> >
> >Are there any objections to folding this single method into trunk?
>
> I'd like to see a comment about what it means and that it's the same as
> #isInfix. Maybe the implementation could be simply: ^self isInfix
>

+1 to a good comment.

I would not object to including Symbol>>isBinary if it helps compatibility,
but I can't help but point out that it seems to a poor naming choice. What
in the world is a "binary symbol"? From the name alone I would have inferred
a symbol with two possible states, such as #true and #false. The name #inInfix
is better because it gives a clue to the reader, who may understand that "infix"
has something to do with parsing as opposed to the general concept of binary-ness.

Dave


Reply | Threaded
Open this post in threaded view
|

Re: PharoCompatibility (was Re: NBHelp in Squeak (Re: [squeak-dev] Re: Why FFI is not included with latest squeak ?))

Frank Shearar-3
On 26 August 2012 19:40, David T. Lewis <[hidden email]> wrote:

> On Sun, Aug 26, 2012 at 03:28:37PM +0200, Levente Uzonyi wrote:
>> On Sun, 26 Aug 2012, Frank Shearar wrote:
>>
>> >On 25 August 2012 22:12, H. Hirzel <[hidden email]> wrote:
>> >>Igor,
>> >>
>> >>Below are the instructions for loading PetitParser manually. NBHelp
>> >>needs PetitParser.
>> >>The Monticello configuration needs to be adapted so that it works fine
>> >>for Squeak as well.
>> ><snip>
>> >>How to load NBHelp in Squeak 4.3
>> >>================================
>> >>
>> >>Load Pharo compatibility package for Squeak
>> >>-------------------------------------------
>> >>
>> >>Load
>> >>[PharoCompatibility](http://www.squeaksource.com/PharoCompatibility)
>> >>by Frank Shearar
>> >>
>> >>This package contains as the only method
>> >>
>> >>    Symbol>>isBinary
>> >>        ^ self precedence = 2.
>> >
>> >Are there any objections to folding this single method into trunk?
>>
>> I'd like to see a comment about what it means and that it's the same as
>> #isInfix. Maybe the implementation could be simply: ^self isInfix
>>
>
> +1 to a good comment.
>
> I would not object to including Symbol>>isBinary if it helps compatibility,
> but I can't help but point out that it seems to a poor naming choice. What
> in the world is a "binary symbol"? From the name alone I would have inferred
> a symbol with two possible states, such as #true and #false. The name #inInfix
> is better because it gives a clue to the reader, who may understand that "infix"
> has something to do with parsing as opposed to the general concept of binary-ness.

I'd thought "binary selector" was a common name for symbols like #+ and friends?

But I must confess that I misunderstood the meaning of the method at
first, thinking that it meant a symbol that named a binary function
(as in, one taking two arguments).

Partly that's the fault of the heavily overloaded term "binary" though!

frank

> Dave
>
>

Reply | Threaded
Open this post in threaded view
|

Re: PharoCompatibility (was Re: NBHelp in Squeak (Re: [squeak-dev] Re: Why FFI is not included with latest squeak ?))

Chris Muller-3
In reply to this post by David T. Lewis
We have Symbol>>#isKeyword and #isUnary but you didn't complain about those..

One of the first things learned by new Smalltalkers is that selectors
are Symbols and there are three types of selectors.  IMO, #isBinary is
long overdue to be included in the API.



On Sun, Aug 26, 2012 at 1:40 PM, David T. Lewis <[hidden email]> wrote:

> On Sun, Aug 26, 2012 at 03:28:37PM +0200, Levente Uzonyi wrote:
>> On Sun, 26 Aug 2012, Frank Shearar wrote:
>>
>> >On 25 August 2012 22:12, H. Hirzel <[hidden email]> wrote:
>> >>Igor,
>> >>
>> >>Below are the instructions for loading PetitParser manually. NBHelp
>> >>needs PetitParser.
>> >>The Monticello configuration needs to be adapted so that it works fine
>> >>for Squeak as well.
>> ><snip>
>> >>How to load NBHelp in Squeak 4.3
>> >>================================
>> >>
>> >>Load Pharo compatibility package for Squeak
>> >>-------------------------------------------
>> >>
>> >>Load
>> >>[PharoCompatibility](http://www.squeaksource.com/PharoCompatibility)
>> >>by Frank Shearar
>> >>
>> >>This package contains as the only method
>> >>
>> >>    Symbol>>isBinary
>> >>        ^ self precedence = 2.
>> >
>> >Are there any objections to folding this single method into trunk?
>>
>> I'd like to see a comment about what it means and that it's the same as
>> #isInfix. Maybe the implementation could be simply: ^self isInfix
>>
>
> +1 to a good comment.
>
> I would not object to including Symbol>>isBinary if it helps compatibility,
> but I can't help but point out that it seems to a poor naming choice. What
> in the world is a "binary symbol"? From the name alone I would have inferred
> a symbol with two possible states, such as #true and #false. The name #inInfix
> is better because it gives a clue to the reader, who may understand that "infix"
> has something to do with parsing as opposed to the general concept of binary-ness.
>
> Dave
>
>

Reply | Threaded
Open this post in threaded view
|

Re: PharoCompatibility (was Re: NBHelp in Squeak (Re: [squeak-dev] Re: Why FFI is not included with latest squeak ?))

Frank Shearar-3
On 26 August 2012 22:50, Chris Muller <[hidden email]> wrote:
> We have Symbol>>#isKeyword and #isUnary but you didn't complain about those..
>
> One of the first things learned by new Smalltalkers is that selectors
> are Symbols and there are three types of selectors.  IMO, #isBinary is
> long overdue to be included in the API.

Hm, if only there was an implementation in the Inbox, together with a
test suite... :)

frank

> On Sun, Aug 26, 2012 at 1:40 PM, David T. Lewis <[hidden email]> wrote:
>> On Sun, Aug 26, 2012 at 03:28:37PM +0200, Levente Uzonyi wrote:
>>> On Sun, 26 Aug 2012, Frank Shearar wrote:
>>>
>>> >On 25 August 2012 22:12, H. Hirzel <[hidden email]> wrote:
>>> >>Igor,
>>> >>
>>> >>Below are the instructions for loading PetitParser manually. NBHelp
>>> >>needs PetitParser.
>>> >>The Monticello configuration needs to be adapted so that it works fine
>>> >>for Squeak as well.
>>> ><snip>
>>> >>How to load NBHelp in Squeak 4.3
>>> >>================================
>>> >>
>>> >>Load Pharo compatibility package for Squeak
>>> >>-------------------------------------------
>>> >>
>>> >>Load
>>> >>[PharoCompatibility](http://www.squeaksource.com/PharoCompatibility)
>>> >>by Frank Shearar
>>> >>
>>> >>This package contains as the only method
>>> >>
>>> >>    Symbol>>isBinary
>>> >>        ^ self precedence = 2.
>>> >
>>> >Are there any objections to folding this single method into trunk?
>>>
>>> I'd like to see a comment about what it means and that it's the same as
>>> #isInfix. Maybe the implementation could be simply: ^self isInfix
>>>
>>
>> +1 to a good comment.
>>
>> I would not object to including Symbol>>isBinary if it helps compatibility,
>> but I can't help but point out that it seems to a poor naming choice. What
>> in the world is a "binary symbol"? From the name alone I would have inferred
>> a symbol with two possible states, such as #true and #false. The name #inInfix
>> is better because it gives a clue to the reader, who may understand that "infix"
>> has something to do with parsing as opposed to the general concept of binary-ness.
>>
>> Dave
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: PharoCompatibility (was Re: NBHelp in Squeak (Re: [squeak-dev] Re: Why FFI is not included with latest squeak ?))

David T. Lewis
On Sun, Aug 26, 2012 at 10:51:43PM +0100, Frank Shearar wrote:
> On 26 August 2012 22:50, Chris Muller <[hidden email]> wrote:
> > We have Symbol>>#isKeyword and #isUnary but you didn't complain about those..

You're right, we have #isUnary and #isInfix. In my opinion #isBinary is
not as good a name as #isInfix in this context. But I'm not complaining
and I don't object to adding #isBinary.

> >
> > One of the first things learned by new Smalltalkers is that selectors
> > are Symbols and there are three types of selectors.  IMO, #isBinary is
> > long overdue to be included in the API.
>
> Hm, if only there was an implementation in the Inbox, together with a
> test suite... :)

Thanks Frank, It looks good to me, especially the test suite :)

+1 on adding moving it to trunk.

Dave

>
> frank
>
> > On Sun, Aug 26, 2012 at 1:40 PM, David T. Lewis <[hidden email]> wrote:
> >> On Sun, Aug 26, 2012 at 03:28:37PM +0200, Levente Uzonyi wrote:
> >>> On Sun, 26 Aug 2012, Frank Shearar wrote:
> >>>
> >>> >On 25 August 2012 22:12, H. Hirzel <[hidden email]> wrote:
> >>> >>Igor,
> >>> >>
> >>> >>Below are the instructions for loading PetitParser manually. NBHelp
> >>> >>needs PetitParser.
> >>> >>The Monticello configuration needs to be adapted so that it works fine
> >>> >>for Squeak as well.
> >>> ><snip>
> >>> >>How to load NBHelp in Squeak 4.3
> >>> >>================================
> >>> >>
> >>> >>Load Pharo compatibility package for Squeak
> >>> >>-------------------------------------------
> >>> >>
> >>> >>Load
> >>> >>[PharoCompatibility](http://www.squeaksource.com/PharoCompatibility)
> >>> >>by Frank Shearar
> >>> >>
> >>> >>This package contains as the only method
> >>> >>
> >>> >>    Symbol>>isBinary
> >>> >>        ^ self precedence = 2.
> >>> >
> >>> >Are there any objections to folding this single method into trunk?
> >>>
> >>> I'd like to see a comment about what it means and that it's the same as
> >>> #isInfix. Maybe the implementation could be simply: ^self isInfix
> >>>
> >>
> >> +1 to a good comment.
> >>
> >> I would not object to including Symbol>>isBinary if it helps compatibility,
> >> but I can't help but point out that it seems to a poor naming choice. What
> >> in the world is a "binary symbol"? From the name alone I would have inferred
> >> a symbol with two possible states, such as #true and #false. The name #inInfix
> >> is better because it gives a clue to the reader, who may understand that "infix"
> >> has something to do with parsing as opposed to the general concept of binary-ness.
> >>
> >> Dave
> >>
> >>
> >