Re: [Pharo-users] Bytecodes in Nautilus

2015-04-02 Thread Marcus Denker

 On 01 Apr 2015, at 19:24, Clément Bera bera.clem...@gmail.com wrote:
 
 Seemingly, UI-wise, it was not good to have a button for the bytecode.
 
 As I use it al the time, I reintroduced it in the menu and you can use the 
 shortcut Cmd+b+b, which reportedly was better.
 
Yes, removing it from the menu was not a good idea...

 In other IDE tools that nautilus you can't see anymore the bytecodes though.
 

Yes, we need to streamline all the tools: We need these things to have *one* 
definition: adding it once should add
it to all tools.

 2015-04-01 8:06 GMT-07:00 Sean P. DeNigris s...@clipperadams.com 
 mailto:s...@clipperadams.com:
 Hmm... I found it in the method pane's context menu. What is the rationale
 for the change?
 
 
 
 -
 Cheers,
 Sean
 --
 View this message in context: 
 http://forum.world.st/Bytecodes-in-Nautilus-tp4816678p4816679.html 
 http://forum.world.st/Bytecodes-in-Nautilus-tp4816678p4816679.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
 
 



Re: [Pharo-users] OrderedCollection remove:

2015-04-02 Thread Sean P. DeNigris
BriceG wrote
 Hi,
 it depends on what is your goal but if you want to clean an
 OrderedCollection there's removeAll of if you want to remove specific item
 there's removeAllSuchThat:aBlock
 
 I had the following code working for your example:
 
 col := #(1 2 3 4 5) asOrderedCollection.
 a := col select:[:each| col includes:each].
 col removeAllSuchThat: [ :each| a includes:each ].
 col
 
 as you suggested, I'm creating a new collection with all the element I
 want to remove and then I remove each of its item from the first
 collection.
 
 Regards,
 
 
 
 --
 Brice Govin
 PhD student in RMoD research team at INRIA Lille
 Software Engineer at THALES AIR SYSTEMS Rungis
 ENSTA-Bretagne ENSI2014
 64 chemin des boeufs 91220 PALAISEAU
 
 De : Peter Uhnák [via Smalltalk] lt;

 ml-node+s1294792n4816822h94@.nabble

 gt;
 Envoyé : jeudi 2 avril 2015 08:11
 À : Brice GOVIN
 Objet : OrderedCollection remove:
 
 Hi,
 
 I've just run into quite a nasty surprise
 
 col := #(1 2 3 4 5) asOrderedCollection.
 col do: [ :each | col remove: each. ].
 col
 
 it throws NotFound: nil not found in OrderedCollection
 I tested it also in Pharo3 and there it just silently removed first, third
 and fifth element.
 
 Looking at the implementation of OrderedCollectiondo:  it seems that
 doing what I'm doing is a bad idea.
 
 So what shall one do:? col copy do: [...] ?
 
 Why can't do: be a bit smarter? Optimization?
 
 Thanks,
 Peter
 
 
 
 If you reply to this email, your message will be added to the discussion
 below:
 http://forum.world.st/OrderedCollection-remove-tp4816822.html
 To unsubscribe from Pharo Smalltalk Users, click
 herelt;http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codeamp;node=1310670amp;code=YnJpY2UuZ292aW5AZW5zdGEtYnJldGFnbmUub3JnfDEzMTA2NzB8MTQ0Nzk1ODcwOA==gt;.
 NAMLlt;http://forum.world.st/template/NamlServlet.jtp?macro=macro_vieweramp;id=instant_html%21nabble%3Aemail.namlamp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespaceamp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.namlgt;





-
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/OrderedCollection-remove-tp4816822p4816864.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] what to use for simple parsing

2015-04-02 Thread p...@highoctane.be
Sure works.

Regex

'((XXX Logical Channel) ([0-9])) on (((Upstream)|(Downstream)) ([0-9])) on
((chassis) ([0-9])), ((slot) ([0-9])), ((mac) ([0-9]))' asRegex

But in PP, things were more comple and there were a lot of them, so:

line
^ temperatureStatusDescrEntry token asParser
/ temperatureStatusValueEntry token asParser
/ temperatureThresholdEntry token asParser
/ temperatureLastShutdownEntry token asParser
/ temperatureStateEntry token asParser
and things like

temperatureStatusDescrEntry ^ temperatureStatusDescrOidPrefix, oidIndex,
space, equals, space, stringType, space, displayStringValue.

made my day much easier.

Especially when I had all the tokens I needed:

gauge32Type ^'Gauge32:' asParser flatten == [:str | #gauge32].


​Not sure it would have been as flexible with a SmaCC (I am not familiar
with SmaCC but used Lex/Yacc|Bison in another life).

Phil


Re: [Pharo-users] what to use for simple parsing

2015-04-02 Thread p...@highoctane.be
On Thu, Apr 2, 2015 at 9:45 AM, kilon alios kilon.al...@gmail.com wrote:

 depends on your needs. I never used regex before , pharo regex was my
 first. I used on a specific case that was quite simple. I love its
 simplicity and its extremely compact syntax. Perfect fit for my needs, one
 very happy customer :)

 I think it depends on complexity of the parsing and how you like to work,
 if you have a simple problem and want a compact syntax, nothing can beat
 regex. At least taking account SmaCC and PettitParser. When I need more
 complex parsing with nested syntax, SmaCC made a lot more sense.


PetitParser was great for what I wanted to do: parse SNMP results.
What was great was the ability to make one generic grammar and subclass
it with specific ones.

I used Regex at first to do the job but it turned into an unholy mess (not
that it couldn't parse what I needed) and PetitParser was there.

No SmaCC usage so far, so can't comment there.

Phil



 On Thu, Apr 2, 2015 at 4:31 AM, Martin Bähr 
 mba...@email.archlab.tuwien.ac.at wrote:

 Excerpts from stepharo's message of 2015-04-01 23:00:11 +0200:
  May be this was a mistake to get regexp.

 Some people, when confronted with a problem, think I know, I'll use
 regular
 expressions. Now they have two problems.
 (jwz)





[Pharo-users] OrderedCollection remove:

2015-04-02 Thread Peter Uhnák
Hi,

I've just run into quite a nasty surprise

col := #(1 2 3 4 5) asOrderedCollection.
col do: [ :each | col remove: each. ].
col

it throws NotFound: nil not found in OrderedCollection
I tested it also in Pharo3 and there it just silently removed first, third
and fifth element.

Looking at the implementation of OrderedCollectiondo:  it seems that
doing what I'm doing is a bad idea.

So what shall one do:? col copy do: [...] ?

Why can't do: be a bit smarter? Optimization?

Thanks,
Peter


Re: [Pharo-users] OrderedCollection remove:

2015-04-02 Thread Peter Uhnák
On Thu, Apr 2, 2015 at 8:30 AM, Joachim Tuchel jtuc...@objektfabrik.de
wrote:

 In general, removing from a Collection while iterating through it leads to
 undefined results. The same is true for adding.

That is a question of approach; apart from mentioned #copy I could also do
something like
~~~
col := #(1 2 3 4 5) asOrderedCollection.
[col isNotEmpty] whileTrue: [ col remove: col first ].
~~~
if I had an Iterator I could also reset it after each change.

What I am asking is what the best approach would be - I want do some
processing for each item and remove it from the collection after it is done.

Peter


Re: [Pharo-users] what to use for simple parsing

2015-04-02 Thread kilon alios
depends on your needs. I never used regex before , pharo regex was my
first. I used on a specific case that was quite simple. I love its
simplicity and its extremely compact syntax. Perfect fit for my needs, one
very happy customer :)

I think it depends on complexity of the parsing and how you like to work,
if you have a simple problem and want a compact syntax, nothing can beat
regex. At least taking account SmaCC and PettitParser. When I need more
complex parsing with nested syntax, SmaCC made a lot more sense.

On Thu, Apr 2, 2015 at 4:31 AM, Martin Bähr 
mba...@email.archlab.tuwien.ac.at wrote:

 Excerpts from stepharo's message of 2015-04-01 23:00:11 +0200:
  May be this was a mistake to get regexp.

 Some people, when confronted with a problem, think I know, I'll use
 regular
 expressions. Now they have two problems.
 (jwz)




Re: [Pharo-users] OrderedCollection remove:

2015-04-02 Thread p...@highoctane.be
On Thu, Apr 2, 2015 at 8:22 AM, Peter Uhnák i.uh...@gmail.com wrote:

 Hi,

 I've just run into quite a nasty surprise
 
 col := #(1 2 3 4 5) asOrderedCollection.
 col do: [ :each | col remove: each. ].
 col
 
 it throws NotFound: nil not found in OrderedCollection
 I tested it also in Pharo3 and there it just silently removed first, third
 and fifth element.

 Looking at the implementation of OrderedCollectiondo:  it seems that
 doing what I'm doing is a bad idea.

 So what shall one do:? col copy do: [...] ?


Yes, as a general rule, do not modify a collection you are iterating on,
so, doing col copy do: looks right.

removeAllSuchThat: aBlock
Evaluate aBlock for each element and remove all that elements from
the receiver for that aBlock evaluates to true.  Use a copy to enumerate
collections whose order changes when an element is removed (i.e. Sets).

self copy do: [:each | (aBlock value: each) ifTrue: [self remove: each]]

If the collection is huge, that can be an issue.


 Why can't do: be a bit smarter? Optimization?


If you have the group of things to remove you can do

aCollection removeAll: anotherCollection

Phil



 Thanks,
 Peter



Re: [Pharo-users] what to use for simple parsing

