Re: [Pharo-dev] GT tool request

2015-01-11 Thread Tudor Girba
Hi Stef,

Thanks a lot for the detailed report. Comments inline.



On Sun, Jan 11, 2015 at 9:11 PM, stepharo  wrote:

> Hi
>
> I found the blue rectangle morph painful because it blocks me when I want
> to freely edit expression and result.
> Would it be possible that when I type enter the blue rectangle text is
> paste in the pane below its expression.
>


We are debating this feature since quite a while and we indeed need to
settle on a solution. Esteban also wanted Enter, and I was more inclined
towards Cmd+v.

I opened an issue:
https://pharo.fogbugz.com/f/cases/14711/The-Playground-print-popper-should-allow-for-inserting-the-text-in-the-editor


Right now I have to copy and paste explictly and it not working. I hate so
> much this broken interaction
>

Indeed. The main use case considered for the popper (that is the name of
the widget) is to not get the original editor dirty. The current way to do
things is like this:
- Cmd+c
- Esc
- Right Arrow
- Cmd+v

Clearly not ideal.


Example
>
> (20@200) printString get blue rectangle
> press copy parentheses got hilighlited no idea why
>

There are two things here, and this is confusing right now in the Pharo
theme: The background of the popper has the same background as the text
selection:
https://pharo.fogbugz.com/f/cases/14712/The-print-popper-should-have-a-different-color-than-the-selection-in-the-default-Pharo-theme

The reason you see the parantheses selected is due to the smart parantheses
mechanism that I did not know how to suppress only for one text widget :(.



> then I press enter to go to the next line (my selection vanished of course
> because the magic things selected everything automatically)
>

The selection is the same as in the previous interface. For example, in a
basic Workspace, press Cmd+i without selecting anything and the whole like
will be selected. We cannot just erase the selection when we exit the
popper because sometimes you actually have an explicit selection that you
should not lose. But, coming to think about it, we should probably use the
highlighting mechanism for the text instead of the selection one. I will
look into this.



> and I can paste the result and start to edit it.

I sincerly hope that GT guys will understand and modify it because right
> now this is a show stopper to me.
> It breaks so badly interaction with texts.
>

We will fix this, but in the meantime, could you tell me the use case for
which you need to paste the text in the same editor? I am asking because I
would like to learn as I never need to do it. This is why the interface
does not support that action so I need to learn the use case :).

Cheers,
Doru



> Stef
>
>
>


-- 
www.tudorgirba.com

"Every thing has its own flow"


Re: [Pharo-dev] [Pharo4] Slots can now be saved with MC

2015-01-11 Thread Ben Coman
@Chris, That sounds like a balance response.  Its also been a while since I
read it, and probably time I read it again and to have a play with slots
(although last I heard it wasn't ready for prime time to do everything in
the paper.) While the cognitive load might go up, I don't think its
necessarily exponential.   They way I think about it (blurred since I last
read the paper) is that the assignment operator sort-of becomes a message
send that you can redefine, and the slots are like mini-classes with
limited scope - so there is a reuse of concepts.  The complexity for
grandma will all come down to the discoverability build into the tools -
like how debugging interacts with slots.  I don't think (and hope) it won't
be much harder than learning to work with both an instance & class-side,
and the difference between instance, class, class-instance and pool
variables.


On Mon, Jan 12, 2015 at 5:50 AM, Chris Muller  wrote:

> It has been a while since I read the paper, but my memory is that
> Slots lets you define features and/or constraints on inst-var's.  For
> example, assigning default values or restricting the set of valid
> values.
>
> This would probably be appealing for folks coming from languages like
> Java or C++, because they're used to all of their "slots" being
> statically typed.  It does seem ironic that where those static
> languages have been trying to move toward being more dynamic, Pharo
> newbies would find themselves arrived at a language which is trying to
> make something that was purely dynamic into something more static.
>
> My understanding is that specifying a certain Slot-type can save the
> need to write, i.e., initializing or validating methods.  In exchange,
> the number of concepts inherent in the language that must be learned
> and remembered is increased.  Standard Smalltalk is only about 2 or 3
> concepts -- sending messages and assigning pointers.  Period.  There's
> something exciting about that because even Grandma can grok 2 or 3
> concepts.  No other language is so simple.
>
> By introducing the implicit behaviors of slots, the number of
> different conceptual interactions between code and the slots it
> references increases exponentially with the number of slot-types.  I
> fear trying to explain them to Grandma will have her eyes starting to
> glaze...
>
> PS -- I hope no one would characterize me as "violently" against
> slots.  It may simply be my own ignorance..
>
> On Fri, Jan 9, 2015 at 1:50 PM, Eliot Miranda 
> wrote:
> >
> >
> > On Fri, Jan 9, 2015 at 11:47 AM, Marcus Denker 
> > wrote:
> >>
> >>
> >> > On 09 Jan 2015, at 16:45, Eliot Miranda 
> wrote:
> >> >
> >> > Hi Marcus,
> >> >
> >> >
> >> > P.S.  Maybe now Slots are ready for stealing by Squeak ;-)
> >>
> >> Everything I ever did for Pharo I wanted to do for Squeak… but I could
> not
> >> because
> >> someone was violently against it.
> >
> >
> > We will heal.  It may take a long time, but we will.  And things are
> going
> > great right now, especially for Pharo.  So I hope that your pain will
> ease
> > and that one day you will be free of it.  Hugs, and happy new year.  And
> > thanks for Slots and Opal and all the other wonderful things you do.
> >
> >> Marcus
> >>
> >>
> >
> >
> >
> > --
> > best,
> > Eliot
>
>


