Re: [Pharo-users] Canonical download location for Pharo VMs

2018-11-13 Thread Esteban Lorenzano
The canonical location is: 

http://files.pharo.org/get-files/70/  
(for Pharo 7.0, there are siblings there for each version).

There there are links to stable and latest. 
As is said in first page of file server, all the other locations are there for 
reference (even if what is in get-files references something else) :)

http://files.pharo.org/vm/pharo-spur32/ 


Is one of this “reference” places. 

Esteban

> On 13 Nov 2018, at 05:14, Ben Coman  wrote:
> 
> 
> 
> On Tue, 13 Nov 2018 at 08:03, Esteban Maringolo  > wrote:
> What is the canonical repository/ci to download the latest VM for Pharo?
> 
> I'm trying to get pharo launcher to launch a 32 bit image in Windows, but it 
> complains it can't determine the image version, so I'm trying to download the 
> latest 32 bit VM for Windows to launch it manually, but 
> https://files.pharo.org/vm/  doesn't have 
> anyting updated, and links to a Jenkins that seems abandoned, same thing for 
> https://github.com/pharo-project/pharo-vm 
> , and 
> https://github.com/OpenSmalltalk/opensmalltalk-vm/ 
>  doesn't link to a 
> successful build.
> 
> Any hints on how to download the proper VM for windows 32 bit or successfully 
> configure Pharo-Launcher to determine itself how to do it?
> 
> Thank you.
> 
> Esteban A. Maringolo
> 
> http://files.pharo.org/vm/pharo-spur32/win/pharo-win-i386-201811120325-a3f516f.zip
>  
> 
> looks like its from yesterday.  :^)
> 
> cheers -ben
> 
> 



Re: [Pharo-users] Iceberg + BaselinOf + Metacello - how to manage interdependencies ?

2018-11-13 Thread Cédrick Béler
Nobody knows ?
I probably do/ask something wrong…

My impression is that it is very difficult for a newcomer to get into 
Iceberg/Github (I tried to avoid GIT as much as possible and I understand why 
now ^_^)… but still it’s a great tool. Just not that easy to "master" (there 
are several possibilities, orders for code loading).

Please tell me if there is something wrong in what I try to do.

Cheers,

Cédrick


> I’m trying to declare a BaselinOf to load lots of Packages. My aim is to have 
> a kind of distribution (so students don’t have to load packages).
> I’m new to Iceberg + BaselinOf + Metacello. I target only P7.
> 
> Let's say I want to load Teapot and NeoJSON (development version).
> Teapot depends on NeoJSON (#stable).
> 
> So, whatever the order of declaration in the BaselineOfMyProject, I’d like 
> not to have the following conflict:
> 
> 
> 
> So is it possible to tell to load :
> 
> - Teapot , then NeoJSON (updating to NeoJSON the dependancies of Teapot)
> - NeoJSON (#latest) then Teapot (ignoring the NeoJSON stable of Teapot 
> baseline).
> 
> I know I risk breaking Teapot (but I don’t care :), I want latest NeoJSON.
> 
> So is it possible to define such constraints ?
> 
> I’m aware of that way of loading from Metacello :
> 
> Metacello new
> baseline: 'NeoCSV';
> repository: 'gitlocal://../../iceberg/svenvc/NeoCSV 
> ' ;
> onConflict: [ :err | err useIncoming ];
> onUpgrade: [ :err | err useIncoming ];
> load
> Still, not sure, of the meaning of #useIncoming (#allow #disallow). 
> 1) Does one mean keep/load the latest ?
> 2) is it possible to launch such Metacello installation from Iceberg ?
> 
> 
> 
> TIA,
> 
> Cédrick



Re: [Pharo-users] MetaLink>>level: failing?

2018-11-13 Thread Marcus Denker
More progress… in the latest Pharo7 this is now working... (#operation reifies 
the original operation):

| link choice | 

choice := true.
link := MetaLink new metaObject: [ :operation | 
  UIManager default alert: 'Linked 
Version'.
  choice ifTrue: [operation value ].
   ]; 
selector: #value:;
arguments: #(#operation);
control: #instead.


