|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <ne7vnuc47tqp5jpdqfn51nttlis14agp54@4ax.com>,
ABX <abx### [at] abxartpl> wrote:
> But I can include only necessary files so can optimize parsing time.
Still, including one file is probably more overhead than adding all the
keywords contained in a couple files.
> > Requiring an external include file.
> So many languages use header files with definitions so nothing new.
So does POV, functions.inc. It is annoying though, confusing to newbies,
and slower than a built-in keyword.
> > Heh, implementing it in the current POV would take a huge amount of
> > work. I'm mainly thinking of it as something to be considered for the
> > 4.0 rewrite.
>
> chicken ;-)
;-)
I will be looking at it...I'm just busy with school and lots of other
personal projects. (the CSDL/Sapphire language, Lumini raytracer, 3D
math and color-image libraries, a VR engine, a few others...)
> > I did something similar for Sapphire: when a
> > symbol is resolved it moves to the front of the symbol table.
>
> Any reference ? You mean http://sapphire.sourceforge.net/ ?
No, I was talking about my CSDL project:
http://home.earthlink.net/~cjameshuff/csdl/csdl.html
It's a language I created, I'm using it to control the raytracer and VR
engine. That's an old version though...I'll release a new one fairly
soon.
The acronym seemed clumsy and a bit inappropriate, since the language is
useful for more than simulations. I like sapphires, and it fit in with
the Perl, Ruby, ... sequence. I didn't know there was a window manager
with that name...
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3D8### [at] freefr>,
Nicolas Calimet <pov### [at] freefr> wrote:
> Do you mean that the current POV-Ray parser (which I never
> really investigated) searches the full list of keywords to get the
> proper token ? If so, what about hash tables as used when parsing
> mesh triangles/textures ?
No, I don't mean this. I was talking about a hypothetical way of doing
it, not a way to modify the current POV-Ray code.
> Putting the last resolved symbol at the beginning of the
> list assumes a high probability to find the same symbol again.
Not really...if it isn't used again, it quickly moves back "behind" the
more often used keywords. The more often resolved ones spend more time
at the front of the list, where they are hit more quickly. It is kind of
like using the front of the list as a cache, it is extremely simple and
much faster overall than just going through the list.
> I agree this is good for such big objects as meshes (and usually a
> very big scene is made of very big meshes...). But I don't think it's
> better than using hash tables in general. [A perfect hash table would
> be appropriate for build-in keywords which number is fixed].
For the POV-Ray parser, it is probably the fastest way. Sapphire
identifiers are pointers to strings: all identifiers with the same
string point to the same memory location, so comparison is fast, and
symbols are stored in a linked list, so it is extremely fast to remove
an element and push it on at the front of the list.
It would be possible to use a hash table, and it might be faster, but it
would use more memory and the number of symbols in a table is usualy too
small to get a real benefit. For POV, the requirements are different,
and a hash table is probably the best way.
I might eventually use a hash table for the compiler part of Sapphire,
it currently does a string comparison against every built-in token until
it finds a match. Compile times are already fast enough that I don't
even notice the delay, though.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <tf51ouso920fksq7c8h0o92mot1iqg842h@4ax.com> , ABX
<abx### [at] abxartpl> wrote:
> Are you representing general stategy of the team with this vote ? I'm just not
> sure how many votes I should count ;-)
No, just my opinion! Which means it will count something like 20% if there
would be vote in the team assuming the average "voter" participation ;-)
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <chr### [at] netplexaussieorg> ,
Christopher James Huff <chr### [at] maccom> wrote:
> So does POV, functions.inc. It is annoying though, confusing to newbies,
> and slower than a built-in keyword.
It isn't slower as far as the implementation is concerned. And parsing
slowdowns do not really matter for functions.inc in a non-trivial scene. It
does keep out a hundred or so keywords however, which is a great benefit for
everybody who does not happen to be using one of those functions in a
particular scene.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 12 Sep 2002 13:22:59 +0200, ABX <abx### [at] abxartpl> wrote:
> Any help to fullfill democracy in this syntax designing ?
keyword:
float:
Philippe Debar, Christoph Hormann, Wlodzimierz Skiba
Thanks. I'll try to make something in the middle. I'll use integers to
recognize tokens ;-)
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3d810f73@news.povray.org>,
"Thorsten Froehlich" <tho### [at] trfde> wrote:
> > So does POV, functions.inc. It is annoying though, confusing to newbies,
> > and slower than a built-in keyword.
> It isn't slower as far as the implementation is concerned. And parsing
> slowdowns do not really matter for functions.inc in a non-trivial scene. It
> does keep out a hundred or so keywords however, which is a great benefit for
> everybody who does not happen to be using one of those functions in a
> particular scene.
A user-defined identifier is just as fast to identify and resolve as
identifying a token? I'm doubtful about that...I wouldn't be surprised
if the difference is too small to be important, though. It's somewhat
annoying when you forget to include functions.inc (there have been
several users with that problem), but it is useable and better than
integer codes.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <t584ouk300oi4mdttqhkj4le7hfu1dth6q@4ax.com>,
ABX <abx### [at] abxartpl> wrote:
> Thanks. I'll try to make something in the middle. I'll use integers to
> recognize tokens ;-)
What do you mean? I've run that through my head several times, and can't
see what you could be planning.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
t584ouk300oi4mdttqhkj4le7hfu1dth6q@4ax.com...
> On Thu, 12 Sep 2002 13:22:59 +0200, ABX <abx### [at] abxartpl> wrote:
> > Any help to fullfill democracy in this syntax designing ?
>
> keyword:
Don't rule out the possibility that Ken Tyler put "keyword" just for the
sake of symmetry in the thread ;-) Float, keyword, float, keyword... Putting
"float" would have ruined the whole thing.
G.
--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Gilles Tran wrote:
>
> t584ouk300oi4mdttqhkj4le7hfu1dth6q@4ax.com...
> > On Thu, 12 Sep 2002 13:22:59 +0200, ABX <abx### [at] abxartpl> wrote:
> > > Any help to fullfill democracy in this syntax designing ?
> >
> > keyword:
>
> Don't rule out the possibility that Ken Tyler put "keyword" just for the
> sake of symmetry in the thread ;-)
Would I do that?
--
Ken Tyler
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
3D829CE1.156832C4@pacbell.net...
> Would I do that?
Without any doubt.
A further enticement was the lack of identation in your answer, coming after
perfectly indented >> ones. The addition of a uppercase "K" was a nice touch
of originality too.
Now you may actually prefer the "keyword" solution but this would be getting
annoyingly on-topic.
G.
--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |