Re: [Jprogramming] fit conjunction - quicksort recursion

2014-09-03 Thread Thomas Costigliola
a > To: J Programming Forum > Cc: > Sent: Thursday, August 28, 2014 9:27:39 PM > Subject: Re: [Jprogramming] fit conjunction > > Henry, out of sheer curiosity, if you have a story of such evil follies I > would be delighted to hear it. More seriously, do you have a tacit t

Re: [Jprogramming] fit conjunction - quicksort recursion

2014-09-02 Thread 'Pascal Jasmin' via Programming
the potential and it is just a bit trickier than just wishing it. - Original Message - From: Thomas Costigliola To: J Programming Forum Cc: Sent: Thursday, August 28, 2014 9:27:39 PM Subject: Re: [Jprogramming] fit conjunction Henry, out of sheer curiosity, if you have a story of suc

Re: [Jprogramming] fit conjunction

2014-08-28 Thread 'Pascal Jasmin' via Programming
;1(!.'*') 3 2 $ 'abc' ab c* bc - Original Message - From: Henry Rich To: programm...@jsoftware.com Cc: Sent: Thursday, August 28, 2014 9:29:16 PM Subject: Re: [Jprogramming] fit conjunction You would need another conjunction, not !.  . Consider  (u@v)!.f What ver

Re: [Jprogramming] fit conjunction

2014-08-28 Thread Henry Rich
In the mists of memory I recall hearing of such exploits. Sorry, I have no reference. I don't have a tacit tail-recursion for quicksort, but an explicit one would look like qsort =: 3 : 0 region =. 0 , <: #y NB. The region being sorted here while. there is data do. choose pivot; NB. par

Re: [Jprogramming] fit conjunction

2014-08-28 Thread 'Pascal Jasmin' via Programming
d) results in the worst possible quicksort performance. - Original Message - From: Henry Rich To: programm...@jsoftware.com Cc: Sent: Thursday, August 28, 2014 9:18:31 PM Subject: Re: [Jprogramming] fit conjunction On the contrary, stack depth is a killer for quicksort.  In the worst

Re: [Jprogramming] fit conjunction

2014-08-28 Thread 'Pascal Jasmin' via Programming
lead to a ^: breadth first and partial sort implementation. - "Original Message - From: Raul Miller To: Programming forum Cc: Sent: Thursday, August 28, 2014 9:13:58 PM Subject: Re: [Jprogramming] fit conjunction I guess I'd like to see your code to better understand how yo

Re: [Jprogramming] fit conjunction

2014-08-28 Thread Raul Miller
That's a valid point. Of course, that's also a valid reason to avoid quicksort. (And worst case analysis for using unboxed arrays in a parallel quicksort suggests some memory bound problems.) Thanks, -- Raul On Thu, Aug 28, 2014 at 9:18 PM, Henry Rich wrote: > On the contrary, stack depth

Re: [Jprogramming] fit conjunction

2014-08-28 Thread Henry Rich
27;c'={.)"1(!.'*') 3 2 $ 'abc' ab* cad bc* - Original Message - From: robert therriault To: programm...@jsoftware.com Cc: Sent: Thursday, August 28, 2014 8:52:42 PM Subject: Re: [Jprogramming] fit conjunction Hi Pascal, Would something like this not be the way

Re: [Jprogramming] fit conjunction

2014-08-28 Thread Thomas Costigliola
Henry, out of sheer curiosity, if you have a story of such evil follies I would be delighted to hear it. More seriously, do you have a tacit tail recursive verb for quicksort to share ? This is related to this post http://www.jsoftware.com/pipermail/programming/2014-August/039023.html On Thu, Au

Re: [Jprogramming] fit conjunction

