Spice Spice in Dyalog V1.03. Sep 2009 2 Spice Utilities Spice is a user command handler. Under V11 & V12 it uses an input area at the bottom of the screen.

Slides:



Advertisements
Similar presentations
1 2 In a computer system, a file is a collection of information with a single name, such as addresses.doc, or filebackup.ppt, or ftwr.exe, or guidebook.xls.
Advertisements

User Commands (UCMDs) in Dyalog APL A programmer's tool V1.04 Dan Baronet.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
 Statistics package  Graphics package  Programming language  Can be used to share/reproduce analyses  Many new packages being created - can be downloaded.
Linux+ Guide to Linux Certification, Second Edition
CIS 101: Computer Programming and Problem Solving Lecture 4 Usman Roshan Department of Computer Science NJIT.
Guide To UNIX Using Linux Third Edition
Guide to Linux Installation and Administration, 2e1 Chapter 6 Using the Shell and Text Files.
Introduction to Array The fundamental unit of data in any MATLAB program is the array. 1. An array is a collection of data values organized into rows and.
Statistical Software An introduction to Statistics Using R Instructed by Jinzhu Jia.
Editing Java programs with the BlueJ IDE. Working environments to develop (= write) programs There are 2 ways to develop (write) computer programs: 1.Using.
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
Towson University COSC 236
M-files While commands can be entered directly to the command window, MATLAB also allows you to put commands in text files called M- files. M-files are.
Advanced Shell Programming. 2 Objectives Use techniques to ensure a script is employing the correct shell Set the default shell Configure Bash login and.
Getting Started with Expression Web 3
SALT and Version Control How to handle projects using version controlled SALT V1.06.
1 Operating Systems Lecture 3 Shell Scripts. 2 Brief review of unix1.txt n Glob Construct (metacharacters) and other special characters F ?, *, [] F Ex.
Week 7 Working with the BASH Shell. Objectives  Redirect the input and output of a command  Identify and manipulate common shell environment variables.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
© 2005 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures for Java William H. Ford William R. Topp Appendix E The EZJava.
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification Chapter Eight Working with the BASH Shell.
Introduction to Exception Handling and Defensive Programming.
Digital curation activities enhance access and retrieval, maintain quality, add value, and facilitate use and re-use over time. This poster demonstrates.
META tag META tag is the element in the HTML that interacts with the search engines. It’s contain 2 attributes that should always be used: NAME: is an.
Unit 1: Java and Eclipse The Eclipse Development Environment.
Histo-Labels Easy to use and fun to setup. Create and edit all label menus to fulfill your slide labeling requirements. Print to any printer installed.
Advanced Topics- Functions Introduction to MATLAB 7 Engineering 161.
Utilities in Dyalog APL Dan Baronet Boston 2011 V1.00 0Dyalog’11 - BostonUtilities.
Introduction to Unix – CS 21 Lecture 12. Lecture Overview A few more bash programming tricks The here document Trapping signals in bash cut and tr sed.
Chapter 10: BASH Shell Scripting Fun with fi. In this chapter … Control structures File descriptors Variables.
Chapter 3 MATLAB Fundamentals Introduction to MATLAB Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
SALT and Version Control How to handle projects using version controlled SALT V1.07.
Spice Spice in Dyalog Document V1.06. Oct 2011 Spice Utilities Spice is a user command handler. Under V11 & V12 it uses an input area at the bottom of.
Contents Self-Service – End user submits a ticket and starts a Bomgar chat session Phone Support – Service Desk Rep starts a Bomgar session from a submitted.
Chapter 2: Introduction to HyperMesh Process Auomation
1 Microsoft Management Console Tool to create customized administration tools Customized tools known as MMC consoles, or simply consoles.
Chapter Three The UNIX Editors.
CPT 499 Internet Skills for Educators Session Three Class Notes.
©Colin Jamison 2004 Shell scripting in Linux Colin Jamison.
Shell Scripting – Putting it All Together. Agenda Escaping Characters Wildcards Redirecting Output Chaining and Conditional Chaining Unnamed and Named.
A simple classification problem Extract attributes Pattern Pattern recognition decision x C1 C2.
A brief introduction to javadoc and doxygen. What’s in a program file? 1. Comments 2. Code.
20081 Converting workspaces and using SALT & subversion to maintain them. V1.02.
Agenda Using vi Editor Starting vi Session Command / Input Modes Entering Text Editing Text Saving Edited File Aborting Editing Session.
Oct SALT in Dyalog V1.17. Oct Introduction SALT is a Simple APL Library Toolkit It is a source code management system for Classes and script-based.
SALT and Version Control How to handle projects using version controlled SALT V1.09.
Oct SALT in Dyalog Doc v1.18. Oct Introduction SALT is a Simple APL Library Toolkit It is a source code management system for objects with.
User Commands in Dyalog APL By Dan Baronet A programmer's tool - V1.03.
 Packages:  Scrapy, Beautiful Soup  Scrapy  Website  
