Re: Generic character types of gregex are unrecognised

2009-01-10 Thread tks
No - it's actually not obvious, especially since regular expressions are a separate type in some other languages. Liam yeah, I'm almost always writing codes in Python these days and it seems to put the manner of C out of my mind. Thank you for your kindness.

Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?

2009-01-10 Thread Andrew W. Nosenko
On Fri, Jan 9, 2009 at 9:23 PM, Michael Natterer mi...@gimp.org wrote: On Fri, 2009-01-09 at 13:03 -0500, Andrew Paprocki wrote: On Fri, Jan 9, 2009 at 7:11 AM, Michael Natterer mi...@gimp.org wrote: Should I patch GParamSpecDouble to have two :1 fields for 'allow_nan', 'allow_inf' and make

Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?

2009-01-10 Thread Andrew W. Nosenko
On Fri, Jan 9, 2009 at 8:03 PM, Andrew Paprocki and...@ishiboo.com wrote: Well, it brings up a few issues.. If someone defined a param spec with a minimum/maximum value, Nan/Inf/-Inf are separate values that were previously disallowed by the current code. So in my mind, making every double

Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?

2009-01-10 Thread Andrew W. Nosenko
On Sat, Jan 10, 2009 at 1:29 PM, Andrew W. Nosenko andrew.w.nose...@gmail.com wrote: Excuse me, but you indeed think that anyone, who uses 'double' (as C Sorry, mistyping. but why you think instead of but you indeed think, of course. -- Andrew W. Nosenko andrew.w.nose...@gmail.com

Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?

2009-01-10 Thread Brian J. Tarricone
On Sat, 10 Jan 2009 13:42:31 +0200 Andrew W. Nosenko wrote: First at all, could you provide any real-world example, where min/max restriction on GParamSpec could be usefull? The reason is simple: when validation fails, the application has no way to know about it and, therefore, to do

Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?

2009-01-10 Thread Nicola Fontana
On Sat, 10 Jan 2009 13:42:31 +0200 Andrew W. Nosenko andrew.w.nose...@gmail.com wrote: First at all, could you provide any real-world example, where min/max restriction on GParamSpec could be usefull? The reason is simple: when validation fails, the application has no way to know about it

Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?

2009-01-10 Thread Andrew W. Nosenko
On Sat, Jan 10, 2009 at 2:06 PM, Brian J. Tarricone bj...@cornell.edu wrote: On Sat, 10 Jan 2009 13:42:31 +0200 Andrew W. Nosenko wrote: First at all, could you provide any real-world example, where min/max restriction on GParamSpec could be usefull? The reason is simple: when validation

Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?

2009-01-10 Thread Andrew W. Nosenko
On Sat, Jan 10, 2009 at 2:06 PM, Brian J. Tarricone bj...@cornell.edu wrote: On Sat, 10 Jan 2009 13:42:31 +0200 Andrew W. Nosenko wrote: First at all, could you provide any real-world example, where min/max restriction on GParamSpec could be usefull? The reason is simple: when validation

Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?

2009-01-10 Thread Andrew Paprocki
On Sat, Jan 10, 2009 at 7:06 AM, Brian J. Tarricone bj...@cornell.edu wrote: But I don't disagree that NaN or +/- inf should be allowed, assuming a restriction such as the above isn't in place for the particular instance of GParamSpecDouble. This brings up an interesting question.. if the

Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?

2009-01-10 Thread Yu Feng
Logically this doesn't work, because G_MAXDOUBLE is smaller than Inf and NaN is not part of the ordered double numbers. Why can't one use -Inf and Inf to create GParamSpec? Yu On Sat, 2009-01-10 at 12:17 -0500, Andrew Paprocki wrote: On Sat, Jan 10, 2009 at 7:06 AM, Brian J. Tarricone

Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?

2009-01-10 Thread Yu Feng
On Sat, 2009-01-10 at 14:30 +0200, Andrew W. Nosenko wrote: On Sat, Jan 10, 2009 at 2:06 PM, Brian J. Tarricone bj...@cornell.edu wrote: On Sat, 10 Jan 2009 13:42:31 +0200 Andrew W. Nosenko wrote: First at all, could you provide any real-world example, where min/max restriction on