I originally wanted just one adverb to indicate associativity. But then other
things just started piling up. As yet, we have:
- associativity
- commutativity
- identity
- fixedpoint
Commutativity enables a bit more flexibility wrt parallelism, and might have
other uses (forget); identity
Very interesting indeed, all of this thread.
I think annotation both of nouns and verbs would be useful.
Do we also need a way of de-annotation?
Probably not but I haven’t thought it through.
I don’t like the literal approach. I’d rather have J know about
constants ASSOC. and SORTED. and the
If any of this is implemented, it would make sense to me to have u b. n
query the attributes.
Henry Rich
On 1/10/2023 6:18 PM, 'Pascal Jasmin' via Programming wrote:
u/ P. 'Associative' and P:
would let you/us describe/annotate verbs and invoke associative optimizations
on it.
The
u/ P. 'Associative' and P:
would let you/us describe/annotate verbs and invoke associative optimizations
on it.
The Associative adverb or attribute applies only to functions (doesn't make
sense for data)
It also applies to only insert operations, and then as an adverb it could all
be built
Hi - it looks like I had an attendee limit on the event. Of course, when I
try to change it, it tells me this does not apply to an online event, so I
had to make it offline and make the change; somehow it magically put it
back as an online event with the correct URL and a higher limit.
Please
Hard to believe but I will check. Thanks!
On Tue, Jan 10, 2023 at 1:32 PM 'robert therriault' via Programming <
programm...@jsoftware.com> wrote:
> Hey Devon,
>
> I'll try to hop on, but when I go to the link it says there is a waitlist,
> so you may already be oversubscribed?
>
> Cheers, bob
Exactly,
e=. &.>
u=. ('('"_ , 'u '"_ , ] , ')'"_) :('('"_ , [ , ' u '"_ , ] , ')'"_)
YS=. <;._1 ' Y0 Y1 .. YN'
u e/\YS
┌──┬─┬┬───┐
│Y0│(Y0 u Y1)│(Y0 u (Y1 u ..))│(Y0 u (Y1 u (.. u YN)))│
Intuitively, to me it would make sense to have a conjunction, e.g. P., to
set properties, provided as literal characters, to a verb (or, if it would
become desirable for other use cases, for nouns as well), and a
corresponding adverb (in line with b.) to query them. I bet there are other
scan=. ((~/)\.)(&.|.)
-scan p:i.5
2 _1 _6 _13 _24
-/\ p:i.5
2 _1 4 _3 8
--
Raul
On Tue, Jan 10, 2023 at 3:18 PM Jose Mario Quintana
wrote:
>
> Indeed,
>
>scan=. ((~/)\.)(&.|.)
>
>%&:{./"_1 +/ .* /\ (1 0,:~,&1)"0 ]10$1
> 1 2 1.5 1.7 1.6 1.625 1.61538 1.61905 1.61765
Indeed,
scan=. ((~/)\.)(&.|.)
%&:{./"_1 +/ .* /\ (1 0,:~,&1)"0 ]10$1
1 2 1.5 1.7 1.6 1.625 1.61538 1.61905 1.61765 1.61818
%&:{./"_1 +/ .*scan (1 0,:~,&1)"0 ]10$1
1 2 1.5 1.7 1.6 1.625 1.61538 1.61905 1.61765 1.61818
stp=. ] (([ ((<;._1 '|Sentence|Space|Time|Space * Time')
Elijah brought up the possibility of decorating verbs
Associative adverb would be a declaration that 1 u 2 u 3 is the same result as
(1 u 2) u 3. and then u Associative/ might be parallel optimized in its
implementation, in addition to documenting the programmer's assumptions.
for (A n)
A
Hey Devon,
I'll try to hop on, but when I go to the link it says there is a waitlist, so
you may already be oversubscribed?
Cheers, bob
> On Jan 10, 2023, at 10:23, Devon McCormick wrote:
>
> We are having our first NYCJUG meeting of the new year this evening at
> 18:30 EST. Take a look at
If elegance is a concern, I'd go with:
'ab' (1 e. E.)S:0 'ac';'cab';'bca';'bab'
0 1 0 1
Thanks,
--
Raul
On Tue, Jan 10, 2023 at 1:21 PM Devon McCormick wrote:
>
> I doubt performance is very important for the sizes of arguments I
> typically use but David's expression is more elegant.
>
We are having our first NYCJUG meeting of the new year this evening at
18:30 EST. Take a look at our Meetup page
https://www.meetup.com/J-Dynamic-Functional-Programming/ for more
information.
Hope to see you there!
--
Devon McCormick, CFA
Quantitative Consultant
I doubt performance is very important for the sizes of arguments I
typically use but David's expression is more elegant.
On Tue, Jan 10, 2023 at 9:29 AM David Lambert wrote:
> (<'ab') (1 e. E.)&> 'ac';'cab';'bca';'bab' NB. quicker?
> 0 1 0 1
>
> (<'ab') ([: +./ E.)&>
What would this Associative adverb do?
Also, can this approach be made to usefully invoke (+/!.0) ?
Thanks,
--
Raul
On Tue, Jan 10, 2023 at 1:12 PM 'Pascal Jasmin' via Programming
wrote:
>
> There is after all a Conjunction approach that permits ambivalent u verb,
> and so for attributes
There is after all a Conjunction approach that permits ambivalent u verb, and
so for attributes that current native J code could leverage, it would be
possible to have full functionality of (A n) suggestion.
Dn =: 2 : 'v u ]' NB. dyadic with x as n or monadic with [: as v
+/"1 0 (Dn 2 3)
> S.
I was going to suggest some foreign equivalent to S. But this approach is
sufficient. A: (for (A)ssociative declaration) would be another candidate. if
A: (or a foreign adverb) were used for this. u S. could be a declaration/hint
that the y argument to u is in sorted order.
plus =: +
Some fractal examples of u . v with u not an insert:
load '~addons/graphics/fvj4/raster.ijs'
M (#.@|:) . *: |: M=:#:i.2^3
view_image P256;M (#.@|:) . *: |: M=:#:i.2^8
M i.&0"1@|: . *: |: M=:#:i.2^3
view_image (Hue (i.%])9);M i.&0"1@|: . *: |: M=:#:i.2^8
M i.&1"1@|: . *. |:
(<'ab') (1 e. E.)&> 'ac';'cab';'bca';'bab' NB. quicker?
0 1 0 1
(<'ab') ([: +./ E.)&> 'ac';'cab';'bca';'bab'
0 1 0 1
--
For information about J forums see http://www.jsoftware.com/forums.htm
J uses +/!.0 for accurate sums.
+/!.0 ] 1 1e_30 _1
1e_30
Henry Rich
On 1/9/2023 9:38 PM, Marshall Lochbaum wrote:
I'm aware but I think consistent results are more important than speed.
BQN's approach is to provide •math.Sum for fast sums, which is a little
over 10x faster for floats on
None required, the discussion was useful.
Ak
On Mon., Jan. 9, 2023, 16:08 Don Kelly, wrote:
> My apology, Devon has pointed out that the operator can change the
> tolerance from the default value.
>
> Don
>
> On 2023-01-06 11:00 p.m., Ak O wrote:
> > Correct. Which is a property of the
Although I never used it, I can imagine using a Fold (F.. or F:.) instead
of u/ in a dot product could be handy in some cases. This would allow early
exit using Z: .
Jan-Pieter.
On Tue, 10 Jan 2023, 05:12 Devon McCormick, wrote:
> Looking at about 300 examples of using dot in my own code, it
23 matches
Mail list logo