Reducing Console Noise: Omit "Unevaluative" Assignments

The Rebol2 console would squash some feedback, e.g. it wouldn't display functions or ports. You'd have to PROBE them.

rebol2>> foo: func [x] [print "not displayed by console"]

rebol2>> probe :foo
func [x][print "not displayed by console"]

But it would print blocks and such:

rebol2>> x: [a b c]
== [a b c]

rebol2>> append x 'd
== [a b c d]

Here on the forum when I post examples, I often trim out the results of direct assignments:

>> x: [a b c]  ; console prints output, I just delete it for readability

>> append x 'd
== [a b c d]

Which made me wonder: why not have the console notice the pattern of a set-word followed by a literal thing and do this suppression automatically?

Maybe this could be a generic rule:

>> x: 1020

>> x: 300 + 4
== 304

If the right side is literal, and the only thing you did was assign, don't bother to print.

There's a slight hampering of education (people not realizing that the assignment synthesized a value). But you could find that out:

>> x: 1020

>> (x: 1020)
== 1020

>> probe x: 1020
1020

The technical impact is simply that the PRINT-RESULT console method have access to the expression that was requested to evaluate, to decide how to present the result based on the expression given.

Note that by definition, all evaluations have results... so if you don't see one, it's being suppressed.

Doing this for TRASH! could just be only one of the rules.

I'm tempted to reply to that with my proposal for app status and error/feedback for the QUERY dialect, which mimics that of Zork and other ZIL interpreter text games:

BRIEF - default dialect feedback setting, shows complete feedback the first time an action/clause is evaluated in the dialect, but thereafter minimal feedback (see SUPERBRIEF) for subsequent evaluation of the same clause.

SUPERBRIEF - AKA “quiet” - Only shows minimal info, e.g., the named status response (ok, complete, error) and error type (but not error descriptions).

VERBOSE - Shows the maximum level of dialect feedback for all interactions.

These setting levels would be standard in the dialect text UI for all dialects using the QUERY clause-based system.

So, a small standard dialect for the UI (including save directory, logging/echo, font-size), which is separate from the QUERY dialect and its rules.

1 Like

I'm tempted to reply

Temptation actualized (as I can, and do, copy relevant off-forum chat into posts and ascribe to the speaker).

I have spoken about tapping the untapped potential of short words and I think verbosity might be a good fit for BE.

>> 1000 + 20
== 1020

>> be quiet

>> 1000 + 20

>> 300 + 4

>> be normal
== \~okay~\  ; antiform

>> 1000 + 20
== 1020

BE VERBOSE, BE FAST, BE CARELESS, BE HONEST...

1 Like