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

2017-07-16 Thread Tim Mackinnon
Thanks again Pavel - I'll try the 6.0 step 4 or possibly step 5 with sunit (as 
many libraries don't separate out their tests).

I've also tried leaving out libgit and libsdl2 .so's on my server build  and 
that seems fine too - making me wonder what others I can safely leave out? 
Sound is a candidate (but small fry in size but do you need the null variant?).

Libcrypto is big - but I wonder if https routines would use that (and it sounds 
server processing'y so maybe best left).

I was hoping to find a list explaining them somewhere - but it remains rather 
mysterious.

However, at this point, I think I may have hit the sweet spot in size where AWS 
seems to load efficiently below a zip of 10mb?

Tim

Sent from my iPhone

> On 15 Jul 2017, at 09:35, Pavel Krivanek  wrote:
> 
> If you want to stay with Pharo 6 image, you can try the bootstrapped version 
> of the minimal image:
> https://ci.inria.fr/pharo/view/6.0-SysConf/job/Pharo-6.0-Step-04-01-ConfigurationOfMinimalPharo/
> 
> -- Pavel
> 
> 2017-07-15 10:33 GMT+02:00 Pavel Krivanek :
>> Try the Pharo 7 metacello image (=Pharo 7 minimal image that the CI is 
>> already converting to 64bit). There should be no problem with STON because 
>> whole Pharo is loaded into it using metacello and filetree. Pharo 6 minimal 
>> image is done differently (by shrinking) and not so well tested.
>> 
>> For the conversion of 32-bit image to 64-bit image you need a VMMaker image:
>> https://ci.inria.fr/pharo/job/Spur-Git-Tracker/lastSuccessfulBuild/artifact/vmmaker-image.zip
>> and then evaluate:
>> ./pharo generator.image eval "[Spur32to64BitBootstrap new bootstrapImage: 
>> 'conversion.image'] on: AssertionFailure do: [ :fail | fail resumeUnchecked: 
>> nil ]"
>> 
>> -- Pavel
>> 
>> 
>> 
>> 2017-07-15 10:19 GMT+02:00 Tim Mackinnon :
>>> Hi Pavel - thanks for getting me to the point where I could even have a 
>>> minimal image. As I’m on the edge of my Pharo knowledge here, I’ll try and 
>>> run with this as best I can.
>>> 
>>> I’d been using the 6.0 image you suggested to me - but maybe I could use a 
>>> 70 image with Pharo 6 for a while (until the VM diverges) right? 
>>> 
>>> The bit I haven’t quite understood however, is how the 64bit image is 
>>> created - as your reference is to a 32bit version? Is the 64bit one 
>>> converted from 32 in a later stage? (For AWS Lambda I need 64bit) - am I 
>>> right in thinking the pipeline stage after this one is the one you sent me 
>>> - and the travis.yml file shows me what it does? But I can’t see a 
>>> trivis.yml in the conversion stage so I’m not sure how it does that. 
>>> (Question - how do I see what the pipelines do to answer my own questions?)
>>> 
>>> I was hoping that there was a basic image that got me up to metacello 
>>> baseline level to load git file tree packages/baselines  in my own repo as 
>>> well baselines on the internet. The one you sent me is fairly close to that 
>>> (its just missing STON in the image and seems to have an issue with 
>>> resolving undeclared classes that get loaded in - should do a fogbugz on 
>>> that?)
>>> 
>>> The follow-on from a metacello image is how we can get people to create 
>>> better baselines that give you more minimal loading options (e.g. 
>>> conditionally leave out the test cases perhaps)
>>> 
>>> Tim
>>> 
 On 15 Jul 2017, at 08:24, Pavel Krivanek  wrote:
 
 Hi Tim,
 
 you can base the your work on the bootstrapped image, see 
 https://ci.inria.fr/pharo/view/7.0/job/70-Bootstrap-32bit/, file 
 Pharo7.0-core-*.zip 
 
 This image does not have a lot of basic components like Monticello or 
 network but it has a compiler so the code can be imported as *.st files. 
 Then we have Pharo7.0-monticello-*.zip which will be easier to use and 
 probably can fit your needs. Monticello and network support are included. 
 But you cannot use baselines nor configurations to load your code.
 
 -- Pavel
 
 2017-07-14 9:59 GMT+02:00 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] Mysterious problem in loading Pharo

2017-07-16 Thread PBKResearch
Peter

I think the implication of your second para is that your last resort, 
re-booting the system, is always effective in fixing the problem. If so, while 
it is obviously a nuisance I think I can live with that. I think I have had 
this only once before - at least, I have seen the debug console in some 
context. But yesterday it happened simultaneously on two separate machines. So 
it all depends on how frequently it happens.

Peter Kenny

-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
Peter Uhnak
Sent: 16 July 2017 15:40
To: Any question about pharo is welcome 
Subject: Re: [Pharo-users] Mysterious problem in loading Pharo

I had this problem for several months (and still do), and so far I didn't 
manage to figure out what is the actual cause.

Sometimes it fixes itself (close Pharo and open again), sometimes opening it 
with different VM (and then reopen with the original) helps, and sometimes I 
have to restart system.

