Finn Idiom problems and Re: {rho} problem
Author 
Message 
Jerry Konieck #1 / 11

Finn Idiom problems and Re: {rho} problem
Quote:
>> Attempting to utilize the {rho} function yielded what Mike Cowlishaw would >> refer to as a 'suprising result'. Eg:
And that was a mangled quote, should be 'high astonishment factor'. Quote: >> {rho}'{lamp}' >> returns null! I expected a result of 1. A {quad}DR of the above indicates >> integer. > '{lamp}' is a scalar and not a vector! > '{lamp}B' is a vector > {rho},'{lamp} returns 1, as it is a vector. > The same aplies to Numbers: 1 : scalar, 1 2 : vector. > Vectornotation requires at least 2 items.
Ah, of course! And that means that Finn idiom 322 has a bug. It will fail if the string is a single character. Although it does specify that the string must be a vector, an improved version is: (M is a matrix, and S is a string) ((((1{take}{rho}M),{rho},S){take}M)^.=S){slash bar}M added comma ^ Returning the index of the rows, rather than the rows themselves: ((((1{take}{rho}M),{rho},S){take}M)^.=S)/{iota}1{take}{rho}M And idiom 94 (decimal to hex) as listed can't be trusted for values over decimal 255. A replacement posted by one of the good folk on the list in response to one of my posts; good for any decimal value is: (D is decimal) {transpose}'0123456789ABCDEF'[{quad}IO+(({ceiling}/1{ceiling}{ceiling} {+ +} 16{log}1+,D){rho}16){encode}D] Idioms 300 and 301 are the same. Idioms 299 and 662 are residual non functional junk. Olli? Will you update the Idiom list? 

Sat, 21 Jan 2006 17:58:25 GMT 


Tomas Gustafsso #2 / 11

Finn Idiom problems and Re: {rho} problem
Jerry, i am afraid Olli doesn't follow this newsgroup. Afaik, it's only me and VeliMatti. I'd advice you to write directly to the FinnAPL Webmaster (that's Olli) or similar. Check out the contact info among the pages. Regards / Tomas
Quote:
> >> Attempting to utilize the {rho} function yielded what Mike Cowlishaw would > >> refer to as a 'suprising result'. Eg: > And that was a mangled quote, should be 'high astonishment factor'. > >> {rho}'{lamp}' > >> returns null! I expected a result of 1. A {quad}DR of the above indicates > >> integer. > > '{lamp}' is a scalar and not a vector! > > '{lamp}B' is a vector > > {rho},'{lamp} returns 1, as it is a vector. > > The same aplies to Numbers: 1 : scalar, 1 2 : vector. > > Vectornotation requires at least 2 items. > Ah, of course! And that means that Finn idiom 322 has a bug. It will fail if > the string is a single character. Although it does specify that the string > must be a vector, an improved version is: > (M is a matrix, and S is a string) > ((((1{take}{rho}M),{rho},S){take}M)^.=S){slash bar}M > added comma ^ > Returning the index of the rows, rather than the rows themselves: > ((((1{take}{rho}M),{rho},S){take}M)^.=S)/{iota}1{take}{rho}M > And idiom 94 (decimal to hex) as listed can't be trusted for values over > decimal 255. A replacement posted by one of the good folk on the list > in response to one of my posts; good for any decimal value is: > (D is decimal) > {transpose}'0123456789ABCDEF'[{quad}IO+(({ceiling}/1{ceiling}{ceiling} {+ > +} 16{log}1+,D){rho}16){encode}D] > Idioms 300 and 301 are the same. > Idioms 299 and 662 are residual non functional junk. > Olli? Will you update the Idiom list? > 

Sat, 21 Jan 2006 18:31:47 GMT 


Ted Edward #3 / 11

Finn Idiom problems and Re: {rho} problem
Quote:
> >> Attempting to utilize the {rho} function yielded what Mike Cowlishaw would > >> refer to as a 'suprising result'. Eg: > And that was a mangled quote, should be 'high astonishment factor'. > >> {rho}'{lamp}' > >> returns null! I expected a result of 1. A {quad}DR of the above indicates > >> integer. > > '{lamp}' is a scalar and not a vector! > > '{lamp}B' is a vector > > {rho},'{lamp} returns 1, as it is a vector. > > The same aplies to Numbers: 1 : scalar, 1 2 : vector. > > Vectornotation requires at least 2 items. > Ah, of course! And that means that Finn idiom 322 has a bug. It will fail if > the string is a single character. Although it does specify that the string > must be a vector, an improved version is: > (M is a matrix, and S is a string) > ((((1{take}{rho}M),{rho},S){take}M)^.=S){slash bar}M > added comma ^ > Returning the index of the rows, rather than the rows themselves: > ((((1{take}{rho}M),{rho},S){take}M)^.=S)/{iota}1{take}{rho}M > And idiom 94 (decimal to hex) as listed can't be trusted for values over > decimal 255. A replacement posted by one of the good folk on the list > in response to one of my posts; good for any decimal value is: > (D is decimal) > {transpose}'0123456789ABCDEF'[{quad}IO+(({ceiling}/1{ceiling}{ceiling} {+ > +} 16{log}1+,D){rho}16){encode}D] > Idioms 300 and 301 are the same. > Idioms 299 and 662 are residual non functional junk. > Olli? Will you update the Idiom list? > 
{rho}'x' was a vector in the older APL's (e.g. APL/360). It's a scalar in APL2. Easy fix: 1/x changes scalar x to a one element vector but has no effect on any other shape. {rho}1/3 1 {rho}1/{iota}3 3 {rho}1/3 3{rho}{iota}5 3 3 {rho}1/(1 2)'abc' 2

