Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pharo Smalltalk Quick Reference Card

Tags:

pharo

I am trying to introduce some PHP developers Smalltalk.

I seem to remember that the old Pharo website had a link to a Pharo Smalltalk Quick Reference card. If you printed it out it would print on a 8.5 x 11 page - front and back. I can't seem to find this link anymore. Does anyone know where to find this?

like image 464
Brad Selfridge Avatar asked Sep 16 '25 08:09

Brad Selfridge


2 Answers

This post is probably what you are looking for. It seems unclear who the original author is or which version (there seem to be multiple ones) is the original one. See also this thread on the pharo-dev mailing list for a recent discussion on the topic (you'll find more references in that thread).

I'm copying the postcard code from that post here for completeness:

exampleWithNumber: x
    "A method that illustrates every part of Smalltalk method syntax
    except primitives. It has unary, binary, and keyboard messages,
    declares arguments and temporaries, accesses a global variable
    (but not an instance variable), uses literals (array, character,
    symbol, string, integer, float), uses the pseudo variables
    true, false, nil, self, and super, and has sequence, assignment,
    return and cascade. It has both zero argument and one argument blocks."
    | y |
    true & false not & (nil isNil) ifFalse: [self halt].
    y := self size + super size.
    #($a #a "a" 1 1.0)
        do: [ :each |
            Transcript show: (each class name);
                       show: ' '].
    ^x < y
like image 148
Max Leske Avatar answered Sep 18 '25 09:09

Max Leske


I think you are referring to Flyer Cheat Sheet

like image 34
Uko Avatar answered Sep 18 '25 10:09

Uko