Re: [Jprogramming] How best to preserve continuity between successive calls of jconsole?

2015-11-09 Thread Joe Bogner
Hi Ian, Have you looked at the clientserver addon? http://jsoftware.com/wsvn/addons/trunk/net/clientserver/jssc.ijs You could run the server as the daemon and then make client calls using NSTask presumably by invoking jconsole with the jssc client to make calls to the server You mentioned wantin

Re: [Jprogramming] How best to preserve continuity between successive calls of jconsole?

2015-11-09 Thread Ian Clark
That's exactly what I'm going to do, @Don. It's the "silly solution" I proposed in my original post, but after a few trials, I've decided it's not so silly after all. There will only be one call of jconsole needed following each user interaction with my proposed Xcode-written top-end. Not one per

Re: [Jprogramming] invoking object verbs without polluting global namespace

2015-11-09 Thread Joe Bogner
Thanks bill, this help clear things up. I posted a draft of a proof of concept jtable helper / dsl http://code.jsoftware.com/wiki/User:Joe_Bogner/JTable On Mon, Nov 9, 2015 at 10:31 AM, bill lam wrote: > Actaully it switches back if the verb is named (not necessarily > explicit). eg. define a

Re: [Jprogramming] How best to preserve continuity between successive calls of jconsole?

2015-11-09 Thread Don Guinn
You could write out pertinent data to a file before ending the J session to read back in when you run jconsole again. On Mon, Nov 9, 2015 at 1:20 PM, Ian Clark wrote: > > You should think of each terminal command line as simulating a separate > run of the program you are modeling. > > That is my

Re: [Jprogramming] MacOS 10.7.5 and later users: a question

