Presentation is loading. Please wait.

Presentation is loading. Please wait.

Utilities in Dyalog APL Dan Baronet Boston 2011 V1.00 0Dyalog’11 - BostonUtilities.

Similar presentations


Presentation on theme: "Utilities in Dyalog APL Dan Baronet Boston 2011 V1.00 0Dyalog’11 - BostonUtilities."— Presentation transcript:

1 Utilities in Dyalog APL Dan Baronet Boston 2011 V1.00 0Dyalog’11 - BostonUtilities

2 []SE vs # There are 2 “workspaces” available at all times when using Dyalog: []SE which holds session (static) data And # which is the workspace as such (dynamic) 1Dyalog’11 - BostonUtilities

3 Memory layout UtilitiesDyalog’11 - Boston2 []SE.dse file.dws file #

4 []SE Previously []SE was only used in GUI versions to hold session objects (menus, toolbars, statusbars, …) It is now used to also contain utilities like SALT. UtilitiesDyalog’11 - Boston3

5 # # is dynamic, this is where you )LOAD workspaces and )SAVE them from. You can write utilities, store them in a.DWS file and )COPY them when needed. That’s one way to do it and it’s been done for ages. UtilitiesDyalog’11 - Boston4

6 []SE []SE is static. You can store utilities there and refer to them either using their full path (e.g. []SE.myUtil) or by setting []PATH to ‘[]SE’. No other APL offers this. For many this is new. UtilitiesDyalog’11 - Boston5

7 []SE – loading and saving []SE is loaded at start-up time. If you modify it it can be saved using the Session/Save menu item: UtilitiesDyalog’11 - Boston6

8 []SE – loading and saving If you wish to use a different name for the session file you can use Save as… UtilitiesDyalog’11 - Boston7

9 []SE – loading and saving If you want APL to use it automatically you will then need to tell APL which session (.DSE) file to load at start-up: UtilitiesDyalog’11 - Boston8

10 []SE : using it as storage It may be convenient enough to store utilities in []SE and use them from there. You can even add some GUI to use them. UtilitiesDyalog’11 - Boston9

11 []SE – storing utilities Dyalog stores utilities in []SE. They are in namespaces -General line Parser -SALT & Spice (UCMD framework) -Dyalog utilities -Chart -The User Command function UtilitiesDyalog’11 - Boston10

12 SALT SALT is basically a pair of functions to read and write APL code outside the workspace One feature of SALT is to hook into the editor to save objects automatically. SALT has more functionality and can be used as a version control system. UtilitiesDyalog’11 - Boston11

13 SALT uses Unicode text files as storage medium. Text files can be shared and integrate well with other VCS SALT is the base for Spice UtilitiesDyalog’11 - Boston12 SALT

14 Spice Spice is the interface between you and your code stored in SALT files. It allows you to execute your code under your own rules. Spice is the framework of User Commands UtilitiesDyalog’11 - Boston13

15 User Commands UCMDS are SALT based functions called thru the ] syntax. All the basic code resides in a SALTed text file with specific format. When “]CAL 12” is entered in the session its main function is called with arguments ‘CAL’ ‘12’ UtilitiesDyalog’11 - Boston14

16 Keyboard Shortcuts Ctrl-Shift-End : highlight to the end of text Ctrl-delete : remove highlighted text Ctrl-Home/End : go to the beginning/end of the text Shift-Esc : cancel operation Space (in session): mark current line for re-execution (several can be marked) Keypad - : toggle line numbers Keypad / : reformat according to configuration Ctrl-Up : localize name Ctrl-Shift-BS/Enter: undo/redo UtilitiesDyalog’11 - Boston15

17 Examples -The function. -The user command -The Dyalog utilities UtilitiesDyalog’11 - Boston16

18 The APL Wiki UtilitiesDyalog’11 - Boston17

19 UtilitiesDyalog’11 - Boston18

20 UtilitiesDyalog’11 - Boston19

21 UtilitiesDyalog’11 - Boston20


Download ppt "Utilities in Dyalog APL Dan Baronet Boston 2011 V1.00 0Dyalog’11 - BostonUtilities."

Similar presentations


Ads by Google