Re: [Pharo-dev] [squeak-dev] OSProcess stdErr issue on Windows

2015-01-11 Thread Thierry Goubier
2015-01-11 20:42 GMT+01:00 David T. Lewis :

> Thanks Ben,
>
>
> I copied ConfigurationOfOSProcess-ThierryGoubier.33 to the OSProcess
> repository. An update to ConfigurationOfOSProcess will be needed to
> get the latest version (Thierry, can you do this?).
>

Yes, I will.

Thierry


>
> For Squeak, no ConfigurationOfOSProcess is needed, just use the latest
> version (with SqueakMap, or currently it OSProcess-dtl.93 in the repo).
>
> Pharo should also use the latest version if possible, although the
> Metacello configurations are needed to make things work on various older
> Pharo versions. The versions for a current spec would be:
>
>   OSProcess-Base-dtl.46
>   OSProcess-Unix-dtl.20
>   OSProcess-Win32-dtl.12
>   OSProcess-Mac-dtl.2
>   OSProcess-OS2-dtl.2
>   OSProcess-RiscOS-dtl.2
>   OSProcess-AIO-dtl.8
>   Tests-OSProcess-dtl.21
>
> >
> > cheers -ben
> >
> > [1] https://pharo.fogbugz.com/default.asp?11615
>
> Thanks a lot for reporting this!
>
> Dave
>
>
>


Re: [Pharo-dev] [Pharo4] Slots can now be saved with MC

2015-01-11 Thread Chris Muller
It has been a while since I read the paper, but my memory is that
Slots lets you define features and/or constraints on inst-var's.  For
example, assigning default values or restricting the set of valid
values.

This would probably be appealing for folks coming from languages like
Java or C++, because they're used to all of their "slots" being
statically typed.  It does seem ironic that where those static
languages have been trying to move toward being more dynamic, Pharo
newbies would find themselves arrived at a language which is trying to
make something that was purely dynamic into something more static.

My understanding is that specifying a certain Slot-type can save the
need to write, i.e., initializing or validating methods.  In exchange,
the number of concepts inherent in the language that must be learned
and remembered is increased.  Standard Smalltalk is only about 2 or 3
concepts -- sending messages and assigning pointers.  Period.  There's
something exciting about that because even Grandma can grok 2 or 3
concepts.  No other language is so simple.

By introducing the implicit behaviors of slots, the number of
different conceptual interactions between code and the slots it
references increases exponentially with the number of slot-types.  I
fear trying to explain them to Grandma will have her eyes starting to
glaze...

PS -- I hope no one would characterize me as "violently" against
slots.  It may simply be my own ignorance..

On Fri, Jan 9, 2015 at 1:50 PM, Eliot Miranda  wrote:
>
>
> On Fri, Jan 9, 2015 at 11:47 AM, Marcus Denker 
> wrote:
>>
>>
>> > On 09 Jan 2015, at 16:45, Eliot Miranda  wrote:
>> >
>> > Hi Marcus,
>> >
>> >
>> > P.S.  Maybe now Slots are ready for stealing by Squeak ;-)
>>
>> Everything I ever did for Pharo I wanted to do for Squeak… but I could not
>> because
>> someone was violently against it.
>
>
> We will heal.  It may take a long time, but we will.  And things are going
> great right now, especially for Pharo.  So I hope that your pain will ease
> and that one day you will be free of it.  Hugs, and happy new year.  And
> thanks for Slots and Opal and all the other wonderful things you do.
>
>> Marcus
>>
>>
>
>
>
> --
> best,
> Eliot



[Pharo-dev] athens font rendering and subpixel antialiasing

2015-01-11 Thread Nicolai Hess
Anyone knows, why the text rendering with athens (cairo) looks slightly
different than the freetypeplugin one?

attached is a screenshot, left side athen right side (morphic)
freetypeplugin.

It "looks" like the cairo freetype fontrendering uses
CAIRO_ANTIALIAS_GRAY, no colored subpixel antialiasing.
But the font options do define antialiase subpixel and a subpixel ordering
RGB.

This is on windows 7 with the latest vm, does it look different on other
Systems?


nicolai


Re: [Pharo-dev] PNG in Artefact

2015-01-11 Thread stepharo

olivier
the problem with transparency is that it often depends on the printer 
driver (no joke) I once asked the people from omingraffle

and they told me that there is no standard.

Stef
Le 11/1/15 21:23, olivier auverlot a écrit :
In fact, the PNG is converted to JPEG image before to be included in 
the PDF file. But the conversion process doesn't support transparency 
and sets a black background. I think that is a limitation in the JPEG 
writer but someone have perhaps an idea to fix it.


Olivier ;-)

2015-01-11 21:11 GMT+01:00 Torsten Bergmann >:


> JPEG supports is degrading. Less and less good support.
>
> Le 11/1/15 18:04, Torsten Bergmann a écrit :
> >>> I improved Artefact this morning and added the support for
PNG files. It's now possible to use PDFPngElement to include a PNG
(untransparent) in a PDF file produced by Artefact.
> > Nice, what is the reason only untransparent PNGs work?

Thanks - but that was not my question. PNG graphics format can -
but must not
include transparency. When I understand the mail correct only
non-transparent
PNG images are supported with the new addition.

That's why I ask about transparent PNG.

Bye
T.






Re: [Pharo-dev] PNG in Artefact

2015-01-11 Thread olivier auverlot
In fact, the PNG is converted to JPEG image before to be included in the
PDF file. But the conversion process doesn't support transparency and sets
a black background. I think that is a limitation in the JPEG writer but
someone have perhaps an idea to fix it.

Olivier ;-)

