POV-Ray : Newsgroups : povray.general : The Language of POV-Ray : Re: The Language of POV-Ray Server Time
11 Aug 2024 09:24:20 EDT (-0400)
  Re: The Language of POV-Ray  
From: Chris Huff
Date: 13 Mar 2000 20:44:12
Message: <chrishuff_99-C7DA5E.20460313032000@news.povray.org>
In article <38CD7C45.38B53962@nigels.com>, nig### [at] eisanetau wrote:

> 	XML is more flexible than POV Script.   One way to keep 
> 	everyone happy, would be to provide a translation layer
> 	from POV script.  It's a better design than having a
> 	monolythic parser that tries to be everything to everyone.

So what exactly are you suggesting? That POV should use XML for data 
representation and should internally convert POV-Script to XML as well 
as supporting XML input?


> > And for the majority of extensions, you would still have to modify the
> > POV source code.
> 
> 	Yes, but these changes would be much simpler.

Not necessarily. It is pretty easy to add parsing code for most 
features, and it should get a lot easier in POV 4.0 after the planned 
conversion to C++.


> 	Yes, but once in POV script, you can't do anything else
> 	with it.

I really don't know what you mean by that...


> 	What I've seen of POV C-SDL looks quite nice.
> 	Do you think this should be layered on top of
> 	POV, or compiled straight into the binary?
> 	(Where do I find docco on POV C-SDL?)

I posted a description of my concept in .off-topic. It would be 
translated by a separate program into POV-Script, either by converting 
loops, conditionals, etc. to POV-Script syntax or by executing the C-SDL 
code and outputting the objects and scene settings. Eventually, it might 
be included as an actual feature of POV, but it would probably be wise 
to wait for most of the problems to be worked out of it(of course, a 
parser/converter has be be written for it before that can start. I am 
making an attempt, but would welcome any help anyone would want to 
give.).


> 	Programmers are quite familiar with the strengths and
> 	weaknesses of using flat text.  There is not reason that
> 	programming languages should have to be this way. To
> 	limit your imagination to this way of doing things is
> 	unnecessary.

But is it actually limiting? I don't feel very limited...can you give an 
example?
BTW, have you ever heard of the ProGraph programming "language"? Just 
wondering...


> 	Pascal and C are nearly equivalent languages.  They are
> 	basically the same technology.  The fact that it's
> 	possible to generise away from either Pascal and C
> 	and provide translation to either - is a powerful idea.

But they are separate languages. They can both be used to express the 
same idea, but they are different things. Just as English and Spanish 
are different human languages, they can both express the same "data", 
but are clearly separate languages.


> 	The point here is the exact format expected by a particular
> 	compiler (say C or Pascal) is not as important as the 
> 	struture of the underlying data that you're feeding it.
> 	XML captures this data, while being generic about the
> 	formatting.

The problem is that it is too generic, it can't be hand-edited easily. 
Special tools are required.
It is more of a file format than an actual language...


> > What cross-platform GUI tools are you referring to?
> 
> 	A few off the top of my head:
> 
> 	V is a cross platform C++ library for GUI's
> 	Qt is the basis for the KDE project
> 	Gtk is the basis for Gnome, and is being ported to windows
> 	Java
> 	There are quite a few other options.

And these will let me create and edit files written in this XML-POV 
without being exposed to the XML "syntax"? Or they will let me write 
programs that use XML?


> 	I don't think it's as big an issue as you believe it is.

I think it is. If I don't have the required tools, I can't use it.


> 	I think that as long as people still have POV script
> 	as an option, they are not going to be concerned with
> 	the underlying technology used for implementation.

I think I see what you mean now...some kind of XML-based interpreter 
that can read POV-Script as well as XML?


> 	I think that using POV Script as _the only_ way to get
> 	data into POV is a worse design choice.  

Why isn't POV-Script a good way of getting data into POV? The only 
information absolutely required is the objects and things like 
global_settings, background, etc. A program can just "run" a scene 
described in another language and output the data in POV-Script.
I don't understand this "flexibility" argument, at some point it has to 
be converted into data structures in RAM. The only thing that would make 
adding features easier would be the universal syntax, and that could be 
done in other ways just as well.

Whatever you think, I am not against XML. I think it is a great idea for 
many things, just not the right tool for POV.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

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