21st Century Smalltalk

March 3, 2007

First Flash Smalltalk Test

Filed under: Adobe, Vista Smalltalk — pfisk @ 10:16 pm

lisptest15
Vista Smalltalk Site

To run the above demo, open a Smalltalk workspace, enter the sample code, and choose “Do It” or “Show It” from the right-button menu - you can open Vista Smalltalk in your browser here.

This is an initial test of Smalltalk in Flash.

The Smalltalk reader is complete but the parser can currently only recognize messages of the form <receiver selector args> where <receiver> is either a global variable or a constant.

It will take several more days before the parser is complete.

As I discussed in an earlier blog, the Smalltalk reader is an instance of the Lisp reader with its “read table” initialized for a different syntax. The parser is a set of Lisp functions which transform the token list produced by the reader into a series of Lisp message sending expressions - and these are then evaluated by the interpreter.

Once the Smalltalk is a little more solid, I will create some examples built around the graphic animation capabilities.

12 Comments »

  1. Peter,

    Thank you, thank you, thank you. The demo code and the Smalltalk Workspace work great on my Windows XP box running Firefox 2.0.0.2/Flash 9.0.

    Keep up the great work!!!!

    celeron504

    Comment by celeron504 — March 4, 2007 @ 3:16 am

  2. Now we are talking !! :-)

    Comment by Andy Burnett — March 4, 2007 @ 9:24 am

  3. Peter,

    I have been watching your progress with growing amazement. I run the demo code inside Firfox and Safari on Mac OS-x and on a Parallels VM running XP and Internet Explorer. I look forward to every new instalment you send out. Keep up the good work and thanks very much.

    Shongololo

    Comment by Shongololo — March 4, 2007 @ 3:44 pm

  4. Going back to an old post of yours for the 15 puzzle, I am intrigued by how your Smalltalk
    implementation has under 1/10 the lines of code compared to C#/XAML. I posted earlier having
    troubles running stuff but now I worked past it to be able to run Smalltalk and Lisp Workspace with basic code.
    I still have problems running WPF code though in the Smalltalk workspace. Can you help me out?
    Is the issue that the WPF/e lacks something you require, and I have to load a full WPF version a
    nd can’t use the slim down WPF/e version alone?

    Comment by David — March 5, 2007 @ 6:25 am

  5. Now that this is starting to look like a language I can work with :-) Is there anything I can do to help the project. I don’t claim any great technical skills, but I can happily help to build up class libraries – maybe converting them from Squeak or whatever – and likewise I am very happy to help on building up the documentation.

    Comment by Andy Burnett — March 5, 2007 @ 2:14 pm

  6. David,
    Could you give me an example of what you are trying to run?

    The Vista Smalltalk versions that have been posted use the full WPF libraries. WPF/e doesn’t have any support yet for programs (like Vst) that are written in C#.

    Comment by pfisk — March 5, 2007 @ 2:17 pm

  7. Andy,
    Once the basics are finished (probably by the end of this week), I would be glad of any help in creating example and documentation.
    Thanks for the offer.

    Comment by pfisk — March 5, 2007 @ 2:21 pm

  8. Peter,

    I am running your 1/07/2007 Rotating text block WPF code in a Smalltalk Workspace, after launching the url http://vistascript.net/vistascript/vsb/Vsb.xbap. Nothing happens after I select the code below and right click “Do it”. Non WPF smalltalk code does run.

    | canvas textbox |
    canvas := Canvas new.
    canvas background: Brushes ivory.
    0 to: 359 by: 18 do:[:angle |
    textbox := TextBlock new: ‘ Vista Smalltalk’.
    textbox renderTransform: (RotateTransform new: angle).
    textbox renderTransformOrigin: (Point x: 0 y: 0.5).
    textbox fontSize: 30.
    textbox foreground: (angle \\ 36 = 0
    ifTrue: [Brushes blue]
    ifFalse: [Brushes green]).
    Canvas setLeft: textbox to: 200; setTop: textbox to: 200.
    canvas add: textbox].
    OnePane openOn: canvas

    Comment by david bibayoff — March 5, 2007 @ 6:39 pm

  9. Peter,

    On my last post concerning not being able to ru WPF code, I failed to mention that I have WPF Microsoft .NET 3.0 framework, Feb CTP of WPF/e, and Visual Studio 2005 extensions for .NET framework 3.0 installed on my box.

    Comment by david — March 5, 2007 @ 7:03 pm

  10. David,
    I was able to run the above code in an IE7 browser and also on the desktop.
    http://vistascript.net/vistascript/vsb/Vsb.xbap

    Perhaps you are having a problem because of the “quote” signs around the text in: >

    Make sure that they are single quotes – whenever I cut and paste code from this site both single and double quotes tend to get mangled.

    Let me know if is still doesn’t work.

    Comment by pfisk — March 6, 2007 @ 3:50 pm

  11. Peter,

    Bingo, your suggestion worked using single quotes. Thanks. :)

    Comment by david — March 6, 2007 @ 7:00 pm

  12. Link is broken :(

    Comment by David Zmick — August 29, 2008 @ 4:17 am


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.