Re: [Pharo-users] Modify AST to send a message on Character nodes

2015-09-12 Thread Marcus Denker
> On 12 Sep 2015, at 19:23, Peter Uhnák wrote: > > | rewriter | > rewriter := RBParseTreeRewriter new > replace: ' `#aLiteral `{:node | node value isCharacter}' > with: '`#aLiteral aMessage'; yourself. > rewriter executeTree: (RBParser parseExpression: 'Array with: $a asciiValue > with:

Re: [Pharo-users] Modify AST to send a message on Character nodes

2015-09-12 Thread Peter Uhnák
> > | rewriter | > rewriter := RBParseTreeRewriter new > replace: ' `#aLiteral `{:node | node value isCharacter}' > with: '`#aLiteral aMessage'; yourself. > rewriter executeTree: (RBParser parseExpression: 'Array with: $a > asciiValue with: $b with: #c with: d'). > rewriter tree formattedCo

Re: [Pharo-users] Modify AST to send a message on Character nodes

2015-09-12 Thread Thierry Goubier
Le 12/09/2015 18:20, Mark Rizun a écrit : Need to keep all those snipets somewhere. And I think the chapter in Pharo for the enterprise does not explain well the conditional stuff in { }. I always forget the syntax of writing condition on nodes :) I was missing the fact that the c

Re: [Pharo-users] Modify AST to send a message on Character nodes

2015-09-12 Thread Julien Delplanque
Great! Thats what I was looking for. On 12/09/15 18:12, Thierry Goubier wrote: Hi Julien, Mark and Peter, here is a RB approach: | rewriter | rewriter := RBParseTreeRewriter new replace: ' `#aLiteral `{:node | node value isCharacter}' with: '`#aLiteral aMessage'; yourself. rewriter execute

Re: [Pharo-users] Modify AST to send a message on Character nodes

2015-09-12 Thread Mark Rizun
> > Need to keep all those snipets somewhere. And I think the chapter in Pharo > for the enterprise does not explain well the conditional stuff in { }. > I always forget the syntax of writing condition on nodes :)

Re: [Pharo-users] Modify AST to send a message on Character nodes

2015-09-12 Thread Thierry Goubier
Hi Julien, Mark and Peter, here is a RB approach: | rewriter | rewriter := RBParseTreeRewriter new replace: ' `#aLiteral `{:node | node value isCharacter}' with: '`#aLiteral aMessage'; yourself. rewriter executeTree: (RBParser parseExpression: 'Array with: $a asciiValue with: $b with: #

Re: [Pharo-users] Modify AST to send a message on Character nodes

2015-09-12 Thread Thierry Goubier
Le 12/09/2015 15:46, Peter Uhnák a écrit : If you don't want to manually operate on AST, you can use Mark's Rewrite Tool ( http://screencast.com/t/LCEl0hFl , https://medium.com/@peteruhnak/using-rewrite-tool-for-fixing-deprecated-code-12a595b291d8 ) As for ASTs I would be also curious about the

Re: [Pharo-users] Modify AST to send a message on Character nodes

2015-09-12 Thread Mark Rizun
Hi everyone, I believe you should be able to do this transformation with Rewrite Tool. The only problem I see is that you want to do this only with single symbol. Because, in my tool you can do: transform: *`#literal* into: *`#literal aMessage*. In this case `#literal means any literal, not only

Re: [Pharo-users] Modify AST to send a message on Character nodes

2015-09-12 Thread Peter Uhnák
If you don't want to manually operate on AST, you can use Mark's Rewrite Tool ( http://screencast.com/t/LCEl0hFl , https://medium.com/@peteruhnak/using-rewrite-tool-for-fixing-deprecated-code-12a595b291d8 ) As for ASTs I would be also curious about the answer, as this seems like it should be a sim

[Pharo-users] Modify AST to send a message on Character nodes

2015-09-12 Thread Julien Delplanque
Hi everyone, I would like to modify the AST of a smalltalk expression compiled to automatically send a certain message when a node represents a Character (so the user does not have to write the message sending explicitly). I would of course add a special button in the menu you get when right c

Re: [Pharo-users] Connecting Ephemeric Cloud instances to other cloud provides (like Digital Ocean)

2015-09-12 Thread Marcus Denker
Hi Mike, This looks very nice! > On 11 Sep 2015, at 11:11, Mike Filonov wrote: > > Hello, > > Good news everyone! :) > > Today I have successfully connected an application published in > Ephemeric Cloud to a MongoDB hosted at Digital Ocean! > > http://eph-f2e2bcac.swarm.pharocloud.com/todo >