Adding Useful Smalltalk Methods to QuickSilver

February 16, 2011

New Smalltalk Methods in QuickSilver

New Smalltalk Methods in QuickSilver

http://www.silversmalltalk.com/

I have added several standard Smalltalk methods to QuickSilver and a few new ones:

Array class
new

Array
add:
collect:
concat:
do:
join
join:
list
pop
push:
reverse
select:
shift
size
slice:to:
sort
splice:with:with:
unshift

False
not

True
not

Number
even
odd
range
squared

<Number> range works like “range” in Python – it produces an array filled with numbers.
<Array> list is a convenience method – it lists an array to the Transcript.

Here is an example of how to list the squares of odd numbers between 1 and 100 in reverse order.

((100 range
select:[:x | x odd])
collect: [:x | x squared])
reverse list.
nil

QuickSilver is real Smalltalk:
— smaller footprint then jQuery
— faster than Squeak
— compiles to JavaScript
— MIT license
— targets browsers, iPhones, iPads, Androids, etc

The project is now only 17 days old – it is just getting started…

Advertisements

3 Responses to “Adding Useful Smalltalk Methods to QuickSilver”

  1. Andy Burnett Says:

    Peter, I have to say that your progress is absolutely amazing!

  2. Torsten Says:

    >faster than Squeak

    Can you tell us more
    – using which benchmark
    – which VM (Standard Squeak, Cog)

    Running on JS/Rhino is cool. Played with it too. Thanks for making this available.

    • Peter Fisk Says:

      Hi Torsten,

      I was using my own small numeric benchmark where QuickSilver was faster than Squeak by a factor of 10.

      It would be interesting to set up a formal benchmark to get a better comparison.

      QuickSilver compiles Smalltalk to JavaScript which is then compiled.

      So what is really being measured is the speed of Squeak versus JavaScript.

      And the latest JavaScript VM’s are very fast.

      — Peter


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: