Differences between revisions 27 and 28
Revision 27 as of 2012-03-05 14:55:10
Size: 1400
Editor: KaiJaeger
Comment:
Revision 28 as of 2012-03-05 16:34:29
Size: 3472
Editor: KaiJaeger
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
/!\ This page is under construction
Line 9: Line 7:
This User Command prints the fully qualified names of functions and operators together with time stamps and the user name to the session, sorted by time stamp (oldest first). This User Command prints the fully qualified names of functions and operators together with time stamps and the user names to the session, sorted by time stamp (oldest first).
Line 13: Line 11:
The following is a sample session taken in the workspace "wtutor95" every Dyalog installation is coming with. The following is a sample session taken in the workspace "CPro" (Causeway) a Dyalog installation is coming with at the time of writing (2012-03).
Line 19: Line 17:
1 111 1832 3
Line 22: Line 20:
A positive integer n is treated as "report n fns/opr changed most recently: A positive integer n is treated as "report n fns/opr changed most recently", therefore you get 6 or less objects printed to the session:
Line 25: Line 23:
 #.DRAG 2000.08.14 11:09:27 Dyadic
 #.DOCKACCEPT 2000.08.15 10:17:15 Dyadic
 #.MAKE_Tutor 2003.03.17 13:54:39 Dyadic
 #.SET_TAB_STOPS 2003.03.17 13:54:59 Dyadic
 #.BMPDIR 2003.03.17 13:55:10 Dyadic
 #.TOPIC 2003.03.17 14:17:31 Dyadic
 #.Class.Initialise 2008.02.22 18:40:42 Adrian
 #.Class.Qualify 2008.02.22 18:52:15 Adrian
 #.Class.PM.Refresh 2008.02.22 19:01:15 Adrian
 #.Class.IL.Refresh 2008.02.22 19:27:25 Adrian
 #.Class.IC.Refresh 2008.02.22 19:42:32 Adrian
 #.CPro.Fns.Exec0 2008.02.22 19:43:40 Adrian
}}}

A negative integer n is treated as "report all fns/opr changed during the nth recent days":
{{{
      ]Latest2 ¯2
 #.CPro.Class.EventNumber 2008.01.24 14:46:02 Adrian
 #.Class.MakeBitmap 2008.02.22 18:37:41 Adrian
 #.Class.Initialise 2008.02.22 18:40:42 Adrian
 #.Class.Qualify 2008.02.22 18:52:15 Adrian
 #.Class.PM.Refresh 2008.02.22 19:01:15 Adrian
 #.Class.IL.Refresh 2008.02.22 19:27:25 Adrian
 #.Class.IC.Refresh 2008.02.22 19:42:32 Adrian
 #.CPro.Fns.Exec0 2008.02.22 19:43:40 Adrian
}}}

Note that you cannot specify the negative value as `-4` rather than `¯4` because Dyalog considers it to be a switch then and refuses to accept that.

By default `Latest` investigates `#`. With the optional switch `-s` one can change that. The following statement returns 6 fns/opr from the namespace `#.Class.IC`:

{{{
      ]Latest2 ¯5 -s=#.Class.IC
 #.Class.IC.Caption 1997.07.31 18:13:06 Adrian
 #.Class.IC.Design 1997.07.31 23:38:26 Adrian
 #.Class.IC.Create 1997.08.01 11:50:52 Adrian
 #.Class.IC.onConfigure 1997.08.01 11:54:51 Adrian
 #.Class.IC.Read 1997.09.01 15:36:54 Adrian
 #.Class.IC.Fns 2008.01.23 12:51:28 Adrian
 #.Class.IC.Refresh 2008.02.22 19:42:32 Adrian
}}}

Occasionally it might be useful to include fns/opr from scripted namespaces as well. This can be achieved with the `-a` switch (for "all").

Let's create a scripted namespace in order to get something to bite into:

