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!
--
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
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
>
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
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
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
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
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
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
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
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
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
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
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
-
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
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
>
16 matches
Mail list logo