[Jprogramming] units dimensions (gm,gm,s)

2007-10-24 Thread Frank Hamilton
Has anyone considered an application to calculate with systems of units, such as SI? I understand that it would be difficult to include in the primitives, but as an application it would be extremely useful a lot of the time. It would attract a lot of users. MathCad is a good example, but MathCad is

RE: [Jprogramming] units dimensions (gm,gm,s)

2007-10-24 Thread Stefano Lanzavecchia
> Has anyone considered an application to calculate with systems of > units, such as SI? I know you asked the question in the J Forum and you expect solutions in J, which I cannot provide. But a few years ago I bookmarked this link: http://futureboy.homeip.net/frinkdocs/ The program is good and it

Re: [Jprogramming] units dimensions (gm,gm,s)

2007-10-24 Thread Raul Miller
On 10/24/07, Frank Hamilton <[EMAIL PROTECTED]> wrote: > Has anyone considered an application to calculate with systems of > units, such as SI? Here's an attempt at tracking dimensions: units=:3 :0"0&;: assert._1-:nc y ['new unit name must have no other meaning' L1=. 'assert.0=#$0+n [''unit e

[Jprogramming] High quality graphics files (& glfile)

2007-10-24 Thread Shaw, Ewart
I'm wanting to produce screen graphics (e.g. contour plots) and also equivalent high-quality output files to include in documents & posters that are typically produced using pdfLaTeX. NB. it's easy to produce TeX text separately and overlay it on the plot. Unfortunately, files created by plot etc

Re: [Jprogramming] High quality graphics files (& glfile)

2007-10-24 Thread Devon McCormick
Mr. Shaw - you can save arbitrarily large plots by specifying (width height) when saving as a bitmap, e.g. pd 'save bmp \amisc\bigpic.bmp 2000 2000' (you do have to "pd 'show'" before saving as I just discovered.) The EMF format seems to work in J6.01 for the simple test I just did. This allo

Re: [Jprogramming] units dimensions (gm,gm,s)

2007-10-24 Thread Devon McCormick
At APL2007, from which I just returned, Guy Steele spoke about a language called "Fortress", on which they're working at Sun, that allows numbers to be specified with units attached to them. Of course this doesn't help you in J - and probably not for some time even in that language as it's still un

Re: [Jprogramming] units dimensions (gm,gm,s)

2007-10-24 Thread Raul Miller
It occurs to me that sometimes you might need to multiply or divide by dimensionless constants. dimensionless=:1 :0 '';m;i.0 ) Example use 10 dimensionless *uni 3 m 2 You might want to pick a shorter name. I did not support ^ but you could work around that for the easy cases using an expre

[Jprogramming] Bayesian inference?

2007-10-24 Thread Shaw, Ewart
[This is a belated follow-up to posts by Bill Harris & Mike Day, Aug 30th & 31st] I think Mike Day's probably right in recommending following up links between J, R & BUGS. Note also the recently published (August 2007) paperback "Bayesian Computation with R" by Jim Albert - but beware of mis

Re: [Jprogramming] Reducing table values

2007-10-24 Thread Devon McCormick
Also, (-"(1 1)<./)m On 10/23/07, Raul Miller <[EMAIL PROTECTED]> wrote: > > On 10/23/07, Arie Groeneveld <[EMAIL PROTECTED]> wrote: > > But I needed the same for columns. I didn't found it > > in the J-house, but may be I overlooked it :-) > >(-"1 <./)m > is equivalent to (-<./"1)&.|: > > -

Re: [Jprogramming] units dimensions (gm,gm,s)

2007-10-24 Thread Frank Hamilton
I thought of something. The first step is to perform all arithmetic functions given units, the second is to convert from one unit to another. So first, take 24 gm results from 4 m3 times 6 gm/m3 24 1 0 0 =4 0 3 0 * u 6 1 _3 0 The first number (24 4 6) in each list is a dimensionless multiplier,

RE: [Jprogramming] High quality graphics files (& glfile)

2007-10-24 Thread Shaw, Ewart
Many thanks. I can convert the BMP files to PNG using Paint Shop Pro, so (space willing) it's a good alternative to producing PNG directly, though I'd still prefer some form of vector graphics format. The EMF files produced by plot still look low resolution (e.g. dashed lines have individual segm

Re: [Jprogramming] Reducing table values

2007-10-24 Thread Raul Miller
On 10/24/07, Devon McCormick <[EMAIL PROTECTED]> wrote: > Also, > (-"(1 1)<./)m -"1 b. 0 1 1 1 -"(1 1) b. 0 1 1 1 -- Raul -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] units dimensions (gm,gm,s)

2007-10-24 Thread Raul Miller
Here's an updated instance of that code -- this time dealing with subtraction (thanks to Dan Bron). Note also that perhaps I should instead just define replacement operators for + - * % but this approach works: units=:3 :0"0&;: assert._1-:nc y ['new unit name must have no other meaning' L1=. 'a

Re: [Jprogramming] units dimensions (gm,gm,s)

2007-10-24 Thread neville holmes
> Date: Wed, 24 Oct 2007 09:14:37 +0200 > From: "Frank Hamilton" <[EMAIL PROTECTED]> > Subject: [Jprogramming] units dimensions (gm,gm,s) > > Has anyone considered an application to calculate with systems of > units, such as SI? I understand that it would be difficult to include > in the primitive

[Jprogramming] Current time: behaviour

2007-10-24 Thread Randy MacDonald
Can someone explain whether: 6!:0 "0<'' |rank error | 6!:0"0<'' is an accident, or on purpose? Why would the function depend on its argument? -- |\/| Randy A MacDonald | APL: If you can say it, it's done

Re: [Jprogramming] Current time: behaviour

2007-10-24 Thread Björn Helgason
6!:0 "0 '' NB. blank display 6!:0 "1 '' 2007 10 24 21 24 44.715 2007/10/24, Randy MacDonald <[EMAIL PROTECTED]>: > > Can someone explain whether: > >6!:0 "0<'' > |rank error > | 6!:0"0<'' >is an accident, or on purpose? Why would the function depend on its > argument? > > -

Re: [Jprogramming] Current time: behaviour

2007-10-24 Thread Raul Miller
On 10/24/07, Randy MacDonald <[EMAIL PROTECTED]> wrote: > Why would the function depend on its argument? To provide room for potential future enhancements. -- Raul -- For information about J forums see http://www.jsoftware.com/f

Re: [Jprogramming] units dimensions (gm,gm,s)

2007-10-24 Thread Raul Miller
On 10/24/07, neville holmes <[EMAIL PROTECTED]> wrote: > would inform design of such extension and because > there are many traps in SI units (see, for example, > ftp://ftp.comp.utas.edu.au/pub/nholmes/ca/nmrdys.pdf). When I try and read this document, the adobe reader asserts "Cannot extract the

Re: [Jprogramming] Current time: behaviour

2007-10-24 Thread Roger Hui
The argument of 6!:0 is required to be an empty vector and <'' is not an empty vector. - Original Message - From: Randy MacDonald <[EMAIL PROTECTED]> Date: Wednesday, October 24, 2007 14:18 Subject: [Jprogramming] Current time: behaviour To: Programming forum > Can someone explain whe

Re: [Jprogramming] High quality graphics files (& glfile)

2007-10-24 Thread Oleg Kobchenko
Could it be clarified what is needed - high resolution bitmap graphics (BMP, not EPS) OR - vector graphics (EPS or PDF) with fine lines ? And what exactly is jaggedness? For the fine vector graphics for example, in the Demo page Studio|Demos|plot|2D-LinePatterns set pd 'pensize 0.001' then sav

Re: [Jprogramming] Current time: behaviour

2007-10-24 Thread Dan Bron
Gosi wrote: > 6!:0 "0 '' > > NB. blank display Just to be clear, this behavior is unrelated to 6!:0 specifically. It is exhibited by all f"0 y where 0 e. $ y (whether the "0 is, to borrow a phrase, express or implied). Basically you're asking to operate on all the scalars of a

Re: [Jprogramming] Current time: behaviour

2007-10-24 Thread Dan Bron
I wrote: > It is exhibited by all f"0 y where 0 e. $ y (whether the "0 is, to > borrow a phrase, > express or implied). Basically you're asking to operate on all the scalars > of an array > which contains no scalars. For completeness, I guess I should note that 0 is not a special

RE: [Jprogramming] Current time: behaviour

2007-10-24 Thread Dan Bron
I wrote: > Further, the display, while empty, can can be > arbitrarily tall and wide, depending on the rank > of(f"0) 0 . I should have written: Further, the display, while empty, can be arbitrarily tall and wide, depending on the shape of f"0 {.,y . That is, the size of t

[Jprogramming] Re: Programming Digest, Vol 25, Issue 46

2007-10-24 Thread neville holmes
> Date: Wed, 24 Oct 2007 17:41:21 -0400 > From: "Raul Miller" <[EMAIL PROTECTED]> > Subject: Re: [Jprogramming] units dimensions (gm,gm,s) > To: "Programming forum" > > On 10/24/07, neville holmes <[EMAIL PROTECTED]> wrote: > > would inform design of such extension and because > > there are many

Re: [Jprogramming] Re: Programming Digest, Vol 25, Issue 46

2007-10-24 Thread Devon McCormick
I had the same problem but when I changed the suffix to ".ps" it loaded fine in Ghostscript (postscript reader). On 10/24/07, neville holmes <[EMAIL PROTECTED]> wrote: > > > Date: Wed, 24 Oct 2007 17:41:21 -0400 > > From: "Raul Miller" <[EMAIL PROTECTED]> > > Subject: Re: [Jprogramming] units dime

Re: [Jprogramming] units dimensions (gm,gm,s)

2007-10-24 Thread neville holmes
Sorry. That last email should have had the above subject rather than Re: Programming Digest, Vol 25, Issue 46 Neville Holmes, P.O.Box 404, Mowbray 7248, Tasmania Normal e-mail: [EMAIL PROTECTED] Sick of deleting your inbox? Yahoo!7 Mail has free unlimited storage. http://au.docs.yahoo.

Re: [Jprogramming] Re: Programming Digest, Vol 25, Issue 46

2007-10-24 Thread Raul Miller
On 10/24/07, Devon McCormick <[EMAIL PROTECTED]> wrote: > I had the same problem but when I changed the suffix to ".ps" it loaded fine > in Ghostscript (postscript reader). I downloaded a fresh copy a few minutes ago, on a different machine, and it worked fine. The machine where it worked was usi

Re: [Jprogramming] Re: Programming Digest, Vol 25, Issue 46

2007-10-24 Thread Raul Miller
On 10/24/07, Raul Miller <[EMAIL PROTECTED]> wrote: > I downloaded a fresh copy a few minutes ago, on a different machine, > and it worked fine. The machine where it worked was using adobe > reader 7.0.8. The machine where it did not work was using adobe > reader 8.0.0. Assuming the file was the