After I disabled Windows Fast Boot it is somewhat more infrequent (or rather it 
fixes itself without the need to restart).

But otherwise I might as well wave a magical wand. It is annoying but still 
better than then spending countless hours digging randomly and aimlessly in the 
VM ¯\_(ツ)_/¯.

Peter


On Sat, Jul 15, 2017 at 10:38:51PM +0800, Ben Coman wrote:
> Maybe revew recent Windows 10 updates...
> http://www.sysprobs.com/how-to-view-installed-updates-on-windows-10-8-
> 1-server-2012
> 
> cheers -ben
> 
> On Sat, Jul 15, 2017 at 6:26 PM, PBKResearch 
> wrote:
> 
> > Hello
> >
> >
> >
> > I have a problem in loading Pharo images which, until yesterday, 
> > loaded without difficulty. All the images showing the problem are 
> > Pharo 6 with the Cog VM; older images do not seem to be affected.
> >
> >
> >
> > The first sign of a problem is that, as soon as I start the image, 
> > the debug console appears, with several repeats of the message:
> >
> > LoadLibrary(FT2Plugin.dll) (998: Invalid access to memory location.)
> >
> > The other strange thing is that the appearance of some opened 
> > windows has changed. Most obviously, the three icons at the top left 
> > (close, minimise,
> > expand) are very close together. Also, I think the print size has 
> > got a bit smaller, though this is not obvious.
> >
> >
> >
> > I have recently reinstalled some components of Pharo and Moose, 
> > trying to solve my problems with PunQLite, so I wondered if I had 
> > fouled something up. To check, I made a completely new install of 
> > Pharo 6 (#60508) from the Pharo download page in a separate folder. 
> > When I start the image, both the strange things above are present, 
> > plus a debug window with the message;
> > ‘FT2 Error: Freetype2 primitive failed’.
> >
> >
> >
> > So it looks as though something has happened to my system which 
> > means that any Pharo 6 image will show these oddities. The images I 
> > have tried seem able to run some of my functions correctly, so it’s 
> > all to do with appearance.
> >
> >
> >
> > I am running on Windows 10 with all recent updates. There was a 
> > major update of Windows late yesterday, so it may be that the 
> > problems appeared then. Does anyone have any suggestions?
> >
> >
> >
> > Many thanks
> >
> >
> >
> > Peter Kenny
> >




Re: [Pharo-users] Playground and Dr. Geo

2017-07-16 Thread Henrik Nergaard
Hi,


a)Do you wrap the morph inside the morph tab view? ,

b) Do you use the same code for rendering as in  Morph>> #gtInspectorMorphIn: .


if a) it is most likely caused by the morph being wrapped within one or more 
transform morphs, and the offset of these are not taken into account when 
opening the menu.


if b) The real morph position is probably not the same as where clicked causing 
it to open at another place.


