Re: [Pharo-users] Glamour: update presenter with new text

2017-07-14 Thread Hilaire
Thanks Doru, it works as a charm!

I don't think I could find it by myself, or I will have to become a
Glamour expert.

To make it perfect, there is still a fix needed for the DrGeo script
browser:

The class method 'scriptName' of each Dr. Geo script class returns a
string, it used in the browser (and other place) to list meaningfully
the script (and not use the generic class name).

Therefore, when the user edit this method, the script name listed in the
left panel should be updated accordingly. I edit the code as bellow:

scriptsIn: constructor

constructor fastList

title: 'Scripts' translated;

display: [ :organiser |  organiser ];

format: #scriptName.

*constructor  updateOn: MethodModified from: [ SystemAnnouncer
uniqueInstance ].*


It gives the expected behaviour. Is it the right way to do it?

Thanks

Hilaire



Le 13/07/2017 à 11:50, Tudor Girba a écrit :
>
> I took a quick look. To get the methods properly update and selected
> when modifying code, you should use the reference to the method, and
> the not the compiled method.
>

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



[Pharo-users] Creating the smallest server runtime footprint

2017-07-14 Thread Tim Mackinnon
Hi - buoyed by the success of a minimal image (thanks Pavel), I'm wondering if 
I can get even smaller.

There are lots of .so's in the vm which wouldn't make sense on a server once 
deployed - sound, maybe libgit ...

Is there a list of the essential ones, or tips on what I can strip out of the 
Linux deployment? I also recall that i can leave out .sources and .changes as 
well right?

Tim

Sent from my iPhone



Re: [Pharo-users] Creating the smallest server runtime footprint

2017-07-14 Thread Tim Mackinnon
Related to this question - in the Linux vm there are several .so files that 
have numerical extensions as well as the same named .so file. Are these merge 
conflicts or platform variations of the same files?

E.g.

libSDL2-2.0.so.0.4.1 & libSDL2-2.0.so & libSDL2.so 

Are all in there?

Tim

Sent from my iPhone

> On 14 Jul 2017, at 08:59, Tim Mackinnon  wrote:
> 
> Hi - buoyed by the success of a minimal image (thanks Pavel), I'm wondering 
> if I can get even smaller.
> 
> There are lots of .so's in the vm which wouldn't make sense on a server once 
> deployed - sound, maybe libgit ...
> 
> Is there a list of the essential ones, or tips on what I can strip out of the 
> Linux deployment? I also recall that i can leave out .sources and .changes as 
> well right?
> 
> Tim
> 
> Sent from my iPhone




Re: [Pharo-users] Glamour: update presenter with new text

2017-07-14 Thread Tudor Girba
Hi,

> On Jul 14, 2017, at 9:52 AM, Hilaire  wrote:
> 
> Thanks Doru, it works as a charm!

Great.

> I don't think I could find it by myself, or I will have to become a Glamour 
> expert.

Actually, this is not really related to Glamour, but to how CompiledMethods are 
dealt with by the system. A CompiledMethod is immutable, so every time you 
change a method, a new CompiledMethod object gets created. So, if the browser 
shows CompiledMethods, you will always see the old version. This would have 
been the same without Glamour as well. That is why you need to show a 
RingMethodDefinition which only holds a reference made by the name of the 
method that is resolved dynamically.


> To make it perfect, there is still a fix needed for the DrGeo script browser:
> 
> The class method 'scriptName' of each Dr. Geo script class returns a string, 
> it used in the browser (and other place) to list meaningfully the script (and 
> not use the generic class name).
> 
> Therefore, when the user edit this method, the script name listed in the left 
> panel should be updated accordingly. I edit the code as bellow:
> 
> scriptsIn: constructor
> constructor fastList
> title: 'Scripts' translated;
> display: [ :organiser |  organiser ];
> format: #scriptName.
> constructor  updateOn: MethodModified from: [ SystemAnnouncer 
> uniqueInstance ].
> 
> 
> It gives the expected behaviour. Is it the right way to do it?


constructor fastList creates a CompositePresentation that holds a 
ListPresentation. Think of a CompositePresentation as a morphic pane: it is a 
holder without much logic. The data you want to update is dealt with by 
ListPresentation. Thus, what you want to update is the list, not the whole 
composite.

scriptsIn: constructor
constructor fastList
title: 'Scripts' translated;
display: [ :organiser |  organiser ];
format: #scriptName;
updateOn: MethodModified from: [ SystemAnnouncer uniqueInstance 
].