2015-01-11 21:11 GMT+01:00 Torsten Bergmann :

> > JPEG supports is degrading. Less and less good support.
> >
> > Le 11/1/15 18:04, Torsten Bergmann a écrit :
> > >>> I improved Artefact this morning and added the support for PNG
> files. It's now possible to use PDFPngElement to include a PNG
> (untransparent) in a PDF file produced by Artefact.
> > > Nice, what is the reason only untransparent PNGs work?
>
> Thanks - but that was not my question. PNG graphics format can - but must
> not
> include transparency. When I understand the mail correct only
> non-transparent
> PNG images are supported with the new addition.
>
> That's why I ask about transparent PNG.
>
> Bye
> T.
>
>


[Pharo-dev] GT tool request

2015-01-11 Thread stepharo

Hi

I found the blue rectangle morph painful because it blocks me when I 
want to freely edit expression and result.
Would it be possible that when I type enter the blue rectangle text is 
paste in the pane below its expression.
Right now I have to copy and paste explictly and it not working. I hate 
so much this broken interaction


Example

(20@200) printString get blue rectangle
press copy parentheses got hilighlited no idea why
then I press enter to go to the next line (my selection vanished of 
course because the magic things selected everything automatically)

and I can paste the result and start to edit it.

I sincerly hope that GT guys will understand and modify it because right 
now this is a show stopper to me.

It breaks so badly interaction with texts.

Stef




Re: [Pharo-dev] PNG in Artefact

2015-01-11 Thread Torsten Bergmann
> JPEG supports is degrading. Less and less good support.
> 
> Le 11/1/15 18:04, Torsten Bergmann a écrit :
> >>> I improved Artefact this morning and added the support for PNG files. 
> >>> It's now possible to use PDFPngElement to include a PNG (untransparent) 
> >>> in a PDF file produced by Artefact.
> > Nice, what is the reason only untransparent PNGs work?

Thanks - but that was not my question. PNG graphics format can - but must not 
include transparency. When I understand the mail correct only non-transparent 
PNG images are supported with the new addition.

That's why I ask about transparent PNG.

Bye
T.



Re: [Pharo-dev] Woden on Windows?

2015-01-11 Thread Torsten Bergmann
Stef wrote
> You need to load latest version of OSWindow from what ronie told me.

Thanks, will try



Re: [Pharo-dev] CI nesting of XMLWriter >> writeWith:

2015-01-11 Thread stepharo

I do not know I just created the configuration for XMLWriter.

Stef

Le 11/1/15 16:10, Ben Coman a écrit :
I am having a look at some failing tests for CIXMLPublisherTest. This 
uses XMLWriter, which I haven't used before, so I'm looking for 
confirmation of the semantics I've guessed for #writeWith:.   It seems 
that #writeWith: should not be nested. Since...


xmlWriter := XMLWriter new.
xmlWriter writeWith: [ :writer |
writer
tag: 'report'
with: [
writer tag: 'name' with: 'TestName - Report'.
xmlWriter writeWith: [ :writer2 |
writer2 tag: 'finality' with: 'succeed'
]
]
]

...produces an error "CollectionIsEmpty: an OrderedCollection() is empty"

This pattern is the cause of 4 of the 8 tests for CIXMLPublisherTest 
to fail. In this case CIXMLPublisher >> publishValidationResult: does 
a #writeWith: then calls #publishSuccess: which does another #writeWith: .


That example was done on top of...
$ wget 
https://ci.inria.fr/pharo/job/Pharo-4.0-Issue-Tracker-Image/736/artifact/Pharo-4.0-Issue-Tracker-Image.zip

$ unzip *zip
$ wget --quiet -O - get.pharo.org/vmLatest 
 | bash

$ ./pharo-ui *.image

I have logged https://pharo.fogbugz.com/default.asp?14708

cheers -ben




Re: [Pharo-dev] Woden on Windows?

2015-01-11 Thread stepharo

You need to load latest version of OSWindow from what ronie told me.

Le 11/1/15 18:06, Torsten Bergmann a écrit :

Hi,

is woden 3D engine for Pharo working out of the box with Pharo 4 and
latest VM on Windows? As OSWindow is already integrated I do not know
if the load script still fits. Wanted to ask first.
What is required to load?

If so can we have a config in the config browser for easy access?

Thx
T.







Re: [Pharo-dev] PNG in Artefact

2015-01-11 Thread stepharo

JPEG supports is degrading. Less and less good support.

Le 11/1/15 18:04, Torsten Bergmann a écrit :

I improved Artefact this morning and added the support for PNG files. It's now 
possible to use PDFPngElement to include a PNG (untransparent) in a PDF file 
produced by Artefact.

Nice, what is the reason only untransparent PNGs work?

Thx
T.








Re: [Pharo-dev] Prepared Statements on PostgresV2?

2015-01-11 Thread Alain Rastoul

Le 11/01/2015 19:57, p...@highoctane.be a écrit :


Leboncoin.fr runs everything on it.

Interesting
I've been told biomerieux has some productions apps on it too.


Yeah, a beast.

Phil





--
Regards,

Alain




Re: [Pharo-dev] Prepared Statements on PostgresV2?

2015-01-11 Thread p...@highoctane.be
On Sun, Jan 11, 2015 at 6:41 PM, Alain Rastoul 
wrote:

> Le 11/01/2015 14:03, olivier auverlot a écrit :
>
>> Supporting open source database is the first step but you're right, we
>> must also propose a solution for proprietary databases. The difficulty
>> is to create an framework that proposes the ability to mix native driver
>> (as level 4 in JDBC) and driver wrappers for undocumented protocols.
>>
> Seeing how fast MS is trying to change,  perhaps wait a while and see how
> it comes (and may be they will open source Sql, I don't think but who
> knows).
> One could also look at the source code of the free jtds driver (it works
> very well) as a reference implementation and at the free tds docs.
>
> About Postgresql, I was joking at my very bad knowledge, but for the few I
> saw in docs, it seems to be a nice beast.
>

Leboncoin.fr runs everything on it.
Yeah, a beast.

Phil


> Sqlite and Postgresql are good choices IMHO, Mysql not sure but as there
> is already a smalltalk native driver IIRC, it may be not too difficult (and
> it seems to be fairly used too).
>
>>
>> As you, I'm a big fan of MSQL Server but keeps secret this information ;-)
>>
> Don't worry, I'll keep your secret secret :)
>
>>
>> Olivier
>>
>
> --
> Regards,
>
> Alain
>
>
>


--


Re: [Pharo-dev] Essay Topics

2015-01-11 Thread horrido
Please, is there anyone who cares to tackle, say, the question of concurrent
multi-core programming in Smalltalk? Or tooling vis-à-vis in the Java or C#
world? *We need more essays.*


horrido wrote
> I haven't heard from anyone else, which concerns me a little.
> 
> I remind everyone that this campaign is about you. Without your
> participation, it cannot succeed.
> 
> Just drop me a line and tell me which topic you're writing on. You may, if
> you wish, create a new topic, as well. My list of topics was chosen based
> on the concerns I heard from other developers. Thanks.
> horrido wrote
>> Our first essay (in response to Topic #2)!
>> http://smalltalkrenaissance.wordpress.com/2015/01/06/smalltalk-in-business-italian-style/
>> 
>>   
>> 
>> Please step up. We need more.
>> 
>> Thanks.
>> horrido wrote
>>> As promised, here is my first list of essay topics. I would like to ask
>>> you to submit an essay on one of these topics. Multiple submissions are
>>> welcome; if they're good, they will all get published at Smalltalk
>>> Renaissance.
>>> 
>>> I will edit the articles for grammar and style. You should look good
>>> after I'm done.
>>> 
>>> There's no deadline, but obviously the sooner you can write them, the
>>> better. SRP is a fast-moving campaign.
>>> 
>>> If you have other suggestions for essay topics, please let me know.
>>> 
>>> Without further ado, here are the topics...
>>> 
>>> 
>>> Topic #1:
>>> 
>>> How do modern IDEs, such as Eclipse and IntelliJ and Visual Studio,
>>> compare with the tried-and-true Smalltalk development environment?
>>> 
>>> -
>>> Topic #2:
>>> 
>>> It is the contention of some critics, including 
>>> Robert Martin   
>>> , that Smalltalk did not (does not?) address the needs of the
>>> enterprise. Present a counter-argument.
>>> 
>>> Explain how Smalltalk can assist the enterprise in team development, in
>>> large-scale development, and in integrating with existing (typically
>>> Windows-based) infrastructures.
>>> 
>>> Pay particular attention to the question of RDBMS usage, which is often
>>> critical in the enterprise.
>>> 
>>> -
>>> Topic #3:
>>> 
>>> Some critics complain that Smalltalk does not play well with existing
>>> file-based tooling. 
/
>>> Duh!
/
>>>  Smalltalk is a "new" approach to IDEs and software engineering. We
>>> should be advancing this paradigm with new tooling, rather than falling
>>> back on the old again and again. Otherwise, things will never change for
>>> the better.
>>> 
>>> Make a case for why we should embrace this change now, rather than
>>> waiting (for what?).
>>> 
>>> Also, this 
>>> webpage   
>>>  poses an interesting argument against Smalltalk. Perhaps someone can
>>> tackle it.
>>> 
>>> -
>>> Topic #4:
>>> 
>>> In the age of multi-core processors and concurrency programming, how is
>>> Smalltalk addressing the concerns of developers?
>>> 
>>> -
>>> Topic #5:
>>> 
>>> How should we address the issue of compatibility (ie, fragmentation)
>>> among various implementations of Smalltalk? Does this issue hamper the
>>> creation of an ecosystem of libraries and shared code?





--
View this message in context: 
http://forum.world.st/Essay-Topics-tp4797847p4798919.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.



Re: [Pharo-dev] PettitParser and Python

2015-01-11 Thread Thierry Goubier
2015-01-11 18:42 GMT+01:00 kilon alios :

> Thank you I have taken a look at SmaCC looks very interesting I also found
> some documentation for it via the link in github so I will study it now and
> be back with any further question :)
>

 Please do :)


> Its ok if the support is partial , something is always much better than
> nothing ;)
>

Well, I'd say the base is good; good enough that I'd use it professionally
for a project... Except that I don't have such a project at the moment (no
funding and too much to do on the ones which are paying), so this is why it
is in that "partial" state.

Thierry


>
> On Sun, Jan 11, 2015 at 6:17 PM, Thierry Goubier <
> thierry.goub...@gmail.com> wrote:
>
>> Hi Kilon, Stef,
>>
>> the SmaCC python parser is in the SmaCC repository on github.
>>
>> It should be loaded if you use the development version of SmaCC. Thanks
>> to past work on Python (and Damien and Jean-Baptiste help), there is a lot
>> of python code samples to test it ;) But, as far as I know, the AST
>> building code may not be complete.
>>
>> Thierry
>>
>>
>> 2015-01-11 12:25 GMT+01:00 stepharo :
>>
>>> Thierry goubier nicely helped us with a Parser (just parsing) python
>>> code with Smacc.
>>> I do not remember where we put the code.
>>>
>>> Stef
>>>
>>> Le 9/1/15 19:30, kilon alios a écrit :
>>>
 Hello guys I am learning PettitParser , I dowloaded the video tutorials
 of Tudor Girba (very good tutorial Tudor , well done )  and other
 documentation and I was wondering if a parser for Python already exists . I
 hope I am not asking something obvious.

 For my project I want to parse python types , that will be given to me
 as strings , to pharo objects. So that means parsing lists, dictionaries
 and other usual candidates. For example a python list is like

 '[1, 3, 50, [45, 'hello', 0.2], 63]'

 etc

 Anyone already worked on such problem ?



