POV-Ray : Newsgroups : povray.off-topic : Very long post Server Time
7 Sep 2024 03:19:44 EDT (-0400)
  Very long post (Message 41 to 50 of 50)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Joel Yliluoma
Subject: Re: Very long post
Date: 20 Oct 2008 05:54:44
Message: <48fc5564@news.povray.org>
On Tue, 23 Sep 2008 12:32:15 +0100, Invisible wrote:
> Parsec takes a completely different approach - and that is the subject 
> of this text.

What you described -- I didn't read all of it though -- sounds
very much the same as what boost::spirit does in C++.

-- 
Joel Yliluoma - http://iki.fi/bisqwit/


Post a reply to this message

From: Invisible
Subject: Re: Very long post
Date: 20 Oct 2008 06:13:07
Message: <48fc59b3@news.povray.org>
Joel Yliluoma wrote:

> What you described -- I didn't read all of it though -- sounds
> very much the same as what boost::spirit does in C++.

Looking at the Spirit documentation, it *does* indeed look highly 
similar. (Right down to using the ">>" operator for the same purpose 
that Parsec does.)

The difference, of course, is that Spirit uses compile-time template 
insanity to do it's work, whereas Parsec does all its cleverness at 
runtime. (So Spirit is probably faster, and Parsec supports constructing 
user-defined parsers at runtime.)


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Very long post
Date: 20 Oct 2008 17:27:08
Message: <48fcf7ac@news.povray.org>
Invisible wrote:
> So Spirit is probably faster

To run, sure. But it probably takes even longer than your average Boost
library to compile :)

(seriously, many boost libraries are like compiler stress-tests)


Post a reply to this message

From: Invisible
Subject: Re: Very long post
Date: 21 Oct 2008 03:53:19
Message: <48fd8a6f$1@news.povray.org>
Nicolas Alvarez wrote:
> Invisible wrote:
>> So Spirit is probably faster
> 
> To run, sure. But it probably takes even longer than your average Boost
> library to compile :)
> 
> (seriously, many boost libraries are like compiler stress-tests)

Hmm... interesting. Template metaprogramming FTW? :-P


Post a reply to this message

From: Warp
Subject: Re: Very long post
Date: 21 Oct 2008 08:09:51
Message: <48fdc68f@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> Nicolas Alvarez wrote:
> > Invisible wrote:
> >> So Spirit is probably faster
> > 
> > To run, sure. But it probably takes even longer than your average Boost
> > library to compile :)
> > 
> > (seriously, many boost libraries are like compiler stress-tests)

> Hmm... interesting. Template metaprogramming FTW? :-P

  Well, one idea (or maybe more a side-effect) of template metaprogramming
is: Why calculate something at runtime if you can do it at compile time?

  It often may result in faster binaries. OTOH there are some huge projects
where compilation times are counted in hours rather than seconds, where
significantly slower compilation times might become an issue.

-- 
                                                          - Warp


Post a reply to this message

From: Invisible
Subject: Re: Very long post
Date: 21 Oct 2008 08:21:26
Message: <48fdc946$1@news.povray.org>
Warp wrote:

>   Well, one idea (or maybe more a side-effect) of template metaprogramming
> is: Why calculate something at runtime if you can do it at compile time?
> 
>   It often may result in faster binaries. OTOH there are some huge projects
> where compilation times are counted in hours rather than seconds, where
> significantly slower compilation times might become an issue.

I personally tend to prefer longer compile times for shorter runtimes.

OTOH, the largest programs I've ever written probably didn't exceed a 
few hundred lines, so...


Post a reply to this message

From: Darren New
Subject: Re: Very long post
Date: 21 Oct 2008 11:42:47
Message: <48fdf877@news.povray.org>
Warp wrote:
>   It often may result in faster binaries. OTOH there are some huge projects
> where compilation times are counted in hours rather than seconds, where
> significantly slower compilation times might become an issue.

I remember reading of an Ada project where the customer was complaining 
the vendor's compiler was too slow. The vendor looked at the code, 
basically said "WTF mate?" and pointed out that using packages nested 
dozens of levels deep (the equivalent of templates referring to 
templates recursively dozens of times) are going to be slow to compile, 
and they asked the customer why they picked that technique. The customer 
pointed out that it was in the vendor's sample files. The vendor pointed 
out that *that* sample file was a compiler stress-test designed to 
validate the compiler doesn't choke even under awful programming 
practices. :-)

-- 
Darren New / San Diego, CA, USA (PST)


Post a reply to this message

From: Stephen
Subject: Re: Very long post
Date: 21 Oct 2008 11:56:32
Message: <9turf49h11eidcfl95d5395eobe80tl211@4ax.com>
On Tue, 21 Oct 2008 08:42:48 -0700, Darren New <dne### [at] sanrrcom> wrote:

> The customer 
>pointed out that it was in the vendor's sample files. The vendor pointed 
>out that *that* sample file was a compiler stress-test designed to 
>validate the compiler doesn't choke even under awful programming 
>practices. :-)

LOL
-- 

Regards
     Stephen


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Very long post
Date: 21 Oct 2008 18:01:13
Message: <48fe5129@news.povray.org>
Darren New wrote:
> I remember reading of an Ada project where the customer was complaining
> the vendor's compiler was too slow. The vendor looked at the code,
> basically said "WTF mate?" and pointed out that using packages nested
> dozens of levels deep (the equivalent of templates referring to
> templates recursively dozens of times) are going to be slow to compile,
> and they asked the customer why they picked that technique. The customer
> pointed out that it was in the vendor's sample files. The vendor pointed
> out that *that* sample file was a compiler stress-test designed to
> validate the compiler doesn't choke even under awful programming
> practices. :-)
> 

I recall that, couldn't find the exact quote anywhere though.

"WTF? Why the hell are you coding like that?"
"Well, we modelled it after one of your samples"
"That wasn't a sample, that was a compiler stress-test!"


Post a reply to this message

From: Joel Yliluoma
Subject: Re: Very long post
Date: 31 Oct 2008 03:37:58
Message: <490ab5d6$1@news.povray.org>
On Mon, 20 Oct 2008 19:27:16 -0200, Nicolas Alvarez wrote:
> Invisible wrote:
>> So Spirit is probably faster
>
> To run, sure. But it probably takes even longer than your average Boost
> library to compile :)
>
> (seriously, many boost libraries are like compiler stress-tests)

It indeed does. Here's an error message I got from gcc
when I was developing a certain project using the Spirit parser.

http://bisqwit.iki.fi/kala/gargantuan-gcc-error-message.bz2
(bzip2 -compressed text for your convenience).

Mind you, that file contains just _one_ error message,
together with its "instantiated from" lines.

-- 
Joel Yliluoma - http://iki.fi/bisqwit/


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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