Cheers,
Doru



> Thanks
> 
> Hilaire
> 
> 
> Le 13/07/2017 à 11:50, Tudor Girba a écrit :
>> 
>> I took a quick look. To get the methods properly update and selected when 
>> modifying code, you should use the reference to the method, and the not the 
>> compiled method.
>> 
> 
> -- 
> Dr. Geo
> 
> http://drgeo.eu

--
www.tudorgirba.com
www.feenk.com

"Every successful trip needs a suitable vehicle."







[Pharo-users] VoyageMongo not working in Pharo 6?

2017-07-14 Thread kmo
I just had a quick tryout of VoyageMongo in Pharo 6 and
VOMongoRepository>>save:anObject fails because UUIDGenerator does not have
the method makeSeed.

UUIDGenerator >> makeSeed was present in pharo 5. It's not there in pharo 6.

I installed from the Catalog browser where VoyageMongo is listed as being OK
for pharo 6.
 



--
View this message in context: 
http://forum.world.st/VoyageMongo-not-working-in-Pharo-6-tp4954843.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Is there a 64bit minimal image for either 6.0 or 7.0?

2017-07-14 Thread Guillermo Polito
Two different things:

1) yes, the minimal image is indeed minimal. Actually, the minimal image is
around 20% of the full image. Two working directions that are looking for
active contributions are:
 - reduce that 20% so bootstrap times are smaller
 - modularise the other 80% so that we can easily load new stuff.
 About this last point, there are already there in the repository a
couple of metacello configurations made by Pavel that allow us to reload
the 80% into the 20% image. But we should modularise them because so far
they are too big.

2) About the second point. You should not need to recompile everything. In
the image there is the Undeclared mechanism that should rebind new classes
as soon as they are loaded. Can you provide more insight on the bug? Why do
you need to recompile?

Tx,
Guille

On Thu, Jul 13, 2017 at 7:55 PM, Tim Mackinnon  wrote:

