POV-Ray : Newsgroups : povray.general : It's alive! Server Time
6 Nov 2024 04:18:53 EST (-0500)
  It's alive! (Message 1 to 4 of 4)  
From: Christopher James Huff
Subject: It's alive!
Date: 23 Oct 2002 19:06:55
Message: <chrishuff-53169C.19005623102002@netplex.aussie.org>
I just got G to successfully compile and run a function!

function scalar main(scalar n, scalar p) {return n*n + p;};

It supports arithmetic, function declarations, and...um, the return 
statement. Ok, it needs a little work. ;-)
It does support scalar and vector math, and I'm especially proud of the 
expression parser...I'm going to use some of the compiler techniques I 
developed while working on it in Sapphire.

The language itself is pretty much as the above line shows. It is 
designed to do as much work as possible at compile time, it should run 
fairly quickly...faster than Sapphire, anyway, because Sapphire is an 
extremely dynamic language while this is almost entirely static. I have 
no idea how it'd compare against POV functions, probably quite a bit 
slower at the moment. (almost no optimizations are done)

Next: Function calls, flow control, and numeric constants (it doesn't 
even understand things like "2+2" yet).

Posted in *.general because this is going to be part of a POV patch, but 
is not restricted to POV...

-- 
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

From: Christopher James Huff
Subject: Re: It's alive!
Date: 23 Oct 2002 21:14:10
Message: <chrishuff-7D4E2B.21081223102002@netplex.aussie.org>
In article <chr### [at] netplexaussieorg>,
 Christopher James Huff <chr### [at] maccom> wrote:

> It supports arithmetic, function declarations, and...um, the return 
> statement. Ok, it needs a little work. ;-)

It now supports scalar and vector variables, numeric constants, if(), 
if()-else, and while() statements. ;-)

-- 
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

From: Slime
Subject: Re: It's alive!
Date: 23 Oct 2002 21:20:28
Message: <3db74adc$1@news.povray.org>
> > It supports arithmetic, function declarations, and...um, the return
> > statement. Ok, it needs a little work. ;-)
>
> It now supports scalar and vector variables, numeric constants, if(),
> if()-else, and while() statements. ;-)


So what is this patch exactly? An extension to functions?

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Christopher James Huff
Subject: Re: It's alive!
Date: 23 Oct 2002 22:06:06
Message: <chrishuff-3C9253.22000923102002@netplex.aussie.org>
In article <3db74adc$1@news.povray.org>, "Slime" <slm### [at] slimelandcom> 
wrote:

> So what is this patch exactly? An extension to functions?

It isn't a patch, though it will be part of one eventually. It's just a 
very simple procedural language designed to be interpreted quickly, for 
things like shading or math computations. I'm going to try to get it to 
work alongside or through POV functions.

-- 
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

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