Re: [Jprogramming] JHS - 'line1line2' 1!:2(2)

2012-08-30 Thread bob therriault
Hi david, It's been a while since I dug around JHS but I think what you are looking for is in utilh.ijs. The definition that twigged my memory was: NB. output starting with jmarka and ending with jmarkz,LF NB. is assumed to be html and is not touched jhtmlfroma=: 3 : 0 if. (jmarka-:jmarkc{.y)*.

Re: [Jprogramming] ole/excel

2012-08-30 Thread bill lam
gtkwd would not support oleautomation, wdooo would be a better solution because it can also run under jconsole. Or you may rewrite the xlopen family using wdooo. Чтв, 30 Авг 2012, William Szuch писал(а): > Using Excel 2010 with windows 7 and J64-701. > > I have loaded gtkwd and created the file

Re: [Jprogramming] JHS - 'line1line2' 1!:2(2)

2012-08-30 Thread bill lam
In the file core.ijs search for all "jfe" should give you an idea how input and output are done in jhs. Чтв, 30 Авг 2012, david alis писал(а): > (http://127.0.0.1:65001/jijs) > > In JHS the expression > 'line1line2' 1!:2(2) > returns > line1line2 > but the expression > 'line1line2' 1!:2(2) > ret

Re: [Jprogramming] Print Custom Alphabet

2012-08-30 Thread Steven Taylor
45 characters now |:1j1#}.((a.{~[+(i.25)|.~[-])98-33^96>])3&u:'e' any more optimisations possible? It might be possible to remove [ ] ~ -Steven On 30 August 2012 07:44, Steven Taylor wrote: > forgot spacing, so 51 characters. Way off the pace. > > |:1j1#}.(a.{~{.+(i.25)|.~}.)((],[-])98-33^9

Re: [Jprogramming] Print Custom Alphabet

2012-08-30 Thread Raul Miller
Rightmost [-] is just - -- Raul On Thursday, August 30, 2012, Steven Taylor wrote: > 45 characters now > > |:1j1#}.((a.{~[+(i.25)|.~[-])98-33^96>])3&u:'e' > > any more optimisations possible? It might be possible to remove [ ] ~ > > -Steven > > On 30 August 2012 07:44, Steven Taylor wrote: >

Re: [Jprogramming] Print Custom Alphabet

2012-08-30 Thread Linda Alvord
This seems to be the shortest version at the moment. |:1j1#(25{.(u:,2#65 97+/i.26)(>:@i.}.[)])"0 's' If I apply Raul's explanation to the current shortest version, why doesn't the following function work? f=: 13 :'|:1j1#(25{.x (>:@i.}.x)y)"0' f=: 13 :'|:1j1#(25{.x (>:@i.}.x)y)"0' (u:

Re: [Jprogramming] Print Custom Alphabet

2012-08-30 Thread Raul Miller
On Thu, Aug 30, 2012 at 5:05 AM, Linda Alvord wrote: > This seems to be the shortest version at the moment. > >|:1j1#(25{.(u:,2#65 97+/i.26)(>:@i.}.[)])"0 's' > > If I apply Raul's explanation to the current shortest version, why doesn't > the following function work? > >f=: 13 :'|:1j1#(25

[Jprogramming] JHS - 'line1line2' 1!:2(2)

2012-08-30 Thread david alis
(http://127.0.0.1:65001/jijs) FindInFiles shows that utilh.ijs contains jmarka=: '' and that jhs_default.ijs contains PORT=: 65001 But I haven't discovered how the socket on PORT (65001) gets to be used as the (2) in 1!:2(2). Although I do know it has nothing at all to do with the literal 'P

Re: [Jprogramming] Print Custom Alphabet

2012-08-30 Thread Steven Taylor
thanks Raul. 44 characters now. }.|:1j1#a.{~((]+(i.25)|.~-)(98-33^96>]))3&u:'s' e.g. testing, testing,. ... }.|:1j1#a.{~((]+(i.25)|.~-)(98-33^96>]))3&u:'J' k l m n o p q r s t u v w x y a b c d e f g h i }.|:1j1#a.{~((]+(i.25)|.~-)(98-33^96>]))3&u:'J' K L M N O P Q R S T U V W X Y A B

[Jprogramming] j701 jgtk install problem

2012-08-30 Thread Eric Sargeant
Following an OS upgrade, Ubuntu 10 to 12, I'm unable to reinstall jgtk. Below is the Terminal output I have. Can't see a way out of the loop. What are the required addons please? esgt@Tormance:~/Downloads$ sh j701a_linux32.sh -install Run jconsole (console front end) with: "/home/esgt/j701/bin/jco

Re: [Jprogramming] j701 jgtk install problem

2012-08-30 Thread bill lam
Not sure why your jgtk file not overwritten during installation. However if your base library is new enough, you can make a symlink to launch gtkide eg, type in terminal $ cd ~/j701/bin $ ln -s jconsole gtkide Running this gtkide will automatically bring up the gtk frontend. Чтв, 30 Авг 2012, Eri

Re: [Jprogramming] Print Custom Alphabet

2012-08-30 Thread R.E. Boss
Lose a ~ by using (-|.(i.25)+]) But your solution does not work for 'c.' }.|:1j1#a.{~((]+(i.25)|.~-)(98-33^96>]))3&u:'c.' |length error | }.|:1j1#a.{~((]+(i.25)|.~-)(98-33^96>]))3&u:'c.' R.E. Boss > -Oorspronkelijk bericht- > Van: [email protected]

