Re: [Pharo-project] Expectation for readFrom:... getting bored to fix bugs.

2010-04-25 Thread Igor Stasenko
On 25 April 2010 10:12, Stéphane Ducasse stephane.duca...@inria.fr wrote: Yes Right now I will keep readFrom: (reading only ISO8601) and if one day we get what you propose I would be happy. Send code :) Add it to issue tracker and CC to me :) I can't do it right now, since i'm currently

Re: [Pharo-project] Expectation for readFrom:... getting bored to fix bugs.

2010-04-25 Thread Nicolas Cellier
2010/4/25 Igor Stasenko siguc...@gmail.com: imo, it should look like: readFrom: stream  ^ readFrom: stream pattern: ISO8601 and readFrom:pattern: Yes, and next step will be to optimize with a pre-compiled pattern (may use a cache). Otherwise, when you have a bunch of String to convert in

Re: [Pharo-project] Expectation for readFrom:... getting bored to fix bugs.

2010-04-25 Thread Igor Stasenko
On 25 April 2010 10:45, Nicolas Cellier nicolas.cellier.aka.n...@gmail.com wrote: 2010/4/25 Igor Stasenko siguc...@gmail.com: imo, it should look like: readFrom: stream  ^ readFrom: stream pattern: ISO8601 and readFrom:pattern: Yes, and next step will be to optimize with a pre-compiled

[Pharo-project] Expectation for readFrom:... getting bored to fix bugs.

2010-04-24 Thread stephane ducasse
Hi What are the expectation for DateAndTimereadFrom? On squeak such tests do not pass. testReadFromFoolProofExtension Convenient extension without a time, only a date self debug: #testReadFromFoolProofExtension self assert: ('2008' asDateAndTime printString =

Re: [Pharo-project] Expectation for readFrom:... getting bored to fix bugs.

2010-04-24 Thread Julian Fitzell
On Sat, Apr 24, 2010 at 10:54 AM, stephane ducasse stephane.duca...@free.fr wrote: What are the expectation for DateAndTimereadFrom? Personally, my expectation is that it doesn't exist. :) To believe that there is a single way of parsing strings into dates (or numbers, or anything else) that

Re: [Pharo-project] Expectation for readFrom:... getting bored to fix bugs.

2010-04-24 Thread Nicolas Cellier
2010/4/24 Julian Fitzell jfitz...@gmail.com: On Sat, Apr 24, 2010 at 10:54 AM, stephane ducasse stephane.duca...@free.fr wrote: What are the expectation for DateAndTimereadFrom? Personally, my expectation is that it doesn't exist. :) To believe that there is a single way of parsing strings

Re: [Pharo-project] Expectation for readFrom:... getting bored to fix bugs.

2010-04-24 Thread Stéphane Ducasse
yes but before having that and all the complexity it can bring I suggest to stick with a non fuzzy and customizable parser that does not exist yet and stick to ISO format and parse only this one but well. Stef On Apr 24, 2010, at 9:16 PM, Julian Fitzell wrote: On Sat, Apr 24, 2010 at 10:54

Re: [Pharo-project] Expectation for readFrom:... getting bored to fix bugs.

2010-04-24 Thread Stéphane Ducasse
What I did was to stick with the ISO parsing and added a fuzzy readfrom (the previous one in pharo) so that readFrom: read only iso but well and fuzzy tries to find its way with strange input. Stef On Apr 24, 2010, at 9:48 PM, Nicolas Cellier wrote: 2010/4/24 Julian Fitzell

Re: [Pharo-project] Expectation for readFrom:... getting bored to fix bugs.

2010-04-24 Thread csrabak
Then a more appropriate class would be ISO8601DateAndTime for this method to remain in Pharo? -- Cesar Rabak Em 24/04/2010 16:48, Nicolas Cellier nicolas.cellier.aka.n...@gmail.com escreveu: 2010/4/24 Julian Fitzell : On Sat, Apr 24, 2010 at 10:54 AM, stephane ducasse wrote: What are

Re: [Pharo-project] Expectation for readFrom:... getting bored to fix bugs.

2010-04-24 Thread Igor Stasenko
imo, it should look like: readFrom: stream ^ readFrom: stream pattern: ISO8601 and readFrom:pattern: should parse date by taking an arbitrary pattern into account. We could invent own syntax for a pattern, or use other invented ones (from C, Perl etc), and implement a separate DateTimeParser