POV-Ray : Newsgroups : povray.off-topic : Ratatouille Server Time
10 Oct 2024 21:15:19 EDT (-0400)
  Ratatouille (Message 50 to 59 of 59)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Darren New
Subject: Re: Ratatouille
Date: 27 Mar 2008 12:56:46
Message: <47ebdfde$1@news.povray.org>
Orchid XP v7 wrote:
> Yeah, true. And that's the kind of trick Haskell's compiler is likely to 
> pull off too...

I thought it was pretty cool that the latest Erlang compilers will see 
code like

map(F, [H|T]) -> [F(H)|map(F,T)];
map(F, []) -> [].

and turn it into the same code you'd get with an auxiliary accumulator 
and a call to "reverse" at the end.

-- 
   Darren New / San Diego, CA, USA (PST)
     "That's pretty. Where's that?"
          "It's the Age of Channelwood."
     "We should go there on vacation some time."


Post a reply to this message

From: Orchid XP v7
Subject: Re: Ratatouille
Date: 27 Mar 2008 13:00:33
Message: <47ebe0c1$1@news.povray.org>
Darren New wrote:

> I thought it was pretty cool that the latest Erlang compilers will see 
> code like
> 
> map(F, [H|T]) -> [F(H)|map(F,T)];
> map(F, []) -> [].
> 
> and turn it into the same code you'd get with an auxiliary accumulator 
> and a call to "reverse" at the end.

Doesn't reverse require N operations? Wouldn't that mean that map now 
takes 2N operations instead of just N?

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


Post a reply to this message

From: andrel
Subject: Re: Ratatouille
Date: 27 Mar 2008 15:27:33
Message: <47EC0352.8020906@hotmail.com>
Orchid XP v7 wrote:
> Darren New wrote:
> 
>> Hey, Mark Chu-Carrol. I went to grad school with him, back when he was 
>> Mark Carrol. Actually, I knew his wife Chu also. :-)  Funky where you 
>> run across people.
> 
> Not when you live by yourself in your bedroom...
> 
Trying to visualize you running across people in your bedroom...

Weird.


Post a reply to this message

From: Orchid XP v7
Subject: Re: Ratatouille
Date: 27 Mar 2008 17:11:46
Message: <47ec1ba2$1@news.povray.org>
andrel wrote:

> Trying to visualize you running across people in your bedroom...
> 
> Weird.

Not as weird as the picture *I* had in my head when I mis-parsed your 
sentence as "running *across* people in your bedroom"... o_O

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


Post a reply to this message

From: andrel
Subject: Re: Ratatouille
Date: 27 Mar 2008 17:18:37
Message: <47EC1D5A.8040608@hotmail.com>
Orchid XP v7 wrote:
> andrel wrote:
> 
>> Trying to visualize you running across people in your bedroom...
>>
>> Weird.
> 
> Not as weird as the picture *I* had in my head when I mis-parsed your 
> sentence as "running *across* people in your bedroom"... o_O
> 
Where was the mis-parsing in that?


Post a reply to this message

From: Orchid XP v7
Subject: Re: Ratatouille
Date: 27 Mar 2008 17:43:13
Message: <47ec2301$1@news.povray.org>
>>> Trying to visualize you running across people in your bedroom...
>>>
>>> Weird.
>>
>> Not as weird as the picture *I* had in my head when I mis-parsed your 
>> sentence as "running *across* people in your bedroom"... o_O
>>
> Where was the mis-parsing in that?

To "run across" somebody is a figure of speach. I took it literally. [As 
in, I had visions of people laying on the ground and having me run 
across them, sort of like crowd surfing...]

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


Post a reply to this message

From: andrel
Subject: Re: Ratatouille
Date: 27 Mar 2008 18:48:49
Message: <47EC327E.3070604@hotmail.com>
Orchid XP v7 wrote:
>>>> Trying to visualize you running across people in your bedroom...
>>>>
>>>> Weird.
>>>
>>> Not as weird as the picture *I* had in my head when I mis-parsed your 
>>> sentence as "running *across* people in your bedroom"... o_O
>>>
>> Where was the mis-parsing in that?
> 
> To "run across" somebody is a figure of speech. I took it literally. [As 
> in, I had visions of people laying on the ground and having me run 
> across them, sort of like crowd surfing...]
> 
Me too. Note that English is not my mother tongue (indeed my mother has 
that horrible 1950's Dutch accent when trying to speak English.) so it 
is probably more easy for me to take figures of speech literally. It may 
also come from reading too much Pratchett.


Post a reply to this message

From: Doctor John
Subject: Re: Ratatouille
Date: 28 Mar 2008 14:03:27
Message: <47ed40ff$1@news.povray.org>
andrel wrote:
>
> Me too. Note that English is not my mother tongue (indeed my mother has
> that horrible 1950's Dutch accent when trying to speak English.) <snip>
What's wrong with a Dutch accent? I used to have a Dutch gf and even now
I find English spoken with a pronounced nederlandse accent _really_ sexy.

John

-- 
I will be brief but not nearly so brief as Salvador Dali, who gave the
world's shortest speech. He said, "I will be so brief I am already
finished," then he sat down.


Post a reply to this message

From: Darren New
Subject: Re: Ratatouille
Date: 28 Mar 2008 14:09:17
Message: <47ed425d$1@news.povray.org>
Orchid XP v7 wrote:
> Darren New wrote:
> 
>> I thought it was pretty cool that the latest Erlang compilers will see 
>> code like
>>
>> map(F, [H|T]) -> [F(H)|map(F,T)];
>> map(F, []) -> [].
>>
>> and turn it into the same code you'd get with an auxiliary accumulator 
>> and a call to "reverse" at the end.
> 
> Doesn't reverse require N operations? Wouldn't that mean that map now 
> takes 2N operations instead of just N?

Probably. But note that map as I wrote it isn't tail recursive, unless 
the compiler can do what I said.  Hence, on a list of 10,000 elements, 
the code there will take 10,000 stack frames.  The compiler is now smart 
enough to see what you're doing and generate tail-recursive code from it.

-- 
   Darren New / San Diego, CA, USA (PST)
     "That's pretty. Where's that?"
          "It's the Age of Channelwood."
     "We should go there on vacation some time."


Post a reply to this message

From: andrel
Subject: Re: Ratatouille
Date: 28 Mar 2008 17:50:45
Message: <47ED7662.8000206@hotmail.com>
Doctor John wrote:
> andrel wrote:
>> Me too. Note that English is not my mother tongue (indeed my mother has
>> that horrible 1950's Dutch accent when trying to speak English.) <snip>
> What's wrong with a Dutch accent? I used to have a Dutch gf and even now
> I find English spoken with a pronounced nederlandse accent _really_ sexy.
> 
I wasn't talking about a general modern Dutch accent but the older one 
that e.g. pronounces one as 'when'. In a slightly milder form it was 
also spoken by our former PM ruud lubbers IIRC. To their defense, it was 
developed during the period when English lessons consisted of making 
translations. No English was spoken during lessons.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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