Re: [Jprogramming] FW: [Jchat] Lévy's arcsin e rule

2010-09-23 Thread Zsbán Ambrus
On Thu, Sep 23, 2010 at 2:49 AM, Marshall Lochbaum mlochb...@raleighcharterhs.org wrote: By the way, what is the (+ 0,}:) for? That makes the distribution symmetric because then the (discrete) random walk does not favour either the positive or the negative half line. Ambrus

Re: [Jprogramming] How to zoom in J ?

2010-09-23 Thread Bo Jacoby
Problem solved Thank you very much. Venlig hilsen,    Bo --- Den tors 23/9/10 skrev Wim de Lange wimdela...@gmail.com: Fra: Wim de Lange wimdela...@gmail.com Emne: Re: [Jprogramming] How to zoom in J ? Til: Programming forum programming@jsoftware.com Dato: torsdag 23. september 2010 07.53

Re: [Jprogramming] Classification problem

2010-09-23 Thread R.E. Boss
One of the more elegant solutions is ((/:(* /. ])) *) data +---+---+-+ |_3 _1 _10 _2 _4|0 0|1 1 6| +---+---+-+ R.E. Boss -Oorspronkelijk bericht- Van: programming-boun...@jsoftware.com [mailto:programming- boun...@jsoftware.com] Namens Marshall

Re: [Jprogramming] Classification problem

2010-09-23 Thread Brian Schott
I agree that this solution is elegant, but for a large data set I assume that Raul's idea of prepending and then dropping 3 elements would be more efficient. Don't you, too? (@}./.~ *) _1 0 1,data On Thu, Sep 23, 2010 at 8:26 AM, R.E. Boss r.e.b...@planet.nl wrote: One of the more elegant

Re: [Jprogramming] Classification problem

2010-09-23 Thread R.E. Boss
I agree. First comes correctness, then performance, then elegance. R.E. Boss -Oorspronkelijk bericht- Van: programming-boun...@jsoftware.com [mailto:programming- boun...@jsoftware.com] Namens Brian Schott Verzonden: donderdag 23 september 2010 14:41 Aan: Programming forum

Re: [Jprogramming] Classification problem

2010-09-23 Thread Robert Raschke
I disagree, first comes elegance and correctness, and these tend to go hand in hand if you are concentrating on elegance. I quite strongly believe a human reader is way more important than any machine. Robby On Thu, Sep 23, 2010 at 2:24 PM, R.E. Boss r.e.b...@planet.nl wrote: I agree. First

Re: [Jprogramming] Classification problem

2010-09-23 Thread Don Guinn
Without prepending all possible cases you can get unexpected short lists. For example, in the case where f=:* , if there are no zero values in the argument then the result will only contain two items instead of the expected three. The expected zero item would be missing instead of being an empty

Re: [Jprogramming] Classification problem

2010-09-23 Thread Roger Hui
Just now, checking the results of signum on edge conditions, I was intrigued to find that _1 0 1 -: *__ _. _. I assume that *__ being _1 and *_ being 1 are not surprising to you. *_. being 0 (or anything else) falls under the rubric, all bets are off when _. is involved. - Original

Re: [Jprogramming] Classification problem

2010-09-23 Thread Roger Hui
At first I was going to respond to R.E. Boss with a cute and annoying reply, something like first comes elegance, then elegance, then elegance. But I think now I agree with him, first comes correctness, then performance, then elegance, rather than first comes elegance and correctness. A

Re: [Jprogramming] Classification problem

2010-09-23 Thread Devon McCormick
I agree with you in general but sometimes elegance and correctness are foes - but that's often only because the problem is ugly - see http://www.paulgraham.com/taste.html . On Thu, Sep 23, 2010 at 9:55 AM, Robert Raschke rtrli...@googlemail.comwrote: I disagree, first comes elegance and

Re: [Jprogramming] Classification problem

2010-09-23 Thread Devon McCormick
Yes. On Thu, Sep 23, 2010 at 10:36 AM, Roger Hui rhui...@shaw.ca wrote: Just now, checking the results of signum on edge conditions, I was intrigued to find that _1 0 1 -: *__ _. _. I assume that *__ being _1 and *_ being 1 are not surprising to you. *_. being 0 (or anything else)

Re: [Jprogramming] Classification problem

2010-09-23 Thread Roger Hui
http://www.vector.org.uk/?vol=24no=3art=hui Bring Something Beautiful - Original Message - From: Devon McCormick devon...@gmail.com Date: Thursday, September 23, 2010 7:59 Subject: Re: [Jprogramming] Classification problem To: Programming forum programming@jsoftware.com I agree with

Re: [Jprogramming] Classification problem

2010-09-23 Thread Devon McCormick
I like your assumption that the Galactic Emperor would be familiar with basic APL. On Thu, Sep 23, 2010 at 11:34 AM, Roger Hui rhui...@shaw.ca wrote: http://www.vector.org.uk/?vol=24no=3art=hui Bring Something Beautiful ... -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail

[Jprogramming] J-ODBC to MySQL problems

2010-09-23 Thread christopher collins
Problem summary: J-ODBC access to MySQL DB failing Environment: Windows XP Pro SP 3(32bit) , Dell 1710 Core Duo, 2GB RAM, 32bit J602a/2008-03-03/16:45, Library 6.02.051, 32 bit MySQL 4.0.1 Overview: 1) Trying to use J ODBC to read a MySQL DB (62 tables, 6000 records in most populous table). This

[Jprogramming] erasing names with 4!:55

2010-09-23 Thread david alis
Raul Miller wrote on Tue Sep 21 04:14:37 HKT 2010 If I change =: to =. then the verb doesn't work. Why is that? Because =. assigns local names, rather than locale names. and also because erase is a tacit verb... eraseX=: 3 : 0 (y)=.1 ( 3 :' erase y') y : (y)=.1 erase y ) 'v_base_

[Jprogramming] Equilibrium index

2010-09-23 Thread Sherlock, Ric
Was solving a recent Rosetta Code task http://rosettacode.org/wiki/Equilibrium_index An equilibrium index of a sequence is an index into the sequence such that the sum of elements at lower indices is equal to the sum of elements at higher indices. My first idea was the most obvious: eq0=: +/\

Re: [Jprogramming] erasing names with 4!:55

2010-09-23 Thread Don Guinn
Isn't the real problem we are having here as given that a name is defined, where is it defined? I can determine it's type with 4!:0 so I can know if it exists, but I don't know were it is defined. Is it a local name? Is it a global name defined in the current locale? Is it defined somewhere in the

Re: [Jprogramming] erasing names with 4!:55

2010-09-23 Thread Raul Miller
On Thu, Sep 23, 2010 at 4:45 PM, Don Guinn dongu...@gmail.com wrote: I would like to say, Tell me every locale where the name 'abc' is defined. definedIn=:3 :00@(;: ::]) (#~ 4 :'y e.nl__x0 1 2 3y'y0)conl'' ) definedIn 'quote' +++-+ |jijs|jproject|z| +++-+ -- Raul

Re: [Jprogramming] erasing names with 4!:55

2010-09-23 Thread Don Guinn
Yes. There are ways. I did something like that a few years ago. I extended Ctrl-F1. If it didn't find a name in the help file then it would search for the name in locales. Then issue and edit of the name in that locale. If it appeared in multiple locales then presented a list of locales to choose

Re: [Jprogramming] Classification problem

2010-09-23 Thread Marshall Lochbaum
yes; I realized this some time after I sent my response. The problem is that the theoretical range is not known for all functions in general, so in this problem you actually have to use the properties of * . (@}./.~ f) range,data is indeed the way to do this problem. Marshall