Re: [Jprogramming] trains

2014-07-19 Thread Linda Alvord
You are on to something here Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of 'Pascal Jasmin' via Programming Sent: Saturday, July 19, 2014 2:02 AM To: programm...@jsoftware.com Subject: Re: [Jprogra

Re: [Jprogramming] Calling j.dll from python

2014-07-19 Thread Jon Hough
Thanks Bill et al. I think I have the beginnings of a workable connection. I can call JDo and JGetM now, thanks to Jun Kim's script (with a couple of modifications). One thing that is still failing, is trying to load a script through jDLL. e.g. (added to previous python script) run_jcmd("load 'j80

Re: [Jprogramming] Calling j.dll from python

2014-07-19 Thread bill lam
Did you load profile.ijs during booting? Where is your working directory? How do you verify script was loaded? Сб, 19 июл 2014, Jon Hough написал(а): > Thanks Bill et al. > I think I have the beginnings of a workable connection. I can call JDo and > JGetM now, thanks to Jun Kim's script (with a c

Re: [Jprogramming] Calling j.dll from python

2014-07-19 Thread Marc Simpson
Hi Jon, On Sat, Jul 19, 2014 at 5:41 AM, Jon Hough wrote: > Well, my plam, which may be stupid, is to create a pythin, tkinter UI and > call j from this. Did you consider building your GUI using wd? If so, why did you adopt Python/Tk instead? Best, Marc

[Jprogramming] High Speed Train Challenge

2014-07-19 Thread Linda Alvord
Here is the rule: You may only insert one verb as many times as you wish anywhere in the expression to produce the desired result: 3()4 3 3(%**%%*%)4 16 Here is the desired result: 3((***)(***)***)4 429981696 Here is the expression you must modify to gene

[Jprogramming] Very strange and interesting behavior

2014-07-19 Thread Linda Alvord
I was typing fast and produced this repeatable phenomenon. f=:%*+-# 5!:4 < 5!:4 < f % * + - # Any string seems to work this way f=: 13 :'x*:y%x' 5!:4 < 5!:4 < f [ *: %~ I would expect either: 5!:4 <'f' -- [ --+- *: L- ~ --- % o

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Erling Hellenäs
3(***(***)(***))4 NB. Challenge 35831808 3(*(***)(***))4 NB. Solution 429981696 3((***)(***)***)4 NB. Verify against 429981696 3([: <. 0.5 + * ^ 8:)4 NB. Other expression with same result 429981696 3 (* *^:8 1:) 4 NB. Other expression with same result 429981696 3 (*

Re: [Jprogramming] Very strange and interesting behavior

2014-07-19 Thread Kip Murray
I believe 5!:4 < is a hook and that when you enter a verb train the system simply echos it. On Saturday, July 19, 2014, Linda Alvord wrote: > I was typing fast and produced this repeatable phenomenon. > > > >f=:%*+-# > >5!:4 < > > 5!:4 < > >f > > % * + - # > > > > Any string seems

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Raul Miller
Challenge accepted: 3(42981696"_***(***)(***))4 42981696 What? 42981696"_ is one verb, isn't it? Thanks, -- Raul On Sat, Jul 19, 2014 at 6:33 AM, Linda Alvord wrote: > Here is the rule: > > > > You may only insert one verb as many times as you wish anywhere in the > expression to prod

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Linda Alvord
All you are allowed to add are J verbs without affecting the pattern: Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Erling Hellenäs Sent: Saturday, July 19, 2014 9:42 AM To: programm...@jsoftware.com

Re: [Jprogramming] Calling j.dll from python

2014-07-19 Thread Jon Hough
I didn't load profile.ijs. I just did a quick try, loading profile.ijs, and the same fail occured.My python script is sitting in my home directory, I am using absolute paths in the python scrip to call my scripts. I'm currently working in Linux. The reason I am pretty sure my script didn't load

Re: [Jprogramming] Calling j.dll from python

2014-07-19 Thread Jon Hough
I think you are right, I could use J tools to build the UI, but I am comfortable with TKinter, and I am interested in seeing J work with other tools, especially Python.I assumed it would not be difficult to make the connection, but in hindsight perhaps it was not the brightest idea to try. Howev

Re: [Jprogramming] Calling j.dll from python

2014-07-19 Thread bill lam
I suspect you failed to load profile.ijs either. The J user manual covers the details of how J starts. Сб, 19 июл 2014, Jon Hough написал(а): > I didn't load profile.ijs. I just did a quick try, loading profile.ijs, and > the same fail occured.My python script is sitting in my home directory, I

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Raul Miller
That was, of course, a j verb. Thanks, -- Raul On Sat, Jul 19, 2014 at 11:16 AM, Linda Alvord wrote: > All you are allowed to add are J verbs without affecting the pattern: > > Linda > > -Original Message- > From: programming-boun...@forums.jsoftware.com > [mailto:programming-boun...@

Re: [Jprogramming] Very strange and interesting behavior

2014-07-19 Thread Linda Alvord
The sequence is: (5!:4 < "pace") so maybe it is a train or a trolley car. Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Kip Murray Sent: Saturday, July 19, 2014 10:23 AM To: programm...@jsoftware

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Skip Cave
Raul, I think Linda means J *primitive* verbs. Skip Skip Cave Cave Consulting LLC On Sat, Jul 19, 2014 at 10:51 AM, Raul Miller wrote: > That was, of course, a j verb. > > Thanks, > > -- > Raul > > On Sat, Jul 19, 2014 at 11:16 AM, Linda Alvord > wrote: > > All you are allowed to add are J

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Raul Miller
Probably, yes. And I was sort of provocative by not going with the implied limitations. But there's can be quite a bit of ambiguity when key issues are implied, rather than addressed or illustrated. This is a problem I face myself, quite often: How can I be aware of important issues which matter

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Erling Hellenäs
Another way to do the same thing, but not a solution, is this expression: 3 (*(*(***)*)*) 4 NB. Funny way 429981696 Anyone can find a nice recursive way to write it? My best shot: 12 1:`([ * [ $: [: <: ])@.([: * ]) 8 NB. Complicated way 429981696 It's a recursion? * $: * /Erling On 20

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread 'Pascal Jasmin' via Programming
kindof the same as your idea    *~(^:3) 12 429981696 completely off topic, but would it be a good or bad thing if, assuming there was a shortage of ascii mnemonics, and some need, if monadic +: and *: were redefined considering that +~ and *~ do the same? - Original Message - From:

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread robert therriault
Hi Pascal, Not arguing against the idea but they are only functionally the same for monadic. 4 *: 4 |domain error | 4*:4 4 +: 4 |domain error | 4+:4 5 *: 4 |domain error | 5*:4 5 *~ 4 20 5 +: 4 |domain error | 5+:4 5 +~ 4 9 Cheers, bob On Jul 19, 2014

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Erling Hellenäs
Nice. 3([: *~(^:3) *)4 NB. Recursive way via Pascal Jasmin 429981696 Any more funny ways to do this? /Erling On 2014-07-19 23:59, 'Pascal Jasmin' via Programming wrote: *~(^:3) 12 -- For information about J forums se

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread 'Pascal Jasmin' via Programming
I'm not sure I'm arguing for the idea.  I've disliked ~ in the past because I've read it as one of the other 2 meanings that was written.  I wonder if making reflexive more common would help overcome forgetting it exists quicker. from your examples, it would appear that good candidates for monad

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Kip Murray
utu =: 1 : '[: u~ u' 3 *:@* utu 4 429981696 uses the ideas that *** is equivalent to *:@* and u u u is equivalent to [: u~ u On Saturday, July 19, 2014, 'Pascal Jasmin' via Programming < programm...@jsoftware.com> wrote: > I'm not sure I'm arguing for the idea. I've disliked ~ in the past

Re: [Jprogramming] Why does u^:_2 execute u?

2014-07-19 Thread 'Bo Jacoby' via Programming
This seems to work:    *:^:(1 0 _1 _2)16 256 16 4 2 Den 19:18 tirsdag den 15. juli 2014 skrev 'Pascal Jasmin' via Programming : > > >bug I think, but a partial workaround > >pD =: 1!:2&2 > >   ''[(pD@:('norm ',":)) :. (pD@:('inverse ',":))^:_1^:2  'abc' >inverse abc >inverse inverse abc

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Linda Alvord
That has a symmetric charm! Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Erling Hellenäs Sent: Saturday, July 19, 2014 3:05 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] High Speed Tr

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread 'Pascal Jasmin' via Programming
3 * utu utu 4    3 * 1 : '[: u~ u' 1 : '[: u~ u' 4 429981696 - Original Message - From: Kip Murray To: "programm...@jsoftware.com" Cc: Sent: Saturday, July 19, 2014 6:55:02 PM Subject: Re: [Jprogramming] High Speed Train Challenge   utu =: 1 : '[: u~ u'   3 *:@* utu 4 42998169

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Linda Alvord
Maybe you'll like this best. 12^8 12^8 4.29982e8 12x^8 429981696 Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Erling Hellenäs Sent: Saturday, July 19, 2014 6:18 PM To: programm...@jsof

Re: [Jprogramming] Why does u^:_2 execute u?

2014-07-19 Thread 'Pascal Jasmin' via Programming
The issue occurs when your verb causes side effects.  The problem occurs by calling the unwanted function even if its return value is "correctly" discarded. - Original Message - From: 'Bo Jacoby' via Programming To: "programm...@jsoftware.com" Cc: Sent: Tuesday, July 15, 2014 4:13:22

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Linda Alvord
I'm still looking for the phrase or concept that explains the difference between these two. Why are they producing different results? 3(***(***)(***))4 35831808 3((***)(***)***)4 429981696 If you grew up in the early years using APL, an idea might come to mind. Linda -Orig

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Linda Alvord
So: f=: [: ([: *: *)~ [: *: * 3 f 4 429981696 Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Kip Murray Sent: Saturday, July 19, 2014 6:55 PM To: programm...@jsoftware.com Subject: Re: [Jp

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Raul Miller
J's trace facility should make the answer to this question obvious? Thanks, -- Raul On Sat, Jul 19, 2014 at 8:49 PM, Linda Alvord wrote: > I'm still looking for the phrase or concept that explains the difference > between these two. Why are they producing different results? > >3(***(***)

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Joe Bogner
You may also want to review http://www.jsoftware.com/help/learning/09.htm On Jul 19, 2014 9:15 PM, "Raul Miller" wrote: > J's trace facility should make the answer to this question obvious? > > Thanks, > > -- > Raul > > > On Sat, Jul 19, 2014 at 8:49 PM, Linda Alvord > wrote: > > I'm still looki

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Brian Schott
Linda, does your tree display explain the difference for you? I have tried to show what I mean with trees. The only word that may be missing is "isolated": Trains are isolated sequences of verbs, and parentheses pairs can induce isolation. In the first example the first 3 stars are forced into a si

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Linda Alvord
I understand the differences. I made the problem. I want a few words to tell the difference between the two to another person. Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Brian Schott Sent: Satu

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Linda Alvord
Brian, This looks good. Sometimes I succeed sometimes not. I think the best way to get trees to work is to paste from VHS and then either use Options and HTML or Rich Text. However it looks like you just used Plain Text. Do you have a way that always works. Linda -Original Message-

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Linda Alvord
Hint: What is different about writing Hebrew and writing Spanish? Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda Alvord Sent: Saturday, July 19, 2014 8:49 PM To: programm...@jsoftware.com Subjec

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Linda Alvord
But can you explain the difference in a few words? -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Raul Miller Sent: Saturday, July 19, 2014 9:15 PM To: Programming forum Subject: Re: [Jprogramming] High Spee

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Raul Miller
Yes. * is product (***) is product of products They are related but different. Oh, and you get a free parenthesis on the right of a verb train, but not on the left. Thanks, -- Raul On Sun, Jul 20, 2014 at 12:13 AM, Linda Alvord wrote: > But can you explain the difference in a few words? >

Re: [Jprogramming] High Speed Train Challenge

2014-07-19 Thread Brian Schott
I am not familiar with VHIS; that is, I don't know what it is. I use gmail for my email. I think it was Raul who posted a tip to the forums that with gmail you can get a better copy/paste if instead of Paste you use Paste and Match Style. You may not have access to Paste and Match Style in your e