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 Answers
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

- 6,306
- 1
- 31
- 37
-
thanks friend :) Suggesting I am using Squeak4.1, I open Transcript, and enter " (1+2) * 3" the result is 9 immediately after enter Ctrl+ p. Now the question is: Can I get the code for doing this simple calculation? I guess the calculating code also be implemented in small talk, right? so I can simulate the calculate code, – parsifal Feb 12 '11 at 08:55
-
Is there exsiting binary tree analysis for simple equation's Reverse Polish Notation? – parsifal Feb 12 '11 at 09:05
-
when refered to simple calculation, Kernel-Numbers category's Integer Class, protocol is arithmetic which I wanner to find, there exits method * +- / etc.like this – parsifal Feb 14 '11 at 06:03
-
@parsifal, from your first comment in here, I think you want to Debug the code instead of just running it. Try debugging it (it's in the context menu, and I think CTRL+D may be the shortcut), it will show you every method that gets executed for each message you send. – mgarciaisaia Apr 21 '13 at 23:22
Did you already read Squeak by Example?

- 15,847
- 1
- 38
- 65
-
1Squeak by Example hasn't been updated since 2009, Pharo by Example (http://pharobyexample.org/) is actively maintained. – Lukas Renggli Feb 11 '11 at 17:32
-
Squeak By Example is a good tutorial for man who dont touch with smalltalk like me. I have practiced it. – parsifal Feb 12 '11 at 08:26
-
Squeak by Example is a very useful book even today, at the end of 2019. – Nicola Mingotti Sep 07 '19 at 03:31
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

- 133
- 2
-
His videos rock. The ones about Connectors are especially capitivating. – Nicola Mingotti Sep 07 '19 at 03:28