Re: [Jgeneral] RE: [Jbeta] Possible link error in Dictionary

2006-08-14 Thread Roger Hui
Do you understand the following? sum =: +/ sum1=: +/1 sum1 is defined to apply to the rank 1 cells of the argument. Now: foo=: 3 : 0 blah blah blah ) foo1=: 3 : 0 1 blah blah blah ) The pattern regarding rank is the same between sum/sum1 and foo/foo1 . What is different is that for (m :

Re: [Jgeneral] FW: tutorial

2006-09-18 Thread Roger Hui
Instead of a PowerPoint presentation, I suggest running a lab using a screen projector. That way, questions from the audience can be answered using live examples executed on the system. The following labs look suitable: A J Introduction (by Ken Iverson myself) A Taste of J (1) A Taste of J

Re: [Jgeneral] I expect a table of ordered pairs for this

2006-09-22 Thread Roger Hui
a. The monad { computes a generalized Cartesian product. For example: {0 1 2;3 4 5 6 +---+---+---+---+ |0 3|0 4|0 5|0 6| +---+---+---+---+ |1 3|1 4|1 5|1 6| +---+---+---+---+ |2 3|2 4|2 5|2 6| +---+---+---+---+ b. When using the dyad u/ to compute a function table, it can be helpful to

Re: Cell (was Re: [Jgeneral] I expect a table of ordered pairs for this)

2006-09-22 Thread Roger Hui
the rank of the verb determins the cells. This is not correct. For example, it make sense to talk about the 1-cells of a matrix (the rows of a matrix) without reference to any verb. - Original Message - From: Dan Bron [EMAIL PROTECTED] Date: Friday, September 22, 2006 10:10 am

Re: Cell (was Re: [Jgeneral] I expect a table of ordered pairs for this)

2006-09-22 Thread Roger Hui
is the left rank of u . - Original Message - From: June Kim [EMAIL PROTECTED] Date: Friday, September 22, 2006 10:42 am Subject: Re: Cell (was Re: [Jgeneral] I expect a table of ordered pairs for this) 2006/9/23, Roger Hui [EMAIL PROTECTED]: the rank of the verb determins the cells

Re: Cell (was Re: [Jgeneral] I expect a table of ordered pairs for this)

2006-09-22 Thread Roger Hui
See also the paper Rank and Uniformity http://www.jsoftware.com/papers/rank.htm -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: Cell (was Re: [Jgeneral] I expect a table of ordered pairs forthis)

2006-09-22 Thread Roger Hui
PROTECTED] Date: Friday, September 22, 2006 1:27 pm Subject: RE: Cell (was Re: [Jgeneral] I expect a table of ordered pairs forthis) On Behalf Of Roger Hui the rank of the verb determins the cells. This is not correct. For example, it make sense to talk about the 1-cells of a matrix

Re: [Jgeneral] Intrigued by the Interpreter....

2006-09-25 Thread Roger Hui
There is a rough but not direct relationship between a primitive and a test script. For example, there is a test script for each of + and +. and +: , with the script containing tests for the monad and the dyad. A test script avails itself of the full power of J so that a test which is quite

Re: [Jgeneral] specification of J

2006-09-27 Thread Roger Hui
J grammar is specified by section II of the J Dictionary, in particular section IIe, Parsing and Execution. http://www.jsoftware.com/help/dictionary/dicte.htm A sentence is evaluated in two distinct steps: - word formation (tokenization) as in the monad ;: - parsing as in section IIe -

Re: [Jgeneral] mat lab and J

2006-09-28 Thread Roger Hui
I have only a sketchy knowledge of MATLAB (and I have written 0 MATLAB programs). If I were comparing J and MATLAB, the following are areas I would investigate: - consistent treatment of arrays, especially arrays with rank 2 - adverbs and conjunctions (higher-order functions) - non-numeric data

Re: [Jgeneral] word-chasing in the docs

2006-10-02 Thread Roger Hui
Ken preferred descriptions in English over descriptions in J. But that is just my guess for the reason for the change; I don't remember the exact reason nor remember whether I knew the exact reason. - Original Message - From: bill lam [EMAIL PROTECTED] Date: Monday, October 2, 2006

Re: [Jgeneral] word-chasing in the docs

2006-10-02 Thread Roger Hui
Thanks for the feedback re the J dictionary. I have removed mention of conjunctions wrt trains. I have removed the sentence in section II G that contains the word operator. I will think of a place to put the description that operator denotes adverb or conjunction. I have removed mention

Re: [Jgeneral] J for functional programmers

2006-10-07 Thread Roger Hui
boolean / each boxed_list in APL should work as that is parsed as (boolean/) each boxed_list . It is more telling if you have to select differently in each box. Then you can not do (x0;x1;x2)/each y0;y1;y2 because it is parsed as ((x0;x1;x2)/) each y0;y1;y2 . With # this is no problem:

Re: [Jgeneral] selection expression in J

2006-11-10 Thread Roger Hui
Alternative solutions: X=: (_2 _1) |: O {2 F X -: O 4 : 'x}y'1 22 F 1 X -: (O ,.1 i.{:$O) {2 F 1 - Original Message - From: Roger Hui [EMAIL PROTECTED] Date: Friday, November 10, 2006 3:14 am Subject: Re: [Jgeneral] selection expression in J O=: 3 5 [EMAIL PROTECTED] 7

Re: [Jgeneral] Bug? Sin of pi.

2006-12-01 Thread Roger Hui
These are not bugs. - Original Message - From: Dan Bron [EMAIL PROTECTED] Date: Friday, December 1, 2006 7:30 am Subject: [Jgeneral] Bug? Sin of pi. Shouldn't the sin of pi be zero? 1 o. 1p1 1.22461e_16 This isn't a tolerance issue, because 1.22461e_16

Re: [Jgeneral] Bug? Sin of pi.

2006-12-01 Thread Roger Hui
Because 1p1 - 3.141592653589793 0 - Original Message - From: Dan Bron [EMAIL PROTECTED] Date: Friday, December 1, 2006 7:58 am Subject: Re: [Jgeneral] Bug? Sin of pi. DB 0 = 1 o. 1p1 DB 0 RH These are not bugs. Why not?

Re: [Jgeneral] Bug? Sin of pi.

2006-12-01 Thread Roger Hui
Changes in the C library? Vagaries in the CPU? Phase of the moon? - Original Message - From: Joey K Tuttle [EMAIL PROTECTED] Date: Friday, December 1, 2006 10:55 am Subject: Re: [Jgeneral] Bug? Sin of pi. At 10:32 -0800 2006/12/01, Roger Hui wrote: Because 1p1

Re: [Jgeneral] Bug? Sin of pi.

2006-12-05 Thread Roger Hui
epsilon to know when to stop. - Original Message - From: John Randall [EMAIL PROTECTED] Date: Monday, December 4, 2006 4:02 am Subject: Re: [Jgeneral] Bug? Sin of pi. Roger Hui wrote: Do you have a good estimate for how many terms are needed in the exponential series

Re: [Jgeneral] Bug? Sin of pi.

2006-12-05 Thread Roger Hui
If you only knew the stories I can tell you about the C compilers and C library functions ... - Original Message - From: Joey K Tuttle [EMAIL PROTECTED] Date: Tuesday, December 5, 2006 11:26 am Subject: Re: [Jgeneral] Bug? Sin of pi. ... Still, I believe some numerical earthquake took

Re: [Jgeneral] Bug? Sin of pi.

2006-12-06 Thread Roger Hui
I was told by a long-time user whose opinions I respect that it would be more useful to be able compute to some specified precision than to have symbolic manipulations. So, some day, Joey will be able to say in J: y=: 40 x: 2.5 y 2.5d40 ^ y 12.18249396070347343807017595116796618318

Re: [Jgeneral] exp(y). sin(y) and accuracy.

2006-12-07 Thread Roger Hui
60 decimal digits of accuracy come in handy when doing computations based on the angular difference between different sides of a proton on the opposite end of the universe. :-) - Original Message - From: Ralph G Selfridge [EMAIL PROTECTED] Date: Thursday, December 7, 2006 7:23 am

Re: [Jgeneral] exp(y). sin(y) and accuracy.

2006-12-07 Thread Roger Hui
Personally, I think that adding multiple-precision calculations to J is harmless and possibly useful idea. Roger's description suggested that to the user it would appear as just another data type, although I imagine it would be a lot of work at his end. Moving in the direction of symbolic

Re: [Jgeneral] exp(y). sin(y) and accuracy.

2006-12-08 Thread Roger Hui
Is there a typo in your description? g(x,y) is not defined. Do you mean g(n+1)=f(n,n-1)? - Original Message - From: John Randall [EMAIL PROTECTED] Date: Friday, December 8, 2006 9:56 am Subject: Re: [Jgeneral] exp(y). sin(y) and accuracy. While we are talking about numerical

Re: [Jgeneral] exp(y). sin(y) and accuracy.

2006-12-08 Thread Roger Hui
. Roger Hui wrote: Is there a typo in your description? g(x,y) is not defined. Do you mean g(n+1)=f(n,n-1)? Sorry, yes. Let f(x,y)=108-(815-1500%y)%x and let g(n+1)=f(n,n-1), with g(0)=4, g(1)=4.25. Find lim g(n) as n goes to infinity

Re: [Jgeneral] exp(y). sin(y) and accuracy.

2006-12-08 Thread Roger Hui
f=: 4 : '108-(815-1500%y)%x' g=: 3 : 'if. y e. 0 1 do. y{4 4.25 else. (g y-1) f g y-2 end.' h=: 3 : 'if. y e. 0 1 do. y{4 17r4 else. (h y-1) f h y-2 end.' g uses floating point and the analoguous h uses rational numbers. Thus: 0j18 : (g ,. h)0 i.20 4.00

Re: [Jgeneral] exp(y). sin(y) and accuracy.

2006-12-12 Thread Roger Hui
See also the essay in the J Wiki http://www.jsoftware.com/jwiki/Essays/Logarithm_and_Exponential_(Extended_Precision) - Original Message - From: John Randall [EMAIL PROTECTED] Date: Tuesday, December 12, 2006 8:49 am Subject: Re: [Jgeneral] exp(y). sin(y) and accuracy. Anyone

Re: [Jgeneral] exp(y). sin(y) and accuracy.

2006-12-12 Thread Roger Hui
The following URL is less likely to be mangled by e-mail readers: http://www.jsoftware.com/jwiki/Essays/Logarithm_and_Exponential_%28Extended_Precision%29 - Original Message - From: Roger Hui [EMAIL PROTECTED] Date: Tuesday, December 12, 2006 10:20 am Subject: Re: [Jgeneral] exp(y

Re: [Jgeneral] exp(y). sin(y) and accuracy.

2006-12-17 Thread Roger Hui
That is not what the discussion is about. The e-mail forwarded by Devon McCormick says that if sin squared plus cos squared is not quite equal to 1, then that is evidence that the floating point unit ... was malfunctioning. The example I gave demonstrated that you can have perfect values

Re: [Jgeneral] selection

2006-12-19 Thread Roger Hui
Please see http://www.jsoftware.com/help/release/iamend.htm - Original Message - From: Jacobs, Jan [EMAIL PROTECTED] Date: Tuesday, December 19, 2006 6:23 am Subject: [Jgeneral] selection Ls, How do I define a tacit function for the expression (stateNew*-.accept)+state*accept, where

Re: [Jgeneral] selection

2006-12-19 Thread Roger Hui
It would not just be ./c as the indices can be negative. And I think you overestimate the time cost for allocating and populating new storage. - Original Message - From: Miller, Raul D [EMAIL PROTECTED] Date: Tuesday, December 19, 2006 9:05 am Subject: RE: [Jgeneral] selection Roger

Re: [Jgeneral] J64 mapped files

2006-12-29 Thread Roger Hui
One problem with your expressions is that integers in J64 are 8 bytes per number. - Original Message - From: Anssi Seppälä [EMAIL PROTECTED] Date: Friday, December 29, 2006 4:28 pm Subject: [Jgeneral] J64 mapped files Testing allocating large mapped files with J64: createjmf_jmf_

Re: [Jgeneral] Domain Error - local vs. global confusion

2007-01-02 Thread Roger Hui
From http://www.jsoftware.com/help/dictionary/d310n.htm 3. ... A name assigned by =: is global, except that global assignment to a local name is not permitted. ... In testLocalGlobal, var is local, and the assignment var=: localGlobal '' would have been global and is therefore not

Re: [Jgeneral] Array-oriented proof?

2007-01-04 Thread Roger Hui
Proof sketch: 0. Working with G is equivalent to working with a matrix of indices into the ravelled values. For example: G=: 5 5 [EMAIL PROTECTED] 2e9 U=: , G H=: i.5 5 G -: H { U 1 H 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1. Since G is

Re: [Jgeneral] Array-oriented proof?

2007-01-04 Thread Roger Hui
Yes, also: cd=: /..(|.1_) - Original Message - From: Miller, Raul D [EMAIL PROTECTED] Date: Thursday, January 4, 2007 12:14 pm Subject: RE: [Jgeneral] Array-oriented proof? I'm still digesting this (using indices to make induction work seems like a great idea). That said, if I

Re: [Jgeneral] Array-oriented proof?

2007-01-04 Thread Roger Hui
cd=: (|. +/ ])@[EMAIL PROTECTED] (/., /: {./.,[EMAIL PROTECTED]) ] cd=: /..(|.1_) I should have called them diagonals instead of counter diagonals. It's /.y that gets the counter diagonals (aka oblique lines). - Original Message - From: Roger Hui [EMAIL PROTECTED] Date: Thursday

Re: [Jgeneral] Array-oriented proof?

2007-01-05 Thread Roger Hui
symmetric: (-: |:) K 0 (-: rot) K 0 - Original Message - From: Roger Hui [EMAIL PROTECTED] Date: Thursday, January 4, 2007 11:42 am Subject: Re: [Jgeneral] Array-oriented proof? Proof sketch: 0. Working with G is equivalent to working with a matrix of indices into the ravelled

Re: [Jgeneral] Thanks for Grid

2007-01-11 Thread Roger Hui
Zach Reiter, whom you met Tuesday evening at the NYCJUG, implemented a key component that made the improved grid facility possible. - Original Message - From: Dan Bron [EMAIL PROTECTED] Date: Thursday, January 11, 2007 12:26 pm Subject: [Jgeneral] Thanks for Grid To whomever is

Re: [Jgeneral] Invert max and LAPACK

2007-01-15 Thread Roger Hui
Regarding the limit on %. in J: Perhaps you should get a bigger machine? I tried the following just now on this machine, a run-of-the-mill Celeron (2.8 GHz, 512 MB): x=: 100 100 [EMAIL PROTECTED] 0 NB. random real matrix 6!:2 'y=: %. x' NB. invert it 0.0141401

Re: [Jgeneral] Invert max and LAPACK

2007-01-15 Thread Roger Hui
There is a minor time and space saving from using x [EMAIL PROTECTED] y compared to ?x$y : ts '? 1000 1000 $ 100' 0.0448292 8.38957e6 ts '1000 1000 [EMAIL PROTECTED] 100' 0.0292618 4.19526e6 More so for y which is a small power of 2, esp. for y=2 : ts '? 1000 1000 $ 2' 0.0143119

Re: [Jgeneral] Invert max and LAPACK

2007-01-15 Thread Roger Hui
In this particular cases rational numbers provide an escape: hilbert 10x 1 1r2 1r3 1r4 1r5 1r6 1r7 1r8 1r9 1r10 1r2 1r3 1r4 1r5 1r6 1r7 1r8 1r9 1r10 1r11 1r3 1r4 1r5 1r6 1r7 1r8 1r9 1r10 1r11 1r12 1r4 1r5 1r6 1r7 1r8 1r9 1r10 1r11 1r12 1r13 1r5 1r6 1r7 1r8

Re: [Jgeneral] Invert max and LAPACK

2007-01-15 Thread Roger Hui
Inverting a 50 by 50 random matrix, aka the JKT benchmark, has long been used in J. An example from my notebooks: no. 5968433 filed 17.35.28 thu 13 feb 1992 from eem to kei rhui cc dhs jkt The timing David mentioned was for Joey's benchmark on the NeXT computer. The timing I reported

Re: [Jgeneral] Lack of software abstractions

2007-01-26 Thread Roger Hui
It has not yet been done because the style of working in J is different from the style in APL in the old old days. Also because of the dustbin phenomenon previously mentioned. Anyway the following is how you can do it. To save everything, done in 3 lines: nl_z_=: 4!:1 allnames=: ; @((3 : 'nl__y

Re: [Jgeneral] Lack of software abstractions

2007-01-28 Thread Roger Hui
When the workspace is 250 MB almost certainly most of it is data (nouns). One variant could be to save just the verbs adverbs and conjunctions. You can get this by using nl__y 1 2 3 instead of nl__y i.4 . - Original Message - From: Devon McCormick [EMAIL PROTECTED] Date: Sunday,

Re: [Jgeneral] wd 'set ...' with box draw characters

2007-01-31 Thread Roger Hui
See also: http://www.jsoftware.com/jwiki/EditingGuidelines/Character_Palette_--_Box_Drawing http://www.jsoftware.com/jwiki/EditingGuidelines/Character_Palette_--_Box_Drawing/Issues - Original Message - From: John Randall [EMAIL PROTECTED] Date: Wednesday, January 31, 2007 12:04 pm

Re: [Jgeneral] large space overhead

2007-02-05 Thread Roger Hui
Yes, for arrays with the wrong size the virtual memory used can be up to 2 times the theoretical minimum. There are no plans to change this behaviour. - Original Message - From: bill lam [EMAIL PROTECTED] Date: Monday, February 5, 2007 7:40 am Subject: [Jgeneral] large space overhead

Re: [Jgeneral] large space overhead

2007-02-06 Thread Roger Hui
[It] appears that this ARGB array is not wrong size, There is more than one way for an array to be the wrong size. See: http://www.jsoftware.com/jwiki/Essays/Boolean_Array_Size - Original Message - From: bill lam [EMAIL PROTECTED] Date: Monday, February 5, 2007 11:29 pm Subject:

Re: [Jgeneral] Displaying J with Unicode Special Symbols

2007-02-06 Thread Roger Hui
Using ∑i.5 to display +/i.5 obscures the power of adverbs. +/x and */x tell you that the two operations are related. Not so Sigma x and Pi x. And what do you do for *./x (for example)? Big LCM? - Original Message - From: Don Guinn [EMAIL PROTECTED] Date: Tuesday, February 6, 2007

Re: [Jgeneral] speeding up J

2007-02-07 Thread Roger Hui
The q: algorithm in J is not the best known. (I am not a factoring expert.) It uses elliptic curves together with Miller-Rabin to test for primes. You may want to try http://www.alpertron.com.ar/ecm.htm - Original Message - From: Devon McCormick [EMAIL PROTECTED] Date: Wednesday,

Re: [Jgeneral] speeding up J

2007-02-07 Thread Roger Hui
instantaneously. - Original Message - From: Roger Hui [EMAIL PROTECTED] Date: Wednesday, February 7, 2007 9:28 am Subject: Re: [Jgeneral] speeding up J The q: algorithm in J is not the best known. (I am not a factoring expert.) It uses elliptic curves together with Miller-Rabin to test

Re: [Jgeneral] Displaying J with Unicode Special Symbols

2007-02-07 Thread Roger Hui
How is the APL {lamp} symbol an improvement over NB. as far as being more understandable/readable? - Original Message - From: Markus Triska [EMAIL PROTECTED] Date: Wednesday, February 7, 2007 11:17 am Subject: Re: [Jgeneral] Displaying J with Unicode Special Symbols Joey K Tuttle

Re: [Jgeneral] Displaying J with Unicode Special Symbols

2007-02-07 Thread Roger Hui
}. - Original Message - From: Markus Triska [EMAIL PROTECTED] Date: Wednesday, February 7, 2007 1:59 pm Subject: Re: [Jgeneral] Displaying J with Unicode Special Symbols Roger Hui [EMAIL PROTECTED] writes: How is the APL {lamp} symbol an improvement over NB. as far as being more understandable

Re: [Jgeneral] Displaying J with Unicode Special Symbols

2007-02-07 Thread Roger Hui
APL has the advantage of expressing many terms in one symbol, and it uses familiar intuitive symbols instead of new ones that need to be learnt. So tell me what is so familiar and intuitive about: {rho} {log} {base} {encode} {grade} etc. etc. I think you have to admit at least that they

Re: [Jgeneral] Displaying J with Unicode Special Symbols

2007-02-07 Thread Roger Hui
: Re: [Jgeneral] Displaying J with Unicode Special Symbols Deny my existence at your peril, Roger :-) - Original Message - From: Roger Hui [EMAIL PROTECTED] To: General forum general@jsoftware.com Sent: Wednesday, February 07, 2007 6:21 PM Subject: Re: [Jgeneral] Displaying J

Re: [Jgeneral] Shape of 1q:

2007-02-12 Thread Roger Hui
A result shape of 5 1 in that case is consistent with the specifications in the dictionary but one of ,5 is not. Also: y=: : i.5 $@(q:y). 1 2 3 4 5 6 +---+---+---+---+---+---+ |5 1|5 2|5 3|5 4|5 5|5 6| +---+---+---+---+---+---+ Making the first one ,5 instead of 5 1 would be anomalous.

Re: [Jgeneral] large space overhead

2007-02-12 Thread Roger Hui
it. The results that don't into integer magnitude domain should probably conform with usual J rules. I.e. the user is responsible to ensure that the result will stay integer. --- Roger Hui [EMAIL PROTECTED] wrote: How would [EMAIL PROTECTED] be different from just * ? What would

Re: [Jgeneral] large space overhead

2007-02-12 Thread Roger Hui
. But at the expense of speed, which should be compensated by special code. --- Roger Hui [EMAIL PROTECTED] wrote: A quick benchmark: x=: 1e6 [EMAIL PROTECTED] 0 y=: 1e6 [EMAIL PROTECTED] 1000 t=: x*y ts=: 6!:2 , 7!:[EMAIL PROTECTED] ts '.t' 0.201745 1.25836e7

Re: [Jgeneral] large space overhead

2007-02-12 Thread Roger Hui
I have looked further into the matter. y=: 1000 * 1e6 [EMAIL PROTECTED] 0 7!:2 '.y' 12583552 One expects that it should take 4 bytes per element but it takes more than 8. The problem is that .y uses an intermediate result which is float and then converts it into integers if possible,

Re: [Jgeneral] large space overhead

2007-02-12 Thread Roger Hui
Message - From: Roger Hui [EMAIL PROTECTED] Date: Monday, February 12, 2007 10:00 pm Subject: Re: [Jgeneral] large space overhead I have looked further into the matter. y=: 1000 * 1e6 [EMAIL PROTECTED] 0 7!:2 '.y' 12583552 One expects that it should take 4 bytes per element

Re: [Jgeneral] large space overhead

2007-02-13 Thread Roger Hui
: [Jgeneral] large space overhead What processor are you running Roger? I cannot get anything like that speed on a celeron 2 GHz, J601c y=: 1 * _0.5 + 1e6 [EMAIL PROTECTED] 0 ts=: 6!:2 , 7!:[EMAIL PROTECTED] ts '.y' 1.00667 1.25835e7 From: Roger Hui [EMAIL PROTECTED] Reply

Re: RE: [Jgeneral] Shape of 1q:

2007-02-17 Thread Roger Hui
bericht- Van: [EMAIL PROTECTED] [mailto:general- [EMAIL PROTECTED] Roger Hui Verzonden: dinsdag 13 februari 2007 0:28 Aan: General forum Onderwerp: Re: [Jgeneral] Shape of 1q: A result shape of 5 1 in that case is consistent with the specifications in the dictionary but one of ,5

Re: [Jgeneral] Feb 2007 issue of Dr Dobbs

2007-02-20 Thread Roger Hui
http://www.ddj.com/dept/architect/196900217 - Original Message - From: Eric Iverson [EMAIL PROTECTED] Date: Tuesday, February 20, 2007 8:07 am Subject: [Jgeneral] Feb 2007 issue of Dr Dobbs There is a backhanded compliment (longevity) to APL and J in the Feb 2007 issue of Dr.

Re: [Jgeneral] garbage (and the collection thereof)

2007-03-03 Thread Roger Hui
It depends on what is meant by garbage collection. There is definitely no memory compaction, moving stuff around so that free blocks are collected together into one contiguous block. Memory compaction does not make sense in modern virtual memory systems. As far as memory management is

Re: [Jgeneral] Feb 2007 issue of Dr Dobbs

2007-03-08 Thread Roger Hui
to Donald Knuth and Roger Hui. The final N,B and S solution uses just 9 tokens. Is it really 19 years since I wrote it? It was lots of fun. Eugene -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jgeneral] Feb 2007 issue of Dr Dobbs

2007-03-09 Thread Roger Hui
- From: ramacd [EMAIL PROTECTED] Date: Friday, March 9, 2007 11:48 am Subject: Re: [Jgeneral] Feb 2007 issue of Dr Dobbs Hi Roger; Sorry if this is a STFW but what font do I need to install to see all the APL? - Original Message - From: Roger Hui [EMAIL PROTECTED] To: General forum

Re: [Jgeneral] Feb 2007 issue of Dr Dobbs

2007-03-09 Thread Roger Hui
I would appreciate it if you can apply the same process to http://www.jsoftware.com/jwiki/EditingGuidelines/Character_Palette_--_APL and tell me what problems you run into. What is UnicAPL? - Original Message - From: Markus Triska [EMAIL PROTECTED] Date: Friday, March 9, 2007 2:41 pm

Re: [Jgeneral] Feb 2007 issue of Dr Dobbs

2007-03-10 Thread Roger Hui
: [Jgeneral] Feb 2007 issue of Dr Dobbs On 8 Mar 2007 at 21:08, Roger Hui said: The text of Life: Nasty, Brutish, and Short can be found at http://www.jsoftware.com/jwiki/Doc/Life I rather like the penultimate clause of the footnote [Ho51] explaining the source of the title

Re: [Jgeneral] definition of a:

2007-03-16 Thread Roger Hui
I started using {rho}0 to denote the empty list in APL because (a) it is shorter than 0{rho}0 (b) it does not depend on {quad}io like {iota}0 does (c) it has right type where '' does not. From APL to J {rho}0 got changed to $0. Of course strictly speaking it should be an empty list rather

Re: [Jgeneral] definition of a:

2007-03-16 Thread Roger Hui
? : ... - Original Message - From: Roger Hui [EMAIL PROTECTED] To: General forum general@jsoftware.com Sent: Friday, March 16, 2007 12:49 PM Subject: Re: [Jgeneral] definition of a: I started using {rho}0 to denote the empty list in APL because (a) it is shorter than 0

Re: [Jgeneral] definition of a:

2007-03-16 Thread Roger Hui
, the global []IO takes over if the localized one is undefined and []-[]EX'IO' gives 0. Roger Hui [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 03/16/2007 02:41 PM Please respond to General forum general@jsoftware.com To General forum general@jsoftware.com cc Subject Re: [Jgeneral

Re: [Jgeneral] John Backus Died

2007-03-19 Thread Roger Hui
Backus had a reciprocal relationship with APL. He admired it but didn't think it had gone far enough. In his FP he described an insert function which was later adopted by APL, as a better way to describe what was then called reduction in APL. I don't think this description of how

Re: [Jgeneral] John Backus Died

2007-03-20 Thread Roger Hui
a. It is true that the J Wikipedia page does not tell you directly what the functional forms are. However, the quicksort examples shows off functional programming pretty well. b. Since it is the Wikipedia, if you don't like something, why don't you do something about it? - Original

Re: [Jgeneral] Questions on Lab: A J Introduction - part 13 Permutations

2007-03-28 Thread Roger Hui
Yes, there should be a period between x and If. This is now fixed. Thanks for finding and reporting this error. Indexing is a function and like all functions the arguments are arrays. The left argument is an array of integers in the range from -n to strictly less than n; the right argument is

Re: [Jgeneral] ;: -- is the word separator parameterizable?

2007-03-28 Thread Roger Hui
For ordinary splitting, you should start with ;. rather than ;: . For example: ;._1 ' dazlious eleemosynary deipnosophist aba' +++-++---+ |dazlious|eleemosynary|deipnosophist||aba| +++-++---+ You will not find an actual

Re: [Jgeneral] optimization of array passes?

2007-03-28 Thread Roger Hui
There are optimizations but they require that you express the computation differently, in this case as +/@: . The optimizations are listed in Appendix B of the dictionary. http://www.jsoftware.com/help/dictionary/special.htm You can detect that special code is being employed by doing some

Re: [Jgeneral] Extended precision

2007-03-28 Thread Roger Hui
Your expressions all produce a 64-bit IEEE floating point number first, and then converted it into extended precision. To avoid that, append an x to the string before executing it: . 'x',~ 50#'1' 11 . 'x',~ 50#'2'

Re: [Jgeneral] J for C Programmers - atoms versus degenerate arrays

2007-04-01 Thread Roger Hui
Some languages and at least one (old) version of APL identify atoms with 1-element vectors. This treatment has consequences such as muddling the treatment of unit axes. An example demonstrates what I mean: If i is an array of integers and m is a matrix, then i{m has shape ($i),(}.$m). m=:

Re: [Jgeneral] J for C Programmers - the frame, concatenated with the shape of the cells is not equal to the shape of the noun.

2007-04-01 Thread Roger Hui
I think you misunderstand the second example. It says: The four 5x6 2-cells are arranged as a vector of 2-cells; this is the meaning of their frame. Each of the 2-cells (rank 2) cells has shape 5 6. The frame is ,4 . The frame catenated with the cell shape is (,4) catenated with 5 6, or 4 5

Re: [Jgeneral] J for C programmers editorial corrections

2007-04-04 Thread Roger Hui
a. In J noun is a synonym for array. A statement such as every noun is an array is misleading as it leaves open the possibility that there are some arrays which are not nouns, like saying every man is an animal. b. The proposed use of dimension to denote the rank of an array and also a

Re: [Jgeneral] J for C Programmers - Controlling Verb Execution BySpecifying a Rank - please flesh out discussion - my attempt issupplied

2007-04-04 Thread Roger Hui
It doesn't take a scholarly knowledge of J to know that two different arrays can have the same display: 2+3 4 5 5 6 7 '5 6 7' 5 6 7 ,:'5 6 7' 5 6 7 - Original Message - From: Terrence Brannon [EMAIL PROTECTED] Date: Wednesday, April 4, 2007 2:30 pm Subject: Re: [Jgeneral] J

Re: [Jgeneral] Need a word for a non-atomic array

2007-04-04 Thread Roger Hui
Some non-mathematician friends once asked me why 1 isn't a prime. The answer I gave, off the top of my head, is that it makes many statements shorter, else you'd saying lots of times, for every prime 1 or for every prime other than 1. It is now years later, and I have had lots of time to think

Re: [Jgeneral] A couple of doc errors

2007-04-04 Thread Roger Hui
help\dictionary\dsco.htm: Symbols are a new data type... I guess that was true at one time, but they're not new any more. OK. - Original Message - From: Henry Rich [EMAIL PROTECTED] Date: Wednesday, April 4, 2007 4:07 pm Subject: [Jgeneral] A couple of doc errors While I was

Re: [Jgeneral] Need a word for a non-atomic array

2007-04-04 Thread Roger Hui
In what ways are atoms degenerate or improper? - Original Message - From: Oleg Kobchenko [EMAIL PROTECTED] Date: Wednesday, April 4, 2007 4:22 pm Subject: Re: [Jgeneral] Need a word for a non-atomic array There is no such thing as two-demensional atomic arrays. All arrays with

Re: [Jgeneral] Need a word for a non-atomic array

2007-04-04 Thread Roger Hui
You can finesse it by focussing on items instead of saying list of items. Talking about list of items has other potential problems when the number of items is 0. The dictionary says this in section II a http://www.jsoftware.com/help/dictionary/dicta.htm A cell of rank one less than the

Re: [Jgeneral] Need a word for a non-atomic array

2007-04-04 Thread Roger Hui
/4/07, Roger Hui [EMAIL PROTECTED] wrote: In what ways are atoms degenerate or improper? -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jgeneral] Need a word for a non-atomic array

2007-04-05 Thread Roger Hui
The J dictionary uses atom and scalar synonymously, much like verb and function, and does not distinguish atom and scalar in the way described in the appended msg. Section II A http://www.jsoftware.com/help/dictionary/dicta.htm says: Arrays of ranks 0, 1, and 2 are also called _atom_,

Re: [Jgeneral] fleshing out the operation of negative verb rank

2007-04-05 Thread Roger Hui
There is an executable model (algorithmic description) of the rank conjunction in my APL95 paper Rank and Uniformity. http://www.jsoftware.com/papers/rank.htm - Original Message - From: Terrence Brannon [EMAIL PROTECTED] Date: Thursday, April 5, 2007 8:42 am Subject: [Jgeneral]

[Jgeneral] Rank

2007-04-05 Thread Roger Hui
Rank is used in APL/J to denote the number of atoms in the shape of a noun. It made its first published appearance in Ken Iverson's A Programming Language, 1962. Section 1.20, Levels of Structure, says: Vectors and matrices are arrays which exhibit one level and two levels of structure,

Re: [Jgeneral] fleshing out the operation of negative verb rank

2007-04-05 Thread Roger Hui
cells array of boxed cells etc. - Original Message - From: Raul Miller [EMAIL PROTECTED] Date: Thursday, April 5, 2007 10:59 am Subject: Re: [Jgeneral] fleshing out the operation of negative verb rank On 4/5/07, Roger Hui [EMAIL PROTECTED] wrote: There is an executable model

Re: [Jgeneral] Need a word for a non-atomic array

2007-04-05 Thread Roger Hui
x=: 1 1 1$5 x 5 $ x 1 1 1 It can show the shape of an array just fine. - Original Message - From: bill lam [EMAIL PROTECTED] Date: Thursday, April 5, 2007 9:30 pm Subject: Re: [Jgeneral] Need a word for a non-atomic array Mark D. Niemiec wrote: 'x' and 42 and a: are all

Re: [Jgeneral] Executive Overview of J - Arrays as the most viable data structure

2007-04-06 Thread Roger Hui
If you are interested in the history of ideas in J, you can read some of papers in http://www.jsoftware.com/jwiki/Essays/Bibliography In particular, Falkoff and Iverson, The Design of APL, 1973. Falkoff and Iverson, The Evolution of APL, 1978. Iverson, A Personal View of APL, 1991. The last

Re: [Jgeneral] Decision in definition of ^:(m)

2007-04-09 Thread Roger Hui
For examples of f^:(n), see: http://www.jsoftware.com/jwiki/Essays/Text_Formatting http://www.jsoftware.com/jwiki/Essays/Non-Overlapping_Substrings http://www.jsoftware.com/jwiki/Essays/Collatz_Conjecture http://www.jsoftware.com/jwiki/Essays/Continued_Fractions - Original Message -

Re: [Jgeneral] J for C Programmers - verb rank independent of noun shape

2007-04-13 Thread Roger Hui
It is not some deep mysterious concept. For example: sumvector=: 3 : 0 z=. 0 for_i. i.#y do. z=. z+i{y end. z ) I have written verb sumvector that finds the sum of a vector: sumvector 1 2 3 4 5 15 Now suppose I want to find the sums of a bunch of vectors: x=: 2 3 7 [EMAIL PROTECTED]

Re: RE: [Jgeneral] Is EVOKE (~) an adverb ?

2007-04-15 Thread Roger Hui
Judging by http://www.jsoftware.com/help/dictionary/partsofspeech.htm EVOKE on the vocabulary page should be in mixed-case bold italic. - Original Message - From: Henry Rich [EMAIL PROTECTED] Date: Sunday, April 15, 2007 10:33 am Subject: RE: [Jgeneral] Is EVOKE (~) an adverb ? ~ is

Re: [Jgeneral] J for C Programmers - asymmetry / control /data discussed without definition?

2007-04-17 Thread Roger Hui
What are some reasons for your assertion? - Original Message - From: bill lam [EMAIL PROTECTED] Date: Tuesday, April 17, 2007 3:21 am Subject: Re: [Jgeneral] J for C Programmers - asymmetry / control /data discussed without definition? Roger Hui wrote: However, if a verb

Re: [Jgeneral] J for C Programmers - asymmetry / control /datadiscussed without definition?

2007-04-17 Thread Roger Hui
I basically agree with this point. On these grounds, ! is the wrong way round: you are more likely to calculate x ! y for fixed y than fixed x. What are some examples of fixing an argument of ! ? The only non-trivial one I am aware of is 2! = +/@i. - Original Message - From:

Re: [Jgeneral] How are isolated pair-wise actions accumulated into a return value

2007-04-19 Thread Roger Hui
Bill Lam's analysis was correct. For a dyad, once you have figured out the frame and cells, it remains to apply something to corresponding cells, and with respect to that dyad that something is a black box. You have figured out that the cells are 1 0 1 0 0 0 and 3 1 4 1 5 9. (Since the left

Re: [Jgeneral] a brief insight - why the verb '{' has zero left rank and infinite right rank

2007-04-23 Thread Roger Hui
There was a debate in I.P. Sharp Associates on the left rank of { , in 1987, prior to the existence of J. The outcome hinged on the fact (expressed by Ken Iverson) that left rank 0 permits more sensible index arrays (arrays of indices). With left rank 1 an index array would have an extra

Re: [Jgeneral] zero

2007-04-23 Thread Roger Hui
, apply the existing minus_zero eradicator to every array. - Original Message - From: Dan Bron [EMAIL PROTECTED] Date: Monday, April 23, 2007 10:29 am Subject: Re: [Jgeneral] zero RM = Raul Miller, DB = me, RH = Roger Hui DB %floating_zero DB_ RM

Re: [Jgeneral] zero

2007-04-23 Thread Roger Hui
The interpreter knows what arrays it has; The interpreter can not do anything without allocating memory; The interpreter allocates memory in a single place; In the single place, apply the existing minus_zero eradicator to every array. a. It doesn't just eradicate minus_zero in memory that

Re: [Jgeneral] zero

2007-04-23 Thread Roger Hui
What can you do in that time? In J, nothing. That time is not the time from one user entry to the next, not even the time from the invocation of one user-defined entity to the next, but from one allocation of memory to the next. I can also use part of my one hour to disable all 15!:x foreigns.

  1   2   3   4   >