> I think there is something wrong with the minimal image - but it looks
> like the following has nudged me a bit closer (rather inelegantly but I
> think the minimal images may need checking for errors):
>
> MCFileTreeRepository methods do: [ :m | m recompile ].
> MCFileTreeStCypressReader methods do: [:m | m recompile ].
> MCFileTreeAbstractReader methods do: [:m | m recompile ].
>
> Tim
>
> On 13 Jul 2017, at 18:18, Tim Mackinnon  wrote:
>
> Thinking about this a bit more - if the minimal image is too minimal, and
> I load in some required classes - do I need to force methods to recompile
> to pick up the now loaded classes?
>
> Is there an easy way to do that?
>
> Tim
>
> On 13 Jul 2017, at 17:40, Tim Mackinnon  wrote:
>
> Hmmm - its very, very minimal… I am trying to load in my local code
> (checked out from git) with:
>
> Metacello new
> repository: 'filetree://../src';
> baseline: 'Lambda';
> load.
>
>
> However I get an error: MCFileTreeRepository>>repositoryProperties (STON
> is Undeclared)
>
> As I’m guessing that STON is not in that minimal image -  I have tried to
> load ConfigurationOfSton into the image first by doing:
>
> ./pharo Pharo.image config http://ss3.gemstone.com/ss/STON 
> ConfigurationOfSton --install=stable —-save
>
> It looks like this does load it, however when I then run my commands to load 
> my code into the new image with:
>
> ./pharo Pharo.image --no-default-preferences --save --quit st loadLocal.st 
> 
>
> (loadLocal.st  has the Metacello expression I first 
> mentioned) - I still seem to be getting an error as if STON is not in the 
> image,
>
> E.g.
>
> UndefinedObject class>>fromStream:
>
> And PharoDebug has lines confirming this (pointing at the method 
> #repositoryProperties):
>
> 27 MessageNotUnderstood(Exception)>>signal
>
> 28 UndefinedObject class(Object)>>doesNotUnderstand: #fromStream:
> 29 repositoryProperties
>   repositoryProperties
> ifNil: [
>
>
> At this point, I am having trouble loading this minimal image with a ui, but 
> if I use the command line and use the “eval” command line handler, and do 
> something like:
>
> ./pharo Pharo.image eval "(Smalltalk at: #STONReader) class methods"
> {STONReader class>>#on:}
>
> It is showing me methods as if the class is there. Can anyone think of what I 
> might be doing wrong? Or could try?
>
>
> Tim
>
>
> On 13 Jul 2017, at 08:47, Pavel Krivanek  wrote:
>
> For Pharo 6: https://ci.inria.fr/pharo/job/Pharo-6.0-Update-Step-3.2-
> Minimal/lastSuccessfulBuild/artifact/Pharo-minimal-64.zip
> For Pharo 7: https://ci.inria.fr/pharo/view/7.0/job/70-Bootstrap-
> 32bit-Conversion/lastSuccessfulBuild/artifact/latest-minimal-64.zip
>
> -- Pavel
>
> 2017-07-13 8:10 GMT+02:00 Tim Mackinnon :
>
>> That would be great. I'm keen to see if I can reproduce what Sven seemed
>> to measure where he seemed to get image launch times down.
>>
>> Currently on Lambda I am seeing an avg 3.5s to return a simple result.
>>
>> I know that 700ms of this is the overhead of a nodejs shim (the golang
>> Sparta project has reported this aspect).
>>
>> So I'm curious if a smaller image (& no sources) could get me into a sub
>> 2s range)
>>
>> Tim
>>
>> Sent from my iPhone
>>
>>
>>
>> Sent from my iPhone
>> On 13 Jul 2017, at 06:51, Pavel Krivanek 
>> wrote:
>>
>> Hi Tim,
>>
>> I will prepare jobs that will convert them to 64bits.
>>
>> -- Pavel
>>
>> 2017-07-12 23:14 GMT+02:00 Tim Mackinnon :
>>
>>> Hi - I would like to try a minimal image on AWS lambda (so I need a 64
>>> bit version).
>>>
>>> Is there a 64bit image for either 6.0 or 7.0 that is easy to download?
>>>
>>> I can see - http://get.pharo.org/60-minimal but it doesn’t say its 64
>>> bit, so I assume its 32bit?
>>>
>>> Tim
>>>
>>
>>
>
>
>
>


-- 



Guille Polito


Research Engineer

French National Center for Scientific Research - *http://www.cnrs.fr*




*Web:* *http://guillep.github.io* 

*Phone: *+33 06 52 70 66 13


Re: [Pharo-users] VoyageMongo not working in Pharo 6?

2017-07-14 Thread Esteban Lorenzano

> On 14 Jul 2017, at 11:31, kmo  wrote:
> 
> I just had a quick tryout of VoyageMongo in Pharo 6 and
> VOMongoRepository>>save:anObject fails because UUIDGenerator does not have
> the method makeSeed.
> 
> UUIDGenerator >> makeSeed was present in pharo 5. It's not there in pharo 6.
> 
> I installed from the Catalog browser where VoyageMongo is listed as being OK
> for pharo 6.

yes, this should not happen. 
can you share which version of VoyageMongo are you installing?

(is on ConfigurationOfVoyageMongo>>stable: method)

Esteban

> 
> 
> 
> 
> --
> View this message in context: 
> http://forum.world.st/VoyageMongo-not-working-in-Pharo-6-tp4954843.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 




Re: [Pharo-users] Is there a 64bit minimal image for either 6.0 or 7.0?

2017-07-14 Thread Tim Mackinnon
Hi Guille - thanks for replying and giving me some insight into all of this.

I have managed to get something working but there are definitely some issues 
that may need a bug report?

As I initially mentioned - if I download the Linux 64bit VM (curl 
get.pharo.org/64/ | bash) and then use the minimal image suggested by Pavel 
(https://ci.inria.fr/pharo/job/Pharo-6.0-Update-Step-3.2-Minimal/lastSuccessfulBuild/artifact/Pharo-minimal-64.zip
 
)
 I immediately hit a problem:

This minimal image supports Metacello, and the ST command line handler - 
however it us unable to process a script like the following (which is 
attempting to load a local filetree git package)

Metacello new
repository: 'filetree://../src';
baseline: 'Lambda';
load.

It fails because Metacello wants to use STON class>>readFromStream (in its 
#repositoryProperties method)- this minimal image does not contain STON (which 
is an error? Too much has been removed).

If I try to workaround this by loading STON as follows using the CONFIG command 
line handler:

./pharo Pharo.image config http://ss3.gemstone.com/ss/STON ConfigurationOfSton 
--install=stable —save

 this then highlights several other issues:

1) ConfigurationOfSton doesn’t have a group load will load it without Tests, 
and so loading it provides a series of errors due to TestCase not being in the 
min image (and there doesn’t appear to be a Configuration for loading SUnit by 
itelsf?) - I think this should be solved by either keeping STON in the image 
and/or having a config of Ston that loads without tests

2) Having loaded STON into that min image (albeit with broken Test cases), the 
minimal image doesn’t seem to use the Undeclared mechanism you describe and so 
the following classes (which have references to STON) - all need to be force 
recompiled like this:

{ MCFileTreeRepository. MCFileTreeStCypressReader. MCFileTreeAbstractReader } 
do: [:c | c compileAll ].

Otherwise I get an Undefined talkback when I try my metacello load, which I do 
using the ST command handler. 

Having dealt with 1 & 2, I am then able to run my Metacello load (as shown at 
the top). So it appears that there are a few related problems here.

I have a running example of this in Gitlab that demonstrates this - and can be 
used to replicate this problem if that helps (although the description is 
pretty clear I think).

Tim

> On 14 Jul 2017, at 11:14, Guillermo Polito  wrote:
> 
> Two different things:
> 
> 1) yes, the minimal image is indeed minimal. Actually, the minimal image is 
> around 20% of the full image. Two working directions that are looking for 
> active contributions are:
>  - reduce that 20% so bootstrap times are smaller
>  - modularise the other 80% so that we can easily load new stuff.
>  About this last point, there are already there in the repository a 
> couple of metacello configurations made by Pavel that allow us to reload the 
> 80% into the 20% image. But we should modularise them because so far they are 
> too big.
> 
> 2) About the second point. You should not need to recompile everything. In 
> the image there is the Undeclared mechanism that should rebind new classes as 
> soon as they are loaded. Can you provide more insight on the bug? Why do you 
> need to recompile?
> 
> Tx,
> Guille
> 
> On Thu, Jul 13, 2017 at 7:55 PM, Tim Mackinnon  > wrote:
> I think there is something wrong with the minimal image - but it looks like 
> the following has nudged me a bit closer (rather inelegantly but I think the 
> minimal images may need checking for errors):
> 
> MCFileTreeRepository methods do: [ :m | m recompile ].
> MCFileTreeStCypressReader methods do: [:m | m recompile ].
> MCFileTreeAbstractReader methods do: [:m | m recompile ].
> Tim
> 
>> On 13 Jul 2017, at 18:18, Tim Mackinnon > > wrote:
>> 
>> Thinking about this a bit more - if the minimal image is too minimal, and I 
>> load in some required classes - do I need to force methods to recompile to 
>> pick up the now loaded classes?
>> 
>> Is there an easy way to do that?
>> 
>> Tim
>> 
>>> On 13 Jul 2017, at 17:40, Tim Mackinnon >> > wrote:
>>> 
>>> Hmmm - its very, very minimal… I am trying to load in my local code 
>>> (checked out from git) with:
>>> 
>>> Metacello new
>>> repository: 'filetree://../src <>';
>>> baseline: 'Lambda';
>>> load.
>>> 
>>> However I get an error: MCFileTreeRepository>>repositoryProperties (STON is 
>>> Undeclared) 
>>> 
>>> As I’m guessing that STON is not in that minimal image -  I have tried to 
>>> load ConfigurationOfSton into the image first by doing:
>>> ./pharo Pharo.image config http://ss3.gemstone.com/ss/STON 
>>>  ConfigurationOfSton --install=stable 
>>> —-save
>>> 
>>> It looks like this does load it, however when I then run m

Re: [Pharo-users] Seamless - send collections by value

2017-07-14 Thread Denis Kudriashov
Hi Petr.

There are few solutions to your problem.

1) You can specify #value strategy for any collections for your network
instance:


network transferByValue: (Kind of: Collection)

For your example you need to apply this strategy on server side. In that
case client will continue send collections by reference but it will receive
collections by value from server.

2) You can specify value strategy for BlockClosure. It will perform
#select: (for example) on server side without requests to client.

network transferByValue: (Instance of: BlockClosure)


Here you will need to apply strategy on client because blocks will be sent
from client to server.

3) You can explicitly pass objects with value strategy:

YourService>>getPersons

"on server side"

^retrievePersons asTransferredByValue


4) If persons collection is instance variable of other transferred by value
object then you can specify what value means for this container:

PersonContainer>>prepareValueTransferBy: aSeamlessObjectTransporter

aSeamlessObjectTransporter transferByValue: contents


5) You can ask any proxy to load local copy of remote object:

proxy asLocalObject.


Important notice:
- Seamless has no distributed garbage collection. So if you will transfer
by reference temporary objects they will be not collected as garbage. For
example server could  compute something and return it by reference. Nobody
will kill it.
But if you share only long lived service then it is not problem for you.
- there is no security in the level of Seamless. You should organize secure
channel by external tools like VPN.

These features are in todo.

Best regards,
Denis


2017-07-13 18:21 GMT+02:00 Petr Fischer :

> Hello, I am testing Seamless project (https://github.com/
> dionisiydk/Seamless) but I did not understand one thing:
>
> I have (for example) a Person class in my server and client image. Person
> class implements:
>
> Person>>sseamlessDefaultTransferStrategy
> ^SeamlessTransferStrategy defaultByValue
>
> so all Person instances are serialized from server to client image. Good.
>
> But when I have server method, for example, getPersons, that returns a
> collection (OrderedCollection) of Person instances, this collection is
> passed by reference (or not?).
> OrderedCollection inherits transfer strategy from Object, which is "by
> reference".
>
> So in client image, when I iterate this collection, too many (thousands)
> requests occurs.
>
> How to manage only this specific collection (returned from getPersons) to
> pass by value from server to client (to be completely serialized and copied
> to the client image), so when I iterate this collection in client image to
> avoid additional network requests (proxying)?
>
> Thanks! pf
>
>


Re: [Pharo-users] Peristence with SandStone or Voyage -> Bypassing the saving of a variable.

2017-07-14 Thread sergio ruiz
Oh! good idea.. i’ll take a look.. 

i ended up throwing them into a temp variable.. then saving.. then bringing it 
back..

thanks!

On July 14, 2017 at 2:20:42 AM, Sabine Manaa (manaa.sab...@gmail.com) wrote:


have a look at VOTransientDescription

I also have attributes which are not persistent.
I define them at class side like this:

mongoAccountingRecords
         

        ^ VOTransientDescription new 
                attributeName: 'accountingRecords'; 
                yourself 

Regards
Sabine


peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.Village-Buzz.com
http://www.ThoseOptimizeGuys.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101

signature.asc
Description: Message signed with OpenPGP using AMPGpg


Re: [Pharo-users] VoyageMongo not working in Pharo 6?

2017-07-14 Thread kmo
Is this what you wanted? 

ConfigurationOfVoyageMongo>>stable: 

stable: spec


spec for: #'common' version: '1.4'.
spec for: #'pharo1.4.x' version: '1.1.1'.
spec for: #'pharo2.0.x' version: '1.2.7'.
spec for: #'pharo3.x' version: '1.3.1'.
spec for: #'pharo4.x' version: '1.3.3'.
spec for: #'pharo5.x' version: '1.4'.



--
View this message in context: 
http://forum.world.st/VoyageMongo-not-working-in-Pharo-6-tp4954843p4954869.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] VoyageMongo not working in Pharo 6?

2017-07-14 Thread Esteban Lorenzano
mmm
yes, seems that we forget to update the catalog version. I will do it soon, but 
for the moment, please install using this: 

Metacello new 
repository: 'github://pharo-nosql/voyage:1.5/mc';
baseline: 'Voyage';
load: 'mongo tests'.

cheers!
Esteban


> On 14 Jul 2017, at 15:00, kmo  wrote:
> 
> Is this what you wanted? 
> 
> ConfigurationOfVoyageMongo>>stable: 
> 
> stable: spec
>   
> 
>   spec for: #'common' version: '1.4'.
>   spec for: #'pharo1.4.x' version: '1.1.1'.
>   spec for: #'pharo2.0.x' version: '1.2.7'.
>   spec for: #'pharo3.x' version: '1.3.1'.
>   spec for: #'pharo4.x' version: '1.3.3'.
>   spec for: #'pharo5.x' version: '1.4'.
> 
> 
> 
> --
> View this message in context: 
> http://forum.world.st/VoyageMongo-not-working-in-Pharo-6-tp4954843p4954869.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 



Re: [Pharo-users] VoyageMongo not working in Pharo 6?

2017-07-14 Thread kmo
Thanks




--
View this message in context: 
http://forum.world.st/VoyageMongo-not-working-in-Pharo-6-tp4954843p4954893.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Understanding DateTime and Locale and formatting times in a locale?

