POV-Ray : Newsgroups : povray.advanced-users : POVRay and XML : Re: POVRay and XML Server Time
28 Jul 2024 20:32:37 EDT (-0400)
  Re: POVRay and XML  
From: Warp
Date: 1 Jan 2005 07:38:38
Message: <41d699ce@news.povray.org>
Bernd Fuhrmann <Sil### [at] gmxde> wrote:
> >   Because there already is a language which is ten times easier to
> > write and understand.

> But not to transform. Automatic code generation is an important goal. At 
> least I want to achieve it.

  Transform to what?

  You have to still remember that the SDL is a programming language, not
a document.

> >>It would be possible to write material libraries, object libraries and 
> >>so on without clobbering the global namespace.
> > 
> >   If this is the problem, why is XML the solution?

> Because XML supports namespaces via xmlns.

  So what you are basically saying there is that XML is the only
language in the world which supports namespaces?

  Let me rephrase the question: If namespaces are the problem, why XML
is the right solution compared to all other languages (including possible
specific languages which can be created for POV-Ray) supporting namespaces?

  C++ supports namespaces as well. Why would XML be any better than C++?

> How can you 
> know that the names you use for variables won't ever be used by POVRay 
> itself? Your scenes might not render in POVRay 5.

  Why is XML the right solution to this? Why is it better than just
developing a standard convention (eg. that reserved keywords will
always be lowercase, meaning that any variable written with at least
one uppercase letter will never conflict with a keyword)?

> >   And XML is the best solution for this because...?

> It isn't. XML is a general markup language made by humans and has 
> certainly it's flaws. But XML is the best general markup language I know 
> of.

  But that's exactly the problem: POV-Ray scenes are not documents. They
are programs. XML is a markup language, not a programming language.
People want to write, understand and execute SDL scripts, seldom print
them nicely. It just doesn't make any sense to write a program in a
markup language.

> >   And how on earth does XML make this any easier? Does XML have some
> > magic which will allow you to tesselate any given surface?

> Not really. You'd have to code it all yourself. But this is still 
> possible. I guess it will take 1/2 year. But the point is: You cannot do 
> this at all with POVRay since you cannot access scene objects. XSLT 
> could do this.

  In fact, you can (there have been simple tesselation SDL macros out there
which you can give objects to tesselate).

  However, that's besides the point. If accessibility of data is the
problem, why would XML be a better solution than a true programming
language with the required features? Why change a programming language
to a markup language just to get data out of elements?

> Tell me: What is the fundamental difference between a programming 
> language and a markup language. Both are finite. Both have a tree-like 
> structure.

  In a programming language you typically write things like:

(x+y^2)/(k+1)

  In XML you write that like:

<mrow>
  <mfrac>
    <mrow>
      <mi>x</mi>
      <mo>+</mo>
      <msup>
        <mi>y</mi>
        <mn>2</mn>
      </msup>
    </mrow>
    <mrow>
      <mi>k</mi>
      <mo>+</mo>
      <mn>1</mn>
    </mrow>
  </mfrac>
</mrow>

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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