Re: [Pharo-users] Custom Glamour browser for Dr. Geo scripting

2017-06-30 Thread Hilaire
I extended the browser definition with:

browser transmit 
from: #scripts; 
from: #categories; 
to: #methods;
when: [ :a :b |  a isMeta not ];
andShow: [:a | self methodsIn: a  ].
browser transmit 
from: #scripts; 
from: #categories; 
to: #methods;
when: [ :a | a isMeta ];
andShow: [:a | self classMethodsIn: a  ].


However it does not work as #when: message always receive a class, so
the wrong methods a re list in the method pane.

I enclosed a Fileout of the browser. It works independently of DrGeo.
When one select class methods, still the instance methods are displayed
in right most pane.

Any tips?

Thanks

Hilaire


Le 29/06/2017 à 14:59, Hilaire a écrit :
> but something is missing to get the listed method right depending on the
> category is instance or class side. I don't how to do it.

-- 
Dr. Geo
http://drgeo.eu



DrGScriptBrowser.st
Description: application/squeak-changeset


Re: [Pharo-users] Validate password with PBKDF2

2017-06-30 Thread Francis via Pharo-users
--- Begin Message ---
Thank you Paul,
Saving the salt is not a big issue but I'd like something more simple. 
In python I can store the salt with the password
see:https://pypi.python.org/pypi/bcrypt/3.1.0

# Hash a password for the first time, with a randomly-generated salt
hashed = bcrypt.hashpw(password, bcrypt.gensalt())

and retrieve it subsequently
if bcrypt.checkpw(password, hashed):
... print("It Matches!")

Are you (smalltalkers) aware of something similar?

Thanks again
Francis



Paul DeBruicker wrote
> Looks like you'll have to store the salt when making the original hash of
> the password.  
> 
> With that you can do
> 
> 
> | salt originalPassword userInputPassword originalHash  newHash secretKey
> |
> salt:='salt'.
> originalPassword:='password'.
> userInputPassword:='12345678'.
> originalHash:=PBKDF2 derivedKeySHA1Password: originalPassword salt: salt. 
> newHash:=PBKDF2 derivedKeySHA1Password: userInputPassword salt: salt.
> 
> secretKey:= SecureRandom new nextBytes: 16.
> 
> ((SHA256 new hmac key: secretKey) digestMessage: originalHash) = ((SHA256
> new hmac key: secretKey) digestMessage: newHash).
> 
> 
> 
> We do the double SHA256 HMAC signing of the hashes because of
> https://www.nccgroup.trust/us/about-us/newsroom-and-events/blog/2011/february/double-hmac-verification/
> 
> You can store the #secretKey and each user should get a new #salt every
> time they change their password and you shouldn't reuse the salts for
> other users or password.  
> 
> For PBKDF2 there is probably a max (or recommended) salt length but I
> don't know it.  
> 
> I also don't know anything about the SecureRandom class but it says it on
> the tin, so maybe it is.  Maybe not though.  I don't know how to find out.
> But I don't know that it matters in this instance as its only used for the
> SHA256 HMAC internally in the comparison function.
> 
> 
> Hope this helps.  
> 
> 
> Francis wrote
>> Hi folks
>> 
>> I'm playing with the PBKDF2 package of Udo:
>> http://www.smalltalkhub.com/#!/~UdoSchneider/PBKDF2
>> (thanks Udo), but I can't find how to validate a stored hash.
>> Can you point me in the right direction?
>> 
>> Thanks
>> Francis





--
View this message in context: 
http://forum.world.st/Validate-password-with-PBKDF2-tp4952973p4953004.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

--- End Message ---


Re: [Pharo-users] Validate password with PBKDF2

2017-06-30 Thread Pierce Ng
On Fri, Jun 30, 2017 at 12:43:23AM -0700, Francis via Pharo-users wrote:
> Saving the salt is not a big issue but I'd like something more simple. 
> In python I can store the salt with the password
> see:https://pypi.python.org/pypi/bcrypt/3.1.0

Hi, you could try PasswordCrypt:

  https://github.com/PierceNg/PasswordCrypt

Pierce




Re: [Pharo-users] Logging in with VNC

