[squeak-dev] The Inbox: System-ct.1128.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Mon Dec 16 18:51:34 UTC 2019


> note that the implementation of Transcripter should be as minimal as possible. That new "clear" command is fine, I guess. :-)

Minimality might be a general goal for sustainable software development :) I just wanted to avoid to repeat myself.

Best,
Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 16. Dezember 2019 19:37:15
An: John Pfersich via Squeak-dev
Betreff: Re: [squeak-dev] The Inbox: System-ct.1128.mcz

Hi Christoph,

note that the implementation of Transcripter should be as minimal as possible. That new "clear" command is fine, I guess. :-)

> In TranscriptStream, #showln: prints the newline first as well

I added that to TranscriptStream to make sure that even the first call to #showln: is on an extra line, regardless of its previous contents.

Best,
Marcel

Am 15.12.2019 12:15:18 schrieb commits at source.squeak.org <commits at source.squeak.org>:

A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-ct.1128.mcz

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

Name: System-ct.1128
Author: ct
Time: 14 December 2019, 3:14:14.108612 pm
UUID: 89698e0d-cee3-2041-afa8-96674d632912
Ancestors: System-mt.1127

Extends Transcripter with #clear command and refactors readEvalPrint loop

- Adds #showln: method

=============== Diff against System-mt.1127 ===============

Item was changed:
----- Method: Transcripter>>readEvalPrint (in category 'command line') -----
readEvalPrint
| line okToRevert |
okToRevert := true.
+ [#(quit exit done) includes: (line := self request: '>')]
+ whileFalse: [ line
+ caseOf: {
+ [#revert] -> [okToRevert
+ ifTrue: [RecentMessages default revertMostRecent.
+ self showln: 'reverted: ' , RecentMessages default mostRecent.
+ okToRevert := false]
+ ifFalse: [self showln: 'Only one level of revert currently supported']].
+ [#clear] -> [self clear]. }
+ otherwise: [
+ self showln: ([Compiler evaluate: line] ifError: [:err :ex | err])] ]!
- [#('quit' 'exit' 'done' ) includes: (line := self request: '>')]
- whileFalse:
- [line = 'revert'
- ifTrue: [okToRevert
- ifTrue: [RecentMessages default revertMostRecent.
- self cr; show: 'reverted: ' , RecentMessages default mostRecent.
- okToRevert := false]
- ifFalse: [self cr; show: 'Only one level of revert currently supported']]
- ifFalse: [self cr; show: ([Compiler evaluate: line] ifError: [:err :ex | err])]]!

Item was added:
+ ----- Method: Transcripter>>showln: (in category 'accessing') -----
+ showln: anObject
+ self
+ cr;
+ show: anObject!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191216/b13c1aa4/attachment.html>


More information about the Squeak-dev mailing list