While working on a Project Euler problem, I noticed that there weren't too many good introductions to Pharo (one of the few is here, working through the MOOC just to test Pharo is a big investment). If one is familiar with other Smalltalks, it is very straight-forward to download, install, and run from https://pharo.org/, however for someone new it isn't easy.
If someone wants to use the code from Agile Artificial Intelligence, or reading commonly published Smalltalk code, they should:
./pharo Pharo.image
should suffice System Browser
. An example is:_____________________________________________________________________________ |_____________________________________________________________________________| |Package_name|PENode |-- all -- |testRead3DirectionalFromLatice| |ProjEuler |PENodeTest |tests |testRead4DirectionalFromLatice| | |PESmallSumPathVisitor | |testSmallestSumPathPerformance| | |______________________| | | |____________|Hier|_|Class|_|Comment|__________|______________________________| |testSmallestSumPathPerformance | | | node | | | self timeLimit: 100 milliSeconds. | | node := PENode | | readFromLatice: | | '4445,2697,5115,718,2209,2212,654,4348,3079,6821 | -----------------------------------------------------------------------------
PENodeTest>>testSmallestSumPathPerformance
, the class is before the greater-than signs (PENodeTest
), and the method name is after them (testSmallestSumPathPerformance
). This applies to instance methods (to be send to an instance of the class). Class
button in the center of the browser will toggle to the class methods. It is generally listed as PENodeTest(class)>>New:
. The colon indicates that an argument is expected. Save
. When Pharo is started again with this image, everything (including the code) will be right where it was last saved.