Re: [Pharo-users] Ready to play guinea pig for UI improvements

2016-01-22 Thread Werner Kassens

On 01/22/2016 01:31 PM, Nicolai Hess wrote:

I think this is a problem of the way nautilus adds a breakpoint for
debugging the test.
(source code and byte code aren't in sync).


opened bug report 17455

werner



Re: [Pharo-users] Dynamic Typing > Static Typing? « games.greggman.com

2016-01-22 Thread Thierry Goubier

Le 22/01/2016 19:35, stepharo a écrit :



- Performance: for a compiler, having access to static types makes
compiling and performance optimisation a lot easier. This is my
current project (R compilation to heterogeneous targets) and I find
that type inference over R code is a hard (and interesting) subject.


Thierry you see what I would love to have is a R to Pharo :)


You have I think a lot of the pieces already... SciSmalltalk and 
Roassal. But I wouldn't bet the R interpreter isn't faster than Pharo on 
some stats and numerical code: linking with BLAS and the mkl can do 
wonders...


Now, what I'm working for is transparent heterogeneous GPU/Xeon Phi 
accelerated compute. I think the approach could be used for Pharo as 
well, but Eliot would be unhappy ;)


Thierry





Re: [Pharo-users] Dynamic Typing > Static Typing? « games.greggman.com

2016-01-22 Thread stepharo



Well spoken!

Free software became a business enabler thanks to the web. Back then, there was 
no web, no ability to build global communities pushing forward a shared 
artefact. I think that is no coincidence that the oldest language that is still 
mainstream is C, which was used to build Unix, which was used to build the web.

Now, let's do something awesome :-)


Yes :)
And business




Re: [Pharo-users] Dynamic Typing > Static Typing? « games.greggman.com

2016-01-22 Thread stepharo


- Performance: for a compiler, having access to static types makes 
compiling and performance optimisation a lot easier. This is my 
current project (R compilation to heterogeneous targets) and I find 
that type inference over R code is a hard (and interesting) subject.


Thierry you see what I would love to have is a R to Pharo :)




Re: [Pharo-users] (no subject)

2016-01-22 Thread stepharo

Hi asbath

I love your question :)
have a look at the tutorial of gemstone

http://seaside.gemtalksystems.com/tutorial/chapter12.pdf

Stef


Le 22/1/16 19:16, Asbath Sama biyalou via Pharo-users a écrit :




Re: [Pharo-users] Dr. Geo Swiss App Store

2016-01-22 Thread Hilaire
Hello Yuriy,

It is not anymore in the Apple store because I did not upload a new
build.  Apple automatically remove it if you don't after one year.

You can use the Android version however, it is still on the Google play
store.

The recent version of Dr. Geo (since 2013 I think) use the Athens
canvas, it is not yet supported by the VM for Android and iOS. Therefore
I had few interest to rebuild an aldready obsolete version of Dr. Geo
for iOS.


Hilaire

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




Re: [Pharo-users] [From StackOverflow] How to parse ndjson in Pharo with NeoJSON

2016-01-22 Thread MartinW
Sven Van Caekenberghe-2 wrote
> Well, it is quite a bit of data (I didn't look too deeply), 50.000 records
> of structured/nested data with quite a lot of strings. If each record is
> 1Kb, that makes 50Mb.
> 
> How do you measure your memory consumption ? What did you expect ?

I did only think about memory, when my first attempts to parse the file
reached the VM's memory limit, which seemed to be at ~500MB on OS X out of
the box. Then I did only watch the memory from outside, using OS X's
Activity Monitor and after I gave the VM more memory, the image grew up to
1.2 GB while parsing and inspecting the 80MB file. But I did not yet
investigate, were the memory went - perhaps it is all in the Inspector that
I opened to view the result :)


Sven Van Caekenberghe-2 wrote
> Right now, your JSON is parsed and the result is a combination of lists
> (Array) and maps (Dictionary). If you know/understand well what is inside
> it, and it is regular enough, you could try to build your own
> specialised/optimised data/domain model for it. NeoJSON can also parse
> directly to your objects, instead of the general ones (a process called
> mapping). This is some work, of course, and it might not be worth it,
> YMMV.

