Jd update available through JAL.
This is a significant update and users should move to it as soon as convenient.
As always, test before you make this your production version.
Jd installations now require a key to run.
This will help us track Jd use and better manage Jd development.
Non-commercial
Beat me to it by a little. You can tighten it up by not unboxing, and
speed up the performance a tiny bit using selection rather than agenda.
(, {~ a:=[)/\.&.|.
Roger's solution is significantly faster due to the global select.
Marshall
On Mon, Jan 05, 2015 at 03:15:20PM -0500, Jose Mario Quint
Here is what I came up with:
pt=:((#~ (j.~ -.)) }:@;@:((# # 0 > {.)&.>)@:(<;.2)@(1 ,~ +/@(1 _1 * ' _' =/
])))"1
sr=:#"1~ -.@}:@;@:((] = #)&.>)@:(<;.1)@(*./@(' ' =/ ' ' ,. ]))
postable=: 1 : (':'; '(((#~LF-.@e.])5!:5<''u'');,.y),.({.;}.) sr pt ":x,y
u/x')~
* postable i: 5
┌──┬
' I'm thinking there's got to be some kind of
loopless prefix sort of solution but am at a loss to come up with it.'
Maybe it was a suffix, rather than a prefix, solution what you really had
in mind?
]`[@.('' -: ])&.>~/\.&.|.
On Mon, Jan 5, 2015 at 11:06 AM, Devon McCormick wrote:
> I just t
fef=: a:&~: (+/\@[ { {.@] , # ) ]
fef t
┌┬──┬──┬──┬──┬──┬───┬───┬───┬───┬───┬───┬──┬──┐
││Hi│Hi│Hi│Ho│Ho│hee│hee│hee│haw│haw│haw│Yo│Yo│
└┴──┴──┴──┴──┴──┴───┴───┴───┴───┴───┴───┴──┴──┘
On Mon, Jan 5, 2015 at 10:46 AM, 'Pascal Jasmin' via Programming <
programm...@jsoftware.com> wrote:
> a
a verbed variation of Roger's
(] (({.@:[ , #~) {~ +/\@:] ) [: * #&>)
'';'Hi';'';'';'Ho';'';'hee';'';'';'haw';'';'';'Yo';''
- Original Message -
From: Roger Hui
To: Programming forum
Cc:
Sent: Monday, January 5, 2015 11:59 AM
Subject: Re: [Jprogramming] Forward fill w/o looping
t=: '';'Hi';'';'';'Ho';'';'hee';'';'';'haw';'';'';'Yo';''
fillEmptyFwd t
┌┬──┬──┬──┬──┬──┬───┬───┬───┬───┬───┬───┬──┬──┐
││Hi│Hi│Hi│Ho│Ho│hee│hee│hee│haw│haw│haw│Yo│Yo│
└┴──┴──┴──┴──┴──┴───┴───┴───┴───┴───┴───┴──┴──┘
(({.t),b#t) {~ +/\b=: *#&>t
┌┬──┬──┬──┬──┬──┬───┬───┬───┬───┬───┬───┬──┬
Thanks for the good ideas (though first post goes to Mr. Boss, not Raul).
On Mon, Jan 5, 2015 at 11:36 AM, 'Pascal Jasmin' via Programming <
programm...@jsoftware.com> wrote:
> as a single more general function
>
> a: ;@:(] <@(# # {. );.1~ 1 (0}) -.@=
> )'';'Hi';'';'';'Ho';'';'hee';'';'';'haw';''
as a single more general function
a: ;@:(] <@(# # {. );.1~ 1 (0}) -.@=
)'';'Hi';'';'';'Ho';'';'hee';'';'';'haw';'';'';'Yo';''
0 ;@:(] <@(# # {. );.1~ 1 (0}) -.@= ) 0 33 0 0 22 0 0 11 0 0 0
0 33 33 33 22 22 22 11 11 11 11
- Original Message -
From: 'Pascal Jasmin' via Programming
dyadic ;. is your usual friend in these cases. Though Raul has often found
even more elegant approaches.
a: (-.@= <;.1 ] )'Hi';'';'';'Ho';'';'hee';'';'';'haw';'';'';'Yo';''
┌──┬─┬───┬───┬─┐
│┌──┬┬┐│┌──┬┐│┌───┬┬┐│┌───┬┬┐│┌──┬┐│
││Hi│Hohee│haw│Yo│││
│└──┴┴┘
Just from the hip.
;(<@(##{.);.2~ 1,~2>/\a:e.~])
'';'Hi';'';'';'Ho';'';'hee';'';'';'haw';'';'';'Yo';''
++--+--+--+--+--+---+---+---+---+---+---+--+--+
||Hi|Hi|Hi|Ho|Ho|hee|hee|hee|haw|haw|haw|Yo|Yo|
++--+--+--+--+--+---+---+---+---+---+---+--+--+
R.E. Boss
> -Original Message-
> Fro
I just threw together a short J solution that does what I want but it uses
a loop and a conditional. I'm thinking there's got to be some kind of
loopless prefix sort of solution but am at a loss to come up with it.
My code looks like this:
fillEmptyFwd=: 3 : 0
for_ix. i.<:#y do.
if. 0=#>y{~>
12 matches
Mail list logo