Re: [Pharo-users] RewriteToolbuilder question

2017-06-07 Thread Mark Rizun
0 = self ifTrue: ["Special case of self = 0" > aNumber < 0 > ifTrue: [^ (ZeroDivide dividend: self) signal] > ifFalse: [^ self]]. > ^ (aNumber * self ln) exp"Otherwise use logarithms" > > Werner

Re: [Pharo-users] RewriteToolbuilder question

2017-06-07 Thread Mark Rizun
Hi Werner, I believe that I am the one to answer this question, but I need more information. Please, could you send the code that you have in upper left panel. Cheers, Mark 2017-06-07 18:46 GMT+02:00 Ben Coman : > I don't know much about RewriteToolbuilder, so probably

Re: [Pharo-users] Voyage - collecting data from Mongo

2017-05-02 Thread Mark Rizun
thod >>> to fix the problem: >>> >>> MongoDatabase>>collections >>> | reply names | >>> reply := self command: {(#listCollections -> 1)} asDictionary. >>> names := ((reply at: 'cursor') at: 'firstBatch') collect: [ :each | each >

Re: [Pharo-users] Voyage - collecting data from Mongo

2017-04-30 Thread Mark Rizun
> Mark > once you have a solution could you post it because I would like to add > your question to the voyage chapter. > stef > Sure thing, Stef.

Re: [Pharo-users] Voyage - collecting data from Mongo

2017-04-30 Thread Mark Rizun
I am running a Pharo3.0 image (with an older Voyage) against MongoDB 3.2. I think I am already using "WiredTiger" as database. If you can reproduce it, we can have a look. The only issue I have seen is Sabines authentication failure with more "modern" schemes. I have Pharo 6 and the newest

Re: [Pharo-users] Voyage - collecting data from Mongo

2017-04-30 Thread Mark Rizun
oh? Is that written somewhere in the Voyage documentation? Sorry, I wasn't very accurate in previous email. Actually, my friend is using MongoTalk/Voyage, and she encountered a problem that it is not possible to work with databases created in 3.0+ versions of MongoDB. Probably this issue is

Re: [Pharo-users] Voyage - collecting data from Mongo

2017-04-30 Thread Mark Rizun
pad", qty: 25, tags: ["gel", "blue"], size: { h: 19, w: 22.85, uom: "cm" } } ]) https://docs.mongodb.com/manual/tutorial/insert-documents/ Mark 2017-04-30 10:37 GMT+02:00 Stephane Ducasse <stepharo.s...@gmail.com>: > mark > > what is such collection?

[Pharo-users] Voyage - collecting data from Mongo

2017-04-28 Thread Mark Rizun
Hi, Is it possible to retrieve data from Mongo collection if it was not created via Voyage? Meaning that I do not have a class in Pharo that would correspond to said collection (should I implement one?). Cheers, Mark -- View this message in context:

Re: [Pharo-users] RewriteTool matching parts of an array

2016-08-11 Thread Mark Rizun
Hi Peter, I tried to perform this transformation with RewriteTool and got the same DNU. > However when I tried to execute it I was met with DNU > OrderedCollection>>parent: > > It seems that the @first/@second part are not matched properly. > Actually they are matched properly, because if you

Re: [Pharo-users] How to rewrite self should: into self assert:

2016-03-27 Thread Mark Rizun
Hi, Denis. We discussed this with Stef, created the rule for such transformation and successfully applied it to many methods :) The rule basically is: self should: [ ``@object ] --> self assert: ``@object Cheers, Mark 2016-03-27 21:22 GMT+03:00 Denis Kudriashov : > I

Re: [Pharo-users] RewriteTool not working in latest Pharo

2015-11-17 Thread Mark Rizun
Hi Peter! In any case if you just remove #hShrinkWrap message sends from #initializeWidgets, it will only change UI a bit, you will be able to work with tool. But soon I'll fix it. Thanks for reporting :) Mark 2015-11-17 13:30 GMT+02:00 Peter Uhnák : > Hi, > > RewriteTool is

Re: [Pharo-users] RewriteTool not working in latest Pharo

2015-11-17 Thread Mark Rizun
Hi again, it should work now ;) 2015-11-17 13:40 GMT+02:00 Mark Rizun <mri...@gmail.com>: > Hi Peter! > > In any case if you just remove #hShrinkWrap message sends from > #initializeWidgets, it will only change UI a bit, you will be able to work > with tool. > But so

Re: [Pharo-users] RewriteTool not working in latest Pharo

2015-11-17 Thread Mark Rizun
Actually for now it's not possible as I parse expression not a method.

Re: [Pharo-users] GTInspector: add view tab for custom object

2015-10-02 Thread Mark Rizun
oseIcons mooseSystemComplexity; > initializeView: [ RTMondrian new ]; > painting: [ :view :each | > "build views" ] > > Does this help? > > Cheers, > Andrei > > On Fri, Oct 2, 2015 at 10:47 AM, Mark Rizun <mri...@gmail.com> wrote: > >> Hi everyone, >>

[Pharo-users] GTInspector: add view tab for custom object

2015-10-02 Thread Mark Rizun
Hi everyone, I would like to extend GTInspector for custom object - add a roassal view tab. I found this kind of code to do this: gtInspectorViewIn: composite composite roassal2 title: 'View'; painting: [ :view | self viewOn: view ] The problem

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 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

[Pharo-users] AST visualization with Roassal

2015-07-30 Thread Mark Rizun
Hi, everyone! First of all, using Roassal is fun and effective :) But while working on AST visualization I found that sometimes Roassal builds wrong tree layout (or maybe I'm just doing something wrong). For instance, try two following scripts in playground: * #1 | ast

Re: [Pharo-users] AST visualization with Roassal

2015-07-30 Thread Mark Rizun
Pretty much; there is test for equality RTGroupelementFromModel: anObject ^ self detect: [ :el | el model = anObject ] ifNone: [ nil ] and equality is more often than not wanted. So solution might be to tell Mondrian that you want to compare by identity and not equality? Exactly!

Re: [Pharo-users] AST visualization with Roassal

2015-07-30 Thread Mark Rizun
Great, everybody is happy ;) Thanks Alex ! 30 лип. 2015 5:40 пп Marcus Denker marcus.den...@inria.fr пише: On 30 Jul 2015, at 17:26, Alexandre Bergel alexandre.ber...@me.com wrote: Hi Mark, I have introduced a class RTIdentityGroup. You can do: -=-=-= -=-=-= -=-=-= -=-=-=

[Pharo-users] Spec with Roassal

2015-07-23 Thread Mark Rizun
Hi everyone! I'm building a ui with Spec and using Roassal view inside of my window. To embed the view I use Roassal2Spec package (RoassalModel class). When I click on element of view I want to change its color. The problem is that color changes only after you move a winodw or open another

Re: [Pharo-users] AST Inspector

2015-06-29 Thread Mark Rizun
Need a bit of anti-aliasing for the round shapes :) Right :) I wonder how it will look with a long method: they usually have rather flat ASTs that would result in a wide diagram. Yes it will be pretty huge. However, 1) there is an option to scale the tree (nodes) 2) most of the methods

[Pharo-users] AST Inspector

2015-06-29 Thread Mark Rizun
Hi, everyone! When I was exploring AST in Pharo, at the beginning it seemed a bit confusing for me how the tree looks like, or which part of code some node represents etc. As I'm working with ASTs for a while now, still not an expert ;), I decided to make a simple AST Inspector for myself and

Re: [Pharo-users] AST Inspector

2015-06-29 Thread Mark Rizun
Simple morphic. 2015-06-29 20:01 GMT+03:00 Peter Uhnák i.uh...@gmail.com: What is it drawn with? On Mon, Jun 29, 2015 at 6:53 PM, Mark Rizun mri...@gmail.com wrote: Need a bit of anti-aliasing for the round shapes :) Right :) I wonder how it will look with a long method: they usually

Re: [Pharo-users] AST Inspector

2015-06-29 Thread Mark Rizun
If you already seen the GT view, perhaps this means that you were missing something. Is it only the visual representation, or do you miss something else? For the most part the missing part is the visual representation of the tree. However I did this little inspector because in the future I

Re: [Pharo-users] Morphs automatic repositioning (and resizing)

2015-06-25 Thread Mark Rizun
you can compose by putting your morphs into AlignmentMorph instances (order them by rows or columns), and you add the AlignmentMorph instances to your top level morph. You'll have to play with the #spaceFill or #shrinkWrap layout resizing options for your morphs to handle filling the

[Pharo-users] Morphs automatic repositioning (and resizing)

2015-06-25 Thread Mark Rizun
Hello, everyone! Let's say I have morph which contains few other morphs. Is there any way to reposition all these submorphs (if needed resize, but it's optional), so that they do not intersect with each other? Thanks in advance, Mark -- View this message in context:

[Pharo-users] Custom error class

2015-05-11 Thread Mark Rizun
Hi guys! I was wondering if there is a tutorial/chapter in books or smth to read about implementing custom error class properly. If not maybe there are some good examples already implemented, so I could learn by exploring them. Thanks in advance! Mark -- View this message in context:

Re: [Pharo-users] [Pharo-dev] [SURVEY] Code Critics Usage

2015-05-04 Thread Mark Rizun
Me too :) 2015-05-04 20:45 GMT+03:00 Alexandre Bergel alexandre.ber...@me.com: Done! -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. On May 4, 2015, at 12:41 PM, Jigyasa Grover

[Pharo-users] Building ObjVlisp language chapter

2015-05-03 Thread Mark Rizun
Hi guys! Currently, I'm following the chapter: Building ObjVlisp a Minimal, Uniform and Reflective Object-Oriented Language Kernel (http://sdmeta.gforge.inria.fr/Teaching/ObjVLisp/). While doing this exercise I realized how cool it is :) Anywhays, I encountered a little problem which I solved,

[Pharo-users] SoundSystem subclassing

2015-04-23 Thread Mark Rizun
Hi, I was investigating how to play sounds in Pharo, and found SoundSystem class. It is stated that you should subclass it, like DummySoundSystem does. Is there any cool subclass (besides DummySoundSystem =D ) already implemented so I can use it? Thanks, Mark -- View this message in context:

Re: [Pharo-users] Video presentation of Rewrite Tool

2015-02-21 Thread Mark Rizun
Thank you all, I really appreciate this :) 2015-02-21 18:41 GMT+02:00 Sean P. DeNigris s...@clipperadams.com: Mark Rizun wrote Video presentation of Rewrite Tool: http://screencast.com/t/LCEl0hFl ... Please, I need your feedback on tool, so download it and try to use it. WOW

[Pharo-users] Video presentation of Rewrite Tool

2015-02-21 Thread Mark Rizun
Hi, Video presentation of Rewrite Tool: http://screencast.com/t/LCEl0hFl Also on blog: http://myfuncoding.blogspot.com/ Please, I need your feedback on tool, so download it and try to use it. Any suggestions or questions are welcome! Best, Mark -- View this message in context:

Re: [Pharo-users] Video presentation of Rewrite Tool

2015-02-21 Thread Mark Rizun
Thanks. The only problem is that I didn't manage to get this on youtube. But I will try later again. (need to convert it somehow) Mark 2015-02-21 14:54 GMT+02:00 stepharo steph...@free.fr: Mark this is really excellent! I really want to use it. I had 30 classes with changing API. I did it by

Re: [Pharo-users] Video presentation of Rewrite Tool

2015-02-21 Thread Mark Rizun
I'd like to make a rewrite rule which, for a given method, rewrites it and create another method. Is it possible with your tool? Hi Thierry. Now tool just rewrites existing methods (consider it as when you apply refactoring), however it's easy to add such a functionality like you

Re: [Pharo-users] Running Pharo on Ubuntu 14.04.1 LTS 64-bit

2015-02-14 Thread Mark Rizun
Hi, Sven! Installed ubuntu (14.04 64bit) few days ago, and I had problems to install pharo. This scripts worked just fine. Many thanks to you. Another thing is, I couldn't install pharo launcher. Best, Mark 2015-02-14 21:15 GMT+02:00 Sven Van Caekenberghe s...@stfx.eu: Hi, It seems some

Re: [Pharo-users] SPEC and Athens

2015-01-29 Thread Mark Rizun
should ask yourself how you can help pharo. Stef Welcome to the world of Smalltalk! Am 28.01.2015 um 07:27 schrieb Mark Rizun: I have the same problem with PolygonMorph. It does not resize properly. Also I couldn't find any event related with window resizing. If you find a solution please

Re: [Pharo-users] SPEC and Athens

2015-01-28 Thread Mark Rizun
First the svg does not resive properly while resizing the window. What do you mean by this? How can I also introduce an animated SVG? Like an svg that changes color during a mouse click? To work with events that are implemented in AthensSvgMorph you have to (as far as I know) access this

Re: [Pharo-users] SPEC and Athens

2015-01-28 Thread Mark Rizun
an example implementation on this? I'll try to find a solution that might work for both of us. It is easier to find the reason with a second reference implementation, I guess. Sebastian Am 28.01.2015 um 07:27 schrieb Mark Rizun: I have the same problem with PolygonMorph. It does not resize

Re: [Pharo-users] SPEC and Athens

2015-01-27 Thread Mark Rizun
Hi, Not sure if it helps but for morphs you have next transformation to model: | morph | morph := CalendarMorph on: Date today. ^ morph asSpecAdapter Please read details here: http://spec.st/docs/insert-morph/ Mark 2015-01-27 16:57 GMT+01:00 Sebastian Heidbrink shei...@yahoo.de:

Re: [Pharo-users] Spec: how to add borders

2015-01-21 Thread Mark Rizun
between a model and a real Morph. I didn't check this, but it's possible you will need to do this *after* the window is rendered and shown, in which case you have a #whenBuiltDo: method on ComposableModel for this. Best regards, Piotr Klibert 2015-01-21 11:48 GMT+01:00 Mark Rizun mri

Re: [Pharo-users] Centering a Label with Spec

2015-01-21 Thread Mark Rizun
This is really great that you found a solution. It will be helpful for me and I think for others tool. Thanks a lot 2015-01-21 22:47 GMT+01:00 Piotr Klibert piotr.klib...@10clouds.com: Ok, so I investigated a bit and it turns out it really is not possible with pure Spec (and no, absolute

[Pharo-users] Spec: how to add borders

2015-01-21 Thread Mark Rizun
Hi, I want to have a border around, for example, two TextModel(s) and one ButtonModel. Is it possible to do just with Spec or I have to do it some other way? Best regards, Mark -- View this message in context: http://forum.world.st/Spec-how-to-add-borders-tp4800778.html Sent from the Pharo

Re: [Pharo-users] Code highlight

2015-01-20 Thread Mark Rizun
I had a quick look. I confirm that TextModel keeps a value holder on the current selection interval, in the instance variable named ‘selection', but apparently there is no API to register to notifications to that. I consider that a missing feature, so I think it is best that you add a bug

Re: [Pharo-users] Code highlight

2015-01-19 Thread Mark Rizun
btw, I found this post http://forum.world.st/pharo-ide-task-force-morphic-issues-td3682765.html 2015-01-19 14:36 GMT+01:00 Mark Rizun mri...@gmail.com: Hi everyione, When one selects piece of code in any code editor pane, every other same piece is highlighted with less bright color. I'm

Re: [Pharo-users] improving print-it in playground

2015-01-19 Thread Mark Rizun
Hello! Thanks for the change, I think it will come in handy. 2015-01-19 10:27 GMT+01:00 Sven Van Caekenberghe s...@stfx.eu: For me, you nailed it. It makes Playgrounds even more useful. I also want this in every code pane, including all browsers. +1, if it's possible, I would like to see

[Pharo-users] Code highlight

2015-01-19 Thread Mark Rizun
Hi everyione, When one selects piece of code in any code editor pane, every other same piece is highlighted with less bright color. I'm using spec to build a UI and would like to know which event is responsible for this highlihts. For example, in TextModel there is one event that probably is

Re: [Pharo-users] Code highlight

2015-01-19 Thread Mark Rizun
Ok, I see. That's not good, but thanks. However, TextModel has selection as instance variable, so maybe I could implement event that I need? 2015-01-19 15:13 GMT+01:00 Nicolai Hess nicolaih...@web.de: 2015-01-19 14:36 GMT+01:00 Mark Rizun mri...@gmail.com: Hi everyione, When one selects

Re: [Pharo-users] Code highlight

2015-01-19 Thread Mark Rizun
a selection is changed. On Jan 19, 2015, at 15:20, Mark Rizun mri...@gmail.com wrote: Ok, I see. That's not good, but thanks. However, TextModel has selection as instance variable, so maybe I could implement event that I need? 2015-01-19 15:13 GMT+01:00 Nicolai Hess nicolaih...@web.de

[Pharo-users] New post on blog about Rewrite Tool

2015-01-14 Thread Mark Rizun
Hello! Please, visit my blog and read new information about developement and updates for Rewrite Tool. Link: myfuncoding.blogspot.com You can install the tool by evaluating this: Gofer new url: 'http://smalltalkhub.com/mc/MarkRizun/RewriteTool/main'; package: 'ConfigurationOfRewriteTool';

[Pharo-users] ZnHTTPSTests#testTransfers fails

2015-01-07 Thread Mark Rizun
Hi, In case 14254 validation report says that ZnHTTPSTests#testTransfers fails. However when I merged slice and tested it, the test was green. Can I somehow solve this, or maybe it's something with system? Btw, just interesting, what this test is responsible for? Thanks, Mark -- View this

Re: [Pharo-users] ZnHTTPSTests#testTransfers fails

2015-01-07 Thread Mark Rizun
The links for issue: https://pharo.fogbugz.com/f/cases/14254/AST-method-replaceWith-does-not-change-source-interval and report: https://ci.inria.fr/pharo/job/Pharo-4.0-Issue-Validator/21421//artifact/validationReport.html 2015-01-07 19:10 GMT+02:00 Mark Rizun mri...@gmail.com: Hi, In case

Re: [Pharo-users] ZnHTTPSTests#testTransfers fails

2015-01-07 Thread Mark Rizun
because of networking problems in the VMs running the CI machinery. 99.99% of the time this resolves on the next run. Sven On 07 Jan 2015, at 18:10, Mark Rizun mri...@gmail.com wrote: Hi, In case 14254 validation report says that ZnHTTPSTests#testTransfers fails. However when I

Re: [Pharo-users] Problem with bugtracker

2015-01-05 Thread Mark Rizun
Validation Failed-result page. nicolai 2015-01-05 20:10 GMT+01:00 Mark Rizun mri...@gmail.com: Hello, While ago, I've resolved an issue 14254 https://pharo.fogbugz.com/f/cases/14254/AST-method-replaceWith-does-not-change-source-interval and validation was successful. Since that time, I

[Pharo-users] Problem with bugtracker

2015-01-05 Thread Mark Rizun
Hello, While ago, I've resolved an issue 14254 https://pharo.fogbugz.com/f/cases/14254/AST-method-replaceWith-does-not-change-source-interval and validation was successful. Since that time, I didn't check this issue as was busy. Turned out after successful validation, there was a failure,

Re: [Pharo-users] [ANN] Pharo Days 2015. The Pharo summit is back!

2014-12-04 Thread Mark Rizun
Thanks Stef and Marcus. Looking forward to attend Pharo Days. Mark 2014-12-04 10:39 GMT+02:00 Sven Van Caekenberghe s...@stfx.eu: On 04 Dec 2014, at 08:26, stepharo steph...@free.fr wrote: Le 3/12/14 17:31, Sven Van Caekenberghe a écrit : On 03 Dec 2014, at 17:18, p...@highoctane.be

Re: [Pharo-users] [ANN] Pharo Days 2015. The Pharo summit is back!

2014-12-04 Thread Mark Rizun
P.S. I have to pay now 20 euros, and than inria will compensate it, right? 2014-12-04 12:14 GMT+02:00 Mark Rizun mri...@gmail.com: Thanks Stef and Marcus. Looking forward to attend Pharo Days. Mark 2014-12-04 10:39 GMT+02:00 Sven Van Caekenberghe s...@stfx.eu: On 04 Dec 2014, at 08:26

Re: [Pharo-users] [ANN] Pharo Days 2015. The Pharo summit is back!

2014-12-03 Thread Mark Rizun
Hi, I'm coming to Lille to work at rmod, and I will be present there on 29-30 January. - hopefully I get visa;) I want to attend Pharo Days, but don't know which registration option to choose: student or student volunteer, or maybe smth else? Mark 2014-12-03 18:37 GMT+02:00 Yuriy Tymchuk

[Pharo-users] TextModel arrows controls

2014-11-24 Thread Mark Rizun
Hello! I stumbled on a strange problem, when was using TextModel widget. The problem is that I can't control I-beam pointer with arrow keys inside of TextModel. They just do not work. Maybe I have to set some methods? Best, Mark -- View this message in context:

[Pharo-users] AST #copy behavior

2014-11-10 Thread Mark Rizun
Hi guys! I'm using AST really often, and recently stumbled on problem with copying an AST. It doesn't copy stuff related to computing sourceInterval of AST, and I need it to copy:) I know there are #deepCopy and #veryDeepCopy, but they are too heavy methods for AST, especially in my case, as I

Re: [Pharo-users] AST #copy behavior

2014-11-10 Thread Mark Rizun
The AST generated by SmaCC has a postCopy in the same way that you describe, so I'd say this is OK. That's good Just be precise about what you copy and what you don't copy. Can you say what will be copied and what won't? For instance, in RBMethodNode I want to copy replacements inst

Re: [Pharo-users] [Oharo-users] Copy AST

2014-11-06 Thread Mark Rizun
You see, when I alpply deepCopy instead of copy, pharo image doesn't respond:) What I want is to get 100% independent new object ast2, with same caracteristics as ast1. P.S. Uko, thanks veryDeepCopy works. Read the comments to both methods but still confused why deepCopy didn't work.

Re: [Pharo-users] [Oharo-users] Copy AST

2014-11-06 Thread Mark Rizun
As I said, I used veryDeepCopy for copying ASTs, and it worked. But! It takes time to copy:) 2014-11-06 11:59 GMT+02:00 Mark Rizun mri...@gmail.com: You see, when I alpply deepCopy instead of copy, pharo image doesn't respond:) What I want is to get 100% independent new object ast2, with same

Re: [Pharo-users] [Oharo-users] Copy AST

2014-11-06 Thread Mark Rizun
Do you have any other suggestions how can I get completely indemendent copy of ast? 2014-11-06 12:19 GMT+02:00 Mark Rizun mri...@gmail.com: As I said, I used veryDeepCopy for copying ASTs, and it worked. But! It takes time to copy:) 2014-11-06 11:59 GMT+02:00 Mark Rizun mri...@gmail.com

Re: [Pharo-users] [Oharo-users] Copy AST

2014-11-06 Thread Mark Rizun
Normally #copy should copy the AST. But it might not copy all the things related to start/stop. Yes #copy, copies not all stuff. That's why I need #deepCopy but it just crashes image. And #veryDeepCopy works vry slow. I need another solution. Any suggestions? Maybe there is some kind of

Re: [Pharo-users] [Oharo-users] Copy AST

2014-11-06 Thread Mark Rizun
If I understand #postCopy is used to override standart copy. Each class has(or may have) its own implementation of #postCopy. When #copy is applied, #postCopy is called. 2014-11-06 17:47 GMT+02:00 Marcus Denker marcus.den...@inria.fr: On 06 Nov 2014, at 16:24, Mark Rizun mri...@gmail.com wrote

Re: [Pharo-users] [Oharo-users] Copy AST

2014-11-06 Thread Mark Rizun
P.S. I must have thought about fixing copy:) Don't know why I didn't 2014-11-06 17:54 GMT+02:00 Mark Rizun mri...@gmail.com: If I understand #postCopy is used to override standart copy. Each class has(or may have) its own implementation of #postCopy. When #copy is applied, #postCopy is called

[Pharo-users] [Oharo-users] Copy AST

2014-11-05 Thread Mark Rizun
Hi everyone, I want to get a deep copy of ast. But deepCopy doesn't work:) What I mean: | ast1 ast2 | ast1 := RBParser parseRewriteExpression: 'self'. ast2 := ast1 copy.or without copy ast1 stop: 99. ast2 stop When evaluate this you get 99. I want it to be 4. So I want to have separate object

Re: [Pharo-users] AST tokens question

2014-10-29 Thread Mark Rizun
Which ones? In my tool each node has property oldNodes, which holds collection of obviously AST nodes:) When I replace one of node I have to update source interval in some way. 1)If I update it with reparsing, I loose all data about oldNodes for each node of my AST. So I have to save old AST

Re: [Pharo-users] AST tokens question

2014-10-29 Thread Mark Rizun
That is way I'd like to have automatically updated source interval. I'm still not entirely sure why. Source intervals are only there to help relating the ast to the source, not much else, really. I use source intervals to detect which node is selected and than in the right-click menu user

Re: [Pharo-users] AST tokens question

2014-10-29 Thread Mark Rizun
P.S. I have a solution, but don't know if it's appropriate: I remove updating of source interval from replaceWith: method, but my tool will do all the calculations of interval on it's own. 2014-10-29 10:59 GMT+02:00 Mark Rizun mri...@gmail.com: That is way I'd like to have automatically updated

Re: [Pharo-users] AST tokens question

2014-10-29 Thread Mark Rizun
Second one, I do replace node all the time. Thinking a bit about it, I'd try reparse, get node from selection index, find equal old node in old (modified) ast, or replace old (modified) ast with new one. Can you explain this, sorry I didn't get the point

Re: [Pharo-users] AST tokens question

2014-10-29 Thread Mark Rizun
This is well how I understood it. Are you implementing something around the use of refactoring? I'm implementing tool for creating rewrite rules. Here is a blog about it: http://myfuncoding.blogspot.com/ Also I write chapter for PharoForEnterprise:

Re: [Pharo-users] AST tokens question

2014-10-29 Thread Mark Rizun
I misunderstood you, of course I can find the node in old ast which was replaced, using operator =. Sure it works, but the problem is I have to pass oldNodes each time from old node to new one.

Re: [Pharo-users] AST tokens question

2014-10-29 Thread Mark Rizun
-10-29 12:16 GMT+02:00 Mark Rizun mri...@gmail.com: I misunderstood you, of course I can find the node in old ast which was replaced, using operator =. Sure it works, but the problem is I have to pass oldNodes each time from old node to new one.

Re: [Pharo-users] AST tokens question

2014-10-29 Thread Mark Rizun
I had a look at the video, and it looks great. Certainly the way to go. Well, it's not that great. And it shows pretty old version of what I have now. I should make a new better one:) I had some ideas along those, but I never have time to try them. My interest would have been to show how

Re: [Pharo-users] **Important** PharoDays Preparation

2014-10-29 Thread Mark Rizun
Hi Stef, hi everyone! As I plan to be in Lille during this time, I'm interested what is PharoDays conference? Mark 2014-10-29 12:46 GMT+02:00 stepharo steph...@free.fr: Hi guys We will organize at Lille the 29 and 30 of January PharoDays. Now to help us building a budget I would like to

Re: [Pharo-users] **Important** PharoDays Preparation

2014-10-29 Thread Mark Rizun
Ok, I'm in:) 2014-10-29 13:10 GMT+02:00 stepharo steph...@free.fr: fun and crazy conference with sprints and hacking in the middle. It will be super cool. Stef On 29/10/14 05:58, Mark Rizun wrote: Hi Stef, hi everyone! As I plan to be in Lille during this time, I'm interested what

Re: [Pharo-users] AST tokens question

2014-10-29 Thread Mark Rizun
This is the one which sounds difficult for me. Patterns are fairly global in nature, and they may match synonyms (i.e. methods of the same name but with different meanings), so I'm worried about the mastery of my changes. For an isNil ifTrue: to ifNil:, it's easy. But for an indexAt: to at:

Re: [Pharo-users] AST tokens question

2014-10-29 Thread Mark Rizun
You mean the changes tool in Monticello ? No I mean, that before your rule is applied you will see the same window, when you choose refactoring. I mean Changes Browser. Here it is: [image: Вбудоване зображення 1]

Re: [Pharo-users] AST tokens question

2014-10-28 Thread Mark Rizun
11:59 GMT+02:00 Nicolai Hess nicolaih...@web.de: 2014-10-27 19:36 GMT+01:00 Mark Rizun mri...@gmail.com: Hi all, Trying to understand here how tokens are used in AST. So far I can not see any order in usage of tokens. For instance, why RBValueNode doesn't have token? Is it haow it's supposed

Re: [Pharo-users] AST tokens question

2014-10-28 Thread Mark Rizun
, not tokens. Yes, I know. Thierry Mark 2014-10-28 11:59 GMT+02:00 Nicolai Hess nicolaih...@web.de mailto:nicolaih...@web.de: 2014-10-27 19:36 GMT+01:00 Mark Rizun mri...@gmail.com mailto:mri...@gmail.com: Hi all, Trying to understand here how tokens are used

[Pharo-users] AST tokens question

2014-10-27 Thread Mark Rizun
Hi all, Trying to understand here how tokens are used in AST. So far I can not see any order in usage of tokens. For instance, why RBValueNode doesn't have token? Is it haow it's supposed to be? Cheers, Mark

Re: [Pharo-users] new Pharo Success story

2014-10-20 Thread Mark Rizun
I really like this success stories page on pharo website. +1 suggestion: can the success page be splitted into different pages? I prefer a main success page with the logos and/or excerpts of the solutions linking to the full success page case. +1 to Estebans suggestion:)

Re: [Pharo-users] Passed by references and by value

2014-09-25 Thread Mark Rizun
Hi, Most classes are passed by reference including those that were defined by user. But classes like integer are passed by value. I think it's similar to C#. I may be wrong, so better wait for another more competent reply:) Best, Mark 2014-09-25 21:14 GMT+03:00 nacho 0800na...@gmail.com: Hi,

Re: [Pharo-users] Passed by references and by value

2014-09-25 Thread Mark Rizun
Only small integers are passed as value? Yes. It has to do with the object headers, SmallIntegers are embedded in the OH. What about Float, for example?

[Pharo-users] Syntax Error: Cannot store into

2014-09-06 Thread Mark Rizun
Hi everyone! When loading a package via Monticello, while compiling methods it gives an error: Syntax Error: Cannot store into and then a method. What does it mean? Best, Mark -- View this message in context: http://forum.world.st/Syntax-Error-Cannot-store-into-tp4776675.html Sent from the

Re: [Pharo-users] Syntax Error: Cannot store into

2014-09-06 Thread Mark Rizun
Package of my project RewriteTool. Here it is: http://smalltalkhub.com/#!/~MarkRizun/RewriteTool/packages/RewriteTool 2014-09-06 11:33 GMT+03:00 Esteban Lorenzano esteba...@gmail.com: which package? On 06 Sep 2014, at 10:28, Mark Rizun mri...@gmail.com wrote: Hi everyone! When

Re: [Pharo-users] Syntax Error: Cannot store into