2014-08-28 Thread robert therriault
Hi Pascal, I love how you are pushing the envelope on this. I guess that I would usually try something like this, (,&'*')`(,&'d')@.('c'={.)"1 ] 3 2 $ 'abc' ab* cad bc* which feels like it is a step removed from the metal compared to allowing fills to be part of defined verbs Cheers, bob

Re: [Jprogramming] fit conjunction

2014-08-28 Thread Henry Rich
On the contrary, stack depth is a killer for quicksort. In the worst case, the stack depth is the number of items, as each partitioning gives a partition of just one element. Tail recursion solves this problem. Not likely, you say? If your code is deployed somewhere important, Evil People w

Re: [Jprogramming] fit conjunction

2014-08-28 Thread 'Pascal Jasmin' via Programming
(without a domain error):    ,&'d'^:('c'={.)"1(!.'*')  3 2 $ 'abc' ab* cad bc* - Original Message - From: robert therriault To: programm...@jsoftware.com Cc: Sent: Thursday, August 28, 2014 8:52:42 PM Subject: Re: [Jprogramming] fit con

Re: [Jprogramming] fit conjunction

2014-08-28 Thread Raul Miller
in separators for average +/- 2 standard deviations (7 total > bins) > > > - Original Message - > From: Raul Miller > To: Programming forum > Cc: > Sent: Thursday, August 28, 2014 8:39:38 PM > Subject: Re: [Jprogramming] fit conjunction > > The quicksort im

Re: [Jprogramming] fit conjunction

2014-08-28 Thread 'Pascal Jasmin' via Programming
To: Programming forum > Cc: > Sent: Thursday, August 28, 2014 7:27:45 PM > Subject: Re: [Jprogramming] fit conjunction > > But this is saying the feature is needed because the feature is needed. > > The question is: what is a compelling example of a significant problem >

Re: [Jprogramming] fit conjunction

2014-08-28 Thread robert therriault
Raul Miller > To: Programming forum > Cc: > Sent: Thursday, August 28, 2014 7:27:45 PM > Subject: Re: [Jprogramming] fit conjunction > > But this is saying the feature is needed because the feature is needed. > > The question is: what is a compelling example of a sign

Re: [Jprogramming] fit conjunction

2014-08-28 Thread Raul Miller
rogramming forum > Cc: > Sent: Thursday, August 28, 2014 7:27:45 PM > Subject: Re: [Jprogramming] fit conjunction > > But this is saying the feature is needed because the feature is needed. > > The question is: what is a compelling example of a significant problem > which would

Re: [Jprogramming] fit conjunction

2014-08-28 Thread 'Pascal Jasmin' via Programming
ed to implement without boxing.  But this can happen with strings too, where trailing space might be meaningful. - Original Message - From: Raul Miller To: Programming forum Cc: Sent: Thursday, August 28, 2014 7:27:45 PM Subject: Re: [Jprogramming] fit conjunction But this is sayin

Re: [Jprogramming] fit conjunction

2014-08-28 Thread bill lam
ssage - > From: Raul Miller > To: Programming forum > Cc: > Sent: Thursday, August 28, 2014 6:28:46 PM > Subject: Re: [Jprogramming] fit conjunction > > I guess the issue here is: what problem would this solve? > > (There's a generic problem with solvi

Re: [Jprogramming] fit conjunction

2014-08-28 Thread Raul Miller
s, but its not clear how !. was meant to apply to it in the first place. > > > - Original Message - > From: Raul Miller > To: Programming forum > Cc: > Sent: Thursday, August 28, 2014 6:28:46 PM > Subject: Re: [Jprogramming] fit conjunction > > I guess the i

Re: [Jprogramming] fit conjunction

2014-08-28 Thread 'Pascal Jasmin' via Programming
# (copy) in such a way that it creates fills, but its not clear how !. was meant to apply to it in the first place. - Original Message - From: Raul Miller To: Programming forum Cc: Sent: Thursday, August 28, 2014 6:28:46 PM Subject: Re: [Jprogramming] fit conjunction I guess the issue here

Re: [Jprogramming] fit conjunction

2014-08-28 Thread Raul Miller
telist" to be fill? > > > - Original Message - > From: Raul Miller > To: Programming forum > Cc: > Sent: Thursday, August 28, 2014 1:38:07 PM > Subject: Re: [Jprogramming] fit conjunction > > The 0 comes from the derived verb, not from # > > Thus: >

Re: [Jprogramming] fit conjunction

2014-08-28 Thread 'Pascal Jasmin' via Programming
August 28, 2014 1:38:07 PM Subject: Re: [Jprogramming] fit conjunction The 0 comes from the derived verb, not from # Thus:   2#^:|"+ 1 2 3 1 1 2 0 3 3   2(1+#^:|)"+ 1 2 3 2 2 3 0 4 4 So you'll have to synthesize the _ on your own. Perhaps something like this:   (+_*_1&=)&l

Re: [Jprogramming] fit conjunction

2014-08-28 Thread Raul Miller
The 0 comes from the derived verb, not from # Thus: 2#^:|"+ 1 2 3 1 1 2 0 3 3 2(1+#^:|)"+ 1 2 3 2 2 3 0 4 4 So you'll have to synthesize the _ on your own. Perhaps something like this: (+_*_1&=)<:2(1+#^:|)"+ 1 2 3 1 1 2 _ 3 3 Thanks, -- Raul On Thu, Aug 28, 2014 at 1:21 PM, 'Pasc

[Jprogramming] fit conjunction

2014-08-28 Thread 'Pascal Jasmin' via Programming
          (2#(!._)])^:(2|])"0 ] 1 2 3 1 1 2 0 3 3 the fit conjunction here has no effect, is there a way to get the 0 fill to be replaced with _ -- For information about J forums see http://www.jsoftware.com/forums.htm