Re: [Pharo-users] compiling Pillar files locally (for LaserGame book)

2014-05-09 Thread pharo4s...@free.fr



Is TEXLive required for the PDF compilation?
Maybe the setup I reported [1] for PBE1 on Windows would be similar?
However I now have access to a Mavericks machine.  Would that be a 
better option?  What tools would you use to edit with ? (this is my 
first Mac - something to google for would be useful)


I used either texmate or emacs (damien did a mode for pillar).
But do not bother too much if you edit and break ping me and I will fix 
problems.


Stef


I see that [2] runs  ./download.sh
so perhaps that is all that is required in this case for the LaserGame 
book?


[1] http://blog.openinworld.com/2012/05/contributing-to-pbe/ regarding
[2] 
https://ci.inria.fr/pharo-contribution/job/PharoLaserGame/lastSuccessfulBuild/console


cheers -ben








Re: [Pharo-users] We need *you* for the upcoming Pharo's website

2014-04-17 Thread pharo4s...@free.fr

please use nice looking font and large ones and go ahead :)

On 16/4/14 18:44, kilon alios wrote:
I was thinking of creating a screencast to explain in a few minutes 
why I like Pharo, emphasizing on live coding , the image and the 
development environment. By coincidence I recorded a test tutorial 
yesterday (before noticing this announcement) for the very basics of 
pharo, just 15 minutes. So its definitely  something I am willing to 
do. Its just that will like to do several tries and possible edit it 
to make it as efficient and as simple as possible.


So If you are not in a hurry I can offer something.


On Wed, Apr 16, 2014 at 12:16 PM, Esteban Lorenzano 
esteba...@gmail.com mailto:esteba...@gmail.com wrote:


please do not answer all at once! (subtle irony)
anyway, I have to add that screencast has to be Pharo3 based.

cheers,
Esteban

On 15 Apr 2014, at 13:03, Damien Cassou damien.cas...@gmail.com
mailto:damien.cas...@gmail.com wrote:

 Hi everyone,

 we are working on a new website for Pharo! We need your help. If you
 have some time, please create and send us one of the following
items:

 - An up-to-date screenshot of Pharo 3.0 that shows some cool
features.
 It should be 800px wide ;
 - A screencast ;
 - A paragraph (around 40 words) that presents a nice topic about
Pharo
 and a corresponding screenshot.

 We will select 1 large screenshot, 3 screencasts and 4 topic
paragraphs.

 This could be a very nice way for you to contribute to Pharo!

 Best,

 --
 Damien Cassou
 http://damiencassou.seasidehosting.st

 Success is the ability to go from one failure to another without
 losing enthusiasm.
 Winston Churchill








Re: [Pharo-users] how to duplicate document with Voyage

2014-04-17 Thread pharo4s...@free.fr

Hi norbert

Olivier was doing a copy but it did not work and we thought that
Voyage should offer a clone or something like that that does not mess up 
with the id.

Because we already corrupted nicely a mongoDB.

Stef

On 17/4/14 10:17, Norbert Hartl wrote:

Am 17.04.2014 um 10:08 schrieb Olivier Auverlot olivier.auver...@gmail.com:


Hi,

I'm using Voyage and I need to duplicate an existing document in a Mongo 
database. I suppose that the id must be changed before saving.

What is the best way to do that ?


If you need a shallow copy then you better just copy the object and store it. 
Changing the id is asking for trouble I guess. That would probably work if you 
implement #= on those objects but I think it is a hack.

anObject copy save

should do.

Norbert








Re: [Pharo-users] how to duplicate document with Voyage

2014-04-17 Thread pharo4s...@free.fr

Ok so what I said was wrong :)

On 17/4/14 10:48, olivier auverlot wrote:

simply ? Thanks ;-)


2014-04-17 10:42 GMT+02:00 Esteban Lorenzano esteba...@gmail.com 
mailto:esteba...@gmail.com:



On 17 Apr 2014, at 10:17, Norbert Hartl norb...@hartl.name
mailto:norb...@hartl.name wrote:


 Am 17.04.2014 um 10:08 schrieb Olivier Auverlot
olivier.auver...@gmail.com mailto:olivier.auver...@gmail.com:

 Hi,

 I'm using Voyage and I need to duplicate an existing document
in a Mongo database. I suppose that the id must be changed before
saving.

 What is the best way to do that ?

 If you need a shallow copy then you better just copy the object
