[Jprogramming] An annoyance

2022-03-08 Thread Elijah Stone
f=. {&1 0 : [: g=. -. : [: Distinguish f and g, without the use of explicit control structures, ::, AR introspection, or other forms of cheating. Spoiler: (f -: g) 1+9!:18'' 0 Floating-point strikes again! --

Re: [Jprogramming] Dictionaries WAS: Report on the J wiki meeting of January 27, 2022

2022-03-08 Thread Elijah Stone
On Mon, 31 Jan 2022, Elijah Stone wrote: keys should not be ordered Agh! I missed the obvious complication. I still do not think ordered keys are a good idea, but this does not work with tolerant comparison. -E -- For in

Re: [Jprogramming] Dictionaries WAS: Report on the J wiki meeting of January 27, 2022

2022-03-08 Thread Devon McCormick
The APL system I work on has implemented dictionaries using enclosed arrays and user-defined functions for accessing them. There's no reason we couldn't do this in J. On Tue, Mar 8, 2022 at 5:50 AM Elijah Stone wrote: > On Mon, 31 Jan 2022, Elijah Stone wrote: > > > keys should not be ordered >

Re: [Jprogramming] An annoyance

2022-03-08 Thread Raul Miller
On Tue, Mar 8, 2022 at 5:42 AM Elijah Stone wrote: > > f=. {&1 0 : [: > g=. -. : [: > > Distinguish f and g, without the use of explicit control structures, ::, > AR introspection, or other forms of cheating. I dislike when "cheating" is used to mean "anything other than the idea I am thi

Re: [Jprogramming] An annoyance

2022-03-08 Thread Elijah Stone
On Tue, 8 Mar 2022, Raul Miller wrote: I dislike when "cheating" is used to mean "anything other than the idea I am thinking of". Good point. In this case my intent was to compare _meaningful behaviour_. So: AR will show only implementation details, and :: and try./catch. will catch differen

Re: [Jprogramming] Cyclotomic Polynomials and FFT - was Re: polynomial division

2022-03-08 Thread 'Michael Day' via Programming
Sorry - a few days have passed Interesting! As I had put up this idea (using fft multiplication and a special case for fft "division"),  I feel I can wonder if this helps the Rosetta Code exposition of the virtues of J!  I like my idea,  of course, and it's of potential interest to the J c

Re: [Jprogramming] Cyclotomic Polynomials and FFT - was Re: polynomial division

2022-03-08 Thread Raul Miller
On Tue, Mar 8, 2022 at 2:01 PM 'Michael Day' via Programming wrote: > for fft "division"), I feel I can wonder if this helps the Rosetta > Code exposition of the virtues of J! I like my idea, of course, > and it's of potential interest to the J community, but are Rosetta > coders interested in

Re: [Jprogramming] An annoyance

2022-03-08 Thread Henry Rich
What domain did you expect these functions to be equivalent over? Henry Rich On Tue, Mar 8, 2022, 1:51 PM Elijah Stone wrote: > On Tue, 8 Mar 2022, Raul Miller wrote: > > > I dislike when "cheating" is used to mean "anything other than the idea > > I am thinking of". > > Good point. In this ca

Re: [Jprogramming] Cyclotomic Polynomials and FFT - was Re: polynomial division

2022-03-08 Thread 'Michael Day' via Programming
Thanks.  May I just suggest again having a look at the bullet points, which have the odd error? eg "...coefficients of A cyclotomic polynomialS after 1 ..." "... coefficients of the cyclotomic polynomial for a prime number haS as many..." capitals/upper case highlighting problem letters. Cheer

Re: [Jprogramming] An annoyance

2022-03-08 Thread Elijah Stone
I don't expect--or want--anything other than I see; I just think it's annoying. The main point is that 1&- is not a consistent extension of logical negation to the reals, given tolerant comparison. -E On Tue, 8 Mar 2022, Henry Rich wrote: What domain did you expect these functions to be e

Re: [Jprogramming] An annoyance

2022-03-08 Thread Raul Miller
On Tue, Mar 8, 2022 at 6:52 PM Elijah Stone wrote: > The main point is that 1&- is not a consistent extension of logical > negation to the reals, given tolerant comparison. 1&- supports Bayesian logic. (AND is *, OR is *&.-.). Tolerant comparison was introduced to cope with the limitations of th

[Jprogramming] An invitation to participate in developing the J wiki

2022-03-08 Thread 'robert therriault' via Programming
Calling all J'ers Over the last couple of months, a group have been working together on a plan to revamp the J wiki. In the next two months, we will start to roll out some of the changes that we plan to implement. If you have not already been involved, this is your chance. These developments s

[Jprogramming] Amend an array with an array

2022-03-08 Thread Richard Donovan
Can I amend an array with a smaller array? For example amend a 5x5 array by a 2x2 array starting at location x,y within the larger array? Thanks Richard Donovan -- For information about J forums see http://www.jsoftware.com/foru

Re: [Jprogramming] Amend an array with an array

2022-03-08 Thread 'Pascal Jasmin' via Programming
3 5 7 9 (0 0;0 1;1 0;1 1)} i.5 5 On Wednesday, March 9, 2022, 12:47:32 a.m. EST, Richard Donovan wrote: Can I amend an array with a smaller array? For example amend a 5x5 array by a 2x2 array starting at location x,y within the larger array? Thanks Richard Donovan -

Re: [Jprogramming] Amend an array with an array

2022-03-08 Thread Elijah Stone
Something like this, perhaps? ]a=. i.5 5 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ]b=. 2 2 $ 100 200 300 400 100 200 300 400 b (<1 2;0 1)} a 0 1 2 3 4 100 200 7 8 9 300 400 12 13 14 15 16 17 18 19 20 21 22 23 24 Note this requires you to s

Re: [Jprogramming] Amend an array with an array

2022-03-08 Thread Richard Donovan
Than you Elijah, that second example is exactly what I want! > On 9 Mar 2022, at 05:59, Elijah Stone wrote: > > Something like this, perhaps? > > ]a=. i.5 5 > 0 1 2 3 4 > 5 6 7 8 9 > 10 11 12 13 14 > 15 16 17 18 19 > 20 21 22 23 24 > ]b=. 2 2 $ 100 200 300 400 > 100 200 > 300 400 >