[squeak-dev] keeping arrow for assignment operator

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

[squeak-dev] Re: keeping arrow for assignment operator

Zulq Alam-2
Hi Andreas,

Andreas Raab wrote:
>
> So perhaps a starting point is to try to replace screaming with getting
> a better picture about what the opinions on an issue really are. In
> other words, for potentially controversial issues we (the board) could
> organize a poll if there is an actionable proposal on the table. The
> board could then use the result of the poll as a guide to see whether to
> approve the proposal or not.
>

Can you explore the scenario where the board goes against the majority
view? I think in practice it will be quite difficult. If it never
happens this becomes less an opinion poll, more a defacto binding
referendum. I'm not saying this is good or bad, I just want to get a
better idea of how it will work in practice.

Thanks,
Zulq.

Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: keeping arrow for assignment operator

Andreas.Raab
Zulq Alam wrote:
> Can you explore the scenario where the board goes against the majority
> view? I think in practice it will be quite difficult. If it never
> happens this becomes less an opinion poll, more a defacto binding
> referendum. I'm not saying this is good or bad, I just want to get a
> better idea of how it will work in practice.

There are situations where I can imagine this. For example, if a poll
about removing underscore assignment would end up with a small majority
in favor of removing it, I would likely vote against the proposal
because I think language changes require a large majority of the
community to be in favor of the proposal. Whether the board as a whole
thinks the same is of course a different matter but it is one example
where I can imagine the board making a decision that goes against the
majority opinion in a poll.

Another reason why the board may decide differently is if the
participation is very low - if nobody cares about an issue enough to
participate in a poll then obviously the issue isn't quite as important
as people were making it, so the board should be free to make any
decision that seems in the interest of the community.

I don't expect any of this to be the day-to-day operation of course;
this is reserved for controversial issues but the controversial issues
are exactly those where larger concerns can play a role and may lead the
board to make a decision that is not representative of the poll result.

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: keeping arrow for assignment operator

cedreek
In reply to this post by Andrew Tween
>> If, as Bert implied in the other "left arrow related" thread, Shout
>> can render the := as a left arrow, then we get the best of both
>> worlds, no?
>>
>> Problem is that I've never seen this behaviour. Can anybody verify
>> whether it's actually true?
>
> It is controlled by a Preference -
> syntaxHighlightingAsYouTypeLeftArrowAssignment.
>
> There is a corresponding Preference -
> syntaxHighlightingAsYouTypeAnsiAssignment , which changes _ to :=
>
> (If both these preferences are false, then the method source is not
> transformed)
>
> Cheers,
> Andy
>