Yes, I have used mappings in the past. Here I was just toying with the New
York Public Library's Open Source data for a second...


Sven Van Caekenberghe-2 wrote
> Sven  
> 
>> I tried to parse with
>> PetitParser but the results were similar. I guess, i have to learn to
>> find
>> out were all the memory goes.
>> 
>> Best regards,
>> Martin.
>> 
>> 
>> 
>> Sven Van Caekenberghe-2 wrote
>>> (I don't do StackOverflow)
>>> 
>>> Reading the 'format' is easy, just keep on doing #next for each JSON
>>> expression (whitespace is ignored).
>>> 
>>> | data reader |
>>> data := '{"smalltalk": "cool"}
>>> {"pharo": "cooler"}'.
>>> reader := NeoJSONReader on: data readStream.
>>> Array streamContents: [ :out |
>>>  [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ].
>>> 
>>> Preventing intermediary data structures is easy too, use streaming.
>>> 
>>> | client reader data networkStream |
>>> (client := ZnClient new)
>>>  streaming: true;
>>>  url:
>>> 'https://github.com/NYPL-publicdomain/data-and-utilities/blob/master/items/pd_items_1.ndjson?raw=true';
>>>  get.
>>> networkStream := ZnCharacterReadStream on: client contents.
>>> reader := NeoJSONReader on: networkStream.
>>> data := Array streamContents: [ :out |
>>>  [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ].
>>> client close.
>>> data.
>>> 
>>> It took a couple of seconds, it is 80MB+ over the network for 50K items
>>> after all.
>>> 
>>> 
>>> 
>>> HTH,
>>> 
>>> Sven 
>>> 
>>> 
 On 21 Jan 2016, at 12:02, Esteban Lorenzano <
>> 
>>> estebanlm@
>> 
>>> > wrote:
 
 Hi, 
 
 there is a question I don’t know how to answer.
 
 http://stackoverflow.com/questions/34904337/how-to-parse-ndjson-in-pharo-with-neojson
 
 Transcript: 
 
 I want to parse ndjson (newline delimited json) data with NeoJSON on
 Pharo Smalltalk.
 
 ndjson data looks like this:
 
 {"smalltalk": "cool"}
 {"pharo": "cooler"}
 At the moment I convert my file stream to a string, split it on newline
 and then parse the single parts using NeoJSON. This seems to use an
 unnecessary (and extremely huge) amount of memory and time, probably
 because of converting streams to strings and vice-versa all the time.
 What would be an efficient way to do this task?
 
 
 Takers?
 Esteban
>>> 
>>> 
>>> 
>>> Screen Shot 2016-01-21 at 13.33.57.png (480K)
>>> ;
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://forum.world.st/From-StackOverflow-How-to-parse-ndjson-in-Pharo-with-NeoJSON-tp4873097p4873385.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.





--
View this message in context: 
http://forum.world.st/From-StackOverflow-How-to-parse-ndjson-in-Pharo-with-NeoJSON-tp4873097p4873399.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] [From StackOverflow] How to parse ndjson in Pharo with NeoJSON

2016-01-22 Thread Sven Van Caekenberghe

> On 22 Jan 2016, at 16:13, MartinW  wrote:
> 
> Thank you, Sven! (I asked the question on StackOverflow)
> 
> And also let me thank you for NeoJSON, NeoCSV and Zinc, which I use a lot
> and which are a joy to use! Also the documentation is very good and helps a
> lot.

Thanks, Martin.

> Your code works well and I save a bit of memory by avoiding intermediary
> data structures, but still this operation uses a lot more memory than I had
> expected (the example file I use is 80 MB).

Well, it is quite a bit of data (I didn't look too deeply), 50.000 records of 
structured/nested data with quite a lot of strings. If each record is 1Kb, that 
makes 50Mb.

How do you measure your memory consumption ? What did you expect ?

Right now, your JSON is parsed and the result is a combination of lists (Array) 
and maps (Dictionary). If you know/understand well what is inside it, and it is 
regular enough, you could try to build your own specialised/optimised 
data/domain model for it. NeoJSON can also parse directly to your objects, 
instead of the general ones (a process called mapping). This is some work, of 
course, and it might not be worth it, YMMV.

Sven  

> I tried to parse with
> PetitParser but the results were similar. I guess, i have to learn to find
> out were all the memory goes.
> 
> Best regards,
> Martin.
> 
> 
> 
> Sven Van Caekenberghe-2 wrote
>> (I don't do StackOverflow)
>> 
>> Reading the 'format' is easy, just keep on doing #next for each JSON
>> expression (whitespace is ignored).
>> 
>> | data reader |
>> data := '{"smalltalk": "cool"}
>> {"pharo": "cooler"}'.
>> reader := NeoJSONReader on: data readStream.
>> Array streamContents: [ :out |
>>  [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ].
>> 
>> Preventing intermediary data structures is easy too, use streaming.
>> 
>> | client reader data networkStream |
>> (client := ZnClient new)
>>  streaming: true;
>>  url:
>> 'https://github.com/NYPL-publicdomain/data-and-utilities/blob/master/items/pd_items_1.ndjson?raw=true';
>>  get.
>> networkStream := ZnCharacterReadStream on: client contents.
>> reader := NeoJSONReader on: networkStream.
>> data := Array streamContents: [ :out |
>>  [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ].
>> client close.
>> data.
>> 
>> It took a couple of seconds, it is 80MB+ over the network for 50K items
>> after all.
>> 
>> 
>> 
>> HTH,
>> 
>> Sven 
>> 
>> 
>>> On 21 Jan 2016, at 12:02, Esteban Lorenzano <
> 
>> estebanlm@
> 
>> > wrote:
>>> 
>>> Hi, 
>>> 
>>> there is a question I don’t know how to answer.
>>> 
>>> http://stackoverflow.com/questions/34904337/how-to-parse-ndjson-in-pharo-with-neojson
>>> 
>>> Transcript: 
>>> 
>>> I want to parse ndjson (newline delimited json) data with NeoJSON on
>>> Pharo Smalltalk.
>>> 
>>> ndjson data looks like this:
>>> 
>>> {"smalltalk": "cool"}
>>> {"pharo": "cooler"}
>>> At the moment I convert my file stream to a string, split it on newline
>>> and then parse the single parts using NeoJSON. This seems to use an
>>> unnecessary (and extremely huge) amount of memory and time, probably
>>> because of converting streams to strings and vice-versa all the time.
>>> What would be an efficient way to do this task?
>>> 
>>> 
>>> Takers?
>>> Esteban
>> 
>> 
>> 
>> Screen Shot 2016-01-21 at 13.33.57.png (480K)
>> ;
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://forum.world.st/From-StackOverflow-How-to-parse-ndjson-in-Pharo-with-NeoJSON-tp4873097p4873385.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.




Re: [Pharo-users] [From StackOverflow] How to parse ndjson in Pharo with NeoJSON

2016-01-22 Thread MartinW
Thank you, Sven! (I asked the question on StackOverflow)

And also let me thank you for NeoJSON, NeoCSV and Zinc, which I use a lot
and which are a joy to use! Also the documentation is very good and helps a
lot.

Your code works well and I save a bit of memory by avoiding intermediary
data structures, but still this operation uses a lot more memory than I had
expected (the example file I use is 80 MB). I tried to parse with
PetitParser but the results were similar. I guess, i have to learn to find
out were all the memory goes.

Best regards,
Martin.



Sven Van Caekenberghe-2 wrote
> (I don't do StackOverflow)
> 
> Reading the 'format' is easy, just keep on doing #next for each JSON
> expression (whitespace is ignored).
> 
> | data reader |
> data := '{"smalltalk": "cool"}
> {"pharo": "cooler"}'.
> reader := NeoJSONReader on: data readStream.
> Array streamContents: [ :out |
>   [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ].
> 
> Preventing intermediary data structures is easy too, use streaming.
> 
> | client reader data networkStream |
> (client := ZnClient new)
>   streaming: true;
>   url:
> 'https://github.com/NYPL-publicdomain/data-and-utilities/blob/master/items/pd_items_1.ndjson?raw=true';
>   get.
> networkStream := ZnCharacterReadStream on: client contents.
> reader := NeoJSONReader on: networkStream.
> data := Array streamContents: [ :out |
>   [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ].
> client close.
> data.
> 
> It took a couple of seconds, it is 80MB+ over the network for 50K items
> after all.
> 
> 
> 
> HTH,
> 
> Sven 
> 
> 
>> On 21 Jan 2016, at 12:02, Esteban Lorenzano <

> estebanlm@

> > wrote:
>> 
>> Hi, 
>> 
>> there is a question I don’t know how to answer.
>> 
>> http://stackoverflow.com/questions/34904337/how-to-parse-ndjson-in-pharo-with-neojson
>> 
>> Transcript: 
>> 
>> I want to parse ndjson (newline delimited json) data with NeoJSON on
>> Pharo Smalltalk.
>> 
>> ndjson data looks like this:
>> 
>> {"smalltalk": "cool"}
>> {"pharo": "cooler"}
>> At the moment I convert my file stream to a string, split it on newline
>> and then parse the single parts using NeoJSON. This seems to use an
>> unnecessary (and extremely huge) amount of memory and time, probably
>> because of converting streams to strings and vice-versa all the time.
>> What would be an efficient way to do this task?
>> 
>> 
>> Takers?
>> Esteban
> 
> 
> 
> Screen Shot 2016-01-21 at 13.33.57.png (480K)
> ;





--
View this message in context: 
http://forum.world.st/From-StackOverflow-How-to-parse-ndjson-in-Pharo-with-NeoJSON-tp4873097p4873385.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] (no subject)

2016-01-22 Thread Asbath Sama biyalou via Pharo-users
--- Begin Message ---
I want to know how to use sessions in seaside to manage identification of 
users. Thank you
--- End Message ---


Re: [Pharo-users] Use cases for methods with optional parameters

2016-01-22 Thread Jose San Leandro
Hi,

For the sake of simplifying APIs by not asking the client to provide
everything, and at the same time for the sake of not constraining other
clients with different use cases in which they need to provided all
parameters, I've often relied on that kind of ugly overloaded style. APIs
are difficult to change afterwards, so they have to be simple enough for
the expected use case, but flexible enough for unexpected use cases.

I'd vote +1 for optional parameters with default values.

2016-01-22 9:00 GMT+01:00 p...@highoctane.be :

> This would be nice to be able to use several different languages "ways of
> doing things" that would translate into message sends behind the scenes.
>
> Helvetia story...
>
> Phil
>
> On Thu, Jan 21, 2016 at 6:04 PM, Esteban A. Maringolo <
> emaring...@gmail.com> wrote:
>
>> 2016-01-21 8:38 GMT-03:00 Henrik Johansen :
>> >
>> >> On 20 Jan 2016, at 6:14 , Esteban A. Maringolo 
>> wrote:
>> >>
>> >>
>> >> I would be interested in the use cases and how to deal with
>> >> "undefined" arguments, will they be nil or other kind of undefined
>> >> object?
>>
>> > Perhaps
>> >
>> > request: aFile with: anotherThing and: aThirdThing
>> > 
>> > 
>> > ->
>> > request: aFile with: anotherThing
>> > ^self request: aFile with: anotherThing and: self
>> defaultThirdThing
>> > request: aFile and:: aThirdThing
>> > ^self request: aFile with: nil and: self aThirdThing
>> > request: aFile
>> > ^self request: aFile with: nil and: self defaultThirdThing
>>
>>
>> The pragma for the default unless it's a literal object it should be a
>> message send.
>>
>> I still have to see a good use case that could justify the use of
>> that. Because it also involves the message lookup, which AFAIK is
>> performed by the VM.
>>
>> Regards,
>>
>> Esteban A. Maringolo
>>
>>
>>
>


Re: [Pharo-users] Ready to play guinea pig for UI improvements

2016-01-22 Thread Werner Kassens

On 01/22/2016 01:31 PM, Nicolai Hess wrote:


I think this is a problem of the way nautilus adds a breakpoint for
debugging the test.
(source code and byte code aren't in sync).


ah, i understand
werner




Re: [Pharo-users] Ready to play guinea pig for UI improvements

2016-01-22 Thread Nicolai Hess
2016-01-22 13:26 GMT+01:00 Werner Kassens :

> On 01/22/2016 01:16 PM, Tudor Girba wrote:
>
> I do not understand this one. Could you describe more specifically the
>> scenario?
>>
>
> if i do a "debug test" in the contextmenu of "testGenericCharCall" (in
> FFIPluginTests) and press "restart" then "= 130" is highlighted.
> werner
>
>
>
I think this is a problem of the way nautilus adds a breakpoint for
debugging the test.
(source code and byte code aren't in sync).


Re: [Pharo-users] Ready to play guinea pig for UI improvements

2016-01-22 Thread Werner Kassens

On 01/22/2016 01:16 PM, Tudor Girba wrote:


I do not understand this one. Could you describe more specifically the scenario?


if i do a "debug test" in the contextmenu of "testGenericCharCall" (in 
FFIPluginTests) and press "restart" then "= 130" is highlighted.

werner




Re: [Pharo-users] Ready to play guinea pig for UI improvements

2016-01-22 Thread Tudor Girba
Hi,

> On Jan 22, 2016, at 12:53 PM, Werner Kassens  wrote:
> 
> On 01/22/2016 11:48 AM, Tudor Girba wrote:
>> Hi,
>> 
>> Yes. That is the type of input that we need.
>> 
>> It would be great if others would do the same.
> 
> Hi Doru,
> ok, i often use the debugger to test that some code actually does what i 
> intended:
> in the old one i click first on "stack top" and then click through the code 
> with "into" and "over" and simply watch the results in "stack top".
> with the new debugger "stack top" is gone, in the old one it was immediately 
> reachable, since it was very much on the top of that small pane (no 
> scrolling).

Thanks. Indeed, we will add stackTop and thisContext back. They were present 
when we first integrated, but some said they are not useful for them.

> additionally "into" and "over" became smaller buttons farther away from the 
> variables section, iow more difficult to hit while also watching the lower 
> pane. and btw if i do that on tests, the debugger does not really start at 
> the beginning of the test (also restart does not help),eg open a debugger in 
> 5.0 on FFIPluginTests>>testGenericCharCall and do a "restart": you are at the 
> very end of the test.

I do not understand this one. Could you describe more specifically the scenario?

Doru

> werner
> 

--
www.tudorgirba.com
www.feenk.com

"From an abstract enough point of view, any two things are similar."







Re: [Pharo-users] Ready to play guinea pig for UI improvements

2016-01-22 Thread Werner Kassens

On 01/22/2016 11:48 AM, Tudor Girba wrote:

Hi,

Yes. That is the type of input that we need.

It would be great if others would do the same.


Hi Doru,
ok, i often use the debugger to test that some code actually does what i 
intended:
in the old one i click first on "stack top" and then click through the 
code with "into" and "over" and simply watch the results in "stack top".
with the new debugger "stack top" is gone, in the old one it was 
immediately reachable, since it was very much on the top of that small 
pane (no scrolling). additionally "into" and "over" became smaller 
buttons farther away from the variables section, iow more difficult to 
hit while also watching the lower pane. and btw if i do that on tests, 
the debugger does not really start at the beginning of the test (also 
restart does not help),eg open a debugger in 5.0 on 
FFIPluginTests>>testGenericCharCall and do a "restart": you are at the 
very end of the test.

werner



Re: [Pharo-users] Ready to play guinea pig for UI improvements

2016-01-22 Thread Tudor Girba
Hi,

Yes. That is the type of input that we need.

It would be great if others would do the same.

Cheers,
Doru


> On Jan 22, 2016, at 11:42 AM, stepharo  wrote:
> 
> Hi guys
> 
> Many of you may bthink that I'm mad or whatever about new UI elements. 
> Sometimes this is true :)
> but most of the time not. I'm just going straight and (harsh) comments.
> So what I propose to the GT team is the following:
>I'm ready to be a guinea pig
>Each time they want I will record a screenflow of my interaction or 
> perception about new/different tools.
>I will follow a UI debugging  process an expert proposed: talking aloud 
> about my hypotheses while interacting and
>discovering the tools. I play that in the past with other people and it 
> works well.
> 
>I encourage other people to do the same to give feeback to GT team.
> 
> Stef
> 

--
www.tudorgirba.com
www.feenk.com

"Speaking louder won't make the point worthier."




[Pharo-users] Ready to play guinea pig for UI improvements

2016-01-22 Thread stepharo

Hi guys

Many of you may bthink that I'm mad or whatever about new UI elements. 
Sometimes this is true :)

but most of the time not. I'm just going straight and (harsh) comments.
So what I propose to the GT team is the following:
I'm ready to be a guinea pig
Each time they want I will record a screenflow of my interaction or 
perception about new/different tools.
I will follow a UI debugging  process an expert proposed: talking 
aloud about my hypotheses while interacting and
discovering the tools. I play that in the past with other people 
and it works well.


I encourage other people to do the same to give feeback to GT team.

Stef



Re: [Pharo-users] Problem to open Pharo 50 on Windows

2016-01-22 Thread Cyril Ferlicot
Hi,

For the latest Pharo 5 you need a new virtual machine: spur.

You can get it at http://files.pharo.org/get-files/50/pharo-win-stable.zip

To manage your images you can use the latest version of Pharo Launcher that
will choose the right VM if you give the paths in the settings.  (
http://www.smalltalkhub.com/#%21/%7EPharo/PharoLauncher)

--
Cyril

On Friday, January 22, 2016, Justine STIENNE 
wrote:

> Hi,
>
> I wanted to download the lastest version of Pharo 50 on this website:
> http://files.pharo.org/get-files/50/
> After having downloaded the lastest version for Windows
> (pharo-win-latest.zip) and the image in Pharo.zip, I try to to open the
> image with Pharo.exe but nothing appears, and the application never opened.
> Has anyone already had this problem and could help me ?
>
> Thank you,
> Justine
>


-- 
Cheers
Cyril Ferlicot


[Pharo-users] Problem to open Pharo 50 on Windows

2016-01-22 Thread Justine STIENNE
Hi,

I wanted to download the lastest version of Pharo 50 on this website:
http://files.pharo.org/get-files/50/
After having downloaded the lastest version for Windows
(pharo-win-latest.zip) and the image in Pharo.zip, I try to to open the
image with Pharo.exe but nothing appears, and the application never opened.
Has anyone already had this problem and could help me ?

Thank you,
Justine


Re: [Pharo-users] Use cases for methods with optional parameters

2016-01-22 Thread p...@highoctane.be
This would be nice to be able to use several different languages "ways of
doing things" that would translate into message sends behind the scenes.

Helvetia story...

Phil

On Thu, Jan 21, 2016 at 6:04 PM, Esteban A. Maringolo 
wrote:

> 2016-01-21 8:38 GMT-03:00 Henrik Johansen :
> >
> >> On 20 Jan 2016, at 6:14 , Esteban A. Maringolo 
> wrote:
> >>
> >>
> >> I would be interested in the use cases and how to deal with
> >> "undefined" arguments, will they be nil or other kind of undefined
> >> object?
>
> > Perhaps
> >
> > request: aFile with: anotherThing and: aThirdThing
> > 
> > 
> > ->
> > request: aFile with: anotherThing
> > ^self request: aFile with: anotherThing and: self
> defaultThirdThing
> > request: aFile and:: aThirdThing
> > ^self request: aFile with: nil and: self aThirdThing
> > request: aFile
> > ^self request: aFile with: nil and: self defaultThirdThing
>
>
> The pragma for the default unless it's a literal object it should be a
> message send.
>
> I still have to see a good use case that could justify the use of
> that. Because it also involves the message lookup, which AFAIK is
> performed by the VM.
>
> Regards,
>
> Esteban A. Maringolo
>
>
>