[Jprogramming] J807 sparse array segmentation fault

2019-06-23 Thread ol...@bluewin.ch
Unfortunately I can't try this with the J901 beta as my Mac is too old for AVX. The reflexive adverb ~ is necessary for J to crash. This happened with any non-empty arrays I tried. JVERSION Engine: j807/j64nonavx/darwin Release-d: commercial/2019-03-18T16:08:19 Library: 8.07.26 Platform: Darwin

Re: [Jprogramming] Maximum Subarray Problem

2019-02-24 Thread ol...@bluewin.ch
Hi, The version I know from https://github.com/kevinlawler/kona/wiki/Idioms is mss=: [: >./ (0 >. +)/\. It fails on lists of length 0 or 1 but is very concise; the following works on all list lengths but has a few extra characters: mss1=: [: >./ [: (0 >. +)/\. ,&0 which is an almost literal t

Re: [Jprogramming] nubsieve modulo rotation

2019-02-24 Thread ol...@bluewin.ch
> sig3 does not work: Funny, it works ok on my copy of j807 (and is very fast, well done Mike). It doesn't find the minimum rotation of a vector though, it directly takes a matrix and returns the nubsieve of the rows, so it expects a rank 2 argument. > I compared my solution with sigb_LdF and si

Re: [Jprogramming] nubsieve modulo rotation

2019-02-16 Thread ol...@bluewin.ch
I rewrote two explicit and perhaps clearer versions of my sig verb. Both work on the same principle as the original, but one uses a bit vector and the other uses a list of indices, and the indices are a bit faster (pun probably intended). I prefer the bit vector aesthetically though. Both basic

Re: [Jprogramming] Everyone giving dollars to random others

2017-07-20 Thread ol...@bluewin.ch
I like your new version very much Raul. Hard to top that. Hat's off for the i.@# #/.~@, part. Bravo! Louis Original Message From : [email protected] Date : 20/07/2017 - 17:45 (EDT) To : [email protected] Subject : Re: [Jprogramming] Everyone giving dollars to random others