APL64_September Update

This topic is specifically for discussions on the new APL64 Project currently in development. This topic is open for all to browse. However, to post, one must have a registered account on the APLDN forum only available to APL+Win licensee under a current APL+Win Subscription.

Moderators: Tech Support, phpbb_admin

APL64_September Update

Postby Ajay Askoolum » September 30th, 2020, 12:34 pm

1. The menu in the screenshot does not have the Walk option. What facilities, if any, are contemplated for step by step execution of a function? A Watch window would be nice to examine the state of variables.

2. Is/Will there be a []CMDA? An enhancement that will return the results of []CMD to the session would be very welcome.

3. Time scale to availability? (for field testing).
Ajay Askoolum
 
Posts: 901
Joined: February 22nd, 2007, 2:16 am
Location: United Kingdom

Re: APL64_September Update

Postby Tech Support » October 6th, 2020, 2:17 pm

Ajay,

Thanks for your comments. Below you will find the answers to each of your three questions:

Q1. The menu in the screenshot does not have the Walk option. What facilities, if any, are contemplated for step by step execution of a function? A Watch window would be nice to examine the state of variables.

A1. The Debug menu replaces the Walk menu in APL+Win with similar functionality. Refer to the pages 10-11 in the May 2019 Update for additional information. In APL64 the Debugged Function and State Indicator panes are automatically displayed when the APL64 interpreter is suspended in execution and hidden in other APL64 interpreter states. In APL64 these two debugging panes can be docked with the main window of the APL64 developer 'session' or floated independently of the main window.

Debug menu.gif
Debug menu.gif (86.53 KiB) Viewed 351 times

Q2. Is/Will there be a ⎕CMDA? An enhancement that will return the results of ⎕CMD to the session would be very welcome.

A2. There is no ⎕CMDA system function; the administrator options are available on the ⎕CMD system function with the new left arguments.
We'll consider your enhancement request for ⎕CMD to return results to the session - Thanks.


Q3. Time scale to availability? (for field testing).

A3. The APL2000 Team is working to release a high quality product with superior features and excellent compatibility with APL+Win. We do not have an initial release date at this time.
Tech Support
 
Posts: 1230
Joined: February 10th, 2007, 7:33 am
Location: Rockville, MD

Re: APL64_September Update

Postby EBaelen » April 5th, 2021, 3:37 pm

Reading the request for QuadCMD to return a result prompted me to try and do it with APL and pipes.
Basically I added the pipe symbol to the command and a file name, then read the results into the workspace.
Would this suffice? /Eric

[code]
∇ r←CMDresult cmd;n
[1] ⍝ Exectues a command in a DOS Box and returns result
[2] cmd←cmd,'>aplout.txt'
[3] ⎕CMD cmd
[4] :TRY
[5] 'aplout.txt' ⎕ntie n←¯1+⌊/0,⎕nnums
[6] :CATCHIF 'FILE NOT FOUND' ≡ 14↑⎕DM
[7] r←'' ⋄ →0
[8] :CATCHALL
[9] :ENDTRY
[10] r←⎕nread n, 82, ⎕nsize n
[11] 'aplout.txt' ⎕nerase n

[code]
EBaelen
 
Posts: 13
Joined: February 7th, 2007, 5:06 pm

Re: APL64_September Update

Postby Ajay Askoolum » April 7th, 2021, 2:56 am

There are several ways of achieving this with user code. Originally, I raised this as an interpreter enhancement viewtopic.php?f=20&t=1266; Old One uploaded a solution viewtopic.php?f=7&t=1287.

My view is that if this interpreter provides the enhancement, it will be workspace independent and also promote consistent usage across users/developers.

As things stand, (and if my recollection is correct), since APL64 provides []EDIT I would achieve it as follows:

Step 1
Code: Select all
      3 ⎕cmd 'dir C:\ | clip' ⍝ This copies the output to the clipboard
Note the workaround required for APL+Win, namely, need to pass split stile and not residue/magnitude from APL - the conversion from split stile to residue/magnitude is implicit.
Code: Select all
      ⎕av⍳'|' ⍝ Split Stile
125
      ⎕av⍳'∣' ⍝ Alt+M i.e. residue/magnitude symbol
255
Step 2
From APL+Win, invoke the Ctrl+V functionality or from APL64, open an []EDIT session and then invoke Ctrl+V.

