Pharo Hands-On: 01 welcome

Preview:

Citation preview

Hands-On Pharo: Get ready hacking in one day

http://stephane.ducasse.free.fr http://www.pharo.org

Getting the Feelof Pharo

http://stephane.ducasse.free.fr http://www.pharo.org

Objectives

What is Pharo/Objectives

Get the feel

Model/Syntax

Testing / Saving / Finding information

Coding

Wrap-up

What is it?

Language + Environment Simple Language Object-Oriented, Dynamic, Reflective Explore + Change running systems Live Programming

Pharo100% MIT license Pure object language Great community of active doers (70 committers in Pharo 40) Powerful Elegant and fun to program Living system under your fingers Mac, Linux, Android, iOS, Windows

Some projectsWeb frameworks - Seaside, iliad, HTTP2, Tide, Aida, Mustache, Oauth, WebSocket CSS styling Format parsers - XML, HTML, NeoJSON, NeoCSV. Application Security, Graphics frameworks - Roassal, Mondrian, EyeSee, GraphET, Tool builders - Glamour, Spec, XUL, MacNative, Databases - DBXTalk, Mongo, Riak, CouchDB, MySql, PunQLite. Object-Oriented databases - Magma, Goods. Database abstraction - Voyage, ROE MetaCompiler - Petit Parser, SmaCC - Proxy, Logging - SystemLogger, Toothpick, SimpleLogger Units: Aconcagua, Units Time - Chronos Calendars, Timezones Productivity Tools - Codecritics, Refactorings, Cherry picking merge tools: merge tool, Komitter Versionner, Mock frameworks (baby mock), PDFgeneration - Artefact, Testing frameworks - PhExample, SUnit Assembly generation: ASMJIT, Integration Tools: Hudson, Alternate window manager, Games: Tetris, Sokoban, Miner, Chess, CrossWords MetaModeling Frameworks - Magritte, Platypus, Cloud deployement - cloudfork cloudPharo, 3D: Roassal3d, NBOpenGL, JVM connection Bio informatics, ODE solvers, Interactive Geometry - DrGeo…

Some projectsWeb frameworks - Seaside, iliad, HTTP2, Tide, Aida, Mustache, Oauth, WebSocket CSS styling Format parsers - XML, HTML, NeoJSON, NeoCSV. Application Security, Graphics frameworks - Roassal, Mondrian, EyeSee, GraphET, Tool builders - Glamour, Spec, XUL, MacNative, Databases - DBXTalk, Mongo, Riak, CouchDB, MySql, PunQLite. Object-Oriented databases - Magma, Goods. Database abstraction - Voyage, ROE MetaCompiler - Petit Parser, SmaCC - Proxy, Logging - SystemLogger, Toothpick, SimpleLogger Units: Aconcagua, Units Time - Chronos Calendars, Timezones Productivity Tools - Codecritics, Refactorings, Cherry picking merge tools: merge tool, Komitter Versionner, Mock frameworks (baby mock), PDFgeneration - Artefact, Testing frameworks - PhExample, SUnit Assembly generation: ASMJIT, Integration Tools: Hudson, Alternate window manager, Games: Tetris, Sokoban, Miner, Chess, CrossWords MetaModeling Frameworks - Magritte, Platypus, Cloud deployement - cloudfork cloudPharo, 3D: Roassal3d, NBOpenGL, JVM connection Bio informatics, ODE solvers, Interactive Geometry - DrGeo…

AND MUCH

MORE

Our goals...

A powerful engine to invent (y)our future

Pharo is a vehicule Pharo is not at its end, just starting

Pharo is not our dream, it is what we have

But **every** single day we improve it

Enabler“One of the things that drew me to do the Delay refactoring, is simply that I could. That is, I was amazed that I could dig so deep so easily, see a path to improvement and effect change at a fundamental level. Excepting complexities with the Continuous Integration due to “changing the wheels on the car at 100km/h” (and one slip), it seems to have gone reasonably smoothly.  That sense of mastery is seductive.”

Enabler: Turtles all the wayA Bryant developed Seaside in Pharo ancestor (while he knew ruby, python, scheme, C, objective-C) because he could manipulate the stack behind the back of developers. Seaside is based on stack on-demand reification.

An ecosystem where innovation/business bloom

We want that **you** can make money with Pharo. We want to be able to invent solutions to existing problems.

!

We want a powerful innovative dynamic language where we can build our future.

We are a cool community

Tweets, blogs, buzz