Sun, 22 Jan 2006 00:28:50 GMT 


Uwe Janz #4 / 11

Finn Idiom problems and Re: {rho} problem
Quote: > {rho}'x' was a vector in the older APL's (e.g. APL/360). It's a scalar > in APL2.
I am sorry Ted, but (rho) x still is a vector in APL2 at least in the dialects delivered by IBM, Dyalog and APL2000 (or whatever happens to be the name right now ;)

Sun, 22 Jan 2006 07:39:15 GMT 


James L. Rya #5 / 11

Finn Idiom problems and Re: {rho} problem
In Dyalog APL, version 9 rho rho 5 0 rho rho ,5 1  James L. Ryan  TaliesinSoft

Sun, 22 Jan 2006 07:40:37 GMT 


Ted Edward #6 / 11

Finn Idiom problems and Re: {rho} problem
Quote:
> > {rho}'x' was a vector in the older APL's (e.g. APL/360). It's a scalar > > in APL2. > I am sorry Ted, but (rho) x still is a vector in APL2 > at least in the dialects delivered by IBM, Dyalog and APL2000 (or > whatever happens to be the name right now ;)
Nope. I run APL2 for OS/2: 'x' 'x' 0 the mu is the ASCII representation of {rho}. For the sake of evidence, I just cut and pasted the example. Ted

Sun, 22 Jan 2006 11:08:00 GMT 


Ted Edward #7 / 11

Finn Idiom problems and Re: {rho} problem
Quote:
> In Dyalog APL, version 9 > rho rho 5 > 0 > rho rho ,5 > 1
I think that's true in almost all APLs. The question involved a character singleton. Ted

Sun, 22 Jan 2006 11:08:02 GMT 


James L. Rya #8 / 11

Finn Idiom problems and Re: {rho} problem
On Tue, 5 Aug 2003 23:08:02 0400, Ted Edwards wrote
Quote:
>> In Dyalog APL, version 9 >> rho rho 5 >> 0 >> rho rho ,5 >> 1 > I think that's true in almost all APLs. The question involved a > character singleton. > Ted
I was curious as to how long it would take someone to note that I had commented on numeric as opposed to character arguments. Again, in Dyalog APL, version 9 rho rho 'x' 0 rho rho ,'x' 1  James L. Ryan  TaliesinSoft

Sun, 22 Jan 2006 11:57:34 GMT 


John Sulliva #9 / 11

Finn Idiom problems and Re: {rho} problem
writes Quote:
>> > {rho}'x' was a vector in the older APL's (e.g. APL/360). It's a scalar >> > in APL2. >> I am sorry Ted, but (rho) x still is a vector in APL2 >> at least in the dialects delivered by IBM, Dyalog and APL2000 (or >> whatever happens to be the name right now ;) >Nope.
Yep. Quote: > I run APL2 for OS/2: > 'x'
Ted, this result of <rho>'x' is definitely a vector. It is a null vector, i.e. a vector of length zero ... Quote: > 'x' >0
... as evidenced here. Quote: >the mu is the ASCII representation of {rho}. For the sake of evidence, >I just cut and pasted the example. >Ted
 John Sullivan Please note that any disclaimer on email to me does not apply, because I have not agreed with it. If your lawyers disagree, please ask them to study the law of contract.

Sun, 22 Jan 2006 14:49:54 GMT 


Ted Edward #10 / 11

Finn Idiom problems and Re: {rho} problem
Quote:
> >> I am sorry Ted, but (rho) x still is a vector in APL2 > Ted, this result of <rho>'x' is definitely a vector. It is a null > vector, i.e. a vector of length zero ...
Ahhh. I see where the confusion lies. Of course {rho}x is a vector. The result of {rho}x is always a vector regardless of the nature of x. The point under discussion is the nature of 'x'  a character singleton. In APL/360, it is a one element vector, i.e. {rho}'x' was ,1. In APL/2, it is a scalar i.e. {rho}'x' is {iota}0. It is the properties of the string we were concerned with. My suggestion was to replace x in the idiom with 1/x. This will convert a scalar to a one element vector without changing the structure of any nonscalar x. Ted

Mon, 23 Jan 2006 02:41:17 GMT 


Ted Edward #11 / 11

Finn Idiom problems and Re: {rho} problem
Quote:
> Again, in Dyalog APL, version 9 > rho rho 'x' > 0 > rho rho ,'x' > 1
That works fine where you can gaurantee x is a scalar or vector. {rho} {rho}1/'x' is also 1 but any structure other than a scalar is unchanged. I have found this useful in a number of cases where I wanted to avoid an empty {rho}. Ted

Mon, 23 Jan 2006 02:41:19 GMT 