>>>
>>>
>>
>


Re: [Pharo-dev] PettitParser and Python

2015-01-11 Thread kilon alios
Thank you I have taken a look at SmaCC looks very interesting I also found
some documentation for it via the link in github so I will study it now and
be back with any further question :)

Its ok if the support is partial , something is always much better than
nothing ;)

On Sun, Jan 11, 2015 at 6:17 PM, Thierry Goubier 
wrote:

> Hi Kilon, Stef,
>
> the SmaCC python parser is in the SmaCC repository on github.
>
> It should be loaded if you use the development version of SmaCC. Thanks to
> past work on Python (and Damien and Jean-Baptiste help), there is a lot of
> python code samples to test it ;) But, as far as I know, the AST building
> code may not be complete.
>
> Thierry
>
>
> 2015-01-11 12:25 GMT+01:00 stepharo :
>
>> Thierry goubier nicely helped us with a Parser (just parsing) python code
>> with Smacc.
>> I do not remember where we put the code.
>>
>> Stef
>>
>> Le 9/1/15 19:30, kilon alios a écrit :
>>
>>> Hello guys I am learning PettitParser , I dowloaded the video tutorials
>>> of Tudor Girba (very good tutorial Tudor , well done )  and other
>>> documentation and I was wondering if a parser for Python already exists . I
>>> hope I am not asking something obvious.
>>>
>>> For my project I want to parse python types , that will be given to me
>>> as strings , to pharo objects. So that means parsing lists, dictionaries
>>> and other usual candidates. For example a python list is like
>>>
>>> '[1, 3, 50, [45, 'hello', 0.2], 63]'
>>>
>>> etc
>>>
>>> Anyone already worked on such problem ?
>>>
>>>
>>>
>>
>>
>


Re: [Pharo-dev] Prepared Statements on PostgresV2?

2015-01-11 Thread Alain Rastoul

Le 11/01/2015 14:03, olivier auverlot a écrit :

Supporting open source database is the first step but you're right, we
must also propose a solution for proprietary databases. The difficulty
is to create an framework that proposes the ability to mix native driver
(as level 4 in JDBC) and driver wrappers for undocumented protocols.
Seeing how fast MS is trying to change,  perhaps wait a while and see 
how it comes (and may be they will open source Sql, I don't think but 
who knows).
One could also look at the source code of the free jtds driver (it works 
very well) as a reference implementation and at the free tds docs.


About Postgresql, I was joking at my very bad knowledge, but for the few 
I saw in docs, it seems to be a nice beast.
Sqlite and Postgresql are good choices IMHO, Mysql not sure but as there 
is already a smalltalk native driver IIRC, it may be not too difficult 
(and it seems to be fairly used too).


As you, I'm a big fan of MSQL Server but keeps secret this information ;-)

Don't worry, I'll keep your secret secret :)


Olivier


--
Regards,

Alain




[Pharo-dev] Woden on Windows?

2015-01-11 Thread Torsten Bergmann
Hi,

is woden 3D engine for Pharo working out of the box with Pharo 4 and 
latest VM on Windows? As OSWindow is already integrated I do not know 
if the load script still fits. Wanted to ask first.
What is required to load?

If so can we have a config in the config browser for easy access?

Thx
T.



Re: [Pharo-dev] PNG in Artefact

2015-01-11 Thread Torsten Bergmann
> > I improved Artefact this morning and added the support for PNG files. It's 
> > now possible to use PDFPngElement to include a PNG (untransparent) in a PDF 
> > file produced by Artefact.

Nice, what is the reason only untransparent PNGs work?

Thx
T.




Re: [Pharo-dev] PNG in Artefact

2015-01-11 Thread Alexandre Bergel
Excellent!

Alexandre


> On Jan 11, 2015, at 10:43 AM, olivier auverlot  
> wrote:
> 
> I improved Artefact this morning and added the support for PNG files. It's 
> now possible to use PDFPngElement to include a PNG (untransparent) in a PDF 
> file produced by Artefact.
> 
> https://sites.google.com/site/artefactpdf/
> 
> Best regards
> Olivier ;-)

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






Re: [Pharo-dev] PettitParser and Python

2015-01-11 Thread Thierry Goubier
Hi Kilon, Stef,

the SmaCC python parser is in the SmaCC repository on github.

It should be loaded if you use the development version of SmaCC. Thanks to
past work on Python (and Damien and Jean-Baptiste help), there is a lot of
python code samples to test it ;) But, as far as I know, the AST building
code may not be complete.

Thierry

2015-01-11 12:25 GMT+01:00 stepharo :

> Thierry goubier nicely helped us with a Parser (just parsing) python code
> with Smacc.
> I do not remember where we put the code.
>
> Stef
>
> Le 9/1/15 19:30, kilon alios a écrit :
>
>> Hello guys I am learning PettitParser , I dowloaded the video tutorials
>> of Tudor Girba (very good tutorial Tudor , well done )  and other
>> documentation and I was wondering if a parser for Python already exists . I
>> hope I am not asking something obvious.
>>
>> For my project I want to parse python types , that will be given to me as
>> strings , to pharo objects. So that means parsing lists, dictionaries and
>> other usual candidates. For example a python list is like
>>
>> '[1, 3, 50, [45, 'hello', 0.2], 63]'
>>
>> etc
>>
>> Anyone already worked on such problem ?
>>
>>
>>
>
>


