lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Jim once stated:
> On 10/3/18, Sean Conner <sean@conman.org> wrote:
> > On Windows, POSIX isn't part of the C library
> > (although I could be wrong, but I would find it surprising).
> 
> but even M$ provides some limited POSIX functionality.
> but this is not much of a problem, see below.
> 
> sounds a bit like you don't use their nice products anyway. :D
> maybe even if you were paid for doing so, who knows ? ;-)

  The last (and only) time I did development under Windows was in 1996 when
I wrote a Java Applet for the company I was working for at the time.  I
haven't used Windows since.

> > I don't know which Unix you are using, but the ones I've had
> > experience with never came with regex "for free" (as part of libc).
> 
> Linux with glibc and musl (the latter uses the TRE lib.
> i am sure ulibc has that as well). ever used that ?
> when trying it out have a look at /usr/include/regex*.h and man 3 regex.
> same for the BSDs and of course macOS, Solaris, AIX, and HP-UX since they are
> certified (and marketed) as conforming to POSIX standards.
> 
> >> well posix requires regex to be found in <regex.h>, so every unix has
> >> them, from aix to the bsds, its in the libc that one has to use anyway.
> >> so its there for FREE on all relevant unix platforms.
> 
> > Again, not always so in my exerience.
> 
> what non POSIX OS do you use ?

  Well, MS-DOS and AmigaOS spring to mind.

  But I finally tracked down the source of my issues, and yes, I was
mistaken, regex *was* a part of the Unix system I was using at the time
(Linux) but it was a horrible experience in using it.

  I was never liked regex.  Ever.  I find them exceedingly hard to
understand as they devolve into line noise in my opinion.  Not only do I
find them hard to read, but you can't combine them (unlike LPEG, which you
can easily build up piecemeal and combine---very nice).

  Anyway, the *one* time I tried using them in a program I wrote made the
program *SLOWER* than the ad-hoc command line with multiple greps piped
together [1].  I ended up having to download an external regex library and
compile that because the system provided one was completely borked beyond
usability.

  Have I mentioned I really don't like regex?

  Anyway, I misremembered some details from 16 years ago.

  -spc (I really don't understand why you feel such functionality *has* to
	be included when it's available as third party code ... )

[1]	For the gritty details:
	http://boston.conman.org/2003/01/12.1