POV-Ray : Newsgroups : povray.off-topic : Mini-languages Server Time
3 Sep 2024 21:15:29 EDT (-0400)
  Mini-languages (Message 89 to 98 of 108)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Warp
Subject: Re: Mini-languages
Date: 13 Nov 2010 08:36:31
Message: <4cde945f@news.povray.org>
Darren New <dne### [at] sanrrcom> 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

From: Warp
Subject: Re: Mini-languages
Date: 13 Nov 2010 08:38:10
Message: <4cde94c1@news.povray.org>
Darren New <dne### [at] sanrrcom> 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

From: Darren New
Subject: Re: Mini-languages
Date: 13 Nov 2010 11:17:18
Message: <4cdeba0e$1@news.povray.org>
Warp wrote:
> Darren New <dne### [at] sanrrcom> 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

From: Darren New
Subject: Re: Mini-languages
Date: 14 Nov 2010 14:20:24
Message: <4ce03678$1@news.povray.org>
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

From: Patrick Elliott
Subject: Re: Mini-languages
Date: 14 Nov 2010 17:26:04
Message: <4ce061fc@news.povray.org>
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

From: Darren New
Subject: Re: Mini-languages
Date: 14 Nov 2010 20:21:58
Message: <4ce08b36$1@news.povray.org>
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

From: scott
Subject: Re: Mini-languages
Date: 15 Nov 2010 06:29:21
Message: <4ce11991$1@news.povray.org>
>> 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

From: Invisible
Subject: Re: Mini-languages
Date: 15 Nov 2010 06:56:00
Message: <4ce11fd0$1@news.povray.org>
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

From: Warp
Subject: Re: Mini-languages
Date: 15 Nov 2010 13:52:14
Message: <4ce1815d@news.povray.org>
Darren New <dne### [at] sanrrcom> 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

From: Darren New
Subject: Re: Mini-languages
Date: 15 Nov 2010 14:29:34
Message: <4ce18a1e@news.povray.org>
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

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.