POV-Ray : Newsgroups : povray.off-topic : A silly little toy (~200 kb) : Re: Build #86 (user-defined functions) Server Time
10 Oct 2024 03:16:52 EDT (-0400)
  Re: Build #86 (user-defined functions)  
From: Darren New
Date: 20 Oct 2008 11:16:01
Message: <48fca0b1$1@news.povray.org>
Invisible wrote:
>> It's only "self-modifying code" if you modify it after it has already 
>> been run.
> 
> Well, technically that's true. But Lisp macros run at runtime, not 
> compile time, so technically you could run the same macro twice and have 
> it generate different code each time...

But the macro still doesn't modify the code after that code is run, so 
that's OK. Having the same macro generate different code at different 
places is the point of a macro.

> Yeah. And as I understand it, writing one is supposedly the hardest task 
> in all of Computer Science. :-P

Certainly it used to be before the theories were worked out. Writing one 
that generates anything close to optimal code is difficult given the 
complexity of current chips.

> Sounds like writing one as part of your application is an excellent idea...

Yep. ;-)

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


Post a reply to this message

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