Thoughts regular expressions in, for example sed

Johnny Rosenberg gurus.knugum at gmail.com
Sat Jan 12 18:21:18 UTC 2013


2013/1/12 Hormatzhan Yiltiz <hyiltiz at gmail.com>:
> That is, of course, is not something that we want. AT MOST, it can be
> just deemed as a feature for *sed*, or even installing the core system is
> out of the question.
> In this case, I strongly agree with Paul.

Well, it's not a debate, I think…

Anyway, I think it could happen if it is created from scratch as
something entirely new with another name, not supposed to be
compatible with anything. If it's good and consistent (and known…),
people might want to use it, and within 200 years or so, well, who
knows what could happen? Will people know what sed is, even as soon as
in 50 years? Or 30?


>
> 祝好,
> Hormetjan Yiltiz    玉尔麦提江·伊里提孜
> Department of Psychology, Peking University
> 010-86751406
> ========================
> He who is worthy to receive his days and nights is worthy to receive all
> else from you (and me).
>                                                  The Prophet, Gibran Kahlil
> Gibran
>
>
> On Sat, Jan 12, 2013 at 4:20 PM, Johnny Rosenberg <gurus.knugum at gmail.com>
> wrote:
>>
>> 2013/1/12 Paul Smith <paul at mad-scientist.net>:
>> > On Sat, 2013-01-12 at 15:05 +0100, Johnny Rosenberg wrote:
>> >> Maybe it's time for ”the next version” (total remake) of the whole
>> >> concept of regular expressions and give it a few decades.
>> >> The old ”version” could then be referred to as ”regular exceptions”…
>> >
>> > There already is a de-facto standard advanced regular expression library
>> > available today: PCRE which is the extraction of Perl's regular
>> > expression implementation into a separate library.  These days pretty
>> > much every new program that wants to support regular expressions uses
>> > that.  It's far and away the most powerful and sophisticated RE
>> > implementation we have.
>> >
>> > But, there are so many hundreds of thousands of scripts out there that
>> > rely on tools like awk, sed, grep, etc. to work the way they do that
>> > there's literally zero chance that their default syntax will be changed
>> > in non-compatible ways.  I'm not sure you grasp how devastating these
>> > kinds of changes would be and how the widespread the impact would be.
>> > There are sed and awk scripts that were written 20 years ago and haven't
>> > been looked at since, still embedded in critical systems all over the
>> > world.
>> >
>> > Not to mention that GNU/Linux is not the only UNIX/POSIX system out
>> > there and so adherence to the POSIX standards is critically important
>> > for people who need to produce portable software--and many of those
>> > people are exactly the same ones who would be making these changes.
>> >
>> > So, no, not gonna happen.
>>
>> That's because everyone says that it's not going to happen…
>> People said that about lots of things 30 years ago, and many of those
>> things doesn't even exist today…
>> I think it could happen, but maybe not within 30 years, but why hurry?
>>
>> > The best you could get would be for everyone
>> > to agree to _add_ PCRE (for example) to the RE-using tools, and have
>> > some extra switch or environment variable that could be set to enable
>> > them for those that wanted it.
>> >
>> >
>> > I'll repeat something I said the other day: you should be learning a
>> > more sophisticated scripting language like Perl.  Perl has all the
>> > capabilities of shell, sed, awk, and just about any other UNIX tool
>> > built in, plus capabilities none of the others can match.  And it has a
>> > regular and consistent syntax, ability to handle unusual filenames
>> > without glitching, etc.  And it is installed, and runs, everywhere.
>> >
>> > I've been working on UNIX systems for... a really, really long time
>> > (since before Linus sat down to write his first kernel).  My personal
>> > rule is that if a shell script I'm writing ever gets longer than about
>> > 25 lines or so, OR if it ever seems necessary to use awk, I chuck it and
>> > write it in Perl instead.  Sed is fine, but if I need awk I might as
>> > well switch to Perl.
>> >
>> >
>> > --
>> > ubuntu-users mailing list
>> > ubuntu-users at lists.ubuntu.com
>> > Modify settings or unsubscribe at:
>> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>>
>> --
>> ubuntu-users mailing list
>> ubuntu-users at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>




More information about the ubuntu-users mailing list