[Pharo-users] More info & examples on MAAdaptiveModel ?

2019-03-27 Thread Albrecht Baur via Pharo-users
--- Begin Message ---

Hi all,

I am looking for more info or usage examples of MAAdaptiveModel.

So far I found the following good resources:

 * The masters thesis of Lukas Renggli and the impl. of Pier:
   
http://sdmeta.gforge.inria.fr/Teaching/Lille/0910-MetaModelisation/Magritte/Reng06a.pdf
 * In the package Magritte-Tests-Model: The test MAAdaptiveModelTest

Could someone point me to more resources on MAAdaptiveModel if there are 
any?


Especially the topic searching / building search indexes on 
MAAdaptiveModel data stored e.g. in mongodb as voyage root would be 
helpful. -> How is the performance when searching on MAAdaptiveModel 
values with and without index ?


Hints would be nice!

Albrecht


--- End Message ---


[Pharo-users] ARM vm limitations ?

2019-03-18 Thread Albrecht Baur via Pharo-users
--- Begin Message ---
Hi, I'd like to play around with pharo on ARM devices (like a 
HummingBoard, the ones from ODROID or one of the beagleboards). But I am 
not sure if I have to take care of the ARM architecture version (ARMv6 / 
ARMv7 / ARMv8) when choosing my toy.


I found this vm:
http://files.pharo.org/vm/pharo-spur32/linux/armv6/
Is it only for armv6 like the folder name says or is ARMv7 and ARMv8 
working too?


Are there any limitations I should know before choosing a ARM device?

Is there a vm for 64bit (aarch64)?

Thanks!
Albrecht


--- End Message ---


Re: [Pharo-users] ldap, Pier3 & git migration

2019-03-08 Thread Albrecht Baur via Pharo-users
--- Begin Message ---

sorry for double posting in dev and users ...

I pushed it to

https://github.com/pharo-contributions/LDAP

There it fits better (and we have the 'pharo' at least inside the path...)

Best

Albrecht

On 08.03.19 15:05, Esteban Maringolo wrote:

I wasn't aware of LDAP support in Pharo. Thanks for porting it.

Wouldn't it be better to call the repo "pharo-ldap"?

When my repositories are Pharo specific and don't have a fancy project 
name I name them "pharo-something", e.g. "pharo-couchdb", 
"pharo-base58", "pharo-bip39mnemonic", etc.


Regards,

Esteban A. Maringolo


El vie., 8 mar. 2019 a las 8:45, Albrecht Baur via Pharo-users 
(mailto:pharo-users@lists.pharo.org>>) 
escribió:


Hi, In case someone can use it: I used Peters git migration tool
for ...
http://smalltalkhub.com/#!/~PharoExtras/LDAP/
... and put it to:
https://github.com/a2b-alb/PharoExtras-LDAP

I don't know if this is the right place or if you would rather
have it
under ...
https://github.com/pharo-contributions/
... or somewhere else.

- here the question:
I started trying to do the same migration process for ...
http://www.smalltalkhub.com/#!/~Pier/Pier3
... but I failed on errors loading older mcz files:

"instance of ByteString did not understand #peek"
on: MCMczReader >> contentsForMember:
(ZnInvalidUTF8: Illegal leading byte for utf-8 encoding)

Is this wrong encoding or corrupted files ?
How to treat these files ? -> Is just ignoring this majority of
failing
mcz files via migration ignoredFileNames: #()
ok ?

-
As a workaround I then left the history versions behind and took only
the newest mcz files. But I am not sure which package version "is in
harmony" with the other ones...  ;-)
-> While trying out which versions of the ConfigurationOfPier3
load in a
p7 image only the #stable one loaded without problems. The newer ones
didn't.

I did this by first loading as much pier3 dependencies (seaside,
magritte, ...) from the new github repos. So I can then say ...
onConflict: [ :e | e useLoaded ];
... when loading pier3 from smaltalkhub.

Can someone who knows pier3 better than me, give me a hint on which
package versions combinations are the ones to go with ?
-> Is to just start with the newest mcz files the way to go? Or
should I
use the #stable ConfigurationOfPier3 ?

best,
Albrecht


--- End Message ---


[Pharo-users] ldap, Pier3 & git migration

2019-03-08 Thread Albrecht Baur via Pharo-users
--- Begin Message ---

Hi, In case someone can use it: I used Peters git migration tool for ...
http://smalltalkhub.com/#!/~PharoExtras/LDAP/
... and put it to:
https://github.com/a2b-alb/PharoExtras-LDAP

I don't know if this is the right place or if you would rather have it 
under ...

https://github.com/pharo-contributions/
... or somewhere else.

- here the question:
I started trying to do the same migration process for ...
http://www.smalltalkhub.com/#!/~Pier/Pier3
... but I failed on errors loading older mcz files:

"instance of ByteString did not understand #peek"
on: MCMczReader >> contentsForMember:
(ZnInvalidUTF8: Illegal leading byte for utf-8 encoding)

Is this wrong encoding or corrupted files ?
How to treat these files ? -> Is just ignoring this majority of failing 
mcz files via migration ignoredFileNames: #()

ok ?

-
As a workaround I then left the history versions behind and took only 
the newest mcz files. But I am not sure which package version "is in 
harmony" with the other ones...  ;-)
-> While trying out which versions of the ConfigurationOfPier3 load in a 
p7 image only the #stable one loaded without problems. The newer ones 
didn't.


I did this by first loading as much pier3 dependencies (seaside, 
magritte, ...) from the new github repos. So I can then say ...

onConflict: [ :e | e useLoaded ];
... when loading pier3 from smaltalkhub.

Can someone who knows pier3 better than me, give me a hint on which 
package versions combinations are the ones to go with ?
-> Is to just start with the newest mcz files the way to go? Or should I 
use the #stable ConfigurationOfPier3 ?


best,
Albrecht


--- End Message ---


Re: [Pharo-users] OSProcess / OSSubprocess / LibC uniqueInstance

2019-02-19 Thread Albrecht Baur via Pharo-users
--- Begin Message ---

Nice! This helps -> thanks for the explanation.

Albrecht

On 19.02.19 21:10, Mariano Martinez Peck wrote:
Yeah, readme is out of date. 64 bits is working: 
https://github.com/pharo-contributions/OSSubprocess/issues/22


On Tue, Feb 19, 2019 at 4:48 PM Alistair Grant <mailto:akgrant0...@gmail.com>> wrote:


On Tue, 19 Feb 2019 at 13:45, Albrecht Baur via Pharo-users
mailto:pharo-users@lists.pharo.org>>
wrote:
>
> Thank you.
>
> The Metacello snippet helps. It loads a newer version than that
from the catalog browser.
>
>
> But 2 more questions:
>
> 1.: Is there a reason not to use just ...
>
> LibC uniqueInstance system: 'zip -r 123.zip zipme/'

You don't have the same level of control over the process, can't pipe
stdio, it introduces issues with interrupts (SIGINT, SIGQUIT), etc.


> And 2.: Is it ok to use OSSubprocess on in 64 bit images even
though the documentation says it doesn't work ? (but it does)
>
> -> https://github.com/pharo-contributions/OSSubprocess#installation

That's a surprise.  Yes, OSSubprocess is officially supported on 64
bits, the readme is out of date.

HTH,
Alistair



--
Mariano
https://twitter.com/MartinezPeck
http://marianopeck.wordpress.com
--- End Message ---


Re: [Pharo-users] OSProcess / OSSubprocess / LibC uniqueInstance

2019-02-19 Thread Albrecht Baur via Pharo-users
--- Begin Message ---

Thank you.

The Metacello snippet helps. It loads a newer version than that from the 
catalog browser.



But 2 more questions:

1.: Is there a reason not to use just ...

LibC uniqueInstance system: 'zip -r 123.zip zipme/'

... ?

And 2.: Is it ok to use OSSubprocess on in 64 bit images even though the 
documentation says it doesn't work ? (but it does)


-> https://github.com/pharo-contributions/OSSubprocess#installation


On 19.02.19 13:05, Serge Stinckwich wrote:

Thank you Thierry.

On Tue, Feb 19, 2019 at 12:48 PM Thierry Goubier 
mailto:thierry.goub...@gmail.com>> wrote:


Hi Serge, Albrecht,

loading OSProcess directly with the following expression works:

Metacello new
    configuration: 'OSProcess';
    repository: 'http://www.squeaksource.com/MetacelloRepository';
    load