Re: [Jprogramming] Print Custom Alphabet

2012-08-30 Thread R.E. Boss
Lose 1 char by replacing 98-33^96>3&u: by 64+33^'`'I.] |:1j1#}.@((i.~|.e.#])26{.a.}.~64+33^'`'I.])"0'S' T U V W X Y Z A B C D E F G H I J K L M N O P Q R Is this, together with Millers solution, the shortest with 45 characters? #'1j1#"1&|:(25{.]}.~1+i.~)&(u:,2#65 97+/i.26)"0' 45 Th

Re: [Jprogramming] Print Custom Alphabet

2012-08-30 Thread bob therriault
Actually I think the shortest is still 43 |:1j1#(25{.(u:,2#65 97+/i.26)(>:@i.}.[)])"0 's' t u v w x y z a b c d e f g h i j k l m n o p q r |:1j1#(25{.(u:,2#65 97+/i.26)(>:@i.}.[)])"0 's.' t u v w x y z a b c d e f g h i j k l m n

Re: [Jprogramming] Print Custom Alphabet

2012-08-30 Thread Eldon Eller
This fails on some, but not all, illegal inputs: |:1j1#(25{.(u:,2#65 97+/i.26)(>:@i.}.[)])"0 '5' NB. ok |:1j1#(25{.(u:,2#65 97+/i.26)(>:@i.}.[)])"0 '100' NB. gratuitous line feeds

Re: [Jprogramming] j701 jgtk install problem

2012-08-30 Thread Ric Sherlock
You could try reinstalling the ide/gtk addon using jconsole load 'pacman' 'reinstall' jpkg 'ide/gtk' On Fri, Aug 31, 2012 at 2:25 AM, bill lam wrote: > Not sure why your jgtk file not overwritten during installation. > However if your base library is new enough, you can make a symlink to >

[Jprogramming] Lint control key for J602

2012-08-30 Thread Henry Rich
In the latest J602 base library, if you have lint installed, you will get a Run menu option to run lint on the current window. Ctrl-1 is the shortcut for this action. Henry Rich -- For information about J forums see http://www

[Jprogramming] 'stop line' in debug

2012-08-30 Thread adam dunne
with f0=:3 :0 f0z0=.3+y f0z1=.2+f1 f0z0 a=.>:f0z1 +'*' ) and debug on, in stop manager with cursor on line 1, clicking 'stop line' has no effect. I thought it should stop at the line indicated by cursor. -- For information about

Re: [Jprogramming] Print Custom Alphabet

2012-08-30 Thread Steven Taylor
41 chars thanks to R.E.Boss and his 98-33^96 short-cut. }.|:1j1#a.{~(-|.(i.25)+])(98-33^96>])3&u:'j' The question on Stack Overflow doesn't mention vector input as being a requirement. On 30 August 2012 18:24, Eldon Eller wrote: > This fails on some, but not all, illegal inputs: > >|:1j1

Re: [Jprogramming] Print Custom Alphabet