DOS has excellent facilities for managing the filing/operating system, see https://ss64.com/nt/ [1] and when combined with re-direction, filters & pipes (possibly within batch files) it can save a lot of time and provide sophisticated functionality.

Example 1 - Where have I saved GROUPBY.W3 on Drive E:?
Code: Select all
     3 ⎕cmd 'where /R e:\ groupby.w3 | clip'
Press Ctrl+V to see
Code: Select all
e:\Ajay\APL+WIN\GROUPBY.w3
e:\Ajay\APL+WIN\APL\GROUPBY.w3
e:\Ajay\ARCHIVE\C#\VS2008\LINQ to Objects\GroupBy.w3
e:\Ajay\C#\VS2008\LINQ to Objects\GroupBy.w3
e:\SD 32GB Disk\GroupBy.w3'
Example 2 - List with file size, last modified date and time for all matched files
Code: Select all
     3 ⎕cmd 'where /R e:\ groupby.w3 /T | clip'
Press Ctrl+V to see
Code: Select all
     10802   17/02/2007      00:14:48  e:\Ajay\APL+WIN\GROUPBY.w3
     10802   16/02/2007      23:14:48  e:\Ajay\APL+WIN\APL\GROUPBY.w3
      5986   14/04/2009      20:39:04  e:\Ajay\ARCHIVE\C#\VS2008\LINQ to Objects\GroupBy.w3
      5986   14/04/2009      20:39:04  e:\Ajay\C#\VS2008\LINQ to Objects\GroupBy.w3
      5986   14/04/2009      20:39:04  e:\SD 32GB Disk\GroupBy.w3
Example 3 - separate the columns AND show file names in double quotes
Code: Select all
     3 ⎕cmd 'where /R e:\ groupby.w3 /T /F | clip'
Need to paste the results in a variable
Code: Select all
      a←1 1⍴' ' ⍝ a←3 ⎕cmd 'where /R e:\ groupby.w3 /T /F' ⍝ equivalent code with interpreter support
      )edit a ⍝ Paste into variable

      a
     10802   17/02/2007      00:14:48  "e:\Ajay\APL+WIN\GROUPBY.w3"
     10802   16/02/2007      23:14:48  "e:\Ajay\APL+WIN\APL\GROUPBY.w3"
      5986   14/04/2009      20:39:04  "e:\Ajay\ARCHIVE\C#\VS2008\LINQ to Objects\GroupBy.w3"
      5986   14/04/2009      20:39:04  "e:\Ajay\C#\VS2008\LINQ to Objects\GroupBy.w3"
      5986   14/04/2009      20:39:04  "e:\SD 32GB Disk\GroupBy.w3"

     (~^⌿' '=a)⊂a ⍝ Identify & split
 10802 17/02/2007 00:14:48 "e:\Ajay\APL+WIN\GROUPBY.w3"
 10802 16/02/2007 23:14:48 "e:\Ajay\APL+WIN\APL\GROUPBY.w3"
  5986 14/04/2009 20:39:04 "e:\Ajay\ARCHIVE\C#\VS2008\LINQ to Objects\GroupBy.w3"
  5986 14/04/2009 20:39:04 "e:\Ajay\C#\VS2008\LINQ to Objects\GroupBy.w3"
  5986 14/04/2009 20:39:04 "e:\SD 32GB Disk\GroupBy.w3"

     ⍴(~^⌿' '=a)⊂a ⍝ result is a nested array ... Final row of a is a blank line, hence 6 rows
6 4
     ((~^⌿' '=a)⊂a )[1;4] ⍝ What is the first file Name?
 "e:\Ajay\APL+WIN\GROUPBY.w3"
⍝ With the appropriate date utility, could pick the most recent version
[1] Some of the commands require a download - https://download.sysinternals.com/files/PSTools.zip
Ajay Askoolum
 
Posts: 901
Joined: February 22nd, 2007, 2:16 am
Location: United Kingdom

Re: APL64_September Update

Postby Ajay Askoolum » April 10th, 2021, 1:12 pm

APL+Win User Tools_10-04-2021 17.22.20.wmv
(11.28 MiB) Downloaded 2 times
Attached WMV shows how I get the clipboard (discussed above) content using keyboard event into the APL interactive session.
Ajay Askoolum
 
Posts: 901
Joined: February 22nd, 2007, 2:16 am
Location: United Kingdom


Return to APL64 Project

Who is online

Users browsing this forum: No registered users and 1 guest

cron