Pharo 3,303 tweets / 1092 followers S. Ducasse tweets 669 / 804 followers S. Stinckwich 8712 / 1006 followers Moose 502 tweets / 255 followers Youtube Pharo smalltalk: about 1540 videos!

• Uni. of Buenos Aires • Uni. of Bern • Uni. of Maroua • Uni. of Brussels • Ecole des Mines de Douai • Uni. de Savoie • Ivan Franko Nat. Uni. of Lviv • Czech Technical Uni. • CULS Prague• Uni. of Quilmes • Uni. of La Plata • Northern Michigan Uni. • Uni. Technologica Nacional (UTN) • Uni. Catholic of Argentina • Uni. of Chile • Uni. Policnica de Catalunya • Uni. de Bretagne Occidentale • Uni. of Tomsk • Uni. of Fernhagen • IT University of Copenhagen • Uni. Cat del Sacro Cuore of Brescia

Pharo's Teachers

Lafhis (AR)Software Composition Group (CH) CAR (FR)RMOD (FR) Ummisco (IRD) Reveal (CH) Lysic (FR)Pleiad (CL) CEA-List (FR) Uqbar (AR) CCMI-FIT(CZ)

Research Groups

www.2denker.de www.agilitic.com

www.airflowing.com www.anymorphic.com www.ardishealth.com

www.beta9.be www.bombardier.com

www.cmsbox.com www.finworks.biz

seaside.gemstone.com www.ibizlog.com www.inceptive.be www.jooshr.com www.majcon.de

www.mindclue.ch

www.miriamtech.com www.myneat.org www.netstyle.ch

www.panasoft.com www.pinesoft.co.uk

www.promedmedical.net www.sharedlogic.ca

www.smallworks.com.ar www.10pines.com www.trantaria.com www.yesplan.be

www.synectique.eu www.sorabito.com objectprofile.com

!

Companies

BooksPharo by example http://www.pharobyexample.org

translated to french, merci!

translated to spanish, gracias!

translated to japanese, ありがとう!

Deep into Pharo http://www.deepintopharo.org

Numerical Methods

https://github.com/SquareBracketAssociates/NumericalMethods/releases

New books in preparation

Updated Pharo by Example

Entreprise Pharo

Fun with Pharo

Some success stories…

Continuous API Testingkeep your services under control 24/7

Norbert Hartl norbert@2denker.dewww.2denker.de

eMCee is developed and deployed using pharo

- zinc

- seaside

- jquery

- magritte

- mongotalk

- magritte-mongo

- fuel

- metacello

mail@2denker.de

Sunday 20 May 12

• Entry Level Track & Trace Product

• Complements T3 Full Product

• One Page Javascript HTML5 / Ajax Client

• REST Back End in Pharo Smalltalk

• Gateways to multiple data providers

Sunday 20 May 12

WEBDRUCK.CHWeb-To-Print Solution

• Design and create individual printed matter

• eShop with credit card payment

• High quality PDF output with Printing Process integration

• Thousands of orders for seven Swiss printing companies

NTed: disaster scenario recovery

iBizLog - http://www.ibizlog.com

A product by SmallworksTuesday, May 15, 12

Pinesoft MBagger

Pharo is

yours

Getting the object feel

• Live interaction

• Using Inspectors

• Talk and interact with objects

• Programs are objects too

http://youtu.be/CuimMwuZiGA

Scripting livehttps://www.youtube.com/watch?v=1Nze9tnwYxY

http://www.pharocasts.com/2010/08/see-how-to-get-data-from-url-parse-xml.html

Simplicity and elegance

Simple but complete object model

Syntax fits on a postcard!

Less is more!No constructors, no static methods, no operators

No type declaration, no primitive types,

No interfaces, no need for factory

No packages/private/protected modifiers

No parametrized types

No boxing/unboxing

Still powerful

Object model

Everything is an object instance of a class !

Single inheritance !

Public virtual methods !

Protected field

The complete syntaxexampleWithNumber: x “A method that illustrates every part of Smalltalk method syntax”

<menu>

| y | true & false not & (nil isNil) ifFalse: [self halt]. y := self size + super size. #($a #a ‘a’ 1 16rFF 2r1010101010101010101 1.0)

do: [ :each | Transcript show: (each class name); show: (each printString); show: ‘ ‘].

^ x < y

The complete syntaxexampleWithNumber: x “A method that illustrates every part of Smalltalk method syntax”

<menu>

| 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: (each printString); show: ‘ ‘].

^ x < y

Fun, simple Pure & elegant Productive Empowering Addictive Full access

Creating good energy, software quality,

learning and having fun !

http://pharo.org

Join