POV-Ray : Newsgroups : povray.off-topic : Mini-languages Server Time
4 Sep 2024 09:19:58 EDT (-0400)
  Mini-languages (Message 81 to 90 of 108)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Orchid XP v8
Subject: Re: Mini-languages
Date: 12 Nov 2010 15:49:36
Message: <4cdda860$1@news.povray.org>
On 12/11/2010 08:44 PM, nemesis wrote:

> its from the mailing list, isn't it?

What, you think *I* could invent something this awesome?

Yes, of course it's from the mailing list...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Orchid XP v8
Subject: Re: Mini-languages
Date: 12 Nov 2010 15:51:18
Message: <4cdda8c6$1@news.povray.org>
>> I don't understand the specification.
>
> I even expressed it in Haskell-ish syntax.
>
> "Zero or more A's, followed by zero or more A's, followed by zero or
> more A's, followed by three A's."

In what way is that different from "zero or more As"?

> The fact that you can't read the link I provided is screaming out that
> you need to learn how to read that link. Not knowing even the basics of
> regular expressions is like not knowing even the basics of TCP.

Except that regular expressions are an obscure topic used almost nowhere 
except in text-mangling languages like Perl.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Orchid XP v8
Subject: Re: Mini-languages
Date: 12 Nov 2010 16:01:59
Message: <4cddab47$1@news.povray.org>
On 12/11/2010 05:24 PM, Darren New wrote:
> Invisible wrote:
>> Apparently you have a radically different idea of "ubiquitous" than I
>> do...
>
> Regular expressions are the same as state machines.

Sure. Just expressed in an unecessarily cryptic mannar.

If a state machine is a good way to solve your problem, why not express 
it clearly? And why limit it to only operating on characters?

> Let me list a few of the programs I use every day that support and use
> regular expressions:
>
> .NET
> VI
> EMacs
> Grep
> Find
> Bash
> Perl
> Awk
> Sed
> Flex

...so, basically Unix text-mangling tools then?

> javascript

That's the third time I've heard somebody say that. I've yet to see it.

> 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.

> Pretty much every programming language since COBOL

Really. Because your list seems to include only low-level scripting 
languages. I don't see regexs in Pascal, C, Eiffel, etc.

> Let me list a few of the programs that support the parser you prefer:
>
> Haskell

I'm pretty sure that Haskell is not the only programming language that 
offers real parser construction tools. Parsec is merely an example of 
such. (If you /really/ want to split hairs, Parsec has actually been 
ported to [at least] Java, Ruby and C#. But that's not the point.)

> So, yeah, the fact that your education sucks doesn't mean bupkiss about
> what actually goes on in the real world. :-)

Right. Because Unix text-mangling is all that happens in "the real 
world", naturally...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Orchid XP v8
Subject: Re: Mini-languages
Date: 12 Nov 2010 16:04:57
Message: <4cddabf9$1@news.povray.org>
>> I give up.
>
> <Yoda> And that is why you fail. </Yoda>
>
> You're making assertions with no experience. You've already admitted you
> don't know how regular expressions work, yet here you are telling *me*
> that building them programatically is "incredibly fragile". You're
> talking out your ass, my dear.

Goodbye.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Darren New
Subject: Re: Mini-languages
Date: 12 Nov 2010 21:34:26
Message: <4cddf932$1@news.povray.org>
Orchid XP v8 wrote:
>>> I give up.
>>
>> <Yoda> And that is why you fail. </Yoda>
>>
>> You're making assertions with no experience. You've already admitted you
>> don't know how regular expressions work, yet here you are telling *me*
>> that building them programatically is "incredibly fragile". You're
>> talking out your ass, my dear.
> 
> Goodbye.

Sorry. That *was* kind of harsh.

-- 
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: 12 Nov 2010 21:37:44
Message: <4cddf9f8@news.povray.org>
Orchid XP v8 wrote:
> If a state machine is a good way to solve your problem, why not express 
> it clearly? And why limit it to only operating on characters?

It is clearly expressed, and it's not limited to only operating on 
characters.  What can I say?

> ...so, basically Unix text-mangling tools then?

No. Most anything working with text.

>> Pretty much every programming language since COBOL
> 
> Really. Because your list seems to include only low-level scripting 
> languages. I don't see regexs in Pascal, C, Eiffel, etc.

Libraries, dear. Few languages have them built into the syntax.

>> Let me list a few of the programs that support the parser you prefer:
>>
>> Haskell
> 
> I'm pretty sure that Haskell is not the only programming language that 
> offers real parser construction tools. Parsec is merely an example of 
> such. 

Sure. And the other languages have real parser tools too.  Bison, for 
example, if nothing else.

>> So, yeah, the fact that your education sucks doesn't mean bupkiss about
>> what actually goes on in the real world. :-)
> 
> Right. Because Unix text-mangling is all that happens in "the real 
> world", naturally...

No, because it's used much more widely, yet you've never seen it.  Every 
state machine is a regular expression matcher. Those pictures of state 
transitions in TCP? Regular expressions.  The "railroad track" diagrams in 
the Pascal standard? Regular expressions.

-- 
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: 12 Nov 2010 22:27:32
Message: <4cde05a4$1@news.povray.org>
Orchid XP v8 wrote:
>>> I don't understand the specification.
>>
>> I even expressed it in Haskell-ish syntax.
>>
>> "Zero or more A's, followed by zero or more A's, followed by zero or
>> more A's, followed by three A's."
> 
> In what way is that different from "zero or more As"?

That's not the point. Replace "A" with "phone number" and you have the same 
problem.

> Except that regular expressions are an obscure topic used almost nowhere 
> except in text-mangling languages like Perl.

No, they're really not. That's what I'm trying to explain. That's like 
saying "state machines are really irrelevant" or "parsers are an obscure topic."

-- 
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: 12 Nov 2010 22:28:51
Message: <4cde05f3$1@news.povray.org>
Orchid XP v8 wrote:
> "Also [scripting languages] 'don't scale well', which I guess means that 
> they don't make it inconvenient to design badly."

Amusingly, that's exactly true. :-)

-- 
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: 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

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

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