[Jprogramming] J Conference 2014 paper

2014-07-29 Thread Roger Hui
My J Conference 2014 presentation can be found at: Slides only: http://www.jsoftware.com/papers/indexof/ Slides and script: http://www.jsoftware.com/papers/indexof/indexofscript.htm -- For information about J forums see http://www

Re: [Jprogramming] recursive agenda with named components

2014-07-29 Thread 'Pascal Jasmin' via Programming
   eval =: 1 : ' a: 1 : m'     A =: 1 : (,'u')    eval2ger =: 3 : 'a=. A for_i. y do. a=. (>i) eval a ` end. a' a partial way of doing it,   (eval2ger@:((<' f.') ,~ each ]) 'increment';'result')@.choose f. ([: $: >:)`]@.(3 < |) eval2ger takes a boxed list of string expressions, and turn

Re: [Jprogramming] (no subject)

2014-07-29 Thread bill lam
IIRC about 2 decades ago, the file extension for j scripts was "js" but later java became popular and they used the same file extension. J had to give in and changed to "ijs". for debian version the first line is standardized to #!/user/bin/ijconsole Raul should have an alternate way that enable

Re: [Jprogramming] recursive agenda with named components

2014-07-29 Thread Raul Miller
This strikes me as a confusing name: increment=: [: $: >: because $: implies recursion. Also, the bounds of recursion get slippery when you start rearranging the code (and using f.). But let's take a step back and think about what you are asking for here: You have defined: increment =: [: $:

Re: [Jprogramming] (no subject)

2014-07-29 Thread Raul Miller
Note that the debian version of J uses ijconsole to avoid the conflict with jconsole. Thanks, -- Raul On Tue, Jul 29, 2014 at 4:10 PM, Ric Sherlock wrote: > If you have java installed on your system then a program called jconsole is > probably already in your path. I've taken to naming my symb

Re: [Jprogramming] Analyze an alternating series

2014-07-29 Thread Raul Miller
Taking a look at this, I'm not quite sure where you are going. However, a few observations: The first thing I notice when I try to read at2=: 13 :'([:{:"1 *.) j./"1 y' is that those parenthesis are not really necessary. We could instead go: at2=: 13 :'{:"1 *. j./"1 y' and let 13 : put in the

[Jprogramming] recursive agenda with named components

2014-07-29 Thread David Lambert
Suppose I have a recursive verb ([: $: >:)`]@.(3 < |) And I want to name the components increment =: [: $: >: result =: ] choose =: 3 < | increment`result@.choose f. 3 : '[: $: >: y' :(4 : 'x [: $: >: y')`]@.(3 < |) J carefully isolated recursion to the named verb Thus I really

Re: [Jprogramming] (no subject)

2014-07-29 Thread chris burke
It should work as described, i.e. you should be able to do: 1. link jc to jconsole (as Ric suggests) ~$ ln -s /home/chris/j64-802/bin/jconsole jc 2. define t1.sh as: #!/home/chris/jc echo +/*:0".>,.2}.ARGV exit'' 3. make t1.sh executable: ~$ chmod +x t1.sh 4. call it: ~$ ./t1.sh 3 4 25 On

Re: [Jprogramming] (no subject)

2014-07-29 Thread Don Guinn
Thanks to both you and Chris. I am able to find jconsole through both path and exporting the name "j" to start jconsole. Both work great, but getting hashbang in the j script to take the name jconsole through the path is a little tricky. Hashbang has some interesting restrictions. I had to change t

Re: [Jprogramming] (no subject)

2014-07-29 Thread Ric Sherlock
If you have java installed on your system then a program called jconsole is probably already in your path. I've taken to naming my symbolic link: jc On Wed, Jul 30, 2014 at 7:36 AM, chris burke wrote: > An alternative to renaming the J installation folder is to create a > symbolic link to jcons

Re: [Jprogramming] (no subject)

2014-07-29 Thread chris burke
An alternative to renaming the J installation folder is to create a symbolic link to jconsole, and reference that instead, e.g. ~$ ln -s j64-802/bin/jconsole ~$ ls -l jconsole lrwxrwxrwx 1 chris chris 20 Jul 29 12:31 jconsole -> j64-802/bin/jconsole Also, if you create the symbolic link on your p

Re: [Jprogramming] (no subject)

2014-07-29 Thread Don Guinn
It was not a problem getting around the minus sign problem. I simply renamed the J directory from j64-802 to j64_802 and everything worked fine. What concerned me was that the default name chosen for the 64 bit version causes hashbang to fail. It is not much of a problem, probably not worth fixing.

Re: [Jprogramming] (no subject)

2014-07-29 Thread chris burke
> Another question is how to find the link target in Linux. In windows ARGV is set to the link target, where in Linux it is set to the name of the link. In both cases, ARGV is defined as the call used to start J. If you want to find jconsole, it should be in ~install/bin. > Also, in the propertie

Re: [Jprogramming] (no subject)

2014-07-29 Thread chris burke
> Trying the example script in help/user/hashbang.htm and got the following error: This is explained in the second paragraph of that help page, i.e. "The #! line will be run as a normal J sentence so it must run without error or side effect. This is the case with #!/home/fred/j802/bin/jconsole, b

Re: [Jprogramming] J conference 2014

2014-07-29 Thread Lippu Esa
Hi everybody! Many thanks to the organizers, speakers and all the conference attendees for making it happen! The conference was informative, inspiring, well organized and even entertaining. It was nice to meet already familiar faces from 2012 and new ones too. I hope to see you next time! Esa

[Jprogramming] (no subject)

2014-07-29 Thread Don Guinn
Trying the example script in help/user/hashbang.htm and got the following error: don@ubuntu:~/j64-802-user/temp$ ./1.ijs |domain error: script | #!/home/don/j64-802/bin/jconsole |[-0] /home/don/j64-802-user/temp/./1.ijs Probably works fine for 32 bit version of J as the minus sign is not in

Re: [Jprogramming] J conference 2014

2014-07-29 Thread robert therriault
Hi Eric, Thanks again for all the work that you and Liz put into delivering a top notch event. I think that these conferences are really important, not only for the presentations (which were diverse in content and well delivered), but for the conversations that occur in the breaks between the p

[Jprogramming] Analyze an alternating series

2014-07-29 Thread Linda Alvord
As I am just heading for the airport after a delightful conference I seem to have captured a way to analyze alternating series. What do you think about this? We stayed on the 7th floor of our hotel and had a great time. f=:+/"1 f i."0 i.7 0 0 1 3 6 10 15 f i:"0 i.7 0