There is still some work to be done on OSProcess adaptation to Pharo
7, but they are in rarely used parts.

Regards,

Thierry

Le mar. 19 févr. 2019 à 12:19, Albrecht Baur via Pharo-users
mailto:pharo-users@lists.pharo.org>>
a écrit :
>
> I need to execute OS commands from within a x64 pharo 7.01 image
on centos7 (for example: 'zip -r 123.zip zipme/').
>
> I found these 3 tools: OSProcess, OSSubprocess, LibC uniqueInstance
>
> But I did not find any docu on which one to use for which use case.
>
> OSProcess is in the catalog browser but fails loading because of
ByteArray>>ifNotNilDo:
> -> So OSProcess is not to be used with p7 ?
>
> OSSubprocess loads via catalog browser and the following snippet
works (even though 64 bit):
>
> OSSUnixSubprocess new
>     command: 'zip';
>     arguments: #('-r' '123.zip' 'zipme');
>     redirectStdout;
>     runAndWaitOnExitDo: [ :process :outString  |
>         outString inspect
>     ]
>
> So is it ok to use OSSubprocess with 64 bit even though
documented as 32 bit only ? (here:
https://github.com/pharo-contributions/OSSubprocess#installation)
>
> LibC uniqueInstance system: 'zip -r 123.zip zipme/'
> ... works, but I don't know if its the right tool for this.
>
> Is there somewhere more info on which tool to use for which use
case ?
>
> Thanks in advance!
>
> Albrecht
>
> PS.: I need to use zip as os process only because of this issue:
https://github.com/pharo-project/pharo/issues/2584



--
Serge Stinckwic
​h​

Int. Research Unit
 on Modelling/Simulation of Complex Systems (UMMISCO)
​Sorbonne University
 (SU)
French National Research Institute for Sustainable Development (IRD)​
U
​niversity of Yaoundé I​, Cameroun
"Programs must be written for people to read, and only incidentally 
for machines to execute."

https://twitter.com/SergeStinckwich

​
--- End Message ---


Re: [Pharo-users] Pier3 & content management

2019-02-19 Thread Albrecht Baur via Pharo-users
--- Begin Message ---

thanks for the info - I will give it a try next weeks.

On 19.02.19 12:41, Esteban Lorenzano wrote:

Hello,

Not many people are using it, but it should be not much problem make 
it run in Pharo 7 (and with current version of Seaside).


Esteban

On 19 Feb 2019, at 12:03, Albrecht Baur via Pharo-users 
mailto:pharo-users@lists.pharo.org>> wrote:



*From: *Albrecht Baur <mailto:baur.albre...@googlemail.com>>

*Subject: **Pier3 & content management*
*Date: *19 February 2019 at 12:03:27 CET
*To: *Any question about pharo is welcome 
mailto:pharo-users@lists.pharo.org>>



Hey,

what is the status of Pier3 + Pier3AddOns ?

-> Seems to me that it is discontinued since Pharo 5, right ?

I'm asking because I look around to see if there is a project usable 
as a starting point of a small web content management module for 
seaside (nothing too complicated / fancy).


Is there something besides Pier that goes into this direction ?

Thanks for hints,
Albrecht




--- End Message ---


Re: [Pharo-users] OSProcess / OSSubprocess / LibC uniqueInstance

2019-02-19 Thread Albrecht Baur via Pharo-users
--- Begin Message ---

I just tried the easy way via catalog browser.

I think it is OSProcess 4.6.9 from http://www.squeaksource.com/OSProcess

On 19.02.19 12:01, Serge Stinckwich wrote:



On Tue, Feb 19, 2019 at 11:56 AM David T. Lewis <mailto:le...@mail.msen.com>> wrote:


On Tue, Feb 19, 2019 at 11:37:38AM +0100, Albrecht Baur via
    Pharo-users wrote:
> From: Albrecht Baur mailto:baur.albre...@googlemail.com>>
> Subject: OSProcess / OSSubprocess / LibC uniqueInstance
> To: pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org>
> Date: Tue, 19 Feb 2019 11:37:38 +0100
>
> I need to execute OS commands from within a x64 pharo 7.01 image on
> centos7 (for example: 'zip -r 123.zip zipme/').
>
> I found these 3 tools: OSProcess, OSSubprocess, LibC uniqueInstance
>
> But I did not find any docu on which one to use for which use case.
>
>  * OSProcess is in the catalog browser but fails loading because of
>    ByteArray>>ifNotNilDo:
>    -> So OSProcess is not to be used with p7 ?

Hi Albrecht,

I am sorry that I cannot check it right now, but it may be that
ConfigurationOfOSProcess needs to be updated. The #ifNotNilDo: problem
was fixed by Thierry Goubier in July 2017, so perhaps you are using
an out of date version.

Hopefully someone else can give you a better answer, otherwise I will
try to follow up in a day or two.


I have the same problem of ifNotNilDo: when I load OSProcess in Pharo 7.
What version do you use ?
Regards,

--
Serge Stinckwic
h

Int. Research Unit
 on Modelling/Simulation of Complex Systems (UMMISCO)
Sorbonne University
 (SU)
French National Research Institute for Sustainable Development (IRD)
U
niversity of Yaoundé I, Cameroun
"Programs must be written for people to read, and only incidentally 
for machines to execute."

https://twitter.com/SergeStinckwich

--- End Message ---


[Pharo-users] Pier3 & content management

2019-02-19 Thread Albrecht Baur via Pharo-users
--- Begin Message ---

Hey,

what is the status of Pier3 + Pier3AddOns ?

-> Seems to me that it is discontinued since Pharo 5, right ?

I'm asking because I look around to see if there is a project usable as 
a starting point of a small web content management module for seaside 
(nothing too complicated / fancy).


Is there something besides Pier that goes into this direction ?

Thanks for hints,
Albrecht
--- End Message ---


[Pharo-users] OSProcess / OSSubprocess / LibC uniqueInstance

2019-02-19 Thread Albrecht Baur via Pharo-users
--- Begin Message ---
I need to execute OS commands from within a x64 pharo 7.01 image on 
centos7 (for example: 'zip -r 123.zip zipme/').


I found these 3 tools: OSProcess, OSSubprocess, LibC uniqueInstance

But I did not find any docu on which one to use for which use case.

 * OSProcess is in the catalog browser but fails loading because of
   ByteArray>>ifNotNilDo:
   -> So OSProcess is not to be used with p7 ?

 * OSSubprocess loads via catalog browser and the following snippet
   works (even though 64 bit):

OSSUnixSubprocess new
    command: 'zip';
    arguments: #('-r' '123.zip' 'zipme');
    redirectStdout;
    runAndWaitOnExitDo: [ :process :outString  |
        outString inspect
    ]

So is it ok to use OSSubprocess with 64 bit even though documented as 32 
bit only ? (here: 
https://github.com/pharo-contributions/OSSubprocess#installation)


 * LibC uniqueInstance system: 'zip -r 123.zip zipme/'
   ... works, but I don't know if its the right tool for this.

Is there somewhere more info on which tool to use for which use case ?

Thanks in advance!

Albrecht

PS.: I need to use zip as os process only because of this issue: 
https://github.com/pharo-project/pharo/issues/2584


--- End Message ---


Re: [Pharo-users] Why DirectoryIsNotEmpty on FileReference>>deleteAll ?

2019-02-07 Thread Albrecht Baur via Pharo-users
--- Begin Message ---

it is not urgent for me - I have a workaround.

So for me it can wait until the next stable is released.

Albrecht


On 07.02.19 09:58, Alistair Grant wrote:

Hi Esteban,

On Thu, 7 Feb 2019 at 09:41, Esteban Lorenzano  wrote:

Means we will need a new stable for Pharo 7/8 ?

Esteban

Albrecht will obviously be the one to say how urgent it is for him, or
whether he can get by with vmLatest80.  From my perspective: the issue
has been there "forever" (2010 or earlier) and has only just been
reported.  I expect that we'll eventually update the Pharo 7 VM
anyway, and this can probably wait until then.  Pharo 8 can wait as
well, for the same reasons.

Cheers,
Alistair




On 7 Feb 2019, at 09:23, Alistair Grant  wrote:

On Thu, 7 Feb 2019 at 09:08, Albrecht Baur  wrote:

Hi Alistair,

I have tested it and works with the latest VM.

Great, thanks for the confirmation.

Cheers,
Alistair




thanks,

Albrecht

On 07.02.19 07:56, Alistair Grant wrote:

Hi Albrecht,

On Wed, 6 Feb 2019 at 19:51, Albrecht Baur via Pharo-users
 wrote:

thank you! That is good news.

best,

Albrecht

Would you please download the latest VM and confirm that it resolves the issue:

curl get.pharo.org/64/vmLatest80 | bash

The Pharo 8 VM works with Pharo 7 images.

Thanks,
Alistair



On 06.02.19 09:34, Alistair Grant wrote:

Hi Albrecht,

On Tue, 5 Feb 2019 at 15:26, Albrecht Baur  wrote:

Hi Alistair,

here the system report output:

...

Thanks for the info.  Please see:

Issue: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/368
PR: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/371

Assuming the CI build passes, I'll wait a day or so to give the VM
guys a chance to review the changes and comment before merging.

Cheers,
Alistair





--- End Message ---


Re: [Pharo-users] Why DirectoryIsNotEmpty on FileReference>>deleteAll ?

2019-02-07 Thread Albrecht Baur via Pharo-users
--- Begin Message ---

Hi Alistair,

I have tested it and works with the latest VM.

thanks,

Albrecht

On 07.02.19 07:56, Alistair Grant wrote:

Hi Albrecht,

On Wed, 6 Feb 2019 at 19:51, Albrecht Baur via Pharo-users
 wrote:

thank you! That is good news.

best,

Albrecht

Would you please download the latest VM and confirm that it resolves the issue:

curl get.pharo.org/64/vmLatest80 | bash

The Pharo 8 VM works with Pharo 7 images.

Thanks,
Alistair



On 06.02.19 09:34, Alistair Grant wrote:

Hi Albrecht,

On Tue, 5 Feb 2019 at 15:26, Albrecht Baur  wrote:

Hi Alistair,

here the system report output:

...

Thanks for the info.  Please see:

Issue: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/368
PR: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/371

Assuming the CI build passes, I'll wait a day or so to give the VM
guys a chance to review the changes and comment before merging.

Cheers,
Alistair



--- End Message ---


Re: [Pharo-users] Why DirectoryIsNotEmpty on FileReference>>deleteAll ?

2019-02-06 Thread Albrecht Baur via Pharo-users
--- Begin Message ---

thank you! That is good news.

best,

Albrecht

On 06.02.19 09:34, Alistair Grant wrote:

Hi Albrecht,

On Tue, 5 Feb 2019 at 15:26, Albrecht Baur  wrote:

Hi Alistair,

here the system report output:

...

Thanks for the info.  Please see:

Issue: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/368
PR: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/371

Assuming the CI build passes, I'll wait a day or so to give the VM
guys a chance to review the changes and comment before merging.

Cheers,
Alistair



--- End Message ---


[Pharo-users] Why DirectoryIsNotEmpty on FileReference>>deleteAll ?

2019-02-01 Thread Albrecht Baur via Pharo-users
--- Begin Message ---
I get a DirectoryIsNotEmpty exception on 
FileReference(AbstractFileReference)>>deleteAll.


But deleteAll is supposed to delete children too. -> So why the exception ?

I can reproduce it with:

---

| sourceFolder deleteMeFolder numberOfRetries |

sourceFolder := '/network-drive-mounted-via-cifs/delme-tmpl/'.
deleteMeFolder := '/network-drive-mounted-via-cifs/delme/'.

"copy sourceFolder to deleteMeFolder:"
sourceFolder asFileReference copyAllTo: deleteMeFolder asFileReference .

"delete deleteMeFolder again:"
numberOfRetries := 0.
[    deleteMeFolder asFileReference deleteAll ] on: DirectoryIsNotEmpty 
do: [:ex|

    (numberOfRetries := numberOfRetries + 1) < 5
        ifTrue: [ ex retry ]    ].
Transcript crLog .
Transcript show: 'Retries: ', numberOfRetries asString .

---

---> numberOfRetries is now = 1 !

BUT: this only happens when sourceFolder and deleteMeFolder are on a 
network drive mounted via cifs.


(linux fstab entry like: //host/share /network-drive-mounted-via-cifs/ 
cifs credentials=...,uid=... 0 0 )


How do I handle such situations when working with the file library on 
network drives?


(My "retry on exception" workaround seems hackish to me.)

Thanks,

Albrecht




--- End Message ---