Problem with RIDE

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

Problem with RIDE

Postby ray on Mon Jan 30, 2017 12:37 am

Hi

I have encountered a minor problem using RIDE on my Windows 7 PC connecting to APL running on a Raspberry Pi.

On the Pi, APL is calling a function written in C and made available to APL via ⎕NA.
The C function outputs some debugging "text" to the screen via a "printf" statement. The text appears on the Raspberry Pi screen.

Unfortunately, the debugging "text" does not appear at all in the RIDE session.

Although the text appears on the Pi screen, it does not appear to be part of the session/session log, and a screen refresh <windows-L> removes it.

Is there any way that I can make the debugging text available to the RIDE session?
(Possibly via Pipes/stderr ???)

IDE:
Version: 3.0.1996
Platform: Win32
Date: 2016-11-01 14:14:30 +0000
Git commit: 6545091e25cf7d760b1677388b8542a2fa858256
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36
Settings:{
"editorWidth":"916",
"favs":"[{\"name\":\"Pi2eye\",\"host\":\"192.168.0.18\",\"type\":\"connect\"},{\"name\":\"raspberrypi2\",\"host\":\"192.168.0.24\"}]",
"floatOnTop":"1",
"kbdLocale":"en_US",
"otherExe":"dyalog",
"pos":"[-9,-9,1938,1064,1]",
"posEditor":"[793,0,1084,1046]",
"posTracer":"[2155,236,1597,667]",
"theme":"classic",
"title":"{WSID}{PID}{HOST}",
"tracerHeight":"257",
"wse":"1"
}

Interpreter:
Version: 15.0.29007
Platform: Linux
Edition: Unicode/32
Date: Created: Jan 17 2017 at 00:52:39


Thanks
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 98
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK

Re: Problem with RIDE

Postby AndyS|Dyalog on Tue Jan 31, 2017 9:40 am

I'm afraid that that's not possible .. that output doesn't come from the interpreter, so cannot be captured by RIDE .. and it's why when you use a tty interface a screen refresh clears it.

I think that the best you can do is to alter your code so that rather than using printf() you use fprintf() having opened a file (in append mode) to write the debug info to. Then either open a terminal/ssh window onto the machine and run tail -f on the file, or run your code, and then from within RIDE read the contents of the file using ⎕SH'cat file' or ⎕nget file.
User avatar
AndyS|Dyalog
 
Posts: 154
Joined: Tue May 12, 2009 6:06 pm

Re: Problem with RIDE

Postby ray on Tue Jan 31, 2017 3:10 pm

Thanks Andy, I feared as much.

Unfortunately, a lot of code I access via ⎕NA is not under my control so I don't have the option to use fptintf() in place of printf().

I am already using fprintf() to write out I2C data (compass bearings) on a continuous basis, and read snapshots of it in APL via ⎕map.

So I will continue to run Dyalog APL directly on the Raspberry Pi with a screen connected, so I can see the printf() debugging output, but control the APL session via RIDE, running under Windows.

Thanks.
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 98
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK

Re: Problem with RIDE

Postby ray on Tue Jan 31, 2017 3:41 pm

On a different RIDE point, I notice that when debugging, the "Trace Tools" menu bar (Exec, Trace, Back, Fwd, Restart, Restart all threads, Edit, Exit, Intr, and Reset) under RIDE, the Exit button (X) is missing. (Actually I always regarded it as a "cut back" button rather than "Exit".)

The (Windows)"Exit" button is described as "Close the Trace window and exit the current function".

The RIDE "X" on the line above is marked "Save and Close", which I do not think is the same, one cuts back the stack, while the other does not. (Or am I mistaken/confused?)

Is there a good reason for there being no "Exit"(cut back) button in RIDE? I miss it!

Ray
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 98
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 2 guests