Re: [fpc-pascal] My favourite missing feature

2008-12-24 Thread Jonas Maebe
On 25 Dec 2008, at 00:28, S. Fisher wrote: I wish that people would stop getting so derogatory and fired up about mundane things like whether or not someone else likes a particular programming language (and that goes for both sides of the "debate"). And that they'd stop over-generalisin

Re: [fpc-pascal] My favourite missing feature

2008-12-24 Thread S. Fisher
Anyone who pretends to know how to use computers effectively must know how to use grep. (grep is available for Windoze.) Let's say that you want to search all of the files in the current directory for lines that contain "foobar" or "foo bar" or "foo-bar", followed later in the line by "practise"

Re: [fpc-pascal] My favourite missing feature

2008-12-24 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > Frank de Groot (Rent-a-Geek) wrote: > > > 1. The number of people proficient in RegExes is very small, and it > > takes regular practice to keep the skill up. > > Very bad to be dependent on such a subset of Pascal programmers. > > I am very sor

Re: [fpc-pascal] My favourite missing feature

2008-12-24 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > > Maybe. I never used them (except a text editor of course). Everything > > you can do with these tools is also possible with a good Pascal compiler > > (and much more). > > Very true, I'd not deny that for a moment. However what's better: a >

Re: [fpc-pascal] My favourite missing feature

2008-12-24 Thread Frank de Groot (Rent-a-Geek)
4. RegExes, especially complex ones, are usually orders of magnitude slower than straight Pascal, because they're usually interpreted at runtime by a parser. They could possibly be preprocessed if assigned to a constant, although I've not tried doing this. If you modify the RegExp-parsing so

Re: [fpc-pascal] My favourite missing feature

2008-12-24 Thread Mark Morgan Lloyd
Frank de Groot (Rent-a-Geek) wrote: 1. The number of people proficient in RegExes is very small, and it takes regular practice to keep the skill up. Very bad to be dependent on such a subset of Pascal programmers. I am very sorry, but your logic is bad there. A high proportion of unix users

Re: [fpc-pascal] My favourite missing feature

2008-12-24 Thread ik
http://ik.homelinux.org/ On Wed, Dec 24, 2008 at 12:56 PM, Jürgen Hestermann < juergen.hesterm...@gmx.de> wrote: > To use grep, sed, awk, or a text editor effectively, one must >> understand regular expressions. >> > > Maybe. I never used them (except a text editor of course). Everything you > c

Re: [fpc-pascal] My favourite missing feature

2008-12-24 Thread Frank de Groot (Rent-a-Geek)
I agree with Jürgen. It's is much more preferable to write standard Pascal, for many reasons: 1. The number of people proficient in RegExes is very small, and it takes regular practice to keep the skill up. Very bad to be dependent on such a subset of Pascal programmers. 2. RegExes are notori

Re: [fpc-pascal] My favourite missing feature

2008-12-24 Thread Mark Morgan Lloyd
Jürgen Hestermann wrote: To use grep, sed, awk, or a text editor effectively, one must understand regular expressions. Maybe. I never used them (except a text editor of course). Everything you can do with these tools is also possible with a good Pascal compiler (and much more). Very true,

Re: [fpc-pascal] My favourite missing feature

2008-12-24 Thread Jürgen Hestermann
To use grep, sed, awk, or a text editor effectively, one must understand regular expressions. Maybe. I never used them (except a text editor of course). Everything you can do with these tools is also possible with a good Pascal compiler (and much more). So why waste time on learning another

Re: [fpc-pascal] My favourite missing feature

2008-12-24 Thread Mark Morgan Lloyd
Mattias Gaertner wrote: see also http://wiki.lazarus.freepascal.org/IDE_regular_expressions Also http://regexpstudio.com/TRegExpr/Help/regexp_syntax.html which is the one I use with Delphi, not sure whether it's related to the one that FPC bundles. I think I could have used a better exampl

Re: [fpc-pascal] My favourite missing feature

2008-12-24 Thread S. Fisher
--- On Mon, 12/22/08, Mark Morgan Lloyd wrote: > > There's been a recent thread in fpc-other on second > languages, but it appeared to focus more on what was a > useful part of a developer's skillset rather than what > people miss from Pascal. > > What /I/ miss is Perl's pattern matching, and

Re: [fpc-pascal] My favourite missing feature

2008-12-23 Thread ik
On Wed, Dec 24, 2008 at 2:35 AM, Marc Weustink wrote: > Mattias Gaertner wrote: > >> On Wed, 24 Dec 2008 01:41:16 +0200 >> ik wrote: >> >> It looks for a date pattern like the follow >>> >>> 10/10/08 and 10/10/2008 with space and then some other chars as well. >>> >>> I think if it was with bou

