Squeak success story - Scripting for people without shell access.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Squeak success story - Scripting for people without shell access.

David Mitchell-10
I know probably everyone on this list has shell access on their box.
Most of us are developers, but I was reminded recently that not
everyone is in this boat.

At my work, a friend of mine in marketing needed a batch file. He
didn't know he needed a batch file, but he was doing a lot of manual
folder creation, copying, and renaming. He asked me for advice since
he knows I'm a geek.

I honestly was about to write him a DOS batch file and I noticed he
didn't have shell access. That also ruled out ruby, perl, etc for me
(since I don't know how to build something in those languages that
would run in something other than a shell).

He *could* run squeak (lucky for me I had a flash drive with Squeak on
it to test).

Later that evening, I decided to write something up in Rio. I started
with one of Pavel's kernel images and tried to load from there. Kept
getting the traits loading problems (which I thought would work in a
3.9 kernel) and I gave up on Rio without getting too far.

I really like the style of the messaging in Rio. Also, the wiki pages
on Rio are very helpful and helped me learn enough of FileMan to be
dangerous.

Anyway, ended up writing a little class that was the equivalent of my
batch file. Tested it and it worked fine. FileMan isn't as cool as
Rio, but the code I wrote was very simple.

To deliver the code, I put a Go button on the desktop and left my #go
method up in a browser. I bundled up Squeak.exe and an image, which
zipped to about 8MB. I didn't include sources or changes. 8MB is
ridiculous for a batch file, but my friend in marketing didn't mind. I
just handed him a flash drive and we copied it to his desktop.

Mind you, he'd never seen Squeak, Smalltalk, or any other programming
IDE. I had him associate the .image with Squeak and he knows to double
click the image. It opens up and he clicked Go.

With the color pretty-printer, he could see where in the script the
folder names were and he was able to change the folders around.
Learned he needed to save his changes and save the image. We made a
few modifications and up popped the debugger. Since I was still there,
I showed how to diagnose the problem and we continued. I'd love to say
continue worked, but since it was in some file primitive, we had to
restart from the top.

His thoughts...

Nothing about the 8MB

Nothing about the weird GUI

Just,  "This is so cool."

Was nice that the Squeak environment made it easy to build an ad-hoc
GUI (browser + button) that worked for scripting even if he was
"barred" from the shell.

Reply | Threaded
Open this post in threaded view
|

Re: Squeak success story - Scripting for people without shell access.

Lex Spoon-3
"David Mitchell" <[hidden email]> writes:

> His thoughts...
>
> Nothing about the 8MB
>
> Nothing about the weird GUI
>
> Just,  "This is so cool."
>
> Was nice that the Squeak environment made it easy to build an ad-hoc
> GUI (browser + button) that worked for scripting even if he was
> "barred" from the shell.

That sounds like some fun hacking, David!  I have had similar
experiences with people who have written some Matlab and/or Fortran,
but are not CS majors.  Squeak makes it easy to get in hack around,
without having to fool with PATH's and compilers and so on.

Lex



Reply | Threaded
Open this post in threaded view
|

Re: Squeak success story - Scripting for people without shell access.

Mikael Kindborg-2
In reply to this post by David Mitchell-10
2007/4/6, David Mitchell <[hidden email]>:
>
> Was nice that the Squeak environment made it easy to build an ad-hoc
> GUI (browser + button) that worked for scripting even if he was
> "barred" from the shell.
>

Great to hear it worked so well! That is a powerful aspect  having an
image, create a few UI-objects to make it easy to get going. No need
for installs or configs, what you need is there. Neat way to "package"
small tools and utilities like yours.

Best, Micke