Spice Spice in Dyalog V1.02. Oct 2008 2 Spice Utilities Spice is a cover for SALT. It uses an input area at the bottom of the screen to issue user defined.

Slides:



Advertisements
Similar presentations
Input, Process, Output, Storage and Feedback
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.
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.
Linux+ Guide to Linux Certification, Second Edition
CIS 101: Computer Programming and Problem Solving Lecture 4 Usman Roshan Department of Computer Science NJIT.
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.
1 Windows and Beginning Data Manipulation HRP223 – 2013 Oct 9, 2012 Copyright © Leland Stanford Junior University. All rights reserved. Warning:
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
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.
SALT and Version Control How to handle projects using version controlled SALT V1.06.
Avalanche Internet Data Management System. Presentation plan 1. The problem to be solved 2. Description of the software needed 3. The solution 4. Avalanche.
Introduction to Python
Week 7 Working with the BASH Shell. Objectives  Redirect the input and output of a command  Identify and manipulate common shell environment variables.
© 2004 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice SISP Training Documentation Template.
Introduction to Engineering MATLAB – 6 Script Files - 1 Agenda Script files.
Linux+ Guide to Linux Certification, Third Edition
Advanced Topics- Functions Introduction to MATLAB 7 Engineering 161.
Utilities in Dyalog APL Dan Baronet Boston 2011 V1.00 0Dyalog’11 - BostonUtilities.
Chapter 10: BASH Shell Scripting Fun with fi. In this chapter … Control structures File descriptors Variables.
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.
Chapter 2: Introduction to HyperMesh Process Auomation
CSE IntroductiontoDoxygen. Contents Introduction Main Steps for creating documentation Examples.
A brief introduction to javadoc and doxygen. What’s in a program file? 1. Comments 2. Code.
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
20081 Converting workspaces and using SALT & subversion to maintain them. V1.02.
Agenda Positional Parameters / Continued... Command Substitution Bourne Shell / Bash Shell / Korn Shell Mathematical Expressions Bourne Shell / Bash Shell.
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.
Linux+ Guide to Linux Certification, Second Edition
Linux Administration Working with the BASH Shell.
Dept. of Computer & Information Sciences
LINGO TUTORIAL.
Project 1: Part a SPECIFICATION
Autodesk Inventor 2008 Essentials Plus
Chapter Objectives In this chapter, you will learn:
Release Numbers MATLAB is updated regularly
Dreamweaver MX Lesson 14: Using Find and Replace.
Operating System Concepts
How to link a test to a launcher (in this case a shell launcher)
INC 161 , CPE 100 Computer Programming
A Short DOS Presentation
Guide To UNIX Using Linux Third Edition
Software Testing With Testopia
Basic operations in Matlab
PROGRAMMING THE BASH SHELL PART IV by İlker Korkmaz and Kaya Oğuz
Lecture Note Set 1 Thursday 12-May-05
Data File Import / Export
Introduction to Software Testing Chapter 5.1 Syntax-based Testing
User Defined Functions
Introduction to javadoc
Topics Introduction to File Input and Output
CS100J 26 April. Matlab Use help button!!! Variables, values, types
Functions, Regular expressions and Events
This presentation document has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational.
CSCI N317 Computation for Scientific Applications Unit 1 – 1 MATLAB
This presentation document has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational.
Introduction to javadoc
Introduction to Software Testing Chapter 5.1 Syntax-based Testing
Using Script Files and Managing Data
Scripts In Matlab.
Java Looking at our first console application in Eclipse
Unity Application Generator
Topics Introduction to File Input and Output
Clip & Convert to ASCII Program Kelly Knapp Spring 2010
Executive Reports, Instructions and Documentation
Presentation transcript:

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 commands using SALT. Spice can be initialized directly from SALT:

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

Oct Initializing Spice Spice can also be started automatically by using the function in the SALT workspace: )LOAD SALT enableSpice

Oct Initializing Spice in V12 The configuration menu:

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

Oct Example of a custom Spice command: locate Use “locate string” to locate a regular expression string in SALT folders, e.g.: locate \babc\b>0 Will find in SALT files where syntactic abc is greater than 0

Oct 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

Oct 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 in folder [Dyalog]\SALT\spice

Oct 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

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

Oct 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.

Oct 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

Oct 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=

Oct 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' ∇

Oct 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.

Oct 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 ∇

Oct 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

Oct 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 ∇

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

Oct Example The syntax is described in the help:

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

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

Oct Special Spice command When Spice starts a special command is run That command is 'Setup' It is found in spice\Setup.dyalog It can be modified to suit your needs

Oct Special Spice command

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

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