2015-04-02 Thread kilon alios
I used Regex at first to do the job but it turned into an unholy mess (not
that it couldn't parse what I needed) and PetitParser was there.

it really depends how you approach this. For example in my case I quickly
found out that would be insane to put everything in  a single string, so I
broke the single string to smaller ones and resynthesised it. Each string
had a very simple regex quite easy to read if one is familiar syntax.

And as Damien said you could extend String to a more flexible object, but
then you get in the realm of SmaCC/ PettitParser.

I chose SmaCC because it already offered solution to my problem. But for
the title of this thread simple parsing I think regex is a very good
choice depending on your demands.


Re: [Pharo-users] OrderedCollection remove:

2015-04-02 Thread p...@highoctane.be
On Thu, Apr 2, 2015 at 9:33 AM, Peter Uhnák i.uh...@gmail.com wrote:

 On Thu, Apr 2, 2015 at 8:30 AM, Joachim Tuchel jtuc...@objektfabrik.de
 wrote:

 In general, removing from a Collection while iterating through it leads
 to undefined results. The same is true for adding.

 That is a question of approach; apart from mentioned #copy I could also do
 something like
 ~~~
 col := #(1 2 3 4 5) asOrderedCollection.
 [col isNotEmpty] whileTrue: [ col remove: col first ].
 ~~~
 if I had an Iterator I could also reset it after each change.

 What I am asking is what the best approach would be - I want do some
 processing for each item and remove it from the collection after it is done.


If process indicates if it is worth removing the item
processed:= col select: [ :each |  col process: each ].
col removeAll: processed.

It is an interesting dicussion actually :-)

Phil





 Peter



Re: [Pharo-users] what to use for simple parsing

2015-04-02 Thread Damien Pollet
On 31 March 2015 at 17:17, Peter Uhnák i.uh...@gmail.com wrote:

 So at least to me PetitParser feels like a more practical regex library
 than Regex itself.


In which use-cases is Regex less practical?
I'm thinking it could get a builder with a PetitParser-like API in addition
to the current string syntax.


Re: [Pharo-users] OrderedCollection remove:

2015-04-02 Thread Joachim Tuchel
Peter,

In general, removing from a Collection while iterating through it leads to 
undefined results. The same is true for adding.

Just never do it

Joachim



 Am 02.04.2015 um 08:22 schrieb Peter Uhnák i.uh...@gmail.com:
 
 Hi,
 
 I've just run into quite a nasty surprise
 
 col := #(1 2 3 4 5) asOrderedCollection.
 col do: [ :each | col remove: each. ].
 col
 
 it throws NotFound: nil not found in OrderedCollection
 I tested it also in Pharo3 and there it just silently removed first, third 
 and fifth element.
 
 Looking at the implementation of OrderedCollectiondo:  it seems that doing 
 what I'm doing is a bad idea.
 
 So what shall one do:? col copy do: [...] ?
 
 Why can't do: be a bit smarter? Optimization?
 
 Thanks,
 Peter



[Pharo-users] Devnology presentation slides

2015-04-02 Thread Stephan Eggermont

Yesterday,

Diego and I presented Pharo at the Devnology meeting in Arnhem.

http://www.slideshare.net/StephanEggermont/pharo-devnology20150401

Stephan




Re: [Pharo-users] Oracle on Linux

2015-04-02 Thread Esteban A. Maringolo
My position is that OpenDBX as a library, independently of Pharo, is a dead
end. It might have been a good candidate in the past, but today it has no
real use.

But it is also true that for Pharo it is the only option you have to run it
on Linux.

Regards,

ps: I would also avoid Oracle altogether as well, but given the fact it
seems to be a requirement I didn't bring it to the discussion.
El abr 2, 2015 11:04 AM, Norbert Hartl norb...@hartl.name escribió:


 Am 02.04.2015 um 13:55 schrieb Esteban Lorenzano esteba...@gmail.com:


 On 02 Apr 2015, at 13:13, Norbert Hartl norb...@hartl.name wrote:


 Am 02.04.2015 um 12:52 schrieb Esteban A. Maringolo emaring...@gmail.com
 :

 I don't know if you need full fledged access or just to read a few tables.

 If it the latest you can use PostgreSQL Foreign Data Wrappers (FDW) and
 access the pgsql instance using the existing PGv2 driver.

 I know it might look convoluted, and maybe it is, but you avoid using DBX.

 I would also avoid using oracle which is a prerequisite, right? :) So DBX
 is to avoid? Sorry, I didn't care very much about SQL engines the last
 years.


 why DBX is to avoid?


 I don't know. I read the sentence I know it might look convoluted, and
 maybe it is, but you avoid using DBX. as avoiding DBX is something
 positive. So I want to know as well.

 in linux, it is your only chance for connecting to oracle (in windows you
 could also use odbc).
 and it should be working, AFAIK

 I'm fine with using DBX as long as it works. I understood also that it is
 one of the higher prioritized tasks for the consortium.

 Norbert


 Esteban


 Norbert

 Regards.

 Ps: FDW are amazing.
 El abr 2, 2015 6:07 AM, Norbert Hartl norb...@hartl.name escribió:

 I see from time to time topics like SQL popping up. Most of the time
 DBXTalk seems to be a requirement. It is also something that is considered
 necessary for a lot of people. Now have the need to access an oracle
 database. Is that possible? And if yes does it also work on linux?

 Norbert







Re: [Pharo-users] New success stories

2015-04-02 Thread Mariano Martinez Peck
On Thu, Apr 2, 2015 at 4:42 PM, Mariano Martinez Peck marianop...@gmail.com
 wrote:



 On Thu, Apr 2, 2015 at 4:05 PM, Hilaire hila...@drgeo.eu wrote:

 Hi Mariano,

 Chatting on IRC about Quuve.. We are curious about the
 look-like-desktop-application screenshot of Quuve.
 Is the screenshot from a web application or a Dekstop one? Based on Pharo?


 It's a desktop screenshot of multiple quuve. Quuve is web-based.
 However...if you take a look to the picture on the bottom-right (charts on
 the left and a table with inline-edit on the right), that is ONE quuve
 app/browser (note the upper menu is the same for both). This is because
 Quuve supports dual workspace and each workspace multiple tabs :)

 Is it clear?


Well..I am not sure about what do you mean by look like desktop. You mean
that the screenshot in fact has multiple browser windows opened? Then yes.
If you don't mean that, what do you mean?



 We will be writing some paragraphs about the technical details hope
 soon.

 Best,




 Thanks

 Hilaire

 Le 28/03/2015 16:39, Mariano Martinez Peck a écrit :
  Hi guys,
 
  I am part of the development of Quuve. The site is not yet online (it
  has been updated since a couple of weeks) but we were told it should
  be online these days... hope soon.
 
  If you have more questions, don't hesitate to ask!
 
  Best,
 
 

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






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




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


Re: [Pharo-users] Oracle on Linux

2015-04-02 Thread p...@highoctane.be
This discussion about database connectivity feels like the early days of
JDBC.

Things got solved when people wrote the type 4 drivers in Java, making it
all nice to use and all.

Given our resources, I doubt we can get there very fast. But maybe could we
leverage the Java work in a way or another.

Would it be possible to parse the Java code and have a kind of code
rewriter to target Pharo so that we could have those drivers?

Phil

On Fri, Apr 3, 2015 at 12:19 AM, Esteban A. Maringolo emaring...@gmail.com
wrote:

 My position is that OpenDBX as a library, independently of Pharo, is a
 dead end. It might have been a good candidate in the past, but today it has
 no real use.

 But it is also true that for Pharo it is the only option you have to run
 it on Linux.

 Regards,

 ps: I would also avoid Oracle altogether as well, but given the fact it
 seems to be a requirement I didn't bring it to the discussion.
 El abr 2, 2015 11:04 AM, Norbert Hartl norb...@hartl.name escribió:


 Am 02.04.2015 um 13:55 schrieb Esteban Lorenzano esteba...@gmail.com:


 On 02 Apr 2015, at 13:13, Norbert Hartl norb...@hartl.name wrote:


 Am 02.04.2015 um 12:52 schrieb Esteban A. Maringolo emaring...@gmail.com
 :

 I don't know if you need full fledged access or just to read a few tables.

 If it the latest you can use PostgreSQL Foreign Data Wrappers (FDW) and
 access the pgsql instance using the existing PGv2 driver.

 I know it might look convoluted, and maybe it is, but you avoid using DBX.

 I would also avoid using oracle which is a prerequisite, right? :) So DBX
 is to avoid? Sorry, I didn't care very much about SQL engines the last
 years.


 why DBX is to avoid?


 I don't know. I read the sentence I know it might look convoluted, and
 maybe it is, but you avoid using DBX. as avoiding DBX is something
 positive. So I want to know as well.

 in linux, it is your only chance for connecting to oracle (in windows you
 could also use odbc).
 and it should be working, AFAIK

 I'm fine with using DBX as long as it works. I understood also that it is
 one of the higher prioritized tasks for the consortium.

 Norbert


 Esteban


 Norbert

 Regards.

 Ps: FDW are amazing.
 El abr 2, 2015 6:07 AM, Norbert Hartl norb...@hartl.name escribió:

 I see from time to time topics like SQL popping up. Most of the time
 DBXTalk seems to be a requirement. It is also something that is considered
 necessary for a lot of people. Now have the need to access an oracle
 database. Is that possible? And if yes does it also work on linux?

 Norbert







[Pharo-users] Voyage performance issue

2015-04-02 Thread Josefina Arcidiacono
Hi!
I'm using Voyage with MongoDB.
I need to store an object with a large collection.
Since both are voyageRoot, there is a Mongo table with all the collection
objects and another with the first object pointing to them.
With 20,000 objects in the collection it's taking 30 min to save. 
¿Is that normal?

Josefina



--
View this message in context: 
http://forum.world.st/Voyage-performance-issue-tp4817087.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Spring CampSmalltalk

2015-04-02 Thread rjkwok
EstebanLM wrote
 you should subject your mail: Spring CampSmalltalk at Nanaimo, Columbia,
 Canada

For the sake of accuracy, that should be Nanaimo,* British* Columbia,
Canada. 


Sebastion Heidbrink wrote
 Please let us also know if you’re interested. 

Final exams finish on the 25th for me, and I'm just across the water in the
lower mainland. I'll see if I can catch the ferry over on the 26th and meet
you guys. I'm pretty new to Smalltalk/Pharo, but I'd love to see what you're
all making with it!



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



Re: [Pharo-users] OrderedCollection remove:

2015-04-02 Thread jtuc...@objektfabrik.de

Peter,

several approaches have been shown already. I'd like to add:

* Iterate over a copy and remove from the original (slower because of 
lookup in the original)
* If possible, sort the collection and use something like [col atEnd] 
whileTrue:/whileFalse: with removeFirst/removeLast

* Select: a collection of items to be removed and then do a removeAll:
* Use #- to remove one collection from the other
* Iterate over the original and add only the wanted objects to a new 
collection which will then be used in the future - Streams may be 
helpful here
* I have never used XStreams, but there may even be some nice options to 
find in it


HTH

Joachim



Am 02.04.15 um 09:33 schrieb Peter Uhnák:
On Thu, Apr 2, 2015 at 8:30 AM, Joachim Tuchel 
jtuc...@objektfabrik.de mailto:jtuc...@objektfabrik.de wrote:


In general, removing from a Collection while iterating through it
leads to undefined results. The same is true for adding.

That is a question of approach; apart from mentioned #copy I could 
also do something like

~~~
col := #(1 2 3 4 5) asOrderedCollection.
[col isNotEmpty] whileTrue: [ col remove: col first ].
~~~
if I had an Iterator I could also reset it after each change.

What I am asking is what the best approach would be - I want do some 
processing for each item and remove it from the collection after it is 
done.


Peter




Re: [Pharo-users] Oracle on Linux

2015-04-02 Thread Esteban A. Maringolo
I don't know if you need full fledged access or just to read a few tables.

If it the latest you can use PostgreSQL Foreign Data Wrappers (FDW) and
access the pgsql instance using the existing PGv2 driver.

I know it might look convoluted, and maybe it is, but you avoid using DBX.

Regards.

Ps: FDW are amazing.
El abr 2, 2015 6:07 AM, Norbert Hartl norb...@hartl.name escribió:

 I see from time to time topics like SQL popping up. Most of the time
 DBXTalk seems to be a requirement. It is also something that is considered
 necessary for a lot of people. Now have the need to access an oracle
 database. Is that possible? And if yes does it also work on linux?

 Norbert



Re: [Pharo-users] what to use for simple parsing

2015-04-02 Thread Thierry Goubier
2015-04-02 11:49 GMT+02:00 p...@highoctane.be p...@highoctane.be:

 Sure works.

 Regex

 '((XXX Logical Channel) ([0-9])) on (((Upstream)|(Downstream)) ([0-9])) on
 ((chassis) ([0-9])), ((slot) ([0-9])), ((mac) ([0-9]))' asRegex

 But in PP, things were more comple and there were a lot of them, so:

 line
 ^ temperatureStatusDescrEntry token asParser
 / temperatureStatusValueEntry token asParser
 / temperatureThresholdEntry token asParser
 / temperatureLastShutdownEntry token asParser
 / temperatureStateEntry token asParser
 and things like

 temperatureStatusDescrEntry ^ temperatureStatusDescrOidPrefix, oidIndex,
 space, equals, space, stringType, space, displayStringValue.

 made my day much easier.

 Especially when I had all the tokens I needed:

 gauge32Type ^'Gauge32:' asParser flatten == [:str | #gauge32].


 Not sure it would have been as flexible with a SmaCC (I am not familiar
 with SmaCC but used Lex/Yacc|Bison in another life).


SmaCC is a lot (and I mean a lot) simpler than Flex/bison, especially for
the interaction between Flex and Bison (in short, SmaCC infer all the
token/keyword stuff as well as the api between the two objects, behaving
like a scannerless system).

For everything like keywords, for example, you don't even bother with the
token:

Gauge32Type: Gauge32: { #gauge32 } ;

And of course you would:

TemperatureStatusDescrEntry : TemperatureStatusDescrOidPrefix OidIndex
Space = Space StringType Space DisplayStringValue

(Everytime I read PetitParser code, I see the SmaCC grammar, usually in a
more verbose form (asParser, asToken)... )

Some of the benefits of SmaCC are not that obvious in fact. Coming from the
Flex/Bison world, what is striking is the multithreading ability of the
SmaCC parser infrastructure: they have no global/shared space and you can
create as many instances of them as you like, as often as you like... A
second benefit, but harder to use, is the AST node automatic generation,
with the api, an equality and visitors: this makes all the code appearing
behind an SmaCC parser very regular.

However, if you derive on a regular basis grammars, the SmaCC API is not
designed for that. It could do it (you could maybe include other grammars,
for example), but nobody has expressed that need :)

Thierry


Re: [Pharo-users] what to use for simple parsing

2015-04-02 Thread kilon alios
yeap you use what makes your life easier ;)

On Thu, Apr 2, 2015 at 12:49 PM, p...@highoctane.be p...@highoctane.be
wrote:

 Sure works.

 Regex

 '((XXX Logical Channel) ([0-9])) on (((Upstream)|(Downstream)) ([0-9])) on
 ((chassis) ([0-9])), ((slot) ([0-9])), ((mac) ([0-9]))' asRegex

 But in PP, things were more comple and there were a lot of them, so:

 line
 ^ temperatureStatusDescrEntry token asParser
 / temperatureStatusValueEntry token asParser
 / temperatureThresholdEntry token asParser
 / temperatureLastShutdownEntry token asParser
 / temperatureStateEntry token asParser
 and things like

 temperatureStatusDescrEntry ^ temperatureStatusDescrOidPrefix, oidIndex,
 space, equals, space, stringType, space, displayStringValue.

 made my day much easier.

 Especially when I had all the tokens I needed:

 gauge32Type ^'Gauge32:' asParser flatten == [:str | #gauge32].


 ​Not sure it would have been as flexible with a SmaCC (I am not familiar
 with SmaCC but used Lex/Yacc|Bison in another life).

 Phil



Re: [Pharo-users] Oracle on Linux

2015-04-02 Thread Norbert Hartl

 Am 02.04.2015 um 12:52 schrieb Esteban A. Maringolo emaring...@gmail.com:
 
 I don't know if you need full fledged access or just to read a few tables.
 
 If it the latest you can use PostgreSQL Foreign Data Wrappers (FDW) and 
 access the pgsql instance using the existing PGv2 driver.
 
 I know it might look convoluted, and maybe it is, but you avoid using DBX.
 
 
I would also avoid using oracle which is a prerequisite, right? :) So DBX is to 
avoid? Sorry, I didn't care very much about SQL engines the last years.

Norbert

 Regards.
 
 Ps: FDW are amazing.
 
 El abr 2, 2015 6:07 AM, Norbert Hartl norb...@hartl.name 
 mailto:norb...@hartl.name escribió:
 I see from time to time topics like SQL popping up. Most of the time DBXTalk 
 seems to be a requirement. It is also something that is considered necessary 
 for a lot of people. Now have the need to access an oracle database. Is that 
 possible? And if yes does it also work on linux?
 
 Norbert



Re: [Pharo-users] Oracle on Linux

2015-04-02 Thread Esteban Lorenzano

 On 02 Apr 2015, at 13:13, Norbert Hartl norb...@hartl.name wrote:
 
 
 Am 02.04.2015 um 12:52 schrieb Esteban A. Maringolo emaring...@gmail.com 
 mailto:emaring...@gmail.com:
 
 I don't know if you need full fledged access or just to read a few tables.
 
 If it the latest you can use PostgreSQL Foreign Data Wrappers (FDW) and 
 access the pgsql instance using the existing PGv2 driver.
 
 I know it might look convoluted, and maybe it is, but you avoid using DBX.
 
 
 I would also avoid using oracle which is a prerequisite, right? :) So DBX is 
 to avoid? Sorry, I didn't care very much about SQL engines the last years.

why DBX is to avoid?
in linux, it is your only chance for connecting to oracle (in windows you could 
also use odbc). 
and it should be working, AFAIK

Esteban

 
 Norbert
 
 Regards.
 
 Ps: FDW are amazing.
 
 El abr 2, 2015 6:07 AM, Norbert Hartl norb...@hartl.name 
 mailto:norb...@hartl.name escribió:
 I see from time to time topics like SQL popping up. Most of the time DBXTalk 
 seems to be a requirement. It is also something that is considered necessary 
 for a lot of people. Now have the need to access an oracle database. Is that 
 possible? And if yes does it also work on linux?
 
 Norbert
 



Re: [Pharo-users] Oracle on Linux

2015-04-02 Thread Tudor Girba
I managed to access Oracle through DBXTalk but on Windows 7.

Cheers,
Doru

On Thu, Apr 2, 2015 at 11:06 AM, Norbert Hartl norb...@hartl.name wrote:

 I see from time to time topics like SQL popping up. Most of the time
 DBXTalk seems to be a requirement. It is also something that is considered
 necessary for a lot of people. Now have the need to access an oracle
 database. Is that possible? And if yes does it also work on linux?

 Norbert




-- 
www.tudorgirba.com

Every thing has its own flow


Re: [Pharo-users] Devnology presentation slides

2015-04-02 Thread Sven Van Caekenberghe
+10

 On 03 Apr 2015, at 00:36, p...@highoctane.be wrote:
 
 Nice slideware!​
 
 And interesting points at that.
 
 Phil




[Pharo-users] Glorp with PostgresV2 on Pharo 4

2015-04-02 Thread Pierce Ng
I'm on a roll. :-) I've written another blog post on installing Glorp with
PostgresV2 on Pharo 4.

To avoid this message looking like spam mail promoting my blog and devoid of
content, here's the slightly edited blog post, in its original Markdown format
sans JSON metadata.

Outside of Smalltalk, create the database 'sodbxtest', user 'sodbxtest'
with password 'sodbxtest':

# su postgres -c psql
postgres=# create role sodbxtest with password 'sodbxtest' login;
CREATE ROLE 
postgres=# create database sodbxtest;
CREATE DATABASE
postgres=# \q
#

In Smalltalk, firstly, install PostgresV2:

Gofer it
smalltalkhubUser: 'PharoExtras' 
project: 'PostgresV2';
package: 'ConfigurationOfPostgresV2';
load.
((Smalltalk at: #ConfigurationOfPostgresV2) project version: '2.4') load.

Open Test Runner and runs the PostgresV2 tests. On my Linux Mint machine,
using a vanilla PostgreSQL 9.3 installation, 23 of 24 tests passed, and
TestPGConnection#testNotify2 erred.

Now that we know the PostgresV2 driver can talk to our database, using the
Monticello browser, open the PostgresV2 repository and load the package
GlorpDriverPostgreSQL. Here I had to edit 
NativePostgresDriverconnectionArgsFromCurrentLogin: to comment out
the second last line:

connectionArgs clientEncoding: aLogin encodingStrategy asSymbol

This is because GlorpDatabaseLoginResource classdefaultPostgreSQLLocalLogin 
does not specify encodingStrategy, meaning it is nil and will respond 
to #asSymbol with DNU.

Next, in a playground, execute the following:

GlorpDemoTablePopulatorResource invalidateSetup.
GlorpDatabaseLoginResource
defaultLogin: GlorpDatabaseLoginResource defaultPostgreSQLLocalLogin

Open Test Runner and run the Glorp tests. 

Tested on Linux Mint 17. 





Re: [Pharo-users] Glorp with PostgresV2 on Pharo 4

2015-04-02 Thread Sven Van Caekenberghe

 On 03 Apr 2015, at 06:58, Pierce Ng pie...@samadhiweb.com wrote:
 
 Now that we know the PostgresV2 driver can talk to our database, using the
 Monticello browser, open the PostgresV2 repository and load the package
 GlorpDriverPostgreSQL. Here I had to edit 
 NativePostgresDriverconnectionArgsFromCurrentLogin: to comment out
 the second last line:
 
connectionArgs clientEncoding: aLogin encodingStrategy asSymbol
 
 This is because GlorpDatabaseLoginResource classdefaultPostgreSQLLocalLogin 
 does not specify encodingStrategy, meaning it is nil and will respond 
 to #asSymbol with DNU.

Yes, we have to fix that, but you also set it manually, no real need to patch 
the code:

createLogin
  ^ Login new
  database: PostgreSQLPlatform new;
  username: 'sven';
  password: '';
  connectString: 'localhost:5432_sven';
  encodingStrategy: #utf8;
  yourself

Interesting articles !

Sven




Re: [Pharo-users] New success stories

2015-04-02 Thread Hilaire
Hi Mariano,

Chatting on IRC about Quuve.. We are curious about the
look-like-desktop-application screenshot of Quuve.
Is the screenshot from a web application or a Dekstop one? Based on Pharo?

Thanks

Hilaire

Le 28/03/2015 16:39, Mariano Martinez Peck a écrit :
 Hi guys,

 I am part of the development of Quuve. The site is not yet online (it
 has been updated since a couple of weeks) but we were told it should
 be online these days... hope soon. 

 If you have more questions, don't hesitate to ask!

 Best, 



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





[Pharo-users] Spec with dynamic tabs

2015-04-02 Thread Hartmut

Hi to all,

I'm working with Spec and appreciate the modularity a lot.
However, I had some difficulties to discover, how I can have a dynamic 
widget in a tab.


Plugging together the TabsExample and the DynamicWidgetChange didn't 
work either.


In the end I discovered the flaw:

- In DynamicWidgetChangechange the last line from self openWithSpec  
to  self buildWithSpec  .

  The DynamicWidgetChange example works as before.

But now also the following works (I propose to enhance the example):
- Add a method
  dynamicTab
  | tab |
  tab := self newTab.
  tab
  label: 'Dynamic';
  icon: Smalltalk ui icons nautilusIcon;
  model: (DynamicWidgetChange  new).
  ^ tab 
  to DynamicWidgetChange.
- add a line addTab: self dynamicTab  to 
DynamicWidgetChangepopulateManager


Now you can dynamically change the widgets in the fourth tab.

Cheers, Hartmut

--
Hartmut Krasemann

Königsberger Str. 41 c

D 22869 Schenefeld

Tel. 040.8307097

Mobil 0171.6451283

krasem...@acm.org




smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Pharo-users] Bytecodes in Nautilus

2015-04-02 Thread stepharo


In other IDE tools that nautilus you can't see anymore the bytecodes 
though.




Yes, we need to streamline all the tools: We need these things to have 
*one* definition: adding it once should add

it to all tools.


not necessarily. It should be possible to customise.


2015-04-01 8:06 GMT-07:00 Sean P. DeNigris s...@clipperadams.com 
mailto:s...@clipperadams.com:


Hmm... I found it in the method pane's context menu. What is the
rationale
for the change?



-
Cheers,
Sean
--
View this message in context:
http://forum.world.st/Bytecodes-in-Nautilus-tp4816678p4816679.html
Sent from the Pharo Smalltalk Users mailing list archive at
Nabble.com http://Nabble.com.








Re: [Pharo-users] Writing ConfigurationOf depending on beyond bleeding edge code

2015-04-02 Thread Pierce Ng
On Sun, Mar 29, 2015 at 11:43:53AM +0200, Sven Van Caekenberghe wrote:
 Done !
 PS: I had forgotten about this, next time, ping me sooner.

Thanks! Will do.

Pierce



Re: [Pharo-users] Oracle on Linux

2015-04-02 Thread Norbert Hartl

 Am 02.04.2015 um 13:55 schrieb Esteban Lorenzano esteba...@gmail.com:
 
 
 On 02 Apr 2015, at 13:13, Norbert Hartl norb...@hartl.name 
 mailto:norb...@hartl.name wrote:
 
 
 Am 02.04.2015 um 12:52 schrieb Esteban A. Maringolo emaring...@gmail.com 
 mailto:emaring...@gmail.com:
 
 I don't know if you need full fledged access or just to read a few tables.
 
 If it the latest you can use PostgreSQL Foreign Data Wrappers (FDW) and 
 access the pgsql instance using the existing PGv2 driver.
 
 I know it might look convoluted, and maybe it is, but you avoid using DBX.
 
 
 I would also avoid using oracle which is a prerequisite, right? :) So DBX is 
 to avoid? Sorry, I didn't care very much about SQL engines the last years.
 
 why DBX is to avoid?

I don't know. I read the sentence I know it might look convoluted, and maybe 
it is, but you avoid using DBX. as avoiding DBX is something positive. So I 
want to know as well.

 in linux, it is your only chance for connecting to oracle (in windows you 
 could also use odbc). 
 and it should be working, AFAIK
 
I'm fine with using DBX as long as it works. I understood also that it is one 
of the higher prioritized tasks for the consortium.

Norbert


 Esteban
 
 
 Norbert
 
 Regards.
 
 Ps: FDW are amazing.
 
 El abr 2, 2015 6:07 AM, Norbert Hartl norb...@hartl.name 
 mailto:norb...@hartl.name escribió:
 I see from time to time topics like SQL popping up. Most of the time 
 DBXTalk seems to be a requirement. It is also something that is considered 
 necessary for a lot of people. Now have the need to access an oracle 
 database. Is that possible? And if yes does it also work on linux?
 
 Norbert
 
 



Re: [Pharo-users] Oracle on Linux

2015-04-02 Thread Mariano Martinez Peck
Norbert, OpenDBXDriver worked for Oracle in Linux. Not sure the state about
right now (FFI status etc), but with some work it should work.

On Thu, Apr 2, 2015 at 8:55 AM, Esteban Lorenzano esteba...@gmail.com
wrote:


 On 02 Apr 2015, at 13:13, Norbert Hartl norb...@hartl.name wrote:


 Am 02.04.2015 um 12:52 schrieb Esteban A. Maringolo emaring...@gmail.com
 :

 I don't know if you need full fledged access or just to read a few tables.

 If it the latest you can use PostgreSQL Foreign Data Wrappers (FDW) and
 access the pgsql instance using the existing PGv2 driver.

 I know it might look convoluted, and maybe it is, but you avoid using DBX.

 I would also avoid using oracle which is a prerequisite, right? :) So DBX
 is to avoid? Sorry, I didn't care very much about SQL engines the last
 years.


 why DBX is to avoid?
 in linux, it is your only chance for connecting to oracle (in windows you
 could also use odbc).
 and it should be working, AFAIK

 Esteban


 Norbert

 Regards.

 Ps: FDW are amazing.
 El abr 2, 2015 6:07 AM, Norbert Hartl norb...@hartl.name escribió:

 I see from time to time topics like SQL popping up. Most of the time
 DBXTalk seems to be a requirement. It is also something that is considered
 necessary for a lot of people. Now have the need to access an oracle
 database. Is that possible? And if yes does it also work on linux?

 Norbert






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


[Pharo-users] Glorp with NBSQLite3 on Pharo 4

2015-04-02 Thread Pierce Ng
Hi all,

I've integrated NBSQLite3 into Glorp on the current Pharo v40592 beta image. 
Details in my blog post here: 

  http://www.samadhiweb.com/blog/

Pierce



Re: [Pharo-users] Glorp with NBSQLite3 on Pharo 4

2015-04-02 Thread Pablo R. Digonzelli
Excellent!!!

Ing. Pablo Digonzelli 
Software Solutions 
IP-Solutiones SRL 
Metrotec SRL 
25 de Mayo 521 
San Miguel de Tucumán 
Email: pdigonze...@softsargentina.com 
pdigonze...@gmail.com 
Cel: 5493815982714

- Mensaje original -
De: Pierce Ng pie...@samadhiweb.com
Para: pharo-users@lists.pharo.org
Enviados: Jueves, 2 de Abril 2015 14:17:41
Asunto: [Pharo-users] Glorp with NBSQLite3 on Pharo 4

Hi all,

I've integrated NBSQLite3 into Glorp on the current Pharo v40592 beta image. 
Details in my blog post here: 

  http://www.samadhiweb.com/blog/

Pierce



Re: [Pharo-users] New success stories

2015-04-02 Thread Mariano Martinez Peck
On Thu, Apr 2, 2015 at 4:05 PM, Hilaire hila...@drgeo.eu wrote:

 Hi Mariano,

 Chatting on IRC about Quuve.. We are curious about the
 look-like-desktop-application screenshot of Quuve.
 Is the screenshot from a web application or a Dekstop one? Based on Pharo?


It's a desktop screenshot of multiple quuve. Quuve is web-based.
However...if you take a look to the picture on the bottom-right (charts on
the left and a table with inline-edit on the right), that is ONE quuve
app/browser (note the upper menu is the same for both). This is because
Quuve supports dual workspace and each workspace multiple tabs :)

Is it clear?

We will be writing some paragraphs about the technical details hope
soon.

Best,




 Thanks

 Hilaire

 Le 28/03/2015 16:39, Mariano Martinez Peck a écrit :
  Hi guys,
 
  I am part of the development of Quuve. The site is not yet online (it
  has been updated since a couple of weeks) but we were told it should
  be online these days... hope soon.
 
  If you have more questions, don't hesitate to ask!
 
  Best,
 
 

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






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