Re: [Pharo-users] A Management Software Building Library in Pharo

2016-07-12 Thread Dimitris Chloupis
https://kilon.gitbooks.io/ephestos/content/introduction/introduction.pier.html

https://github.com/SquareBracketAssociates/PharoInProgress/tree/master/UnifiedFFI

http://www.smalltalkhub.com/#!/~JNIPort/JNIPort

https://github.com/bouraqadi/PharoJS


On Tue, Jul 12, 2016 at 4:43 AM lionelakue  wrote:

> Sorry for the small talk; sent on the fly.
>
>
> lionelakue wrote
> > Thanks everyone
> >
> > These are some examples to precise my question:
> > -software for human resources or shop inventory.
> > -IT asset or fleet management systems. These are used to register
> > equipments or cars inside companies and control their allocations.
> > abergel wrote
> >> There is roassal if you need to visualize data. I have seen people
> >> visualizing relations between software artifacts.
> > Thanks Alexandre.
> > I have just read through a chapter about Raossal. Very useful. Making
> high
> > level reports like monitoring screens(to track the managed elements
> > movements) easy.
> > jfabry wrote
> >> to build user interfaces I recommend that you use Spec. Many user
> >> interfaces in the standard Pharo image are written using it. I am
> >> currently writing documentation for it, here is the introductory
> chapter:
> > Thanks.
> > Sound very interesting, Johan. Can you give me a link where I can get the
> > library?
> > stepharo wrote
> >> to help people answering your question do you have some examples of
> >> management software you have in mind?
> >>
> >> if you need to connect to DB
> >>
> >>  - there is Glorp (which is a relational mapper) and now there is a
> >> new version and a nice documentation
> >>
> >>
> https://github.com/SquareBracketAssociates/PharoInProgress/tree/master/Glorp
> >> for the source
> >>
> >>
> https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/111/artifact/book-result/Glorp/
> >> for the pdf
> >>
> >>  - Esteban added support for Unqlite to Voyage (so you can deploy
> >> even more easily some small app).
> >>
> >> https://www.unqlite.org
> > Thanks Stef
> >
> > An ORM, Great! Now I remember, I have heard about Glorp but I thought it
> > was just a project.
> >
> > The Unqlite support is what I needed for one of my persistence strategy.
> > Because I knew Voyage Memory Repository or Image-Based Persistence could
> > be almost impossible in production.
> >
> > kilon.alios wrote
> >> If you don't mind some extra work and don't mind combining Pharo with
> >> other
> >> programming languages your options are titanic
> >>
> >> You can use any C/C++ library via UFFI
> >> You can use any Python library via my Atlas bridge
> >> You can use any Java library via JNIPort
> >> You can use any JavaScript library via PharoJS
> >>
> >> In the end it's completely up with to you and the way you like work.
> Just
> >> a
> >> matter of personal taste.
> > Thanks. I haven't thought about bridging other technos with Pharo before.
> > Do you know where I can get some documentation about these libraries? It
> > will be perfect for one project I have.
>
>
>
>
>
> --
> View this message in context:
> http://forum.world.st/A-Management-Software-Building-Library-in-Pharo-tp4905859p4906103.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Re: [Pharo-users] Image not starting

2016-07-12 Thread Mariano Martinez Peck
Hi Victor,

In addition to what Christophe said, you can do the following:

0) Start the VM from command line as you already do:

coral/pharo-vm/pharo coral/Pharo.image

1) get the pid of previous step

2) In the command line do:

 kill -SIGUSR1 XXX

That should output the smalltalk stacktrace in the stdout. And that might
give you an idea in which part it is hanging from the IMAGE side.

Hope this helps.


On Tue, Jul 12, 2016 at 10:33 AM, Valentin Ryckewaert <
valentin.ryckewa...@gmail.com> wrote:

> Hello everyone,
>
> I'm currently working on the project file policy and I'm having a problem
> that I don't understand
>
> I import my code, configure my image as readOnly (Pharo won't try to write
> on changesFiles,source,image), set the folder of the image in readonly
> and try to open the image again and it's not possible, I don't get any
> stacktrace so it's hard to understand the problem.
>
> PS : If we set back the folder in write mode, it's possible again to open
> the image again.
>
> Here is the code to reproduce the bug, could someone give me a clue please?
>
> sudo rm -r testPharo
> mkdir testPharo
> cd testPharo
>
> echo "Metacello new
> smalltalkhubUser: 'Uryon' project: 'Coral';
> configuration: 'Coral';
> version: #development;
> onConflictUseIncoming;
> load.
> SmalltalkImage configureSystemAsReadonlyAndQuit:true
> " >> load.st
>
> mkdir coral
> cd coral
> curl get.pharo.org/alpha | bash
> curl get.pharo.org/vm60 | bash
> pharo-vm/pharo Pharo.image ../load.st
> cd ..
> chmod -R -w coral
> coral/pharo-vm/pharo coral/Pharo.image
>
>


-- 
Mariano
http://marianopeck.wordpress.com


Re: [Pharo-users] SQLite + Pharo

2016-07-12 Thread Esteban A. Maringolo
I have no experience with SQLite other than for testing it on Glorp
and using it in Android (that provides a locking mechanism to queue
requests), but according to the documentation it depends on how the
SQLite connection is opened, if it is opened in "Serialized" mode [1],
then it is safe to have a multi threaded application operating on a
single db file. Also, according to the docs the access is controlled
by means of file locking [2], so if everything is finalized/closed
properly you shouldn't have this issue.

Regards!

[1] https://www.sqlite.org/threadsafe.html
[2] https://www.sqlite.org/howtocorrupt.html
Esteban A. Maringolo


2016-07-12 6:20 GMT-03:00 Alistair Grant :
>
> On 12/07/2016 10:19 AM, "Hilaire"  wrote:
>>
>> Hi,
>>
>> So what is it exactly regarding busy state of Sqlite?
>> The documentation is very short, to not say inexistant, on that specific
>> important matter.
>
> I also haven't read anything official, but my experience is that if the db
> is locked sqlite waits a while. If the db unlocks, the transaction succeeds,
> if not, an error is returned.
>
> Cheers,
> Alistair



Re: [Pharo-users] Image not starting

2016-07-12 Thread Christophe Demarey
I would try to run pharo through strace (http://linux.die.net/man/1/strace 
).
This way, you will probably see a system call trying to write to a file in 
read-only mode.

Hope this helps.
Christophe

> Le 12 juil. 2016 à 15:33, Valentin Ryckewaert  
> a écrit :
> 
> Hello everyone,
> 
> I'm currently working on the project file policy and I'm having a problem 
> that I don't understand
> 
> I import my code, configure my image as readOnly (Pharo won't try to write on 
> changesFiles,source,image), set the folder of the image in readonly and 
> try to open the image again and it's not possible, I don't get any stacktrace 
> so it's hard to understand the problem.
> 
> PS : If we set back the folder in write mode, it's possible again to open the 
> image again.
> 
> Here is the code to reproduce the bug, could someone give me a clue please?
> 
> sudo rm -r testPharo
> mkdir testPharo
> cd testPharo
> 
> echo "Metacello new 
>   smalltalkhubUser: 'Uryon' project: 'Coral';
>   configuration: 'Coral';
>   version: #development;
>   onConflictUseIncoming;
>   load.
>   SmalltalkImage configureSystemAsReadonlyAndQuit:true
> " >> load.st 
> 
> mkdir coral
> cd coral
> curl get.pharo.org/alpha  | bash 
> curl get.pharo.org/vm60  | bash 
> pharo-vm/pharo Pharo.image ../load.st  
> cd ..
> chmod -R -w coral
> coral/pharo-vm/pharo coral/Pharo.image
> 



[Pharo-users] Image not starting

2016-07-12 Thread Valentin Ryckewaert
Hello everyone,

I'm currently working on the project file policy and I'm having a problem
that I don't understand

I import my code, configure my image as readOnly (Pharo won't try to write
on changesFiles,source,image), set the folder of the image in readonly
and try to open the image again and it's not possible, I don't get any
stacktrace so it's hard to understand the problem.

