Here's a look from a mathematics perspective and sets:
set=: 13 :'0 = x | y'
]A=:3 set 1+i.35
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0
]B=:5 set 1+i.35
0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
A+.B
0 0 1 0 1 1 0 0 1
I would not get rid of your table made of strings. I would access it in the
form of J tables because that is what J does nicely.
Linda
-Original Message-
From: [email protected]
[mailto:[email protected]] On Behalf Of Raul Miller
Sent: Wedn
Here is my Euler 1 solution for reference. It is concise and I think it's
pretty easy to understand.
+/I.+./0=3 5 |/ i.1e3
233168
It's the same as:
sum(indices(any(zero?(remainder table
How?
Thanks,
--
Raul
On Wed, Apr 9, 2014 at 3:44 AM, Linda Alvord wrote:
> I would not get rid of your table made of strings. I would access it in
> the form of J tables because that is what J does nicely.
>
> Linda
>
> -Original Message-
> From: [email protected]
Hi all, I have two small questions:
1. How do you use variables as such:
x y $ 5
I have found many examples with actual nums such as 5 6 $ 6 and I know that
x y is a syntax error, but I'm not sure how to make it NOT a syntax error.
2. Can different types, when combined, only produce boxes? This is
1. (x,y)$5
2. J arrays are homogeneous. So, you can not combine numbers and
characters, for example. However, you can convert before combining, e.g.
'The number of seconds ',":secs. And of course you can box first before
combining: (<'Seconds: '), wrote:
> Hi all, I have two small questions:
Hi Ray
1. You are right that x y $ 5 is a syntax error so you first make x and y
into a list using , result is (x,y) $ 5 which should work.
2. You can convert numbers to characters using ":
'number of seconds: ', ": 5 NB. result of ":5 is the character '5'
Cheers, bob
On Apr 9, 2014,
You probably want:
(x,y)$5
And while boxes do enclose mismatched types, allowing them to be
combined without much thought, any function whose results are of a
compatible type can be used to combine arguments.
For example:
'The number of seconds ',":secs
Here's the documentation on ":
htt
P.S. Also note that the >> and << links are "Next" and "Previous" -
they lead to adjacent pages.
Thanks,
--
Raul
On Wed, Apr 9, 2014 at 3:21 PM, Raul Miller wrote:
> You probably want:
> (x,y)$5
>
> And while boxes do enclose mismatched types, allowing them to be
> combined without much thou
On Wed, Apr 9, 2014 at 3:20 PM, robert therriault wrote:
> Hi Ray
>
> 1. You are right that x y $ 5 is a syntax error so you first make x and y
> into a list using , result is (x,y) $ 5 which should work.
You might be wondering "why!?"
A series of numbers is automatically converted to a li
If x and y are names for scalars and you wish to use them as a list, then
(x,y) is the answer, as several here have already said.
In J, however, it's common for nouns to be non-scalar values. Whether they
can be simply joined is not something that can be answered in general. What
we can say is tha
That is right, evoke&6 deals with atomic representations (or equivalent)
not necessarily with linear representations, quoting myself:
"This is not suitable for the purposes that Pascal has in mind (that is an
ideal job for wl (104!:1)); but, apply can return any kind of words."
Word from linear (
Nice! I missed the summation part but overall this is much better.
Don Kelly
On 09/04/2014 5:06 AM, Nimp O wrote:
+./0=3 5 |/ i.1e3
--
For information about J forums see http://www.jsoftware.com/forums.htm
Your example FirstName=:;LF&,each }.0{"1 table is a string creation.
Mine ]FN2=: >"0 }.0{"1 table is a table.
If you create tables of character dat and tables of the numeric data
separately, you could transform the numeric data and then join columns to
columns or rows to rows.
More dimen
Oh, I see how you were thinking.
Actually, the code was secondary - it was only meant to illustrate the
structure of the data.
In "real life", I will not be using that code to create the segmented
strings. It'll be more involved.
Thanks,
--
Raul
On Wed, Apr 9, 2014 at 9:43 PM, Linda Alvord w
Hello, I see that J801 executable has been released last february.
Is there any plan to release the source of this version on the website or
something else ?
It would be great to add the J source to a SVN or GIT repository ?
Thanks
Some subtle differences.
I.+./0=3 5 |/i.35
0 3 5 6 9 10 12 15 18 20 21 24 25 27 30 33
(1+i.35)#~+./0=3 5 |/1+i.35
3 5 6 9 10 12 15 18 20 21 24 25 27 30 33 35
+/I.+./0=3 5 |/i.35
258
+/(1+i.35)#~+./0=3 5 |/1+ i.35
293
+/I.+./0=3 5 |/ i.100x
2.3e11
+/(1
Can you still extract tables from it rather than strings?
Linda
-Original Message-
From: [email protected]
[mailto:[email protected]] On Behalf Of Raul Miller
Sent: Wednesday, April 09, 2014 9:47 PM
To: Programming forum
Subject: Re: [Jprogra
It's the same source as j701 for the interpreter. The differences are
in the *.ijs code distributed with it (and stuff like QtCore4 which
comes from the qt project instead of jsoftware).
Probably http://www.jsoftware.com/source.htm should be updated to
reflect this state of affairs.
Thanks,
--
I do not understand your question.
Could you uncompress it a little?
Thanks,
--
Raul
On Wed, Apr 9, 2014 at 11:59 PM, Linda Alvord wrote:
> Can you still extract tables from it rather than strings?
>
> Linda
>
> -Original Message-
> From: [email protected]
> [m
20 matches
Mail list logo