Does sample code exist for Squeak Smalltalk?

1.3k Views Asked by At

can anybody give some hints on squeaksource or things like that, they can provide mcz sample code focuse on simple add, reduce, multiplication, division calculation?

3

There are 3 best solutions below

4
On BEST ANSWER

http://www.world.st/ is an awesome access point for all things Smalltalk. It has links to many free books, including Stephan's excellent suggestion. There are also links to many Smalltalk mailing lists, like the Squeak beginners list, where you can get many basic (and not so basic) questions answered.

It's hard to answer very general questions (like yours). If you are more specific, you'll get better answers. Especially if you try something on your own first and then explain what you did and where you got stuck.

UPDATE:

It seems you're asking if you can see what's going on behind the scenes when code is executed. In the Browser, you can choose to see the bytecodes that it's compiled into.

In your (1+2) * 3 example, if you save this in a method, and click the "source" button in the Browser ("view" in OmniBrowser), and choose "byteCodes", you will see:

17 <76> pushConstant: 1
18 <77> pushConstant: 2
19 <B0> send: +
20 <20> pushConstant: 3
21 <B8> send: *
22 <87> pop
23 <78> returnSelf
3
On

Did you already read Squeak by Example?

1
On

While its not really sample code, my video tutorial series, Squeak from the very start, may give you insights: http://www.youtube.com/playlist?list=PL6601A198DF14788D&feature=viewall