2012-08-30 Thread Steven Taylor
back to 43 (ignore last post). }.|:1j1#a.{~((-|.(i.25)+])(98-33^96>]))3&u:'j' preconditions: - must be scalar - must be between A-Z and a-z On 31 August 2012 04:07, Steven Taylor wrote: > 41 chars thanks to R.E.Boss and his 98-33^96 short-cut. > > }.|:1j1#a.{~(-|.(i.25)+])(98-33^96>])3&u:'j' >

Re: [Jprogramming] 'stop line' in debug

2012-08-30 Thread Devon McCormick
What environment? I don't recognize what you're referring to by "clicking 'stop line'" but I'm strictly a command-line person. I would enter 13!:3 'f0 1' or something like that. On Thu, Aug 30, 2012 at 9:29 PM, adam dunne wrote: > with > > f0=:3 :0 > f0z0=.3+y > f0z1=.2+f1 f0z0 > a=.>:f0z1 >

[Jprogramming] stop line in debug

2012-08-30 Thread adam dunne
It's j602 with Windows XP. By clicking on 'stop Manager' in the debug toolbar you get a screen with 2 buttons:'Stop line' and 'Stop All Lines' 'Stop All Lines' works. I thought 'stop line' inserted a stop at cursor (the pgm one is stopping is in another window underneath the 2 buttons), but it d

Re: [Jprogramming] stop line in debug

2012-08-30 Thread Devon McCormick
Sorry, I'm not at all familiar with the GUI debug environment. Can you enter a command like 13!:3 'f0 1' in the immediate execution window and does it work? On Thu, Aug 30, 2012 at 11:34 PM, adam dunne wrote: > It's j602 with Windows XP. > > By clicking on 'stop Manager' in the debug toolbar

[Jprogramming] 'stop line' in debug

2012-08-30 Thread adam dunne
I've got it. I already had a stop on the function, and stop line only works for a single line;if there's already a stop on the function it does nothing. -- For information about J forums see http://www.jsoftware.com/forums.htm

[Jprogramming] emulating e. with +/ and =/

2012-08-30 Thread 김창준
Hi I'm trying to emulate e.(member in) with a combination of +/ and =/ +/ 'cd' =/ 'abcd' 0 0 1 1 +/ 'abcd' =/ 'abcd' 1 1 1 1 +/ 'ad' =/ 'abcd' 1 0 0 1 So far so good. However, when x is not an array, it gets broken: +/ 'b' =/ 'abcd' 1 What I wanted to achieve as a result was, 0 1 0

Re: [Jprogramming] emulating e. with +/ and =/

2012-08-30 Thread bob therriault
Hi June, The simplest way I can think of is to make both arguments lists using =/&, . That way if you do get an atom you make it a list and it seems to work. +/ 'cd' =/ 'abcd' 0 0 1 1 +/ 'cd' =/&, 'abcd' 0 0 1 1 +/ 'c' =/&, 'abcd' 0 0 1 0 +/ 'b' =/&, 'abcd' 0 1 0 0 Or if you would

Re: [Jprogramming] emulating e. with +/ and =/

2012-08-30 Thread Zsbán Ambrus
On 8/31/12, June Kim (김창준) wrote: > I'm trying to emulate e.(member in) with a combination of +/ and =/ > > So far so good. However, when x is not an array, it gets broken: You should swap the two arguments of (=/) and then it gets easier. See. elt =: [: +./ =/~ 'n' elt 'green' 1 'n'

Re: [Jprogramming] emulating e. with +/ and =/

2012-08-30 Thread Zsbán Ambrus
On 8/31/12, Zsbán Ambrus wrote: >elt =: [: +./ =/~ Ah, I see what you meant. This works only if the right argument is a vector so you're searching atoms. You must have meant you had trouble with the case when the right hand side argument is of different rank. Ambrus ---

Re: [Jprogramming] emulating e. with +/ and =/

2012-08-30 Thread 김창준
Yes, vectorizing with "," is what I was looking for. Thank you. On Fri, Aug 31, 2012 at 2:20 PM, bob therriault wrote: > Hi June, > > The simplest way I can think of is to make both arguments lists using =/&, > . That way if you do get an atom you make it a list and it seems to work. > > +/ 'cd'