[Pharo-dev] CI nesting of XMLWriter >> writeWith:

2015-01-11 Thread Ben Coman
I am having a look at some failing tests for CIXMLPublisherTest. This uses
XMLWriter, which I haven't used before, so I'm looking for confirmation of
the semantics I've guessed for #writeWith:.   It seems that #writeWith:
should not be nested. Since...

xmlWriter := XMLWriter new.
xmlWriter writeWith: [ :writer |
writer
tag: 'report'
with: [
writer tag: 'name' with: 'TestName - Report'.
xmlWriter writeWith: [ :writer2 |
writer2 tag: 'finality' with: 'succeed'
]
]
]

...produces an error "CollectionIsEmpty: an OrderedCollection() is empty"

This pattern is the cause of 4 of the 8 tests for CIXMLPublisherTest to
fail. In this case CIXMLPublisher >> publishValidationResult: does a
#writeWith: then calls #publishSuccess: which does another #writeWith: .

That example was done on top of...
$ wget
https://ci.inria.fr/pharo/job/Pharo-4.0-Issue-Tracker-Image/736/artifact/Pharo-4.0-Issue-Tracker-Image.zip
$ unzip *zip
$ wget --quiet -O - get.pharo.org/vmLatest | bash
$ ./pharo-ui *.image

I have logged https://pharo.fogbugz.com/default.asp?14708

cheers -ben


[Pharo-dev] PNG in Artefact

2015-01-11 Thread olivier auverlot
I improved Artefact this morning and added the support for PNG files. It's
now possible to use PDFPngElement to include a PNG (untransparent) in a PDF
file produced by Artefact.

https://sites.google.com/site/artefactpdf/

Best regards
Olivier ;-)


Re: [Pharo-dev] Prepared Statements on PostgresV2?

2015-01-11 Thread olivier auverlot
Supporting open source database is the first step but you're right, we must
also propose a solution for proprietary databases. The difficulty is to
create an framework that proposes the ability to mix native driver (as
level 4 in JDBC) and driver wrappers for undocumented protocols.

As you, I'm a big fan of MSQL Server but keeps secret this information ;-)

Olivier

2015-01-11 13:00 GMT+01:00 Alain Rastoul :

> Hi Olivier,
>
> Native driver in Pharo is good news :)
>
> Lack of Sql server support is bad news (I invested a lot in it for a long
> time, and I'm a fan)
> but I'll go for postgresql, I think I should like it too,
> I created a table once and did a select with it (haha)
>
>
> Regards,
>
> Alain
>
> Le 11/01/2015 12:20, olivier auverlot a écrit :
>
>> Developping the database protocols in Pharo is simply the best solution
>> because Pharo is a cross-plateforms solution and it's necessary to have
>> cross-plateforms frameworks for it. This solution will facilitate the
>> deploiement of Pharo solutions because no configuration must be doing on
>> the hosts. The Pharo image must be simply be copied.
>>
>> But yes it's a big work and I think that the priorities must be done on
>> some databases servers as MySQL, Postgresql and SQLite. In the open
>> source world, the protocols are more accessibles and the communities can
>> help us.
>>
>> Olivier ;-)
>>
>> 2015-01-11 12:16 GMT+01:00 stepharo
>> > >:
>>
>>
>> thanks for the report.
>>
>> Stef
>>
>> Le 11/1/15 00:29, Stephan Eggermont a écrit :
>>
>>> Stef wrote:
>>> >Now I do not get it.
>>> >  Did you port it to Pharo?
>>>
>>> I spend about a day evaluating it in 40272.
>>> I looked at three packages (and their two test packages).
>>>
>>> PostgresV3-Core handles the V3 protocol, makes a connection
>>> using a socket, provides a result set with rows, columns and
>>> text converters.
>>>
>>> I got a few problems in the unit tests, looks like something in the
>>> way floats are handled is different
>>> (PG3SocketReadStream>>parseFloatLength:
>>> and there is a method missing PG3SocketReadStream>>
>>> parseScaledDecimal
>>>
>>> PostgresV3-Pool provides a connection pool.
>>>
>>> I was able to use that to connect to a database, execute queries
>>> and get
>>> data out of it. Issues there are trivial:
>>>
>>> PG3Connection>>md5HashMessage: aString
>>>
>>> ^Smalltalk globals
>>> at: #MD5
>>> ifPresent: [ :md5 | (md5 hashMessage: aString) hex asLowercase ]
>>> ifAbsent: [ WebUtils md5Digest: aString ]
>>>
>>> We don't have WebUtils, but we have MD5
>>>
>>> Then there is PostgresV3-CodeMirror.
>>>
>>> In PG3SchemaMirror there are some overrides to select a different
>>> compiler (+parser) and code highlighter. That allows subclasses
>>> to have plsql functions as methods, using the PG3FunctionMirror.
>>>
>>> In Pharo, I couldn't easily find how to change the
>>> code highlighter in Nautilus.
>>>
>>>
>>>
>>> The PG3Compiler just changes the parser used to PG3Parser.
>>> The PG3Parser is a subclass from the squeak parser and so uses
>>> some things that work a bit different
>>> PG3Parser>>checkSyntaxFor: uses a cue instance variable. It is not
>>> a full plsql parser, relying on the
>>> database to check syntax.
>>>
>>> PG3SchemaChanges uses Toolbuilder to show a window with the
>>> differences between the functions in the
>>> database and those in the image and select which ones to change.
>>>
>>> Stephan
>>>
>>>
>>>
>>>
>>
>>
>
>
>


Re: [Pharo-dev] Prepared Statements on PostgresV2?

2015-01-11 Thread Alain Rastoul

Hi Olivier,

Native driver in Pharo is good news :)

