[squeak-dev] The Inbox: Tools-LM.827.mcz

H. Hirzel hannes.hirzel at gmail.com
Wed Aug 29 07:23:55 UTC 2018

On 8/29/18, David T. Lewis <lewis at mail.msen.com> wrote:
> On Tue, Aug 28, 2018 at 02:23:59PM -0500, Leon Matthes wrote:
>> Oh sorry everyone, while digging around in the Workspace(class) code, I
>> just
>> discovered that there actually is a system preference to enable styling in
>> Workspaces by default...
>> Sorry to bother you guys, this makes my commit kind of pointless
>> Only thing I would still like to add, is that it might be good to change
>> the
>> description of this preference to something that makes it clear that
>> "Shout
>> styling" means smalltalk syntax highlighting, as this might not be obvious
>> to someone who is not fairly familiar with the implementation of the
>> Smalltalk compiler toolchain. This is probably also the reason why I never
>> discovered the option before :P
>> Regards,
>> Leon
> That is a very good idea. The preference makes much more sense to me when
> the description is changed as you suggest:
> Workspace class>>shouldStyle
> 	<preference: 'Smalltalk syntax styling in Workspace'
> 		category: 'browsing'
> 		description: 'If true, new workspaces use Shout to style their contents.'
> 		type: #Boolean>
> 	^ ShouldStyle ifNil: [ false ]
> Dave

+1 for a preference which explains what it is about, 'shout' is not explanatory.

I suggest to choose a description which matches the menu entry (see screen shot)

      Smalltalk syntax highlighting in Workspaces

* * *

An additional idea which probably should be discussed in another
thread is to have the Syntax highlighting only work if the code is
indented four spaces. Otherwise the content would be considered
explanatory text.

Many markdown systems have this convention, including github (e.g.
describing issues with text and code)

In addition this convention would  have the advantage that a
conversion method to markdown is easy to implement [4]

In Juypter notebooks a dynamic notebook is a sequence of text boxes
and code boxes (they are called cells). [1]

Maybe we can mimic something like that as well in a Smalltalk workspace.

A well written workspace with code examples may be considered Active
Content or a simple form of an  Active Essay [2]

Thus a Squeak image with several projects and many workspaces may be
considered a 'Dynabook' [3]

-- Hannes

[1] Jupyter notebooks http://wiki.squeak.org/squeak/1318
[2] Active Essays http://wiki.squeak.org/squeak/3307
[3] Personal Dynamic Media http://wiki.squeak.org/squeak/1070
[4] And for example add a menu to the workspace to export the content
to a github gist
     (not for 5.2)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Squeak5.2_syntax_hightlighting_in_workspaces_Screenshot_from_2018-08-29.png
Type: image/png
Size: 40701 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180829/b2f8732d/attachment.png>

More information about the Squeak-dev mailing list