I have only worked on part 1 so far.
All my verbs are monadic and take the number in question as its argument.
evenQ =. = <.&.-:
size =. (+evenQ)@>.@%: NB. edge length
border =. size-&*:_2+size NB. border length (number)
lowest =. 1 _3 4& p. @ -:@<:@size NB. b
> On Dec 3, 2017, at 10:40 AM, Andrew Dabrowski wrote:
>
> 2. Is anyone bothered by the lack of a built-in associative list structure?
There have been a few times so far that I have thought I needed this, but so
far I have found another approach that works better.
In one case, I instead jus
> On Dec 3, 2017, at 7:01 PM, Jimmy Gauvin wrote:
>
> has anybody found something better than a "do. while." to calculate the
> spiral neighborhood count?
Amusingly, someone made a video about a cool trick for doing this in J, it's
about 1/3rd of y'all's Youtube presence:
https://www.youtub
Eugene McDonnell (worked very closely with Ken Iverson) wrote a wonderful book
“At Play With J”, available here;
http://code.jsoftware.com/wiki/At_Play_With_J
In which the chapter on “volutes” offers a tacit derivation of a non looping
alternative to WRAP. An involute counts from outside in to
J symbol datatype already associated with hash, can an efficient dictionary
be implemented with that together with J scripts? Perhaps with some
extension to s:
On Dec 4, 2017 10:49 AM, "Henry Rich" wrote:
> Yeah, I found it, but it wouldn't be applicable here because it
> implemented a fixed-si
Hi,
for part 1, I used the properties of the spiral pattern to find the
distance.
The spiral matrix can be viewed as a series of concentric rings with the
last number of a ring being a perfect square.
Calculating the ring number gives me one part of the distance.
Finding the distance to the neares
Yeah, I found it, but it wouldn't be applicable here because it
implemented a fixed-size hashtable and kept only the most recent entries
(it was used as a lookaside buffer to speed negascout searches).
A simple hashtable wouldn't be hard to implement, methinks.
Henry Rich
On 12/3/2017 8:18 PM
Hi Jimmy - I'm also working with WRAP from the phrases. I messed around
with trying to understand https://oeis.org/A054552 but it seemed more
complicated than I wanted to undertake. Here's my exploration of my
solution for part 1
I'm using this currently to locate the x/y coordinate (probably a b
This is the hashmap implementation I wrote a while ago, using separate
chaining, and using J's OO functionality. Bear in mind I am not a J expert, and
when I wrote this I knew even less J.
I am pretty sure others have written better implementations, but anyway, this
may be useful as a reference
Hi,
has anybody found something better than a "do. while." to calculate the
spiral neighborhood count?
Is there some underlying mathematical structure that I am not aware of?
Thanks,
WRAP is from http://www.jsoftware.com/help/phrases/grids.htm
spw is the result of the neighbor calculation
Can you locate your code?
On 12/03/2017 06:52 PM, Henry Rich wrote:
Yes; I've done that before. It might be worth seeing how well we
could make such an addon perform before making changes to the JE.
Henry Rich
On 12/3/2017 6:47 PM, bill lam wrote:
Can this be implemented using j script add
Yes; I've done that before. It might be worth seeing how well we could
make such an addon perform before making changes to the JE.
Henry Rich
On 12/3/2017 6:47 PM, bill lam wrote:
Can this be implemented using j script addon?
On Dec 4, 2017 5:26 AM, "Henry Rich" wrote:
Perhaps we shouldn'
Can this be implemented using j script addon?
On Dec 4, 2017 5:26 AM, "Henry Rich" wrote:
> Perhaps we shouldn't try to make a full datatype for associative arrays,
> but just a set of functions (foreigns, or (m h.) ) that do what's needed.
>
> We would need to decide what's needed.
>
> hashtabl
Perhaps we shouldn't try to make a full datatype for associative arrays,
but just a set of functions (foreigns, or (m h.) ) that do what's needed.
We would need to decide what's needed.
hashtable =: keys create values
indexes =: hashtable lookup keys (like i.)
values =: hashtable fetch indexes
The associative lists that Andrew is talking about (also called maps or
dictionaries) are essentially the same as JSON objects (more precisely,
JSON objects are maps whose keys are strings). There's no need for them
to be used in a particularly low-level way, although the primitives used
to manipul
I would use the word "value" rather than "variable" here
A=: 1 2 3
A=: 1 3
References to A will pick up whichever value is current at the time of
reference. You make a new value and assign it to the same variable.
I understand that some languages do things a bit different, where
depending on the
See http://code.jsoftware.com/wiki/Jd/License#License
On Sun, Dec 3, 2017 at 1:55 PM, Ron Petersen
wrote:
> how do i get a copy of JD for my iMac or do i need a other type computer?
>
> On Sat, Dec 2, 2017 at 2:15 PM, Scott Locklin wrote:
>
> > On 11/28/2017 3:59 PM, Andrew Dabrowski wrote:
> >
Hi all!
This touches one of the most interesting aspects of J.
Variables in J are normally non-mutable in the sense that they can not
be modified in-place.
You can not set variable A to 1 2 3 and then change it to 1 3 without
creating a new variable, but one which might have the same name.
This
how do i get a copy of JD for my iMac or do i need a other type computer?
On Sat, Dec 2, 2017 at 2:15 PM, Scott Locklin wrote:
> On 11/28/2017 3:59 PM, Andrew Dabrowski wrote:
> > Do you loveJ most because of (pick only one)
>
> Background: applied math/numerics guy.
>
> I've worked around big d
<<< means "box three times"
<2
┌─┐
│2│
└─┘
<<2
┌───┐
│┌─┐│
││2││
│└─┘│
└───┘
<<<2
┌─┐
│┌───┐│
││┌─┐││
│││2│││
││└─┘││
│└───┘│
└─┘
See also the documentation on the index operation (Henry gave you a
reference for that).
Also, as I understand it, JSON has only a loose relationship
1.
http://code.jsoftware.com/wiki/Vocabulary/curlylf#Complementary_Indexing_and_Omitted_Axes
Henry Rich
On 12/3/2017 1:24 PM, Andrew Dabrowski wrote:
1. Yes, I should been more specific: I wanted to know the idiomatic
way to delete the nth item of a list, so I think <<< is what I was
looking
1. see Raul's response
2. Yes, I am bothered, a little. When you have something like a symbol
table or a position table in a game solver, where you have to do lots of
individual insertions and lookups, you might have to write a hashing
object. That has come up often enough for us to have pu
1. Yes, I should been more specific: I wanted to know the idiomatic way
to delete the nth item of a list, so I think <<< is what I was looking for.
What is <<< called and where is it documented?
2. Not sure what you mean by "Their focus is on micromanaging the
sequence of operations." A-lists
Why do you want to delete an item from a list? This is *not* a
rhetorical question - we have a variety of ways of removing items from
lists and to pick the correct mechanism we need to understand what you
are trying to accomplish.
To illustrate, here are a few examples:
list=: 2 3 4 5 7 8 9 10
1. What's the idiomatic way to delete an item from a list? This doesn't
seem to come up in Learning J. For that matter, what's a good reference
for list slicing ops in J?
2. Is anyone bothered by the lack of a built-in associative list
structure? There are at least two different implementat
Note also that right rank does have significance here:
$(+"_ 1 2/~)i. 3 5 5
3 5 3 5 5
$(+"_ 1 3/~)i. 3 5 5
|length error
(In other words, remember that the definition of u always matters.)
Thanks,
--
Raul
On Sun, Dec 3, 2017 at 9:06 AM, Joe Bogner wrote:
> Thanks for the suggestion to
I appreciate it. I thought so - but wanted to confirm.
NuVoc pages are excellent and go a long way at explaining it. Like many
complicated topics, for me at least, its helpful to see it from different
angles -- including NuVoc, the dictionary, the various J books and texts,
the wikipedia page on r
If you look at the ranks on the NuVoc main page, or at the start of the
page for fork or hook, you will see that the ranks for both are all
infinite.
Verb rank is one of the most important concepts in J, and one of the
hardest to explain clearly. NuVoc has several pages devoted to it, as
you
Thanks for the suggestion to reread and dig into / . I reread the docs and
they are clear now. The bits that stick out to me that are relevant to my
problem:
"1. If the rank of u is not 0, it doesn't produce a table"[1]
This seems to be a reference to "u/ y is equivalent to x u"(lu,_) y where
lu
Did you try the non-avx install, mentioned on the second line of that wiki page?
Thanks,
--
Raul
On Sun, Dec 3, 2017 at 5:36 AM, TongKe Xue wrote:
> Hi,
>
> I'm following the instructions at:
>
> http://code.jsoftware.com/wiki/System/Installation/Linux
>
> I run into the following issue
Hi,
I'm following the instructions at:
http://code.jsoftware.com/wiki/System/Installation/Linux
I run into the following issue:
sudo dpkg -i j806_amd64.deb ; echo "===" ; /usr/bin/ijconsole ; echo
"==="; uname -a
(Reading database ... 88939 files and directories currently installed.)
Pr
31 matches
Mail list logo