The Trunk: Morphic-nice.1637.mcz

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

The Trunk: Morphic-nice.1637.mcz

commits-2
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.1637.mcz

==================== Summary ====================

Name: Morphic-nice.1637
Author: nice
Time: 7 March 2020, 1:16:54.439713 am
UUID: 52276ad2-7bef-40fd-a762-6309da355518
Ancestors: Morphic-nice.1636

Fix broken postscript, apologies

=============== Diff against Morphic-nice.1636 ===============

Item was changed:
+ (PackageInfo named: 'Morphic') postscript: '"Set a smoother scrolling, especially useful for trackpads"
- (PackageInfo named: 'Morphic') postscript: '''Set a smoother scrolling, especially useful for trackpads"
  HandMorph minimumWheelDelta: 20.
  Smalltalk sendMouseWheelEvents: true.'!


Reply | Threaded
Open this post in threaded view
|

Prevent syntax errors in preamble/postscript

Jakob Reschke
Hello,

Thank you Nicolas for fixing this error so quickly.

Would it be possible to compile, but not evaluate those scripts automatically when they are saved? Or does something speak against it? It should prevent syntax errors.

Kind regards,
Jakob


<[hidden email]> schrieb am Sa., 7. März 2020, 01:17:
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.1637.mcz

==================== Summary ====================

Name: Morphic-nice.1637
Author: nice
Time: 7 March 2020, 1:16:54.439713 am
UUID: 52276ad2-7bef-40fd-a762-6309da355518
Ancestors: Morphic-nice.1636

Fix broken postscript, apologies

=============== Diff against Morphic-nice.1636 ===============

Item was changed:
+ (PackageInfo named: 'Morphic') postscript: '"Set a smoother scrolling, especially useful for trackpads"
- (PackageInfo named: 'Morphic') postscript: '''Set a smoother scrolling, especially useful for trackpads"
  HandMorph minimumWheelDelta: 20.
  Smalltalk sendMouseWheelEvents: true.'!




Reply | Threaded
Open this post in threaded view
|

Re: Prevent syntax errors in preamble/postscript

Christoph Thiede

Interesting idea. We could simply change the underlying representation of PackageInfo ('preamble postscript preambleOfRemoval postscriptOfRemoval') to hold CompiledMethods rather than StringHolders and rewrite the accessors to use Compiler and #sourceText. However, then we could not use interactive compilation (no requestor). Hm, or could we maybe simply store instances of CodeHolder? This could also solve our problem that Monticello Load Scripts are not styled.


Speaking in general, should we maybe revise the existing StringHolder, CodeHolder, MethodHolder hierarchy? A very large part of the StringHolder implementation actually describes code-specific things. MethodHolder, on the other hand, is located in Tools but its only three users are located in EToys. IMHO, an ideal StringHolder would not contain any code-related stuff, not even #buildCodePaneWith:. Or am I basically describing the behavior of a ValueHolder? In this case, the name of StringHolder is quite confusing.


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
Gesendet: Samstag, 7. März 2020 10:02:35
An: [hidden email]
Betreff: [squeak-dev] Prevent syntax errors in preamble/postscript
 
Hello,

Thank you Nicolas for fixing this error so quickly.

Would it be possible to compile, but not evaluate those scripts automatically when they are saved? Or does something speak against it? It should prevent syntax errors.

Kind regards,
Jakob


<[hidden email]> schrieb am Sa., 7. März 2020, 01:17:
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.1637.mcz

==================== Summary ====================

Name: Morphic-nice.1637
Author: nice
Time: 7 March 2020, 1:16:54.439713 am
UUID: 52276ad2-7bef-40fd-a762-6309da355518
Ancestors: Morphic-nice.1636

Fix broken postscript, apologies

=============== Diff against Morphic-nice.1636 ===============

Item was changed:
+ (PackageInfo named: 'Morphic') postscript: '"Set a smoother scrolling, especially useful for trackpads"
- (PackageInfo named: 'Morphic') postscript: '''Set a smoother scrolling, especially useful for trackpads"
  HandMorph minimumWheelDelta: 20.
  Smalltalk sendMouseWheelEvents: true.'!




Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: Prevent syntax errors in preamble/postscript

Nicolas Cellier
Hi all,
Note that I did execute the snippet so as to check that it worked, but then thought a good idea to add a comment...
So yes, syntactic color would have helped me see my typo!

Concerning StringHolder, well the name is certainly misleading.
We want to be able to write and test code from everywhere, so that's the reason why it behaves much like a code holder...
I don't think that it is a good idea to strip this behavior, it is an essential feature.

CodeHolder has more properties related to hosting methods (not just snippets) like inserting a breakpoint or considering method category (protocol).
MethodHolder seems something used exclusively by EToys, I didn't even know about its existence until now ...

For MC, having a CodeHolder with style seems like the most elementary thing to do.
We can eventually be pedantic and try to compile and validate the snippet upon accept, but I see no need to store resulting compiledMethod.

Le sam. 7 mars 2020 à 14:26, Thiede, Christoph <[hidden email]> a écrit :

Interesting idea. We could simply change the underlying representation of PackageInfo ('preamble postscript preambleOfRemoval postscriptOfRemoval') to hold CompiledMethods rather than StringHolders and rewrite the accessors to use Compiler and #sourceText. However, then we could not use interactive compilation (no requestor). Hm, or could we maybe simply store instances of CodeHolder? This could also solve our problem that Monticello Load Scripts are not styled.


Speaking in general, should we maybe revise the existing StringHolder, CodeHolder, MethodHolder hierarchy? A very large part of the StringHolder implementation actually describes code-specific things. MethodHolder, on the other hand, is located in Tools but its only three users are located in EToys. IMHO, an ideal StringHolder would not contain any code-related stuff, not even #buildCodePaneWith:. Or am I basically describing the behavior of a ValueHolder? In this case, the name of StringHolder is quite confusing.


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
Gesendet: Samstag, 7. März 2020 10:02:35
An: [hidden email]
Betreff: [squeak-dev] Prevent syntax errors in preamble/postscript
 
Hello,

Thank you Nicolas for fixing this error so quickly.

Would it be possible to compile, but not evaluate those scripts automatically when they are saved? Or does something speak against it? It should prevent syntax errors.

Kind regards,
Jakob


<[hidden email]> schrieb am Sa., 7. März 2020, 01:17:
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.1637.mcz

==================== Summary ====================

Name: Morphic-nice.1637
Author: nice
Time: 7 March 2020, 1:16:54.439713 am
UUID: 52276ad2-7bef-40fd-a762-6309da355518
Ancestors: Morphic-nice.1636

Fix broken postscript, apologies

=============== Diff against Morphic-nice.1636 ===============

Item was changed:
+ (PackageInfo named: 'Morphic') postscript: '"Set a smoother scrolling, especially useful for trackpads"
- (PackageInfo named: 'Morphic') postscript: '''Set a smoother scrolling, especially useful for trackpads"
  HandMorph minimumWheelDelta: 20.
  Smalltalk sendMouseWheelEvents: true.'!