Live data from Hacker News

Perl Regex Removed From Grep in Mountain Lion

dirtdon.com

11–20 of 63 posts

Re: Perl Regex Removed From Grep in Mountain Lion

#11
post #2

This contradicts a clear historical trend in which Perl regex syntax and POSIX regex syntax (not the same) are being more widely adopted as time passes. It's a definite step backward.

This wasn't a deliberate decision on Apple's part to remove this particular functionality. Rather, they switched to a different implementation of grep (BSD instead of GNU) and it leaves out PCRE support by default. If word of this gets back to whoever made the change, it should be a simple matter to reenable it for future versions of OS X.

Re: Perl Regex Removed From Grep in Mountain Lion

#12
post #4

something i'm curious about - for linux fans who have made the switch, is osx an "acceptable unix"? people keep trumpeting the fact that it combines the best of both worlds, a seamless gui experience atop a full-fledged posix core complete with a bash prompt you can drop down to as easily as you can in linux, but philosophically it seems that for the little things like package management, command line utilities, etc.…

These sorts of issues (primarily related to auxiliary functions in grep, sed, etc) can cause portability issues when developing locally for linux systems, but no worse thanks, say, writing for fedora on an Ubuntu box. Brew is okay but a bit sparse. For me I mostly miss Gnome

Re: Perl Regex Removed From Grep in Mountain Lion

#13
post #5

http://wiki.freebsd.org/BSDgrep BSD grep has been imported to 9.0-CURRENT on July 22, 2010. It has been obtained from the OpenBSD and the FreeGrep projects to make it appropriate for our needs to provide GNU compatibility and let ports build without problems. GNU compatibility is almost 100%, the only missing feature is -P (--perl-regex), which is not possible to support without having PCRE in base system and anyway,…

Since the introduction of the GPL3, there's been a steady purge of GNU software from OS X. This is why Apple's GCC, bash, etc. are stuck at old versions lacking a variety of useful features. I'm kind of curious what they'll do about Emacs. It doesn't have a BSD-licensed counterpart like everything else they've removed... Maybe they'll just leave it out.

The built in Emacs is languishing along side the built-in bash. It's GNU Emacs 22.1 from "2007 April 13" (according to the man page) which is going on 5 years old at this point. The current release of Emacs is 24.2. You can get a binary of it here: http://www.emacsformacosx.com/

Re: Perl Regex Removed From Grep in Mountain Lion

#14
post #5

http://wiki.freebsd.org/BSDgrep BSD grep has been imported to 9.0-CURRENT on July 22, 2010. It has been obtained from the OpenBSD and the FreeGrep projects to make it appropriate for our needs to provide GNU compatibility and let ports build without problems. GNU compatibility is almost 100%, the only missing feature is -P (--perl-regex), which is not possible to support without having PCRE in base system and anyway,…

Since the introduction of the GPL3, there's been a steady purge of GNU software from OS X. This is why Apple's GCC, bash, etc. are stuck at old versions lacking a variety of useful features. I'm kind of curious what they'll do about Emacs. It doesn't have a BSD-licensed counterpart like everything else they've removed... Maybe they'll just leave it out.

Since the introduction of the GPL3, there's been a steady purge of GNU software from OS X.

Is it all GNU software that's being purged, or just the GPLv3 licensed stuff? If the latter, I can't say I blame them. The former case can go either way but I guess it's good to future-proof early.

Re: Perl Regex Removed From Grep in Mountain Lion

#15
post #4

something i'm curious about - for linux fans who have made the switch, is osx an "acceptable unix"? people keep trumpeting the fact that it combines the best of both worlds, a seamless gui experience atop a full-fledged posix core complete with a bash prompt you can drop down to as easily as you can in linux, but philosophically it seems that for the little things like package management, command line utilities, etc.…

Oh, no, the experience is way better than Cygwin. Cygwin feels exactly like what it is a: bolt-on trying to emulate features and filesystem structures of a completely alien OS. It feels clunky, what you see when you do 'ls' at the 'root' of your filesystem is completely different to what you see when you 'dir' (or use the Windows Explorer.) OS X is a completely different story. If you ever used BSD before, you know h…

My Cygwin experience has been quite authentic actually.

But I was cheating, I'd use it for SSH and rxvt in combination with xming to establish a forwarded X session. (And x-mouse and alt-drag for that nearly authentic mouse behaviour.) Desperate times, desperate measures.

Re: Perl Regex Removed From Grep in Mountain Lion

#16
post #14

Earlier quoted context omitted.

Since the introduction of the GPL3, there's been a steady purge of GNU software from OS X. This is why Apple's GCC, bash, etc. are stuck at old versions lacking a variety of useful features. I'm kind of curious what they'll do about Emacs. It doesn't have a BSD-licensed counterpart like everything else they've removed... Maybe they'll just leave it out.

Since the introduction of the GPL3, there's been a steady purge of GNU software from OS X. Is it all GNU software that's being purged, or just the GPLv3 licensed stuff? If the latter, I can't say I blame them. The former case can go either way but I guess it's good to future-proof early.

As far as I know, all GNU software went to GPLv3. Literally all of it. Even things with no substantial updates since 2007.

Re: Perl Regex Removed From Grep in Mountain Lion

#17
post #4

something i'm curious about - for linux fans who have made the switch, is osx an "acceptable unix"? people keep trumpeting the fact that it combines the best of both worlds, a seamless gui experience atop a full-fledged posix core complete with a bash prompt you can drop down to as easily as you can in linux, but philosophically it seems that for the little things like package management, command line utilities, etc.…

These sorts of issues (primarily related to auxiliary functions in grep, sed, etc) can cause portability issues when developing locally for linux systems, but no worse thanks, say, writing for fedora on an Ubuntu box. Brew is okay but a bit sparse. For me I mostly miss Gnome

I think it's clear it's going to get a lot worse with Apple purging GNU utils.

Re: Perl Regex Removed From Grep in Mountain Lion

#18
post #4

something i'm curious about - for linux fans who have made the switch, is osx an "acceptable unix"? people keep trumpeting the fact that it combines the best of both worlds, a seamless gui experience atop a full-fledged posix core complete with a bash prompt you can drop down to as easily as you can in linux, but philosophically it seems that for the little things like package management, command line utilities, etc.…

I write a lot if code targeting Linux on OSX. Mostly Java (with some JNI) and C. Sure there are some bits that have to be different. Perhaps 5%? But once that is abstracted away I can do almost all work in OSX then build on Linux.

Of course a decade of writing portable C across BSD and Linux systems might make this a bit easier for me than others. And it's worth it to me to avoid the Linux desktop experience (which I did use as my primary desktop from 1996 til about 2 years ago).

Re: Perl Regex Removed From Grep in Mountain Lion

#19
post #10

Earlier quoted context omitted.

Its not close to GNU tools but its very true to Unix tools. Many of the tools have the same options (if not the same man pages) as their Free/Open/NetBSD versions.

ah - that's an interesting distinction. i guess linux has gotten me subconsciously used to thinking of the gnu tools as the current unix standard.

but (by recursive definition) GNU is Not Unix

Re: Perl Regex Removed From Grep in Mountain Lion

#20
post #14

Earlier quoted context omitted.

Since the introduction of the GPL3, there's been a steady purge of GNU software from OS X. Is it all GNU software that's being purged, or just the GPLv3 licensed stuff? If the latter, I can't say I blame them. The former case can go either way but I guess it's good to future-proof early.

As far as I know, all GNU software went to GPLv3. Literally all of it. Even things with no substantial updates since 2007.

Isn't (one of) the points of the GPL that you cannot change the licensing of the software?
Post reply on HN