and store it. Changing the id is asking for trouble I guess. That
would probably work if you implement #= on those objects but I
think it is a hack.

 anObject copy save

+1


 should do.

 Norbert









Re: [Pharo-users] Voyage: how to delete references to objects.

2014-04-17 Thread pharo4s...@free.fr

esteban

you should do a pass on the voyage documentation chapter and add this 
kind of infomration.

We can pair write if you want.

stef

On 17/4/14 17:56, Esteban Lorenzano wrote:


On 17 Apr 2014, at 15:18, Norbert Hartl norb...@hartl.name 
mailto:norb...@hartl.name wrote:




Am 17.04.2014 um 15:05 schrieb olivier auverlot 
olivier.auver...@gmail.com mailto:olivier.auver...@gmail.com:



thanks Robert for the explications.


It’s Norbert btw. :)

I agree with you that's the best way to remove a book is to delete 
the reference in  ComicsCollection.


But how to do that ? Must I simply remove the reference in the 
ordered collection ? Voyage will syncronize automatically the data 
in memory with the content of the database ? Must I force the save 
of the data after removing the reference ?


You need to explicitly save it as we don’t have something like write 
barriers in the image. So


aComicCollection
removeBook: aBook;
save

is needed.


yes, and also (if you want to be clean):

aBook remove.

(assuming aBook is also persistent).

But as Sabina points: #enableMissingContent in CommicCollection will 
help you to simplify things, then you just need: aBook remove, and 
next time you read aComicCollection it will “clean” the invalid 
reference.

I call that “eventual integrity” :P
but beware of it… is considered “power voyage programming” :)

Esteban



Norbert


Olivier ;-)


2014-04-17 14:10 GMT+02:00 Norbert Hartl norb...@hartl.name 
mailto:norb...@hartl.name:



Am 17.04.2014 um 13:53 schrieb olivier
olivier.auver...@gmail.com mailto:olivier.auver...@gmail.com:

 Hi,

 I'm using Voyage in a Pharo application.

 I have two MongoDB collections which are ComicsCollection and
ComicsBook. Each book is attached to a instance of
ComicsCollection. The reference of each book is stored in an
ordered collection (in the instance of ComicsCollection). The
problem is that if I remove a book, the reference to the book is
not deleted from ComicsCollection.

 How can I remove properly a book and the reference to the book ?

From the smalltalk image view the problem is usually exactly the
opposite: You don’t delete objects but you remove references to
them. As voyage maps objects it is a good idea to stay in the
object realm. So you should rather remove the book from the
collection. This way you won’t get errors just garbage. The
„real“ problem that arises then is that the book would still be
in the database. Just like it is in the image but there is no
garbage collector for mongo. To decide that from the image is
not possible. You load only a sub graph from the database into
image memory. So you don’t know if there are other objects
referencing the book.

If your records fit all in memory you could load all collections
and books and build the difference between all referenced books
in the collections and the total amount of books. The difference
will be the set of objects not being referenced by a collection
and those can be deleted.

If the records do not fit in memory an alternative strategy
would be needed. I started to research if it is possible to
build a map/reduce based garbage collector for common cases but
got distracted. But I have the same problem so I will need to
pick it up some time.

hope that helps,

Norbert











Re: [Pharo-users] how to duplicate document with Voyage

2014-04-17 Thread pharo4s...@free.fr


On 17/4/14 21:45, Esteban Lorenzano wrote:

Hi,

copy should not mess with the id (unless your objects redefines = and hash).
I can take a look if Olivier is around tomorrow.


Thanks. I told him to talk to you but this is a really shy guy :)
He is pushing Pharo to build other application in the lab :)


Esteban

On 17 Apr 2014, at 21:41, pharo4s...@free.fr wrote:


Hi norbert

Olivier was doing a copy but it did not work and we thought that
Voyage should offer a clone or something like that that does not mess up with 
the id.
Because we already corrupted nicely a mongoDB.

Stef

On 17/4/14 10:17, Norbert Hartl wrote:

Am 17.04.2014 um 10:08 schrieb Olivier Auverlot olivier.auver...@gmail.com:


Hi,

I'm using Voyage and I need to duplicate an existing document in a Mongo 
database. I suppose that the id must be changed before saving.

What is the best way to do that ?


If you need a shallow copy then you better just copy the object and store it. 
Changing the id is asking for trouble I guess. That would probably work if you 
implement #= on those objects but I think it is a hack.

anObject copy save

should do.

Norbert