SlideShare a Scribd company logo
st_launcher
Tonel-based Smalltalk shell
scripts
Dale Henrichs
GemTalk Systems
ESUG 2019
#!/usr/local/bin/smalltalk/gemstone/st_launcher
"
Hello world smalltalk script
"
Class {
#name : 'StLauncher_Hello',
#superclass : 'AbstractProgram',
#category : 'st_launcher-Scripts'
}
{ #category : 'main' }
StLauncher_Hello >> main [
^'hello world'
]
Motivation
● No more bash scripts
● https://github.com/GsDevKit/GsDevKit_home
– 50+ bash scripts
– reimplement using Smalltalk scripts
● `topaz solo` introduced in GemStone
3.5.0
– No more excuses not to get started
GemStone Solo sessions
#!/usr/bin/env topaz
set u DataCurator p swordfish
set solologin on
login
run
GsFile stdout nextPutAll: ‘hello world’; lf
%
● #!/usr/bin/env topaz
– `topaz` in $PATH
– $GEMSTONE env var defined
– `topaz` runs against extent file associated
with $GEMSTONE
Pharo scale
https://github.com/guillep/Scale
#!/usr/bin/env scale
system stdout nextPutAll: 'hello world'; lf.
● #!/usr/bin/env scale
– `scale` in $PATH
– Scripts run using the image associated
with `scale` executable
st_launcher scripts
● #!/usr/local/bin/smalltalk/gemstone/st_launcher
#!/usr/local/bin/smalltalk/gemstone/st_launcher
"
Hello world smalltalk script
"
Class {
#name : 'StLauncher_Hello',
#superclass : 'AbstractProgram',
#category : 'st_launcher-Scripts'
}
{ #category : 'main' }
StLauncher_Hello >> main [
self stdout nextPutAll: 'hello world'; lf
]
“Image Names”
for flexibility
● Scripts run in Pharo or Gemstone images
defined by a unique “image name”
● Dialect, vm, and image information is
registered by “image name”
hello.st [ [ <image-name> ] [-H] [-D] [-V] [ <st-vm-args> ] -- ] <script options>
st_launcher
image name registry
~/.config/st_launcher/st_launcher.ston
StLauncherStructureProperties {
#defaultImageName : 'gemstone',
#homePath : '$ST_LAUNCHER_HOME',
#imageMap : {
'gemstone' : '$ST_LAUNCHER_HOME/images/gemstone',
'pharo' : '$GS_HOME/shared/repos/st_launcher/home/images/pharo',
'pharo-dev' : '$ST_LAUNCHER_HOME/images/pharo',
'pharo-dev-ui' : '$ST_LAUNCHER_HOME/images/pharo',
'pharo-ui' : '$ST_LAUNCHER_HOME/images/pharo',
'rowan_dev_350' : '$GS_HOME/server/stones/rowan_dev_350',
'st_launcher_350' : '$GS_HOME/server/stones/st_launcher_350'
},
#name : 'st_launcher_home',
#productMap : {
'gemstone' : {
'3.5.0' : '$ST_LAUNCHER_HOME/platforms/gemstone/products/GemStone64Bit3.5.0',
},
'pharo' : {
'70-64' : '$ST_LAUNCHER_HOME/platforms/pharo/70-64'
} } }
st_launcher
image name registry
~/.config/st_launcher/st_launcher.ston
StLauncherStructureProperties {
#defaultImageName : 'gemstone',
#homePath : '$ST_LAUNCHER_HOME',
#imageMap : {
'gemstone' : '$ST_LAUNCHER_HOME/images/gemstone',
'pharo' : '$GS_HOME/shared/repos/st_launcher/home/images/pharo',
'pharo-dev' : '$ST_LAUNCHER_HOME/images/pharo',
'pharo-dev-ui' : '$ST_LAUNCHER_HOME/images/pharo',
'pharo-ui' : '$ST_LAUNCHER_HOME/images/pharo',
'rowan_dev_350' : '$GS_HOME/server/stones/rowan_dev_350',
'st_launcher_350' : '$GS_HOME/server/stones/st_launcher_350'
},
#name : 'st_launcher_home',
#productMap : {
'gemstone' : {
'3.5.0' : '$ST_LAUNCHER_HOME/platforms/gemstone/products/GemStone64Bit3.5.0',
},
'pharo' : {
'70-64' : '$ST_LAUNCHER_HOME/platforms/pharo/70-64'
} } }
st_launcher image properties
(gemstone solo)
StLauncherGemStoneSoloImageProperties {
#aliasProperties : {
'gemstone_DataCurator' : { 'topazini' : '.topazini_DataCurator' }
},
#binPath : 'bin',
#comment : 'default GemStone image',
#gemstoneVersion : '3.5.0',
#imagePath : '$ST_LAUNCHER_HOME/images/gemstone',
#logsPath : 'logs',
#name : 'gemstone',
#productPath : '$ST_LAUNCHER_HOME/platforms/gemstone/products/GemStone64Bit3.5.0',
#snapshotsPath : 'snapshots',
#soloSnapshot : '$ST_LAUNCHER_HOME/images/gemstone/snapshots/extent0.gemstone.dbf',
#structureName : 'st_launcher_home'
}
st_launcher image properties
(gemstone)
StLauncherGemStoneImageProperties {
#aliasProperties : {
'st_launcher_350' : { 'cacheName' : 'Zoro' }
},
#backupsPath : 'backups',
#binPath : 'bin',
#comment : 'development image for st_launcher',
#extentsPath : 'extents',
#gemstoneVersion : '3.5.0',
#imagePath : '$GS_HOME/server/stones/st_launcher_350',
#logsPath : 'logs',
#name : 'st_launcher_350',
#productPath : '$ST_LAUNCHER_HOME/platforms/gemstone/products/GemStone64Bit3.5.0’,
#snapshotsPath : 'snapshots',
#statsPath : 'stats',
#structureName : 'st_launcher_home',
#tranlogsPath : 'tranlogs'
}
st_launcher image properties
(pharo)
StLauncherPharoImageProperties {
#aliasProperties : {
'pharo-ui' : { 'headless' : false },
'pharo-dev' : { 'pharoImageName' : 'pharo.dev.image' },
'pharo-dev-ui' : {
'headless' : false,
'pharoImageName' : 'pharo.dev.image' }
},
#comment : 'default pharo image',
#imagePath : '$ST_LAUNCHER_HOME/images/pharo',
#pharoVersion : '70-64',
#name : 'pharo',
#productPath : '$ST_LAUNCHER_HOME/platforms/pharo/70-64',
#structureName : 'st_launcher_home'
}
st_launcher image properties
aliases
StLauncherPharoImageProperties {
#aliasProperties : {
'pharo-ui' : { 'headless' : false },
'pharo-dev' : { 'pharoImageName' : 'pharo.dev.image' },
'pharo-dev-ui' : {
'headless' : false,
'pharoImageName' : 'pharo.dev.image' }
},
#comment : 'default pharo image',
#imagePath : '$ST_LAUNCHER_HOME/images/pharo',
#pharoVersion : '70-64',
#name : 'pharo',
#productPath : '$ST_LAUNCHER_HOME/platforms/pharo/70-64',
#structureName : 'st_launcher_home'
}
Advantages of class-based
scripts
● Structure for organizing script
functionality (superior to workspace)
● Inherited behavior for
– options and argument handling
– Help/usage generation
● First class object in image
– Create and maintain script using
traditional browser and tools
– Senders/implementors
st_launcher
help textNAME
hello.st - Hello world smalltalk script....
SYNOPSIS
hello.st [ [ <image-name> ] [-H] [-D] [-V] [ <st-vm-args> ] -- ] <script options>
----------
hello.st [ -h | --help ] [ --imageProperties ]
DESCRIPTION
Hello world smalltalk script
--help
display this message
--imageProperties
return (on objOut) the image properties object for the image running
this script
<image-name>
name of the st_launcher image to be used to run the script. If
no <image-name> is specified the default image will be used.
-H
help. st_launcher script interpreter help message
-D
debug. bring up debugger if an error occurs while running script
-V
verbose. display more detail about script interpreter execution
<st-vm-args>
smalltalk vm specific arguments passed directly to vm when launching script
EXAMPLES
hello.st -h
hello.st --help
hello.st --imageProperties
hello.st pharo -- --imageProperties
hello.st
#!/usr/local/bin/smalltalk/gemstone/st_launcher
"
Hello world smalltalk script
"
Class {
#name : 'StLauncher_Hello',
#superclass : 'AbstractProgram',
#category : 'st_launcher-Scripts'
}
{ #category : 'main' }
StLauncher_Hello >> main [
self stdout nextPutAll: 'hello world'; lf
]
#!/usr/local/bin/smalltalk/gemstone/st_launcher
"
bug sript utility template
--install
Install any additional code that may be needed to reproduce bug.
--clean
Remove any persistent objects used to reproduce bug.
--create
Create the initial conditions needed to reproduce bug.
--boom
Trigger the bug.
"
Class {
#name : 'WS_BugTemplate',
#superclass : 'AbstractProgram',
#category : 'st_launcher-Workspaces'
}
{ #category : 'accessing' }
WS_BugTemplate >> boom [
"recreate bug here"
]
{ #category : 'accessing' }
WS_BugTemplate >> clean [
"clean up indexes here"
]
{ #category : 'accessing' }
WS_BugTemplate >> create [
"set up for recrating the bug here"
]
{ #category : 'accessing' }
WS_BugTemplate >> install [
"install supporting code here"
]
{ #category : 'main' }
WS_BugTemplate >> main [
"return status objects ... if needed"
]
{ #category : 'options' }
WS_BugTemplate >> scriptMethodOptions [
^ super scriptMethodOptions,
{
#('boom' nil #'none' #boom).
#('clean' nil #'none' #clean).
#('create' nil #'none' #create).
#('install' nil #'none' #install).
}
]
{ #category : 'usage' }
WS_BugTemplate >> usageExamples: scriptName [
^ scriptName, ' --install
', scriptName, ' --clean --create --boom
', scriptName, ' --clean --create
', scriptName, ' --boom
'
]
{ #category : 'usage' }
WS_BugTemplate >> usageSynopsis: scriptName [
^ (super usageSynopsis: scriptName), ' [ --install ] [ --clean ] [ --create ] [ --boom ]'
]
st_launcher
Usage
Options Declaration
Script Body
NAME
bug.st - bug sript utility template....
SYNOPSIS
bug.st [ [ <image-name> ] [-H] [-D] [-V] [ <st-vm-args> ] -- ] <script options>
----------
bug.st [ -h | --help ] [ --imageProperties ] [ --install ] [ --clean ] [ --create ] [ --boom ]
DESCRIPTION
bug sript utility template
--install
Install any additional code that may be needed to reproduce bug.
--clean
Remove any persistent objects used to reproduce bug.
--create
Create the initial conditions needed to reproduce bug.
--boom
Trigger the bug.
--help
display this message
--imageProperties
return (on objOut) the image properties object for the image running
this script
<image-name>
name of the st_launcher image to be used to run the script. If
no <image-name> is specified the default image will be used.
-H
help. st_launcher script interpreter help message
-D
debug. bring up debugger if an error occurs while running script
-V
verbose. display more detail about script interpreter execution
<st-vm-args>
smalltalk vm specific arguments passed directly to vm when launching script
EXAMPLES
bug.st -h
bug.st --help
bug.st --imageProperties
bug.st pharo -- --imageProperties
bug.st --install
bug.st --clean --create --boom
bug.st --clean --create
bug.st --boom
st_launcher
NAME
bug.st - bug sript utility template....
SYNOPSIS
bug.st [ [ <image-name> ] [-H] [-D] [-V] [ <st-vm-args> ] -- ] <script options>
----------
bug.st [ -h | --help ] [ --imageProperties ] [ --install ] [ --clean ] [ --create ] [ --boom ]
DESCRIPTION
bug sript utility template
--install
Install any additional code that may be needed to reproduce bug.
--clean
Remove any persistent objects used to reproduce bug.
--create
Create the initial conditions needed to reproduce bug.
--boom
Trigger the bug.
--help
display this message
--imageProperties
return (on objOut) the image properties object for the image running
this script
<image-name>
name of the st_launcher image to be used to run the script. If
no <image-name> is specified the default image will be used.
-H
help. st_launcher script interpreter help message
-D
debug. bring up debugger if an error occurs while running script
-V
verbose. display more detail about script interpreter execution
<st-vm-args>
smalltalk vm specific arguments passed directly to vm when launching script
EXAMPLES
bug.st -h
bug.st --help
bug.st --imageProperties
bug.st pharo -- --imageProperties
bug.st --install
bug.st --clean --create --boom
bug.st --clean --create
bug.st --boom
Usage: SYNOPSIS
bug.st [ -h | --help ] [ --imageProperties ] [ --install ] [ --clean ] [ --create ] [ --boom ]
st_launcher
NAME
bug.st - bug sript utility template....
SYNOPSIS
bug.st [ [ <image-name> ] [-H] [-D] [-V] [ <st-vm-args> ] -- ] <script options>
----------
bug.st [ -h | --help ] [ --imageProperties ] [ --install ] [ --clean ] [ --create ] [ --boom ]
DESCRIPTION
bug sript utility template
--install
Install any additional code that may be needed to reproduce bug.
--clean
Remove any persistent objects used to reproduce bug.
--create
Create the initial conditions needed to reproduce bug.
--boom
Trigger the bug.
--help
display this message
--imageProperties
return (on objOut) the image properties object for the image running
this script
<image-name>
name of the st_launcher image to be used to run the script. If
no <image-name> is specified the default image will be used.
-H
help. st_launcher script interpreter help message
-D
debug. bring up debugger if an error occurs while running script
-V
verbose. display more detail about script interpreter execution
<st-vm-args>
smalltalk vm specific arguments passed directly to vm when launching script
EXAMPLES
bug.st -h
bug.st --help
bug.st --imageProperties
bug.st pharo -- --imageProperties
bug.st --install
bug.st --clean --create --boom
bug.st --clean --create
bug.st --boom
Usage: DESCRIPTION
bug sript utility template
--install
Install any additional code that may be needed to reproduce bug.
--clean
Remove any persistent objects used to reproduce bug.
--create
Create the initial conditions needed to reproduce bug.
--boom
Trigger the bug.
st_launcher
NAME
bug.st - bug sript utility template....
SYNOPSIS
bug.st [ [ <image-name> ] [-H] [-D] [-V] [ <st-vm-args> ] -- ] <script options>
----------
bug.st [ -h | --help ] [ --imageProperties ] [ --install ] [ --clean ] [ --create ] [ --boom ]
DESCRIPTION
bug sript utility template
--install
Install any additional code that may be needed to reproduce bug.
--clean
Remove any persistent objects used to reproduce bug.
--create
Create the initial conditions needed to reproduce bug.
--boom
Trigger the bug.
--help
display this message
--imageProperties
return (on objOut) the image properties object for the image running
this script
<image-name>
name of the st_launcher image to be used to run the script. If
no <image-name> is specified the default image will be used.
-H
help. st_launcher script interpreter help message
-D
debug. bring up debugger if an error occurs while running script
-V
verbose. display more detail about script interpreter execution
<st-vm-args>
smalltalk vm specific arguments passed directly to vm when launching script
EXAMPLES
bug.st -h
bug.st --help
bug.st --imageProperties
bug.st pharo -- --imageProperties
bug.st --install
bug.st --clean --create --boom
bug.st --clean --create
bug.st --boom
Usage: EXAMPLES
bug.st -h
bug.st --help
bug.st --imageProperties
bug.st pharo -- --imageProperties
bug.st --install
bug.st --clean --create --boom
bug.st --clean --create
bug.st --boom
Usage
#!/usr/local/bin/smalltalk/gemstone/st_launcher
"
bug sript utility template
--install
Install any additional code that may be needed to reproduce bug.
--clean
Remove any persistent objects used to reproduce bug.
--create
Create the initial conditions needed to reproduce bug.
--boom
Trigger the bug.
"
Class {
#name : 'WS_BugTemplate',
#superclass : 'AbstractProgram',
#category : 'st_launcher-Workspaces'
}
{ #category : 'accessing' }
WS_BugTemplate >> boom [
"recreate bug here"
]
{ #category : 'accessing' }
WS_BugTemplate >> clean [
"clean up indexes here"
]
{ #category : 'accessing' }
WS_BugTemplate >> create [
"set up for recrating the bug here"
]
{ #category : 'accessing' }
WS_BugTemplate >> install [
"install supporting code here"
]
{ #category : 'main' }
WS_BugTemplate >> main [
"return status objects ... if needed"
]
{ #category : 'options' }
WS_BugTemplate >> scriptMethodOptions [
^ super scriptMethodOptions,
{
#('boom' nil #'none' #boom).
#('clean' nil #'none' #clean).
#('create' nil #'none' #create).
#('install' nil #'none' #install).
}
]
{ #category : 'usage' }
WS_BugTemplate >> usageExamples: scriptName [
^ scriptName, ' --install
', scriptName, ' --clean --create --boom
', scriptName, ' --clean --create
', scriptName, ' --boom
'
]
{ #category : 'usage' }
WS_BugTemplate >> usageSynopsis: scriptName [
^ (super usageSynopsis: scriptName), ' [ --install ] [ --clean ] [ --create ] [ --boom ]'
]
“
bug sript utility template
--install
Install any additional code that may be needed to reproduce bug.
--clean
Remove any persistent objects used to reproduce bug.
--create
Create the initial conditions needed to reproduce bug.
--boom
Trigger the bug.
“
WS_BugTemplate >> usageSynopsis: scriptName [
^ (super usageSynopsis: scriptName), ' [ --install ] [ --clean ] [ --create ] [ --boom ]'
]
WS_BugTemplate >> usageExamples: scriptName [
^ scriptName, ' --install
', scriptName, ' --clean --create --boom
', scriptName, ' --clean --create
', scriptName, ' --boom
'
]
st_launcher
Options declaration
#!/usr/local/bin/smalltalk/gemstone/st_launcher
"
bug sript utility template
--install
Install any additional code that may be needed to reproduce bug.
--clean
Remove any persistent objects used to reproduce bug.
--create
Create the initial conditions needed to reproduce bug.
--boom
Trigger the bug.
"
Class {
#name : 'WS_BugTemplate',
#superclass : 'AbstractProgram',
#category : 'st_launcher-Workspaces'
}
{ #category : 'accessing' }
WS_BugTemplate >> boom [
"recreate bug here"
]
{ #category : 'accessing' }
WS_BugTemplate >> clean [
"clean up indexes here"
]
{ #category : 'accessing' }
WS_BugTemplate >> create [
"set up for recrating the bug here"
]
{ #category : 'accessing' }
WS_BugTemplate >> install [
"install supporting code here"
]
{ #category : 'main' }
WS_BugTemplate >> main [
"return status objects ... if needed"
]
{ #category : 'options' }
WS_BugTemplate >> scriptMethodOptions [
^ super scriptMethodOptions,
{
#('boom' nil #'none' #boom).
#('clean' nil #'none' #clean).
#('create' nil #'none' #create).
#('install' nil #'none' #install).
}
]
{ #category : 'usage' }
WS_BugTemplate >> usageExamples: scriptName [
^ scriptName, ' --install
', scriptName, ' --clean --create --boom
', scriptName, ' --clean --create
', scriptName, ' --boom
'
]
{ #category : 'usage' }
WS_BugTemplate >> usageSynopsis: scriptName [
^ (super usageSynopsis: scriptName), ' [ --install ] [ --clean ] [ --create ] [ --boom ]'
]
WS_ >> scriptMethodOptions [
^ super scriptMethodOptions,
{
#('boom' nil #'none' #boom).
#('clean' nil #'none' #clean).
#('create' nil #'none' #create).
#('install' nil #'none' #install).
}
]
st_launcher
Script body
#!/usr/local/bin/smalltalk/gemstone/st_launcher
"
bug sript utility template
--install
Install any additional code that may be needed to reproduce bug.
--clean
Remove any persistent objects used to reproduce bug.
--create
Create the initial conditions needed to reproduce bug.
--boom
Trigger the bug.
"
Class {
#name : 'WS_BugTemplate',
#superclass : 'AbstractProgram',
#category : 'st_launcher-Workspaces'
}
{ #category : 'accessing' }
WS_BugTemplate >> boom [
"recreate bug here"
]
{ #category : 'accessing' }
WS_BugTemplate >> clean [
"clean up indexes here"
]
{ #category : 'accessing' }
WS_BugTemplate >> create [
"set up for recrating the bug here"
]
{ #category : 'accessing' }
WS_BugTemplate >> install [
"install supporting code here"
]
{ #category : 'main' }
WS_BugTemplate >> main [
"return status objects ... if needed"
]
{ #category : 'options' }
WS_BugTemplate >> scriptMethodOptions [
^ super scriptMethodOptions,
{
#('boom' nil #'none' #boom).
#('clean' nil #'none' #clean).
#('create' nil #'none' #create).
#('install' nil #'none' #install).
}
]
{ #category : 'usage' }
WS_BugTemplate >> usageExamples: scriptName [
^ scriptName, ' --install
', scriptName, ' --clean --create --boom
', scriptName, ' --clean --create
', scriptName, ' --boom
'
]
{ #category : 'usage' }
WS_BugTemplate >> usageSynopsis: scriptName [
^ (super usageSynopsis: scriptName), ' [ --install ] [ --clean ] [ --create ] [ --boom ]'
]
{ #category : 'accessing' }
WS_BugTemplate >> boom [
"recreate bug here"
]
{ #category : 'accessing' }
WS_BugTemplate >> clean [
"clean up indexes here"
]
{ #category : 'accessing' }
WS_BugTemplate >> create [
"set up for recreating the bug here"
]
{ #category : 'accessing' }
WS_BugTemplate >> install [
"install supporting code here"
]
{ #category : 'main' }
WS_BugTemplate >> main [
"return status objects ... if needed"
]
st_launcher
Jadeite (Rowan) browser
Additional st_launcher
Script Features
● objIn/objOut
● Live debugger for script errors
Demos
Shell interpreter
● Bash program (right now)
● Runs the default image to translate the
imageName into a command line for
the correct vm/image that are needed
to run the script
● Executes the generated command line
Tonel class file loading
for execution
● Parse Tonel class file
● Create class definition
– MCClassDefinition in Pharo
– RowanClassDefinition in GemStone
● Load class definition
Tonel class file loading
as package
● Not implemented in Pharo
● GemStone
– Rowan Tonel parser and loader preserve
the shebang line in a class property on
read/load
– On write the shebang line is added back
to the file
Project Status
https://github.com/dalehenrich/st_launcher
● Currently in alpha
● If you are interested, I invite
collaborators to contribute ideas and
code
 st_launcher: Tonel-based Smalltalk shell Scripts

More Related Content

PDF
Drehbuch zum Talk "Rapid Prototyping mit PHP Frameworks"
PDF
Puppet modules for Fun and Profit
PDF
Writing and Publishing Puppet Modules - PuppetConf 2014
PDF
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
PPTX
Django web framework
PDF
Android Best Practices
PDF
Non stop random2b
PDF
The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...
Drehbuch zum Talk "Rapid Prototyping mit PHP Frameworks"
Puppet modules for Fun and Profit
Writing and Publishing Puppet Modules - PuppetConf 2014
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
Django web framework
Android Best Practices
Non stop random2b
The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...

What's hot (20)

KEY
Api Design
PPTX
ES6 and BEYOND
PDF
Zf2 how arrays will save your project
KEY
Beginner's Sinatra
PDF
mapserver_install_linux
PDF
Ember background basics
PDF
RubyEnRails2007 - Dr Nic Williams - DIY Syntax
KEY
jQuery Anti-Patterns for Performance & Compression
PDF
Alfredo-PUMEX
PDF
Modular and Event-Driven JavaScript
PDF
前端MVC 豆瓣说
PDF
FITC Web Unleashed 2017 - Introduction to the World of Testing for Front-End ...
PDF
An Introduction to the World of Testing for Front-End Developers
PDF
Yearning jQuery
TXT
Command GM
PDF
Developing for Plone using ArchGenXML / ArgoUML
PDF
Is HTML5 Ready? (workshop)
PDF
Marrow: A Meta-Framework for Python 2.6+ and 3.1+
PPTX
Troubleshooting Puppet
PDF
Security 202 - Are you sure your site is secure?
Api Design
ES6 and BEYOND
Zf2 how arrays will save your project
Beginner's Sinatra
mapserver_install_linux
Ember background basics
RubyEnRails2007 - Dr Nic Williams - DIY Syntax
jQuery Anti-Patterns for Performance & Compression
Alfredo-PUMEX
Modular and Event-Driven JavaScript
前端MVC 豆瓣说
FITC Web Unleashed 2017 - Introduction to the World of Testing for Front-End ...
An Introduction to the World of Testing for Front-End Developers
Yearning jQuery
Command GM
Developing for Plone using ArchGenXML / ArgoUML
Is HTML5 Ready? (workshop)
Marrow: A Meta-Framework for Python 2.6+ and 3.1+
Troubleshooting Puppet
Security 202 - Are you sure your site is secure?
Ad

Similar to st_launcher: Tonel-based Smalltalk shell Scripts (20)

PDF
Javascript is your (Auto)mate
PDF
Great Developers Steal
PDF
Functional testing with capybara
PDF
Vagrant for real
PDF
PhpBB meets Symfony2
PDF
A General Purpose Docker Image for PHP
PDF
Zero-config JavaScript apps with RaveJS -- SVCC fall 2014
PDF
Charla EHU Noviembre 2014 - Desarrollo Web
PDF
Scripting for infosecs
PDF
Testing your infrastructure with litmus
PDF
Get Grulping with JavaScript Task Runners (Matt Gifford)
PDF
Web development automatisation for fun and profit (Artem Daniliants)
KEY
Railsconf2011 deployment tips_for_slideshare
PDF
Migrating Legacy Rails Apps to Rails 3
PDF
Web development - technologies and tools
PDF
Isolated development in python
TXT
Hello click click boom
KEY
Quality Use Of Plugin
PPTX
How I Built a Power Debugger Out of the Standard Library and Things I Found o...
PDF
May The Nodejs Be With You
Javascript is your (Auto)mate
Great Developers Steal
Functional testing with capybara
Vagrant for real
PhpBB meets Symfony2
A General Purpose Docker Image for PHP
Zero-config JavaScript apps with RaveJS -- SVCC fall 2014
Charla EHU Noviembre 2014 - Desarrollo Web
Scripting for infosecs
Testing your infrastructure with litmus
Get Grulping with JavaScript Task Runners (Matt Gifford)
Web development automatisation for fun and profit (Artem Daniliants)
Railsconf2011 deployment tips_for_slideshare
Migrating Legacy Rails Apps to Rails 3
Web development - technologies and tools
Isolated development in python
Hello click click boom
Quality Use Of Plugin
How I Built a Power Debugger Out of the Standard Library and Things I Found o...
May The Nodejs Be With You
Ad

More from ESUG (20)

PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
PDF
Directing Generative AI for Pharo Documentation
PDF
Even Lighter Than Lightweiht: Augmenting Type Inference with Primitive Heuris...
PDF
Composing and Performing Electronic Music on-the-Fly with Pharo and Coypu
PDF
Gamifying Agent-Based Models in Cormas: Towards the Playable Architecture for...
PDF
Analysing Python Machine Learning Notebooks with Moose
PDF
FASTTypeScript metamodel generation using FAST traits and TreeSitter project
PDF
Migrating Katalon Studio Tests to Playwright with Model Driven Engineering
PDF
Package-Aware Approach for Repository-Level Code Completion in Pharo
PDF
Evaluating Benchmark Quality: a Mutation-Testing- Based Methodology
PDF
An Analysis of Inline Method Refactoring
PDF
Identification of unnecessary object allocations using static escape analysis
PDF
Control flow-sensitive optimizations In the Druid Meta-Compiler
PDF
Clean Blocks (IWST 2025, Gdansk, Poland)
PDF
Encoding for Objects Matters (IWST 2025)
PDF
Challenges of Transpiling Smalltalk to JavaScript
PDF
Immersive experiences: what Pharo users do!
PDF
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
PDF
Cavrois - an Organic Window Management (ESUG 2025)
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
Micromaid: A simple Mermaid-like chart generator for Pharo
Directing Generative AI for Pharo Documentation
Even Lighter Than Lightweiht: Augmenting Type Inference with Primitive Heuris...
Composing and Performing Electronic Music on-the-Fly with Pharo and Coypu
Gamifying Agent-Based Models in Cormas: Towards the Playable Architecture for...
Analysing Python Machine Learning Notebooks with Moose
FASTTypeScript metamodel generation using FAST traits and TreeSitter project
Migrating Katalon Studio Tests to Playwright with Model Driven Engineering
Package-Aware Approach for Repository-Level Code Completion in Pharo
Evaluating Benchmark Quality: a Mutation-Testing- Based Methodology
An Analysis of Inline Method Refactoring
Identification of unnecessary object allocations using static escape analysis
Control flow-sensitive optimizations In the Druid Meta-Compiler
Clean Blocks (IWST 2025, Gdansk, Poland)
Encoding for Objects Matters (IWST 2025)
Challenges of Transpiling Smalltalk to JavaScript
Immersive experiences: what Pharo users do!
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
Cavrois - an Organic Window Management (ESUG 2025)

Recently uploaded (20)

PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
top salesforce developer skills in 2025.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
System and Network Administration Chapter 2
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
medical staffing services at VALiNTRY
PPTX
Introduction to Artificial Intelligence
PDF
Nekopoi APK 2025 free lastest update
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Essential Infomation Tech presentation.pptx
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
history of c programming in notes for students .pptx
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Internet Downloader Manager (IDM) Crack 6.42 Build 41
top salesforce developer skills in 2025.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
System and Network Administration Chapter 2
Design an Analysis of Algorithms II-SECS-1021-03
medical staffing services at VALiNTRY
Introduction to Artificial Intelligence
Nekopoi APK 2025 free lastest update
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
L1 - Introduction to python Backend.pptx
Essential Infomation Tech presentation.pptx
Navsoft: AI-Powered Business Solutions & Custom Software Development
Which alternative to Crystal Reports is best for small or large businesses.pdf
How to Migrate SBCGlobal Email to Yahoo Easily
CHAPTER 2 - PM Management and IT Context
history of c programming in notes for students .pptx
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...

st_launcher: Tonel-based Smalltalk shell Scripts

  • 1. st_launcher Tonel-based Smalltalk shell scripts Dale Henrichs GemTalk Systems ESUG 2019 #!/usr/local/bin/smalltalk/gemstone/st_launcher " Hello world smalltalk script " Class { #name : 'StLauncher_Hello', #superclass : 'AbstractProgram', #category : 'st_launcher-Scripts' } { #category : 'main' } StLauncher_Hello >> main [ ^'hello world' ]
  • 2. Motivation ● No more bash scripts ● https://github.com/GsDevKit/GsDevKit_home – 50+ bash scripts – reimplement using Smalltalk scripts ● `topaz solo` introduced in GemStone 3.5.0 – No more excuses not to get started
  • 3. GemStone Solo sessions #!/usr/bin/env topaz set u DataCurator p swordfish set solologin on login run GsFile stdout nextPutAll: ‘hello world’; lf % ● #!/usr/bin/env topaz – `topaz` in $PATH – $GEMSTONE env var defined – `topaz` runs against extent file associated with $GEMSTONE
  • 4. Pharo scale https://github.com/guillep/Scale #!/usr/bin/env scale system stdout nextPutAll: 'hello world'; lf. ● #!/usr/bin/env scale – `scale` in $PATH – Scripts run using the image associated with `scale` executable
  • 5. st_launcher scripts ● #!/usr/local/bin/smalltalk/gemstone/st_launcher #!/usr/local/bin/smalltalk/gemstone/st_launcher " Hello world smalltalk script " Class { #name : 'StLauncher_Hello', #superclass : 'AbstractProgram', #category : 'st_launcher-Scripts' } { #category : 'main' } StLauncher_Hello >> main [ self stdout nextPutAll: 'hello world'; lf ]
  • 6. “Image Names” for flexibility ● Scripts run in Pharo or Gemstone images defined by a unique “image name” ● Dialect, vm, and image information is registered by “image name” hello.st [ [ <image-name> ] [-H] [-D] [-V] [ <st-vm-args> ] -- ] <script options>
  • 7. st_launcher image name registry ~/.config/st_launcher/st_launcher.ston StLauncherStructureProperties { #defaultImageName : 'gemstone', #homePath : '$ST_LAUNCHER_HOME', #imageMap : { 'gemstone' : '$ST_LAUNCHER_HOME/images/gemstone', 'pharo' : '$GS_HOME/shared/repos/st_launcher/home/images/pharo', 'pharo-dev' : '$ST_LAUNCHER_HOME/images/pharo', 'pharo-dev-ui' : '$ST_LAUNCHER_HOME/images/pharo', 'pharo-ui' : '$ST_LAUNCHER_HOME/images/pharo', 'rowan_dev_350' : '$GS_HOME/server/stones/rowan_dev_350', 'st_launcher_350' : '$GS_HOME/server/stones/st_launcher_350' }, #name : 'st_launcher_home', #productMap : { 'gemstone' : { '3.5.0' : '$ST_LAUNCHER_HOME/platforms/gemstone/products/GemStone64Bit3.5.0', }, 'pharo' : { '70-64' : '$ST_LAUNCHER_HOME/platforms/pharo/70-64' } } }
  • 8. st_launcher image name registry ~/.config/st_launcher/st_launcher.ston StLauncherStructureProperties { #defaultImageName : 'gemstone', #homePath : '$ST_LAUNCHER_HOME', #imageMap : { 'gemstone' : '$ST_LAUNCHER_HOME/images/gemstone', 'pharo' : '$GS_HOME/shared/repos/st_launcher/home/images/pharo', 'pharo-dev' : '$ST_LAUNCHER_HOME/images/pharo', 'pharo-dev-ui' : '$ST_LAUNCHER_HOME/images/pharo', 'pharo-ui' : '$ST_LAUNCHER_HOME/images/pharo', 'rowan_dev_350' : '$GS_HOME/server/stones/rowan_dev_350', 'st_launcher_350' : '$GS_HOME/server/stones/st_launcher_350' }, #name : 'st_launcher_home', #productMap : { 'gemstone' : { '3.5.0' : '$ST_LAUNCHER_HOME/platforms/gemstone/products/GemStone64Bit3.5.0', }, 'pharo' : { '70-64' : '$ST_LAUNCHER_HOME/platforms/pharo/70-64' } } }
  • 9. st_launcher image properties (gemstone solo) StLauncherGemStoneSoloImageProperties { #aliasProperties : { 'gemstone_DataCurator' : { 'topazini' : '.topazini_DataCurator' } }, #binPath : 'bin', #comment : 'default GemStone image', #gemstoneVersion : '3.5.0', #imagePath : '$ST_LAUNCHER_HOME/images/gemstone', #logsPath : 'logs', #name : 'gemstone', #productPath : '$ST_LAUNCHER_HOME/platforms/gemstone/products/GemStone64Bit3.5.0', #snapshotsPath : 'snapshots', #soloSnapshot : '$ST_LAUNCHER_HOME/images/gemstone/snapshots/extent0.gemstone.dbf', #structureName : 'st_launcher_home' }
  • 10. st_launcher image properties (gemstone) StLauncherGemStoneImageProperties { #aliasProperties : { 'st_launcher_350' : { 'cacheName' : 'Zoro' } }, #backupsPath : 'backups', #binPath : 'bin', #comment : 'development image for st_launcher', #extentsPath : 'extents', #gemstoneVersion : '3.5.0', #imagePath : '$GS_HOME/server/stones/st_launcher_350', #logsPath : 'logs', #name : 'st_launcher_350', #productPath : '$ST_LAUNCHER_HOME/platforms/gemstone/products/GemStone64Bit3.5.0’, #snapshotsPath : 'snapshots', #statsPath : 'stats', #structureName : 'st_launcher_home', #tranlogsPath : 'tranlogs' }
  • 11. st_launcher image properties (pharo) StLauncherPharoImageProperties { #aliasProperties : { 'pharo-ui' : { 'headless' : false }, 'pharo-dev' : { 'pharoImageName' : 'pharo.dev.image' }, 'pharo-dev-ui' : { 'headless' : false, 'pharoImageName' : 'pharo.dev.image' } }, #comment : 'default pharo image', #imagePath : '$ST_LAUNCHER_HOME/images/pharo', #pharoVersion : '70-64', #name : 'pharo', #productPath : '$ST_LAUNCHER_HOME/platforms/pharo/70-64', #structureName : 'st_launcher_home' }
  • 12. st_launcher image properties aliases StLauncherPharoImageProperties { #aliasProperties : { 'pharo-ui' : { 'headless' : false }, 'pharo-dev' : { 'pharoImageName' : 'pharo.dev.image' }, 'pharo-dev-ui' : { 'headless' : false, 'pharoImageName' : 'pharo.dev.image' } }, #comment : 'default pharo image', #imagePath : '$ST_LAUNCHER_HOME/images/pharo', #pharoVersion : '70-64', #name : 'pharo', #productPath : '$ST_LAUNCHER_HOME/platforms/pharo/70-64', #structureName : 'st_launcher_home' }
  • 13. Advantages of class-based scripts ● Structure for organizing script functionality (superior to workspace) ● Inherited behavior for – options and argument handling – Help/usage generation ● First class object in image – Create and maintain script using traditional browser and tools – Senders/implementors
  • 14. st_launcher help textNAME hello.st - Hello world smalltalk script.... SYNOPSIS hello.st [ [ <image-name> ] [-H] [-D] [-V] [ <st-vm-args> ] -- ] <script options> ---------- hello.st [ -h | --help ] [ --imageProperties ] DESCRIPTION Hello world smalltalk script --help display this message --imageProperties return (on objOut) the image properties object for the image running this script <image-name> name of the st_launcher image to be used to run the script. If no <image-name> is specified the default image will be used. -H help. st_launcher script interpreter help message -D debug. bring up debugger if an error occurs while running script -V verbose. display more detail about script interpreter execution <st-vm-args> smalltalk vm specific arguments passed directly to vm when launching script EXAMPLES hello.st -h hello.st --help hello.st --imageProperties hello.st pharo -- --imageProperties hello.st #!/usr/local/bin/smalltalk/gemstone/st_launcher " Hello world smalltalk script " Class { #name : 'StLauncher_Hello', #superclass : 'AbstractProgram', #category : 'st_launcher-Scripts' } { #category : 'main' } StLauncher_Hello >> main [ self stdout nextPutAll: 'hello world'; lf ]
  • 15. #!/usr/local/bin/smalltalk/gemstone/st_launcher " bug sript utility template --install Install any additional code that may be needed to reproduce bug. --clean Remove any persistent objects used to reproduce bug. --create Create the initial conditions needed to reproduce bug. --boom Trigger the bug. " Class { #name : 'WS_BugTemplate', #superclass : 'AbstractProgram', #category : 'st_launcher-Workspaces' } { #category : 'accessing' } WS_BugTemplate >> boom [ "recreate bug here" ] { #category : 'accessing' } WS_BugTemplate >> clean [ "clean up indexes here" ] { #category : 'accessing' } WS_BugTemplate >> create [ "set up for recrating the bug here" ] { #category : 'accessing' } WS_BugTemplate >> install [ "install supporting code here" ] { #category : 'main' } WS_BugTemplate >> main [ "return status objects ... if needed" ] { #category : 'options' } WS_BugTemplate >> scriptMethodOptions [ ^ super scriptMethodOptions, { #('boom' nil #'none' #boom). #('clean' nil #'none' #clean). #('create' nil #'none' #create). #('install' nil #'none' #install). } ] { #category : 'usage' } WS_BugTemplate >> usageExamples: scriptName [ ^ scriptName, ' --install ', scriptName, ' --clean --create --boom ', scriptName, ' --clean --create ', scriptName, ' --boom ' ] { #category : 'usage' } WS_BugTemplate >> usageSynopsis: scriptName [ ^ (super usageSynopsis: scriptName), ' [ --install ] [ --clean ] [ --create ] [ --boom ]' ] st_launcher Usage Options Declaration Script Body NAME bug.st - bug sript utility template.... SYNOPSIS bug.st [ [ <image-name> ] [-H] [-D] [-V] [ <st-vm-args> ] -- ] <script options> ---------- bug.st [ -h | --help ] [ --imageProperties ] [ --install ] [ --clean ] [ --create ] [ --boom ] DESCRIPTION bug sript utility template --install Install any additional code that may be needed to reproduce bug. --clean Remove any persistent objects used to reproduce bug. --create Create the initial conditions needed to reproduce bug. --boom Trigger the bug. --help display this message --imageProperties return (on objOut) the image properties object for the image running this script <image-name> name of the st_launcher image to be used to run the script. If no <image-name> is specified the default image will be used. -H help. st_launcher script interpreter help message -D debug. bring up debugger if an error occurs while running script -V verbose. display more detail about script interpreter execution <st-vm-args> smalltalk vm specific arguments passed directly to vm when launching script EXAMPLES bug.st -h bug.st --help bug.st --imageProperties bug.st pharo -- --imageProperties bug.st --install bug.st --clean --create --boom bug.st --clean --create bug.st --boom
  • 16. st_launcher NAME bug.st - bug sript utility template.... SYNOPSIS bug.st [ [ <image-name> ] [-H] [-D] [-V] [ <st-vm-args> ] -- ] <script options> ---------- bug.st [ -h | --help ] [ --imageProperties ] [ --install ] [ --clean ] [ --create ] [ --boom ] DESCRIPTION bug sript utility template --install Install any additional code that may be needed to reproduce bug. --clean Remove any persistent objects used to reproduce bug. --create Create the initial conditions needed to reproduce bug. --boom Trigger the bug. --help display this message --imageProperties return (on objOut) the image properties object for the image running this script <image-name> name of the st_launcher image to be used to run the script. If no <image-name> is specified the default image will be used. -H help. st_launcher script interpreter help message -D debug. bring up debugger if an error occurs while running script -V verbose. display more detail about script interpreter execution <st-vm-args> smalltalk vm specific arguments passed directly to vm when launching script EXAMPLES bug.st -h bug.st --help bug.st --imageProperties bug.st pharo -- --imageProperties bug.st --install bug.st --clean --create --boom bug.st --clean --create bug.st --boom Usage: SYNOPSIS bug.st [ -h | --help ] [ --imageProperties ] [ --install ] [ --clean ] [ --create ] [ --boom ]
  • 17. st_launcher NAME bug.st - bug sript utility template.... SYNOPSIS bug.st [ [ <image-name> ] [-H] [-D] [-V] [ <st-vm-args> ] -- ] <script options> ---------- bug.st [ -h | --help ] [ --imageProperties ] [ --install ] [ --clean ] [ --create ] [ --boom ] DESCRIPTION bug sript utility template --install Install any additional code that may be needed to reproduce bug. --clean Remove any persistent objects used to reproduce bug. --create Create the initial conditions needed to reproduce bug. --boom Trigger the bug. --help display this message --imageProperties return (on objOut) the image properties object for the image running this script <image-name> name of the st_launcher image to be used to run the script. If no <image-name> is specified the default image will be used. -H help. st_launcher script interpreter help message -D debug. bring up debugger if an error occurs while running script -V verbose. display more detail about script interpreter execution <st-vm-args> smalltalk vm specific arguments passed directly to vm when launching script EXAMPLES bug.st -h bug.st --help bug.st --imageProperties bug.st pharo -- --imageProperties bug.st --install bug.st --clean --create --boom bug.st --clean --create bug.st --boom Usage: DESCRIPTION bug sript utility template --install Install any additional code that may be needed to reproduce bug. --clean Remove any persistent objects used to reproduce bug. --create Create the initial conditions needed to reproduce bug. --boom Trigger the bug.
  • 18. st_launcher NAME bug.st - bug sript utility template.... SYNOPSIS bug.st [ [ <image-name> ] [-H] [-D] [-V] [ <st-vm-args> ] -- ] <script options> ---------- bug.st [ -h | --help ] [ --imageProperties ] [ --install ] [ --clean ] [ --create ] [ --boom ] DESCRIPTION bug sript utility template --install Install any additional code that may be needed to reproduce bug. --clean Remove any persistent objects used to reproduce bug. --create Create the initial conditions needed to reproduce bug. --boom Trigger the bug. --help display this message --imageProperties return (on objOut) the image properties object for the image running this script <image-name> name of the st_launcher image to be used to run the script. If no <image-name> is specified the default image will be used. -H help. st_launcher script interpreter help message -D debug. bring up debugger if an error occurs while running script -V verbose. display more detail about script interpreter execution <st-vm-args> smalltalk vm specific arguments passed directly to vm when launching script EXAMPLES bug.st -h bug.st --help bug.st --imageProperties bug.st pharo -- --imageProperties bug.st --install bug.st --clean --create --boom bug.st --clean --create bug.st --boom Usage: EXAMPLES bug.st -h bug.st --help bug.st --imageProperties bug.st pharo -- --imageProperties bug.st --install bug.st --clean --create --boom bug.st --clean --create bug.st --boom
  • 19. Usage #!/usr/local/bin/smalltalk/gemstone/st_launcher " bug sript utility template --install Install any additional code that may be needed to reproduce bug. --clean Remove any persistent objects used to reproduce bug. --create Create the initial conditions needed to reproduce bug. --boom Trigger the bug. " Class { #name : 'WS_BugTemplate', #superclass : 'AbstractProgram', #category : 'st_launcher-Workspaces' } { #category : 'accessing' } WS_BugTemplate >> boom [ "recreate bug here" ] { #category : 'accessing' } WS_BugTemplate >> clean [ "clean up indexes here" ] { #category : 'accessing' } WS_BugTemplate >> create [ "set up for recrating the bug here" ] { #category : 'accessing' } WS_BugTemplate >> install [ "install supporting code here" ] { #category : 'main' } WS_BugTemplate >> main [ "return status objects ... if needed" ] { #category : 'options' } WS_BugTemplate >> scriptMethodOptions [ ^ super scriptMethodOptions, { #('boom' nil #'none' #boom). #('clean' nil #'none' #clean). #('create' nil #'none' #create). #('install' nil #'none' #install). } ] { #category : 'usage' } WS_BugTemplate >> usageExamples: scriptName [ ^ scriptName, ' --install ', scriptName, ' --clean --create --boom ', scriptName, ' --clean --create ', scriptName, ' --boom ' ] { #category : 'usage' } WS_BugTemplate >> usageSynopsis: scriptName [ ^ (super usageSynopsis: scriptName), ' [ --install ] [ --clean ] [ --create ] [ --boom ]' ] “ bug sript utility template --install Install any additional code that may be needed to reproduce bug. --clean Remove any persistent objects used to reproduce bug. --create Create the initial conditions needed to reproduce bug. --boom Trigger the bug. “ WS_BugTemplate >> usageSynopsis: scriptName [ ^ (super usageSynopsis: scriptName), ' [ --install ] [ --clean ] [ --create ] [ --boom ]' ] WS_BugTemplate >> usageExamples: scriptName [ ^ scriptName, ' --install ', scriptName, ' --clean --create --boom ', scriptName, ' --clean --create ', scriptName, ' --boom ' ]
  • 20. st_launcher Options declaration #!/usr/local/bin/smalltalk/gemstone/st_launcher " bug sript utility template --install Install any additional code that may be needed to reproduce bug. --clean Remove any persistent objects used to reproduce bug. --create Create the initial conditions needed to reproduce bug. --boom Trigger the bug. " Class { #name : 'WS_BugTemplate', #superclass : 'AbstractProgram', #category : 'st_launcher-Workspaces' } { #category : 'accessing' } WS_BugTemplate >> boom [ "recreate bug here" ] { #category : 'accessing' } WS_BugTemplate >> clean [ "clean up indexes here" ] { #category : 'accessing' } WS_BugTemplate >> create [ "set up for recrating the bug here" ] { #category : 'accessing' } WS_BugTemplate >> install [ "install supporting code here" ] { #category : 'main' } WS_BugTemplate >> main [ "return status objects ... if needed" ] { #category : 'options' } WS_BugTemplate >> scriptMethodOptions [ ^ super scriptMethodOptions, { #('boom' nil #'none' #boom). #('clean' nil #'none' #clean). #('create' nil #'none' #create). #('install' nil #'none' #install). } ] { #category : 'usage' } WS_BugTemplate >> usageExamples: scriptName [ ^ scriptName, ' --install ', scriptName, ' --clean --create --boom ', scriptName, ' --clean --create ', scriptName, ' --boom ' ] { #category : 'usage' } WS_BugTemplate >> usageSynopsis: scriptName [ ^ (super usageSynopsis: scriptName), ' [ --install ] [ --clean ] [ --create ] [ --boom ]' ] WS_ >> scriptMethodOptions [ ^ super scriptMethodOptions, { #('boom' nil #'none' #boom). #('clean' nil #'none' #clean). #('create' nil #'none' #create). #('install' nil #'none' #install). } ]
  • 21. st_launcher Script body #!/usr/local/bin/smalltalk/gemstone/st_launcher " bug sript utility template --install Install any additional code that may be needed to reproduce bug. --clean Remove any persistent objects used to reproduce bug. --create Create the initial conditions needed to reproduce bug. --boom Trigger the bug. " Class { #name : 'WS_BugTemplate', #superclass : 'AbstractProgram', #category : 'st_launcher-Workspaces' } { #category : 'accessing' } WS_BugTemplate >> boom [ "recreate bug here" ] { #category : 'accessing' } WS_BugTemplate >> clean [ "clean up indexes here" ] { #category : 'accessing' } WS_BugTemplate >> create [ "set up for recrating the bug here" ] { #category : 'accessing' } WS_BugTemplate >> install [ "install supporting code here" ] { #category : 'main' } WS_BugTemplate >> main [ "return status objects ... if needed" ] { #category : 'options' } WS_BugTemplate >> scriptMethodOptions [ ^ super scriptMethodOptions, { #('boom' nil #'none' #boom). #('clean' nil #'none' #clean). #('create' nil #'none' #create). #('install' nil #'none' #install). } ] { #category : 'usage' } WS_BugTemplate >> usageExamples: scriptName [ ^ scriptName, ' --install ', scriptName, ' --clean --create --boom ', scriptName, ' --clean --create ', scriptName, ' --boom ' ] { #category : 'usage' } WS_BugTemplate >> usageSynopsis: scriptName [ ^ (super usageSynopsis: scriptName), ' [ --install ] [ --clean ] [ --create ] [ --boom ]' ] { #category : 'accessing' } WS_BugTemplate >> boom [ "recreate bug here" ] { #category : 'accessing' } WS_BugTemplate >> clean [ "clean up indexes here" ] { #category : 'accessing' } WS_BugTemplate >> create [ "set up for recreating the bug here" ] { #category : 'accessing' } WS_BugTemplate >> install [ "install supporting code here" ] { #category : 'main' } WS_BugTemplate >> main [ "return status objects ... if needed" ]
  • 23. Additional st_launcher Script Features ● objIn/objOut ● Live debugger for script errors
  • 24. Demos
  • 25. Shell interpreter ● Bash program (right now) ● Runs the default image to translate the imageName into a command line for the correct vm/image that are needed to run the script ● Executes the generated command line
  • 26. Tonel class file loading for execution ● Parse Tonel class file ● Create class definition – MCClassDefinition in Pharo – RowanClassDefinition in GemStone ● Load class definition
  • 27. Tonel class file loading as package ● Not implemented in Pharo ● GemStone – Rowan Tonel parser and loader preserve the shebang line in a class property on read/load – On write the shebang line is added back to the file
  • 28. Project Status https://github.com/dalehenrich/st_launcher ● Currently in alpha ● If you are interested, I invite collaborators to contribute ideas and code