Re: a LISP raytracer
- From: stevenan@xxxxxxxxx
- Date: 6 Sep 2005 12:07:42 -0700
Jon Harrop wrote:
> The Scheme implementation wasn't optimised by hand - the compiler does all
> of the optimisation for you. You shouldn't need to apply low level
> optimisations by hand in a high level language.
>
> The Scheme code was available here:
>
> http://www-bcl.cs.nuim.ie/~qobi/ray1.tgz
>
> None of the free Lisp compilers come close to the capabilities of Stalin. It
> is very difficult to write such a compiler.
Hmm..this sounds like a project :)
> OCaml does has camlp4 macros.
Interesting - I'll look into that.
> > Being a Paul Graham fan, I value that feature quite greatly.
>
> You'd be better off listening the to enormous number of computer science
> researchers who've spent the intervening decades coming up with better
> languages.
Perhaps you're right. My languages professor right now is a huge fan
on OCaML, and not so much with LISP. But Paul Graham does offer a more
practical perspective on this, being experienced in modern industry.
His arguments for LISP are usually based on its rapid prototyping
capability, ease of use/reading, macros, etc. - characteristics that
are increasingly important these days. Although he rarely mentions
performance... well, in any case, OCaML's my next learning project.
> > The power to
> > define your own syntax seems very useful to me, even though I have yet
> > to develop the skill necessary to use them effectively.
>
> There is an important trade-off: Lisp macros come at the cost of efficiency
> and program stability.
Well, they can certainly be abused like any language feature, but when
used well they often increase run-time speed and make code a lot easier
to read/write. I looked at Juho Snellman's raytracer code last night,
and his "def" macro is a great example of this. If you're not familiar
with LISP macros and their usage, it may seem very convoluted and
unecessarily complicated. But it's a powerful macro that can be easily
re-used in many situations to improve performance (beyond just 3d
vectors).
>
> > But
> > nonetheless, I do plan on investigating OCaML soon. These days, I'm
> > sort of looking for the ultimate language -- or at least the ultimate
> > languages.
>
> AFAIK, it hasn't been invented yet. :-)
>
> I used LOC as a primitive measure of development time. It is roughly correct
> but the relationship between LOC and time taken is highly non linear. The
> OCaml was far faster to implement that all of the other languages. Having
> said that, I am quite familiar with OCaml (but more familiar with C++). In
> constrast, the Lisp took many people several weeks to come up with.
>
It's not only highly non-linear, but I can imagine, especially with
LISP, that LOC goes down with development time. But more importantly,
how much indication does it give about debugging time?
But then again, I guess that's not really the point of your
comparisons. You're mainly looking at performance vs. programming
effort, in which case LOC is a reasonable ball-park approximation.
> > Anyways, thanks for these comparisons!
>
> Thanks. :-)
>
And thanks again for your time and input!
Um, we should probably end this thread right here cuz it's definitely
going off topic :P
> --
> Dr Jon D Harrop, Flying Frog Consultancy
> http://www.ffconsultancy.com
.
- Follow-Ups:
- Re: a LISP raytracer
- From: Jon Harrop
- Re: a LISP raytracer
- References:
- a LISP raytracer
- From: stevenan
- Re: a LISP raytracer
- From: Jon Harrop
- Re: a LISP raytracer
- From: stevenan
- Re: a LISP raytracer
- From: Jon Harrop
- a LISP raytracer
- Prev by Date: Re: a LISP raytracer
- Next by Date: Re: a LISP raytracer
- Previous by thread: Re: a LISP raytracer
- Next by thread: Re: a LISP raytracer
- Index(es):
Relevant Pages
|