Re: [Pharo-users] Traits, method flatten

2017-04-13 Thread Hilaire
What is your email address? I can't read it from the usenet forum.

Hilaire

Le 13/04/2017 à 08:53, Nicolai Hess a écrit :
> 
> I am interested, and I  think I already looked at this issue, I vaguely
> remember, that this has
> something to do with the determination of the origin of a method (trait
> methods that are from another trait
> are wrongly recognized as (trait)local methods).
> 

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




Re: [Pharo-users] Traits, method flatten

2017-04-13 Thread Hilaire
May be an important note, FileOut is handling just right the Traits logic.

Hilaire


Le 13/04/2017 à 08:53, Nicolai Hess a écrit :
> 
> I am interested, and I  think I already looked at this issue, I vaguely
> remember, that this has
> something to do with the determination of the origin of a method (trait
> methods that are from another trait
> are wrongly recognized as (trait)local methods).
> 

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




Re: [Pharo-users] Pharo 6 snap install

2017-04-13 Thread Stephane Ducasse
Thanks a lot for this effort!



On Wed, Apr 12, 2017 at 4:03 PM, Alistair Grant 
wrote:

> Hi Everyone,
>
> I've made a snap package for Pharo 6 which I think is far enough along
> for some wider testing.
>
> To get Pharo up and running on Ubuntu 16.04:
>
> # Install Pharo
> $ sudo snap install --edge pharo --classic
> # If your system isn't configured for threaded heartbeat:
> $ sudo pharo.config
> # Download the latest Pharo 6 image
> $ pharo.getimage
> # Go...
> $ pharo.ui Pharo.image
> # or:
> $ pharo Pharo.image eval 4+3
>
> To get a list of available commands:
>
> $ snap info pharo
>
>
> If you're on Debian or Ubuntu 14.04 you'll need to install snapd, see
> https://snapcraft.io/docs/core/install
>
>
> The VM is the threaded heartbeat, dated 201704101933.
>
> The installation flags are:
>
> --edge - The edge channel is for development versions.  It
>  progresses to beta, candidate and then stable.
> --classic - Snap packages are normally sandboxed for security
>  reasons.  Since Pharo is a development environment
>  in which we want to be able to run any executable,
>  or load any library, it is installed with access to
>  the entire system (as the running user).
>
> Why use snap packages?
>
> - They include all dependencies.  In particular, for the 32 bit
>   versions, this means that it isn't necessary to install all the 32 bit
>   architecture and associated dependencies.
> - Including dependencies means that there shouldn't be any problems with
>   incompatible library versions when upgrading.
>
> Why not use snap packages?
>
> - It's a relatively new technology, with a number of rough edges.
> - There may still be issues with its sandboxing that I haven't
>   discovered yet.
> - Please let me know of any others to be listed here.
> - Because the package uses classic confinement, it isn't
>   cross-distribution in practice (unfortunately).
>
> If you don't trust me to configure your system correctly (which requires
> sudo):
>
> - All the scripts that make up the sub-commands are visible, e.g.
>   pharo.config can be viewed at /snap/pharo/current/usr/bin/CONFIG
>
>
> The packaging code is at: https://github.com/akgrant43/pharo-snap
>
> I'm interested to know if people would like to see this eventually
> become a supported package format.
>
> Cheers,
> Alistair
>
>


Re: [Pharo-users] Pharo 6 snap install

2017-04-13 Thread Stephane Ducasse
Hi luke

We will do that. Now we are under stress for the release :)
And PharoDays. Great conference!
Stef

On Wed, Apr 12, 2017 at 4:57 PM, Luke Gorrie  wrote:

> On 12 April 2017 at 16:43, Offray Vladimir Luna Cárdenas <
> offray.l...@mutabit.com> wrote:
>
>> I'm also interested in the upcoming Nix package initiative that has been
>> announced in the list recently, which also deals with installing
>> dependencies in a Linux distribution neutral fashion.
>>
>
> This can only happen if the Pharo community somehow products a new release
> of the VM that I can package.
>
> The suggestion from the list was that I pick a commit from the
> pharo-project/pharo-vm#master branch, but I have browsed the commit history
> and that is way too much of a moving target for me to ship onwards to
> Nix/NixOS users.
>
> Pharo community: Please - somehow - make a new source release of your
> bloomin' VM!
>
>
>


Re: [Pharo-users] Machine Learning in Pharo

2017-04-13 Thread Stephane Ducasse
You have polymath.
Now I would like to code the code of the book collective intelligence if
you want to have a look.

Stef

On Thu, Apr 13, 2017 at 6:44 AM, frankl1_miky 
wrote:

> Hello everyone,
>
> I would like to experiment machine learning in Pharo.
>
> Is there any library out there for that purpose ?
>
> Thanks !
>
>
>
>
> --
> View this message in context: http://forum.world.st/Machine-
> Learning-in-Pharo-tp4941934.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Re: [Pharo-users] Machine Learning in Pharo

2017-04-13 Thread Serge Stinckwich
We have nothing at the moment at the level of Scikit-learn:
http://scikit-learn.org/stable/

but we have existing code in PolyMath: https://github.com/PolyMathOrg/PolyMath
Oleksandr talk about Machine Learning and Pharo recently:
http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2017-April/128549.html

Please join us in the PolyMath community:
https://groups.google.com/forum/#!forum/scismalltalk

Regards,

On Thu, Apr 13, 2017 at 6:44 AM, frankl1_miky
 wrote:
> Hello everyone,
>
> I would like to experiment machine learning in Pharo.
>
> Is there any library out there for that purpose ?
>
> Thanks !
>
>
>
>
> --
> View this message in context: 
> http://forum.world.st/Machine-Learning-in-Pharo-tp4941934.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>



-- 
Serge Stinckwich
UCN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/



Re: [Pharo-users] Pharo 6 snap install

2017-04-13 Thread Luke Gorrie
On 13 April 2017 at 12:20, Stephane Ducasse  wrote:

> We will do that.
>

Thank you! I will wait :).

Now we are under stress for the release :)
> And PharoDays. Great conference!
>

Thank you for explaining. I am new around here ("oh, are you working on a
release now?") so it helps me to have this kind of hint about short-term
issues (e.g. busy period) vs long term ones (e.g. no longer making source
releases of the VM for some reason.)


Re: [Pharo-users] Neural Networks in Pharo

2017-04-13 Thread Johann Hibschman
I definitely agree with this. Performance-wise, I expect it to be terrible
to model each individual neuron as an object. The logical unit (IMHO)
should be a layer of neurons, with matrix weights, vector biases, and
vector output.

Similarly, I think you'd be better off keeping the bias as a separate
value, rather than concatenating a 1 to the input vector. I know it's what
they do when presenting the math, but it means you'll be allocating a new
vector each time through.

Finally, I suspect that you'll eventually want to move the learning rate
(and maybe even the learn methods) out of the neuron and into a dedicated
"training"/"learning"/"optimizing" object. Perhaps overkill for the
perceptron, but for a multilayer network, you definitely want to control
the learning rate from the outside.

I've been working in TensorFlow, so my perceptions may be a bit colored by
that framework.

Cheers,
Johann

On Wed, Apr 12, 2017 at 10:45 AM Ben Coman  wrote:

>
>
> On Wed, Apr 5, 2017 at 8:27 AM, Oleksandr Zaytsev 
> wrote:
>
> Hello!
>
> Several weeks ago I've announced my NeuralNetworks project. Thank you very
> much for your ideas and feedback. As suggested, I wrote examples for every
> class and tested my perceptron on linearly-separable logical functions.
>
> I have just completed a post about my implementation of a single-layer
> perceptron:
> https://medium.com/@i.oleks/single-layer-perceptron-in-pharo-5b13246a041d.
> It has a detailed explanation of every part of the design and illustrates
> different approaches to implementation.
>
> Please, tell me what you think.
>
> Are my class diagrams correct or did I mess something up?
> Is there a design pattern that I should consider?
> Do you think that I should do something differently?
> Should I improve the quality of my code?
>
> Yours sincerely,
> Oleksandr
>
>
> Hi Oleks,
>
> (sorry for the delayed response. Saw you other post in pharo-dev and found
> this sitting in my drafts from last week.)
>
> Nice article and interesting read.  I only did NeuralNetworks in my
> undergrad 25 years ago so my knowledge is a bit vague.
> I think you design reasoning is fine for this stage.  Down the track you
> might consider that OO is about hiding implementation details. So just a
> vague idea, you might have SLPerceptron storing neuron data internally in
> arrays that a GPU can process efficiently, but when "SLPerceptron>>#at:" is
> asked for a neuron, it constructs a "real" neuron object, whose methods
> forward to the arrays in theSLPerceptron.
>
> cheers -ben
>


[Pharo-users] Methods & Classes using the command line.

2017-04-13 Thread nacho
Hi pharoers,

If I do the following in a minimal Pharo image, using the command line:

./Pharo --headless Pharo.image eval "Object subclass: #TestClass
instanceVariableNames: 'one' classVariableNames: '' package: 'IS-Test'."

I get the class created. However, if I try to pass the following argument to
eval:

"Object subclass: #TestClass instanceVariableNames: 'one'
classVariableNames: '' package: 'IS-Test'. TestClass compile:'one ^one'
classified: 'accessor'."

I get an UndefinedObject>>DoIt (TestClass is Undeclared).

At first I thought it could be that it takes sometime to compile the class,
so added some delay:

"Object subclass: #TestClass instanceVariableNames: 'one'
classVariableNames: '' package: 'IS-Test'. (Delay forSeconds: 5) wait.
TestClass compile:'one ^one' classified: 'accessor'."

But again: UndefinedObject>>DoIt (TestClass is Undeclared).

I even tried to do:

"Object subclass: #TestClass instanceVariableNames: 'one'
classVariableNames: '' package: 'IS-Test'. Smalltalk saveAndQuit."

and after that add only a method by passing:

"TestClass compile:'one ^one' classified: 'accessor'. Smalltalk
saveAndQuit."

But again: UndefinedObject>>DoIt (TestClass is Undeclared) 

How do I add a method to a class using the command line? 
Thanks in advance
Nacho



-
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
--
View this message in context: 
http://forum.world.st/Methods-Classes-using-the-command-line-tp4941977.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Export MongoDB to sql format

2017-04-13 Thread Asbath Sama biyalou via Pharo-users
--- Begin Message ---
Hello Everyone.

I think this is not the right place for this question. But I am doing a
work with Pharo.

I use MongoDB with Voyage. But I am asked to export my database in sql
format.

I want to know if there is a way to export mongoDB in sql.


Thanks.


Asbath


--- End Message ---


Re: [Pharo-users] Methods & Classes using the command line.

2017-04-13 Thread Guillermo Polito
Hi,

On Thu, Apr 13, 2017 at 6:57 PM, nacho <0800na...@gmail.com> wrote:

> Hi pharoers,
>
> If I do the following in a minimal Pharo image, using the command line:
>
> ./Pharo --headless Pharo.image eval "Object subclass: #TestClass
> instanceVariableNames: 'one' classVariableNames: '' package: 'IS-Test'."
>
> I get the class created. However, if I try to pass the following argument
> to
> eval:
>
> "Object subclass: #TestClass instanceVariableNames: 'one'
> classVariableNames: '' package: 'IS-Test'. TestClass compile:'one ^one'
> classified: 'accessor'."


> I get an UndefinedObject>>DoIt (TestClass is Undeclared).
>

The problem is that the entire code is compiled at the same time. So, when
the expression is compiled, the class TestClass does not exist yet. And
what you see is a compiler warning.

However, as soon as the class is created, the class is available to the
already compiled code and should work.

Moreover: if the TestClass was not created, you would have got an exception
"nil does not understand compile:classified:" ;)


>
> At first I thought it could be that it takes sometime to compile the class,
> so added some delay:
>
> "Object subclass: #TestClass instanceVariableNames: 'one'
> classVariableNames: '' package: 'IS-Test'. (Delay forSeconds: 5) wait.
> TestClass compile:'one ^one' classified: 'accessor'."
>
> But again: UndefinedObject>>DoIt (TestClass is Undeclared).
>
> I even tried to do:
>
> "Object subclass: #TestClass instanceVariableNames: 'one'
> classVariableNames: '' package: 'IS-Test'. Smalltalk saveAndQuit."
>
> and after that add only a method by passing:
>
> "TestClass compile:'one ^one' classified: 'accessor'. Smalltalk
> saveAndQuit."
>

This is strange because, the class is created and you're saving the
image... If I try:

./pharo Pharo.image eval "Object subclass: #TestClass
instanceVariableNames: 'one'
classVariableNames: '' package: 'IS-Test'. TestClass compile:'one ^one'
classified: 'accessor'. TestClass"

(note that I just aded *TestClass * at the end) I get the following output:

=>
UndefinedObject>>DoIt (TestClass is Undeclared)

UndefinedObject>>DoIt (TestClass is Undeclared)
TestClass

That is: two compiler warnings. + the class that is printed at the end.

So it's working well on my end, delta the confusing warnings.


> But again: UndefinedObject>>DoIt (TestClass is Undeclared)
>
> How do I add a method to a class using the command line?
> Thanks in advance
> Nacho
>
>
>
> -
> Nacho
> Smalltalker apprentice.
> Buenos Aires, Argentina.
> --
> View this message in context: http://forum.world.st/Methods-
> Classes-using-the-command-line-tp4941977.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Re: [Pharo-users] Machine Learning in Pharo

2017-04-13 Thread frankl1_miky
Sure, I would like

Le 13 avr. 2017 11:33 AM, "SergeStinckwich [via Smalltalk]" <
ml-node+s1294792n4941958...@n4.nabble.com> a écrit :

> We have nothing at the moment at the level of Scikit-learn:
> http://scikit-learn.org/stable/
>
> but we have existing code in PolyMath: https://github.com/
> PolyMathOrg/PolyMath
> Oleksandr talk about Machine Learning and Pharo recently:
> http://lists.pharo.org/pipermail/pharo-dev_lists.
> pharo.org/2017-April/128549.html
>
> Please join us in the PolyMath community:
> https://groups.google.com/forum/#!forum/scismalltalk
>
> Regards,
>
> On Thu, Apr 13, 2017 at 6:44 AM, frankl1_miky
> <[hidden email] >
> wrote:
>
> > Hello everyone,
> >
> > I would like to experiment machine learning in Pharo.
> >
> > Is there any library out there for that purpose ?
> >
> > Thanks !
> >
> >
> >
> >
> > --
> > View this message in context: http://forum.world.st/Machine-
> Learning-in-Pharo-tp4941934.html
> > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> >
>
>
>
> --
> Serge Stinckwich
> UCN & UMI UMMISCO 209 (IRD/UPMC)
> Every DSL ends up being Smalltalk
> http://www.doesnotunderstand.org/
>
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.world.st/Machine-Learning-in-Pharo-tp4941934p4941958.html
> To unsubscribe from Machine Learning in Pharo, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://forum.world.st/Machine-Learning-in-Pharo-tp4941934p4941981.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Machine Learning in Pharo

2017-04-13 Thread frankl1_miky
Sure I would like

Le 13 avr. 2017 11:26 AM, "Stephane Ducasse-3 [via Smalltalk]" <
ml-node+s1294792n4941957...@n4.nabble.com> a écrit :

> You have polymath.
> Now I would like to code the code of the book collective intelligence if
> you want to have a look.
>
> Stef
>
> On Thu, Apr 13, 2017 at 6:44 AM, frankl1_miky <[hidden email]
> > wrote:
>
>> Hello everyone,
>>
>> I would like to experiment machine learning in Pharo.
>>
>> Is there any library out there for that purpose ?
>>
>> Thanks !
>>
>>
>>
>>
>> --
>> View this message in context: http://forum.world.st/Machine-
>> Learning-in-Pharo-tp4941934.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>>
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.world.st/Machine-Learning-in-Pharo-tp4941934p4941957.html
> To unsubscribe from Machine Learning in Pharo, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://forum.world.st/Machine-Learning-in-Pharo-tp4941934p4941982.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Export MongoDB to sql format

2017-04-13 Thread Esteban Lorenzano

> On 13 Apr 2017, at 19:26, Asbath Sama biyalou via Pharo-users 
>  wrote:
> 
> 
> From: Asbath Sama biyalou 
> Subject: Export MongoDB to sql format
> Date: 13 April 2017 at 19:26:25 GMT+2
> To: Pharo users users 
> 
> 
> Hello Everyone.
> 
> I think this is not the right place for this question. But I am doing a
> work with Pharo.
> 
> I use MongoDB with Voyage. But I am asked to export my database in sql
> format.
> 
> I want to know if there is a way to export mongoDB in sql.

there is not. 
a nosql database will have problems to export its data as sql.
of course it can be done (as everything), but it is a manual task :S

cheers, 
Esteban


> 
> 
> Thanks.
> 
> 
> Asbath
> 
> 
> 
> 



Re: [Pharo-users] Methods & Classes using the command line.

2017-04-13 Thread Peter Uhnak
This should be similar to having the code in playground and executing it at 
once. I guess it's more forgiving.

What I sometimes do to work around it is to store the created class into 
variable, or use symbol and asClass cast

e.g.

cls := Object subclass: #TestClass.
cls compile:'meth'.

or

Object subclass: #TestClass.
#TestClass asClass compile:'meth'.

Peter


On Thu, Apr 13, 2017 at 07:39:24PM +0200, Guillermo Polito wrote:
> Hi,
> 
> On Thu, Apr 13, 2017 at 6:57 PM, nacho <0800na...@gmail.com> wrote:
> 
> > Hi pharoers,
> >
> > If I do the following in a minimal Pharo image, using the command line:
> >
> > ./Pharo --headless Pharo.image eval "Object subclass: #TestClass
> > instanceVariableNames: 'one' classVariableNames: '' package: 'IS-Test'."
> >
> > I get the class created. However, if I try to pass the following argument
> > to
> > eval:
> >
> > "Object subclass: #TestClass instanceVariableNames: 'one'
> > classVariableNames: '' package: 'IS-Test'. TestClass compile:'one ^one'
> > classified: 'accessor'."
> 
> 
> > I get an UndefinedObject>>DoIt (TestClass is Undeclared).
> >
> 
> The problem is that the entire code is compiled at the same time. So, when
> the expression is compiled, the class TestClass does not exist yet. And
> what you see is a compiler warning.
> 
> However, as soon as the class is created, the class is available to the
> already compiled code and should work.
> 
> Moreover: if the TestClass was not created, you would have got an exception
> "nil does not understand compile:classified:" ;)
> 
> 
> >
> > At first I thought it could be that it takes sometime to compile the class,
> > so added some delay:
> >
> > "Object subclass: #TestClass instanceVariableNames: 'one'
> > classVariableNames: '' package: 'IS-Test'. (Delay forSeconds: 5) wait.
> > TestClass compile:'one ^one' classified: 'accessor'."
> >
> > But again: UndefinedObject>>DoIt (TestClass is Undeclared).
> >
> > I even tried to do:
> >
> > "Object subclass: #TestClass instanceVariableNames: 'one'
> > classVariableNames: '' package: 'IS-Test'. Smalltalk saveAndQuit."
> >
> > and after that add only a method by passing:
> >
> > "TestClass compile:'one ^one' classified: 'accessor'. Smalltalk
> > saveAndQuit."
> >
> 
> This is strange because, the class is created and you're saving the
> image... If I try:
> 
> ./pharo Pharo.image eval "Object subclass: #TestClass
> instanceVariableNames: 'one'
> classVariableNames: '' package: 'IS-Test'. TestClass compile:'one ^one'
> classified: 'accessor'. TestClass"
> 
> (note that I just aded *TestClass * at the end) I get the following output:
> 
> =>
> UndefinedObject>>DoIt (TestClass is Undeclared)
> 
> UndefinedObject>>DoIt (TestClass is Undeclared)
> TestClass
> 
> That is: two compiler warnings. + the class that is printed at the end.
> 
> So it's working well on my end, delta the confusing warnings.
> 
> 
> > But again: UndefinedObject>>DoIt (TestClass is Undeclared)
> >
> > How do I add a method to a class using the command line?
> > Thanks in advance
> > Nacho
> >
> >
> >
> > -
> > Nacho
> > Smalltalker apprentice.
> > Buenos Aires, Argentina.
> > --
> > View this message in context: http://forum.world.st/Methods-
> > Classes-using-the-command-line-tp4941977.html
> > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> >
> >



Re: [Pharo-users] Pharo 6 snap install

2017-04-13 Thread Stephane Ducasse
We always try to have a major release around mid/end of april and this is
in addition we have pharodays + several people moving to new houses :).
And deadline for projects on top.

On Thu, Apr 13, 2017 at 12:39 PM, Luke Gorrie  wrote:

> On 13 April 2017 at 12:20, Stephane Ducasse 
> wrote:
>
>> We will do that.
>>
>
> Thank you! I will wait :).
>
> Now we are under stress for the release :)
>> And PharoDays. Great conference!
>>
>
> Thank you for explaining. I am new around here ("oh, are you working on a
> release now?") so it helps me to have this kind of hint about short-term
> issues (e.g. busy period) vs long term ones (e.g. no longer making source
> releases of the VM for some reason.)
>
>
>