2015-11-09 Thread Henry Rich
What is failing is glqpixels. I read the entire window for scrolling purposes. glqpixels audits to ensure that the region being read fits in the control. My region is correct, but on the MacOS the glqpixels fails. (It works on Windows, and I have looked at the parameters to glqpixels on the

Re: [Jprogramming] How best to preserve continuity between successive calls of jconsole?

2015-11-09 Thread Ian Clark
> You should think of each terminal command line as simulating a separate run > of the program you are modeling. That is my understanding too. Therefore I guess the only way I can communicate sensibly via Terminal with a daemon listening on a port is via something like netcat. As per your example

Re: [Jprogramming] How best to preserve continuity between successive calls of jconsole?

2015-11-09 Thread Raul Miller
On Mon, Nov 9, 2015 at 3:04 PM, Ian Clark wrote: > However I don't yet know how to converse via NSTask with a daemon > through a port. I need to find a tame daemon that will talk to me > nicely via Mac Terminal, which I can then try to handle via NSTask. > Then I'll feel more confident about conve

Re: [Jprogramming] How best to preserve continuity between successive calls of jconsole?

2015-11-09 Thread Ian Clark
Thanks Raul. I've already started on adapting sample code using NSTask and NSPipe. But I wouldn't say it holds no mysteries for me. There's console commands I can execute in Terminal which I can't get to work (yet) with NSTask. I'm going to make sure I can call jconsole in one-shot mode with it. B

Re: [Jprogramming] invoking object verbs without polluting global namespace

2015-11-09 Thread 'Pascal Jasmin' via Programming
with this def add_tbl_ =: ( 3 : 'coname [ data =: data + y') : (4 : 'coname [ data =: x + y ') t =. conew 'tbl' there is the string building approach ( To: programm...@jsoftware.com Cc: Sent: Monday, November 9, 2015 9:22 AM Subject: Re: [Jprogramming] invoking object verbs without

Re: [Jprogramming] How best to preserve continuity between successive calls of jconsole?

2015-11-09 Thread Raul Miller
Hmm... I have not worked with NSTask, but skimming over the documentation on it, it looks like it already does most of what you need, and that you should have little problem using it with J. Basically, I expect you'll want J's standard input (and probably standard output) to (each) be an NSPipe w

Re: [Jprogramming] How best to preserve continuity between successive calls of jconsole?

2015-11-09 Thread Ian Clark
@Raul - your example is close, but not quite what I'm hoping for. I can't see yet how to adapt a technique which effectively emulates a pair of linked telex machines. Eventually I don't want to converse with the jconsole daemon using Mac Terminal, but using the NSTask object provided by Objective

Re: [Jprogramming] Quadratic formula

2015-11-09 Thread Jose Mario Quintana
Tacitly... (A=. 0&{) (B=. 1&{) (C=. 2&{) 0&{ 1&{ 2&{ qr=. (-@:B + (+ , -) @:%:@:(*:@:B - 4 * A * C)) % 2 * A quad=. qr`('Not quadratic'"_)@.(0 -: A) f. quad 2 _8 6 3 1 quad 0 _8 6 Not quadratic On Mon, Nov 9, 2015 at 2:26 AM, Don Kelly wrote: > If you assume the form is ax^2 +

Re: [Jprogramming] invoking object verbs without polluting global namespace

2015-11-09 Thread Joe Bogner
On Mon, Nov 9, 2015 at 11:21 AM, Raul Miller wrote: >> I typically use & to bind parameters. & cannot be used on cocurrent >> because it's monadic, is that the correct interpretation? > > Basically, yes. > >1: : 2: &3 '' > 2 > > You'll get the dyadic definition of cocurrent, which is empty. >

Re: [Jprogramming] cocurrent in explicit train crashes

2015-11-09 Thread Raul Miller
"It" being the & derived verb. In other words, this also does not crash J: cocurrent^:0 '' But this does: cocurrent&'' 0 So I expect that &'s implementation of ^:0 is interacting badly with 18!:4. It would be fun to track down exactly why this is happening... Thanks, -- Raul On Mon,

Re: [Jprogramming] cocurrent in explicit train crashes

2015-11-09 Thread 'Pascal Jasmin' via Programming
crash would not happen if this was the definiton cocurrent_z_ =: 18!:4@boxxopen : [: problem is just that its being called dyadically. - Original Message - From: bill lam To: Programming forum Cc: Sent: Monday, November 9, 2015 8:39 AM Subject: Re: [Jprogramming] cocurrent in expl

Re: [Jprogramming] invoking object verbs without polluting global namespace

2015-11-09 Thread 'Pascal Jasmin' via Programming
your sb verb would fail even if add was magically found in the tbl locale (ie, you'd have to call sb_base_) cocurrent happens to be a local call when called within a function. its why inl works well. the call add_tbl_ automatically swithes the current locale while the verb add is running. But

Re: [Jprogramming] cocurrent in explicit train crashes

2015-11-09 Thread 'Pascal Jasmin' via Programming
crashes in j802 as well, but you meant to do this probably. 3 + (][ [: cocurrent 'base'"_) i.10 - Original Message - From: Joe Bogner To: programm...@jsoftware.com Cc: Sent: Monday, November 9, 2015 8:02 AM Subject: [Jprogramming] cocurrent in explicit train crashes I didn't send th

Re: [Jprogramming] invoking object verbs without polluting global namespace

2015-11-09 Thread Raul Miller
On Mon, Nov 9, 2015 at 10:10 AM, Joe Bogner wrote: > If I type cocurrent 'base' , I would assume cocurrent is the > currently executing named verb and it switched to base after the end > of cocurrent > > Given that understanding, why would it switch back at the end of the > explicit definition? I

Re: [Jprogramming] interactive scatterplot

2015-11-09 Thread Joe Bogner
Glad to hear. <1> is used by canvas_header in jzplot.ijs as a placeholder to insert text canvas_header=: 3 : 0 r=. ('80';(pfmt 0{Pxywh);'40';(pfmt 1{Pxywh)) stringreplace canvas_template r=. ('<1>';IFJHS{::'';'') stringreplace canvas_template ) On Mon, Nov 9, 2015 at 9:47 AM, Devon McCormick wr

Re: [Jprogramming] invoking object verbs without polluting global namespace

2015-11-09 Thread bill lam
Actaully it switches back if the verb is named (not necessarily explicit). eg. define a script (say a1.ijs) with 3 lines cocurrent 'a1' smoutput coname'' '' and try the followings. 0!:0 <'a1.ijs' coname '' and start a new session lod=: 0!:0 lod <'a1.ijs' coname '' incidentally, l

Re: [Jprogramming] invoking object verbs without polluting global namespace

2015-11-09 Thread Joe Bogner
On Mon, Nov 9, 2015 at 9:34 AM, Raul Miller wrote: > On Mon, Nov 9, 2015 at 8:22 AM, Joe Bogner wrote: >> Thank you. I had this thought as well but couldn't get it to work. I >> may not have a full grasp on how cocurrent works >> >> I define st as 'switch to table locale' and sb as 'switch to ba

Re: [Jprogramming] MacOS 10.7.5 and later users: a question

2015-11-09 Thread bill lam
perhaps you can look if this commit is related commit 2d7885dd1671f6faa6ea3b05057d6680ee311d91 Author: bill lam Date: Thu Jul 30 08:43:37 2015 +0800 glsel id should only search current parent as per documentation This commit fixed a long out-standing bug and perhaps it was this bug that

Re: [Jprogramming] interactive scatterplot

2015-11-09 Thread Devon McCormick
Hi - I got it to work on another machine, so it's undoubtedly something to do with my recently re-installed OS on my other machine. BTW - I was looking at your code - what's the "<1>" tag in your html? Thanks, Devon On Mon, Nov 9, 2015 at 7:19 AM, Joe Bogner wrote: > Hi Devon, can you include

Re: [Jprogramming] invoking object verbs without polluting global namespace

2015-11-09 Thread Raul Miller
On Mon, Nov 9, 2015 at 8:22 AM, Joe Bogner wrote: > Thank you. I had this thought as well but couldn't get it to work. I > may not have a full grasp on how cocurrent works > > I define st as 'switch to table locale' and sb as 'switch to base locale' > > I defined them explicitly > > My first atte

Re: [Jprogramming] MacOS 10.7.5 and later users: a question

2015-11-09 Thread Raul Miller
I confirm - domain error in chkgl2. Didn't happen before I ran install'all'. Thanks, -- Raul On Mon, Nov 9, 2015 at 5:16 AM, Henry Rich wrote: > A user running MacOS 10.7.5 with the latest Jqt beta and the latest dissect > reports that running the sentence: > > dissect ';: ''x y z

Re: [Jprogramming] invoking object verbs without polluting global namespace

2015-11-09 Thread Joe Bogner
thanks, there is alot for me to digest here. inlC2 looked promising but I can't seem to chain with it: NB. OK 2 add inlC2 t _ 2 3 4 5 6 7 8 9 10 11 NB. not OK 3 add 2 add inlC2 t _ |value error: add | 3 add 2 add inlC2 t _ Some additional comments below: On Sun, Nov 8, 2015 at 1:09

Re: [Jprogramming] This should be easy

2015-11-09 Thread Linda A Alvord
Thanks. I had gotten this close! 16 (0 0) } i. 4 4 Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Kip Murray Sent: Monday, November 9, 2015 4:44 AM To: programm...@jsoftware.com Subject: Re: [Jpro

Re: [Jprogramming] cocurrent in explicit train crashes

2015-11-09 Thread bill lam
I can replicate the crash. it can simplify to cocurrent&'base' 0 -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] invoking object verbs without polluting global namespace

2015-11-09 Thread Joe Bogner
On Sun, Nov 8, 2015 at 12:07 PM, Raul Miller wrote: > > It would be best, I think, if you paired up "to" on the right of the > sentence with a word on the left of the sentence which terminates the > dsl expression. My verbal imagination fails me at the moment, so I'm > going to use "from". > > Wit

[Jprogramming] cocurrent in explicit train crashes

2015-11-09 Thread Joe Bogner
I didn't send this to beta since I can replicate it on j6. It may not be a valid statement, but it crashes J 3 + (] @ cocurrent&'base') i.10 Where the locale is any locale it For comparison, this works fine (smoutput) 3 + (] @ (1!:2)&2) i.10 0 1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12

Re: [Jprogramming] interactive scatterplot

2015-11-09 Thread Joe Bogner
Hi Devon, can you include your plot command to see if I can replicate it? In a fresh session, can you try this from both jqt and jhs and let us know what you see? It should draw a simple line chart from 0 to 10. In JQT, it will open up a web page with Plot and the chart. In JHS, it should show t

[Jprogramming] MacOS 10.7.5 and later users: a question

2015-11-09 Thread Henry Rich
A user running MacOS 10.7.5 with the latest Jqt beta and the latest dissect reports that running the sentence: dissect ';: ''x y z''' puts up the dissect screen, but then when they left-click somewhere in the screen, preparing to scroll the display, they get an error. Can other u

Re: [Jprogramming] This should be easy

2015-11-09 Thread Kip Murray
You need 16 (< 0 0) } i. 4 4 . See the examples in http://www.jsoftware.com/jwiki/Vocabulary/curlyrt#dyadic --Kip On Monday, November 9, 2015, Linda A Alvord wrote: > All I want to do is change the item in the first row and column to a 16. I > can't seem to think of a name to call the verb

Re: [Jprogramming] This should be easy

2015-11-09 Thread 'Jon Hough' via Programming
Sorry, I just reread your post and my reply is completely irrelevant. Please ignore it. On Mon, 11/9/15, 'Jon Hough' via Programming wrote: Subject: Re: [Jprogramming] This should be easy To: programm...@jsoftware.com Date: Monday, November 9, 2015

Re: [Jprogramming] This should be easy

2015-11-09 Thread Sergeif
'<' missed. 16 (< 0;0) } i.4 4 works fine. On Mon, Nov 9, 2015 at 12:22 PM, Linda A Alvord wrote: > All I want to do is change the item in the first row and column to a 16. I > can't seem to think of a name to call the verb I need. Amend seems to only > apply to rows. > > 16 (0;0) } i.4 4

Re: [Jprogramming] This should be easy

2015-11-09 Thread 'Jon Hough' via Programming
Just an idea... a verb insert_transpose. NB. insert transpose... insrt =: (0;0)} insert_transpose = insrt&.|: 16 insert_transpose (i. 4 4) On Mon, 11/9/15, Linda A Alvord wrote: Subject: [Jprogramming] This should be easy To: programm...@jsoft

[Jprogramming] This should be easy

2015-11-09 Thread Linda A Alvord
All I want to do is change the item in the first row and column to a 16. I can't seem to think of a name to call the verb I need. Amend seems to only apply to rows. 16 (0;0) } i.4 4 16 16 16 16 4 5 6 7 8 9 10 11 12 13 14 15 Linda ---

Re: [Jprogramming] How best to preserve continuity between successive calls of jconsole?

2015-11-09 Thread Raul Miller
Here's a sketch. If you like this approach, let me know and we can polish it up (wrap it in scripts, deal with prompting, maybe address quoting issues...). It uses unix domain sockets, but hopefully you won't mind that - we can use a program like netcat to listen to them. In one console window, se