[Pharo-users] SmalltalkHub.com <- Flakey?

2015-01-13 Thread sergio_101
Is the smalltalk hub site really flakey lately, or is it just me?

i am having problems loading pages, loading projects, etc..

code seems to be uploading okay, though.


[Pharo-users] FullCalendar on JQueryWidgetBox not work

2015-01-13 Thread Oswall Verny Arguedas C. via Pharo-users
--- Begin Message ---
Regards,



I use Seaside 3.1, Pharo 3.0,  on Ubuntu 14.04.I need to use fullcalendar on 
JQWidgetBox but does not work.
When I try to access it with url:     
http://localhost:9090/jquery-widgets/fullcalendar

Error message is:
MessageNotUnderstood:  receiver of "encodeCollection:on:" is nil
Thanks for the support
Oswall 

   --- Begin Message ---
Regards,

I use Seaside 3.1, Pharo 3.0,  on Ubuntu 14.04.I need to use fullcalendar on 
JQWidgetBox but does not work.
When I try to access it with url:     
http://localhost:9090/jquery-widgets/fullcalendar

Error message is:
MessageNotUnderstood:  receiver of "encodeCollection:on:" is nil
Thanks for the support
Oswall --- End Message ---
--- End Message ---


Re: [Pharo-users] Capturing a stream

2015-01-13 Thread Demian Schkolnik
Hello everyone. Thank you Juampi & Ben for your answers. This is the final
working code, made with Johan's help:

* | process output thread |*
* thread := [process := (PipeableOSProcess  command: 'rostopic echo
/turtle1/cmd_vel __name:=echo2') ] fork. *
* (Delay forSeconds:3) wait.*
* (OSProcess command: 'rostopic pub -1 /turtle1/cmd_vel geometry_msgs/Twist
-- ''[3.0, 0.0, 0.0]'' ''[0.0, 0.0, 1.5]'' ').*
* (Delay forSeconds:3) wait.*

* output := process upToEnd.*

Now we have everything in output. It only remains to kill the thread now.

Thank you all for the help!

El Tue Jan 13 2015 at 5:53:26 PM, Juan Pablo Sandoval Alcocer <
juampi...@gmail.com> escribió:

> Hi Demian,
>
> I am not sure if I understood well your questions, but maybe you can try
> something like:
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> MyWriteStream>>nextPutAll: content
> Transcript show: content.
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> and then execute:
>
> [(PipeableOSProcess command:'sh /Users/jsandova/workspace/test.sh')
>  outputOn: (MyWriteStream with: Array new)] fork.
>
> Regards,
> Juampi
>
> 2015-01-13 12:47 GMT-03:00 Ben Coman :
>
> So you mean 'rostopic echo' and 'rostopic pub' ?   So its a
>> publisher/subscriber model with 'echo' as the subscriber ?
>>
>> (I'll needs others to confirm this is possible but...) the way to go may
>> be to fork 'rotopic echo' and leave it running, parsing its results into a
>> queue that some other part of your program consumes.
>>
>> To simplify this to check feasibility, I'd start with a single shell
>> script outputting text at intervals like this...
>> "test.sh"
>> for VARIABLE in 1 2 3 4 5 .. N
>> do
>> echo $VARIABLE
>> sleep 2
>> done
>>
>>
>> and in Pharo, assuming you can process the output stream asynchronously,
>> every time you receive a newline, open an inspector showing the line just
>> received.  But sorry I don't know *PipeableOSProcess enough to know how.*
>>
>> *cheers -ben*
>>
>>
>> On Tue, Jan 13, 2015 at 11:05 PM, Demian Schkolnik <
>> demianschkol...@gmail.com> wrote:
>>
>>> It is actually not a native linux command, but rather something
>>> belonging to ROS (Robot Robot Operating System). I did not want to
>>> complicate the question further.. The behaviour is as I described it. This
>>> echo command sits still in the console where it was called, and waits. When
>>> some message is send, then it just prints the message on screen and waits.
>>> The pub method (also belonging to ROS) publishes a message and exits.
>>> I tried Ben's solution (thanks!), but unfortunately stringVar remains
>>> nil. I think the problem is we are assigning the output of the command to
>>> stringVar, which is nothing, at the moment.
>>> Any ideas?
>>> Thank you all.
>>>
>>> El Tue Jan 13 2015 at 6:15:01, Ben Coman  escribió:
>>>
>>> I've never known 'echo' to wait for input, and haven't heard of this
 echo & pub combination.  Do you have some link to a tutorial showing how
 they are used?

 However just wildly guessing, are you wanting to get output from a long
 running command without blocking the Pharo UI?
 In that case, what about...
 [ *stringVar := (PipeableOSProcess  command: 'echo...') output ]
 fork. *
 *?*
 *cheers -ben*

 On Tue, Jan 13, 2015 at 9:18 AM, Demian Schkolnik <
 demianschkol...@gmail.com> wrote:

> Hello everyone.
>
> I have the following question. I have a specific 'echo ...' command,
> which I send to the linux console via " OSProcess command:'echo ... ' ".
> This echo command, when executed on the native linux console, stands
> by until it receives some message.
> Following this, I have to execute a 'pub...' command, which gives some
> information that the echo command will print on screen. On linux, you run
> 'echo..' on a terminal and 'pub...' on another.
> My objective here is to capture the output of echo into a smalltalk
> variable for later use.
> Normally, if a console command prints something immediately to screen,
> I use
> *(PipeableOSProcess command:'some command') output.*
>
> It is here a little different though, since this command will not
> print something immediately to screen. I want to do something like this,
> where the final output of 'echo..' stays in stringVar.
>
> *stringVar := (PipeableOSProcess  command: 'echo...') output. *
> *(Delay forSeconds:3) wait.*
> *(OSProcess command: 'pub... ').*
> *(Delay forSeconds:3) wait.*
>
> Thank you all.
>
>
>
>

>>
>
>
> --
> Saludos,
> Juan Pablo
>


Re: [Pharo-users] Capturing a stream

2015-01-13 Thread Juan Pablo Sandoval Alcocer
Hi Demian,

I am not sure if I understood well your questions, but maybe you can try
something like:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
MyWriteStream>>nextPutAll: content
Transcript show: content.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

and then execute:

[(PipeableOSProcess command:'sh /Users/jsandova/workspace/test.sh')
 outputOn: (MyWriteStream with: Array new)] fork.

Regards,
Juampi

2015-01-13 12:47 GMT-03:00 Ben Coman :

> So you mean 'rostopic echo' and 'rostopic pub' ?   So its a
> publisher/subscriber model with 'echo' as the subscriber ?
>
> (I'll needs others to confirm this is possible but...) the way to go may
> be to fork 'rotopic echo' and leave it running, parsing its results into a
> queue that some other part of your program consumes.
>
> To simplify this to check feasibility, I'd start with a single shell
> script outputting text at intervals like this...
> "test.sh"
> for VARIABLE in 1 2 3 4 5 .. N
> do
> echo $VARIABLE
> sleep 2
> done
>
>
> and in Pharo, assuming you can process the output stream asynchronously,
> every time you receive a newline, open an inspector showing the line just
> received.  But sorry I don't know *PipeableOSProcess enough to know how.*
>
> *cheers -ben*
>
>
> On Tue, Jan 13, 2015 at 11:05 PM, Demian Schkolnik <
> demianschkol...@gmail.com> wrote:
>
>> It is actually not a native linux command, but rather something belonging
>> to ROS (Robot Robot Operating System). I did not want to complicate the
>> question further.. The behaviour is as I described it. This echo command
>> sits still in the console where it was called, and waits. When some message
>> is send, then it just prints the message on screen and waits. The pub
>> method (also belonging to ROS) publishes a message and exits.
>> I tried Ben's solution (thanks!), but unfortunately stringVar remains
>> nil. I think the problem is we are assigning the output of the command to
>> stringVar, which is nothing, at the moment.
>> Any ideas?
>> Thank you all.
>>
>> El Tue Jan 13 2015 at 6:15:01, Ben Coman  escribió:
>>
>> I've never known 'echo' to wait for input, and haven't heard of this echo
>>> & pub combination.  Do you have some link to a tutorial showing how they
>>> are used?
>>>
>>> However just wildly guessing, are you wanting to get output from a long
>>> running command without blocking the Pharo UI?
>>> In that case, what about...
>>> [ *stringVar := (PipeableOSProcess  command: 'echo...') output ]
>>> fork. *
>>> *?*
>>> *cheers -ben*
>>>
>>> On Tue, Jan 13, 2015 at 9:18 AM, Demian Schkolnik <
>>> demianschkol...@gmail.com> wrote:
>>>
 Hello everyone.

 I have the following question. I have a specific 'echo ...' command,
 which I send to the linux console via " OSProcess command:'echo ... ' ".
 This echo command, when executed on the native linux console, stands by
 until it receives some message.
 Following this, I have to execute a 'pub...' command, which gives some
 information that the echo command will print on screen. On linux, you run
 'echo..' on a terminal and 'pub...' on another.
 My objective here is to capture the output of echo into a smalltalk
 variable for later use.
 Normally, if a console command prints something immediately to screen,
 I use
 *(PipeableOSProcess command:'some command') output.*

 It is here a little different though, since this command will not print
 something immediately to screen. I want to do something like this, where
 the final output of 'echo..' stays in stringVar.

 *stringVar := (PipeableOSProcess  command: 'echo...') output. *
 *(Delay forSeconds:3) wait.*
 *(OSProcess command: 'pub... ').*
 *(Delay forSeconds:3) wait.*

 Thank you all.




>>>
>


-- 
Saludos,
Juan Pablo


[Pharo-users] Notification on GC of an object?

2015-01-13 Thread Torsten Bergmann
Esteban wrote:
>you also need to register the object for cleanup, in the WeakRegistry.
>(not on my machine, sorry I cannot put an example, but look around)

It is simple and here is an example:


Create a class:

  Object subclass: #Bar
instanceVariableNames: 'id'
classVariableNames: ''
category: 'Foo'

implemented an #initialize method

  initialize
super initialize.
id := UUID new. 
Transcript show: 'Initialized ', id printString; cr

and implemented a finalization method:

  finalize

Transcript show: 'Finalized ', id printString; cr

Now in the workspace I instantiate the object:

   |anObject|
   Transcript open; clear.
   anObject := Bar new.
   Transcript flush.
   WeakRegistry default add: anObject.
   
and by forcing garbage collection in a second step I can 
see that the finalization method is working:

   3 timesRepeat: [ Smalltalk garbageCollect ].
   Transcript flush.
   

And I get the following output

  Initialized 4aa47ef1-0e4c-9a47-bddf-b406ee2042e4
  Finalized 4aa47ef1-0e4c-9a47-bddf-b406ee2042e4

If it doesnt work check your VM for updates.
   
I'm using Pharo4.0 Latest update: #40442 on Windows with the following VM:
Win32 built on Sep  4 2014 01:13:32 Compiler: 4.6.2 VMMaker versionString 
https://github.com/pharo-project/pharo-vm.git 
Commit: c7bc23dd6053d5f9934f7dd427537f76fc96eb32 Jenkins build #14851



Re: [Pharo-users] Object select or create methods

2015-01-13 Thread sergio_101
oh! Thing, in this case, is just an object.. that extends Object.. where
'red_thing' is just a string..

so, myThing's key would just be a string..

that way, i could do something like

myThing := Thing getByKey: 'red_thing' .. or
myThing := Thing getByKey: 'blue_thing'

yes, this will be a global thing..

>>  Thing>>findOrCreateByKey: aKey
 >>   ^Smalltalk at: aKey ifAbsentPut:[self createThingFor:aKey]

i am not sure this is what i want to do.. i jus want to use the above to
create a bunch of object.. then later, do something like:

newThing := Thing findByKey: 'green_thing'.

the above looks like i would have a nebulous 'key'.. and from there, i can
use it to grab my instance of Thing. is that correct?

oh! and asMutator is what i was looking for..

thanks so much!



On Tue Jan 13 2015 at 1:07:42 PM Paul DeBruicker  wrote:

> Hi - comments below
>
>
> sergio_101 wrote
> > During my daily work in another framework, we are able to do something
> > very
> > handy like so:
> >
> > myThing := Thing findOrCreateByKey: 'red_thing'.
> >
> > where the key is some underscored all lower case unique name for an
> object
> > we will be calling all the time.
> >
> > this will return either a new thing with a key of 'red_thing' or the
> > current one that already exists.
>
> In your example above what type of object is Thing?
> If the object stored at red_thing is to be a global then you'd want
>
> Thing>>findOrCreateByKey: aKey
>   ^Smalltalk at: aKey ifAbsentPut:[self createThingFor:aKey]
>
> Look at the senders/implementors of #at:ifAbsentPut: for other ideas e.g.
>
> Dictionary>>#at:ifAbsentPut:
>
>
> > We can also do something like:
> >
> > myThing updateWithDictionary: aDictionary.
> >
> > and it will flip through the dictionary and assign values to the instance
> > variables.
>
> MyClass>>updateWithDictionary: aDictionary
>
>   aDictionary keysAndValuesDo:[:key :value|
> self perform: key asMutator with: value].
>
>
>
> > The above is very handy.
> >
> > I am currently creating a bunch of methods that populate my image with
> > real
> > objects, and could use these methods.
> >
> > My question is. Does a behavior like this already exist? If not, I'd like
> > to add these methods to my project (in monticello). They will be used
> with
> > several different objects, so should I add the methods to Object?
> >
> > I would imagine this is something I would want to use a great deal. How
> > would I go aobut making this something I could include easily in further
> > projects?
> >
> > I realize that the 'updateWithDictionary' is very inefficient, but this
> > will just be somethign that runs once, during data import, and never
> > again.
> >
> > I just want to make sure I am not doing anything whacky.
> >
> > Thanks!
>
>
>
>
>
> --
> View this message in context: http://forum.world.st/Object-
> select-or-create-methods-tp4799266p4799384.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Re: [Pharo-users] Useful tools?

2015-01-13 Thread Paul DeBruicker
The other thing I'd add is if you have an area of interest then let us know
so people can point you  to things relevant to you.  There is a lot out
there, if somewhat poorly organized.  




Laura wrote
> Hi all,
> 
> What are some tools / plug-ins/ projects / packages / frameworks
> you find very useful or you use very frequently for development?
> (please for each name it and state it's purpose)
> I'm a newcomer to Pharo , so it hasn't to be something rare.
> 
> 
> On the side...
> I feel curious about how one gets to know about the existence of such
> resources. Is there any sort of "resources index" (like a wiki page with
> categories)? Besides books which can't be comprehensive because of their
> nature. Such an index would be extremely handy in many ways.
> Do you agree? Is it plausible, if it doesn't exist, to built it
> collaboratively?
> 
> It is a sad thing that useful tools go unnoticed when they could have
> solved a problem you faced or eased your work if only you've known about
> their existence. For what i've read on spread posts i feel like there are
> many such tools.
> 
> I had this experience of useful resource existence ignorance with
> TilingWindowManager (LaurentLaffont ) and with RBConfigurableFormatter (by
> the way i can't figure out how to turn it on). Now i feel like having a
> multiclipboard would be useful (i have one on my OS but anyway...)
> 
> Best,
> Laura





--
View this message in context: 
http://forum.world.st/Useful-tools-tp4799187p4799391.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Useful tools?

2015-01-13 Thread Paul DeBruicker
Hi Laura,



Laura wrote
> Hi all,
> 
> What are some tools / plug-ins/ projects / packages / frameworks
> you find very useful or you use very frequently for development?
> (please for each name it and state it's purpose)
> I'm a newcomer to Pharo , so it hasn't to be something rare.

When I was starting I used:

Terse Guide To Squeak: http://squeak.joyful.com/LanguageNotes (describes the
syntax and provides a one line example for most of what a person uses on a
day to day basis while coding, not so much for reading code/exploring the
image)

and 

http://www.amazon.com/Smalltalk-Best-Practice-Patterns-Kent/dp/013476904X

and the mailing lists.



> On the side...
> I feel curious about how one gets to know about the existence of such
> resources. Is there any sort of "resources index" (like a wiki page with
> categories)? Besides books which can't be comprehensive because of their
> nature. Such an index would be extremely handy in many ways.
> Do you agree? Is it plausible, if it doesn't exist, to built it
> collaboratively?

I agree 100%.  There is a nascent one being created here:


http://smalltalkrenaissance.wordpress.com/resources/



> It is a sad thing that useful tools go unnoticed when they could have
> solved a problem you faced or eased your work if only you've known about
> their existence. For what i've read on spread posts i feel like there are
> many such tools.
> 
> I had this experience of useful resource existence ignorance with
> TilingWindowManager (LaurentLaffont ) and with RBConfigurableFormatter (by
> the way i can't figure out how to turn it on). Now i feel like having a
> multiclipboard would be useful (i have one on my OS but anyway...)

For several unimportant reasons automatic code formatting was removed in
Pharo 2.0 and has not been restored to the official images.  To get it in
Pharo 3 you have to load a slice from the Pharo30 inbox.  

The Pharo30Inbox should be in your list of repositories in your Monticello
browser.  Once youve opened it search for 

SLICE-Issue-14387-ressurrect-format-on-accept-and-format-on-display

Load the package in the pane on the right hand side.  

Once the slice is loaded open the settings browser from the world menu.
Choose the 'Code Browsing' section and click the boxes next to 'Pretty
Print' and 'Format code on accept'


Good luck

Paul


> Best,
> Laura





--
View this message in context: 
http://forum.world.st/Useful-tools-tp4799187p4799390.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Object select or create methods

2015-01-13 Thread Paul DeBruicker
Hi - comments below


sergio_101 wrote
> During my daily work in another framework, we are able to do something
> very
> handy like so:
> 
> myThing := Thing findOrCreateByKey: 'red_thing'.
> 
> where the key is some underscored all lower case unique name for an object
> we will be calling all the time.
> 
> this will return either a new thing with a key of 'red_thing' or the
> current one that already exists.

In your example above what type of object is Thing? 
If the object stored at red_thing is to be a global then you'd want

Thing>>findOrCreateByKey: aKey
  ^Smalltalk at: aKey ifAbsentPut:[self createThingFor:aKey]

Look at the senders/implementors of #at:ifAbsentPut: for other ideas e.g.

Dictionary>>#at:ifAbsentPut:


> We can also do something like:
> 
> myThing updateWithDictionary: aDictionary.
> 
> and it will flip through the dictionary and assign values to the instance
> variables.

MyClass>>updateWithDictionary: aDictionary

  aDictionary keysAndValuesDo:[:key :value| 
self perform: key asMutator with: value].



> The above is very handy.
> 
> I am currently creating a bunch of methods that populate my image with
> real
> objects, and could use these methods.
> 
> My question is. Does a behavior like this already exist? If not, I'd like
> to add these methods to my project (in monticello). They will be used with
> several different objects, so should I add the methods to Object?
> 
> I would imagine this is something I would want to use a great deal. How
> would I go aobut making this something I could include easily in further
> projects?
> 
> I realize that the 'updateWithDictionary' is very inefficient, but this
> will just be somethign that runs once, during data import, and never
> again.
> 
> I just want to make sure I am not doing anything whacky.
> 
> Thanks!





--
View this message in context: 
http://forum.world.st/Object-select-or-create-methods-tp4799266p4799384.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Useful tools?

2015-01-13 Thread Martin Bähr
Excerpts from stepharo's message of 2015-01-13 17:13:50 +0100:
> Yes this is so true. You are 100% right
> this is why I started to code a catalog extracted from configurationOf.
> https://ci.inria.fr/pharo-contribution/job/PharoProjectCatalog/ but it 
> seems that recent changes broke it.
> 
> Yes you are again right. The person developing Smalltalkhub left and 
> quit Smalltalk against all our expectations.

who is maintaining the server now?
is the code available?

> Yes but if people do not see a value to document how can we do it.

refuse to list packages that are not documented.

> right now this is just a experiment. Two years ago I asked inria to pay 
> an engineer to help us solving this issue
> but they thought that with one engineer he can do everything.

woudln't this be a good project for summer of code (of the just now starting
semester of code)?

would you be willing to mentor such a project?

greetings, martin.

-- 
eKita   -   the online platform for your entire academic life
-- 
chief engineer   eKita.co
pike programmer  pike.lysator.liu.secaudium.net societyserver.org
secretary  beijinglug.org
mentor   fossasia.org
foresight developer  foresightlinux.orgrealss.com
unix sysadmin
Martin Bähr  working in chinahttp://societyserver.org/mbaehr/



Re: [Pharo-users] Becoming proficient in Pharo

2015-01-13 Thread Martin Bähr
Excerpts from nacho's message of 2015-01-13 15:13:41 +0100:
> As I struggle, not without fun of course, to learn more about Pharo and its
> frameworks and idea came to my mind.
> We could put together some guidelines on how to become proficient in Pharo,
> and eventually come to be a power user and / or a developer.
> I read several of this recommendations on various list of other programming
> languages.
> Basically the idea is to have some sort of guide, with theoretical and
> practical stuff. 
> For example:
> *Beginners.*
> *Intermediate*
> *Advanced*
> etc, etc, etc
> 
> Like a road map to becoming a serious Pharo users and / or developer. I know

one thing i noticed, is that such guides need to be topical.
as a web developer i am not interested in GUI stuff, and if i have to go
through tutorials that teach me how to build games than that's not very
motivating.

fortunately there are several web tutorials out there, but not all of them
assume a pharo newbie, but expect me to learn pharo first (which brings me back
to the game tutorial)

one advantage pharo has is that new users need to learn the IDE and smalltalk
at the same time. kind of like learning eclipse and java at the same time. i
could learn eclipse using another language i already know, and i could learn
java without using eclipse, but i can't really learn smalltalk without learning
the IDE at the same time.

so a new-user tutorial needs to explain every step in the IDE while teaching
the language.

a good example for a tutorial on the web-side is
http://zn.stfx.eu/zn/build-and-deploy-1st-webapp/

it does not assume any prior knowledge about pharo, yet it is sufficiently high
level that it will be interesting for an experienced developer (like me)

even a person without programming experience will complete this tutorial
successfully. i just had two students go through this tutorial during google
code-in with more success than i had for other tutorials. 

one of them just started to learn programming, so throughout the tutorial he
didn't really understand all of what he was doing there, but understanding
comes from practice, and a few more tutorials and a good book or course on
programming basics, and he'll get it.

another aspect where this tutorial shines is, that it not only covers coding,
but also deployment and packaging. the only thing missing is testing and
debugging. in other words it introduces me to the major aspects i'd need to
know to start building websites.

> Just an idea, it will be collaborative. I volunteer to keep and maintain the
> list updated in a place where it will be available to anyone but of course
> can't contribute much besides doing that.

as i am involved as mentor for code-in, semester of code and summer of code
programs with a few smalltalk projects, i'll likely have more opportunities to
test different approaches to get started, and hopefully will be able to provide
more input.

greetings, martin.

-- 
eKita   -   the online platform for your entire academic life
-- 
chief engineer   eKita.co
pike programmer  pike.lysator.liu.secaudium.net societyserver.org
secretary  beijinglug.org
mentor   fossasia.org
foresight developer  foresightlinux.orgrealss.com
unix sysadmin
Martin Bähr  working in chinahttp://societyserver.org/mbaehr/



Re: [Pharo-users] Notification on GC of an object?

2015-01-13 Thread Esteban Lorenzano
you also need to register the object for cleanup, in the WeakRegistry.
(not on my machine, sorry I cannot put an example, but look around)

Esteban

> On 13 Jan 2015, at 11:55, Johan Fabry  wrote:
> 
> 
> No, just putting the cleanup code in a finalize method does not seem to be 
> working, sadly.
> 
>> On Jan 13, 2015, at 11:18, Sven Van Caekenberghe  wrote:
>> 
>> Object>>#finalize ?
>> 
>>> On 13 Jan 2015, at 15:13, Johan Fabry  wrote:
>>> 
>>> Hi all,
>>> 
>>> does anybody here have experience with hooking into the GC mechanism so 
>>> that an object gets notified when it is collected? I have a setup here with 
>>> auto generated classes that I would like to remove when their unique 
>>> instance disappears. So I’d like to let the GC figure out all the 
>>> complicated tracking and inform me whenever such an object is collected, 
>>> then I’ll zap the class as well.
>>> 
>>> Experience reports, hints and tips are most welcome!
>>> 
>>> ---> Save our in-boxes! http://emailcharter.org <---
>>> 
>>> Johan Fabry   -   http://pleiad.cl/~jfabry
>>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>> 
>>> 
>> 
>> 
>> 
> 
> 
> 
> ---> Save our in-boxes! http://emailcharter.org <---
> 
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
> 
> 




Re: [Pharo-users] Useful tools?

2015-01-13 Thread stepharo

We need a catalog of packages.
We started to build such a catalog as a prototype.
Now we are reimplementing everything.

Stef

Le 13/1/15 04:58, Laura Risani a écrit :

Hi all,

What are some tools / plug-ins/ projects / packages / frameworks
you find very useful or you use very frequently for development?
(please for each name it and state it's purpose)
I'm a newcomer to Pharo , so it hasn't to be something rare.


On the side...
I feel curious about how one gets to know about the existence of such 
resources. Is there any sort of "resources index" (like a wiki page 
with categories)? Besides books which can't be comprehensive because 
of their nature. Such an index would be extremely handy in many ways.
Do you agree? Is it plausible, if it doesn't exist, to built it 
collaboratively?


It is a sad thing that useful tools go unnoticed when they could have 
solved a problem you faced or eased your work if only you've known 
about their existence. For what i've read on spread posts i feel like 
there are many such tools.


I had this experience of useful resource existence ignorance with 
TilingWindowManager (LaurentLaffont) and with RBConfigurableFormatter 
(by the way i can't figure out how to turn it on). Now i feel like 
having a multiclipboard would be useful (i have one on my OS but 
anyway...)


Best,
Laura







Re: [Pharo-users] Useful tools?

2015-01-13 Thread stepharo



Two questions here:

1. The Configuration Browser is nice, but it still doesn't provide any
kind of description for the packages. I mean, looking at the list of
packages, I can probably guess what "Dependency Analyser" does, but I
have exactly zero chance in guessing what Epicea, Ephestos, Illiad,
Kendrick, Mandrill, Marina, Pastell, Pillar or Ston are about. Even a
single line description, displayed in a tooltip, would be a huge
improvement. Can this be added?


Yes this is so true. You are 100% right
this is why I started to code a catalog extracted from configurationOf.
https://ci.inria.fr/pharo-contribution/job/PharoProjectCatalog/ but it 
seems that recent changes broke it.



2. SmalltalkHub seems to have no way of browsing all available
packages. When I'm starting with Pharo and I don't know how some
library I need is called, I'm essentially out of luck: I need to do
much googling or ask on a mailing list, which both take more time than
it should. I see that " The following is a preview of the exploration
features of SmalltalkHub. More to come!" message is still there - I
remember it from a year or more back. Is this considered such a low
priority task, or is it just that nobody had enough time to work on
it?
Yes you are again right. The person developing Smalltalkhub left and 
quit Smalltalk against all our expectations.




By the way: there is no package description on many package pages.
Even squeaksource tended to have at least one sentence explaining the
purpose of a package (I think?).


There is a package named "Catalog", I don't know how many people is putting
effort on it right now. I think it needs some love.


Ok, that's very nice, although the number of "Please project owner add
catalog description" and mention of "MetaRepoForPharo20" is a little
discouraging.

Yes but if people do not see a value to document how can we do it.


One more question: besides asking on a mailing list, is there any
other way of learning about it? Is it linked from somewhere, or does
it need a lot of googling and luck (ie. googling for "pharo catalog
packages" doesn't return this link, at least on the first page of
results).
right now this is just a experiment. Two years ago I asked inria to pay 
an engineer to help us solving this issue

but they thought that with one engineer he can do everything.




In general I have a feeling that discoverability of Pharo packages is
very bad right now. It's a serious problem for new users, and even to
a bit more advanced users who return to Pharo after some time of not
following announcements.

I agree.


Now i feel like having a multiclipboard would be useful (i have one on my
OS but anyway...)


There seems to be a support for this in Pharo 3.0: under right click
in an editor you have Paste and Paste... menu items. The latter
displays a thing that I think is supposed to be a list of recently
copied things.

My problem, however, is that this doesn't work with OS clipboard (on
Linux). Ctrl+V and Right click->paste don't work at all with OS
clipboard (they do when copying things inside Pharo). X Window systems
have 2 clipboards: one normal and the other called "X selection" - it
seems that the latter is not checked at all, and normal clipboard is
being accessed by Clipboard>>clipboardText (when Alt+p on "Clipboard
default clipboardText"), but it still doesn't work with Ctrl+V.
Strange.

Anyway, I have a very specific (side-)project in mind and I'm going to
try using Pharo for it, so you can expect quite a bit more questions
from me :)

Best regards,
Piotr Klibert







Re: [Pharo-users] Useful tools?

2015-01-13 Thread stepharo

We need a catalog of packages.
We started to build such a catalog as a prototype.
Now we are reimplementing everything.

Stef

Le 13/1/15 04:58, Laura Risani a écrit :

Hi all,

What are some tools / plug-ins/ projects / packages / frameworks
you find very useful or you use very frequently for development?
(please for each name it and state it's purpose)
I'm a newcomer to Pharo , so it hasn't to be something rare.


On the side...
I feel curious about how one gets to know about the existence of such 
resources. Is there any sort of "resources index" (like a wiki page 
with categories)? Besides books which can't be comprehensive because 
of their nature. Such an index would be extremely handy in many ways.
Do you agree? Is it plausible, if it doesn't exist, to built it 
collaboratively?


It is a sad thing that useful tools go unnoticed when they could have 
solved a problem you faced or eased your work if only you've known 
about their existence. For what i've read on spread posts i feel like 
there are many such tools.


I had this experience of useful resource existence ignorance with 
TilingWindowManager (LaurentLaffont) and with RBConfigurableFormatter 
(by the way i can't figure out how to turn it on). Now i feel like 
having a multiclipboard would be useful (i have one on my OS but 
anyway...)


Best,
Laura







Re: [Pharo-users] Useful tools?

2015-01-13 Thread stepharo



Two questions here:

1. The Configuration Browser is nice, but it still doesn't provide any
kind of description for the packages. I mean, looking at the list of
packages, I can probably guess what "Dependency Analyser" does, but I
have exactly zero chance in guessing what Epicea, Ephestos, Illiad,
Kendrick, Mandrill, Marina, Pastell, Pillar or Ston are about. Even a
single line description, displayed in a tooltip, would be a huge
improvement. Can this be added?


Yes this is so true. You are 100% right
this is why I started to code a catalog extracted from configurationOf.
http://ci.inria.fr/





2. SmalltalkHub seems to have no way of browsing all available
packages. When I'm starting with Pharo and I don't know how some
library I need is called, I'm essentially out of luck: I need to do
much googling or ask on a mailing list, which both take more time than
it should. I see that " The following is a preview of the exploration
features of SmalltalkHub. More to come!" message is still there - I
remember it from a year or more back. Is this considered such a low
priority task, or is it just that nobody had enough time to work on
it?

By the way: there is no package description on many package pages.
Even squeaksource tended to have at least one sentence explaining the
purpose of a package (I think?).


There is a package named "Catalog", I don't know how many people is putting
effort on it right now. I think it needs some love.


Ok, that's very nice, although the number of "Please project owner add
catalog description" and mention of "MetaRepoForPharo20" is a little
discouraging.

One more question: besides asking on a mailing list, is there any
other way of learning about it? Is it linked from somewhere, or does
it need a lot of googling and luck (ie. googling for "pharo catalog
packages" doesn't return this link, at least on the first page of
results).

In general I have a feeling that discoverability of Pharo packages is
very bad right now. It's a serious problem for new users, and even to
a bit more advanced users who return to Pharo after some time of not
following announcements.


Now i feel like having a multiclipboard would be useful (i have one on my
OS but anyway...)


There seems to be a support for this in Pharo 3.0: under right click
in an editor you have Paste and Paste... menu items. The latter
displays a thing that I think is supposed to be a list of recently
copied things.

My problem, however, is that this doesn't work with OS clipboard (on
Linux). Ctrl+V and Right click->paste don't work at all with OS
clipboard (they do when copying things inside Pharo). X Window systems
have 2 clipboards: one normal and the other called "X selection" - it
seems that the latter is not checked at all, and normal clipboard is
being accessed by Clipboard>>clipboardText (when Alt+p on "Clipboard
default clipboardText"), but it still doesn't work with Ctrl+V.
Strange.

Anyway, I have a very specific (side-)project in mind and I'm going to
try using Pharo for it, so you can expect quite a bit more questions
from me :)

Best regards,
Piotr Klibert







Re: [Pharo-users] Capturing a stream

2015-01-13 Thread Ben Coman
So you mean 'rostopic echo' and 'rostopic pub' ?   So its a
publisher/subscriber model with 'echo' as the subscriber ?

(I'll needs others to confirm this is possible but...) the way to go may be
to fork 'rotopic echo' and leave it running, parsing its results into a
queue that some other part of your program consumes.

To simplify this to check feasibility, I'd start with a single shell script
outputting text at intervals like this...
"test.sh"
for VARIABLE in 1 2 3 4 5 .. N
do
echo $VARIABLE
sleep 2
done


and in Pharo, assuming you can process the output stream asynchronously,
every time you receive a newline, open an inspector showing the line just
received.  But sorry I don't know *PipeableOSProcess enough to know how.*

*cheers -ben*


On Tue, Jan 13, 2015 at 11:05 PM, Demian Schkolnik <
demianschkol...@gmail.com> wrote:

> It is actually not a native linux command, but rather something belonging
> to ROS (Robot Robot Operating System). I did not want to complicate the
> question further.. The behaviour is as I described it. This echo command
> sits still in the console where it was called, and waits. When some message
> is send, then it just prints the message on screen and waits. The pub
> method (also belonging to ROS) publishes a message and exits.
> I tried Ben's solution (thanks!), but unfortunately stringVar remains nil.
> I think the problem is we are assigning the output of the command to
> stringVar, which is nothing, at the moment.
> Any ideas?
> Thank you all.
>
> El Tue Jan 13 2015 at 6:15:01, Ben Coman  escribió:
>
> I've never known 'echo' to wait for input, and haven't heard of this echo
>> & pub combination.  Do you have some link to a tutorial showing how they
>> are used?
>>
>> However just wildly guessing, are you wanting to get output from a long
>> running command without blocking the Pharo UI?
>> In that case, what about...
>> [ *stringVar := (PipeableOSProcess  command: 'echo...') output ]
>> fork. *
>> *?*
>> *cheers -ben*
>>
>> On Tue, Jan 13, 2015 at 9:18 AM, Demian Schkolnik <
>> demianschkol...@gmail.com> wrote:
>>
>>> Hello everyone.
>>>
>>> I have the following question. I have a specific 'echo ...' command,
>>> which I send to the linux console via " OSProcess command:'echo ... ' ".
>>> This echo command, when executed on the native linux console, stands by
>>> until it receives some message.
>>> Following this, I have to execute a 'pub...' command, which gives some
>>> information that the echo command will print on screen. On linux, you run
>>> 'echo..' on a terminal and 'pub...' on another.
>>> My objective here is to capture the output of echo into a smalltalk
>>> variable for later use.
>>> Normally, if a console command prints something immediately to screen, I
>>> use
>>> *(PipeableOSProcess command:'some command') output.*
>>>
>>> It is here a little different though, since this command will not print
>>> something immediately to screen. I want to do something like this, where
>>> the final output of 'echo..' stays in stringVar.
>>>
>>> *stringVar := (PipeableOSProcess  command: 'echo...') output. *
>>> *(Delay forSeconds:3) wait.*
>>> *(OSProcess command: 'pub... ').*
>>> *(Delay forSeconds:3) wait.*
>>>
>>> Thank you all.
>>>
>>>
>>>
>>>
>>


Re: [Pharo-users] Notification on GC of an object?

2015-01-13 Thread Clément Bera
Yeah Object>>#finalize is supposed to do what you said but unfortunately it
does not work...

Maybe it's a VM bug or maybe it's not supported any more.

We'll see if Eliot answer the thread.

2015-01-13 15:55 GMT+01:00 Johan Fabry :

>
> No, just putting the cleanup code in a finalize method does not seem to be
> working, sadly.
>
> > On Jan 13, 2015, at 11:18, Sven Van Caekenberghe  wrote:
> >
> > Object>>#finalize ?
> >
> >> On 13 Jan 2015, at 15:13, Johan Fabry  wrote:
> >>
> >> Hi all,
> >>
> >> does anybody here have experience with hooking into the GC mechanism so
> that an object gets notified when it is collected? I have a setup here with
> auto generated classes that I would like to remove when their unique
> instance disappears. So I’d like to let the GC figure out all the
> complicated tracking and inform me whenever such an object is collected,
> then I’ll zap the class as well.
> >>
> >> Experience reports, hints and tips are most welcome!
> >>
> >> ---> Save our in-boxes! http://emailcharter.org <---
> >>
> >> Johan Fabry   -   http://pleiad.cl/~jfabry
> >> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
> >>
> >>
> >
> >
> >
>
>
>
> ---> Save our in-boxes! http://emailcharter.org <---
>
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>
>
>


Re: [Pharo-users] Becoming proficient in Pharo

2015-01-13 Thread Ben Coman
good idea.  Now something I recommend you become practiced at Pick some
system function, e.g.  in the System Browser, bring up the
halos on it and  from the debug halo icon.  Look for a
likely selector and put a HALT in that method.  Then invoke the menu item
and trace through the system with the debugger.   You can learn a lot of
magic from seeing how things work under the covers.

Also, try checking Fogbugz for cases marked "Resolved (Fix Review Needed)"
or "Resolved (Fix Reviewed by the Monkey)".  Someone already did the hard
work adding some feature or bug fix.  You can learn A LOT from seeing what
they've done.  Again, put HALTs in some of the changed methods and trace
through that code.

cheers -ben

On Tue, Jan 13, 2015 at 10:47 PM, sergio_101  wrote:

> i really like that idea, but it seems like with someone as huge as a
> programming language, it might be best to reign it in a little. when people
> come to me asking for advice on learning a new language/ecosystem, i always
> have them come up with a small (but non trivial) problem to solve using
> that language.
>
> the act of building something small and non trivial usually brings you
> head on with most of this concepts you are going to want to figure out
> pretty quickly..
>
> but i do think this is a good idea..
>
> On Tue Jan 13 2015 at 9:20:05 AM kilon alios 
> wrote:
>
>> very good idea indeed. I try to do something similar with my video
>> tutorial, my aim is to help beginners go beyond the basic of pharo. I find
>> creating video tutorial much easier and more fun than writing stuff down.
>> But yes we can do so much more in the area as well.
>>
>> On Tue, Jan 13, 2015 at 4:13 PM, nacho <0800na...@gmail.com> wrote:
>>
>>> Hello,
>>> As I struggle, not without fun of course, to learn more about Pharo and
>>> its
>>> frameworks and idea came to my mind.
>>> We could put together some guidelines on how to become proficient in
>>> Pharo,
>>> and eventually come to be a power user and / or a developer.
>>> I read several of this recommendations on various list of other
>>> programming
>>> languages.
>>> Basically the idea is to have some sort of guide, with theoretical and
>>> practical stuff.
>>> For example:
>>> *Beginners.*
>>> Start by reading Pharo by Example for getting to know the system.
>>> On Agile development read  book or article.
>>> On Object Oriented design and programming read this or that.
>>> For practice do this exercises from this book or site.
>>> For a background on Smalltalk read here or there
>>> Some stuff on algorithms.
>>>
>>> *Intermediate*
>>> Object Serialization read from here.
>>> The VM from here..
>>> Building UIs
>>> Basic Frameworks
>>> Deep into Pharo
>>> Pharo for the Enterprise
>>> etc, etc, etc
>>>
>>> *Advanced*
>>> etc, etc, etc
>>>
>>> Like a road map to becoming a serious Pharo users and / or developer. I
>>> know
>>> this takes years but I think it would be very useful. Well at least for
>>> me.
>>> I sometimes get lost when I read things like serializing, marshalling,
>>> object memory, not to mention the internals of Pharo.
>>>
>>> Here is a link of something someone prepared for Haskell:
>>> http://stackoverflow.com/questions/1012573/getting-started-with-haskell
>>> >> >
>>>
>>> Just an idea, it will be collaborative. I volunteer to keep and maintain
>>> the
>>> list updated in a place where it will be available to anyone but of
>>> course
>>> can't contribute much besides doing that.
>>> Cheers
>>> Nacho
>>>
>>>
>>>
>>>
>>> -
>>> Nacho
>>> Smalltalker apprentice.
>>> Buenos Aires, Argentina.
>>> --
>>> View this message in context:
>>> http://forum.world.st/Becoming-proficient-in-Pharo-tp4799284.html
>>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>>
>>>
>>


Re: [Pharo-users] Capturing a stream

2015-01-13 Thread Demian Schkolnik
It is actually not a native linux command, but rather something belonging
to ROS (Robot Robot Operating System). I did not want to complicate the
question further.. The behaviour is as I described it. This echo command
sits still in the console where it was called, and waits. When some message
is send, then it just prints the message on screen and waits. The pub
method (also belonging to ROS) publishes a message and exits.
I tried Ben's solution (thanks!), but unfortunately stringVar remains nil.
I think the problem is we are assigning the output of the command to
stringVar, which is nothing, at the moment.
Any ideas?
Thank you all.

El Tue Jan 13 2015 at 6:15:01, Ben Coman  escribió:

> I've never known 'echo' to wait for input, and haven't heard of this echo
> & pub combination.  Do you have some link to a tutorial showing how they
> are used?
>
> However just wildly guessing, are you wanting to get output from a long
> running command without blocking the Pharo UI?
> In that case, what about...
> [ *stringVar := (PipeableOSProcess  command: 'echo...') output ]
> fork. *
> *?*
> *cheers -ben*
>
> On Tue, Jan 13, 2015 at 9:18 AM, Demian Schkolnik <
> demianschkol...@gmail.com> wrote:
>
>> Hello everyone.
>>
>> I have the following question. I have a specific 'echo ...' command,
>> which I send to the linux console via " OSProcess command:'echo ... ' ".
>> This echo command, when executed on the native linux console, stands by
>> until it receives some message.
>> Following this, I have to execute a 'pub...' command, which gives some
>> information that the echo command will print on screen. On linux, you run
>> 'echo..' on a terminal and 'pub...' on another.
>> My objective here is to capture the output of echo into a smalltalk
>> variable for later use.
>> Normally, if a console command prints something immediately to screen, I
>> use
>> *(PipeableOSProcess command:'some command') output.*
>>
>> It is here a little different though, since this command will not print
>> something immediately to screen. I want to do something like this, where
>> the final output of 'echo..' stays in stringVar.
>>
>> *stringVar := (PipeableOSProcess  command: 'echo...') output. *
>> *(Delay forSeconds:3) wait.*
>> *(OSProcess command: 'pub... ').*
>> *(Delay forSeconds:3) wait.*
>>
>> Thank you all.
>>
>>
>>
>>
>


Re: [Pharo-users] Notification on GC of an object?

2015-01-13 Thread Johan Fabry

No, just putting the cleanup code in a finalize method does not seem to be 
working, sadly.

> On Jan 13, 2015, at 11:18, Sven Van Caekenberghe  wrote:
> 
> Object>>#finalize ?
> 
>> On 13 Jan 2015, at 15:13, Johan Fabry  wrote:
>> 
>> Hi all,
>> 
>> does anybody here have experience with hooking into the GC mechanism so that 
>> an object gets notified when it is collected? I have a setup here with auto 
>> generated classes that I would like to remove when their unique instance 
>> disappears. So I’d like to let the GC figure out all the complicated 
>> tracking and inform me whenever such an object is collected, then I’ll zap 
>> the class as well.
>> 
>> Experience reports, hints and tips are most welcome!
>> 
>> ---> Save our in-boxes! http://emailcharter.org <---
>> 
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>> 
>> 
> 
> 
> 



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile




Re: [Pharo-users] Becoming proficient in Pharo

2015-01-13 Thread sergio_101
i really like that idea, but it seems like with someone as huge as a
programming language, it might be best to reign it in a little. when people
come to me asking for advice on learning a new language/ecosystem, i always
have them come up with a small (but non trivial) problem to solve using
that language.

the act of building something small and non trivial usually brings you head
on with most of this concepts you are going to want to figure out pretty
quickly..

but i do think this is a good idea..

On Tue Jan 13 2015 at 9:20:05 AM kilon alios  wrote:

> very good idea indeed. I try to do something similar with my video
> tutorial, my aim is to help beginners go beyond the basic of pharo. I find
> creating video tutorial much easier and more fun than writing stuff down.
> But yes we can do so much more in the area as well.
>
> On Tue, Jan 13, 2015 at 4:13 PM, nacho <0800na...@gmail.com> wrote:
>
>> Hello,
>> As I struggle, not without fun of course, to learn more about Pharo and
>> its
>> frameworks and idea came to my mind.
>> We could put together some guidelines on how to become proficient in
>> Pharo,
>> and eventually come to be a power user and / or a developer.
>> I read several of this recommendations on various list of other
>> programming
>> languages.
>> Basically the idea is to have some sort of guide, with theoretical and
>> practical stuff.
>> For example:
>> *Beginners.*
>> Start by reading Pharo by Example for getting to know the system.
>> On Agile development read  book or article.
>> On Object Oriented design and programming read this or that.
>> For practice do this exercises from this book or site.
>> For a background on Smalltalk read here or there
>> Some stuff on algorithms.
>>
>> *Intermediate*
>> Object Serialization read from here.
>> The VM from here..
>> Building UIs
>> Basic Frameworks
>> Deep into Pharo
>> Pharo for the Enterprise
>> etc, etc, etc
>>
>> *Advanced*
>> etc, etc, etc
>>
>> Like a road map to becoming a serious Pharo users and / or developer. I
>> know
>> this takes years but I think it would be very useful. Well at least for
>> me.
>> I sometimes get lost when I read things like serializing, marshalling,
>> object memory, not to mention the internals of Pharo.
>>
>> Here is a link of something someone prepared for Haskell:
>> http://stackoverflow.com/questions/1012573/getting-started-with-haskell
>> 
>>
>> Just an idea, it will be collaborative. I volunteer to keep and maintain
>> the
>> list updated in a place where it will be available to anyone but of course
>> can't contribute much besides doing that.
>> Cheers
>> Nacho
>>
>>
>>
>>
>> -
>> Nacho
>> Smalltalker apprentice.
>> Buenos Aires, Argentina.
>> --
>> View this message in context:
>> http://forum.world.st/Becoming-proficient-in-Pharo-tp4799284.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>>
>


Re: [Pharo-users] Becoming proficient in Pharo

2015-01-13 Thread kilon alios
very good idea indeed. I try to do something similar with my video
tutorial, my aim is to help beginners go beyond the basic of pharo. I find
creating video tutorial much easier and more fun than writing stuff down.
But yes we can do so much more in the area as well.

On Tue, Jan 13, 2015 at 4:13 PM, nacho <0800na...@gmail.com> wrote:

> Hello,
> As I struggle, not without fun of course, to learn more about Pharo and its
> frameworks and idea came to my mind.
> We could put together some guidelines on how to become proficient in Pharo,
> and eventually come to be a power user and / or a developer.
> I read several of this recommendations on various list of other programming
> languages.
> Basically the idea is to have some sort of guide, with theoretical and
> practical stuff.
> For example:
> *Beginners.*
> Start by reading Pharo by Example for getting to know the system.
> On Agile development read  book or article.
> On Object Oriented design and programming read this or that.
> For practice do this exercises from this book or site.
> For a background on Smalltalk read here or there
> Some stuff on algorithms.
>
> *Intermediate*
> Object Serialization read from here.
> The VM from here..
> Building UIs
> Basic Frameworks
> Deep into Pharo
> Pharo for the Enterprise
> etc, etc, etc
>
> *Advanced*
> etc, etc, etc
>
> Like a road map to becoming a serious Pharo users and / or developer. I
> know
> this takes years but I think it would be very useful. Well at least for me.
> I sometimes get lost when I read things like serializing, marshalling,
> object memory, not to mention the internals of Pharo.
>
> Here is a link of something someone prepared for Haskell:
> http://stackoverflow.com/questions/1012573/getting-started-with-haskell
> 
>
> Just an idea, it will be collaborative. I volunteer to keep and maintain
> the
> list updated in a place where it will be available to anyone but of course
> can't contribute much besides doing that.
> Cheers
> Nacho
>
>
>
>
> -
> Nacho
> Smalltalker apprentice.
> Buenos Aires, Argentina.
> --
> View this message in context:
> http://forum.world.st/Becoming-proficient-in-Pharo-tp4799284.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Re: [Pharo-users] Notification on GC of an object?

2015-01-13 Thread Sven Van Caekenberghe
Object>>#finalize ?

> On 13 Jan 2015, at 15:13, Johan Fabry  wrote:
> 
> Hi all,
> 
> does anybody here have experience with hooking into the GC mechanism so that 
> an object gets notified when it is collected? I have a setup here with auto 
> generated classes that I would like to remove when their unique instance 
> disappears. So I’d like to let the GC figure out all the complicated tracking 
> and inform me whenever such an object is collected, then I’ll zap the class 
> as well.
> 
> Experience reports, hints and tips are most welcome!
> 
> ---> Save our in-boxes! http://emailcharter.org <---
> 
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
> 
> 




[Pharo-users] Becoming proficient in Pharo

2015-01-13 Thread nacho
Hello,
As I struggle, not without fun of course, to learn more about Pharo and its
frameworks and idea came to my mind.
We could put together some guidelines on how to become proficient in Pharo,
and eventually come to be a power user and / or a developer.
I read several of this recommendations on various list of other programming
languages.
Basically the idea is to have some sort of guide, with theoretical and
practical stuff. 
For example:
*Beginners.*
Start by reading Pharo by Example for getting to know the system.
On Agile development read  book or article.
On Object Oriented design and programming read this or that.
For practice do this exercises from this book or site.
For a background on Smalltalk read here or there
Some stuff on algorithms.

*Intermediate*
Object Serialization read from here.
The VM from here..
Building UIs
Basic Frameworks
Deep into Pharo
Pharo for the Enterprise
etc, etc, etc

*Advanced*
etc, etc, etc

Like a road map to becoming a serious Pharo users and / or developer. I know
this takes years but I think it would be very useful. Well at least for me.
I sometimes get lost when I read things like serializing, marshalling,
object memory, not to mention the internals of Pharo.

Here is a link of something someone prepared for Haskell:
http://stackoverflow.com/questions/1012573/getting-started-with-haskell
  

Just an idea, it will be collaborative. I volunteer to keep and maintain the
list updated in a place where it will be available to anyone but of course
can't contribute much besides doing that.
Cheers
Nacho




-
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
--
View this message in context: 
http://forum.world.st/Becoming-proficient-in-Pharo-tp4799284.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Notification on GC of an object?

2015-01-13 Thread Johan Fabry
Hi all,

does anybody here have experience with hooking into the GC mechanism so that an 
object gets notified when it is collected? I have a setup here with auto 
generated classes that I would like to remove when their unique instance 
disappears. So I’d like to let the GC figure out all the complicated tracking 
and inform me whenever such an object is collected, then I’ll zap the class as 
well.

Experience reports, hints and tips are most welcome!

---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile




[Pharo-users] Object select or create methods

2015-01-13 Thread sergio_101
During my daily work in another framework, we are able to do something very
handy like so:

myThing := Thing findOrCreateByKey: 'red_thing'.

where the key is some underscored all lower case unique name for an object
we will be calling all the time.

this will return either a new thing with a key of 'red_thing' or the
current one that already exists.

We can also do something like:

myThing updateWithDictionary: aDictionary.

and it will flip through the dictionary and assign values to the instance
variables.

The above is very handy.

I am currently creating a bunch of methods that populate my image with real
objects, and could use these methods.

My question is. Does a behavior like this already exist? If not, I'd like
to add these methods to my project (in monticello). They will be used with
several different objects, so should I add the methods to Object?

I would imagine this is something I would want to use a great deal. How
would I go aobut making this something I could include easily in further
projects?

I realize that the 'updateWithDictionary' is very inefficient, but this
will just be somethign that runs once, during data import, and never again.

I just want to make sure I am not doing anything whacky.

Thanks!


Re: [Pharo-users] Useful tools?

2015-01-13 Thread kilon alios
"The Configuration Browser is nice, but it still doesn't provide any
kind of description for the packages. I mean, looking at the list of
packages, I can probably guess what "Dependency Analyser" does, but I
have exactly zero chance in guessing what Epicea, Ephestos, Illiad,
Kendrick, Mandrill, Marina, Pastell, Pillar or Ston are about. Even a
single line description, displayed in a tooltip, would be a huge
improvement. Can this be added?"

I am the creator of Ephestos , its a library that allow Pharo to be used
for scripting Blender (free 3d graphics application). Epicea is for
managing changes if I remember correctly, Ston is an implementation of JSON
in smalltalk , Pillar is a way to create latex files using Pharo its used
by most recent pharo documentation like the Updated Pharo By Example. I
think adding a tooltip is not enough a better option would have been a
panel that offers a detailed description (a paragraph or two of text)
together with other technical info .

"2. SmalltalkHub seems to have no way of browsing all available
packages. When I'm starting with Pharo and I don't know how some
library I need is called, I'm essentially out of luck: I need to do
much googling or ask on a mailing list, which both take more time than
it should. I see that " The following is a preview of the exploration
features of SmalltalkHub. More to come!" message is still there - I
remember it from a year or more back. Is this considered such a low
priority task, or is it just that nobody had enough time to work on
it?"

Right now Smalltalkhub is pretty much abandonware , this is why I have been
recommending to people to move to github . I have been using github for
more than 6 month now with pharo and works like a charm and there are other
pharo developers that do too. Pharo community just does not have the
resources and the man power to solve all these problems with pharo
implementations.

"One more question: besides asking on a mailing list, is there any
other way of learning about it? Is it linked from somewhere, or does
it need a lot of googling and luck (ie. googling for "pharo catalog
packages" doesn't return this link, at least on the first page of
results)."

I think that can be solved by moving projects to github, there its easier
to find news about project you care and new projects. Several blogs also
exist that mention new projects etc. Another great source is youtube and
vimeo where pharoers including myself have been uploading demos of our
projects for years now. Following the mailing lists is a very good idea
too.


"In general I have a feeling that discoverability of Pharo packages is
very bad right now. It's a serious problem for new users, and even to
a bit more advanced users who return to Pharo after some time of not
following announcements."

Pharo is not a good choice for begineers , noob friendly solutions requires
a lot more work than what you would expect, documentation, blogs, websites,
video tutorials. Pharo does not have the size of community to provide that
but is in a very good road towards that direction. So I am afraid that this
wont change any time soon. I tried to make my own contibution into
improving the situation other like Stef and Damien and others have done
much more and they definitely care but is just too much work for just a few
people.

On Tue, Jan 13, 2015 at 12:19 PM, Piotr Klibert 
wrote:

> Hi,
>
> nice timing - I returned to Pharo after a couple of months spent
> elsewhere and I'm facing the same challenges as Laura. So, a couple of
> additional comments and questions from me:
>
>
> >
> > Have you tried to use System -> Settings browser -> Formatter?
> >
>
> This setting seems to live under "Refactoring engine" category in the
> settings, it is there in vanilla Pharo 3.0 image, but not in the image
> downloaded from here:
> http://www.humane-assessment.com/blog/installing-gtoolkit
>
> Which package is responsible for adding this setting and in which version?
>
> BTW: it seems that Roassal and at least parts of Glamour don't want to
> work with bitmap fonts (StrikeFont does not understand
> #glyphRendererOn: IIRC) at all, despite bitmap font being the default
> (at least on Linux).
>
> >
> > Most of them are accessible from the Configuration Browser in Pharo 3,
> or by
> > searching in http://www.smalltalkhub.com/
> >
>
> Two questions here:
>
> 1. The Configuration Browser is nice, but it still doesn't provide any
> kind of description for the packages. I mean, looking at the list of
> packages, I can probably guess what "Dependency Analyser" does, but I
> have exactly zero chance in guessing what Epicea, Ephestos, Illiad,
> Kendrick, Mandrill, Marina, Pastell, Pillar or Ston are about. Even a
> single line description, displayed in a tooltip, would be a huge
> improvement. Can this be added?
>
> 2. SmalltalkHub seems to have no way of browsing all available
> packages. When I'm starting with Pharo and I don't know how some
> library I need is called, I'm essentially ou

Re: [Pharo-users] Useful tools?

2015-01-13 Thread Piotr Klibert
Hi,

nice timing - I returned to Pharo after a couple of months spent
elsewhere and I'm facing the same challenges as Laura. So, a couple of
additional comments and questions from me:


>
> Have you tried to use System -> Settings browser -> Formatter?
>

This setting seems to live under "Refactoring engine" category in the
settings, it is there in vanilla Pharo 3.0 image, but not in the image
downloaded from here:
http://www.humane-assessment.com/blog/installing-gtoolkit

Which package is responsible for adding this setting and in which version?

BTW: it seems that Roassal and at least parts of Glamour don't want to
work with bitmap fonts (StrikeFont does not understand
#glyphRendererOn: IIRC) at all, despite bitmap font being the default
(at least on Linux).

>
> Most of them are accessible from the Configuration Browser in Pharo 3, or by
> searching in http://www.smalltalkhub.com/
>

Two questions here:

1. The Configuration Browser is nice, but it still doesn't provide any
kind of description for the packages. I mean, looking at the list of
packages, I can probably guess what "Dependency Analyser" does, but I
have exactly zero chance in guessing what Epicea, Ephestos, Illiad,
Kendrick, Mandrill, Marina, Pastell, Pillar or Ston are about. Even a
single line description, displayed in a tooltip, would be a huge
improvement. Can this be added?

2. SmalltalkHub seems to have no way of browsing all available
packages. When I'm starting with Pharo and I don't know how some
library I need is called, I'm essentially out of luck: I need to do
much googling or ask on a mailing list, which both take more time than
it should. I see that " The following is a preview of the exploration
features of SmalltalkHub. More to come!" message is still there - I
remember it from a year or more back. Is this considered such a low
priority task, or is it just that nobody had enough time to work on
it?

By the way: there is no package description on many package pages.
Even squeaksource tended to have at least one sentence explaining the
purpose of a package (I think?).

>
> There is a package named "Catalog", I don't know how many people is putting
> effort on it right now. I think it needs some love.
>

Ok, that's very nice, although the number of "Please project owner add
catalog description" and mention of "MetaRepoForPharo20" is a little
discouraging.

One more question: besides asking on a mailing list, is there any
other way of learning about it? Is it linked from somewhere, or does
it need a lot of googling and luck (ie. googling for "pharo catalog
packages" doesn't return this link, at least on the first page of
results).

In general I have a feeling that discoverability of Pharo packages is
very bad right now. It's a serious problem for new users, and even to
a bit more advanced users who return to Pharo after some time of not
following announcements.

>>
>> Now i feel like having a multiclipboard would be useful (i have one on my
>> OS but anyway...)
>>

There seems to be a support for this in Pharo 3.0: under right click
in an editor you have Paste and Paste... menu items. The latter
displays a thing that I think is supposed to be a list of recently
copied things.

My problem, however, is that this doesn't work with OS clipboard (on
Linux). Ctrl+V and Right click->paste don't work at all with OS
clipboard (they do when copying things inside Pharo). X Window systems
have 2 clipboards: one normal and the other called "X selection" - it
seems that the latter is not checked at all, and normal clipboard is
being accessed by Clipboard>>clipboardText (when Alt+p on "Clipboard
default clipboardText"), but it still doesn't work with Ctrl+V.
Strange.

Anyway, I have a very specific (side-)project in mind and I'm going to
try using Pharo for it, so you can expect quite a bit more questions
from me :)

Best regards,
Piotr Klibert



Re: [Pharo-users] Metacello does not load the expected version from ConfigOf

2015-01-13 Thread Usman Bhatti
On Mon, Jan 12, 2015 at 5:14 PM, Dale Henrichs <
dale.henri...@gemtalksystems.com> wrote:

>
> On 1/12/15 1:43 AM, Usman Bhatti wrote:
>
>
>
> On Sun, Jan 11, 2015 at 7:14 PM, Dale Henrichs <
> dale.henri...@gemtalksystems.com> wrote:
>
>>  Usman,
>>
>> Well I don't have an official bugfix yet, but if you filein the attached
>> method and run the following, PetitParser will downgrade and get loaded
>> correctly (at least it worked for me)...The fist two statements are
>> intended to replace GTMetacelloPlatform with MetacelloPharo30Platform and
>> initialize the registry correctly ... not sure what impact on Moose these
>> changes will have) :
>>
>
>> MetacelloPharo30Platform initialize.
>>   [
>>   MetacelloProjectRegistration
>> resetRegistry;
>> primeRegistryFromImage ]
>> on: Warning
>> do: [ :ex |
>>   Transcript
>> cr;
>> show: 'Warning resumed: ' , ex description.
>>   ex resume ].
>> Metacello new
>> configuration: 'DummyParser';
>> version: '1.0';
>> repository: '???';
>>  onDowngrade: [:ex :existing :new |
>> existing projectName = 'PetitParser'
>> ifTrue: [
>> new projectSpec operator: #=.
>> ex allow ]
>> ifFalse: [ ex disallow ] ]  ;
>> load.
>>
>
>  I tried this script as you told but it didn't load the specific version
> I was expecting. I had this message printed on Transcript:
>
>  Warning resumed: Warning: Error finding current version of
> ConfigurationOfMoose. Probably an invalid specification.
> Warning resumed: Warning: Error finding current version of
> ConfigurationOfSmallDude. Probably an invalid specification.
> Loading 1.0 of ConfigurationOfDummyParser...
> Project: PetitParser 1.51
> ...finished 1.0
>
>  I can wait until you do an official release for this bug fix. In the
> meantime, I've created a configOf my own which means I can find alternate
> solutions to replace downgrade. I felt that downgrade is yet a must because
> one would not like to upgrade all the time. And one would not like to load
> packages by hand when configOf is complex. My configOf works currently but
> with downgrade available it'll be much more cleaner.
>
>   Ah ... sorry ... I had made one other change and forgot to mention
> that:( I did rename the version to 1.5.1 both in petitparser and dummy ...
>

> Ah well, you are functional and you have certainly helped me, so I
> appreciate your help ... My first cut at a fix solves the downgrade but
> introduces other issues, so I still working things out:)
>
> Thanks again!
>

I can only help with testing because I do not quite understand the
internals of Metacello yet to contribute something significant.
Please keep us updated about your progress, I am still interested in using
downgrade feature.


>
>
> Dale
>


Re: [Pharo-users] Capturing a stream

2015-01-13 Thread Ben Coman
I've never known 'echo' to wait for input, and haven't heard of this echo &
pub combination.  Do you have some link to a tutorial showing how they are
used?

However just wildly guessing, are you wanting to get output from a long
running command without blocking the Pharo UI?
In that case, what about...
[ *stringVar := (PipeableOSProcess  command: 'echo...') output ] fork. *
*?*
*cheers -ben*

On Tue, Jan 13, 2015 at 9:18 AM, Demian Schkolnik  wrote:

> Hello everyone.
>
> I have the following question. I have a specific 'echo ...' command, which
> I send to the linux console via " OSProcess command:'echo ... ' ".
> This echo command, when executed on the native linux console, stands by
> until it receives some message.
> Following this, I have to execute a 'pub...' command, which gives some
> information that the echo command will print on screen. On linux, you run
> 'echo..' on a terminal and 'pub...' on another.
> My objective here is to capture the output of echo into a smalltalk
> variable for later use.
> Normally, if a console command prints something immediately to screen, I
> use
> *(PipeableOSProcess command:'some command') output.*
>
> It is here a little different though, since this command will not print
> something immediately to screen. I want to do something like this, where
> the final output of 'echo..' stays in stringVar.
>
> *stringVar := (PipeableOSProcess  command: 'echo...') output. *
> *(Delay forSeconds:3) wait.*
> *(OSProcess command: 'pub... ').*
> *(Delay forSeconds:3) wait.*
>
> Thank you all.
>
>
>
>