The same output of your quoted "program"
\:~ _10 1 10 20 _30 15 25 30 0
30 25 20 15 10 1 0 _10 _30
I may have misunderstood your original question, based on subject line. You
appear to want to sort card hands.
You would want to encode cards as integers, where 2-A maps to 0-13. It is a
good
1 0 0 1 0 /:~ i.5
1 2 4 0 3
On Thursday, December 21, 2023 at 09:03:34 a.m. EST, 'Viktor Grigorov' via
Programming wrote:
Hey,
Is there an easy way to sort an array with verb returning either 0 or 1, like
the comparison primitives?
The verb that I'd in mind relates to the 2023'
pf 19 has at least 1 solution
# 1 ,^:(0 = 1&p:@:(10&#.)@])(^:100) 1 1 1
19
1 p: 111x
1
On Saturday, September 23, 2023 at 01:18:44 p.m. EDT, 'Pascal Jasmin' via
Programming wrote:
there is a bug in your p 3... 793 is not prime.
An approach that ca
there is a bug in your p 3... 793 is not prime.
An approach that can be improved upon in speed:
perm =: i.@! A. i.
raveltillCS =: 1 : ',/^:(m < #@$)^:_' NB. repeat ravel until count of shape = m
p2 =: 1 3 7 9 ~.@:(,/^:(2 < #@$)^:_@:(/:~"1@:({ )~&:>)) (<0 1 2 3) { @:#~ ]
NB. unique combination
3 at 02:30:11 p.m. EDT, Jo van Schalkwyk
wrote:
You do know that (>:i.9) can be replaced by 1 3 7 9, because there are just
4 even digits and 4 places for them, so the rest must be odd (and 5 is
taken)?
Dr Jo.
On Thu, 14 Sept 2023 at 04:14, 'Pascal Jasmin' via Programming <
progr
to test a / version
v2 =: ([ (] #~ [ = 10&#.inv(#@~."1@:)@]) [ (] #~ 0 = |) (BASE10DIVbyINDEX {::~
[) +("1 0)(,@:) 10 * ])
10 timespacex 'v2/ 9 8 7 6 5 4 3 2 1 0'
0.00013159 14496
One conclusion is that a single large filtering operation is more time
efficient t
lower code version, of Raul's.
I may not have understood problem, but I get 2492 solutions (oops... now I
understand that each digit needs to be used just once.
I =: ]F.: NB. insert using fold for shape flexibility
#(>:i.9) ([ (] #~ 0 = |) (i.10) +("1 0)(,@:) 10 * ])I 9 8 7 6 5 4 3 2
# (>:i.9
3 2 1(*./@:(e.~)&~.&(/:~) 10. inv)("1 0) 230 123 111 123123132
0 1 1 1
On Saturday, August 26, 2023 at 06:31:01 a.m. EDT, Richard Donovan
wrote:
I am trying to find out whether a series of integers y only contain a set of
integers x
That is, 1 3 5 verb 5311 10531 536
if you (or a user) are calling your function from J code, add the x to any
"literal numbers".
If your very large number is the result of a calculation, then you can ensure
that it is returned as extended.
If the input comes from elsewhere/other program, then pass it as a string.
".@,&'x' '1239
A general version of approach 1 is to append any temporary results to original
argument in boxed form.
G0 =: 0 {:: ]
G1 =: 1 {:: ]G2 =: 2 {:: ]
[: (G2 V~ G1 U G0 ) [ ( [ (] (,<)~ W) G1) ] ,&< Q
Can be streamlined a bit with:
NB. keeps y argument, though ensures it is boxed, and appends resul
I have a kv library, I published before. It includes (kvinsert) an ordered
insert function to permit arbitrary order, but its design and testing may need
improvement. In this case, it seems that appending then sorting represents the
order that you want. In kv library append also updates when
Not sure it is supported, however,
You can paste in a script into edit window,
and you could paste the content of an aribitray file into a 0 : 0 multiline
noun defintion.
On Tuesday, July 11, 2023 at 01:50:10 p.m. EDT, 'robert therriault' via
Programming wrote:
Hi charles,
The 'J Play
my version of this with new 903 trains,
eval_z_ =: 1 : 'if. 2 ~: 3!:0 m do. m else. a: 1 : m end.' NB.1 : ' a: 1 : m'
isNoun =: (0 = 4!:0 ::0:)@:<
aar =: 1 : 'if. isNoun ''u'' do. q =. m eval else. q =. u end. 5!:1 < ''q'' '
vm2c =: APPLY =: 2 : ' u n' NB. verb to monad applied to n
9 ((() vm2
I'll just add,
for the adverbs that return verbs, and / is a good example.
The monadic case of u/ uses a dyadic u to insert u into arguments of the
"resulting verb" u/
For dyadic/table case of / it is [x] u/ y, the presence of x that applies the
dyadic case to the u/ resulting verb.
It is note
Note 'title'comment line 2comment line 3
)
On Wednesday, May 24, 2023 at 06:37:29 a.m. EDT, 'Rob B' via Programming
wrote:
Hi,
A few days ago I thought I saw something about multiline comments
eg NB. 1…..
I cannot find anything about it now, was it a dream?
Regards, Rob.
---
> parsing a csv file with 3 fields per record where any can be empty:
This is indeed an important application, and missing capability of ;:.
discussion:
https://code.jsoftware.com/wiki/User:Pascal_Jasmin/sequential_machine_intro
A workaround to emit nulls part of jpp package (whole project m
> Example: 5 % m. 7 (9) gives 5 *(mod 7) (inverse of 9(mod 7))
example is not clear to me:
is 5 % m. 7 (9)
7 | 5 % 9 NB.?
I don't understand % as a typical application of modular arithmetic.
On Monday, April 17, 2023 at 02:56:28 p.m. EDT, Henry Rich
wrote:
In the next beta u m. n me
label_. currently serves line splitting function in explicit code. Shortening
that to .. equivalent "is easy".
functionality that would appeal to me from a "special word" (not conj/adv or
other speech) is as a separator that acts as parentheses, and works with tacit
code:
myfunction =: exp1 ..
there is
G1 =: 1 {:: ]
G0 =: 0 {:: ]
(G0 ; ".@G1) 'abc';'13.2'
On Tuesday, February 21, 2023 at 11:18:21 p.m. EST, Elijah Stone
wrote:
Your routine most likely doesn't do what you want it to:
'abc ' -: 0{:: (<@:])`(<@:".)"1 >'abc';'13.2'
1
The 'abc' got padded when you opened.
There is also a numeric library install required (forget which one) that while
it shouldn't crash without it, will not produce extended results.
On Thursday, February 16, 2023 at 10:31:45 p.m. EST, bill lam
wrote:
We have received reports on the crash but can't reproduce by ourselves
Beautiful.
this is the CC(nv) pattern, that matches the CA pattern.
The elegance that allows that allows for elegance in making "compounder"
modifiers.
On Thursday, February 16, 2023 at 12:28:24 p.m. EST, David Lambert
wrote:
Of the new modifier trains, I've found ^:^:_ as "while".
fortunately the material written there is too advanced for a Journeyman
> like me. I couldn't find any J book/pdf that talks about it in a more
> digestible way ... and the j wiki only has this page.
>
> But I'm really excited about this discovery.
>
> thank you.
>
All conjunctions including @ bind to their right argument "tightly" meaning
just the one token.
The left argument of conjunctions/adverbs is the entire verb phrase to the left
of it.
myvarp1 uses "linear style" even if it is tacit. `[:` has "no binding"
everything to right will execute firs
u n: is to be => ([x] u y)
this happens to be the same output as the verb u.
u n: A is to be=> ([x] u y) A
Difference between left and right is that left is a contained function that (u
n:) can be considered a conjunction where x and y are m and n parameters.
Except that an actual conjunctio
there is something like,
f=. {{
a=. 5
b=. 6
g=. (a;b) {{ ... [ 'a b' =. m }}
g=. a {{ ... m ... }} NB. if fewer parameters transferred.
a=. 7
}}
On Tuesday, January 17, 2023 at 10:58:05 p.m. EST, Elijah Stone
wrote:
Basically, yes. It's interesting that you refer to them t
n on,
by some in the J community -- It seems that they're "too powerful".
But if the problem is that explicit definitions are insufficiently
constrained, why should we want to burden tacit definitions with this
defect?
--
Raul
On Wed, Jan 18, 2023 at 12:40 AM 'Pascal Jasmin'
at
having verbs return non-nouns is not the way to do it.
Henry Rich
On 1/17/2023 10:10 PM, 'Pascal Jasmin' via Programming wrote:
> More ways to generate ARs doesn't hurt, but its not verbs returning
> non-nouns, or a path (n:) to obtain non-nouns from a verb phrase, so then
More ways to generate ARs doesn't hurt, but its not verbs returning non-nouns,
or a path (n:) to obtain non-nouns from a verb phrase, so then the proposal is
not meeting a major need.
repeating definitions,
eval_z_ =: 1 : 'if. 2 ~: 3!:0 m do. m else. a: 1 : m end.' NB.1 : ' a: 1 : m'
isNoun_z_
Could this be called templating?
> (f%#) &:: ('f';+/`'') becomes +/%#.
what if f were already defined? (usually substituted in verb phrases)
adverbs and conjunctions give this functionality.
I'm happy with the templating engine in this thread
http://www.jsoftware.com/pipermail/programming/20
ier.
Henry Rich
On 1/17/2023 3:12 PM, 'Pascal Jasmin' via Programming wrote:
> so an =: arnoun
>
> an =: 1 : '<@:((,''0'') ,&< ]) m' NB. atomic rep of noun as an adverb (right
> arg)
>
> eval_z_ =: 1 : 'if. 2 ~: 3!:0 m do. m
;nouns" and
verbs. It is not the inability to create ars.
On Tuesday, January 17, 2023 at 12:13:21 p.m. EST, Henry Rich
wrote:
Please confine this to my proposal - not including n: .
It seems to me that if ". can produce any part of speech, and can be
applied to ARs, it c
The proposal for
u n: -> [x] u y (and then u n: M => (([x] u y)M) )
would work with this so that
". n: `:6
can consume "the output" though 2. suggests doing this. Would:
". '+';'/'; '1 2 3'
produce 3 boxes? a linear expression?
> willing to use dangerous backdoor hacks into JE to achiev
he same as (f g h)(u@:) is true, but coincidence, and I don't see what it
> has
> to do with anything.
>
> On Sat, 14 Jan 2023, 'Pascal Jasmin' via Programming wrote:
>
>> Raul expressed by thinking,
>>
>> .> x (f g n:A h) y would be same as (f g
#x27;now') a while ago, and
>> > received
>> > a lukewarm response. I don't think it can be implemented other than as a
>> > primitive. (And I still think it would be a good idea to have.)
>> >
>> > Your solution which quotes the modifier
wing?
>
> (u r2m) C v
>
> u C (v r2m)
>
> (u r2m) C (v r2m)
>
> You can't, so you would need a separate form for each.
>
> On Fri, 13 Jan 2023, 'Pascal Jasmin' via Programming wrote:
>
>> X =: 1 : 'm&+'
>>
>>
>&
tedbyitemD')) ATTRIB (0 _1 _2 _3 _4)
2 minus@:minus nATTRIB 2 iotaA 5 NB. minus@minus reverts to sorted
(P(<;._1 ' unique uniquebyitem sorted sortedbyitem')) ATTRIB (0 1 2 3 4)
(minus 2 minus 2 iotaA 5)nATTRIB1 NB. use core adverb (nATTRIB1 ) to transform
linear code res
k=: aar(0:`)(,^:)
oa =: 1 :'u Cloak @:' NB. apply quoted adverb after result. Can produce modifier
+ 'X' oa 32
32&+
2 (+ 'X' oa) 32
34&+
2 + ('X' oa) 32
34&+
On Friday, January 13, 2023 at 11:19:49 a.m. EST, 'Pascal Jasmin' v
X =: 1 : 'm&+'
What definition of r2m (result to m argument) below would allow X to see the
result of + y (or x+y) as its m argument?
+ r2m X 3
purpose would be for X to produce a modifier from application of "verb".
Requirement is only that y argument (3 above) is outside any verb phrase.
> But I would favor such primitives – building corresponding
> conjunctions should be fairly easy and might even be done
> for all currently known decorations in a script distributed
> but not loaded by default.
> But maybe I missed a point why that new train actually
> improves
tes as literal string, u P:'a' could return a boolean whether u is
associative or not).
I didn't take a good look at how nicely such a proposal would play with
modifier trains though.
Jan-Pieter
Op di 10 jan. 2023 om 16:35 schreef 'Pascal Jasmin' via Programming <
p
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 that current native J code could leverage, it would be
>possib
2
: '[ u v' NB. dyadic compose with repeated x, or monadic hook
On Tuesday, January 10, 2023 at 10:35:16 a.m. EST, 'Pascal Jasmin' via
Programming wrote:
> S.
I was going to suggest some foreign equivalent to S. But this approach is
sufficient. A: (for (A)sso
> 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 =: + A
missing line break, sorry
M =: @]
v2c =: 1 : '[. u ].'
tine =: 1 : ' (M~) (u v2c) M '
On Thursday, January 5, 2023 at 07:32:34 p.m. EST, 'Pascal Jasmin' via
Programming wrote:
M =: @]v2c =: 1 : '[. u ].'
tine =: 1 : ' (M~) (u v2c)
M =: @]v2c =: 1 : '[. u ].'
tine =: 1 : ' (M~) (u v2c) M '
there was a recent change to allow gerund argument to &.
& and &: could allow gerund v such that w&(u`v) is (u@[ w v@]). But tine as
written is easier to use (only one function. no parenthesizing gerund
arguments).
On Thursda
> J is an "array programming language," which is what exactly?
J is a functional programming language where every function is an operator with
1 or 2 arguments.
An array language is one where arrays are easy to input, and functions
"automatically" extend to full arrays with implied map/zip func
s might or might not be in the next beta.
Henry Rich
On 12/8/2022 8:13 PM, 'Pascal Jasmin' via Programming wrote:
> A definition of F02 that eliminates all of my other boiler plate or potential
> sources of error is
>
> F02 =: 2 : '(u`)(`v)(`:6)' NB. still
ld do this myself if your code were less baroque.
Henry Rich
On 12/8/2022 7:24 PM, 'Pascal Jasmin' via Programming wrote:
> Not 100% sure it is bug in `:6 or the interaction with F..
>
> ex
>
> mjqjpqmgbljsphdztnvjfqwrcgsmlb
>
> ((1>:@{::]),&<~[,~ _3{.0{::])`
@v y') -:@[ F02 (+:@])
-:@[ +: (2 : (':'; 'x u@v y')) - +:@]
:
2 - (+: 2 : 'x u@v y') -:@[ F02 (+:@]) 3
_10 NB. 1 and 6 are result of v0 and v2. 1 +:@- 6 = _10
One possible fix that would make everything cleaner is if (] F..) did not
expand to explicit def
ed y structure.
On Thursday, December 8, 2022 at 06:01:45 p.m. EST, 'Pascal Jasmin' via
Programming wrote:
Part of the complexity is searching for index rather than "data". There are
several convenience functions that can simplify the code
G0 =: 0 {:: ]
G1 =: 1 {:: ]
Z2
:35 p.m. EST, 'Michael Day' via
Programming wrote:
Thanks for your replies - I'll try to get round to understanding them.
It's a pity the Fold approach to this problem appears to need to be verbose.
Cheers,
Mike
On 08/12/2022 19:34, 'Pascal Jasmin' via Programming wr
st value or all of them.
Henry Rich
On 12/8/2022 3:02 PM, 'Pascal Jasmin' via Programming wrote:
> so F. is like ^:_ , but instead of ^:(while true test)^:_ , use Z: to escape
> it? There is no fixed point escape?
>
>
>
>
>
>
> On Thursday, Decembe
so F. is like ^:_ , but instead of ^:(while true test)^:_ , use Z: to escape
it? There is no fixed point escape?
On Thursday, December 8, 2022 at 02:46:01 p.m. EST, Henry Rich
wrote:
no.
Henry Rich
On 12/8/2022 2:38 PM, 'Pascal Jasmin' via Programming wrote:
> are th
are they forward or reverse?
On Thursday, December 8, 2022 at 02:25:18 p.m. EST, Henry Rich
wrote:
Pascal wrote:
> also it is not documented whether F. or F: are forward or reverse.
As indicated in
https://code.jsoftware.com/wiki/Vocabulary/fcap#Limited_vs_unlimited ,
they are not
|domain error
On Thursday, December 8, 2022 at 02:15:39 p.m. EST, 'Pascal Jasmin' via
Programming wrote:
The short circuit you are trying to avoid is to skip the full partitioning part
4 #@~.\4
one approach is to separate into the simplest possible partition, then hope
that i
The short circuit you are trying to avoid is to skip the full partitioning part
4 #@~.\4
one approach is to separate into the simplest possible partition, then hope
that i. special code finds the short circuit.
4 + (1 i.~ 4 = #@~."1) 4 ]\ ex
your power approach is completely reasonable.
A fo
┐
NB. │C│M│PDNZ│
NB. └─┴─┴┘
lfoldR=: {{ ]F..(u~) }}
state move lfoldR moves
NB. ┌─┬─┬┐
NB. │C│M│PDNZ│
NB. └─┴─┴┘
*Many thanks to you and to Raul and Henry*,
On Tue, Dec 6, 2022 at 7:56 PM 'Pascal Jasmin' via Programming <
programm...@jsoftware.com> wrote:
> To cl
To clarify,
A conjunction F.. in this case, is documented according to the same explicit
defintion: either 2 : 'u F.. v' or {{u F.. v}}
In the above explicit definitions u is left argument to F.. v is right
argument.
lfold is an adverb. Has just one left argument u. That adverb will place i
The key is rank, and dyadic rank "
u"(l, r) is u(" l r), where l and r specify the cell size of x and y for how u
will be applied.
,"_ 0 is u = , l = _ r = 0
54 48,"1 0 i.10 NB. produces same result.
u"0 means apply u to atoms
u"1 to rows at a time
u"2 to tables at a time
u"_ to whole argum
The display for that page tries to "make columnar" results of raw expression
and EVM expression. The lines are not legal J.
'*: 4' EVM NB. should work
*: 4 '*: 4' EVM NB. results in N N - syntax error.
On Saturday, December 3, 2022 at 07:14:41 a.m. EST, Richard Donovan
wrote:
I
your select function ev can be replaced with
ev =: (9 3$'A XA YA ZB XB YB ZC XC YC Z')&(4 8 3 1 5 9 7 2 6 { ~ i.)
ev 'A X'
4
On Friday, December 2, 2022 at 12:40:53 p.m. EST, Jaume
wrote:
Hello again
I managed to solve it, but I don't like it much, so feel free to educate me.
Readi
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
I like it. The video did point out useful features I would not have found on
my own. But, also don't need to be at forefront.
The landing page did give me a first impression of a very childlike retro vibe
with the colours. I quickly got used to it.
On Wednesday, November 23, 2022 at 05:
props for using { catalogue and managing a &. application in your step function.
a design principle I was aiming for is a big strength of J. What I call a
"perfect function" defined as iterative form where output is of consistent
shape/meaning as input, and where ^: can be used "separately" to
based on Raul's rosettacode link, but building an expaning list of left
truncable primes, such that further search is possible on future "iterations"
selPrime=: #~ 1&p:
ltrunc =: (] , ((1+i.9) (10 #. ,)"0 1 (10.inv))"0(,@:)(selPrime@:) each@:{:)
# &> sofar =: ltrunc^:6 < 3 7x
2 11 39 99 19
:55:41 p.m. EDT, 'Pascal Jasmin' via
Programming wrote:
}.^:(0 = f@{.)^:_
will return the list with the head being the first f not equal 0.
On Friday, October 21, 2022 at 12:19:41 p.m. EDT, Ed Gottsman
wrote:
Hi. I’m blanking on something basic and research isn’
}.^:(0 = f@{.)^:_
will return the list with the head being the first f not equal 0.
On Friday, October 21, 2022 at 12:19:41 p.m. EDT, Ed Gottsman
wrote:
Hi. I’m blanking on something basic and research isn’t helping. When the
blindingly obvious solution is revealed I will blame a
maybeton =: 0&".^:('0'&-: +. 0 -.@-: 0&".) 0&".^:('0'&-: +. 0 -.@-: 0&".)
maybeton '3 22r4'
3 11r2
maybeton '3e2 22r4 two' NB. asking too much
300 5.5 0
maybeton 'two2'
two2
On Saturday, September 10, 2022 at 02:49:30 p.m. EDT, Pawel Jakubas
wrote:
Dear J users,
What is the way
By far prefer 1st footnote format. Grouping together lets you read the
footnote and find the reference in the main related section quickly.
Colour coding of adv/conj is good. Wish it was in jqt.
Things seem to generally fit well on page. If more information/columns in some
sections would sti
,"2^:(2 < #@$) i.3 3 3 2 NB. where ]`(,"2)@. would fit your first request.
> Also interested in usage of / or folds where the accumulator rank changes over
time (especially if it continues to change after the 1st iteration).
would not be drawn to this model, but when processing a a list of ite
i'll note,
lr=: 3 : '5!:5 <''y'''
lr i.100
i.100
dyadic $ also "does nothing" until some future time.
On Sunday, July 24, 2022 at 11:17:12 a.m. EDT, Henry Rich
wrote:
For the record, i. 100 does not allocate space for 100 numbers. It
creates a virtual noun whose data is an infi
I would create a main verb that takes just y as a list of 9 numbers, where 0 is
an encoding for "unsolved cell" and return a list of 9 numbers that provides a
template to update a sequence of 9 numbers it was taken from where 0s are
updated with solved numbers or where a cell can contain a list
ore flexible.
2 3 +(/ F1) 1 2 3
3 4 5
4 5 6
On Tuesday, July 19, 2022 at 02:39:19 p.m. EDT, Henry Rich
wrote:
[:y has the important function of signaling domain error.
Henry Rich
On 7/19/2022 2:35 PM, 'Pascal Jasmin' via Programming wrote:
> I'll add that the f
the form (where ti is ` but turns
nouns into gerunds) of {{([: ti >: ti u)(`:6)}}
On Tuesday, July 19, 2022 at 12:26:47 p.m. EDT, 'Pascal Jasmin' via Programming
wrote:
some options,
if you want your adverb to always produce a verb:
1 (>:@)
>:@1
1 (>:@) 4
some options,
if you want your adverb to always produce a verb:
1 (>:@)
>:@1
1 (>:@) 4
2 NB. increment on constant of 1 (u/m parameter)
+: (>:@) 4
9 NB. increment after applying u (double) to y
if you want "polymorphism" in your adverb to return noun result or verb
depending on u or
modifiers ((A)dverbs and (C)onjunctions) can return any form of speech (N V A
C) Though only have N or V arguments.
in terms of tacit definitions for modifiers,
thendouble =: +:@: NB. adverb
For modifier there is one form of explicit definition that can be distinguished
as semi-tacit: If y
there is
,./ 2 8 $ i. 4 4
On Friday, July 1, 2022, 09:33:48 p.m. EDT, Thomas McGuire
wrote:
I was playing with the Window driver and trying to paint the toucan.bmp to the
window I created. Expanding on that I wanted to pain a panel of toucan.bmp
bitmaps to the background. Now I was
Another way to state the equivalence of @, in linear form rather than tacitly
u"v [x] v y
On Monday, June 27, 2022, 03:30:35 p.m. EDT, 'Pascal Jasmin' via Programming
wrote:
You have brought up a bug in dicitionary, that has survived to J6.02
@: has the correct a
You have brought up a bug in dicitionary, that has survived to J6.02
@: has the correct analogous quoted linear definition.
the actual equivalence is
1 2 3 ([: +/ *)"* 4 5 6
4 10 18
or,
([: u v)"v
On Monday, June 27, 2022, 08:21:47 a.m. EDT, Jacques Bailhache
wrote:
According to h
appliedto is an adverb. (happens to always return true, and select only right
hand of gerund argument)
mult is a monad that returns a gerund
Your last example is
V A V which gets parsed as (V A) V
But appliedto needs a gerund argument to not be a domain error.
(mult appliedto) is an error.
onsistent with CCA and CVC.
It's true there are multiple ways to express the same thing; there always are.
Making AC consistent with CA is interesting, but since 2-trains are inherently
asymmetric anyway (except CC), it seems less important. And changing AC
breaks compatibility, whereas add
A J approach where,
v is a monadic resource acquisition function (file open, acquire lock) with a
defined inverse whose result we normally don't care about (want the result of
u). v inv should raise an error instead of return an error code. there are 2
options for y argument to v inv :
v in
There is a more "obvious" interpretation of CVA
(CV)A is the more natural extension of uCV A. (C(VA)) would be a possibility
that is less obvious.
Your proposal can be accomplished with
CV(].A) NB. also allows CV([.A) for flexibility of A binding.
The current interpretation of AC could be ac
~~ can be used with even a tacit function. Makes u dyad only.
I want to avoid using AC hoping it gets changed, but:
1 : ' u@]~~ : u ' or simpler 1 : ' u@] : u '
The ~~ form lets dyadic u access original y as x, and any processed y as y.
On Sunday, May 1, 2022, 04:07:19 a.m. EDT, Elijah S
fold may not be the right approach
1 ( 3 2 $ 1 2 3 4 5 6)} 10 10 $ 0
On Saturday, April 23, 2022, 02:02:10 p.m. EDT, Pawel Jakubas
wrote:
Dear J enthusiast,
I try to play with fold functionality F...
and here solve more general cases, so when the accumulator structure is
different f
> (].~)@:
It is the CC train. The @: will bind to u@:v
(].~) is CA (so still part of overall CC train (CA)C is CC)
]. ignores u, and so (].~) is v~
On Thursday, April 21, 2022, 10:35:41 a.m. EDT, Michal Wallace
wrote:
Thanks, Elijah! This was very helpful.
I think I was sort of
the removing y part -semi tacit
2 : 'u@:v v ]'
I don't think there is a "modifier train" expression that would be full tacit.
On Thursday, April 21, 2022, 01:42:48 a.m. EDT, Michal Wallace
wrote:
I want to write this tacitly:
AA =: {{ (u v y) v y }}
For context, I tend to use
This approach is efficient because it is checking the "2 halves" of the 6char
list on existence in the 3 char list, instead of permuting all combinations of
3-list items.
On Friday, April 8, 2022, 10:32:51 a.m. EDT, Henry Rich
wrote:
l =. 'abc','def',:'ghi'
l
abc
def
ghi
r
want to draw attention to a bug in the jplayground using a variation of your
script
https://jsoftware.github.io/j-playground/bin/html/emj.html#code=%20foo0%3D%3A%203%20%3A%20'0'%0D%0A%20%20foo1%3D%3A%203%20%3A%20'1'%0D%0A%20%20foo2%3D%3A%203%20%3A%20'2'%0D%0A%20%20foo3%3D%3A%203%20%3A%20'3'%0D%0A
The proposed semantics (It probably would help everyone if there was a shorter
retelling of the semantics, even assuming the reader was able to skim through
most of it.)
there is a UCS-1 that is different from J's utf8? Is UCS-1 actually an update
of utf8 that has differences?
Does your propo
3 u: 8 u: 97 243 98
97 195 179 98
3 u: 10 u: 97 243 98
97 243 98
the key takeaway is that utf8 is flakey if you ever want your numbers back.
Converting utf8 (literal) to unicode or unicode4 prior to counting/appending
them with other unicode should stay sane(?)
3 u: 7 u: 8 u: 97 243 98
97
I'll remind "the world" that a dictionary implementation has been published:
https://github.com/Pascal-J/kv
I'll defend it as being the most J friendly implementation for having
functional access + manipulation features, it further has, through the kvO
adverb, the ability to J-optimize access a
Yes. Sort sorts items which are rows in this case.
if you didn't transpose, the rows would already be sorted.
On Sunday, March 13, 2022, 08:51:22 p.m. EDT, 'Skip Cave' via Programming
wrote:
Is this how sort is supposed to work?
sep=:10#.^:_1]
|:sep 120 to 130
1 1 1 1 1 1 1 1 1 1
I've provided OPENSSL bindings including miller-rabin on large numbers.
https://github.com/Pascal-J/BN-openssl-bindings-for-J
openssl is/was included in windows J distributions. And available as near
default on linux/mac afaik.
The case for libgmp may be better for "overall math" but since both
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
-
(+/ , 2 + {:)^:(i.8) 5 4
where your series is in first column.
On Saturday, March 5, 2022, 08:55:37 p.m. EST, 'Skip Cave' via Programming
wrote:
I have this series:
5 9 15 23 33
5+4
9
9+6
15
15+8
23
23+10
33
How can I use the power conjunction to generate this series?
u, Mar 3, 2022 at 3:28 PM 'Pascal Jasmin' via Programming
wrote:
> I understand your metashape and data concept to be (using my prior
> example):
>
> (3 2 2 ,: 4 1 1) $ i.16
>
> would let code know that there are 12 items in 1st array, and 4 in 2nd.
That example matches h
ould contain 35 integers.
How many integers would the meta array contain in your model?
Thanks,
--
Raul
On Thu, Mar 3, 2022 at 3:06 PM 'Pascal Jasmin' via Programming
wrote:
>
> when "subarrays" are all the same rank and there are x such items then shape
> is x
not have made the above typo if the input form for ragged shapes were boxes.
> So
>
> (3 2 2;4) as a shape does not need to care about padding, and then some other
> future meaning for table shapes could be looked into.
>
>
>
>
>
>
> On Thursday, March 3, 2022, 11:5
an "array" whose "shape's rank" is higher than 1
should represent a collection of arrays of the same rank.
--
Raul
On Thu, Mar 3, 2022 at 11:50 AM 'Pascal Jasmin' via Programming
wrote:
>
> I'm ok with the 0s, but another way to have 2 shapes (referring
1 - 100 of 1406 matches
Mail list logo