RM> Perhaps s:'`abc' would look better?
that'll do it. I'm happy with that. Once you are used to seeing it, it
doesn't matter so much.
For some reason I never went near symbols in J.
M> {. to get a scalar symbol
will do. Didn't realise it was a scalar vector. Thanks for pointing that
out. Also, thanks for the note on that K design decision.
btw: on J + my should we mention little improvement ideas when we think of
them?
-Steven
On 12 April 2011 15:57, <[email protected]> wrote:
> ST> F i. `john
>
> You are wrongly assuming that one could write symbol literals as
> they are formatted in the default output (marked with backticks).
> This is true in K, but not so in J; there simply is no way to
> denote symbol literals in J.
>
> What your attempt above actually (but unintended) does is employ
> the ` primitive for gerund constructions, and that in an illegal
> way, ending up with an error message.
>
>
> ST> NB. so lets try to define ` as a verb. Is there a limit on which
> ST> characters can form a verb?
>
> All J primitives are denoted by ascii special characters which may
> be followed by dots and colons; add a few alphabetics/words which are
> ALWAYS end in a dot or colon. You cannot redefine these primitives
> of J.
>
> Easy to distinguish from those is the namespace for user/library-defined
> words are the alpha_numeric identifiers, all re-definable whenever you
> want to.
>
> There are no ways to play tricks with this clear border.
>
> ST> .... (s: ' john') NB. space infront of 'john' is important
>
> And that one still results in a singleton vector... you may want to
> add a {. to get a scalar symbol.
>
> Martin
>
> PS: Turning once more back to K: I am too lazy too hunt for a
> reference but I seem to remember from the '94 K presentation in
> Antwerp that it was a design decision right from the start to have
> output data reusable as input via cut'n'paste with no ill effects.
> Therefore, K not only groks `foo as symbo literal, it will also
> mark singletons on output with a leading ravel comma "," -- loud
> and clear. (This directly relates to another thread here.)
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm