POV-Ray : Newsgroups : povray.general : Status of Moray? : Re: New SDL for POVRay Server Time
17 Jul 2025 18:08:44 EDT (-0400)
  Re: New SDL for POVRay  
From: Patrick Elliott
Date: 3 Oct 2007 15:24:01
Message: <MPG.216d9a37a6d5db0e98a036@news.povray.org>
In article <470313c2@news.povray.org>, 
nic### [at] gmailisthebestcom says...

> > In article <47024d79$1@news.povray.org>, 
> > nic### [at] gmailisthebestcom says...
> >> Umm... Isn't that how things work on *any* loosely-typed language?
> >>
> >> var arr = [123, [12,34], "foo", /\s+public ?(.*)/g, new Sphere(1,2,3
)];
> >>
> >> A valid Javascript array containing a number, another array, a string,
 a 
> >> regular expression, and a Sphere (provided that the Sphere object was
 
> >> defined).
> >>
> > Well, all I know is that it wasn't, for what ever reason, possible with
 
> > the client. That *may* be due to the fact that Java is *not* normally
 
> > that loosely typed, or that some serious problem existed in ActiveScrip
t 
> > which seriously fracked it (since it relies a lot of that for every 
> > language except Lua. Though, mind you, half the ActiveScript languages
 
> > seem to not follow spec anyway and suffer from bloody silly 
> > inconsistencies even in how you instance them, never mind get them to d
o 
> > anything after they are linked.)
> > 
> 
> You're mixing up Java and Javascript (they have nothing to do, name 
> similarity is apparently because of marketing reasons). Java is 
> strongly-typed, Javascript is loosely-typed. Java is compiled into 
> bytecode, Javascript is interpreted. Java has classes, Javascript has 
> prototype-based OOP instead.
> 
I realize there are differences between them, didn't know that was one 
of them though. I still don't like the syntax that well. My point was 
though that you get the same issues trying to use something like Python. 
It didn't link the same way, even though it should have, and worse, 
there actually seems to be some sort of insane memory leak in it, 
triggered when you drop in some temp code to run, then try to remove it 
again. We are not sure if its garbage collection not handling the 
deleted code correctly or what, but its frustrating.

Oh, and using Java may not be useful precisely *because* it relies on 
compiled Bytecode. Why? Because I am not sure how well it can handle 
shifting code in/out on the fly, and while I am not sure how/if that 
would be useful in POVRay, since it kind of assumes you are going to 
render one frame, then exit, it is a nice things to have some times. 
Like say you have a flag to turn off a certain feature, while testing 
colors, because it slows things down. So, you figure, "Ok, color is 
good, so lets just type in "myflag = 1", so the next frame will render 
"with" the feature turned on, so I can see it that is working too, 
without having to restart the entire render." Sure, its not the sort of 
thing you "expect" to be doing in a program like this, but it can be 
useful some times to have immediate execution of a comment "into" the 
code that is already running, in some cases. You can't do that with 
compiled code.

Now, whether there is a legitimate reason to allow such a thing in 
POVRay is another question entirely, as well as how that would effect 
speed. But it is something that might be considered. Its also used in 
the client I use to do things like reacting to some event, then 
inserting code to do some specific task "at that event". Probably not 
useful or necessary for POVRay, since coding that in directly, then re-
running the script, is probable just as easy, but again, its something 
that could be done real time, even as processing is being done, in the 
client I use, while a compiled language simply wouldn't support it. 
Useful for something like POVRay or completely useless? Not sure myself. 
I am sure I could think of uses for it "if" I had the option, but 
thinking of them now is a bit harder.

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}

<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models,
 
3D Content, and 3D Software at DAZ3D!</A>


Post a reply to this message

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