the simplest program of "the world"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

the simplest program of "the world"

Hans Schueren

Hello programmers ,


as a beginner of pharo i have the following question.


I suppose that you are lying under the tables for laughing flash !!    
hahaha


To familiarize with the coding - saving - starting in general of smalltalk ,

may i ask you to make a short : step by step guide ,

to create a program that shows :  " Hello World ".



a pharo image self starting program    " hello world" .

______________________________________________________________

1. Package name :  World

2. Class name :  CreateWorld

3. Method of CreateWorld :    Transcript show: 'Hello World'



Now here are the steps to do point by point to  SAVE the program as
another image.

The copy of the image should be starting direct in full screen and show
:  Hello World



I think this  "huge" task will motivate the creative developer !



Hans












Reply | Threaded
Open this post in threaded view
|

Re: the simplest program of "the world"

kilon.alios
As I said to my other reply , its not as a good idea as you may think because it separates the user from the pharo enviroment. Nothing wrong with doing this for an end product that you want to deliver to users that have no clue about coding and no intention learning. I have explained in my other reply how to hide the Pharo IDE from the end user so I wont repeat myself here. But a hello world example is made for developers not users, so they can learn and separating them from the IDE and the environment is not what Pharo is. Its actually against the spirit of Pharo. 

Pharo is very similar to emacs its a tool made easy to hack because it is meant to be hacked, changed , played around and extended by anyone using it. Pharo IS NOT a simple tool to learn, its actually very complex. So exposing the developer in its internals early one is damn good idea, because it really forces you go outside your comfort zone , forget how you code in other programming language and instead think how to code in Pharo. So naturally Pharo has no need for a hello world example because unlike other languages Pharo is not afraid of complexity, it embraces it by giving you powerful tools to deal with. While other programming languages try to run away from complexity and fail miserably at it. Pharo on other hand as you will experience yourself deals very well with complex code and makes it easier to refactor it and understand it mainly because of the IDE tools. 

So I would say to any new developer, forget other languages and what you know about them, coding in Pharo means stepping inside a completely new dimension and that means having to rethink anything one knows about coding and dealing with development tools. Some may hate this (and its perfectly fine) but then Pharo is not and should not be for everyone but for people who want a more immediate connection with their code and their software environment.  

In the end there is no right and wrong and each developer will choose if it worth for him or her to learn Pharo. Every language and development tool out there has its strength and weaknesses. But foremost he will realise that this is Pharo , a tool much different from anything else. 

On Mon, Oct 27, 2014 at 5:09 PM, Hans Schueren <[hidden email]> wrote:

Hello programmers ,


as a beginner of pharo i have the following question.


I suppose that you are lying under the tables for laughing flash !!    hahaha


To familiarize with the coding - saving - starting in general of smalltalk ,

may i ask you to make a short : step by step guide ,

to create a program that shows :  " Hello World ".



a pharo image self starting program    " hello world" .

______________________________________________________________

1. Package name :  World

2. Class name :  CreateWorld

3. Method of CreateWorld :    Transcript show: 'Hello World'



Now here are the steps to do point by point to  SAVE the program as another image.

The copy of the image should be starting direct in full screen and show :  Hello World



I think this  "huge" task will motivate the creative developer !



Hans













Reply | Threaded
Open this post in threaded view
|

Re: the simplest program of "the world"

wernerk
In reply to this post by Hans Schueren
Hi Hans,
i guess you are asking for a way to make a batch file that when
double-clicked immediately starts your program?
a batch file with something like this:
~/pharo3.0/bin/pharo ~/pharo3.0/shared/yourImage.image
~/pharo3.0/shared/start.st
would do that.
start.sh should be a text file with for example this:
SystemWindow new openInWorld.

werner

Reply | Threaded
Open this post in threaded view
|

Re: the simplest program of "the world"

wernerk
small typo, the "start" script should have the file extension .st
werner