Re: [fpc-pascal] My favourite missing feature

2008-12-23 Thread Marc Weustink
Mattias Gaertner wrote: On Wed, 24 Dec 2008 01:41:16 +0200 ik wrote: It looks for a date pattern like the follow 10/10/08 and 10/10/2008 with space and then some other chars as well. I think if it was with boundaries of begin and/or end (^ and $) it would work even better. The () indicates

Re: [fpc-pascal] My favourite missing feature

2008-12-23 Thread Mattias Gaertner
On Wed, 24 Dec 2008 01:41:16 +0200 ik wrote: > It looks for a date pattern like the follow > > 10/10/08 and 10/10/2008 with space and then some other chars as well. > > I think if it was with boundaries of begin and/or end (^ and $) it > would work even better. > > The () indicates groups. eac

Re: [fpc-pascal] My favourite missing feature

2008-12-23 Thread ik
It looks for a date pattern like the follow 10/10/08 and 10/10/2008 with space and then some other chars as well. I think if it was with boundaries of begin and/or end (^ and $) it would work even better. The () indicates groups. each group is the string extracted from the pattern, and can be us

Re: [fpc-pascal] My favourite missing feature

2008-12-23 Thread Marc Weustink
Mark Morgan Lloyd wrote: There seem to be a number of people currently making outrageous suggestions about missing features or how FPC could best be repackaged and promoted, so since it's the season of good will I trust that folk will tolerate this one from me. There's been a recent thread in

Re: [fpc-pascal] My favourite missing feature

2008-12-22 Thread ik
Your regex is awful :) Why not to write it as follows (ruff rewrite): IF cells[2, dateTime] = m|((\d\d)/){2}(\d{2,4})\s.*| THEN BEGIN Anyway, I'm not sure how good idea it will be to have it part of the syntax. Happy Hannuka everyone :P Ido On Mon, Dec 22, 2008 at 7:56 PM, Mark Morgan Lloyd

Re: [fpc-pascal] My favourite missing feature

2008-12-22 Thread Jeff Wormsley
Mark Morgan Lloyd wrote: IF cells[2, dateTime] = /(\d\d)\/(\d\d)\/((\d\d)?\d\d)\s.*/i THEN BEGIN Not only do I have no idea what the above code does, I have no desire to find out! Talk about cryptic. Jeff. -- I haven't smoked for 2 years, 4 months and 5 days, saving $3,864.50 and not smoki

Re: [fpc-pascal] My favourite missing feature

2008-12-22 Thread Mark Morgan Lloyd
Henry Vermaak wrote: 2008/12/22 Mark Morgan Lloyd : .>8 IF cells[2, dateTime] = /(\d\d)\/(\d\d)\/((\d\d)?\d\d)\s.*/i THEN BEGIN i thought for a moment you were trying to draw some nice ascii art :) "Leaning toothpick syndrome" :-) -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT.

Re: [fpc-pascal] My favourite missing feature

2008-12-22 Thread Henry Vermaak
2008/12/22 Mark Morgan Lloyd : > .>8 > IF cells[2, dateTime] = /(\d\d)\/(\d\d)\/((\d\d)?\d\d)\s.*/i THEN BEGIN i thought for a moment you were trying to draw some nice ascii art :) henry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.or

Re: [fpc-pascal] My favourite missing feature

2008-12-22 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > What /I/ miss is Perl's pattern matching, and I miss it to the extent > that in some of my own scripting stuff I've implemented it myself: > > IF cells[2, dateTime] = /(\d\d)\/(\d\d)\/((\d\d)?\d\d)\s.*/i THEN BEGIN >cells[6, 1]:= /1/ + ordina

Re: [fpc-pascal] My favourite missing feature

2008-12-22 Thread Mark Morgan Lloyd
Frank de Groot (Rent-a-Geek) wrote: What /I/ miss is Perl's pattern matching, and I miss it to the extent that in some of my own scripting stuff I've implemented it myself: There are RexExp units available.. I know- you don't really think I've written the code from scratch do you? The issue

Re: [fpc-pascal] My favourite missing feature

2008-12-22 Thread Frank de Groot (Rent-a-Geek)
There are RexExp units available.. What /I/ miss is Perl's pattern matching, and I miss it to the extent that in some of my own scripting stuff I've implemented it myself: ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freep

[fpc-pascal] My favourite missing feature

2008-12-22 Thread Mark Morgan Lloyd
There seem to be a number of people currently making outrageous suggestions about missing features or how FPC could best be repackaged and promoted, so since it's the season of good will I trust that folk will tolerate this one from me. There's been a recent thread in fpc-other on second langu