What method are you using for opening the menu: (#popUpEvent:in: , 
#popUpAt:forHand:in: , other)?

also see: 
https://pharo.fogbugz.com/f/cases/15927/Menu-is-broken-when-contained-in-a-scrollable-pane



Best regards,

Henrik



Fra: Pharo-users  på vegne av Hilaire 

Sendt: 16. juli 2017 21:12:16
Til: pharo-users@lists.pharo.org
Emne: [Pharo-users] Playground and Dr. Geo

Hi,

I am integrating the Dr. Geo Smalltalk Sketch to Playground.

So far, Dr. Geo morphic view is well integrated and interactive is
there. However when I select a menu in the view it opens deported. See
attached screenshot.

The Dr. Geo view is a StandardWindow with its label area hidden.

Any idea?

Thanks

Hilaire


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



[Pharo-users] object serialization, STON & PharoJS

2017-07-16 Thread Siemen Baader
Hi all,

I’m trying to transpile the STON class to JavaScript with PharoJS to use it
in a client side web application. The goal is it to retrieve object(graphs)
from the server and deserialize them in the frontend via xhr.

But PharoJS doesn't support thisContext, I think that's a limitation of the
JavaScript VM. PharoJS raises "PjJavascriptTranspilationError - thisContext
not supported. Found in Collection >> #toBraceStack:". I tried to add the
 pragma to the method in the hope that it will not be needed
for my uses, but no luck.

Is the use of thisContext needed in STON, can I avoid it? I had hoped to
use STON because it is simple and well documented and unlike JSON handles
object graphs and classes.

What are my options?

Alternatively, what else could I use to serialize objects? I'm already
using Voyage & Mongo on the backend which deal with JSON internally, and I
think Moose also has a serialization component. Using a JS library in the
frontend is also an option if there is a Pharo implementation for its
format as well.

Thanks,
Siemen


Re: [Pharo-users] Mysterious problem in loading Pharo

2017-07-16 Thread Peter Uhnak
I had this problem for several months (and still do), and so far I didn't 
manage to figure out what is the actual cause.

Sometimes it fixes itself (close Pharo and open again), sometimes opening it 
with different VM (and then reopen with the original) helps, and sometimes I 
have to restart system.

After I disabled Windows Fast Boot it is somewhat more infrequent (or rather it 
fixes itself without the need to restart).

But otherwise I might as well wave a magical wand. It is annoying but still 
better than then spending countless hours digging randomly and aimlessly in the 
VM ¯\_(ツ)_/¯.

Peter


On Sat, Jul 15, 2017 at 10:38:51PM +0800, Ben Coman wrote:
> Maybe revew recent Windows 10 updates...
> http://www.sysprobs.com/how-to-view-installed-updates-on-windows-10-8-1-server-2012
> 
> cheers -ben
> 
> On Sat, Jul 15, 2017 at 6:26 PM, PBKResearch 
> wrote:
> 
> > Hello
> >
> >
> >
> > I have a problem in loading Pharo images which, until yesterday, loaded
> > without difficulty. All the images showing the problem are Pharo 6 with the
> > Cog VM; older images do not seem to be affected.
> >
> >
> >
> > The first sign of a problem is that, as soon as I start the image, the
> > debug console appears, with several repeats of the message:
> >
> > LoadLibrary(FT2Plugin.dll) (998: Invalid access to memory location.)
> >
> > The other strange thing is that the appearance of some opened windows has
> > changed. Most obviously, the three icons at the top left (close, minimise,
> > expand) are very close together. Also, I think the print size has got a bit
> > smaller, though this is not obvious.
> >
> >
> >
> > I have recently reinstalled some components of Pharo and Moose, trying to
> > solve my problems with PunQLite, so I wondered if I had fouled something
> > up. To check, I made a completely new install of Pharo 6 (#60508) from the
> > Pharo download page in a separate folder. When I start the image, both the
> > strange things above are present, plus a debug window with the message;
> > ‘FT2 Error: Freetype2 primitive failed’.
> >
> >
> >
> > So it looks as though something has happened to my system which means that
> > any Pharo 6 image will show these oddities. The images I have tried seem
> > able to run some of my functions correctly, so it’s all to do with
> > appearance.
> >
> >
> >
> > I am running on Windows 10 with all recent updates. There was a major
> > update of Windows late yesterday, so it may be that the problems appeared
> > then. Does anyone have any suggestions?
> >
> >
> >
> > Many thanks
> >
> >
> >
> > Peter Kenny
> >



[Pharo-users] VoyageMongo with Metacello project spec in Pharo 6 on MacOS Sierra

2017-07-16 Thread Guillaume Giraud
Thanks a lot !

I used your config and now it works.

The result of evaluating 'Smalltalk os’ is 'a MacOSPlatform’, and the VM is 
201705310241.

By the way, I find it difficult to fully grasp the Metacello config process.
I have read Deep into Pharo, but I can’t really understand why the modification 
you suggested works.
Are there other resources available on the subject ?

Bye.

> Hi,
> 
>> On 15 Jul 2017, at 13:46, Guillaume Giraud > > wrote:
>> 
>> Hello,
>> 
>> I placed this code in a baseline of my package:
>> 
>> spec
>>  project: 'VoyageMongo'
>>  with: [ spec
>>  className: #ConfigurationOfVoyageMongo;
>>  version: #stable;
>>  repository: 'github://pharo-nosql/voyage/mc 
>> ';
>>  loads: #('mongo tests') ].
>> 
>> Unfortunately, when I load my Package from Pharo6 on MacOS Sierra I get the 
>> following error:
>> 
>> Error: Unsupported OS platform
>> 
>> The first lines of the stack are:
>> 
>> BaselineOfPunQLite(Object)   error:
>> BaselineOfPunQLite   platformLibraryName
>> BaselineOfPunQLite   preLoad
>> MetacelloMCVersionpec(MetacelloSpec) doItBlock:
>> 
>> In detail:
>> 
>> platformLibraryName
>>  " Answer a name for the compiled version of the library "
>> 
>>  Smalltalk os isUnix ifTrue: [ ^ 'unqlite.so' ].
>>  Smalltalk os isWin32ifTrue: [ ^ 'unqlite.dll' ].
>>  Smalltalk os isMacOSX   ifTrue: [ ^ 'unqlite.dylib' ].
>>  
>>  self error: 'Unsupported OS platform?
>> 
>> With Pharo6 on MacOsSierra, ?  Smalltalk os isMacOSX ? return ? false ?. But 
>> ?  Smalltalk os isMacOS ? return ? true ?.
>> 
>> What can I do? I just need to load Voyage with the configuration of my 
>> package ?
> 
> you can just change the Smalltalk os isMacOSX line for Smalltalk os isMacOS 
> for the moment. 
> now, that?s very weird :)
> What?s the result of evaluating "Smalltalk os? ?
> and after executing "OSPlatform startUp: true.? ?
> which VM are you using (Smalltalk vm version) ?
> 
> 
> and btw, is a lot better to make your config as this: 
> 
> spec
>   baseline: 'Voyage'
>   with: [ 
>   spec
>   repository: 'github://pharo-nosql/voyage:1.5/mc 
> ';
>   loads: #('mongo tests') ].
> 
> (referring directly the baseline)
> 
> 
> cheers!
> Esteban
> 
>> Thanks.