2017-07-14 Thread Tim Mackinnon
Hi - I’m really confused about DateAndTime support in Pharo?

If I have a server app running in the EU, and a user makes a request from 
Canada, and I want to format the time they see to be in their timezone - how do 
I do that with the classes in Pharo?

I can ask for a DataAndTime nowUTC, and if I know the user is in en-CA, I can 
create a Locale for them - but then how do I get the correct time offset, or 
how to I format that UTC date in their locale?

Tim


Re: [Pharo-users] Understanding DateTime and Locale and formatting times in a locale?

2017-07-14 Thread Norbert Hartl
Have a look at #asLocal

Norbert

> Am 14.07.2017 um 23:04 schrieb Tim Mackinnon :
> 
> Hi - I’m really confused about DateAndTime support in Pharo?
> 
> If I have a server app running in the EU, and a user makes a request from 
> Canada, and I want to format the time they see to be in their timezone - how 
> do I do that with the classes in Pharo?
> 
> I can ask for a DataAndTime nowUTC, and if I know the user is in en-CA, I can 
> create a Locale for them - but then how do I get the correct time offset, or 
> how to I format that UTC date in their locale?
> 
> Tim



[Pharo-users] Pharacloud Seaside Rest exception when opening the application

2017-07-14 Thread Lionel Akue
Hello everyone,

I have a fully working Seaside MDL application in locale.

But when I load the image (pharo 6) to ephemeric cloud and try to open the
application, I get:

WAArgumentNotFoundError: argument "aPhonenumberString" was not found in
#(#arg1 #arg2)
Debug Full Stack

