 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> Darren New wrote:
> > http://swtch.com/~rsc/regexp/regexp1.html
> Oh, and given that .NET compiles regular expression matches down to machine
> code, I was really rather surprised to discover that it too exhibits
> exponential runtime for the shown test expressions, even tho it doesn't need
> to. I can't imagine why you'd go to the effort of having an option to
> compile the thing to machine code if you're going to be too lazy to do the
> trivial check it takes to determine whether you need a linear or exponential
> algorithm.
Well, consider who developed .NET.
These are the same people who will not bother fixing their broken
C preprocessor even though they know it's broken (they have officially
stated that they won't fix it anytime soon).
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> http://swtch.com/~rsc/regexp/regexp1.html
> Or, in your language
> many (char 'a')
> many (char 'a')
> many (char 'a')
> char 'a'
> char 'a'
> char 'a'
I think you are confusing "a?" with "a*" (the webpage in question uses
the former).
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Darren New <dne### [at] san rr com> wrote:
>> http://swtch.com/~rsc/regexp/regexp1.html
>
>> Or, in your language
>> many (char 'a')
>> many (char 'a')
>> many (char 'a')
>> char 'a'
>> char 'a'
>> char 'a'
>
> I think you are confusing "a?" with "a*" (the webpage in question uses
> the former).
It works either way. The point is to make the first thing (A* or A?) match
what needs to be left behind to match the second thing (A). Then you have to
backtrack to get a match.
--
Darren New, San Diego CA, USA (PST)
Serving Suggestion:
"Don't serve this any more. It's awful."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> These are the same people who will not bother fixing their broken
> C preprocessor even though they know it's broken (they have officially
> stated that they won't fix it anytime soon).
BTW, I don't think it's likely a matter of "won't bother" as much as it is
"have decided backwards-bug-compatibility is more important to our business
than being correct." There are a fair number of bugs in various MS products
that don't get fixed because people are depending upon the buggy behavior.
Remind me again what the problem is?
--
Darren New, San Diego CA, USA (PST)
Serving Suggestion:
"Don't serve this any more. It's awful."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 11/14/2010 12:20 PM, Darren New wrote:
> Warp wrote:
>> These are the same people who will not bother fixing their broken
>> C preprocessor even though they know it's broken (they have officially
>> stated that they won't fix it anytime soon).
>
> BTW, I don't think it's likely a matter of "won't bother" as much as it
> is "have decided backwards-bug-compatibility is more important to our
> business than being correct." There are a fair number of bugs in various
> MS products that don't get fixed because people are depending upon the
> buggy behavior.
>
> Remind me again what the problem is?
>
Ugh.. Don't you just love that. Like Second Life. Their 3D conversion
code is *wrong* and has been since day one (one reason using it is a
pain in the ass), but it would "break" millions of scripts to fix it,
and would be, their words, "confusing", to include an alternate version
that did work... Gah!
--
void main () {
If Schrödingers_cat is alive or version > 98 {
if version = "Vista" {
call slow_by_half();
call DRM_everything();
}
call functional_code();
}
else
call crash_windows();
}
<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models,
3D Content, and 3D Software at DAZ3D!</A>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Patrick Elliott wrote:
> Ugh.. Don't you just love that.
It is indeed one of the primary banes of computer programming. And as
programs get more and more sophisticated and less and less reasonable to
write with just one group of people, it's only going to get worse.
--
Darren New, San Diego CA, USA (PST)
Serving Suggestion:
"Don't serve this any more. It's awful."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Pretty much every editor above the level of notepad
>
> It's no secret that emacs and vi think this is a good idea. I don't
> recall seeing any other editors use it though.
http://en.wikipedia.org/wiki/Comparison_of_text_editors#Basic_features
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 15/11/2010 11:29 AM, scott wrote:
>>> Pretty much every editor above the level of notepad
>>
>> It's no secret that emacs and vi think this is a good idea. I don't
>> recall seeing any other editors use it though.
>
> http://en.wikipedia.org/wiki/Comparison_of_text_editors#Basic_features
Man. Who knew that so many editors exist?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> Warp wrote:
> > These are the same people who will not bother fixing their broken
> > C preprocessor even though they know it's broken (they have officially
> > stated that they won't fix it anytime soon).
> BTW, I don't think it's likely a matter of "won't bother" as much as it is
> "have decided backwards-bug-compatibility is more important to our business
> than being correct." There are a fair number of bugs in various MS products
> that don't get fixed because people are depending upon the buggy behavior.
> Remind me again what the problem is?
Basically, preprocessor macro expansion should never create new tokens
unless the token pasting operator (##) is explicitly used to do so. However,
Microsoft's C preprocessor doesn't take this into account at all.
For example, if you have:
#define STAR *
then /STAR should not start a comment. However, it does start a comment in
MSVC. Likewise if you have:
#define X -1
#define Y -X
then instantiating Y should not be an attempt to decrement a literal.
However, in MSVC it is.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Basically, preprocessor macro expansion should never create new tokens
> unless the token pasting operator (##) is explicitly used to do so. However,
> Microsoft's C preprocessor doesn't take this into account at all.
I see. I can see where that would (A) really annoy and confuse people
expecting the standard behavior and (B) would really annoy people who relied
on it if it got changed. :-) All the more reason to make sure stuff works
before releasing it.
--
Darren New, San Diego CA, USA (PST)
Serving Suggestion:
"Don't serve this any more. It's awful."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |