Preferences ignoreStyleIfOnlyBold

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

Re: Preferences ignoreStyleIfOnlyBold

Colin Putney-3



On Fri, Jan 3, 2014 at 12:03 PM, Frank Shearar <[hidden email]> wrote:
 
OK, so that's you & I in agreement. I think Colin's happy for it to
go. Any ol' timers out there with warnings of doom, before I rip this
out?

No, I certainly wouldn't miss it. 

I will say this, however. I don't know if it goes all the way back to ST-80, but I do remember that styled code was considered important in the early days of Squeak. I seem to remember some tweaks to Monticello when it first came out that would allow it to store styled code the same way it's stored in the changes file. IIRC we even supported hyperlinks in code, although I don't remember actually seeing one in the wild. 

Therefore, we ought to decide if this is a change in policy—i.e., we're going to support plain-text source code only—or if we're just rejiggering preferences for better modularity. If it's a policy change, we have a free hand simplify the codebase accordingly, take styling commands out of code editors and so on. It doesn't have to be done right away, but let's consider that on the agenda for 4.6. 

On the other hand, if we consider styled source code important, we should figure out how to change the preferences to play nicely with Shout for those who use it, while still retaining the ability to manually style code and persist those styles along with the content of the code.

Personally, I'd vote for plain-text only code. I can see the value of styled code, but that's not the way the world went, and it's no longer worth the complexity or friction when dealing with the world outside of the image. 

Colin


Reply | Threaded
Open this post in threaded view
|

Re: Preferences ignoreStyleIfOnlyBold

Frank Shearar-3
On 3 January 2014 17:57, Colin Putney <[hidden email]> wrote:

>
>
>
> On Fri, Jan 3, 2014 at 12:03 PM, Frank Shearar <[hidden email]>
> wrote:
>
>>
>> OK, so that's you & I in agreement. I think Colin's happy for it to
>> go. Any ol' timers out there with warnings of doom, before I rip this
>> out?
>
>
> No, I certainly wouldn't miss it.
>
> I will say this, however. I don't know if it goes all the way back to ST-80,
> but I do remember that styled code was considered important in the early
> days of Squeak. I seem to remember some tweaks to Monticello when it first
> came out that would allow it to store styled code the same way it's stored
> in the changes file. IIRC we even supported hyperlinks in code, although I
> don't remember actually seeing one in the wild.
>
> Therefore, we ought to decide if this is a change in policy—i.e., we're
> going to support plain-text source code only—or if we're just rejiggering
> preferences for better modularity. If it's a policy change, we have a free
> hand simplify the codebase accordingly, take styling commands out of code
> editors and so on. It doesn't have to be done right away, but let's consider
> that on the agenda for 4.6.
>
> On the other hand, if we consider styled source code important, we should
> figure out how to change the preferences to play nicely with Shout for those
> who use it, while still retaining the ability to manually style code and
> persist those styles along with the content of the code.
>
> Personally, I'd vote for plain-text only code. I can see the value of styled
> code, but that's not the way the world went, and it's no longer worth the
> complexity or friction when dealing with the world outside of the image.

My vote is also for plain-text only code. But my vote is _also_ for
not screwing things up for Chris while he works on getting 4.5 out the
door.

David has an Inbox that will, when pushed to trunk, break the final
strand between Collections and System. The snapping of that rubber
band would satisfy me for 4.5's purposes.

This preference causes a Collections -> Tools dependency which,
transitively, means it still depends on System. The Tools <-> System
entanglement is too large for me to untangle in the 4.5 release
timeframe, so I vote for voting on plan text vs styled text in 4.6.

(I am A-OK with styling in class comments though, even though I've not
actually used any styling. (And class comments could do with an edit
pane or something, so the UI can tell me how to use these fancy links
in the first place.))

frank

> Colin

Reply | Threaded
Open this post in threaded view
|

Re: Preferences ignoreStyleIfOnlyBold

David T. Lewis
In reply to this post by Colin Putney-3
As luck would have it, I just finished writing a set of unit tests to
verify filein and fileout capability of text attributes. This is included
in CollectionsTests-dtl.209 in the inbox. I think this may make it
somewhat easier to understand and maintain the support for styled text in
code.

http://lists.squeakfoundation.org/pipermail/squeak-dev/2014-January/175795.html

As a matter of policy, it seems to me that since source code can be (and
sometimes is) in the form of styled text, and given that various people
have found interesting uses for this over the years, we should not do
something to make that impossible.

I also agree that it is preferable to store source code as plain text
wherever possible. I just would not want to make it impossible to store
styled text in the cases where someone has a good reason to do so.

Dave

> On Fri, Jan 3, 2014 at 12:03 PM, Frank Shearar
> <[hidden email]>wrote:
>
>
>> OK, so that's you & I in agreement. I think Colin's happy for it to
>> go. Any ol' timers out there with warnings of doom, before I rip this
>> out?
>
>
> No, I certainly wouldn't miss it.
>
> I will say this, however. I don't know if it goes all the way back to
> ST-80, but I do remember that styled code was considered important in the
> early days of Squeak. I seem to remember some tweaks to Monticello when it
> first came out that would allow it to store styled code the same way it's
> stored in the changes file. IIRC we even supported hyperlinks in code,
> although I don't remember actually seeing one in the wild.
>
> Therefore, we ought to decide if this is a change in policy—i.e., we're
> going to support plain-text source code only—or if we're just rejiggering
> preferences for better modularity. If it's a policy change, we have a free
> hand simplify the codebase accordingly, take styling commands out of code
> editors and so on. It doesn't have to be done right away, but let's
> consider that on the agenda for 4.6.
>
> On the other hand, if we consider styled source code important, we should
> figure out how to change the preferences to play nicely with Shout for
> those who use it, while still retaining the ability to manually style code
> and persist those styles along with the content of the code.
>
> Personally, I'd vote for plain-text only code. I can see the value of
> styled code, but that's not the way the world went, and it's no longer
> worth the complexity or friction when dealing with the world outside of
> the
> image.
>
> Colin
>
>



Reply | Threaded
Open this post in threaded view
|

Re: Preferences ignoreStyleIfOnlyBold

Chris Muller-4
In reply to this post by Tobias Pape
>> OK, so that's you & I in agreement. I think Colin's happy for it to
>> go. Any ol' timers out there with warnings of doom, before I rip this
>> out?
>
> Just FYI: this makes it impossible to use/port CodeTalk[1] in/to
> Squeak 4.5.
> And I actually used it once or twice, not that this would be important :)

Oh, that does matter.  Tobias, I think you're saying CodeTalk wants to
store Text into the .changes and possibly MC because that's where it
stores its code annotations.  Is that right?  But they don't actually
need that preference too do they?

We should account for Robert Hirschfelds group which has put out some
great tools and projects.  CodeTalk wants to continue to push
Smalltalk ahead of the rest of the world still stuck in plain-text.

So, based on this, I think we should not change policy w.r.t. storing
Text vs. Strings.  Text has #asString, so it doesn't seem there should
be any extra complexity to deal with the outside world; probably less
than trying to rip out something that's integrated and works.

> [1] https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/codetalk

Reply | Threaded
Open this post in threaded view
|

Re: Preferences ignoreStyleIfOnlyBold

Chris Muller-3
In reply to this post by Frank Shearar-3
> My vote is also for plain-text only code. But my vote is _also_ for
> not screwing things up for Chris while he works on getting 4.5 out the
> door.
>
> David has an Inbox that will, when pushed to trunk, break the final
> strand between Collections and System. The snapping of that rubber
> band would satisfy me for 4.5's purposes.

Ah, thank you!  +1

> This preference causes a Collections -> Tools dependency which,
> transitively, means it still depends on System. The Tools <-> System
> entanglement is too large for me to untangle in the 4.5 release
> timeframe, so I vote for voting on plan text vs styled text in 4.6.
>
> (I am A-OK with styling in class comments though, even though I've not
> actually used any styling. (And class comments could do with an edit
> pane or something, so the UI can tell me how to use these fancy links
> in the first place.))

Reply | Threaded
Open this post in threaded view
|

Re: Preferences ignoreStyleIfOnlyBold

Tobias Pape
In reply to this post by Chris Muller-4

On 03.01.2014, at 20:18, Chris Muller <[hidden email]> wrote:

>>> OK, so that's you & I in agreement. I think Colin's happy for it to
>>> go. Any ol' timers out there with warnings of doom, before I rip this
>>> out?
>>
>> Just FYI: this makes it impossible to use/port CodeTalk[1] in/to
>> Squeak 4.5.
>> And I actually used it once or twice, not that this would be important :)
>
> Oh, that does matter.  Tobias, I think you're saying CodeTalk wants to
> store Text into the .changes and possibly MC because that's where it
> stores its code annotations.  Is that right?  But they don't actually
> need that preference too do they?
It just stores its information as text attributes, which then goes to
the Changes file, IIRC.
It has to patch monticello in order to save the information but that
is independent of the style stuff.

As a matter of fact, CodeTalk forces the Preference to be ON.

>
> We should account for Robert Hirschfelds group which has put out some
> great tools and projects.  CodeTalk wants to continue to push
> Smalltalk ahead of the rest of the world still stuck in plain-text.
>
> So, based on this, I think we should not change policy w.r.t. storing
> Text vs. Strings.  Text has #asString, so it doesn't seem there should
> be any extra complexity to deal with the outside world; probably less
> than trying to rip out something that's integrated and works.
>
Thanks.

Best
        -Tobias


>> [1] https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/codetalk




signature.asc (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Preferences ignoreStyleIfOnlyBold

Frank Shearar-3
On 3 January 2014 19:32, Tobias Pape <[hidden email]> wrote:

>
> On 03.01.2014, at 20:18, Chris Muller <[hidden email]> wrote:
>
>>>> OK, so that's you & I in agreement. I think Colin's happy for it to
>>>> go. Any ol' timers out there with warnings of doom, before I rip this
>>>> out?
>>>
>>> Just FYI: this makes it impossible to use/port CodeTalk[1] in/to
>>> Squeak 4.5.
>>> And I actually used it once or twice, not that this would be important :)
>>
>> Oh, that does matter.  Tobias, I think you're saying CodeTalk wants to
>> store Text into the .changes and possibly MC because that's where it
>> stores its code annotations.  Is that right?  But they don't actually
>> need that preference too do they?
>
> It just stores its information as text attributes, which then goes to
> the Changes file, IIRC.
> It has to patch monticello in order to save the information but that
> is independent of the style stuff.
>
> As a matter of fact, CodeTalk forces the Preference to be ON.

So effectively CodeTalk turns

newText := (requestor notNil and: [Preferences confirmFirstUseOfStyle])
    ifTrue: [aText askIfAddStyle: priorMethodOrNil req: requestor]
    ifFalse: [aText]

into aText?

Doing that means we can rip out #askIfAddStyle:req and Preferences
confirmFirstUseOfStyle. That would sever the Collections -> Tools
dependency, and would be a late Christmas treat for me.

frank

>> We should account for Robert Hirschfelds group which has put out some
>> great tools and projects.  CodeTalk wants to continue to push
>> Smalltalk ahead of the rest of the world still stuck in plain-text.
>>
>> So, based on this, I think we should not change policy w.r.t. storing
>> Text vs. Strings.  Text has #asString, so it doesn't seem there should
>> be any extra complexity to deal with the outside world; probably less
>> than trying to rip out something that's integrated and works.
>>
>
> Thanks.
>
> Best
>         -Tobias
>
>
>>> [1] https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/codetalk

Reply | Threaded
Open this post in threaded view
|

Re: Preferences ignoreStyleIfOnlyBold

Chris Muller-3
On Fri, Jan 3, 2014 at 1:36 PM, Frank Shearar <[hidden email]> wrote:

> On 3 January 2014 19:32, Tobias Pape <[hidden email]> wrote:
>>
>> On 03.01.2014, at 20:18, Chris Muller <[hidden email]> wrote:
>>
>>>>> OK, so that's you & I in agreement. I think Colin's happy for it to
>>>>> go. Any ol' timers out there with warnings of doom, before I rip this
>>>>> out?
>>>>
>>>> Just FYI: this makes it impossible to use/port CodeTalk[1] in/to
>>>> Squeak 4.5.
>>>> And I actually used it once or twice, not that this would be important :)
>>>
>>> Oh, that does matter.  Tobias, I think you're saying CodeTalk wants to
>>> store Text into the .changes and possibly MC because that's where it
>>> stores its code annotations.  Is that right?  But they don't actually
>>> need that preference too do they?
>>
>> It just stores its information as text attributes, which then goes to
>> the Changes file, IIRC.
>> It has to patch monticello in order to save the information but that
>> is independent of the style stuff.
>>
>> As a matter of fact, CodeTalk forces the Preference to be ON.
>
> So effectively CodeTalk turns
>
> newText := (requestor notNil and: [Preferences confirmFirstUseOfStyle])
>     ifTrue: [aText askIfAddStyle: priorMethodOrNil req: requestor]
>     ifFalse: [aText]
>
> into aText?

Yes, it would seem newText var can be removed (along with the pref)
and just use aText.

Reply | Threaded
Open this post in threaded view
|

Re: Preferences ignoreStyleIfOnlyBold

Tobias Pape
In reply to this post by Frank Shearar-3

On 03.01.2014, at 20:36, Frank Shearar <[hidden email]> wrote:

> On 3 January 2014 19:32, Tobias Pape <[hidden email]> wrote:
>>
>> On 03.01.2014, at 20:18, Chris Muller <[hidden email]> wrote:
>>
>>>>> OK, so that's you & I in agreement. I think Colin's happy for it to
>>>>> go. Any ol' timers out there with warnings of doom, before I rip this
>>>>> out?
>>>>
>>>> Just FYI: this makes it impossible to use/port CodeTalk[1] in/to
>>>> Squeak 4.5.
>>>> And I actually used it once or twice, not that this would be important :)
>>>
>>> Oh, that does matter.  Tobias, I think you're saying CodeTalk wants to
>>> store Text into the .changes and possibly MC because that's where it
>>> stores its code annotations.  Is that right?  But they don't actually
>>> need that preference too do they?
>>
>> It just stores its information as text attributes, which then goes to
>> the Changes file, IIRC.
>> It has to patch monticello in order to save the information but that
>> is independent of the style stuff.
>>
>> As a matter of fact, CodeTalk forces the Preference to be ON.
>
> So effectively CodeTalk turns
>
> newText := (requestor notNil and: [Preferences confirmFirstUseOfStyle])
>    ifTrue: [aText askIfAddStyle: priorMethodOrNil req: requestor]
>    ifFalse: [aText]
>
> into aText?
>
effectively.

> Doing that means we can rip out #askIfAddStyle:req and Preferences
> confirmFirstUseOfStyle. That would sever the Collections -> Tools
> dependency, and would be a late Christmas treat for me.

*g*

but make sure there is an #asString before any of that enters the compiler.

Best
        -Tobias



signature.asc (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Preferences ignoreStyleIfOnlyBold

Frank Shearar-3
On 3 January 2014 19:58, Tobias Pape <[hidden email]> wrote:

>
> On 03.01.2014, at 20:36, Frank Shearar <[hidden email]> wrote:
>
>> On 3 January 2014 19:32, Tobias Pape <[hidden email]> wrote:
>>>
>>> On 03.01.2014, at 20:18, Chris Muller <[hidden email]> wrote:
>>>
>>>>>> OK, so that's you & I in agreement. I think Colin's happy for it to
>>>>>> go. Any ol' timers out there with warnings of doom, before I rip this
>>>>>> out?
>>>>>
>>>>> Just FYI: this makes it impossible to use/port CodeTalk[1] in/to
>>>>> Squeak 4.5.
>>>>> And I actually used it once or twice, not that this would be important :)
>>>>
>>>> Oh, that does matter.  Tobias, I think you're saying CodeTalk wants to
>>>> store Text into the .changes and possibly MC because that's where it
>>>> stores its code annotations.  Is that right?  But they don't actually
>>>> need that preference too do they?
>>>
>>> It just stores its information as text attributes, which then goes to
>>> the Changes file, IIRC.
>>> It has to patch monticello in order to save the information but that
>>> is independent of the style stuff.
>>>
>>> As a matter of fact, CodeTalk forces the Preference to be ON.
>>
>> So effectively CodeTalk turns
>>
>> newText := (requestor notNil and: [Preferences confirmFirstUseOfStyle])
>>    ifTrue: [aText askIfAddStyle: priorMethodOrNil req: requestor]
>>    ifFalse: [aText]
>>
>> into aText?
>>
>
> effectively.
>
>> Doing that means we can rip out #askIfAddStyle:req and Preferences
>> confirmFirstUseOfStyle. That would sever the Collections -> Tools
>> dependency, and would be a late Christmas treat for me.
>
> *g*
>
> but make sure there is an #asString before any of that enters the compiler.

Not a problem in this case, because logging takes place after compilation.

> Best
>         -Tobias

frank

12