August 04, 2011
More powerful regexes (like in .NET).

The current one is pretty much unusable due to lack of support for Unicode, and lacks lots of important features (named captures come to mind).
August 04, 2011
On Thu, 04 Aug 2011 15:50:18 +0000, Mehrdad wrote:

> More powerful regexes (like in .NET).
> 
> The current one is pretty much unusable due to lack of support for Unicode, and lacks lots of important features (named captures come to mind).

Just a thought -- libpcre is a very popular RE library, available under BSD. It has UTF-8 support, though not support for other Unicode encodings. Google's pcrecpp wrapper might be a source of inspiration. Would a PCRE wrapper be suitable for Phobos?

Graham
August 04, 2011
On 04.08.2011 19:50, Mehrdad wrote:
> More powerful regexes (like in .NET).
>
> The current one is pretty much unusable due to lack of support for
> Unicode, and lacks lots of important features (named captures come to
> mind).

I'm working on a replacement engine as GSOC project, both named captures and modern Unicode support are implemented. I plan to wrap up a public beta by the next week, to get some early feedback.
In terms of speed in general it seems to be on par with PCRE, but I haven't done any pattern-specific tuning (which PCRE surely does).
    I looked over all what .NET supports, and right now new engine has support for the most of it's syntactic riches (including character set operations) albeit with slightly different syntax.
Exceptions: (?(expression)yes| no)  which looks like a hack, (?# comment) and setting flags in midair (?im).
I'll definitely add free spacing syntax mode (see perl) and setting flags though.
Anyway, if you are wondering if I missed any other cool regex feature, just ask :)

-- 
Dmitry Olshansky

August 04, 2011
Am 04.08.2011, 18:42 Uhr, schrieb Graham Fawcett <fawcett@uwindsor.ca>:

> On Thu, 04 Aug 2011 15:50:18 +0000, Mehrdad wrote:
>
>> More powerful regexes (like in .NET).
>>
>> The current one is pretty much unusable due to lack of support for
>> Unicode, and lacks lots of important features (named captures come to
>> mind).
>
> Just a thought -- libpcre is a very popular RE library, available under
> BSD. It has UTF-8 support, though not support for other Unicode encodings.
> Google's pcrecpp wrapper might be a source of inspiration. Would a PCRE
> wrapper be suitable for Phobos?
>
> Graham

I wonder what the general consensus is on wrappers. Berkley Sockets are good, since all supported OSs implement that API somehow. But GUI, PCRE and others need libraries installed. In my perfect world there would be wrappers, but they would work with corresponding libraries on Windows and Posix bases OSs. The idea of package dependencies is just not wide-spread in the Windows world and installing pcre, gtk, cairo, ... together with D on Windows seems clumsy to me :D If these libraries aren't available on Windows then the second best is a unique D implementation.
If D was Linux only then I'd agree. I could understand if others say that the D installer for Windows could install those libraries as well.

Just my 2 cents
August 04, 2011
On 8/2/2011 1:15 PM, Andrej Mitrovic wrote:
> There's a win32 curses-like library around afaik. It uses escape codes
> instead of WinAPI calls.
>
> Btw I've tried using WinAPI for console coloring, it's so damn clumsy
> to use. -_-

I've used this for 25 years now.

http://www.digitalmars.com/rtl/disp.html
August 05, 2011
On 8/4/2011 10:23 AM, Dmitry Olshansky wrote:
> On 04.08.2011 19:50, Mehrdad wrote:
>> More powerful regexes (like in .NET).
>>
>> The current one is pretty much unusable due to lack of support for
>> Unicode, and lacks lots of important features (named captures come to
>> mind).
>
> I'm working on a replacement engine as GSOC project, both named captures and modern Unicode support are implemented. I plan to wrap up a public beta by the next week, to get some early feedback.
> In terms of speed in general it seems to be on par with PCRE, but I haven't done any pattern-specific tuning (which PCRE surely does).
>     I looked over all what .NET supports, and right now new engine has support for the most of it's syntactic riches (including character set operations) albeit with slightly different syntax.
> Exceptions: (?(expression)yes| no)  which looks like a hack, (?# comment) and setting flags in midair (?im).
> I'll definitely add free spacing syntax mode (see perl) and setting flags though.
> Anyway, if you are wondering if I missed any other cool regex feature, just ask :)
>
Dude, that's awesome! Can't wait to see the beta!! :)

August 05, 2011
On 8/4/11, Walter Bright <newshound2@digitalmars.com> wrote:
> I've used this for 25 years now.
>
> http://www.digitalmars.com/rtl/disp.html
>

That's freaking great. And it's already in snn.lib. However this doesn't work on Linux, right?

Works great in D on win32. Thanks W.
August 06, 2011
product(), combinations(), permutations(), etc, are missing from Phobos.


August 06, 2011
Nice to have, a command-line parser.

Jonathan M Davis wrote:
> So, what major functionality which we don't currently have would you like to see in either Phobos or in a 3rd party library so that you could use it in your D programs?
> 
> - Jonathan M Davis

August 06, 2011
On 06.08.2011 19:01, albatroz wrote:
> Nice to have, a command-line parser.

http://www.d-programming-language.org/phobos/std_getopt.html ?