Linux+ Guide to Linux Certification, Second Edition
In a number of script commands, you will have to mention filenames (pictures, etc.). For a picture, Eye and Pen will search in the “stimuli” folder. This.
Word 2010 Headers and Footers You can make your document look professional and polished by utilizing headers and footers. The header is a section of the.
Analyzing Code with CAST RPA SCAN. IDENTIFY. ACT..
Linux Administration Working with the BASH Shell.
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
Spice Spice in Dyalog V1.02. Oct Spice Utilities Spice is a cover for SALT. It uses an input area at the bottom of the screen to issue user defined.
Dept. of Computer & Information Sciences
How to link a test to a launcher (in this case a shell launcher)
INC 161 , CPE 100 Computer Programming
A Short DOS Presentation
Using a set-up file to read ASCII data into SPSS
Introduction to javadoc
Introduction to NetDB2 IST210.
Functions, Regular expressions and Events
CSCI N317 Computation for Scientific Applications Unit 1 – 1 MATLAB
Introduction to javadoc
Clip & Convert to ASCII Program Kelly Knapp Spring 2010
Presentation transcript:

Spice Spice in Dyalog V1.03

Sep Spice Utilities Spice is a user command handler. Under V11 & V12 it uses an input area at the bottom of the screen to issue user defined commands using SALT. It can be initialized directly from SALT:

Sep Initializing Spice Spice can be started automatically when starting APL by setting the SALT registry key AddSPICE to ‘1’

Sep Initializing Spice The Spice input area can also be started automatically by using the function in the SALT workspace: )LOAD SALT enableSpice

Sep Initializing the Spice area in V12 The configuration menu:

Sep Initializing Spice in V12.1 There is no need to initialize the Spice input area in The Spice user command handler is always available directly through the ] with Simply use ] where you would use the input area, e.g. ]mycmd

Sep Spice Help To get a list of all available commands you enter ]? or ‘?’ in the input area: ?

Sep Example of a custom Spice command: locate Use “locate string” to locate a regular expression string in SALT folders, e.g.: ]locate \babc>0$ Will find in SALT files where syntactic abc is greater than 0 at the end of a line.

Sep Using SALT commands in Spice All the SALT commands but New can be issued here, e.g.: ]save myclass file1 ]compare file1 -ver=4 ]list mine ]settings ]load myfile ]removeversions filex -v=<9

Sep How does Spice work? -Spice commands are kept in script files, like SALT. -Spice files have a.dyalog extension. -All Spice script files are kept by default in folder [Dyalog]\SALT\spice

Sep How does Spice work? Each script file contains a class with a number of (presumably) related commands. For example a script/class could contain 1.a command to search text 2.a command to replace text

Sep How does Spice work? A script file MUST contain at least 3 public shared functions for the Spice handler: 1.A function 2.A function 3.A function It may contain other functions.

Sep How does Spice work? The function The function is niladic. It returns a list of as many namespaces as there are commands in the script file. E.g.: if there are 2 commands in the script file it returns 2 namespaces.

Sep How does Spice work? The function Each namespace returned by contains 4 variables; each one is a string: 1.Name: the name of the command 2.Group: the group the command belongs to 3.Desc: a short description 4.Parse: the parsing rules

Sep How does Spice work? The function The 4 variables: 1.Name: a single word, e.g. locate 2.Group: a single word, e.g. files 3.Desc: a sentence, e.g. Find string in files 4.Parse: a string describing the command syntax, e.g. 2 –exclude=

Sep How does Spice work? The function (example with 2 cmds) ∇ r←List :Access Shared Public r← ⎕ NS¨2 ⍴⊂ '' r.Name←'Locate' 'Replace' r.Group← ⊂ 'Files' r.Parse←'1' '2' r[1].Desc←'Find a string in files' r[2].Desc←'Replace a string by another' ∇

Sep How does Spice work? The function The function is monadic. It takes a string naming the command to return detailed help for, e.g. locate It returns a string describing help for that command.

Sep How does Spice work? The function (example with 2 cmds) ∇ r←Help Cmd :Access Shared Public r←'' r,← ⊂ 'Arg: string; shows where the string is found' r,← ⊂ 'Arg: 2 strings; replace the first one by the other' r←r ⊃⍨ 'Locate' 'Replace' ⍳⊂ Cmd ∇

Sep How does Spice work? The function The function is monadic. It takes 2 arguments: 1.a string naming the command to deal with, e.g. locate 2.either a string or a namespace which is the argument to the command

Sep How does Spice work? The function (example with 2 cmds) ∇ r←Run(Cmd ca);ct;w :Access Shared Public r←0 0 ⍴ '' ⋄ ct← ⎕ SE.SALT.Load'Utils\fileUtils -noname' w←##.textUtils.splitOn ⍨⎕ SE.SALT.Settings'workdir' :Select Cmd :Case 1 ⊃ Fns ⋄ w ct.showExpr¨ ⊂ ca.Argument :Case 2 ⊃ Fns ⋄ w ct.replExpr¨ ⊂ ca.Argument :EndSelect ∇

Sep Example See script Spice\aSample.dyalog It contains 2 examples of Spice commands: 1.no parsing rules 2.with specific parsing rules

Sep Example The syntax is described in the help:

Sep Example If the syntax is wrong Spice will complain: No arguments!

Sep Example If the syntax is right Spice will do it:

Sep Spice command location When APL is installed Spice commands location is [Dyalog]\SALT\spice but you can change it. The SALT settings contain Spice’s commands location in cmddir: ]setting cmddir \my\own\user\cmds Will change the Spice/user commands folder to \my\own\user\cmds

Sep Special Spice command

Sep Final SPICE is a development tool. It can be used to store frequently used (and even less frequently used) user commands.

Sep Short Final More information can be found in the Spice document. Dyalog 2008