2017-06-30 Thread Pierce Ng
On Thu, Jun 29, 2017 at 08:59:18AM -0400, sergio ruiz wrote:
> I need to be able to log in to my production image with VNC until i am
> comfortable with the command line interface. I know that every time i have
> had to do it, it seems like i used a different package.
>
> Which package is everyone using these days for remote GUI access?

  http://smalltalkhub.com/#!/~PharoExtras/RFB

Tested working with X11 clients like Vinagre connecting to Pharo 5 in-image
server.

Pierce



Re: [Pharo-users] Validate password with PBKDF2

2017-06-30 Thread Erik Stel
Francis, 

The hashpw function returns a hash with the salt prepended. So it contains
both elements. (See for example explanation at:
https://stackoverflow.com/questions/27413248/why-can-bcrypt-hashpw-be-used-both-for-hashing-and-verifying-passwords).
 

You can do the same thing here. Assuming you have a fixed size salt, just
prepend it before the hash value. Since the salt is (should be) random,
returning it's value does not weaken the security. Using a salt prevents
against rainbow table attacks: pre-generated hash values for many possible
passwords. (See https://en.wikipedia.org/wiki/Rainbow_table).   

Cheers, 
Erik



--
View this message in context: 
http://forum.world.st/Validate-password-with-PBKDF2-tp4952973p4953067.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Are we able to run pharo images in a read only environment?

2017-06-30 Thread Sven Van Caekenberghe

> On 27 Jun 2017, at 21:15, Sven Van Caekenberghe  wrote:
> 
> 
>> On 27 Jun 2017, at 21:00, Esteban A. Maringolo  wrote:
>> 
>> Interesting experiment.
>> 
>> It would be good to know how fast does the image boot and start
>> execution in the context of a service billed at the sub second scale.
> 
> Sadly I have the impression we lost some speed:
> 
> ~/pharo64$ ./pharo Pharo.image printVersion
> [version] 6.0 #60499
> 
> ~/pharo64$ time ./pharo Pharo.image eval '42 factorial'
> 14050061177528798985431426062445115699363840
> 
> real  0m1.276s
> user  0m0.985s
> sys   0m0.171s
> 
> while before
> 
> ~/pharo/build$ ../bin/pharo Pharo.image printVersion
> [version] 4.0 #40620
> 
> $ time ../bin/pharo Pharo.image eval '42 factorial'
> 14050061177528798985431426062445115699363840
> 
> real  0m0.526s
> user  0m0.434s
> sys   0m0.045s
> 
> But it is really hard to find the cause.

The good news is that the Pharo 7 minimal core is way faster

$ time ./pharo ~/Downloads/Pharo7.0-core-32bit-b649ac6.image eval "42 factorial"
14050061177528798985431426062445115699363840

real0m0.262s
user0m0.132s
sys 0m0.062s

Which is good of course ! 

> That being said, these lambda servers can only work well if they keep 
> instances alive for longer when there is enough traffic.
> 
>> Esteban A. Maringolo
>> 
>> 
>> 2017-06-27 13:05 GMT-03:00 Tim Mackinnon :
>>> Hi - I am trying to run a pharo image in lambda (as an experiment) - however
>>> I get an error from Pharo about not being able to write to the changes file?
>>> 
>>> As I am just evaluating some code - I’m not really coding, so don’t need a
>>> changes file - is there a command line option to not require it?
>>> 
>>> Also, am I running pharo the most efficient way - I’m using eval on the
>>> command line and referencing a class with a class method - but is this the
>>> best way?
>>> 
>>> Thanks,
>>> 
>>> Tim
>>> 
>>> "errorMessage": "Command failed: ./pharo Pharo.image eval \"Lambda
>>> processJSON:
>>> '{\"key3\":\"value3\",\"key2\":\"value2\",\"key1\":\"value1\"}'\"\n'Pharo
>>> cannot write to the changes file named /var/task/Pharo.changes.\n\nPlease
>>> check that you have write permission for this file.\n\nYou won''t be able to
>>> save this image correctly until you fix this.'\n\u001b[31mError: Can't find
>>> the requested
>>> origin\n\u001b[0mUnixResolver(PlatformResolver)>>cantFindOriginError\n[ self
>>> cantFindOriginError ] in
>>> UnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed: in Block: [
>>> self cantFindOriginError
>>> ]\nUnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed:or:\nUnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed:\nUnixResolver>>home\n[
>>> self home / '.config' ] in UnixResolver>>preferences in Block: [ self home /
>>> '.config'
>>> ]\nUnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed:or:\nUnixResolver>>preferences\nUnixResolver(FileSystemResolver)>>resolve:\nSystemResolver(FileSystemResolver)>>unknownOrigin:\nSystemResolver(FileSystemResolver)>>resolve:\nInteractiveResolver>>unknownOrigin:\n[
>>> self unknownOrigin: origin ] in InteractiveResolver>>resolve: in Block: [
>>> self unknownOrigin: origin
>>> ]\nIdentityDictionary(Dictionary)>>at:ifAbsent:\nInteractiveResolver>>resolve:\nFileLocator>>resolve\nFileLocator(AbstractFileReference)>>exists\nGlobalIdentifierStonPersistence(GlobalIdentifierPersistence)>>shouldCallPreviousPersistence\nGlobalIdentifierStonPersistence(GlobalIdentifierPersistence)>>ensure:\nGlobalIdentifier>>ensure\nGlobalIdentifier
>>> class>>initializeUniqueInstance\nGlobalIdentifier
>>> class>>uniqueInstance\nSystemSettingsPersistence
>>> class>>resumeSystemSettings\n[ :persistence | persistence
>>> resumeSystemSettings ] in PharoCommandLineHandler>>runPreferences in Block:
>>> [ :persistence | persistence resumeSystemSettings
>>> ...etc...\nBlockClosure>>cull:\nSystemDictionary(Dictionary)>>at:ifPresent:\nSmalltalkImage>>at:ifPresent:\nPharoCommandLineHandler>>runPreferences\nPharoCommandLineHandler>>activate\nPharoCommandLineHandler
>>> class(CommandLineHandler class)>>activateWith:\n\u001b[0m",
>>> "errorType": "Error",
>>> "stackTrace": [
>>>   "'Pharo cannot write to the changes file named
>>> /var/task/Pharo.changes.",
>>>   "",
>>>   "Please check that you have write permission for this file.",
>>>   "",
>>>   "You won''t be able to save this image correctly until you fix this.'",
>>>   "\u001b[31mError: Can't find the requested origin",
>>>   "\u001b[0mUnixResolver(PlatformResolver)>>cantFindOriginError",
>>>   "[ self cantFindOriginError ] in
>>> UnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed: in Block: [
>>> self cantFindOriginError ]",
>>>   "UnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed:or:",
>>>   "UnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed:",
>>>   "UnixResolver>>home",
>>>   "[ self home / '.config' ] in UnixResolver>>preferences in Block: [ self
>>> home / '.config' ]",
>>>

Re: [Pharo-users] Validate password with PBKDF2

2017-06-30 Thread Hernán Morales Durand
I guess I could integrate Udo's PBKDF2 into ApplicationSecurity. See under
"Using the CheckPoint" if matches your API you're looking for:

http://80738163270632.blogspot.com.ar/2014/10/application-security-2-checkpoint.html

Cheers,

Hernán


2017-06-30 4:43 GMT-03:00 Francis via Pharo-users <
pharo-users@lists.pharo.org>:

>
>
> -- Mensaje reenviado --
> From: Francis 
> To: pharo-users@lists.pharo.org
> Cc:
> Bcc:
> Date: Fri, 30 Jun 2017 00:43:23 -0700 (PDT)
> Subject: Re: Validate password with PBKDF2
> Thank you Paul,
> Saving the salt is not a big issue but I'd like something more simple.
> In python I can store the salt with the password
> see:https://pypi.python.org/pypi/bcrypt/3.1.0
>
> # Hash a password for the first time, with a randomly-generated salt
> hashed = bcrypt.hashpw(password, bcrypt.gensalt())
>
> and retrieve it subsequently
> if bcrypt.checkpw(password, hashed):
> ... print("It Matches!")
>
> Are you (smalltalkers) aware of something similar?
>
> Thanks again
> Francis
>
>
>
> Paul DeBruicker wrote
> > Looks like you'll have to store the salt when making the original hash of
> > the password.
> >
> > With that you can do
> >
> >
> > | salt originalPassword userInputPassword originalHash  newHash secretKey
> > |
> > salt:='salt'.
> > originalPassword:='password'.
> > userInputPassword:='12345678'.
> > originalHash:=PBKDF2 derivedKeySHA1Password: originalPassword salt: salt.
> > newHash:=PBKDF2 derivedKeySHA1Password: userInputPassword salt: salt.
> >
> > secretKey:= SecureRandom new nextBytes: 16.
> >
> > ((SHA256 new hmac key: secretKey) digestMessage: originalHash) = ((SHA256
> > new hmac key: secretKey) digestMessage: newHash).
> >
> >
> >
> > We do the double SHA256 HMAC signing of the hashes because of
> > https://www.nccgroup.trust/us/about-us/newsroom-and-events/
> blog/2011/february/double-hmac-verification/
> >
> > You can store the #secretKey and each user should get a new #salt every
> > time they change their password and you shouldn't reuse the salts for
> > other users or password.
> >
> > For PBKDF2 there is probably a max (or recommended) salt length but I
> > don't know it.
> >
> > I also don't know anything about the SecureRandom class but it says it on
> > the tin, so maybe it is.  Maybe not though.  I don't know how to find
> out.
> > But I don't know that it matters in this instance as its only used for
> the
> > SHA256 HMAC internally in the comparison function.
> >
> >
> > Hope this helps.
> >
> >
> > Francis wrote
> >> Hi folks
> >>
> >> I'm playing with the PBKDF2 package of Udo:
> >> http://www.smalltalkhub.com/#!/~UdoSchneider/PBKDF2
> >> (thanks Udo), but I can't find how to validate a stored hash.
> >> Can you point me in the right direction?
> >>
> >> Thanks
> >> Francis
>
>
>
>
>
> --
> View this message in context: http://forum.world.st/
> Validate-password-with-PBKDF2-tp4952973p4953004.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>
>


Re: [Pharo-users] [ANN] An evening with Pharo and the ESP32 microcontroller

2017-06-30 Thread Georges
Cool stuff Ben! :)

I dusted of my Arduino Uno and tried out reading the Serial Port using your
tutorial.
It would be nice for a follow up tutorial to write to the board and switch
the builtin led on/off !

Georges



--
View this message in context: 
http://forum.world.st/ANN-An-evening-with-Pharo-and-the-ESP32-microcontroller-tp4952959p4953102.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Validate password with PBKDF2

2017-06-30 Thread Francis via Pharo-users
--- Begin Message ---
Thanks Pierce and hernanmd
I decided to adopt the solution of the prepended salt as Erik said in the
previous post.

Here is my code, I hope it can be useful for the community

First I hash the password with an empty salt
 PBKDF2 derivedKeyHashFunction: SHA256 password: 'aSimplePassword' salt: ''
iterations: 3000 length: 16 .

I would have liked to avoid the empty salt but the message deriveKey needs
it.
Then I used UUID new as real salt and the string '$$' as separator between
the salt and the hashed password.
So here is the byte array I'm going to store in my db
 saltPlusHashedPassword := UUID new , '$$' asByteArray ,  (PBKDF2
derivedKeyHashFunction: SHA256 password: 'aSimplePassword' salt: ''
iterations: 3000 length: 16 ).

To validate the password, I retrieve the saltPlusHashedPassword from the db
and splitting it
 hashedPassword := (saltPlusHashedPassword splitOn:('$$' asByteArray))
second.

Finally the validation 
 (PBKDF2 derivedKeyHashFunction: SHA256 password: 'aSimplePassword' salt: ''
iterations: 3000 length: 16 ) = (ByteArray new, hashedPassword).


Note, I have to concatenate ByteArray new with hashedPassword because
hashedPassword is not a ByteAttay but a UUID, if you have a smarter way to
do it you are welcome.

HTH
Francis


Erik Stel wrote
> Francis, 
> 
> The hashpw function returns a hash with the salt prepended. So it contains
> both elements. (See for example explanation at:
> https://stackoverflow.com/questions/27413248/why-can-bcrypt-hashpw-be-used-both-for-hashing-and-verifying-passwords).
>  
> 
> You can do the same thing here. Assuming you have a fixed size salt, just
> prepend it before the hash value. Since the salt is (should be) random,
> returning it's value does not weaken the security. Using a salt prevents
> against rainbow table attacks: pre-generated hash values for many possible
> passwords. (See https://en.wikipedia.org/wiki/Rainbow_table).   
> 
> Cheers, 
> Erik





--
View this message in context: 
http://forum.world.st/Validate-password-with-PBKDF2-tp4952973p4953119.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

--- End Message ---


Re: [Pharo-users] [ANN] An evening with Pharo and the ESP32 microcontroller

2017-06-30 Thread Ben Coman
On Fri, Jun 30, 2017 at 9:50 PM, Georges  wrote:

> Cool stuff Ben! :)
>
> I dusted of my Arduino Uno and tried out reading the Serial Port using your
> tutorial.
> It would be nice for a follow up tutorial to write to the board and switch
> the builtin led on/off !
>
> Georges
>

Glad you liked it.
Actually, I thought I might append to that article a section "Lets actually
do something useful"  to do that, and also read an analog input.

The next article will be testing bulk analog data read over TCPIP WiFi
connection.

cheers -ben


Re: [Pharo-users] Validate password with PBKDF2

2017-06-30 Thread Erik Stel
Francis,

You're using an empty salt when creating the hash. Just prepending a random
number does not add much security. Anyone knowing your solution will just
prepend a random number. And creating only a few accounts in your system
will probably reveal that information as well. A wrong-doer will just use a
fake salt and will still be able to try a rainbow table attack.

Please use a real random value for the salt. And easiest would be to give it
a fixed size. 

(Don't have an image and/or code available, so this might lead to some
pseudo code ;-) 

To generate a safe password hash which you can store in your db, the
following method. It creates a random number (your example of a UUID of 16
bytes) and uses that as a salt for the password hash. Both values are then
concatenated and returned as a 'safe' password. This can be stored in your
db.



To validate a user's password you retrieve the safePasswordHash from your db
(based on the user's id) and validate the given password against it. For
this the salt is retrieved from the safePasswordHash (first 16 bytes because
UUID is 16 bytes) and it is then used to calculate the hash of the given
password. It should match the second part of the safePasswordHash.



Hope this helps.

For real safety, please add some checks for valid values. Did we receive a
valid password? Is the safePasswordHash the correct length (in this case 32
bytes)? You might consider using another salt generator than UUID.

Cheers,
Erik




--
View this message in context: 
http://forum.world.st/Validate-password-with-PBKDF2-tp4952973p4953129.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] FUEL documentation

2017-06-30 Thread Juraj Kubelka
Hi,

Is there any documentation about FUEL? I would like to understand in more 
detail what data 

--
Juraj Kubelka


[Pharo-users] FUEL documentation

2017-06-30 Thread Juraj Kubelka
(sorry, I have accidentally pressed send button)

Hi,

Is there any documentation about FUEL? I would like to understand in more 
detail what data are serialized, if I can somehow alter it (filter it) 
explicitly, and how can I handle errors on materialization.

I was playing a bit with it and in some case, during the materialization, it 
complained that there is a missing class, but I was pretty sure that the class 
has nothing to do with the serialized objects. 

So, I will appreciate any documentation that helps to understand how I can 
analyze what is serialized and how to handle materialization errors.

Thanks!
Juraj




Re: [Pharo-users] FUEL documentation

2017-06-30 Thread Sven Van Caekenberghe

> On 30 Jun 2017, at 22:40, Juraj Kubelka  wrote:
> 
> (sorry, I have accidentally pressed send button)
> 
> Hi,
> 
> Is there any documentation about FUEL? I would like to understand in more 
> detail what data are serialized, if I can somehow alter it (filter it) 
> explicitly, and how can I handle errors on materialization.
> 
> I was playing a bit with it and in some case, during the materialization, it 
> complained that there is a missing class, but I was pretty sure that the 
> class has nothing to do with the serialized objects. 
> 
> So, I will appreciate any documentation that helps to understand how I can 
> analyze what is serialized and how to handle materialization errors.
> 
> Thanks!
> Juraj

FUEL documentation is actually very good: 
https://rmod.inria.fr/web/software/Fuel




Re: [Pharo-users] FUEL documentation

2017-06-30 Thread Juraj Kubelka
Thank you!

Juraj

> El 30-06-2017, a las 22:55, Sven Van Caekenberghe  escribió:
> 
> 
>> On 30 Jun 2017, at 22:40, Juraj Kubelka  wrote:
>> 
>> (sorry, I have accidentally pressed send button)
>> 
>> Hi,
>> 
>> Is there any documentation about FUEL? I would like to understand in more 
>> detail what data are serialized, if I can somehow alter it (filter it) 
>> explicitly, and how can I handle errors on materialization.
>> 
>> I was playing a bit with it and in some case, during the materialization, it 
>> complained that there is a missing class, but I was pretty sure that the 
>> class has nothing to do with the serialized objects. 
>> 
>> So, I will appreciate any documentation that helps to understand how I can 
>> analyze what is serialized and how to handle materialization errors.
>> 
>> Thanks!
>> Juraj
> 
> FUEL documentation is actually very good: 
> https://rmod.inria.fr/web/software/Fuel
> 
> 




Re: [Pharo-users] Validate password with PBKDF2

2017-06-30 Thread Francis via Pharo-users
--- Begin Message ---
Ah-ha! You are right, the proper way to encrypt is with the salt and then
prepend the salt.
Thanks
Francis

FIY  does not give a ByteArray because UUID is a subclass of ByteArray and
asByteArray returns self




Erik Stel wrote
> Francis,
> 
> You're using an empty salt when creating the hash. Just prepending a
> random number does not add much security. Anyone knowing your solution
> will just prepend a random number. And creating only a few accounts in
> your system will probably reveal that information as well. A wrong-doer
> will just use a fake salt and will still be able to try a rainbow table
> attack.
> 
> Please use a real random value for the salt. And easiest would be to give
> it a fixed size. 
> 
> (Don't have an image and/or code available, so this might lead to some
> pseudo code ;-) 
> 
> To generate a safe password hash which you can store in your db, the
> following method. It creates a random number (your example of a UUID of 16
> bytes) and uses that as a salt for the password hash. Both values are then
> concatenated and returned as a 'safe' password. This can be stored in your
> db.

> 
> To validate a user's password you retrieve the safePasswordHash from your
> db (based on the user's id) and validate the given password against it.
> For this the salt is retrieved from the safePasswordHash (first 16 bytes
> because UUID is 16 bytes) and it is then used to calculate the hash of the
> given password. It should match the second part of the safePasswordHash.

> 
> Hope this helps.
> 
> For real safety, please add some checks for valid values. Did we receive a
> valid password? Is the safePasswordHash the correct length (in this case
> 32 bytes)? You might consider using another salt generator than UUID.
> 
> Cheers,
> Erik





--
View this message in context: 
http://forum.world.st/Validate-password-with-PBKDF2-tp4952973p4953138.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

--- End Message ---


Re: [Pharo-users] Are we able to run pharo images in a read only environment?

2017-06-30 Thread Tim Mackinnon
Wow that's very promising - how do I get that setup? I also believe for
lambda I need 64 bit as you have little control of the base image?
I haven't had a chance to try marshalling results back to Alexa yet -
but that's my goal.
Tim

Sent from my iPhone

> On 30 Jun 2017, at 15:43, Sven Van Caekenberghe  wrote:>
>
>> On 27 Jun 2017, at 21:15, Sven Van Caekenberghe  wrote:>>
>>
>>> On 27 Jun 2017, at 21:00, Esteban A. Maringolo
>>>  wrote:>>>
>>> Interesting experiment.
>>>
>>> It would be good to know how fast does the image boot and start
>>> execution in the context of a service billed at the sub second
>>> scale.>>
>> Sadly I have the impression we lost some speed:
>>
>> ~/pharo64$ ./pharo Pharo.image printVersion
>> [version] 6.0 #60499
>>
>> ~/pharo64$ time ./pharo Pharo.image eval '42 factorial'
>> 14050061177528798985431426062445115699363840
>>
>> real0m1.276s
>> user0m0.985s
>> sys0m0.171s
>>
>> while before
>>
>> ~/pharo/build$ ../bin/pharo Pharo.image printVersion
>> [version] 4.0 #40620
>>
>> $ time ../bin/pharo Pharo.image eval '42 factorial'
>> 14050061177528798985431426062445115699363840
>>
>> real0m0.526s
>> user0m0.434s
>> sys0m0.045s
>>
>> But it is really hard to find the cause.
>
> The good news is that the Pharo 7 minimal core is way faster
>
> $ time ./pharo ~/Downloads/Pharo7.0-core-32bit-b649ac6.image eval "42
> factorial"> 14050061177528798985431426062445115699363840
>
> real0m0.262s
> user0m0.132s
> sys0m0.062s
>
> Which is good of course !
>
>> That being said, these lambda servers can only work well if they keep
>> instances alive for longer when there is enough traffic.>>
>>> Esteban A. Maringolo
>>>
>>>
>>> 2017-06-27 13:05 GMT-03:00 Tim Mackinnon :
 Hi - I am trying to run a pharo image in lambda (as an experiment)
 - however I get an error from Pharo about not being able to write to 
 the
 changes file?
 As I am just evaluating some code - I’m not really coding, so don’t
 need a changes file - is there a command line option to not require it?

 Also, am I running pharo the most efficient way - I’m using eval
 on the command line and referencing a class with a class method - but 
 is
 this the best way?

 Thanks,

 Tim

 "errorMessage": "Command failed: ./pharo Pharo.image eval \"Lambda 
 processJSON:
 '{\"key3\":\"value3\",\"key2\":\"value2\",\"key1\":\"value1\"}'\"\-
 n'Pharo cannot write to the changes file named
 /var/task/Pharo.changes.\n\nPlease check that you have write 
 permission for this file.\n\nYou won''t
 be able to save this image correctly until you fix 
 this.'\n\u001b[31mError:
 Can't find the requested
 origin\n\u001b[0mUnixResolver(PlatformResolver)>>cantFindOriginErr-
 or\n[ self cantFindOriginError ] in
 UnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed: in
 Block: [ self cantFindOriginError
 ]\nUnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed:o-
 r:\nUnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed:-
 \nUnixResolver>>home\n[ self home / '.config' ] in 
 UnixResolver>>preferences in Block: [
 self home / '.config'
 ]\nUnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed:o-
 r:\nUnixResolver>>preferences\nUnixResolver(FileSystemResolver)>>r-
 esolve:\nSystemResolver(FileSystemResolver)>>unknownOrigin:\nSyste-
 mResolver(FileSystemResolver)>>resolve:\nInteractiveResolver>>unkn-
 ownOrigin:\n[ self unknownOrigin: origin ] in 
 InteractiveResolver>>resolve: in
 Block: [ self unknownOrigin: origin
 ]\nIdentityDictionary(Dictionary)>>at:ifAbsent:\nInteractiveResolv-
 er>>resolve:\nFileLocator>>resolve\nFileLocator(AbstractFileRefere-
 nce)>>exists\nGlobalIdentifierStonPersistence(GlobalIdentifierPers-
 istence)>>shouldCallPreviousPersistence\nGlobalIdentifierStonPersi-
 stence(GlobalIdentifierPersistence)>>ensure:\nGlobalIdentifier>>en-
 sure\nGlobalIdentifier 
 class>>initializeUniqueInstance\nGlobalIdentifier
 class>>uniqueInstance\nSystemSettingsPersistence
 class>>resumeSystemSettings\n[ :persistence | persistence
 resumeSystemSettings ] in PharoCommandLineHandler>>runPreferences
 in Block: [ :persistence | persistence resumeSystemSettings
 ...etc...\nBlockClosure>>cull:\nSystemDictionary(Dictionary)>>at:i-
 fPresent:\nSmalltalkImage>>at:ifPresent:\nPharoCommandLineHandler>-
 >runPreferences\nPharoCommandLineHandler>>activate\nPharoCommandLi-
 neHandler class(CommandLineHandler class)>>activateWith:\n\u001b[0m",
 "errorType": "Error",
 "stackTrace": [
  "'Pharo cannot write to the changes file named
 /var/task/Pharo.changes.",
  "",
  "Please check that you have write permission for this file.",
  "",
  "You won''t be able to 

[Pharo-users] PrimitiveFailed: primitive #createDirectory: in UnixStore failed

2017-06-30 Thread Jacob Wagner
Hi.  I am trying to run pharo 6 in an Ubuntu 16 vm running XFCE desktop
environment.  I downloaded the 64 bit pharo zip and executed ./pharo 
The pharo GUI starts but immediately a debugger opens with the title's error
message. 
After this, I cannot exit the VM normally by clicking the "x" in the upper
right hand corner, i have to close the terminal because a similar error will
popup if I try to close the window.

How should I proceed?  Not sure if I need to change permissions on files or
whatever.  



-

--
View this message in context: 
http://forum.world.st/PrimitiveFailed-primitive-createDirectory-in-UnixStore-failed-tp4953142.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.