SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
Smalltalk
      Serge Stinckwich
(Serge.Stinckwich@esug.org)
The origin of Smalltalk

          Alan Kay’s Dynabook project (1968)




                   Alto —!Xerox PARC (1973)
Smalltalk today
Smalltalk today
Smalltalk today
Smalltalk today
Smalltalk today
Squeak resources


 www.squeak.org               www.seaside.st

Downloads and links           One-click image


        SqueakByExample.org
   Free download — Print-on-demand
Getting started
Everything is an object
Everything happens by sending
          messages
Running Squeak
Do it, print it




You can evaluate any
expression anywhere
    in Smalltalk
Standard development tools
Debuggers, Inspectors, Explorers
Syntax in a Nutshell
Three kind of messages

                      5 factorial
Unary messages        Transcript cr


Binary messages          3+4



Keyword messages
                  3 raisedTo: 10 modulo: 5

                  Transcript show: 'hello world'
A typical method in the class Point
Method name      Argument               Comment


   <= aPoint
   ! quot;Answer whether the receiver is neither
   ! below nor to the right of aPoint.quot;

   ! ^ x <= aPoint x and: [y <= aPoint y]

 Return                                      Block
                 Binary message
   Instance variable            Keyword message




                         (2@3) <= (5@6)              true
Statements and cascades

   Temporary variables
                          Statement

        | p pen |
        p := 100@100.
        pen := Pen new.
        pen up.
        pen goto: p; down; goto: p+p

                         Cascade
Control structures
Every control structure is realized by message sends
            4 timesRepeat: [Beeper beep]




 max: aNumber
 ! ^ self < aNumber
 ! ! ifTrue: [aNumber]
 ! ! ifFalse: [self]
Control structures
Every control structure is realized by message sends
            4 timesRepeat: [Beeper beep]

                                                    Boolean
                                                ifTrue:ifFalse:


 max: aNumber                     True                                False
                         ifTrue:ifFalse:                     ifTrue:ifFalse:
 ! ^ self < aNumber
 ! ! ifTrue: [aNumber]
 ! ! ifFalse: [self]
                         ifTrue: t ifFalse: f                ifTrue: t ifFalse: f
                               ^ t value                           ^ f value
Creating classes
Send a message to a class (!)


        Number subclass: #Complex
        ! instanceVariableNames: 'real imaginary'
        ! classVariableNames: ''
        ! poolDictionaries: ''
        ! category: 'ComplexNumbers'
Smalltalk ressources

• Mailing-list : http://
   lists.squeakfoundation.org/mailman/listinfo/
   smalltalk-vn
• Smalltalk flyer translated in Vietnamese
• http://community.ofset.org/wiki/Squeak
Smalltalk  Bar Camp Hanoi 2009

Weitere ähnliche Inhalte

Ähnlich wie Smalltalk Bar Camp Hanoi 2009

Pharo, an innovative and open-source Smalltalk
Pharo, an innovative and open-source SmalltalkPharo, an innovative and open-source Smalltalk
Pharo, an innovative and open-source Smalltalk
Serge Stinckwich
 

Ähnlich wie Smalltalk Bar Camp Hanoi 2009 (20)

The Pharo Programming Language
The Pharo Programming LanguageThe Pharo Programming Language
The Pharo Programming Language
 
Pharo: Syntax in a Nutshell
Pharo: Syntax in a NutshellPharo: Syntax in a Nutshell
Pharo: Syntax in a Nutshell
 
Pharo, an innovative and open-source Smalltalk
Pharo, an innovative and open-source SmalltalkPharo, an innovative and open-source Smalltalk
Pharo, an innovative and open-source Smalltalk
 
Automatically Tolerating And Correcting Memory Errors
Automatically Tolerating And Correcting Memory ErrorsAutomatically Tolerating And Correcting Memory Errors
Automatically Tolerating And Correcting Memory Errors
 
Pharo Hands-On: 02 syntax
Pharo Hands-On: 02 syntaxPharo Hands-On: 02 syntax
Pharo Hands-On: 02 syntax
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
2013 lecture-02-syntax shortnewcut
2013 lecture-02-syntax shortnewcut2013 lecture-02-syntax shortnewcut
2013 lecture-02-syntax shortnewcut
 
Build a compiler using C#, Irony and RunSharp.
Build a compiler using C#, Irony and RunSharp.Build a compiler using C#, Irony and RunSharp.
Build a compiler using C#, Irony and RunSharp.
 
Pharo tutorial at ECOOP 2013
Pharo tutorial at ECOOP 2013Pharo tutorial at ECOOP 2013
Pharo tutorial at ECOOP 2013
 
Pharo tutorial at ECOOP 2013
Pharo tutorial at ECOOP 2013Pharo tutorial at ECOOP 2013
Pharo tutorial at ECOOP 2013
 