Lack of Sql server support is bad news (I invested a lot in it for a 
long time, and I'm a fan)

but I'll go for postgresql, I think I should like it too,
I created a table once and did a select with it (haha)


Regards,

Alain

Le 11/01/2015 12:20, olivier auverlot a écrit :

Developping the database protocols in Pharo is simply the best solution
because Pharo is a cross-plateforms solution and it's necessary to have
cross-plateforms frameworks for it. This solution will facilitate the
deploiement of Pharo solutions because no configuration must be doing on
the hosts. The Pharo image must be simply be copied.

But yes it's a big work and I think that the priorities must be done on
some databases servers as MySQL, Postgresql and SQLite. In the open
source world, the protocols are more accessibles and the communities can
help us.

Olivier ;-)

2015-01-11 12:16 GMT+01:00 stepharo
mailto:steph...@free.fr>>:

thanks for the report.

Stef

Le 11/1/15 00:29, Stephan Eggermont a écrit :

Stef wrote:
>Now I do not get it.
>  Did you port it to Pharo?

I spend about a day evaluating it in 40272.
I looked at three packages (and their two test packages).

PostgresV3-Core handles the V3 protocol, makes a connection
using a socket, provides a result set with rows, columns and
text converters.

I got a few problems in the unit tests, looks like something in the
way floats are handled is different
(PG3SocketReadStream>>parseFloatLength:
and there is a method missing PG3SocketReadStream>>parseScaledDecimal

PostgresV3-Pool provides a connection pool.

I was able to use that to connect to a database, execute queries
and get
data out of it. Issues there are trivial:

PG3Connection>>md5HashMessage: aString

^Smalltalk globals
at: #MD5
ifPresent: [ :md5 | (md5 hashMessage: aString) hex asLowercase ]
ifAbsent: [ WebUtils md5Digest: aString ]

We don't have WebUtils, but we have MD5

Then there is PostgresV3-CodeMirror.

In PG3SchemaMirror there are some overrides to select a different
compiler (+parser) and code highlighter. That allows subclasses
to have plsql functions as methods, using the PG3FunctionMirror.

In Pharo, I couldn't easily find how to change the
code highlighter in Nautilus.



The PG3Compiler just changes the parser used to PG3Parser.
The PG3Parser is a subclass from the squeak parser and so uses
some things that work a bit different
PG3Parser>>checkSyntaxFor: uses a cue instance variable. It is not
a full plsql parser, relying on the
database to check syntax.

PG3SchemaChanges uses Toolbuilder to show a window with the
differences between the functions in the
database and those in the image and select which ones to change.

Stephan












Re: [Pharo-dev] PharoExtras > ImageWorker access

2015-01-11 Thread Ben Coman
Thats good. Thanks Stef.

On Sun, Jan 11, 2015 at 7:14 PM, stepharo  wrote:

> Hi ben
>
> I added you to the pharoextras team.
> Can you verify if this is working for you?
>
> Stef
>
> Le 11/1/15 11:20, Ben Coman a écrit :
>
>
>> Can I get write access to PharoExtras > ImageWorker ?
>>
>> I have a fix to make tests work when there is a space in the path to the
>> VM.
>> https://pharo.fogbugz.com/default.asp?14707
>>
>> cheers -ben
>>
>
>
>


Re: [Pharo-dev] PettitParser and Python

2015-01-11 Thread stepharo
Thierry goubier nicely helped us with a Parser (just parsing) python 
code with Smacc.

I do not remember where we put the code.

Stef

Le 9/1/15 19:30, kilon alios a écrit :
Hello guys I am learning PettitParser , I dowloaded the video 
tutorials of Tudor Girba (very good tutorial Tudor , well done )  and 
other documentation and I was wondering if a parser for Python already 
exists . I hope I am not asking something obvious.


For my project I want to parse python types , that will be given to me 
as strings , to pharo objects. So that means parsing lists, 
dictionaries and other usual candidates. For example a python list is 
like


'[1, 3, 50, [45, 'hello', 0.2], 63]'

etc

Anyone already worked on such problem ?







Re: [Pharo-dev] PharoExtras > ImageWorker access

2015-01-11 Thread stepharo

Hi ben

I added you to the pharoextras team.
Can you verify if this is working for you?

Stef

Le 11/1/15 11:20, Ben Coman a écrit :


Can I get write access to PharoExtras > ImageWorker ?

I have a fix to make tests work when there is a space in the path to 
the VM.

https://pharo.fogbugz.com/default.asp?14707

cheers -ben





[Pharo-dev] PharoExtras > ImageWorker access

2015-01-11 Thread Ben Coman
Can I get write access to PharoExtras > ImageWorker ?

I have a fix to make tests work when there is a space in the path to the VM.
https://pharo.fogbugz.com/default.asp?14707

cheers -ben


Re: [Pharo-dev] Prepared Statements on PostgresV2?

2015-01-11 Thread Alain Rastoul


It was just a thought,  I also remembered that there was a problem with 
the single threaded approach of the VM. With ODBC FFI, it is very easy 
for a simple application to lock itself with two connections  with Sql 
server or Oracle.
I think it was a motivation for DbxTalk development : doing db calls in 
another thread, the same as it is for socket IO (perhaps it  could be 
done with nativeboost/odbc ?).


Developing native drivers (like type 4 jdbc drivers in java) in Pharo is 
probably a very good solution, but will require lot of work and multiple 
specific skills (probably someone developing-maintaining driver-x/db-x, 
another the driver-y/db-y and so on).



Regards,

Alain

Le 11/01/2015 09:29, stepharo a écrit :


Le 10/1/15 14:47, Alain Rastoul a écrit :

Hi,

Nice document, however, about ODBC support column,
looking at  and old (Pharo 1.3) image I have on my pc, I can see:
ODBCLibray>>moduleName
"Return the name of the module for this library"
SmalltalkImage current platformName = 'Win32' ifTrue: [ ^ 'odbc32' ].
SmalltalkImage current platformName = 'unix' ifTrue: [ ^
'libodbc.so' ].
^ self error: 'Don''t know the ODBC library name'
I thought odbc was supported under linux in the FFI ODBC package.

odbc rocks under windows, for non dotNet apps, (my opinion), and MS
has released an Mssql odbc driver for linux (They say they love linux
now :) ).