I tried and it works... except instead of having a real left arrow, I
get an underscore (strangely, this is working in pharo that way
whereas in a fresh squeak dev based on 3.10, this isn't). Anyway,
isn't the idea to have displayed "real" arrow   <-  ?

I think I'd like that but I just dislike seeing underscores for assignement.

Cheers,

Cédrick

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: keeping arrow for assignment operator

Bert Freudenberg
On 13.03.2009, at 17:57, Cédrick Béler wrote:

>>> If, as Bert implied in the other "left arrow related" thread, Shout
>>> can render the := as a left arrow, then we get the best of both
>>> worlds, no?
>>>
>>> Problem is that I've never seen this behaviour. Can anybody verify
>>> whether it's actually true?
>>
>> It is controlled by a Preference -
>> syntaxHighlightingAsYouTypeLeftArrowAssignment.
>>
>> There is a corresponding Preference -
>> syntaxHighlightingAsYouTypeAnsiAssignment , which changes _ to :=
>>
>> (If both these preferences are false, then the method source is not
>> transformed)
>>
>> Cheers,
>> Andy
>>
>
> I tried and it works... except instead of having a real left arrow, I
> get an underscore (strangely, this is working in pharo that way
> whereas in a fresh squeak dev based on 3.10, this isn't). Anyway,
> isn't the idea to have displayed "real" arrow   <-  ?


Looks like you need to teach Shout what character to use to display a  
left-arrow in your preferred font, now that the underscore actually  
displays as an underscore.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: keeping arrow for assignment operator

Jecel Assumpcao Jr
Bert Freudenberg wrote on Fri, 13 Mar 2009 18:54:24 +0100

> On 13.03.2009, at 17:57, Cédrick Béler wrote:
> > I tried and it works... except instead of having a real left arrow, I
> > get an underscore (strangely, this is working in pharo that way
> > whereas in a fresh squeak dev based on 3.10, this isn't). Anyway,
> > isn't the idea to have displayed "real" arrow   <-  ?
>
>
> Looks like you need to teach Shout what character to use to display a  
> left-arrow in your preferred font, now that the underscore actually  
> displays as an underscore.

Actually, the character is the same and has always been shown as a left
arrow or as an underscore depending on what font you are using (as
copy/pasting some code from a browser to this window, which is also in
Squeak but uses a different font, will show). So the way to "fix" this
is to go to background menu and play around with "appearence..." -->
"system fonts..." and select one of the patched fonts for Shout to use
(if that is possible - I have not tried it).

About the general question, while I am very much in favor of moving
beyond ASCII-1963 draft to the ASCII-1967 final standard, I would really
like for us to go even further to Unicode so we can have left arrows in
our code without messing up underscores. This change will cause
backwards compatibility problems, however, and so only should be done as
part of a larger move to new image/source formats.

-- Jecel


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: keeping arrow for assignment operator

Raymond Asselin-3
In reply to this post by David T. Lewis
Le 12/03/09, David T. Lewis <[hidden email]> écrivait :


>
>I like the idea of taking a poll to get a picture of what the
opinions
>on an issue really are. I also think that it should be clearly
understood
>that the outcome of the poll is not binding, but is (as you said) a
guide
>to be used by the board in making a decision. Occasionally the
board
>may make unpopular decisions; that is part of what we have
entrusted
>you to do. So I like the proposal, given that the poll is clearly
treated
>as guidance and nothing more.
>
>Dave
>
+ 1

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: keeping arrow for assignment operator

Bert Freudenberg
In reply to this post by Bert Freudenberg

On 13.03.2009, at 19:20, Jecel Assumpcao Jr wrote:

> Bert Freudenberg wrote on Fri, 13 Mar 2009 18:54:24 +0100
>> On 13.03.2009, at 17:57, Cédrick Béler wrote:
>>> I tried and it works... except instead of having a real left  
>>> arrow, I
>>> get an underscore (strangely, this is working in pharo that way
>>> whereas in a fresh squeak dev based on 3.10, this isn't). Anyway,
>>> isn't the idea to have displayed "real" arrow   <-  ?
>>
>>
>> Looks like you need to teach Shout what character to use to display a
>> left-arrow in your preferred font, now that the underscore actually
>> displays as an underscore.
>
> Actually, the character is the same and has always been shown as a  
> left
> arrow or as an underscore depending on what font you are using (as
> copy/pasting some code from a browser to this window, which is also in
> Squeak but uses a different font, will show).

Actually actually, we patched the StrikeFonts in the image to have an  
underscore glyph in the place that formerly had an arrow. When we did  
this, the original arrow glyph was moved to character code 16r8F.  
This code is unassigned in iso8859-1 so pretty safe for private use.  
If StrikeFonts supported the whole unicode range we could have used  
16r2190, the proper unicode codepoint.

Which character shows the arrow glyph in the currently used font is  
the thing I think Shout needs to be taught.

> So the way to "fix" this
> is to go to background menu and play around with "appearence..." -->
> "system fonts..." and select one of the patched fonts for Shout to use
> (if that is possible - I have not tried it).


I don't think patching the underscore character is the way to go  
forward. If it appears in code, it should be displayed as an underscore.

- Bert -


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: keeping arrow for assignment operator

Karl Ramberg
In reply to this post by Bert Freudenberg
On 3/13/09, Jecel Assumpcao Jr <[hidden email]> wrote:

> Bert Freudenberg wrote on Fri, 13 Mar 2009 18:54:24 +0100
>> On 13.03.2009, at 17:57, Cédrick Béler wrote:
>> > I tried and it works... except instead of having a real left arrow, I
>> > get an underscore (strangely, this is working in pharo that way
>> > whereas in a fresh squeak dev based on 3.10, this isn't). Anyway,
>> > isn't the idea to have displayed "real" arrow   <-  ?
>>
>>
>> Looks like you need to teach Shout what character to use to display a
>> left-arrow in your preferred font, now that the underscore actually
>> displays as an underscore.
>
> Actually, the character is the same and has always been shown as a left
> arrow or as an underscore depending on what font you are using (as
> copy/pasting some code from a browser to this window, which is also in
> Squeak but uses a different font, will show). So the way to "fix" this
> is to go to background menu and play around with "appearence..." -->
> "system fonts..." and select one of the patched fonts for Shout to use
> (if that is possible - I have not tried it).
>
> About the general question, while I am very much in favor of moving
> beyond ASCII-1963 draft to the ASCII-1967 final standard, I would really
> like for us to go even further to Unicode so we can have left arrows in
> our code without messing up underscores. This change will cause
> backwards compatibility problems, however, and so only should be done as
> part of a larger move to new image/source formats.
>
> -- Jecel
1963 !
1967 !!!!
i can't belive we still are stuck in this mess, then again that is
probably why we are stuck. Standards, love them or leave them!

Karl

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: keeping arrow for assignment operator

Jecel Assumpcao Jr
In reply to this post by Bert Freudenberg
Bert,

> Actually actually, we patched the StrikeFonts in the image to have an  
> underscore glyph in the place that formerly had an arrow. When we did  
> this, the original arrow glyph was moved to character code 16r8F.

Great - this is the first I heard about this. Which images have it?

When I mentioned "patched fonts" I was talking about way back when the
original Apple fonts were replaced with other with more friendly
licenses and which then had their _ and ^ glyphs changed by hand.
Interesting, the first looks like an underscore here while the second is
an up arrow rather than a caret. Inspecting this PlugglableShoutMorph I
see that this TextStyle is Accuny17. I looked at the SystemBrowser and
it is using Accuny12 and also shows the assignment as underscore. How
odd - I must have been thinking of some other image, then. I use quite a
few different ones.
   
> This code is unassigned in iso8859-1 so pretty safe for private use.

It is the control character "single-shift 3", but it is extremely
unlikely anyone will ever miss it.
 
> If StrikeFonts supported the whole unicode range we could have used  
> 16r2190, the proper unicode codepoint.

That is what I was suggesting (or 16r21D0 for a Smalltalk-74 look), but
it would be very expensive.

> Which character shows the arrow glyph in the currently used font is  
> the thing I think Shout needs to be taught.

All the other tools would have to accept that character as assignment
too, because Shout actually replaces what is typed and doesn't just
change what is displayed.

> I don't think patching the underscore character is the way to go  
> forward. If it appears in code, it should be displayed as an underscore.

As I explained above, I was talking about what happened a long time ago
and not suggesting this as something that should be done now. I just
tried my suggestion in this 3.9 image and it didn't work - every one of
the (rather limited) selection of fonts available shows underscores in
the code browser. In the 3.8 image I use for IRCe it seems that the font
is also Acunny12 but it shows a left arrow instead. The selection of
fonts is exactly the same but it seems that the fonts themselves are
not. Sorry that I didn't test this earlier and so created some
confusion.

About the ":=" as assignment, this was introduced in the first Digitalk
product (called Methods) both to help convert Pascal programmers (their
target audience, if the examples in their manual are any indication) and
due to the hardware limitations of the text mode in CGA boards of the
original PCs. I don't think these reasons matter much today, but being
friendly with other Smalltalks and the ANSI standard is important to me.

Karl,
> 1963 !
> 1967 !!!!
> i can't belive we still are stuck in this mess, then again that is
> probably why we are stuck. Standards, love them or leave them!

The problem was that people couldn't wait for the standard to be
finished to start using it, sort of like the recent 802.11n drama. I did
this twice myself: used SCSI in a 1983 parallel unix machine design and
put the ISO 8859 characters into my 1986 Smalltalk computer. At least
DEC and Xerox (probably many others, but these are the ones I am
familiar with) got stuck with not-fully-ASCII characters in their
equipment, though this machine did more than any other to keep the left
and up arrows alive: http://en.wikipedia.org/wiki/ASR-33_Teletype

-- Jecel


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] keeping arrow for assignment operator

Igor Stasenko
In reply to this post by Ralph Boland
Ralph,
see FixUnderscores package/class
this would help you to convert almost all of your code to right ':='
assigments without any manual work.

Its not difficult to modify squeak to display left arrow instead of underscore,
but its much more difficult to modify the rest of applications in the
world to do the same.

2009/3/11 Ralph Boland <[hidden email]>:

> I am planning to upgrade the version of Squeak I am using (Squeak 3.8.1 on
> Linux) to 3.10.
>
> I realize that the arrow for the assignment operator has been
> deprecated and is displayed as an underscore in Squeak 3.9 or later.
> So before I release my open source project I will need to conform
> to using ':=' for assignment.
> But I rather like using the arrow operator because it is easy to read
> and I won't be releasing my open source project for some time.
> So, until I release it, I would like to continue using the arrow and having
> it displayed as an arrow.
>
> How difficult is it to modify Squeak 3.9 or later so that the display of the
> '_'
> character shows an arrow?
> I promise that I will switch to the := operator for assignment before
> releasing, really!
>
> Ralph Boland
>
>
>
>



--
Best regards,
Igor Stasenko AKA sig.

12