(TestMetaLink >> #execute) ast link: link.
TestMetaLink new execute.
link uninstall.

No need for using #level: as #operation for method execution is reifying the 
*original* method that would have been executed without the link.

(this then is, too, what will be used to make finally “turning off” instead 
links work correctly: if the instead link is not active (due to a condition or 
level), it will
instead execute “operation value”, that is, what would have been done without 
the #instead link present.

Marcus

> On 7 Nov 2018, at 15:47, Marcus Denker  wrote:
> 
> Hi,
> 
> I added 
> 
>   
> https://pharo.fogbugz.com/f/cases/22642/instead-links-and-meta-level-original-code-not-executed
>  
> 
> 
> as a workaround, you can use a #before link with an explicit return:
> 
> 
> choice := true.
> link := MetaLink new metaObject: [ :object :selector :arguments :context | 
>   UIManager default alert: 
> 'Linked Version'.
>   choice ifTrue: [ context sender 
> sender sender sender return: (object perform: selector withArguments: 
> arguments)].
>]; 
> selector: #value:value:value:value:;
>  arguments: #(#object #selector #arguments #context);
>  control: #before;
>level: 0.
> 
> (TestMetaLink >> #execute) ast link: link.
> TestMetaLink new execute.
> link uninstall.
> 
> (yes, the  context sender sender sender  shows that #context needs to do the 
> right thing when using  level: 0. or not… another thing to fix)
> 
>   Marcus
> 
>> On 7 Nov 2018, at 15:08, Marcus Denker > > wrote:
>> 
>> Hello,
>> 
>> I added a fist issue (and fix) for parts of the problem
>> 
>> https://pharo.fogbugz.com/f/cases/22641/Semantic-analysis-needs-to-take-instead-preambles-into-account
>>  
>> 
>> https://github.com/pharo-project/pharo/pull/1960 
>> 
>> 
>> But after this, it does not work as the level just turns off calling the 
>> meta level code, but does not execute the
>> original code where the #instead is put.
>> (#instead in general needs more work in this implementation).
>> 
>> I will open another issue for that.
>> 
>>  Marcus
>> 
>>> On 31 Oct 2018, at 18:03, Vitor Medina Cruz >> > wrote:
>>> 
>>> Thanks! Is there an issue on fogbuzz where I can be notified of resolution? 
>>> Do you need me to create it?
>>> 
>>> After that how can update the code? Software update is safe or should I 
>>> create a new image?
>>> 
>>> regards,
>>> Vitor
>>> 
>>> On Mon, Oct 29, 2018 at 12:08 PM Marcus Denker >> > wrote:
>>> 
>>> 
 On 25 Oct 2018, at 01:33, Vitor Medina Cruz >>> > wrote:
 
 Hello,
 
 I am playing with MetaLink, really cool!, but I am having issues that I am 
 unsure if it's some erro or if I am doing something wrong (I am using 
 Pharo 6.1 32 bits in windows.). Consider:
 
 TestMetaLink>>execute
 UIManager default alert: 'Actual Version'.
 
 And in Playground:
 
 | link | 
 
 link := MetaLink new metaObject: [ :object | UIManager default alert: 
 'Linked Version' ];
 selector: #value:;
  arguments: #(#object);
  control: #instead.
 
 
 (TestMetaLink >> #execute) ast link: link.
 TestMetaLink new execute.
 link uninstall.
 
 This works as expected, an alert with 'Linked Version' is promped. But 
 then suppose I want to execute the actual node alongside with the linked 
 one considering some condition:
 
 | link choice | 
 
 choice := true.
 link := MetaLink new metaObject: [ :object :selector :arguments | 
   UIManager default alert: 
 'Linked Version'.
   choice ifTrue: [ object 
 perform: selector withArguments: arguments].
]; 
 selector: #value:value

Re: [Pharo-users] Canonical download location for Pharo VMs

2018-11-13 Thread Esteban Maringolo
Thanks Ben and Esteban.

I got confused becasue /vm/pharo-spu32 modification date said 2014-11-14 ,
and I was looking for the most recent one.

Now I realize that the directory modification date only changes when a file
or folder is added directly to that directory and not one of its
subdirectories.

Looking at the PharoLauncher vm's directory I can see there is a 70-x64,
61-x86, etc, what is the criteria to determine which vm is for 6.0 and
which for 7.0? The pharo.exe version says 5.0.0.0.

Thank again.

Esteban A. Maringolo


El mar., 13 nov. 2018 a las 5:37, Esteban Lorenzano ()
escribió:

> The canonical location is:
>
> http://files.pharo.org/get-files/70/ (for Pharo 7.0, there are siblings
> there for each version).
>
> There there are links to stable and latest.
> As is said in first page of file server, all the other locations are there
> for reference (even if what is in get-files references something else) :)
>
> http://files.pharo.org/vm/pharo-spur32/
> 
>
> Is one of this “reference” places.
>
> Esteban
>
> On 13 Nov 2018, at 05:14, Ben Coman  wrote:
>
>
>
> On Tue, 13 Nov 2018 at 08:03, Esteban Maringolo 
> wrote:
>
>> What is the canonical repository/ci to download the latest VM for Pharo?
>>
>> I'm trying to get pharo launcher to launch a 32 bit image in Windows, but
>> it complains it can't determine the image version, so I'm trying to
>> download the latest 32 bit VM for Windows to launch it manually, but
>> https://files.pharo.org/vm/ doesn't have anyting updated, and links to a
>> Jenkins that seems abandoned, same thing for
>> https://github.com/pharo-project/pharo-vm, and
>> https://github.com/OpenSmalltalk/opensmalltalk-vm/ doesn't link to a
>> successful build.
>>
>> Any hints on how to download the proper VM for windows 32 bit or
>> successfully configure Pharo-Launcher to determine itself how to do it?
>>
>> Thank you.
>>
>> Esteban A. Maringolo
>>
>
>
> http://files.pharo.org/vm/pharo-spur32/win/pharo-win-i386-201811120325-a3f516f.zip
> looks like its from yesterday.  :^)
>
> cheers -ben
>
>
>
>


[Pharo-users] problem when running without changes file (on windows)

2018-11-13 Thread Baveco, Hans
I have a pharo 6.1 image (based on the Moose 6.1 image) containing a small 
application. I would like to distribute this without the source code. When I 
run the application with the changes file present all is fine. When running 
with the changes file removed, it mostly works ok but apparently the 
functionality for e.g. creating png (linked to Cairo?) is not available. The 
log file is attached.

Now looking a bit further into this I observed that in fact all the 6.1 images 
I work with seem to have this same problem, e.g. when displaying Roassal graphs 
they display the red windows with crosses.

Is this option to run without a changes files supposed to work in 6.1 (on 
windows)? What should I do to make it work? (noticed that there is no setting 
anymore for this)

Hans


PharoDebug.log
Description: PharoDebug.log


Re: [Pharo-users] problem when running without changes file (on windows)

2018-11-13 Thread Sven Van Caekenberghe
Hi Hans,

Did you see (read the class comment) of NoPharoFilesOpener and NoChangesLog ?

Sven

> On 13 Nov 2018, at 16:19, Baveco, Hans  wrote:
> 
> I have a pharo 6.1 image (based on the Moose 6.1 image) containing a small 
> application. I would like to distribute this without the source code. When I 
> run the application with the changes file present all is fine. When running 
> with the changes file removed, it mostly works ok but apparently the 
> functionality for e.g. creating png (linked to Cairo?) is not available. The 
> log file is attached.
>  
> Now looking a bit further into this I observed that in fact all the 6.1 
> images I work with seem to have this same problem, e.g. when displaying 
> Roassal graphs they display the red windows with crosses.
>  
> Is this option to run without a changes files supposed to work in 6.1 (on 
> windows)? What should I do to make it work? (noticed that there is no setting 
> anymore for this)
>  
> Hans
> 




Re: [Pharo-users] problem when running without changes file (on windows)

2018-11-13 Thread Guillermo Polito
Still, in Pharo6 the absense of changes and sources files means also that
FFI calls cannot be done.
UFFI uses the method source code to map arguments, and if no source code is
available, FFI calls cannot be resolved.

This is solved in Pharo7 thanks to Vincent Blondeau by embedding argument
names into the method (and thus not requiring source code anymore).

If you need it, you can take the FFICompilerPlugin class +
(RBMethodNode>>ensureCachedArgumentNames) from Pharo7 and try to backport
them on your Pharo6 installation.

On Tue, Nov 13, 2018 at 4:29 PM Sven Van Caekenberghe  wrote:

> Hi Hans,
>
> Did you see (read the class comment) of NoPharoFilesOpener and
> NoChangesLog ?
>
> Sven
>
> > On 13 Nov 2018, at 16:19, Baveco, Hans  wrote:
> >
> > I have a pharo 6.1 image (based on the Moose 6.1 image) containing a
> small application. I would like to distribute this without the source code.
> When I run the application with the changes file present all is fine. When
> running with the changes file removed, it mostly works ok but apparently
> the functionality for e.g. creating png (linked to Cairo?) is not
> available. The log file is attached.
> >
> > Now looking a bit further into this I observed that in fact all the 6.1
> images I work with seem to have this same problem, e.g. when displaying
> Roassal graphs they display the red windows with crosses.
> >
> > Is this option to run without a changes files supposed to work in 6.1
> (on windows)? What should I do to make it work? (noticed that there is no
> setting anymore for this)
> >
> > Hans
> > 
>
>
>

-- 



Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

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] Iceberg + BaselinOf + Metacello - how to manage interdependencies ?

2018-11-13 Thread Sean P. DeNigris
cedreek wrote
> So is it possible to define such constraints ?

IIUC you could use #onConflict: and be more specific in the block as to
allow only the specific case you mentioned, but I think the more common
approach is to use the Metacello API to "lock" NeoJSON to the version you
want. I don't have an image handy, but search either the Pharo or Metacello
MLs for "API lock" or something


cedreek wrote
> Still, not sure, of the meaning of #useIncoming (#allow #disallow). 

Browse MetacelloResolveProjectUpgrade. There are several synonyms for the
same action. IIRC #allow et all means continue to load replacing the
currently loaded version, #disallow means use the version already loaded.


cedreek wrote
> 2) is it possible to launch such Metacello installation from Iceberg ?

I don't see why you couldn't put the API lock into a preloadDoit in your
baseline

A context shift is definitely required to get a handle on this, but after
the initial investment, it's pretty straightforward. There are a few
concepts applied repeatedly in most common cases. Hang in there!



-
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html



Re: [Pharo-users] ToManyRelationSlot variant with an ordered collection?

2018-11-13 Thread Peter Uhnak
Maybe useful... some months ago I've reimplemented FAME's links (and added
support for ToOne, etc.) https://github.com/openponk/synchronized-links
I wanted to add supports for slots, but didn't get around to it yet... but
maybe it will be easier to adapt this than to rewrite everything from
scratch.

