Re: [Jprogramming] Nub with extra column

2022-12-13 Thread Ben Gorte
On Sat, 26 Nov 2022 at 14:27, Henry Rich wrote: > This problem, which Elijah has found can be attributed to my insouciance > about the robustness of CRC-32 as a hash function, afflicts the entire > i.-family and has no good workaround. > > However, I think it will be easy to fix, and I hope we wi

Re: [Jprogramming] Nub with extra column

2022-11-26 Thread Ben Gorte
I figured something like this, but my insouciance concerning &. &: and &.: had prevented a successful implementation (now I think I understand). Thanks again! Ben On Sat, 26 Nov 2022 at 16:21, Elijah Stone wrote: > For dyad i. use i.&:(1&|."1). Similar applies to other dyadic family > members.

Re: [Jprogramming] Nub with extra column

2022-11-26 Thread Ben Gorte
Great, thanks in advance Ben On Sat, 26 Nov 2022 at 14:27, Henry Rich wrote: > This problem, which Elijah has found can be attributed to my insouciance > about the robustness of CRC-32 as a hash function, afflicts the entire > i.-family and has no good workaround. > > However, I think it will be

Re: [Jprogramming] Nub with extra column

2022-11-25 Thread Elijah Stone
For dyad i. use i.&:(1&|."1). Similar applies to other dyadic family members. On Sat, 26 Nov 2022, Ben Gorte wrote: Hi Henry, could you be a bit more explicit about these 32 bits + workaround? Eliahs suggestion helps, but doesn't seem to solve the entire issue. For example, something similar o

Re: [Jprogramming] Nub with extra column

2022-11-25 Thread Henry Rich
This problem, which Elijah has found can be attributed to my insouciance about the robustness of CRC-32 as a hash function, afflicts the entire i.-family and has no good workaround. However, I think it will be easy to fix, and I hope we will get the fix out in the next beta, which should be co

Re: [Jprogramming] Nub with extra column

2022-11-25 Thread Ben Gorte
Hi Henry, could you be a bit more explicit about these 32 bits + workaround? Eliahs suggestion helps, but doesn't seem to solve the entire issue. For example, something similar occurs in dyadic i. Thanks, Ben On Fri, 25 Nov 2022 at 02:57, Henry Rich wrote: > It's a data dependency: > > xxx1

Re: [Jprogramming] Nub with extra column

2022-11-24 Thread Ben Gorte
> can duplicate on windows, both of these are fast: > ~. 1 ,.~ ?. 100 2$100 > ~. 1 ,.~ ?. 100 4$100 That is the same here. It gets slow when the fourth column in the second case is (almost) a constant A =: ?100 3$100 6!:2 'echo $~.A,.1234' 632325 4 25.7533 Ben On Fri, 25 Nov 2

Re: [Jprogramming] Nub with extra column

2022-11-24 Thread Ben Gorte
> I cannot duplicate your experience. > A3=:?1 3$100 That's the same here, it only occurs with larger arrays: A =: ?200 3$100 6!:2 'echo $~.A' 864712 3 0.080995 6!:2 'echo $~.A,.1' 864712 4 67.7995 Fun fact: In J Playground, https://jsoftware.github.io/j-playground/bin/html2/#

Re: [Jprogramming] Nub with extra column

2022-11-24 Thread Henry Rich
It's a data dependency:    xxx1 =.  1  ,"1~ 1 3?@$ 100    6!:2'~. xxx1' 0.0068845    xxx1 =.  1  ,"1~ 1 3?@$ 1    6!:2'~. xxx1' 0.000578 Repetitions at lengths of 32 bits seem to be trouble (not surprising when you think about it).  One kludgy-smelling workaround would be to rotate

Re: [Jprogramming] Nub with extra column

2022-11-24 Thread 'Pascal Jasmin' via Programming
can duplicate on windows, both of these are fast: ~. 1 ,.~ ?. 100 2$100 ~. 1 ,.~ ?. 100 4$100 On Thursday, November 24, 2022 at 12:40:33 a.m. EST, Elijah Stone wrote: That looks rather serious.  It seems some problem with the hashing function is causing an unreasonably high

Re: [Jprogramming] Nub with extra column

2022-11-24 Thread Brian Schott
I cannot duplicate your experience. A3=:?1 3$100 A31=: A3,.1 A4=:?1 4$100 6!:2'echo $~.A3' 9951 3 0.007586 6!:2'echo $~.A31' 9951 4 0.008745 6!:2'echo $~.A34' 2.8e_5 6!:2'echo $~.A4' 1 4 0.009025 JVERSION Engine: j903/j64/iOS beta-k: GPL3/2021-10-15T01:07:05 Pla

Re: [Jprogramming] Nub with extra column

2022-11-23 Thread Ben Gorte
Yeah, great workaround, thanks! Ben On Thu, 24 Nov 2022 at 16:40, Elijah Stone wrote: > That looks rather serious. It seems some problem with the hashing > function is > causing an unreasonably high rate of collisions. As a temporary > workaround, > you can try using ~.&.:(1&|."1), or use the

Re: [Jprogramming] Nub with extra column

2022-11-23 Thread Elijah Stone
That looks rather serious. It seems some problem with the hashing function is causing an unreasonably high rate of collisions. As a temporary workaround, you can try using ~.&.:(1&|."1), or use the 32-bit version. On Thu, 24 Nov 2022, Ben Gorte wrote: G'day, Still J-ing along, I believe I