http://www.microsoft.com/en-us/download/details.aspx?id=28160

Oracle is also supported for 12 (I think at least since 10g)
https://docs.oracle.com/database/121/ODBCR/toc.htm#ODBCR101

Could it be interesting to re-investigate ODBC support ?


No idea :)
I'm not expert

Or DbxTalk is the Pharo standard (and it doesn't mind) ?


What oliier told me is that organizations reluctant to add extra
librariesto deploy app so
having some good native drivers would be better.

Stef


Regards,

Alain


Le 10/01/2015 11:32, stepharo a écrit :


Le 10/1/15 10:59, Stephan Eggermont a écrit :

Stef wrote:

May be this is the time to improve this package :)
I'm sorry I have no DB experience.
As part of the consortium agenda for this year we have
 - better ffi
 - better db support

Moving to Levente's PostgreSQLv3 and migrating that
might be a better idea. He has been using it in production
systems for a long time AFAIK.


when I meant db support it is not limited to one implementation.
Olivier Auverlot started to do a document listing all the solutions and
their status.
https://docs.google.com/spreadsheets/d/1uD6UFmwCJxAkOC9tlvdJsHtt10C0KHJ6Zp8WmfXpaR4/edit#gid=0


Add the information avout SQLv3

Now I do not get it.
  Did you port it to Pharo?


The code mirror is very interesting. Porting it needs
someone with close access to Opal/old compiler knowledge.
The way it works now in Squeak looks ideal for someone
with a PostgreSQL background. Using a code browser
to edit plsql, and having a directly mirrored smalltalk
class for each table.

http://forum.world.st/Status-of-PostgresV3-td4780110.html
I have verified that the connection works and that I can get
data out of postgres.
Missing:
- switch the code highlighter from smalltalk to one
for plsql in nautilus.
  - connect to glorp
- (later) add a real plsql parser (petitsql?)

Stephan
























Re: [Pharo-dev] Prepared Statements on PostgresV2?

2015-01-11 Thread stepharo


Le 10/1/15 14:47, Alain Rastoul a écrit :

Hi,

Nice document, however, about ODBC support column,
looking at  and old (Pharo 1.3) image I have on my pc, I can see:
ODBCLibray>>moduleName
"Return the name of the module for this library"
SmalltalkImage current platformName = 'Win32' ifTrue: [ ^ 'odbc32' ].
SmalltalkImage current platformName = 'unix' ifTrue: [ ^ 
'libodbc.so' ].

^ self error: 'Don''t know the ODBC library name'
I thought odbc was supported under linux in the FFI ODBC package.

odbc rocks under windows, for non dotNet apps, (my opinion), and MS 
has released an Mssql odbc driver for linux (They say they love linux 
now :) ).


http://www.microsoft.com/en-us/download/details.aspx?id=28160

Oracle is also supported for 12 (I think at least since 10g)
https://docs.oracle.com/database/121/ODBCR/toc.htm#ODBCR101

Could it be interesting to re-investigate ODBC support ?


No idea :)
I'm not expert

Or DbxTalk is the Pharo standard (and it doesn't mind) ?


What oliier told me is that organizations reluctant to add extra 
librariesto deploy app so

having some good native drivers would be better.

Stef


Regards,

Alain


Le 10/01/2015 11:32, stepharo a écrit :


Le 10/1/15 10:59, Stephan Eggermont a écrit :

Stef wrote:

May be this is the time to improve this package :)
I'm sorry I have no DB experience.
As part of the consortium agenda for this year we have
 - better ffi
 - better db support

Moving to Levente's PostgreSQLv3 and migrating that
might be a better idea. He has been using it in production
systems for a long time AFAIK.


when I meant db support it is not limited to one implementation.
Olivier Auverlot started to do a document listing all the solutions and
their status.
https://docs.google.com/spreadsheets/d/1uD6UFmwCJxAkOC9tlvdJsHtt10C0KHJ6Zp8WmfXpaR4/edit#gid=0 



Add the information avout SQLv3

Now I do not get it.
  Did you port it to Pharo?


The code mirror is very interesting. Porting it needs
someone with close access to Opal/old compiler knowledge.
The way it works now in Squeak looks ideal for someone
with a PostgreSQL background. Using a code browser
to edit plsql, and having a directly mirrored smalltalk
class for each table.

http://forum.world.st/Status-of-PostgresV3-td4780110.html
I have verified that the connection works and that I can get
data out of postgres.
Missing:
- switch the code highlighter from smalltalk to one
for plsql in nautilus.
  - connect to glorp
- (later) add a real plsql parser (petitsql?)

Stephan