[Newbies] How can I create a script from within a script?

Gary Dunn garydunnhi at gmail.com
Mon Feb 28 17:05:13 UTC 2011


The direct answer is thay it depends on how you design tour interpreter. In
Squeak we fiddle in a Workspace but that is not an interpreter. We invoke
the interpreter with do it or evaluate. In other scripting languages the
script is a file read by the interpreter.

In a smalltalk method, a statement begins with an object which receives
messages represented by the remaining items in the statement. Your Ellipse
would be such an object and it would have a method called forward.

The less direct answer is a comment. No need to create a scripting language
for kids because smalltalk is already that tool. Please read up on Squeaks
history, and its creator Alan Kay. Start with Wikipedia. Then dig into
Squeaks morphic interface  which removes most of the abstraction of
scripting. Then look at eToys. It's all there, a rich and delightful world
for children of all ages.

On Feb 28, 2011 6:31 AM, "Steve Thomas" <sthomas1 at gosargon.com> wrote:

I am playing with the idea of creating a scripting language for kids.

So given the script below p1 is being set to an object/Player named Ellipse:

script2
    | t1 t2 p1 |
    p1 := Ellipse
    t1 := 'forward'.
    t2 := 5

How can I get it to "do/execute": *p1 forward: 5*

Stephen

_______________________________________________
Beginners mailing list
Beginners at lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20110228/a898efcf/attachment.htm


More information about the Beginners mailing list