Thanks Julian,
you described exactly the way I came up with this question.
I’ve not been aware 13: is used other than as a hint
on how to make a verb tacit.
Seeing its use in J packages, I’ll no longer hesitate using it.
I now find I thought manually crafted tacit verbs must be better
in some respect without being able to tell how nor why.
Every now and then I find out something about unconscious thoughts,
preconceptions etc., I wouldn’t have – well, thought – I’d be
subject to (which in itself may be another example of the same kind).
So thanks again for this kind of enlightenment.
Am 09.07.20 um 14:06 schrieb Julian Fondren:
On 2020-07-09 06:27, Raul Miller wrote:
I don't know what you would use this for, though, so probably it could
have a better name.
It just comes up in normal code that you have a non-tacit train
of monadic verbs. To pick one at random:
echo # ucp 'こんにちは'
And generalizing these into an explicit verb is very clean:
cpoints =: 3 : 'echo # ucp y'
But this not the case with a tacit verb:
cpoints =: [: echo [: # [: ucp
cpoints =: echo @: # @: ucp
However you do it you introduce a lot of visual noise that's
completely absent in the original code.
So I don't think there's a particular use-case for atred,
rather there's a feeling of frustration with the outcome of
making some code tacit.
I'd guess that a better solution is just 13 :
Here are some uses of that in J packages:
demos/wdplot/pledit.ijs
getfontsz=: 13 : '{.1{._1 -.~ _1 ". y'
demos/isigraph/isedit.ijs
getfontsize=. 13 : '{.1{._1 -.~ _1 ". y'
games/bagofnouns/bagofnounsgui.ijs
crlftolf =: 13 : '(-. (CR,LF) E. y) # y'
lflftolf =: 13 : '(-. (LF,LF) E. y) # y'
general/misc/pack.ijs
pget=: 13 : '> {: y {~ ({."1 y) i. {. boxopen,x'
psel=: 13 : 'y {~ ({."1 y) i. ;: ::] x'
misc/miscutils/utils.ijs
tod =: 13 : '6!:0 y'
todhms =: 13 : '3 }. tod y'
todymd =: 13 : '3 {. <. tod y'
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
----------------------
mail written using NEO
neo-layout.org
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm