Professional Documents
Culture Documents
A Powerful, Intuitive,
All-In-One Scripting Tool
Imagine
"Coherence."
— James Huang
"Chemistry."
— James Huang
POSITIVE!
db::prepareCall:
{ call test_proc( :pIO, :pIn, :pOut) };
x = null;
y = 'abcd';
db::sql with @pIO :int <=> x,
@pIn :varchar = y,
@pOut:varchar => z;
println 'x = ', x;
println 'z = ', z;
db::disconnect;
do src as sgml { … }
do src as xml { … }
do src as jsp { … }
arch = createZip(zipName);
copy '*.java, *.properties' except '*/save/*, *~'
in 'c:/src' recursive into arch under 'src';
copy '*' except '*/save/*'
in 'e:/doc' recursive into arch under 'doc';
//copy more trees ...
arch.close();
listFiles 'com/judoscript/*.java'
in 'c:/src' recursive as tree;
for f in $_.bfsAllNodes() { println f.path; }
f = openTextFile('foo.txt', 'w');
println<f> 'Lah lah lah lah laah lah.';
f.close();
sw = createStringWriter();
for x from 1 to 10 { println<sw> '#', x, ' '; };
println sw.toString();
import javax.swing.*;
frm = new java::JFrame('Simplest GUI');
frm.setVisible(true);
import javax.swing.*;
arr = new java::Button[5];
arr[0] = new java::Button('button 1');
arr[1] = new java::Button('button 2');
import java.sql.Types;
for sqlType in [ 'BIT', 'TINYINT', 'SMALLINT' ] {
println sqlType, ' = ', Types.(sqlType);
}
arr = [ 4, 2, 7, 5, 10, 9 ];
println 'Length: ', arr.length();
println 'Sorted: ', arr.sortAsNumber();
println 'CSV: ', arr.concat(',');
println '[2,3]: ', arr.subarray(2,3);
println 'Average: ', arr.average();
hib::delete:
from TestSimpleTypes o
where o.id>:startIdx and o.id<:endIdx
; with startIdx:Long=11, endIdx:Long=13;
workbooks = xl.Workbooks;
workbook = workbooks.Add;
sheet = workbook.ActiveSheet;
a1 = sheet['Range', 'A1'];
a2 = sheet['Range', 'A2'];
a1.Value = 123.456;
a2.Formula = '=A1*2';
println 'a1: ', a1.Value, ' a2: ', a2.Value;
workbook.Close();
xl.Quit();
Copyright 2005 James J.B. Huang 86
Topic: Internet Clients
[sql] SQL scripting [hib] Hibernate scripting
[sgml] SGML/XML scripting [wsdl] WSDL scripting
[fs] F.S. and archives [com] MS COM scripting
[io] I/O and logging [net] Internet clients
[exec] Run executables [mail] Send mail
[java] Potent Java scripting [gui] GUI scripting
[prog] Powerful algorithmic and [ant] Ant task scripting
O-O programming [misc] Other features
gui::events {
<frame : Window : windowClosing>: exit 0;
}
fname = '/usr/bin/judo';
anttask::<basename property="b.name" file="${fname}"/>
println 'Base name: ', ${b.name};
anttask::<taskdef name="judo"
classname="com.judoscript.AntJudoScriptTask" />
anttask::<judo>
println 'Judo-in-Ant-in-Judo, a.k.a. AntBurger!';
</judo>
Essential Programming
Common Utility
Programming Languages
Use Cases
Use Cases
Extension JudoScript
Mechanism (A Useable Language)
“Cute”
Programming Scripting Real-World
Use Cases Languages Use Cases