PS : If we set back the folder in write mode, it's possible again to open
the image again.

Here is the code to reproduce the bug, could someone give me a clue please?

sudo rm -r testPharo
mkdir testPharo
cd testPharo

echo "Metacello new
smalltalkhubUser: 'Uryon' project: 'Coral';
configuration: 'Coral';
version: #development;
onConflictUseIncoming;
load.
SmalltalkImage configureSystemAsReadonlyAndQuit:true
" >> load.st

mkdir coral
cd coral
curl get.pharo.org/alpha | bash
curl get.pharo.org/vm60 | bash
pharo-vm/pharo Pharo.image ../load.st
cd ..
chmod -R -w coral
coral/pharo-vm/pharo coral/Pharo.image


Re: [Pharo-users] TextInputFieldModel selectAll, bug or feature ?

2016-07-12 Thread Nicolai Hess
2016-07-12 11:38 GMT+02:00 Marion Noirbent <
ms.noirb...@etudiant.univ-lille1.fr>:

> Hi,
>
> The message selectAll of TextInputFieldModel don't react like its super
> class TextModel (selectAll is not define in TextInputFieldModel).
>
> Is that a bug or a feature ?
>

A bug.

MorphicTextInputFieldAdapter needs to set the #setSelection: selector on
the PluggableTextFieldMorph.


>
>
> Reproduce:
>
> |example|
> example := TextInputFieldModel new.
> example text: 'dfghjklm'.
> example openWithSpec .
> example selectAll.
> example inspect
>
> selection have value (1 to: 0) (but appear like selected when its window
> is selected).
>
>
> Its super class:
>
> |example|
> example := TextModel new.
> example text: 'dfghjklm'.
> example openWithSpec .
> example selectAll.
> example inspect
>
> selection have value (1 to: 8)
>
>


[Pharo-users] TextInputFieldModel selectAll, bug or feature ?

2016-07-12 Thread Marion Noirbent
Hi,

The message selectAll of TextInputFieldModel don't react like its super
class TextModel (selectAll is not define in TextInputFieldModel).

Is that a bug or a feature ?


Reproduce:

|example|
example := TextInputFieldModel new.
example text: 'dfghjklm'.
example openWithSpec .
example selectAll.
example inspect

selection have value (1 to: 0) (but appear like selected when its window
is selected).


Its super class:

|example|
example := TextModel new.
example text: 'dfghjklm'.
example openWithSpec .
example selectAll.
example inspect

selection have value (1 to: 8)



Re: [Pharo-users] SQLite + Pharo

2016-07-12 Thread Alistair Grant
On 12/07/2016 10:19 AM, "Hilaire"  wrote:
>
> Hi,
>
> So what is it exactly regarding busy state of Sqlite?
> The documentation is very short, to not say inexistant, on that specific
> important matter.

I also haven't read anything official, but my experience is that if the db
is locked sqlite waits a while. If the db unlocks, the transaction
succeeds, if not, an error is returned.

Cheers,
Alistair


Re: [Pharo-users] SQLite + Pharo

2016-07-12 Thread Hilaire
Hi,

So what is it exactly regarding busy state of Sqlite?
The documentation is very short, to not say inexistant, on that specific
important matter.

I am just learning statement, it is nice the Pharo Sqlite pacakge comes
with it to avoid sql malware injection.

Thanks

Hilaire


Le 10/07/2016 17:04, Hilaire a écrit :
> Hi Esteban,
> 
> What is exactly thread safe from the Pharo perspective?
> Is Sqlite library handling the conflict of access, and put on wait an
> access not possible at a given moment, or does it signal it is busy?
> In the later case handling a wait may be necessary.
> 
> I'm planing to use sql to manage users, groups, etc, then Fuel for
> business model where concurrent access does not exist.
> 
> About Sql use with Smalltalk, I was looking for examples of best
> practice, but I did not find much.
> 
> Thanks
> 
> Hilaire
> 
> Le 10/07/2016 16:24, Esteban A. Maringolo a écrit :
>> > The SQLite shared library is thread safe by default, so you shouldn't
>> > worry about that.

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