Peter

On Mon, Nov 12, 2018 at 9:31 AM Marcus Denker 
wrote:

>
>
> > On 10 Nov 2018, at 22:52, Tudor Girba  wrote:
> >
> > Hi,
> >
> > The current implementation of ToManyRelationSlot is based on a
> RelationSet which holds the items in a Set.
> >
> > Is there an implementation that holds the items in an ordered collection?
>
>
> Not that I know, but it would be interesting to experiment with this!
>
> Marcus
>


Re: [Pharo-users] Examples of bad code

2018-11-13 Thread Peter Uhnak
Not necessarily unreadable, but I always find the UIManager & co. very
confusing. There's a very recent discussion on part of it here
http://forum.world.st/Streams-and-FileDialog-in-Pharo-6-and-7-td5084352.html

And the combinations and variations of arguments is also a mess
https://gist.github.com/peteruhnak/8ac6667b8eb11daee71517d0172b7355 ...
question:title:, confirm:label:, edit:label: ... and the code is also a
mess with respect to default values.

If you want unreadable code, then look at SpecInterpreter which is
responsible for building all Spec ui... 139 lines of code and so far I've
probably spent an hour per every five lines of code trying to
comprehensively understand this...

Peter

On Mon, Nov 12, 2018 at 5:34 PM webwarrior  wrote:

> In old Pharo code (Morphic, etc.) there's a lot of wierd stuff.
>
> My favourite is DockingBarMorph>>#predominantDockingBarsOfChastes:
>
> Though it explains what "predominant" means in a long comment, it's
> absolutely unclear what the heck "chaste" is.
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>