2014-09-06 Thread Mark Rizun
:39, Mark Rizun mri...@gmail.com wrote: Package of my project RewriteTool. Here it is: http://smalltalkhub.com/#!/~MarkRizun/RewriteTool/packages/RewriteTool 2014-09-06 11:33 GMT+03:00 Esteban Lorenzano esteba...@gmail.com: which package? On 06 Sep 2014, at 10:28, Mark Rizun mri

Re: [Pharo-users] Syntax Error: Cannot store into

2014-09-06 Thread Mark Rizun
Now that's not strange. Thanks for info 2014-09-06 11:49 GMT+03:00 Yuriy Tymchuk yuriy.tymc...@me.com: If you missed our discussion with Marcus, Opal allowed constructs like that until week ago. Uko Sent from my iPhone On 06 Sep 2014, at 10:46, Mark Rizun mri...@gmail.com wrote: You

[Pharo-users] RBTransformationRule inst var changes initialization

2014-08-19 Thread Mark Rizun
Hello, I have a rewrite rule - subclass of RBTransformationRule. And I want to apply it to specific scope, but before applying it, would be nice to see ChangesBrowser with all future changes. For that I need to have changes inst var initialized, but they are nil. So, the question is, where is

Re: [Pharo-users] AST source interval isn't changed

2014-08-14 Thread Mark Rizun
I guess the AST is never used like that (it is re-created from source after a change normally). That's what I do (reparse it if something has been changed). But it seems to me wrong, and also it causes problems.

[Pharo-users] AST source interval isn't changed

2014-08-11 Thread Mark Rizun
Hello, I have MyTextModel class - a subclass of TextModel, it holds an ast of it's text. When I replace node of the ast using replaceWith: ast is changed, then I say text: ast formattedCode, so the text is changed too. But! when I inspect new ast(after replacing some node), I see that source

[Pharo-users] Rewrite Tool

2014-08-07 Thread Mark Rizun
Hi guys, After working on refactorings, I started implementing Rewrite Tool, which provides GUI to create rewrite rools. At this point it's in early stage, but you can take a look at it now. Info on blog: http://myfuncoding.blogspot.com/ Download: http://smalltalkhub.com/#!/~MarkRizun/RewriteTool

[Pharo-users] Question on Spec

2014-08-06 Thread Mark Rizun
Hi, I'm writing tests for RewriteTool which I build with spec. I have a TextModel in this tool. When I do: /RewriteTool new openWithSpec/, /TextModel sourceTextArea/ is initialized, however in tests I don't want to open a tool, just want to initialize it. So I wrote /RewriteTool new/. Everything

Re: [Pharo-users] Question on Spec

2014-08-06 Thread Mark Rizun
initialise your objects ;) The good way to do it is in the method `initializeWidgets` Could you post it so I can tell you a bit more? Ben On 06 Aug 2014, at 10:56, Mark Rizun mri...@gmail.com wrote: Hi, I'm writing tests for RewriteTool which I build with spec. I have a TextModel in this tool

Re: [Pharo-users] Question on Spec

2014-08-06 Thread Mark Rizun
: #menuActions MyTextModel is a subclass of TextModel 2014-08-06 11:13 GMT+02:00 Benjamin benjamin.vanryseghem.ph...@gmail.com: On 06 Aug 2014, at 11:04, Mark Rizun mri...@gmail.com wrote: initializeWidgets self instantiateModels: #(#sourcePanel #SourcePanel #resultPanel #ResultPanel #matchPanel

Re: [Pharo-users] Question on Spec

2014-08-06 Thread Mark Rizun
Yes it is invoked(I mean initializeWidgets in AbstractPanel) if I do: RewriteTool new. And yes, I needed more functionality for TextModel 2014-08-06 11:26 GMT+02:00 Benjamin benjamin.vanryseghem.ph...@gmail.com: On 06 Aug 2014, at 11:16, Mark Rizun mri...@gmail.com wrote: Actually in each

Re: [Pharo-users] Question on Spec

2014-08-06 Thread Mark Rizun
Thomas, no I don't have super call, because in subclasses I don't have initializeWidget method 2014-08-06 11:30 GMT+02:00 Mark Rizun mri...@gmail.com: Yes it is invoked(I mean initializeWidgets in AbstractPanel) if I do: RewriteTool new. And yes, I needed more functionality for TextModel

Re: [Pharo-users] Question on Spec

2014-08-06 Thread Mark Rizun
The templateText was always initialized. But templateText sourceTextArea is still nil. No they don't:) I just replaced a menu of TextModel with my own, and added some ast support. 2014-08-06 11:45 GMT+02:00 Benjamin benjamin.vanryseghem.ph...@gmail.com: On 06 Aug 2014, at 11:30, Mark Rizun mri

  1   2   >