COG Back to the Future, Part II
COG Back to the Future, Part IICOG Back to the Future, Part II
COG Back to the Future, Part II
 
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...
Atmosphere Conference 2015: Need for Async: In pursuit of scalable internet-s...
 
ShellProgramming and Script in operating system
ShellProgramming and Script in operating systemShellProgramming and Script in operating system
ShellProgramming and Script in operating system
 
[C++] The Curiously Recurring Template Pattern: Static Polymorphsim and Expre...
[C++] The Curiously Recurring Template Pattern: Static Polymorphsim and Expre...[C++] The Curiously Recurring Template Pattern: Static Polymorphsim and Expre...
[C++] The Curiously Recurring Template Pattern: Static Polymorphsim and Expre...
 
XAML/C# to HTML/JS
XAML/C# to HTML/JSXAML/C# to HTML/JS
XAML/C# to HTML/JS
 
Pharo - I have a dream @ Smalltalks Conference 2009
Pharo -  I have a dream @ Smalltalks Conference 2009Pharo -  I have a dream @ Smalltalks Conference 2009
Pharo - I have a dream @ Smalltalks Conference 2009
 
Dynamic Python
Dynamic PythonDynamic Python
Dynamic Python
 
Section 8 Programming Style and Your Brain: Douglas Crockford
Section 8 Programming Style and Your Brain: Douglas CrockfordSection 8 Programming Style and Your Brain: Douglas Crockford
Section 8 Programming Style and Your Brain: Douglas Crockford
 
SPL 8 | Loop Statements in C
SPL 8 | Loop Statements in CSPL 8 | Loop Statements in C
SPL 8 | Loop Statements in C
 
Solid C++ by Example
Solid C++ by ExampleSolid C++ by Example
Solid C++ by Example
 

Mehr von Serge Stinckwich

A Graphical Language for Real-Time Critical Robot Commands
A Graphical Language for Real-Time Critical Robot CommandsA Graphical Language for Real-Time Critical Robot Commands
A Graphical Language for Real-Time Critical Robot Commands
Serge Stinckwich
 
Introduction to DYROS'10 Workshop
Introduction to DYROS'10 WorkshopIntroduction to DYROS'10 Workshop
Introduction to DYROS'10 Workshop
Serge Stinckwich
 
A DSL for the visualization of Multi-Robot Systems
A DSL for the visualization of Multi-Robot SystemsA DSL for the visualization of Multi-Robot Systems
A DSL for the visualization of Multi-Robot Systems
Serge Stinckwich
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
Serge Stinckwich
 
Visit to Vung Vieng Village - OLPC Vietnam
Visit to Vung Vieng Village - OLPC VietnamVisit to Vung Vieng Village - OLPC Vietnam
Visit to Vung Vieng Village - OLPC Vietnam
Serge Stinckwich
 
Smalltalk合同勉強会@名古屋 talk: Pharo introduction
Smalltalk合同勉強会@名古屋 talk: Pharo introductionSmalltalk合同勉強会@名古屋 talk: Pharo introduction
Smalltalk合同勉強会@名古屋 talk: Pharo introduction
Serge Stinckwich
 
An instrument whose music is ideas
An instrument whose music is ideasAn instrument whose music is ideas
An instrument whose music is ideas
Serge Stinckwich
 

Mehr von Serge Stinckwich (7)

A Graphical Language for Real-Time Critical Robot Commands
A Graphical Language for Real-Time Critical Robot CommandsA Graphical Language for Real-Time Critical Robot Commands
A Graphical Language for Real-Time Critical Robot Commands
 
Introduction to DYROS'10 Workshop
Introduction to DYROS'10 WorkshopIntroduction to DYROS'10 Workshop
Introduction to DYROS'10 Workshop
 
A DSL for the visualization of Multi-Robot Systems
A DSL for the visualization of Multi-Robot SystemsA DSL for the visualization of Multi-Robot Systems
A DSL for the visualization of Multi-Robot Systems
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
 
Visit to Vung Vieng Village - OLPC Vietnam
Visit to Vung Vieng Village - OLPC VietnamVisit to Vung Vieng Village - OLPC Vietnam
Visit to Vung Vieng Village - OLPC Vietnam
 
Smalltalk合同勉強会@名古屋 talk: Pharo introduction
Smalltalk合同勉強会@名古屋 talk: Pharo introductionSmalltalk合同勉強会@名古屋 talk: Pharo introduction
Smalltalk合同勉強会@名古屋 talk: Pharo introduction
 
An instrument whose music is ideas
An instrument whose music is ideasAn instrument whose music is ideas
An instrument whose music is ideas
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

Smalltalk Bar Camp Hanoi 2009