{{{
      ⎕fix ':Namespace Foo' '∇r←Hello' 'r←''World''' '∇' ':EndNamespace'
      ]Latest2 3
 #.Class.IL.Refresh 2008.02.22 19:27:25 Adrian
 #.Class.IC.Refresh 2008.02.22 19:42:32 Adrian
 #.CPro.Fns.Exec0 2008.02.22 19:43:40 Adrian
      ]Latest2 3 -a
 #.Class.IC.Refresh 2008.02.22 19:42:32 Adrian
 #.CPro.Fns.Exec0 2008.02.22 19:43:40 Adrian
 #.Foo.Hello 2012.03.05 16:20:35 Kai
Line 33: Line 75:

User Command "Latest"

Overview

This User Command prints the fully qualified names of functions and operators together with time stamps and the user names to the session, sorted by time stamp (oldest first).

Note that fns/opr in scripted namespaces are execluded. In the context of a command latest they don't offer real value since they all get the same time stamp when the script gets fixed. This is more often misleading than useful.

The following is a sample session taken in the workspace "CPro" (Causeway) a Dyalog installation is coming with at the time of writing (2012-03).

An empty vector means ALL fns/opr:

      ]q←Latest ⍬                 
      ⍴q
1832 3

A positive integer n is treated as "report n fns/opr changed most recently", therefore you get 6 or less objects printed to the session:

      ]Latest2 6
 #.Class.Initialise  2008.02.22 18:40:42  Adrian 
 #.Class.Qualify     2008.02.22 18:52:15  Adrian 
 #.Class.PM.Refresh  2008.02.22 19:01:15  Adrian 
 #.Class.IL.Refresh  2008.02.22 19:27:25  Adrian 
 #.Class.IC.Refresh  2008.02.22 19:42:32  Adrian 
 #.CPro.Fns.Exec0    2008.02.22 19:43:40  Adrian 

A negative integer n is treated as "report all fns/opr changed during the nth recent days":

      ]Latest2 ¯2
 #.CPro.Class.EventNumber  2008.01.24 14:46:02  Adrian 
 #.Class.MakeBitmap        2008.02.22 18:37:41  Adrian 
 #.Class.Initialise        2008.02.22 18:40:42  Adrian 
 #.Class.Qualify           2008.02.22 18:52:15  Adrian 
 #.Class.PM.Refresh        2008.02.22 19:01:15  Adrian 
 #.Class.IL.Refresh        2008.02.22 19:27:25  Adrian 
 #.Class.IC.Refresh        2008.02.22 19:42:32  Adrian 
 #.CPro.Fns.Exec0          2008.02.22 19:43:40  Adrian 

Note that you cannot specify the negative value as -4 rather than ¯4 because Dyalog considers it to be a switch then and refuses to accept that.

By default Latest investigates #. With the optional switch -s one can change that. The following statement returns 6 fns/opr from the namespace #.Class.IC:

      ]Latest2 ¯5 -s=#.Class.IC
 #.Class.IC.Caption      1997.07.31 18:13:06  Adrian 
 #.Class.IC.Design       1997.07.31 23:38:26  Adrian 
 #.Class.IC.Create       1997.08.01 11:50:52  Adrian 
 #.Class.IC.onConfigure  1997.08.01 11:54:51  Adrian 
 #.Class.IC.Read         1997.09.01 15:36:54  Adrian 
 #.Class.IC.Fns          2008.01.23 12:51:28  Adrian 
 #.Class.IC.Refresh      2008.02.22 19:42:32  Adrian 

Occasionally it might be useful to include fns/opr from scripted namespaces as well. This can be achieved with the -a switch (for "all").

Let's create a scripted namespace in order to get something to bite into:

      ⎕fix ':Namespace Foo' '∇r←Hello' 'r←''World''' '∇' ':EndNamespace'
      ]Latest2 3
 #.Class.IL.Refresh  2008.02.22 19:27:25  Adrian 
 #.Class.IC.Refresh  2008.02.22 19:42:32  Adrian 
 #.CPro.Fns.Exec0    2008.02.22 19:43:40  Adrian 
      ]Latest2 3 -a
 #.Class.IC.Refresh  2008.02.22 19:42:32  Adrian 
 #.CPro.Fns.Exec0    2008.02.22 19:43:40  Adrian 
 #.Foo.Hello         2012.03.05 16:20:35  Kai    

Download

Download the script and the workspace.

Version

The script is version 1.0.0 from 2012-03-05

Author: KaiJaeger

-- KaiJaeger 2012-03-05 14:37:53


CategoryDyalogUserCommands