[Pharo-project] Pharo by Example
Hello All, I'm new to Pharo and SmallTalk. I am trying to follow "Pharo by Example", but my Pharo browser is not the same. I tried to follow the FAQ about how to fix that, but the drop down menu doesn't look the same either. Should I be using a different version of Pharo? I'm using 1.3. Thanks, Gerry
2012/1/5 Gerry Weaver <gerryw@compvia.com>:
Hello All,
I'm new to Pharo and SmallTalk. I am trying to follow "Pharo by Example", but my Pharo browser is not the same. I tried to follow the FAQ about how to fix that, but the drop down menu doesn't look the same either. Should I be using a different version of Pharo? I'm using 1.3.
Hi Gerry, Yes the last version of Pharo By Example use a specific version (close to Pharo 1.0). You can download this version here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip Maybe you can start this version and switch to a more recent version when you feel more confident with the IDE. Regards, PS: BTW, this is Smalltalk not SmallTalk. -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
Hi Serge, Wow! Thanks for the speedy reply. I will do as you suggest. Thanks, Gerry -----Original Message-----
From: "Serge Stinckwich" <serge.stinckwich@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 19:07 Subject: Re: [Pharo-project] Pharo by Example
2012/1/5 Gerry Weaver <gerryw@compvia.com>:
Hello All,
I'm new to Pharo and SmallTalk. I am trying to follow "Pharo by Example", but my Pharo browser is not the same. I tried to follow the FAQ about how to fix that, but the drop down menu doesn't look the same either. Should I be using a different version of Pharo? I'm using 1.3.
Hi Gerry,
Yes the last version of Pharo By Example use a specific version (close to Pharo 1.0). You can download this version here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip
Maybe you can start this version and switch to a more recent version when you feel more confident with the IDE.
Regards,
PS: BTW, this is Smalltalk not SmallTalk. -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
Hi, I've been trying various downloads, but I haven't found anything that works. I guess I may be making it harder than it needs to be, but I really have no idea how to proceed. I've been trying to find some doc on basic things like creating a package, class, etc., but I'm not having much luck. I assume the docs will be updated at some point. Would anyone have a feel for when that might be? I'm not in a hurry at all, so I could wait for a couple of more versions. Thanks, Gerry -----Original Message-----
From: "Gerry Weaver" <gerryw@compvia.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 19:14 Subject: Re: [Pharo-project] Pharo by Example
Hi Serge,
Wow! Thanks for the speedy reply. I will do as you suggest.
Thanks, GerryÂ
-----Original Message-----
From: "Serge Stinckwich" <serge.stinckwich@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 19:07 Subject: Re: [Pharo-project] Pharo by Example
2012/1/5 Gerry Weaver <gerryw@compvia.com>:
Hello All,
I'm new to Pharo and SmallTalk. I am trying to follow "Pharo by Example", but my Pharo browser is not the same. I tried to follow the FAQ about how to fix that, but the drop down menu doesn't look the same either. Should I be using a different version of Pharo? I'm using 1.3.
Hi Gerry,
Yes the last version of Pharo By Example use a specific version (close to Pharo 1.0). You can download this version here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip
Maybe you can start this version and switch to a more recent version when you feel more confident with the IDE.
Regards,
PS: BTW, this is Smalltalk not SmallTalk. -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
On Thu, Jan 5, 2012 at 11:45 AM, Gerry Weaver <gerryw@compvia.com> wrote:
Hi,
I've been trying various downloads, but I haven't found anything that works. I guess I may be making it harder than it needs to be, but I really have no idea how to proceed. I've been trying to find some doc on basic things like creating a package, class, etc., but I'm not having much luck. I assume the docs will be updated at some point. Would anyone have a feel for when that might be? I'm not in a hurry at all, so I could wait for a couple of more versions.
Could give us more information about what is not working exactly ? Did you upload the file here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip and try the exemple in the book ? Regards, -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
Hi Serge, I guess I don't know what I'm supposed to load the image into. I've tried the VM downloads on the site, but they all crash when trying to open the image. Is there a particular VM I need to use with the image at the link you provided? I should probably mention that I would really be more interested in some basic IDE doc on the latest version at this point. I don't have any issue with the language. It's the IDE workflow that is very unclear to me. I've been reading a lot, but it isn't helping me so far. I starting to think that Pharo is somewhat inaccessible to newbies at this point. Perhaps I should start with something else first?. What I mean is an implementation that isn't changing so rapidly. I would sincerely appreciate any advice you could give me on that. Thanks, Gerry -----Original Message-----
From: "Serge Stinckwich" <serge.stinckwich@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 23:04 Subject: Re: [Pharo-project] Pharo by Example
On Thu, Jan 5, 2012 at 11:45 AM, Gerry Weaver <gerryw@compvia.com> wrote:
Hi,
I've been trying various downloads, but I haven't found anything that works. I guess I may be making it harder than it needs to be, but I really have no idea how to proceed. I've been trying to find some doc on basic things like creating a package, class, etc., but I'm not having much luck. I assume the docs will be updated at some point. Would anyone have a feel for when that might be? I'm not in a hurry at all, so I could wait for a couple of more versions.
Could give us more information about what is not working exactly ? Did you upload the file here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip and try the exemple in the book ?
Regards, -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
Gerry Weaver wrote
I guess I don't know what I'm supposed to load the image into. I've tried the VM downloads on the site, but they all crash when trying to open the image. Is there a particular VM I need to use with the image at the link you provided?
Can/should the PBE image be repackaged as a one-click until the new version of the book is released? I'm assuming it's a pre-Cog image, which may be why it's crashing. This must be a common access point and it seems like a lot to ask for someone to find this image and then go around looking for a compatible VM. Sean -- View this message in context: http://forum.world.st/Pharo-by-Example-tp4263619p4265304.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Sean P. DeNigris wrote:
Gerry Weaver wrote
I guess I don't know what I'm supposed to load the image into. I've tried the VM downloads on the site, but they all crash when trying to open the image. Is there a particular VM I need to use with the image at the link you provided?
Can/should the PBE image be repackaged as a one-click until the new version of the book is released? I'm assuming it's a pre-Cog image, which may be why it's crashing. This must be a common access point and it seems like a lot to ask for someone to find this image and then go around looking for a compatible VM.
+1 Pharo By Example is a very attractive starting point to someone that knows "absolutely nothing" about Smalltalk. It would be beneficial to have a OneClick download including image and VM matching the version used for the book would be of great benefit.
Yes it would be great!
Gerry Weaver wrote
I guess I don't know what I'm supposed to load the image into. I've tried the VM downloads on the site, but they all crash when trying to open the image. Is there a particular VM I need to use with the image at the link you provided?
Can/should the PBE image be repackaged as a one-click until the new version of the book is released? I'm assuming it's a pre-Cog image, which may be why it's crashing. This must be a common access point and it seems like a lot to ask for someone to find this image and then go around looking for a compatible VM.
Sean
Isn't it already under the name: * <https://gforge.inria.fr/frs/shownotes.php?release_id=6004>PBE Image 1.0 French ? I'm downloading it right now to test if it is :). * On Thu, Jan 5, 2012 at 4:46 PM, Stéphane Ducasse <stephane.ducasse@inria.fr>wrote:
Yes it would be great!
Gerry Weaver wrote
I guess I don't know what I'm supposed to load the image into. I've
tried
the VM downloads on the site, but they all crash when trying to open the image. Is there a particular VM I need to use with the image at the link you provided?
Can/should the PBE image be repackaged as a one-click until the new version of the book is released? I'm assuming it's a pre-Cog image, which may be why it's crashing. This must be a common access point and it seems like a lot to ask for someone to find this image and then go around looking for a compatible VM.
Sean
Yes, it seems it is, but the welcome workspace is in french :). Bienvenue! Voici le programme PBE-1.0-OneClick de Pharo Par l'Exemple. ... ... On Thu, Jan 5, 2012 at 4:53 PM, Guillermo Polito <guillermopolito@gmail.com>wrote:
Isn't it already under the name:
* <https://gforge.inria.fr/frs/shownotes.php?release_id=6004>PBE Image 1.0 French
?
I'm downloading it right now to test if it is :). *
On Thu, Jan 5, 2012 at 4:46 PM, Stéphane Ducasse < stephane.ducasse@inria.fr> wrote:
Yes it would be great!
Gerry Weaver wrote
I guess I don't know what I'm supposed to load the image into. I've
tried
the VM downloads on the site, but they all crash when trying to open the image. Is there a particular VM I need to use with the image at the link you provided?
Can/should the PBE image be repackaged as a one-click until the new version of the book is released? I'm assuming it's a pre-Cog image, which may be why it's crashing. This must be a common access point and it seems like a lot to ask for someone to find this image and then go around looking for a compatible VM.
Sean
Yes for the french edition of Pharo by example, we have done a special one click image. We have also done modifications in the book. I guess these modifications can be done also on the english version. Envoyé de mon iPhone Le 6 janv. 2012 à 03:10, Guillermo Polito <guillermopolito@gmail.com> a écrit :
Yes, it seems it is, but the welcome workspace is in french :).
Bienvenue!
Voici le programme PBE-1.0-OneClick de Pharo Par l'Exemple. ... ...
On Thu, Jan 5, 2012 at 4:53 PM, Guillermo Polito <guillermopolito@gmail.com> wrote: Isn't it already under the name:
PBE Image 1.0 French
?
I'm downloading it right now to test if it is :).
On Thu, Jan 5, 2012 at 4:46 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote: Yes it would be great!
Gerry Weaver wrote
I guess I don't know what I'm supposed to load the image into. I've tried the VM downloads on the site, but they all crash when trying to open the image. Is there a particular VM I need to use with the image at the link you provided?
Can/should the PBE image be repackaged as a one-click until the new version of the book is released? I'm assuming it's a pre-Cog image, which may be why it's crashing. This must be a common access point and it seems like a lot to ask for someone to find this image and then go around looking for a compatible VM.
Sean
Hi, Perhaps I should just take a shot at explaining what I'm having trouble understanding. My current take on the environment is that an image is basically a container that holds everything in the application. In development mode it also includes the IDE and tools. I assume one would typically start by defining a class that was a subclass of some system or package class. I assume this process would continue until the application logic and data were defined. I also assume that there must be a way to indicate the class that represents the top level or entry point (main) of the application. That appears to be the init method. Is this anywhere close to being correct? The problem is that I'm not sure how to get started. I have played around with the system browser a bit. I can see that you would create a category and be presented with what looks to be a template for a class. I'm confused about the fact that the "Pharo by Example" has me creating a package when I don't see that in the 1.3 browser. I also don't know how to create additional classes in that category or how to tell the environment which class is my application entry point. I figure maybe the answer to all of this is a little too much for a mailing list question, which is why I didn't start out asking this. Anyway, at least this gives you an idea of where I'm stuck. Maybe my brain just isn't wired to understand something that may be obvious to others. Thanks, Gerry -----Original Message-----
From: "Serge Stinckwich" <serge.stinckwich@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 23:04 Subject: Re: [Pharo-project] Pharo by Example
On Thu, Jan 5, 2012 at 11:45 AM, Gerry Weaver <gerryw@compvia.com> wrote:
Hi,
I've been trying various downloads, but I haven't found anything that works. I guess I may be making it harder than it needs to be, but I really have no idea how to proceed. I've been trying to find some doc on basic things like creating a package, class, etc., but I'm not having much luck. I assume the docs will be updated at some point. Would anyone have a feel for when that might be? I'm not in a hurry at all, so I could wait for a couple of more versions.
Could give us more information about what is not working exactly ? Did you upload the file here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip and try the exemple in the book ?
Regards, -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
Hi Gerry
From your talk of application entry points it seems to me that you might be talking about web development with Pharo. In that case PharoByExample won't help you much. Maybe, if you could tell us what you are trying to accomplish, we would be able to help you better. Right now, at least to me, it is not clear why you are having troubles. I've learnt Smalltalk with PBE and Pharo and found everything to be fairly straight forward and clearly explained.
As for the #init method, the only one I can find belongs to the ParseStack object. That is definitely not what you want. What might be confusing you is that you don't "execute" a binary like you would in other cases. Pharo is not only an IDE but it is also the runtime environment. It just occurred to me, that you might be looking for something like: "if i double click on the image I want my application X to be launched in the image". That can certainly be done but is not the usual way. More often, you will save the image with the "start UI" of your application opened, so that when a user opens the image he will see one window with your application. You also might want to check out the Pharo Screencasts (http://www.pharo-project.org/documentation/screencasts), you might see something there that helps you to better understand Pharo. However, from what I have experienced I suggest that you just work through PBE and see if your questions persist. Cheers, Max On 05.01.2012, at 06:50, Gerry Weaver wrote:
Hi,
Perhaps I should just take a shot at explaining what I'm having trouble understanding.
My current take on the environment is that an image is basically a container that holds everything in the application. In development mode it also includes the IDE and tools. I assume one would typically start by defining a class that was a subclass of some system or package class. I assume this process would continue until the application logic and data were defined. I also assume that there must be a way to indicate the class that represents the top level or entry point (main) of the application. That appears to be the init method. Is this anywhere close to being correct?
The problem is that I'm not sure how to get started. I have played around with the system browser a bit. I can see that you would create a category and be presented with what looks to be a template for a class. I'm confused about the fact that the "Pharo by Example" has me creating a package when I don't see that in the 1.3 browser. I also don't know how to create additional classes in that category or how to tell the environment which class is my application entry point. I figure maybe the answer to all of this is a little too much for a mailing list question, which is why I didn't start out asking this. Anyway, at least this gives you an idea of where I'm stuck. Maybe my brain just isn't wired to understand something that may be obvious to others.
Thanks, Gerry
-----Original Message-----
From: "Serge Stinckwich" <serge.stinckwich@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 23:04 Subject: Re: [Pharo-project] Pharo by Example
On Thu, Jan 5, 2012 at 11:45 AM, Gerry Weaver <gerryw@compvia.com> wrote:
Hi,
I've been trying various downloads, but I haven't found anything that works. I guess I may be making it harder than it needs to be, but I really have no idea how to proceed. I've been trying to find some doc on basic things like creating a package, class, etc., but I'm not having much luck. I assume the docs will be updated at some point. Would anyone have a feel for when that might be? I'm not in a hurry at all, so I could wait for a couple of more versions.
Could give us more information about what is not working exactly ? Did you upload the file here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip and try the exemple in the book ?
Regards, -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
Hi Max, Okay thanks. I think I get the startup scenario now. I come from the other end of the world in terms of software development (kernel, C, command line, etc.). I guess the part that's giving me a hard time is really the IDE workflow. I want to start writing code, but I feel kind of like I'm trying to build a ship in a bottle. What I would expect is that I would create some kind of project spec and add my code to that, but instead I'm finding this rather strange path. I assume that it's all about defining classes, but I'm having trouble figuring out where and how to do that. For example, is an application a category or is it just a way to group like functionality? Collections look like they are a tool for organizing code? Anyway, I'm going to keep plugging away at it. I kind of hoping maybe Visualworks will fill in some of the blanks. I recently left my job as a full time developer. There are several projects that I've been thinking about over the last few years. Since I am now a force of one, I'm looking for a higher level (hopefully more productive) language to code in.  One of the things that attracted me to Smalltalk was the concept of the image and something called "Opentalk". Most of the applications I have in mind would be distributed in nature. However, a web interface wouldn't be completely out of the question. The FFI is also something that will be critical for me. I have quite a bit of C code that I will want to make use of. I have watched several of the screencasts, but they seem to leave out the part that I am having trouble with. I am still actively searching though. Thanks, Gerry -----Original Message-----
From: "Max Leske" <maxleske@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/05/12 01:55 Subject: Re: [Pharo-project] Pharo by Example
Hi Gerry
From your talk of application entry points it seems to me that you might be talking about web development with Pharo. In that case PharoByExample won't help you much. Maybe, if you could tell us what you are trying to accomplish, we would be able to help you better. Right now, at least to me, it is not clear why you are having troubles. I've learnt Smalltalk with PBE and Pharo and found everything to be fairly straight forward and clearly explained.
As for the #init method, the only one I can find belongs to the ParseStack object. That is definitely not what you want. What might be confusing you is that you don't "execute" a binary like you would in other cases. Pharo is not only an IDE but it is also the runtime environment.
It just occurred to me, that you might be looking for something like: "if i double click on the image I want my application X to be launched in the image". That can certainly be done but is not the usual way. More often, you will save the image with the "start UI" of your application opened, so that when a user opens the image he will see one window with your application.
You also might want to check out the Pharo Screencasts (http://www.pharo-project.org/documentation/screencasts), you might see something there that helps you to better understand Pharo. However, from what I have experienced I suggest that you just work through PBE and see if your questions persist.
Cheers, Max
On 05.01.2012, at 06:50, Gerry Weaver wrote:
Hi,
Perhaps I should just take a shot at explaining what I'm having trouble understanding.
My current take on the environment is that an image is basically a container that holds everything in the application. In development mode it also includes the IDE and tools. I assume one would typically start by defining a class that was a subclass of some system or package class. I assume this process would continue until the application logic and data were defined. I also assume that there must be a way to indicate the class that represents the top level or entry point (main) of the application. That appears to be the init method. Is this anywhere close to being correct?
The problem is that I'm not sure how to get started. I have played around with the system browser a bit. I can see that you would create a category and be presented with what looks to be a template for a class. I'm confused about the fact that the "Pharo by Example" has me creating a package when I don't see that in the 1.3 browser. I also don't know how to create additional classes in that category or how to tell the environment which class is my application entry point. I figure maybe the answer to all of this is a little too much for a mailing list question, which is why I didn't start out asking this. Anyway, at least this gives you an idea of where I'm stuck. Maybe my brain just isn't wired to understand something that may be obvious to others.
Thanks, Gerry
-----Original Message-----
From: "Serge Stinckwich" <serge.stinckwich@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 23:04 Subject: Re: [Pharo-project] Pharo by Example
On Thu, Jan 5, 2012 at 11:45 AM, Gerry Weaver <gerryw@compvia.com> wrote:
Hi,
I've been trying various downloads, but I haven't found anything that works. I guess I may be making it harder than it needs to be, but I really have no idea how to proceed. I've been trying to find some doc on basic things like creating a package, class, etc., but I'm not having much luck. I assume the docs will be updated at some point. Would anyone have a feel for when that might be? I'm not in a hurry at all, so I could wait for a couple of more versions.
Could give us more information about what is not working exactly ? Did you upload the file here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip and try the exemple in the book ?
Regards, -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
I'll try to give you a scenario for a simple project: Click on any class in the browser. You will see the class definition that will look somewhat like this (I replaced actual names with placeholders): <superclass> subclass: #<name of your class> instanceVariableNames: '<instVar1> <instVar2>' classVariableNames: '' poolDictionaries: '' category: '<name of your project category>' For this example let's use this: Object subclass: #MyCalculator instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'GCal' Once you have the class definition you want, hit ctrl+s (or cdm+s on Mac) and the browser will show you your new category in the leftmost panel, containing your new class MyCalculator which is a subclass of Object. Go to the third panel from the left. This panel contains "protocols" (method categories). You will see something like "no messages". Click on that label and you will be presented with a method template. Your first method: add: aMoney to: anotherMoney ^ aMoney + anotherMoney Again, hit ctrl+s once your finished. Now of course we'll need a money class that understands the #+ selector: Object subclass: #Money instanceVariableNames: 'value' classVariableNames: '' poolDictionaries: '' category: 'GCal' Define the message #+ for the class Money: + aMoney ^ self value + aMoney value And define the method value: value ^ value Once you save the method #value you'll be asked if you want 'value' to be an instance variable or a temporary variable. Make it an instance variable. In the browser below the panel with the classes, click on 'class' to see "class side" methods and define the method #value: : value: aNumber ^ self new initializeWith: aNumber; yourself Go back to the "instance side" of the class and define the method #initializeWith: : initializeWith: aNumber value := aNumber Open the world menu and open a workspace Type this in the workspace: MyCalculator new add: (Money value: 30) to: (Money value: 20) hit ctrl+p to print the result (hopefully 50, I haven't tested the example :) ) You would follow the same steps to enhance your application further. Now you should take a look at Monticello to learn how to manage versions of your application. Hope this helps a bit. Cheers, Max On 05.01.2012, at 09:26, Gerry Weaver wrote:
Hi Max,
Okay thanks. I think I get the startup scenario now.
I come from the other end of the world in terms of software development (kernel, C, command line, etc.). I guess the part that's giving me a hard time is really the IDE workflow. I want to start writing code, but I feel kind of like I'm trying to build a ship in a bottle. What I would expect is that I would create some kind of project spec and add my code to that, but instead I'm finding this rather strange path. I assume that it's all about defining classes, but I'm having trouble figuring out where and how to do that. For example, is an application a category or is it just a way to group like functionality? Collections look like they are a tool for organizing code? Anyway, I'm going to keep plugging away at it. I kind of hoping maybe Visualworks will fill in some of the blanks.
I recently left my job as a full time developer. There are several projects that I've been thinking about over the last few years. Since I am now a force of one, I'm looking for a higher level (hopefully more productive) language to code in. One of the things that attracted me to Smalltalk was the concept of the image and something called "Opentalk". Most of the applications I have in mind would be distributed in nature. However, a web interface wouldn't be completely out of the question. The FFI is also something that will be critical for me. I have quite a bit of C code that I will want to make use of.
I have watched several of the screencasts, but they seem to leave out the part that I am having trouble with. I am still actively searching though.
Thanks, Gerry
-----Original Message-----
From: "Max Leske" <maxleske@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/05/12 01:55 Subject: Re: [Pharo-project] Pharo by Example
Hi Gerry
From your talk of application entry points it seems to me that you might be talking about web development with Pharo. In that case PharoByExample won't help you much. Maybe, if you could tell us what you are trying to accomplish, we would be able to help you better. Right now, at least to me, it is not clear why you are having troubles. I've learnt Smalltalk with PBE and Pharo and found everything to be fairly straight forward and clearly explained.
As for the #init method, the only one I can find belongs to the ParseStack object. That is definitely not what you want. What might be confusing you is that you don't "execute" a binary like you would in other cases. Pharo is not only an IDE but it is also the runtime environment.
It just occurred to me, that you might be looking for something like: "if i double click on the image I want my application X to be launched in the image". That can certainly be done but is not the usual way. More often, you will save the image with the "start UI" of your application opened, so that when a user opens the image he will see one window with your application.
You also might want to check out the Pharo Screencasts (http://www.pharo-project.org/documentation/screencasts), you might see something there that helps you to better understand Pharo. However, from what I have experienced I suggest that you just work through PBE and see if your questions persist.
Cheers, Max
On 05.01.2012, at 06:50, Gerry Weaver wrote:
Hi,
Perhaps I should just take a shot at explaining what I'm having trouble understanding.
My current take on the environment is that an image is basically a container that holds everything in the application. In development mode it also includes the IDE and tools. I assume one would typically start by defining a class that was a subclass of some system or package class. I assume this process would continue until the application logic and data were defined. I also assume that there must be a way to indicate the class that represents the top level or entry point (main) of the application. That appears to be the init method. Is this anywhere close to being correct?
The problem is that I'm not sure how to get started. I have played around with the system browser a bit. I can see that you would create a category and be presented with what looks to be a template for a class. I'm confused about the fact that the "Pharo by Example" has me creating a package when I don't see that in the 1.3 browser. I also don't know how to create additional classes in that category or how to tell the environment which class is my application entry point. I figure maybe the answer to all of this is a little too much for a mailing list question, which is why I didn't start out asking this. Anyway, at least this gives you an idea of where I'm stuck. Maybe my brain just isn't wired to understand something that may be obvious to others.
Thanks, Gerry
-----Original Message-----
From: "Serge Stinckwich" <serge.stinckwich@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 23:04 Subject: Re: [Pharo-project] Pharo by Example
On Thu, Jan 5, 2012 at 11:45 AM, Gerry Weaver <gerryw@compvia.com> wrote:
Hi,
I've been trying various downloads, but I haven't found anything that works. I guess I may be making it harder than it needs to be, but I really have no idea how to proceed. I've been trying to find some doc on basic things like creating a package, class, etc., but I'm not having much luck. I assume the docs will be updated at some point. Would anyone have a feel for when that might be? I'm not in a hurry at all, so I could wait for a couple of more versions.
Could give us more information about what is not working exactly ? Did you upload the file here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip and try the exemple in the book ?
Regards, -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
Hi Max, Okay now I'm busy feeling pretty stupid. I sincerely appreciate your (everyone's) help and patience with me. I'm pretty sure I'm all finished being retarded now. I'm going to try not to bother y'all again until I have much better (harder) questions :p Many thanks Max and many thanks to you all, Gerry -----Original Message----- From: "Max Leske" <maxleske@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/05/12 02:56 Subject: Re: [Pharo-project] Pharo by Example I'll try to give you a scenario for a simple project: - Click on any class in the browser. You will see the class definition that will look somewhat like this (I replaced actual names with placeholders): <superclass> subclass: #<name of your class>      instanceVariableNames: '<instVar1> <instVar2>'    classVariableNames: ''    poolDictionaries: ''    category: '<name of your project category>' - For this example let's use this: Object subclass: #MyCalculator      instanceVariableNames: ''    classVariableNames: ''    poolDictionaries: ''    category: 'GCal' - Once you have the class definition you want, hit ctrl+s (or cdm+s on Mac) and the browser will show you your new category in the leftmost panel, containing your new class MyCalculator which is a subclass of Object. - Go to the third panel from the left. This panel contains "protocols" (method categories). You will see something like "no messages". Click on that label and you will be presented with a method template. - Your first method: add: aMoney to: anotherMoney   ^ aMoney + anotherMoney - Again, hit ctrl+s once your finished. Now of course we'll need a money class that understands the #+ selector: Object subclass: #Money      instanceVariableNames: 'value'    classVariableNames: ''    poolDictionaries: ''    category: 'GCal' - Define the message #+ for the class Money: + aMoney    ^ self value + aMoney value - And define the method value: value   ^ value - Once you save the method #value you'll be asked if you want 'value' to be an instance variable or a temporary variable. Make it an instance variable. - In the browser below the panel with the classes, click on 'class' to see "class side" methods and define the method #value: : value: aNumber   ^ self new     initializeWith: aNumber;     yourself - Go back to the "instance side" of the class and define the method #initializeWith: : initializeWith: aNumber   value := aNumber - Open the world menu and open a workspace - Type this in the workspace: MyCalculator new add: (Money value: 30) to: (Money value: 20) - hit ctrl+p to print the result (hopefully 50, I haven't tested the example :) )   You would follow the same steps to enhance your application further. Now you should take a look at Monticello to learn how to manage versions of your application.  Hope this helps a bit.  Cheers, Max   On 05.01.2012, at 09:26, Gerry Weaver wrote: Hi Max, Okay thanks. I think I get the startup scenario now. I come from the other end of the world in terms of software development (kernel, C, command line, etc.). I guess the part that's giving me a hard time is really the IDE workflow. I want to start writing code, but I feel kind of like I'm trying to build a ship in a bottle. What I would expect is that I would create some kind of project spec and add my code to that, but instead I'm finding this rather strange path. I assume that it's all about defining classes, but I'm having trouble figuring out where and how to do that. For example, is an application a category or is it just a way to group like functionality? Collections look like they are a tool for organizing code? Anyway, I'm going to keep plugging away at it. I kind of hoping maybe Visualworks will fill in some of the blanks. I recently left my job as a full time developer. There are several projects that I've been thinking about over the last few years. Since I am now a force of one, I'm looking for a higher level (hopefully more productive) language to code in.  One of the things that attracted me to Smalltalk was the concept of the image and something called "Opentalk". Most of the applications I have in mind would be distributed in nature. However, a web interface wouldn't be completely out of the question. The FFI is also something that will be critical for me. I have quite a bit of C code that I will want to make use of. I have watched several of the screencasts, but they seem to leave out the part that I am having trouble with. I am still actively searching though. Thanks, Gerry -----Original Message----- From: "Max Leske" < maxleske@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/05/12 01:55 Subject: Re: [Pharo-project] Pharo by Example Hi Gerry
From your talk of application entry points it seems to me that you might be talking about web development with Pharo. In that case PharoByExample won't help you much. Maybe, if you could tell us what you are trying to accomplish, we would be able to help you better. Right now, at least to me, it is not clear why you are having troubles. I've learnt Smalltalk with PBE and Pharo and found everything to be fairly straight forward and clearly explained.
As for the #init method, the only one I can find belongs to the ParseStack object. That is definitely not what you want. What might be confusing you is that you don't "execute" a binary like you would in other cases. Pharo is not only an IDE but it is also the runtime environment. It just occurred to me, that you might be looking for something like: "if i double click on the image I want my application X to be launched in the image". That can certainly be done but is not the usual way. More often, you will save the image with the "start UI" of your application opened, so that when a user opens the image he will see one window with your application. You also might want to check out the Pharo Screencasts ( http://www.pharo-project.org/documentation/screencasts), you might see something there that helps you to better understand Pharo. However, from what I have experienced I suggest that you just work through PBE and see if your questions persist. Cheers, Max On 05.01.2012, at 06:50, Gerry Weaver wrote: Hi, Perhaps I should just take a shot at explaining what I'm having trouble understanding. My current take on the environment is that an image is basically a container that holds everything in the application. In development mode it also includes the IDE and tools. I assume one would typically start by defining a class that was a subclass of some system or package class. I assume this process would continue until the application logic and data were defined. I also assume that there must be a way to indicate the class that represents the top level or entry point (main) of the application. That appears to be the init method. Is this anywhere close to being correct? The problem is that I'm not sure how to get started. I have played around with the system browser a bit. I can see that you would create a category and be presented with what looks to be a template for a class. I'm confused about the fact that the "Pharo by Example" has me creating a package when I don't see that in the 1.3 browser. I also don't know how to create additional classes in that category or how to tell the environment which class is my application entry point. I figure maybe the answer to all of this is a little too much for a mailing list question, which is why I didn't start out asking this. Anyway, at least this gives you an idea of where I'm stuck. Maybe my brain just isn't wired to understand something that may be obvious to others. Thanks, Gerry -----Original Message----- From: "Serge Stinckwich" < serge.stinckwich@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 23:04 Subject: Re: [Pharo-project] Pharo by Example On Thu, Jan 5, 2012 at 11:45 AM, Gerry Weaver < gerryw@compvia.com> wrote: Hi, I've been trying various downloads, but I haven't found anything that works. I guess I may be making it harder than it needs to be, but I really have no idea how to proceed. I've been trying to find some doc on basic things like creating a package, class, etc., but I'm not having much luck. I assume the docs will be updated at some point. Would anyone have a feel for when that might be? I'm not in a hurry at all, so I could wait for a couple of more versions. Could give us more information about what is not working exactly ? Did you upload the file here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip and try the exemple in the book ? Regards, -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/ Â Â
No worries :) Welcome to Pharo! On 05.01.2012, at 10:22, Gerry Weaver wrote:
Hi Max,
Okay now I'm busy feeling pretty stupid. I sincerely appreciate your (everyone's) help and patience with me. I'm pretty sure I'm all finished being retarded now. I'm going to try not to bother y'all again until I have much better (harder) questions :p
Many thanks Max and many thanks to you all, Gerry
-----Original Message----- From: "Max Leske" <maxleske@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/05/12 02:56 Subject: Re: [Pharo-project] Pharo by Example
I'll try to give you a scenario for a simple project: Click on any class in the browser. You will see the class definition that will look somewhat like this (I replaced actual names with placeholders): <superclass> subclass: #<name of your class> instanceVariableNames: '<instVar1> <instVar2>' classVariableNames: '' poolDictionaries: '' category: '<name of your project category>' For this example let's use this: Object subclass: #MyCalculator instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'GCal' Once you have the class definition you want, hit ctrl+s (or cdm+s on Mac) and the browser will show you your new category in the leftmost panel, containing your new class MyCalculator which is a subclass of Object. Go to the third panel from the left. This panel contains "protocols" (method categories). You will see something like "no messages". Click on that label and you will be presented with a method template. Your first method: add: aMoney to: anotherMoney ^ aMoney + anotherMoney Again, hit ctrl+s once your finished. Now of course we'll need a money class that understands the #+ selector: Object subclass: #Money instanceVariableNames: 'value' classVariableNames: '' poolDictionaries: '' category: 'GCal' Define the message #+ for the class Money: + aMoney ^ self value + aMoney value And define the method value: value ^ value Once you save the method #value you'll be asked if you want 'value' to be an instance variable or a temporary variable. Make it an instance variable. In the browser below the panel with the classes, click on 'class' to see "class side" methods and define the method #value: : value: aNumber ^ self new initializeWith: aNumber; yourself Go back to the "instance side" of the class and define the method #initializeWith: : initializeWith: aNumber value := aNumber Open the world menu and open a workspace Type this in the workspace: MyCalculator new add: (Money value: 30) to: (Money value: 20) hit ctrl+p to print the result (hopefully 50, I haven't tested the example :) )
You would follow the same steps to enhance your application further. Now you should take a look at Monticello to learn how to manage versions of your application.
Hope this helps a bit.
Cheers, Max
On 05.01.2012, at 09:26, Gerry Weaver wrote:
Hi Max,
Okay thanks. I think I get the startup scenario now.
I come from the other end of the world in terms of software development (kernel, C, command line, etc.). I guess the part that's giving me a hard time is really the IDE workflow. I want to start writing code, but I feel kind of like I'm trying to build a ship in a bottle. What I would expect is that I would create some kind of project spec and add my code to that, but instead I'm finding this rather strange path. I assume that it's all about defining classes, but I'm having trouble figuring out where and how to do that. For example, is an application a category or is it just a way to group like functionality? Collections look like they are a tool for organizing code? Anyway, I'm going to keep plugging away at it. I kind of hoping maybe Visualworks will fill in some of the blanks.
I recently left my job as a full time developer. There are several projects that I've been thinking about over the last few years. Since I am now a force of one, I'm looking for a higher level (hopefully more productive) language to code in. One of the things that attracted me to Smalltalk was the concept of the image and something called "Opentalk". Most of the applications I have in mind would be distributed in nature. However, a web interface wouldn't be completely out of the question. The FFI is also something that will be critical for me. I have quite a bit of C code that I will want to make use of.
I have watched several of the screencasts, but they seem to leave out the part that I am having trouble with. I am still actively searching though.
Thanks, Gerry
-----Original Message-----
From: "Max Leske" < maxleske@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/05/12 01:55 Subject: Re: [Pharo-project] Pharo by Example
Hi Gerry
From your talk of application entry points it seems to me that you might be talking about web development with Pharo. In that case PharoByExample won't help you much. Maybe, if you could tell us what you are trying to accomplish, we would be able to help you better. Right now, at least to me, it is not clear why you are having troubles. I've learnt Smalltalk with PBE and Pharo and found everything to be fairly straight forward and clearly explained.
As for the #init method, the only one I can find belongs to the ParseStack object. That is definitely not what you want. What might be confusing you is that you don't "execute" a binary like you would in other cases. Pharo is not only an IDE but it is also the runtime environment.
It just occurred to me, that you might be looking for something like: "if i double click on the image I want my application X to be launched in the image". That can certainly be done but is not the usual way. More often, you will save the image with the "start UI" of your application opened, so that when a user opens the image he will see one window with your application.
You also might want to check out the Pharo Screencasts ( http://www.pharo-project.org/documentation/screencasts), you might see something there that helps you to better understand Pharo. However, from what I have experienced I suggest that you just work through PBE and see if your questions persist.
Cheers, Max
On 05.01.2012, at 06:50, Gerry Weaver wrote:
Hi,
Perhaps I should just take a shot at explaining what I'm having trouble understanding.
My current take on the environment is that an image is basically a container that holds everything in the application. In development mode it also includes the IDE and tools. I assume one would typically start by defining a class that was a subclass of some system or package class. I assume this process would continue until the application logic and data were defined. I also assume that there must be a way to indicate the class that represents the top level or entry point (main) of the application. That appears to be the init method. Is this anywhere close to being correct?
The problem is that I'm not sure how to get started. I have played around with the system browser a bit. I can see that you would create a category and be presented with what looks to be a template for a class. I'm confused about the fact that the "Pharo by Example" has me creating a package when I don't see that in the 1.3 browser. I also don't know how to create additional classes in that category or how to tell the environment which class is my application entry point. I figure maybe the answer to all of this is a little too much for a mailing list question, which is why I didn't start out asking this. Anyway, at least this gives you an idea of where I'm stuck. Maybe my brain just isn't wired to understand something that may be obvious to others.
Thanks, Gerry
-----Original Message-----
From: "Serge Stinckwich" < serge.stinckwich@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 23:04 Subject: Re: [Pharo-project] Pharo by Example
On Thu, Jan 5, 2012 at 11:45 AM, Gerry Weaver < gerryw@compvia.com> wrote:
Hi,
I've been trying various downloads, but I haven't found anything that works. I guess I may be making it harder than it needs to be, but I really have no idea how to proceed. I've been trying to find some doc on basic things like creating a package, class, etc., but I'm not having much luck. I assume the docs will be updated at some point. Would anyone have a feel for when that might be? I'm not in a hurry at all, so I could wait for a couple of more versions.
Could give us more information about what is not working exactly ? Did you upload the file here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip and try the exemple in the book ?
Regards, -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
Do not hesitate to ask questions! Smalltalk is different. And Pharo is not as cool as I would love it to be. But this is like that. I would like also it to be better. We are step by step getting there. I would like to have a small kernel that we can embed anywhere and that can talk to anything outside and a powerful set of tools and frameworks to load. We have nearly everything but some more work to do to get the full picture. Stef
Hi Max,
Okay now I'm busy feeling pretty stupid. I sincerely appreciate your (everyone's) help and patience with me. I'm pretty sure I'm all finished being retarded now. I'm going to try not to bother y'all again until I have much better (harder) questions :p
Many thanks Max and many thanks to you all, Gerry
-----Original Message----- From: "Max Leske" <maxleske@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/05/12 02:56 Subject: Re: [Pharo-project] Pharo by Example
I'll try to give you a scenario for a simple project: ⢠Click on any class in the browser. You will see the class definition that will look somewhat like this (I replaced actual names with placeholders): <superclass> subclass: #<name of your class> instanceVariableNames: '<instVar1> <instVar2>' classVariableNames: '' poolDictionaries: '' category: '<name of your project category>' ⢠For this example let's use this: Object subclass: #MyCalculator instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'GCal' ⢠Once you have the class definition you want, hit ctrl+s (or cdm+s on Mac) and the browser will show you your new category in the leftmost panel, containing your new class MyCalculator which is a subclass of Object. ⢠Go to the third panel from the left. This panel contains "protocols" (method categories). You will see something like "no messages". Click on that label and you will be presented with a method template. ⢠Your first method: add: aMoney to: anotherMoney ^ aMoney + anotherMoney ⢠Again, hit ctrl+s once your finished. Now of course we'll need a money class that understands the #+ selector: Object subclass: #Money instanceVariableNames: 'value' classVariableNames: '' poolDictionaries: '' category: 'GCal' ⢠Define the message #+ for the class Money: + aMoney ^ self value + aMoney value ⢠And define the method value: value ^ value ⢠Once you save the method #value you'll be asked if you want 'value' to be an instance variable or a temporary variable. Make it an instance variable. ⢠In the browser below the panel with the classes, click on 'class' to see "class side" methods and define the method #value: : value: aNumber ^ self new initializeWith: aNumber; yourself ⢠Go back to the "instance side" of the class and define the method #initializeWith: : initializeWith: aNumber value := aNumber ⢠Open the world menu and open a workspace ⢠Type this in the workspace: MyCalculator new add: (Money value: 30) to: (Money value: 20) ⢠hit ctrl+p to print the result (hopefully 50, I haven't tested the example :) )
You would follow the same steps to enhance your application further. Now you should take a look at Monticello to learn how to manage versions of your application.
Hope this helps a bit.
Cheers, Max
On 05.01.2012, at 09:26, Gerry Weaver wrote:
Hi Max,
Okay thanks. I think I get the startup scenario now.
I come from the other end of the world in terms of software development (kernel, C, command line, etc.). I guess the part that's giving me a hard time is really the IDE workflow. I want to start writing code, but I feel kind of like I'm trying to build a ship in a bottle. What I would expect is that I would create some kind of project spec and add my code to that, but instead I'm finding this rather strange path. I assume that it's all about defining classes, but I'm having trouble figuring out where and how to do that. For example, is an application a category or is it just a way to group like functionality? Collections look like they are a tool for organizing code? Anyway, I'm going to keep plugging away at it. I kind of hoping maybe Visualworks will fill in some of the blanks.
I recently left my job as a full time developer. There are several projects that I've been thinking about over the last few years. Since I am now a force of one, I'm looking for a higher level (hopefully more productive) language to code in. One of the things that attracted me to Smalltalk was the concept of the image and something called "Opentalk". Most of the applications I have in mind would be distributed in nature. However, a web interface wouldn't be completely out of the question. The FFI is also something that will be critical for me. I have quite a bit of C code that I will want to make use of.
I have watched several of the screencasts, but they seem to leave out the part that I am having trouble with. I am still actively searching though.
Thanks, Gerry
-----Original Message-----
From: "Max Leske" < maxleske@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/05/12 01:55 Subject: Re: [Pharo-project] Pharo by Example
Hi Gerry
From your talk of application entry points it seems to me that you might be talking about web development with Pharo. In that case PharoByExample won't help you much. Maybe, if you could tell us what you are trying to accomplish, we would be able to help you better. Right now, at least to me, it is not clear why you are having troubles. I've learnt Smalltalk with PBE and Pharo and found everything to be fairly straight forward and clearly explained.
As for the #init method, the only one I can find belongs to the ParseStack object. That is definitely not what you want. What might be confusing you is that you don't "execute" a binary like you would in other cases. Pharo is not only an IDE but it is also the runtime environment.
It just occurred to me, that you might be looking for something like: "if i double click on the image I want my application X to be launched in the image". That can certainly be done but is not the usual way. More often, you will save the image with the "start UI" of your application opened, so that when a user opens the image he will see one window with your application.
You also might want to check out the Pharo Screencasts ( http://www.pharo-project.org/documentation/screencasts), you might see something there that helps you to better understand Pharo. However, from what I have experienced I suggest that you just work through PBE and see if your questions persist.
Cheers, Max
On 05.01.2012, at 06:50, Gerry Weaver wrote:
Hi,
Perhaps I should just take a shot at explaining what I'm having trouble understanding.
My current take on the environment is that an image is basically a container that holds everything in the application. In development mode it also includes the IDE and tools. I assume one would typically start by defining a class that was a subclass of some system or package class. I assume this process would continue until the application logic and data were defined. I also assume that there must be a way to indicate the class that represents the top level or entry point (main) of the application. That appears to be the init method. Is this anywhere close to being correct?
The problem is that I'm not sure how to get started. I have played around with the system browser a bit. I can see that you would create a category and be presented with what looks to be a template for a class. I'm confused about the fact that the "Pharo by Example" has me creating a package when I don't see that in the 1.3 browser. I also don't know how to create additional classes in that category or how to tell the environment which class is my application entry point. I figure maybe the answer to all of this is a little too much for a mailing list question, which is why I didn't start out asking this. Anyway, at least this gives you an idea of where I'm stuck. Maybe my brain just isn't wired to understand something that may be obvious to others.
Thanks, Gerry
-----Original Message-----
From: "Serge Stinckwich" < serge.stinckwich@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 23:04 Subject: Re: [Pharo-project] Pharo by Example
On Thu, Jan 5, 2012 at 11:45 AM, Gerry Weaver < gerryw@compvia.com> wrote:
Hi,
I've been trying various downloads, but I haven't found anything that works. I guess I may be making it harder than it needs to be, but I really have no idea how to proceed. I've been trying to find some doc on basic things like creating a package, class, etc., but I'm not having much luck. I assume the docs will be updated at some point. Would anyone have a feel for when that might be? I'm not in a hurry at all, so I could wait for a couple of more versions.
Could give us more information about what is not working exactly ? Did you upload the file here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip and try the exemple in the book ?
Regards, -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
Hi Max,
Okay thanks. I think I get the startup scenario now.
I come from the other end of the world in terms of software development (kernel, C, command line, etc.). I guess the part that's giving me a hard time is really the IDE workflow. I want to start writing code, but I feel kind of like I'm trying to build a ship in a bottle. What I would expect is that I would create some kind of project spec and add my code to that, but instead I'm finding this rather strange path. I assume that it's all about defining classes, but I'm having trouble figuring out where and how to do that. For example, is an application a category or is it just a way to group like functionality? Collections look like they are a tool for organizing code? Anyway, I'm going to keep plugging away at it. I kind of hoping maybe Visualworks will fill in some of the blanks.
I recently left my job as a full time developer. There are several projects that I've been thinking about over the last few years. Since I am now a force of one, I'm looking for a higher level (hopefully more productive) language to code in. One of the things that attracted me to Smalltalk was the concept of the image and something called "Opentalk". Most of the applications I have in mind would be distributed in nature. However, a web interface wouldn't be completely out of the question. The FFI is also something that will be critical for me. I have quite a bit of C code that I will want to make use of.
you have native boost for calling them and native boost is cool. We should finish the documentation :(
I have watched several of the screencasts, but they seem to leave out the part that I am having trouble with. I am still actively searching though.
Thanks, Gerry
-----Original Message-----
From: "Max Leske" <maxleske@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/05/12 01:55 Subject: Re: [Pharo-project] Pharo by Example
Hi Gerry
From your talk of application entry points it seems to me that you might be talking about web development with Pharo. In that case PharoByExample won't help you much. Maybe, if you could tell us what you are trying to accomplish, we would be able to help you better. Right now, at least to me, it is not clear why you are having troubles. I've learnt Smalltalk with PBE and Pharo and found everything to be fairly straight forward and clearly explained.
As for the #init method, the only one I can find belongs to the ParseStack object. That is definitely not what you want. What might be confusing you is that you don't "execute" a binary like you would in other cases. Pharo is not only an IDE but it is also the runtime environment.
It just occurred to me, that you might be looking for something like: "if i double click on the image I want my application X to be launched in the image". That can certainly be done but is not the usual way. More often, you will save the image with the "start UI" of your application opened, so that when a user opens the image he will see one window with your application.
You also might want to check out the Pharo Screencasts (http://www.pharo-project.org/documentation/screencasts), you might see something there that helps you to better understand Pharo. However, from what I have experienced I suggest that you just work through PBE and see if your questions persist.
Cheers, Max
On 05.01.2012, at 06:50, Gerry Weaver wrote:
Hi,
Perhaps I should just take a shot at explaining what I'm having trouble understanding.
My current take on the environment is that an image is basically a container that holds everything in the application. In development mode it also includes the IDE and tools. I assume one would typically start by defining a class that was a subclass of some system or package class. I assume this process would continue until the application logic and data were defined. I also assume that there must be a way to indicate the class that represents the top level or entry point (main) of the application. That appears to be the init method. Is this anywhere close to being correct?
The problem is that I'm not sure how to get started. I have played around with the system browser a bit. I can see that you would create a category and be presented with what looks to be a template for a class. I'm confused about the fact that the "Pharo by Example" has me creating a package when I don't see that in the 1.3 browser. I also don't know how to create additional classes in that category or how to tell the environment which class is my application entry point. I figure maybe the answer to all of this is a little too much for a mailing list question, which is why I didn't start out asking this. Anyway, at least this gives you an idea of where I'm stuck. Maybe my brain just isn't wired to understand something that may be obvious to others.
Thanks, Gerry
-----Original Message-----
From: "Serge Stinckwich" <serge.stinckwich@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 23:04 Subject: Re: [Pharo-project] Pharo by Example
On Thu, Jan 5, 2012 at 11:45 AM, Gerry Weaver <gerryw@compvia.com> wrote:
Hi,
I've been trying various downloads, but I haven't found anything that works. I guess I may be making it harder than it needs to be, but I really have no idea how to proceed. I've been trying to find some doc on basic things like creating a package, class, etc., but I'm not having much luck. I assume the docs will be updated at some point. Would anyone have a feel for when that might be? I'm not in a hurry at all, so I could wait for a couple of more versions.
Could give us more information about what is not working exactly ? Did you upload the file here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip and try the exemple in the book ?
Regards, -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
On 5 Jan 2012, at 05:50, "Gerry Weaver" <gerryw@compvia.com> wrote:
Hi,
Perhaps I should just take a shot at explaining what I'm having trouble understanding.
My current take on the environment is that an image is basically a container that holds everything in the application.
Indeed.
In development mode it also includes the IDE and tools.
For general Pharo images there is no "mode". They all contain some set of development tools. To remove them you have to go to some effort (stripping) or find a smaller seed image that does not contain them (expert).
I assume one would typically start by defining a class that was a subclass of some system or package class.
You could start with Object.
I assume this process would continue until the application logic and data were defined.
Yes
I also assume that there must be a way to indicate the class that represents the top level or entry point (main) of the application.
Not really. There is no main() as there is in C. There is an entry point for the whole system and this triggers the start of the UI and other services. If you want your application to start on system start you need to register it on the startup list (or whatever the current abstraction is.) For development you can register the start on a world menu or just use a workspace to evaluate the starting expression.
That appears to be the init method. Is this anywhere close to being correct?
The problem is that I'm not sure how to get started. I have played around with the system browser a bit. I can see that you would create a category and be presented with what looks to be a template for a class. I'm confused about the fact that the "Pharo by Example" has me creating a package when I don't see that in the 1.3 browser.
So for PBE you have to run the exact image the book was targeted for and the examples should work.
I also don't know how to create additional classes in that category or how to tell the environment which class is my application entry point. I figure maybe the answer to all of this is a little too much for a mailing list question, which is why I didn't start out asking this. Anyway, at least this gives you an idea of where I'm stuck. Maybe my brain just isn't wired to understand something that may be obvious to others.
So for the standard/original system browser I would do the following. In the left most pane you can context click and create a new category 'example'. You get shown a class template in the bottom pane that is an expression to make a class. Type the name of the subclass e.g. ExampleClass into the text where it says NameOfSubclass and context click accept. This makes the new class. On the class side (the button class) define a method go. To do this you need the method template. Normally you get this selecting one of the method protocols. You can replace the method template with something like go FillInTheBlankMorph request: 'hello' And context click accept. Now open a workspace. Evaluate ExampleClass go It should pop up a dialog. That's really it. The "application" runs and then stops. To make more classes click on the class category again. Type a new class name on and accept it. The new class should appear alongside the other one and you can add methods to it. Hope that helps. Mike
Thanks, Gerry
-----Original Message-----
From: "Serge Stinckwich" <serge.stinckwich@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 23:04 Subject: Re: [Pharo-project] Pharo by Example
On Thu, Jan 5, 2012 at 11:45 AM, Gerry Weaver <gerryw@compvia.com> wrote:
Hi,
I've been trying various downloads, but I haven't found anything that works. I guess I may be making it harder than it needs to be, but I really have no idea how to proceed. I've been trying to find some doc on basic things like creating a package, class, etc., but I'm not having much luck. I assume the docs will be updated at some point. Would anyone have a feel for when that might be? I'm not in a hurry at all, so I could wait for a couple of more versions.
Could give us more information about what is not working exactly ? Did you upload the file here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip and try the exemple in the book ?
Regards, -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
Hi Michael, Well... that actually makes good sense (maybe  the terminology is my issue). I think I've written C code for so long that I get too bogged down in the details. So, what exactly is a category vs a collection vs a package?. I seems like a category is just a mechanism for organizing code?. I guess a package would be like a Lisp module or C library? What about collections? Thanks for your help. It really did help. Gerry  -----Original Message-----
From: "Michael Roberts" <mike@mjr104.co.uk> To: Pharo-project@lists.gforge.inria.fr Date: 01/05/12 02:18 Subject: Re: [Pharo-project] Pharo by Example
On 5 Jan 2012, at 05:50, "Gerry Weaver" <gerryw@compvia.com> wrote:
Hi,
Perhaps I should just take a shot at explaining what I'm having trouble understanding.
My current take on the environment is that an image is basically a container that holds everything in the application.
Indeed.
In development mode it also includes the IDE and tools.
For general Pharo images there is no "mode". They all contain some set of development tools. To remove them you have to go to some effort (stripping) or find a smaller seed image that does not contain them (expert).
I assume one would typically start by defining a class that was a subclass of some system or package class.
You could start with Object.
I assume this process would continue until the application logic and data were defined.
Yes
I also assume that there must be a way to indicate the class that represents the top level or entry point (main) of the application.
Not really. There is no main() as there is in C. There is an entry point for the whole system and this triggers the start of the UI and other services. If you want your application to start on system start you need to register it on the startup list (or whatever the current abstraction is.)
For development you can register the start on a world menu or just use a workspace to evaluate the starting expression.
That appears to be the init method. Is this anywhere close to being correct?
The problem is that I'm not sure how to get started. I have played around with the system browser a bit. I can see that you would create a category and be presented with what looks to be a template for a class. I'm confused about the fact that the "Pharo by Example" has me creating a package when I don't see that in the 1.3 browser.
So for PBE you have to run the exact image the book was targeted for and the examples should work.
I also don't know how to create additional classes in that category or how to tell the environment which class is my application entry point. I figure maybe the answer to all of this is a little too much for a mailing list question, which is why I didn't start out asking this. Anyway, at least this gives you an idea of where I'm stuck. Maybe my brain just isn't wired to understand something that may be obvious to others.
So for the standard/original system browser I would do the following. In the left most pane you can context click and create a new category 'example'. You get shown a class template in the bottom pane that is an expression to make a class. Type the name of the subclass e.g. ExampleClass into the text where it says NameOfSubclass and context click accept. This makes the new class. On the class side (the button class) define a method go. To do this you need the method template. Normally you get this selecting one of the method protocols. You can replace the method template with something like
go   FillInTheBlankMorph request: 'hello'
And context click accept. Now open a workspace. Evaluate
ExampleClass go
It should pop up a dialog. That's really it. The "application" runs and then stops.
To make more classes click on the class category again. Type a new class name on and accept it. The new class should appear alongside the other one and you can add methods to it.
Hope that helps. Mike
Thanks, Gerry
-----Original Message-----
From: "Serge Stinckwich" <serge.stinckwich@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 23:04 Subject: Re: [Pharo-project] Pharo by Example
On Thu, Jan 5, 2012 at 11:45 AM, Gerry Weaver <gerryw@compvia.com> wrote:
Hi,
I've been trying various downloads, but I haven't found anything that works. I guess I may be making it harder than it needs to be, but I really have no idea how to proceed. I've been trying to find some doc on basic things like creating a package, class, etc., but I'm not having much luck. I assume the docs will be updated at some point. Would anyone have a feel for when that might be? I'm not in a hurry at all, so I could wait for a couple of more versions.
Could give us more information about what is not working exactly ? Did you upload the file here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip and try the exemple in the book ?
Regards, -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
It is hopefully explained somewhere in a book.... It is more complex than needed by history. Here is what I roughly understand: Categories are the original mechanism to group classes together. The browser shows this as the left most pane and there are tools to allow you to reorganise it as you want. The category is just a string associated with the class (or the class' organiser). All code originally lived in the ST80 (or early squeak) image. You could move it around externally by filing it out either into a .st file or change set .cs file. Class and method definitions in this chunk format are quite flexible and specify the changes that should be made on file-in. You are not constrained to move whole classes or whole class categories around. The history of Smalltalk source control is varied. Various projects map image representation of classes onto file based representation in CVS, SVN and so on. Packages in general mean the mapping of a subset of the image onto an external source control construct. I.e. a modularisation of the image that can be shared in a distributed developer environment. Various Smalltalks do this in various ways. The dominant squeak derived system is Monticello. A class category can be mapped onto a Monticello package. Monticello defines a file format which is the physical representation of the package. It provides tools to manage these packages. Part of the complexity currently is that you are not forced to have the system cleanly separated into packages. You can leave bits of the system unpackaged and you currently have to bootstrap (at some point in history) the source management (package) system into an image based on categories. Since there is an overlap of design concerns and implementations it is not obvious what tools or file formats do what. In general in Pharo there is a desire to move towards a more modular system. There is a desire to cleanly bootstrap this system from some kernel specification. Ideally we would then have a namespace implementation that allowed us to isolate and load conflicting code. We also need package dependency management and do on. You will see references to these goals and discussions on all these topics from time to time. Some of these are implemented, some of these are deprecated, and the wish list is long. You wouldn't really start out fresh with the combination of concepts and implementations we currently have in Pharo. Not sure what collections are in this context. Hope that helps Mike On 5 Jan 2012, at 08:37, "Gerry Weaver" <gerryw@compvia.com> wrote:
Hi Michael,
Well... that actually makes good sense (maybe the terminology is my issue). I think I've written C code for so long that I get too bogged down in the details. So, what exactly is a category vs a collection vs a package?. I seems like a category is just a mechanism for organizing code?. I guess a package would be like a Lisp module or C library? What about collections?
Thanks for your help. It really did help. Gerry
-----Original Message-----
From: "Michael Roberts" <mike@mjr104.co.uk> To: Pharo-project@lists.gforge.inria.fr Date: 01/05/12 02:18 Subject: Re: [Pharo-project] Pharo by Example
On 5 Jan 2012, at 05:50, "Gerry Weaver" <gerryw@compvia.com> wrote:
Hi,
Perhaps I should just take a shot at explaining what I'm having trouble understanding.
My current take on the environment is that an image is basically a container that holds everything in the application.
Indeed.
In development mode it also includes the IDE and tools.
For general Pharo images there is no "mode". They all contain some set of development tools. To remove them you have to go to some effort (stripping) or find a smaller seed image that does not contain them (expert).
I assume one would typically start by defining a class that was a subclass of some system or package class.
You could start with Object.
I assume this process would continue until the application logic and data were defined.
Yes
I also assume that there must be a way to indicate the class that represents the top level or entry point (main) of the application.
Not really. There is no main() as there is in C. There is an entry point for the whole system and this triggers the start of the UI and other services. If you want your application to start on system start you need to register it on the startup list (or whatever the current abstraction is.)
For development you can register the start on a world menu or just use a workspace to evaluate the starting expression.
That appears to be the init method. Is this anywhere close to being correct?
The problem is that I'm not sure how to get started. I have played around with the system browser a bit. I can see that you would create a category and be presented with what looks to be a template for a class. I'm confused about the fact that the "Pharo by Example" has me creating a package when I don't see that in the 1.3 browser.
So for PBE you have to run the exact image the book was targeted for and the examples should work.
I also don't know how to create additional classes in that category or how to tell the environment which class is my application entry point. I figure maybe the answer to all of this is a little too much for a mailing list question, which is why I didn't start out asking this. Anyway, at least this gives you an idea of where I'm stuck. Maybe my brain just isn't wired to understand something that may be obvious to others.
So for the standard/original system browser I would do the following. In the left most pane you can context click and create a new category 'example'. You get shown a class template in the bottom pane that is an expression to make a class. Type the name of the subclass e.g. ExampleClass into the text where it says NameOfSubclass and context click accept. This makes the new class. On the class side (the button class) define a method go. To do this you need the method template. Normally you get this selecting one of the method protocols. You can replace the method template with something like
go FillInTheBlankMorph request: 'hello'
And context click accept. Now open a workspace. Evaluate
ExampleClass go
It should pop up a dialog. That's really it. The "application" runs and then stops.
To make more classes click on the class category again. Type a new class name on and accept it. The new class should appear alongside the other one and you can add methods to it.
Hope that helps. Mike
Thanks, Gerry
-----Original Message-----
From: "Serge Stinckwich" <serge.stinckwich@gmail.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/04/12 23:04 Subject: Re: [Pharo-project] Pharo by Example
On Thu, Jan 5, 2012 at 11:45 AM, Gerry Weaver <gerryw@compvia.com> wrote:
Hi,
I've been trying various downloads, but I haven't found anything that works. I guess I may be making it harder than it needs to be, but I really have no idea how to proceed. I've been trying to find some doc on basic things like creating a package, class, etc., but I'm not having much luck. I assume the docs will be updated at some point. Would anyone have a feel for when that might be? I'm not in a hurry at all, so I could wait for a couple of more versions.
Could give us more information about what is not working exactly ? Did you upload the file here: https://gforge.inria.fr/frs/download.php/27023/PBE-1.0.zip and try the exemple in the book ?
Regards, -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Matsuno Laboratory, Kyoto University, Japan (until 12/2011) http://www.mechatronics.me.kyoto-u.ac.jp/ Every DSL ends up being Smalltalk http://doesnotunderstand.org/
Gerry Weaver wrote:
Hello All,
I'm new to Pharo and SmallTalk. I am trying to follow "Pharo by Example", but my Pharo browser is not the same. I tried to follow the FAQ about how to fix that, but the drop down menu doesn't look the same either. Should I be using a different version of Pharo? I'm using 1.3.
Thanks, Gerry
Gerry, One of my first experiences learning Squeak/Pharo (Pharo is a fork of Squeak) was doing the "Laser Game - A Development Example for Squeak 3.9" tutorial [1]. I found it really great seeing the start-to-end building of an application and I think you would find it most useful.
I come from the other end of the world in terms of software development (kernel, C, command line, etc.)Sounds like
It sounds like you may also be new to object oriented programming. In that case I suggest that Smalltalk what you need right now. Even though other language have object-oriented features, many are "hybrid" languages and it is hard to unlearn your previous non-object-oriented habits. Smalltalk helps you THINK object oriented and will be a great benefit even if you end up with another language. Try these steps... 1. Depending on your platform, download file [2] for Windows, [3] for Mac or [4] for Linux. ( Note, I have only used the Windows one) 2. Unzip and run the Squeak executable. 3. Do the tutorial [1] [1] http://squeak.preeminent.org/tut2007/html/index.html [2] http://ftp.squeak.org/3.9/win/Squeak3.9-win32.zip [3] http://ftp.squeak.org/3.9/mac/Squeak3.9-7067mac.zip [4] http://ftp.squeak.org/3.9/unix-linux/Squeak3.9-final-7067.zip cheers, Ben
Hi Ben, I appreciate your suggestions. I'm actually doing okay now. I was just having some issues understanding the IDE. It's very different than anything I've ever used before. I do have some experience with C++, Objective-c, and Object Pascal though. Thanks, Gerry -----Original Message-----
From: "Ben Coman" <btc@openInWorld.com> To: Pharo-project@lists.gforge.inria.fr Date: 01/05/12 07:46 Subject: Re: [Pharo-project] Pharo by Example
Gerry Weaver wrote:
Hello All,
I'm new to Pharo and SmallTalk. I am trying to follow "Pharo by Example", but my Pharo browser is not the same. I tried to follow the FAQ about how to fix that, but the drop down menu doesn't look the same either. Should I be using a different version of Pharo? I'm using 1.3.
Thanks, Gerry  Gerry,
One of my first experiences learning Squeak/Pharo (Pharo is a fork of Squeak) was doing the "Laser Game - A Development Example for Squeak 3.9" tutorial [1]. Â I found it really great seeing the start-to-end building of an application and I think you would find it most useful. Â
I come from the other end of the world in terms of software development (kernel, C, command line, etc.)Sounds like
It sounds like you may also be new to object oriented programming. Â In that case I suggest that Smalltalk what you need right now. Â Even though other language have object-oriented features, many are "hybrid" languages and it is hard to unlearn your previous non-object-oriented habits. Â Smalltalk helps you THINK object oriented and will be a great benefit even if you end up with another language.
Try these steps... 1. Depending on your platform, download file [2] for Windows, [3] for Mac or [4] for Linux. Â ( Note, I have only used the Windows one) 2. Unzip and run the Squeak executable. 3. Do the tutorial [1]
[1] http://squeak.preeminent.org/tut2007/html/index.html [2] http://ftp.squeak.org/3.9/win/Squeak3.9-win32.zip [3] http://ftp.squeak.org/3.9/mac/Squeak3.9-7067mac.zip [4] http://ftp.squeak.org/3.9/unix-linux/Squeak3.9-final-7067.zip
cheers, Ben
participants (8)
-
Ben Coman -
Gerry Weaver -
Guillermo Polito -
Max Leske -
Michael Roberts -
Sean P. DeNigris -
Serge Stinckwich -
Stéphane Ducasse