Good morning! Okey, so, i must create an object from Ghost? I am sendig all of you the data from cvs file. What I need is generate a code in Pharo for Read this information, (because i need work with the pays, or the credits notes), so I need, in a variable for example, put the value of the cell X, which contains the $Total. The information from csv file is like the next. I tried to use NeoCsv but i don´t understood. Is good NeoCsv or is better the way using Ghost how you say?
2016-07-28 9:06 GMT-03:00 <[hidden email]>: Send Pharo-users mailing list submissions to |
I am pretty sure I am talking to a bot, but in the case you are a real human, this is how you would parse the file you gave as example (which is technically TSV, tab separated values):
| input | input := 'Día Evento Registrado Número Originante Moneda (*) Monto (*) Fecha de Ejecución (pago, cobro o congelamiento) Frecuencia de Pago Comprobante Asociado (**) 1 Factura F1 Propia Pesos 1000 Día 10 - - 1 Factura F2 Propia Pesos 500 Día 11 - - 2 Factura F3 Terceros Pesos 250 Día 11 - - 3 Factura F4 Propia Dólares 5000 Día 10 - - 4 Factura F5 Propia Dólares 5000 Día 22 - - 5 Factura F6 Terceros Dólares 5000 Día 23 - - 6 Factura F7 Propia Dólares 5000 Día 35 - - 7 Factura Recurrente FR8 Propia Pesos 100 Día 11 3 veces, cada 10 días. - 8 Factura Recurrente FR9 Propia Pesos 150 Día 15 3 veces, cada 5 días. - 10 Congelamiento FR FR9 - - - Día 22 - - 10 Factura (Real) F81 Propia Pesos 100 Día 11 - FR8 14 Factura (Real) F91 Propia Pesos 150 Día 15 - FR9 19 Factura (Real) F92 Propia Pesos 150 Día 20 - FR9 20 Factura (Real) F82 Propia Pesos 100 Día 21 - FR8 30 Factura (Real) F83 Propia Pesos 100 Día 31 - FR8 '. (NeoCSVReader on: input readStream) separator: Character tab; skipHeader; upToEnd. Regards, Sven > On 28 Jul 2016, at 19:17, Alejandro Adgi Romano <[hidden email]> wrote: > > Good morning! > > Okey, so, i must create an object from Ghost? > > I am sendig all of you the data from cvs file. > > What I need is generate a code in Pharo for Read this information, (because i need work with the pays, or the credits notes), so I need, in a variable for example, put the value of the cell X, which contains the $Total. > > The information from csv file is like the next. I tried to use NeoCsv but i don´t understood. Is good NeoCsv or is better the way using Ghost how you say? > > Día Evento Registrado Número Originante Moneda (*) Monto (*) Fecha de Ejecución (pago, cobro o congelamiento) Frecuencia de Pago Comprobante Asociado (**) > 1 Factura F1 Propia Pesos 1000 Día 10 - - > 1 Factura F2 Propia Pesos 500 Día 11 - - > 2 Factura F3 Terceros Pesos 250 Día 11 - - > 3 Factura F4 Propia Dólares 5000 Día 10 - - > 4 Factura F5 Propia Dólares 5000 Día 22 - - > 5 Factura F6 Terceros Dólares 5000 Día 23 - - > 6 Factura F7 Propia Dólares 5000 Día 35 - - > 7 Factura Recurrente FR8 Propia Pesos 100 Día 11 3 veces, cada 10 días. - > 8 Factura Recurrente FR9 Propia Pesos 150 Día 15 3 veces, cada 5 días. - > 10 Congelamiento FR FR9 - - - Día 22 - - > 10 Factura (Real) F81 Propia Pesos 100 Día 11 - FR8 > 14 Factura (Real) F91 Propia Pesos 150 Día 15 - FR9 > 19 Factura (Real) F92 Propia Pesos 150 Día 20 - FR9 > 20 Factura (Real) F82 Propia Pesos 100 Día 21 - FR8 > 30 Factura (Real) F83 Propia Pesos 100 Día 31 - FR8 > > 2016-07-28 9:06 GMT-03:00 <[hidden email]>: > Send Pharo-users mailing list submissions to > [hidden email] > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.pharo.org/mailman/listinfo/pharo-users_lists.pharo.org > or, via email, send a message with subject or body 'help' to > [hidden email] > > You can reach the person managing the list at > [hidden email] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Pharo-users digest..." > > > Today's Topics: > > 1. Update CI books written in Pillar (Yann Dubois) > 2. Re: "self problem" with Ghost (virus) (Steven Costiou) > 3. Re: "self problem" with Ghost (virus) (Denis Kudriashov) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 28 Jul 2016 13:43:52 +0200 > From: Yann Dubois <[hidden email]> > To: Any question about pharo is welcome <[hidden email]> > Subject: [Pharo-users] Update CI books written in Pillar > Message-ID: > <[hidden email]> > Content-Type: text/plain; charset="utf-8" > > Hi ! > > In the last version of Pillar (4.0.x), Pillar don't manage the compilation > cycle. So the ./compile.sh does not work anymore. > > To update our CI, we use a Makefile (I advise you to use this too). You > have an example on : > https://github.com/pillar-markup/Pillar-Archetype/blob/master/welcome/Makefile > . > > In this Makefile, we create symbolic links pointing on the output > directory. It causes "out of memory" on Jenkins. To solve this problem, you > need to remove the symbolic links after the compilation. Personnaly, I had > > *find book-result -type l -exec unlink {} \;* > > > at the end of the EnterprisePharo's Jenkins script. > > Cheers, Yann > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20160728/aac41a4c/attachment-0001.html> > > ------------------------------ > > Message: 2 > Date: Thu, 28 Jul 2016 13:46:01 +0200 > From: Steven Costiou <[hidden email]> > To: Any question about pharo is welcome <[hidden email]> > Subject: Re: [Pharo-users] "self problem" with Ghost (virus) > Message-ID: <[hidden email]> > Content-Type: text/plain; charset="utf-8" > > Ok by digging a bit, i found that it was a problem in my behavior though > i don't understand it. > > When sending message to self, the #isMetaMessage: returns always true > when evaluating the first test condition GHCurrentMetaLevelDepth value > > 0 ifTrue: [ ^true ]. The value returns something higher than 0 and my > "self messages" are considered to be meta-messages. It is very sensible > to modifications, as just removing this test or try to bend it can > freezes the image (just tried to see what would happen). > > I'm a bit lost, what should i do to consider "self messages" not "meta" > in the behavior ? > > Le 2016-07-28 12:33, Steven Costiou a ?crit : > > > Hi, > > > > I think i am missing something. > > > > For example in the following code (took from the tests): > > > > | victim virus actual | > > virus := GHObjectVirus behaviour: GHGhostBehaviourStub new. > > > > victim := 0@0 corner: 3@4. > > virus infect: victim. > > victim corner > > > > The evaluation is trapped by the send:to: method in the behavior (i've put a halt there). However if i replace the "corner" message by an inspect of the victim, and if i evaluate "self corner", then the message is processed without going through the send:to: method of the behavior. It is not halted and the victim responds immediately to the message. I have also tried to add a new method in the Rectangle class that calls "self corner". When called in the playground, my new message is trapped but not the "corner" sent to self. > > > > From what i understand it could be related to the behavior i use, but i don't see what's missing. > > > > Le 2016-07-28 11:35, Denis Kudriashov a ?crit : > > I think I not understood second part of "self problem" in this paper. But self sends are covered by virus as I described. > > > > 2016-07-28 11:30 GMT+02:00 Denis Kudriashov <[hidden email]>: > > > > Hi > > > > 2016-07-27 22:19 GMT+02:00 Steven Costiou <[hidden email]>: > > > > Hi, > > > > I use virus from Ghost to intercept messages sent to a given object and adapt methods behaviors for this particular object only. However it would seems that doing interception this way is subject to the "self problem" described in this paper from St?phane (DUCASSE, St?phane. Evaluating message passing control techniques in Smalltalk. _JOURNAL OF OBJECT ORIENTED PROGRAMMING_, 1999, vol. 12, p. 39-50). > > > > I understand i could do instance based adaptation using an other technique, but i wonder if there is any way with Ghost to deal with this "self problem" problem ? I think "self problem" is only related to classic proxies when objects stay behind them. But ObjectVirus is not proxy in this meaning. When you infect your object by virus it is not replaced by somebody else. It is same original instance but with overridden behaviour. That's why I call it virus without any relation to proxies. > > Any message to infected object is processed by your behaviour. All self sends are intercepted. But there are few exceptions: > > - special messages like ==,ifTrue/ifNil are not intercepted > > - meta messages are not intercepted. They processed by Ghost mechanics but they not passed to your behaviour. Meta messages defined by #currentMetaLevel of your behaviour. You could implement it like: > > > > YourGhostBehaviour>>currentMetaLevel > > ^GHMetaLevel empty > > > > Empty meta level means that all messages will be passed to your behaviour. There is also "GHMetaLevel standard" which is default one. It makes most of "tool messages" not interceptable. For example #printString, #class, #instVarAt: will be not intercepted. It's messages which are usually used by tools like inspector and debugger. > > Standard meta level simplifies debugging of new behaviours. If you make mistake somewhere standard messages will be not broken and you could debug error by tools. > > -- > kloum.io > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20160728/74d445a7/attachment-0001.html> > > ------------------------------ > > Message: 3 > Date: Thu, 28 Jul 2016 14:05:33 +0200 > From: Denis Kudriashov <[hidden email]> > To: Any question about pharo is welcome <[hidden email]> > Subject: Re: [Pharo-users] "self problem" with Ghost (virus) > Message-ID: > <[hidden email]> > Content-Type: text/plain; charset="utf-8" > > Steven, I fixed it. > Load development version (or just this: > Ghost-ObjectVirus-DenisKudryashov.12). > > I will update stable soon > > 2016-07-28 13:46 GMT+02:00 Steven Costiou <[hidden email]>: > > > Ok by digging a bit, i found that it was a problem in my behavior though i > > don't understand it. > > > > When sending message to self, the #isMetaMessage: returns always true when > > evaluating the first test condition GHCurrentMetaLevelDepth value > 0 > > ifTrue: [ ^true ]. The value returns something higher than 0 and my "self > > messages" are considered to be meta-messages. It is very sensible to > > modifications, as just removing this test or try to bend it can freezes the > > image (just tried to see what would happen). > > > > I'm a bit lost, what should i do to consider "self messages" not "meta" in > > the behavior ? > > > > > > > > > > > > Le 2016-07-28 12:33, Steven Costiou a ?crit : > > > > Hi, > > > > I think i am missing something. > > > > For example in the following code (took from the tests): > > > > | victim virus actual | > > virus := GHObjectVirus behaviour: GHGhostBehaviourStub new. > > > > victim := 0@0 corner: 3@4. > > virus infect: victim. > > victim corner > > > > The evaluation is trapped by the send:to: method in the behavior (i've put > > a halt there). However if i replace the "corner" message by an inspect of > > the victim, and if i evaluate "self corner", then the message is processed > > without going through the send:to: method of the behavior. It is not halted > > and the victim responds immediately to the message. I have also tried to > > add a new method in the Rectangle class that calls "self corner". When > > called in the playground, my new message is trapped but not the "corner" > > sent to self. > > > > From what i understand it could be related to the behavior i use, but i > > don't see what's missing. > > > > > > > > Le 2016-07-28 11:35, Denis Kudriashov a ?crit : > > > > I think I not understood second part of "self problem" in this paper. But > > self sends are covered by virus as I described. > > > > 2016-07-28 11:30 GMT+02:00 Denis Kudriashov <[hidden email]>: > > > >> Hi > >> > >> 2016-07-27 22:19 GMT+02:00 Steven Costiou <[hidden email]>: > >> > >>> Hi, > >>> > >>> I use virus from Ghost to intercept messages sent to a given object and > >>> adapt methods behaviors for this particular object only. However it would > >>> seems that doing interception this way is subject to the "self problem" > >>> described in this paper from St?phane (DUCASSE, St?phane. Evaluating > >>> message passing control techniques in Smalltalk. *JOURNAL OF OBJECT > >>> ORIENTED PROGRAMMING*, 1999, vol. 12, p. 39-50). > >>> > >>> I understand i could do instance based adaptation using an other > >>> technique, but i wonder if there is any way with Ghost to deal with this > >>> "self problem" problem ? > >>> > >> I think "self problem" is only related to classic proxies when objects > >> stay behind them. But ObjectVirus is not proxy in this meaning. When you > >> infect your object by virus it is not replaced by somebody else. It is same > >> original instance but with overridden behaviour. That's why I call it virus > >> without any relation to proxies. > >> Any message to infected object is processed by your behaviour. All self > >> sends are intercepted. But there are few exceptions: > >> - special messages like ==,ifTrue/ifNil are not intercepted > >> - meta messages are not intercepted. They processed by Ghost mechanics > >> but they not passed to your behaviour. Meta messages defined by > >> #currentMetaLevel of your behaviour. You could implement it like: > >> > >> > >> YourGhostBehaviour>>currentMetaLevel > >> > >> ^GHMetaLevel empty > >> > >> > >> Empty meta level means that all messages will be passed to your > >> behaviour. There is also "GHMetaLevel standard" which is default one. It > >> makes most of "tool messages" not interceptable. For example #printString, > >> #class, #instVarAt: will be not intercepted. It's messages which are > >> usually used by tools like inspector and debugger. > >> Standard meta level simplifies debugging of new behaviours. If you make > >> mistake somewhere standard messages will be not broken and you could debug > >> error by tools. > >> > >> > > > > -- > > kloum.io > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20160728/4897722a/attachment.html> > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Pharo-users mailing list > [hidden email] > http://lists.pharo.org/mailman/listinfo/pharo-users_lists.pharo.org > > > ------------------------------ > > End of Pharo-users Digest, Vol 39, Issue 126 > ******************************************** > |
Free forum by Nabble | Edit this page |