thisContext
WAFullPlaceholderPathMatch class(WAMatch class)>>argument:notFoundInd:
self
WAFullPlaceholderPathMatch
thisContext
[ :arg3 | | tmp1 | arg3 isDigit ifFalse: [ tmp1 := arg2 indexOf: arg1. tmp1
isZero ifTrue: [ ...etc...
self
WAFullPlaceholderPathMatch
thisContext
ByteString(SequenceableCollection)>>do:
self
'aPhonenumberString'

When I use an Pharo 5 image, the Seaside welcome page doesn't show up. And
I get a '500 internal server error'.

Could you help fixing this?

thanks,

Lionel


Re: [Pharo-users] Understanding DateTime and Locale and formatting times in a locale?

2017-07-14 Thread Tim Mackinnon
Thanks for chipping in - but its the other way around that I’m after.

I am looking at ZTimestamp now -but again I don’t quite get it?

ZTimestamp now gives me a timestamp in UTC (great) but how do I format it to 
show it in say Canadian time?

I thought it would be something like:

ZTimestamp now printOn: stream timezone: (ZTimezone id: 'America/Halifax’) but 
it doesn’t seem to be that?

I must be missing something.

Tim

> On 14 Jul 2017, at 23:28, Norbert Hartl  wrote:
> 
> Have a look at #asLocal
> 
> Norbert
> 
>> Am 14.07.2017 um 23:04 schrieb Tim Mackinnon :
>> 
>> Hi - I’m really confused about DateAndTime support in Pharo?
>> 
>> If I have a server app running in the EU, and a user makes a request from 
>> Canada, and I want to format the time they see to be in their timezone - how 
>> do I do that with the classes in Pharo?
>> 
>> I can ask for a DataAndTime nowUTC, and if I know the user is in en-CA, I 
>> can create a Locale for them - but then how do I get the correct time 
>> offset, or how to I format that UTC date in their locale?
>> 
>> Tim
> 




[Pharo-users] [ANN] PharoLambda a demo of Pharo running on AWS Lambda

2017-07-14 Thread Tim Mackinnon
Hi - I’ve been playing around with getting Pharo to run well on AWS Lambda. 
It’s early days, but I though it might be interesting to share what I’ve 
learned so far.

Usage examples and code at https://gitlab.com/macta/PharoLambda 


With help from many of the folks here, I’ve been able to get a simple example 
to run in 500ms-1200ms with a minimal Pharo 6 image. You can easily try it out 
yourself. This seems slightly better than what the GoLang folks have been able 
to do.

Tim

Re: [Pharo-users] [ANN] PharoLambda a demo of Pharo running on AWS Lambda

2017-07-14 Thread Tim Mackinnon
Things move fast, I already got a shout out from an AWS advocate - 
https://twitter.com/chrismunns/status/885959425860808704 


Tim

> On 15 Jul 2017, at 00:39, Tim Mackinnon  wrote:
> 
> Hi - I’ve been playing around with getting Pharo to run well on AWS Lambda. 
> It’s early days, but I though it might be interesting to share what I’ve 
> learned so far.
> 
> Usage examples and code at https://gitlab.com/macta/PharoLambda 
> 
> 
> With help from many of the folks here, I’ve been able to get a simple example 
> to run in 500ms-1200ms with a minimal Pharo 6 image. You can easily try it 
> out yourself. This seems slightly better than what the GoLang folks have been 
> able to do.
> 
> Tim



Re: [Pharo-users] Understanding DateTime and Locale and formatting times in a locale?

2017-07-14 Thread Tim Mackinnon
Classic - the moment you write something, it suddenly dawns on you… its the 
other way around.

(ZTimezone id: 'America/Halifax’) gmtToLocal: ZTimestamp now…

Tim

> On 15 Jul 2017, at 00:34, Tim Mackinnon  wrote:
> 
> Thanks for chipping in - but its the other way around that I’m after.
> 
> I am looking at ZTimestamp now -but again I don’t quite get it?
> 
> ZTimestamp now gives me a timestamp in UTC (great) but how do I format it to 
> show it in say Canadian time?
> 
> I thought it would be something like:
> 
> ZTimestamp now printOn: stream timezone: (ZTimezone id: 'America/Halifax’) 
> but it doesn’t seem to be that?
> 
> I must be missing something.
> 
> Tim
> 
>> On 14 Jul 2017, at 23:28, Norbert Hartl  wrote:
>> 
>> Have a look at #asLocal
>> 
>> Norbert
>> 
>>> Am 14.07.2017 um 23:04 schrieb Tim Mackinnon :
>>> 
>>> Hi - I’m really confused about DateAndTime support in Pharo?
>>> 
>>> If I have a server app running in the EU, and a user makes a request from 
>>> Canada, and I want to format the time they see to be in their timezone - 
>>> how do I do that with the classes in Pharo?
>>> 
>>> I can ask for a DataAndTime nowUTC, and if I know the user is in en-CA, I 
>>> can create a Locale for them - but then how do I get the correct time 
>>> offset, or how to I format that UTC date in their locale?
>>> 
>>> Tim
>> 
> 
> 




Re: [Pharo-users] Creating the smallest server runtime footprint

2017-07-14 Thread Pierce Ng
On Fri, Jul 14, 2017 at 09:06:44AM +0100, Tim Mackinnon wrote:
> Related to this question - in the Linux vm there are several .so files that
> have numerical extensions as well as the same named .so file. Are these merge
> conflicts or platform variations of the same files?
> 
> libSDL2-2.0.so.0.4.1 & libSDL2-2.0.so & libSDL2.so 

They are the same files, typically sym-links.

Pierce



Re: [Pharo-users] Creating the smallest server runtime footprint

2017-07-14 Thread Hernán Morales Durand
Hi Tim,

2017-07-14 4:59 GMT-03:00 Tim Mackinnon :

> Hi - buoyed by the success of a minimal image (thanks Pavel), I'm
> wondering if I can get even smaller.
>
>
Can you share a script to reproduce the steps to build a minimal image?

Is it reproducible under Windows?

Cheers,

Hernán


Re: [Pharo-users] [ANN] PharoLambda a demo of Pharo running on AWS Lambda

2017-07-14 Thread Tudor Girba
Nice job!

Doru


> On Jul 15, 2017, at 1:43 AM, Tim Mackinnon  wrote:
> 
> Things move fast, I already got a shout out from an AWS advocate - 
> https://twitter.com/chrismunns/status/885959425860808704
> 
> Tim
> 
>> On 15 Jul 2017, at 00:39, Tim Mackinnon  wrote:
>> 
>> Hi - I’ve been playing around with getting Pharo to run well on AWS Lambda. 
>> It’s early days, but I though it might be interesting to share what I’ve 
>> learned so far.
>> 
>> Usage examples and code at https://gitlab.com/macta/PharoLambda
>> 
>> With help from many of the folks here, I’ve been able to get a simple 
>> example to run in 500ms-1200ms with a minimal Pharo 6 image. You can easily 
>> try it out yourself. This seems slightly better than what the GoLang folks 
>> have been able to do.
>> 
>> Tim
> 

--
www.tudorgirba.com
www.feenk.com

"Every thing has its own flow."