Hi all,
The J phrases book has simple uses of colon which I can't find in the NuVoc
grammar.
Could someone help explain the grammar of the following?
Verb trains:
even=: 2: * i.
odd=: 1: + 2: * i.
These seem to work without the colons anyway. What is the grammar rule and
purpose for an integer
A single digit followed by a colon is a _constant verb_, which always
produces the same result no matter its operand. For example:
f=. 2:
f 5
2
f 7 7
2
3 f 'a'
2
So, '2: * i.' is a V V V fork, whereas '2 * i.' is an N V V fork. I guess
that the latter were not yet implemented whe
Thanks Elijah,
That's amazing, such a clear explanation!
Links and N V V update much appreciated.
Thanks again
Jon
On Tue, 19 Oct 2021 at 08:14, Elijah Stone wrote:
> A single digit followed by a colon is a _constant verb_, which always
> produces the same result no matter its operand. For ex
Wonderful news! Thank you, Ian, this is very much appreciated.
Simon
-Original Message-
From: Programming On Behalf Of Eric
Iverson
Sent: 19 October 2021 01:52
To: Programming forum
Subject: [Jprogramming] j901 (actually 903-beta-k) available from app store for
iPhone/iPad
WOW!
It i
I made a mistake in the equation in my first post..
The three terms that are multiplied are
1. x
2. floor of x = (<.x)
3. fractional part of x = (x - <.x) This is what I got wrong in my first
post.
I can get close by manual trial & error:
*x=.64.962573478*
Floor of x = <.x = 64
Fractional par
I also often use these two even & odd verbs to extract even or odd integers
from a list:
ev=.]#~0=2|]
od=.]#~2|]
]n=.?15#20
12 6 18 1 7 6 1 12 5 18 5 8 13 16 15
ev n
12 6 18 6 12 18 8 16
od n
1 7 1 5 5 13 15
Skip Cave
Cave Consulting LLC
On Tue, Oct 19, 2021 at 2:33 AM Jon Quant wrot
Ah--that is much clearer!
I am not sure of a good iterative solution, but there is a fairly simple
analytic solution.
Say we would like to find a solution with a floor of 64; that is, where 64
= <.x.
Then we have:
4002 = x * 64 * (x - 64)
= (64*x*x) + (_4096*x)
which means that:
0 = (64*
On Tue, 19 Oct 2021, Elijah Stone wrote:
The solution with a floor of k has a determinant of (k^4) + 4*k. Are
there any values for k in range such that that value is a perfect
square?
1 e. (= <.) %: (^&4 + 4&*) >:i.150
0
It appears not :/
Ah, no, I made a foolish mistake. The determin
How can I modify the standard implicit histogram verb to produce sequential
categories?
hist =:~.,:#/.~
]n=.?100#20
9 12 3 14 3 13 18 8 12 17 17 14 19 9 18 18 16 12 2 4 4 5 13 16 14 11 9 17 8
4 14 19 2 9 3 9 7 6 15 14 1 13 14 13 13 19 13 1 4 16 11 12 19 4 2 1 3 18 10
15 6 5 10 14 9 3 8 19 14 5 1
Thanks Elijah! That's what I was missing.
We could also use J's polynomial solver:
* ] 'x f' =. ; }. p. 4002 _4096 64*
*63.00755956214548803 0.99244043785451341311*
Looks good:
* 4002=64*x*f*
*1*
But only if we rely on J's comparison tolerance.
If we move to rational fractions:
* ] 'x f'
On Tue, 19 Oct 2021, Elijah Stone wrote:
0 = (64*x*x) + (_4096*x) + 4002
Another foolish mistake! It should be '- 4002', not '+ 4002'. (The
answer is still correct; but I did not correctly reproduce my workings.)
--
For in
Thank you everyone. I'm touched.
But let's be clear about what's happened. A duck has been hatched. It
doesn't fly yet and it will sink in water that's too deep. All it does is
quack. And in many ways it's an ugly little brute. But to grow it had to
break out of its shell.
All too easily I could
Hi Skip,
I would do it as follows:
hist1 =: bins ([,: _1 + #/.~@,) ]
bins =: i.@:>:@(>./)
this basically prepends the expected bins to the data, and subtracts one
(_1 +) from the count.
The definition of the bins might need to be adapted, based on your data;
now it simply take 0 - highest elemen
~. and #/.~ maintain the order of their argument.
So this is one approach:
hist=: ~. ,: #/.~
n=:?100#20
hist/:~ n
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
2 6 2 4 4 7 3 9 3 6 7 4 1 4 8 3 9 3 10 5
You can also sort the result, of course:
/:~&.|: hist n
0 1 2 3 4 5
Noun forks were implemented in J6.
Here's the page announcing them:
https://www.jsoftware.com/docs/help801/release/nvv.htm
Here's the page mentioning J6 release issues:
https://www.jsoftware.com/docs/help801/release/contents.htm
(The 801 in the url is a reference to the copy of the documentati
Sorting the result suggests this amendment to save one transpose:
shist =:|:@(/:~@~.,.#/.~)
Cheers,
Mike
Sent from my iPad
> On 19 Oct 2021, at 13:00, Raul Miller wrote:
>
> ~. and #/.~ maintain the order of their argument.
>
> So this is one approach:
>
> hist=: ~. ,: #/.~
> n=:?100#
RIP Roger, thank you for making this beautiful language. My condolences to
his family.
On Sun, Oct 17, 2021 at 12:14 PM Eric Iverson
wrote:
> Roger Hui passed away peacefully on Saturday afternoon, October 16, 2021.
>
> He had a several year struggle with cancer and was in a hospice with his
> h
Man. Meeting The Hui was one of the top items I had on my bucket list...
It approaches midnight here as I sit and contemplate the vastness of Roger's
causal ripples, ever expanding into spacetime. Listening to the recapitulations
of his peers, indeed many of these ripples sound more like monumenta
Greetings all,
I managed to setup j 9.02 on a Big Sur macos intel machine and get jconsole
and JHS running, but I've had no luck with JQT however. pacman downloaded
the binaries and I see them in the J bin directory but attempts to run JQT
don't even throw up - "you're doing it all wrong errors."
Hello,
this is not to directly answer your question, more as an aside note, but
since you said that you did not like Apple's "packaging" system, but are
apparently not willing to switch to Linux, you might be interested in
the fifty-fifty solution. There are package managers that are though fo
As Elijah pointed out, you probably are interested only in the rational
solutions, since there an infinity of real solutions, most of which are
likely to be irrational. You can even locate them. Assume you have an
integer b, such that b(b+1) > a (where a is the number you are trying to
reach –
Hi Skip and Raul,
Thanks very much for the advice. Getting much clearer now.
On Tue, 19 Oct 2021 at 08:05, Jon Quant wrote:
> Hi all,
>
> The J phrases book has simple uses of colon which I can't find in the
> NuVoc grammar.
> Could someone help explain the grammar of the following?
>
> Verb t
Oh my! It is so sad to have lost Roger. He is missed.
I offer two quips to the J community. One on his skilled programming
and the other on his being a wonderful human being with a kind sense
of humor.
Forgive me if my memories are incorrect, but here goes. I believe both
Roger and I gave papers at
I too feel very sad in Roger’s passing.
My only comment is that I have rarely met a person who was so clear, firm,
intelligent, decisive, kind and gentle all rolled into one.
And funny how that reminds me of both Ken and Roger alike.
RIP Roger, you are and will be, sorely missed but never forgot
this is not to directly answer your question, more as an aside note,
but since you said that you did not like Apple's "packaging" system,
but are apparently not willing to switch to Linux, you might be
interested in the fifty-fifty solution. There are package managers
that are though for Linu
25 matches
Mail list logo