Re: [Pharo-users] voyage/mongo randomly wrong OIDs
file not found :) On Aug 29, 2013, at 2:44 PM, jan.struz public+ph...@struz.cz wrote: Hi, feel free to use integrate the following fix: Fix-Mongo-OID.cs http://forum.world.st/file/n4705616/Fix-Mongo-OID.cs Jan Sabine Knöfel wrote Hi Esteban, All, I was proceeding to seach for the reason of the problem I described yesterday. I added some debugging code into VOMongoSerializerensurePersisted: and the problem I described, did NOT occur. That made the whole process slower...and I had an idea I was looking into UUIDGenerator default makeSeed. Then I tried the following code: |theOld theNew| 1 timesRepeat: [ theNew := UUIDGenerator default makeSeed. theNew = theOld ifTrue: [self halt]. theOld := theNew] The debugger came up! Doesn't that mean that, if the code is run very fast, there are double OIDs generated?! In my case, the objects for country and currency are very lightweight and so, they are created very fast. Also, the error occured much more often within my fast production EC2 instance as at my (old and slow) development pc. Important: I work with windows and so makeUnixSeed returns nil... :-) What is your opinion about that? Sabine - Save The World! -- View this message in context: http://forum.world.st/voyage-mongo-randomly-wrong-OIDs-tp4705396p4705619.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] voyage/mongo randomly wrong OIDs
hi well... I've never been happy on using the UUID generator for my keys, but is the fastest option I found. There are, of course, alternatives: 1) Using your own number generator (sequential, or whatever). Problem with that is that is image based, then you need a persistence strategy... then you are slow. 2) then you can use your own procedure in mongo... with same problem than (1) 3) you could use timestamp. but TimeStamps are slow :( anyway... I open to ideas :) in the mean time, you can check if your UUID generator is using the primitive or not. In you are not, you have more possibilities of having a collision. Esteban On Aug 29, 2013, at 11:27 AM, Sabine Knöfel sabine.knoe...@gmail.com wrote: Hi Esteban, All, I was proceeding to seach for the reason of the problem I described yesterday. I added some debugging code into VOMongoSerializerensurePersisted: and the problem I described, did NOT occur. That made the whole process slower...and I had an idea I was looking into UUIDGenerator default makeSeed. Then I tried the following code: |theOld theNew| 1 timesRepeat: [ theNew := UUIDGenerator default makeSeed. theNew = theOld ifTrue: [self halt]. theOld := theNew] The debugger came up! Doesn't that mean that, if the code is run very fast, there are double OIDs generated?! In my case, the objects for country and currency are very lightweight and so, they are created very fast. Also, the error occured much more often within my fast production EC2 instance as at my (old and slow) development pc. Important: I work with windows and so makeUnixSeed returns nil... :-) What is your opinion about that? Sabine -- View this message in context: http://forum.world.st/voyage-mongo-randomly-wrong-OIDs-tp4705396p4705603.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] voyage/mongo randomly wrong OIDs
ok, here again: Fix-Mongo-OID.cs http://forum.world.st/file/n4705649/Fix-Mongo-OID.cs :) EstebanLM wrote file not found :)On Aug 29, 2013, at 2:44 PM, jan.struz lt; public+pharo@ gt; wrote: Hi, feel free to use integrate the following fix: Fix-Mongo-OID.cs lt;http://forum.world.st/file/n4705616/Fix-Mongo-OID.csgt;Jan Sabine Knöfel wrote Hi Esteban, All, I was proceeding to seach for the reason of the problem I described yesterday. I added some debugging code into VOMongoSerializerensurePersisted: and the problem I described, did NOT occur. That made the whole process slower...and I had an idea I was looking into UUIDGenerator default makeSeed. Then I tried the following code: |theOld theNew| 1 timesRepeat: [theNew := UUIDGenerator default makeSeed. theNew = theOld ifTrue: [self halt].theOld := theNew] The debugger came up! Doesn't that mean that, if the code is run very fast, there are double OIDs generated?! In my case, the objects for country and currency are very lightweight and so, they are created very fast. Also, the error occured much more often within my fast production EC2 instance as at my (old and slow) development pc. Important: I work with windows and so makeUnixSeed returns nil... :-) What is your opinion about that? Sabine - Save The World! -- View this message in context: http://forum.world.st/voyage-mongo-randomly-wrong-OIDs-tp4705396p4705619.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. - Save The World! -- View this message in context: http://forum.world.st/voyage-mongo-randomly-wrong-OIDs-tp4705396p4705649.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] MSI packaging for Pharo
happy to have been of help. phil On Thursday, August 29, 2013, Usman Bhatti usman.bha...@gmail.com wrote: After all, I achieved the creation of MSI with the combination of Inno setup and MSI wrapper. Inno setup allows creating a setup.exe from a build script and do several types of tasks at the time of installation. A mere skeleton can be created with the wizard and then changing it isn't so difficult. Moreover, there are many pointers on the web. Creating an MSI wrapper (http://www.exemsi.com/inno-setup-and-msi) for the setup file created with Inno is just a matter of a few clicks. Tx for very helpful pointers. Usman On Tue, Aug 27, 2013 at 10:34 AM, p...@highoctane.be p...@highoctane.be wrote: You can also use Inno Setup which is nice, easy, and free. http://www.jrsoftware.org/isinfo.php#features But ok, it doesn't do MSI. http://stackoverflow.com/questions/6245260/installers-wix-or-inno-setup But you can get around that with http://www.exemsi.com/inno-setup-and-msi Good luck. Phil On Tue, Aug 27, 2013 at 7:27 AM, Hernán Morales Durand hernan.mora...@gmail.com wrote: I have never tried but it seems you can wrap installer in MSI files using WiX http://wixtoolset.org/ and this package http://www.exemsi.com/ To write the installer check this out: http://code.google.com/p/biosmalltalk/wiki/NSISInstallerScript Hernán El 26/08/2013 17:29, Usman Bhatti escribió: On Mon, Aug 26, 2013 at 7:10 PM, Stéphane Ducasse stephane.duca...@inria.fr mailto:stephane.duca...@inria.fr wrote: Hello, Does anyone have experience of distributing Pharo-based software as an MSI installer package to be installed by clients? what is an MSI? Microsoft installer, a packaging for windows-based software that allows installation of the software on a windows machine: creation of registry keys, Start menu items, looking for previous installations of the software and upgrading it, etc. I would particularly like to know the tool that was used to create the MSI. Do you mean installing a Pharo App? What means installing? So, it would mean that Pharo app is installed on a client machine: creating directory hierarchy, placing image and vm files and any scripts that come with the image, and creating windows shortcuts. For the time, its a question from a client so I thought someone might have some relevant exp. Because if you ship an image in essence: you ship one image with an opening image saying installing…. then you save regards, Usman Bhatti -- --- Philippe Back Dramatic Performance Improvements Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027 Mail:p...@highoctane.be | Web: http://philippeback.eu Blog: http://philippeback.be | Twitter: @philippeback Youtube: http://www.youtube.com/user/philippeback/videos High Octane SPRL rue cour Boisacq 101 | 1301 Bierges | Belgium Pharo Consortium Member - http://consortium.pharo.org/ Featured on the Software Process and Measurement Cast - http://spamcast.libsyn.com Sparx Systems Enterprise Architect and Ability Engineering EADocX Value Added Reseller
Re: [Pharo-users] voyage/mongo randomly wrong OIDs
On 29 Aug 2013, at 16:51, Esteban Lorenzano esteba...@gmail.com wrote: hi well... I've never been happy on using the UUID generator for my keys, but is the fastest option I found. There are, of course, alternatives: 1) Using your own number generator (sequential, or whatever). Problem with that is that is image based, then you need a persistence strategy... then you are slow. 2) then you can use your own procedure in mongo... with same problem than (1) 3) you could use timestamp. but TimeStamps are slow :( anyway... I open to ideas :) in the mean time, you can check if your UUID generator is using the primitive or not. In you are not, you have more possibilities of having a collision. Yes, the Smalltalk code (type 4 UUID) is just a random number that is computed in a complex way. What does the primitive actually do ? Is it different ? Esteban On Aug 29, 2013, at 11:27 AM, Sabine Knöfel sabine.knoe...@gmail.com wrote: Hi Esteban, All, I was proceeding to seach for the reason of the problem I described yesterday. I added some debugging code into VOMongoSerializerensurePersisted: and the problem I described, did NOT occur. That made the whole process slower...and I had an idea I was looking into UUIDGenerator default makeSeed. Then I tried the following code: |theOld theNew| 1 timesRepeat: [ theNew := UUIDGenerator default makeSeed. theNew = theOld ifTrue: [self halt]. theOld := theNew] The debugger came up! Doesn't that mean that, if the code is run very fast, there are double OIDs generated?! In my case, the objects for country and currency are very lightweight and so, they are created very fast. Also, the error occured much more often within my fast production EC2 instance as at my (old and slow) development pc. Important: I work with windows and so makeUnixSeed returns nil... :-) What is your opinion about that? Sabine -- View this message in context: http://forum.world.st/voyage-mongo-randomly-wrong-OIDs-tp4705396p4705603.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
[Pharo-users] How send message with non-ascii characters via SMTP
Hi! I try use SMTPClient from Network-Protocols. It fine work for message with only english characters at body or subject. But if add non-english (non ascii) characters and encoding it, that mail client (web interface gmail) don't encode message My code (It's code from another post in this forum): message := MailMessage empty. message setField: 'from' toString: '[my mail]'. message setField: 'to' toString: '[you mail]'. message setField: 'content-type' toString: 'text/plain;charset=utf-8'. message setField: 'subject' toString: (((GRCodec forEncoding: 'utf-8') encode: 'Encoding test €€€')) . message body: (MIMEDocument content: 'test') ((GRCodec forEncoding: 'utf-8') encode: 'Motörhead €' )). client := SMTPClient openOnHostNamed: '[mail server]' port: 25. client user: '[user]'; password: '[password]'. client login. client mailFrom: message from to: (Array with: message to) text: message asSendableText. client quit. client close. What I do wrong? -- View this message in context: http://forum.world.st/How-send-message-with-non-ascii-characters-via-SMTP-tp4705707.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] voyage/mongo randomly wrong OIDs
They're certainly more unique than before :) Thanks!
[Pharo-users] Group and member with Voyage
Hi all, Let's say I have a class Group and a class Member. aGroup has many members. and aMember can belong to many groups. What is the proper voyageDescription for those one to many relations? Should I do something extra? Everytime I add a member to the group, both the member and the group get their references updated. Now when I add a member to a group and save it, I also save the member. Is there another way to avoid this? Any recommended practice for this? Next level question: What if it gets composite? it is... a Group has other Groups as members :) Regards! Esteban A. Maringolo