|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I wonder - is there any other non-exotic language which compile functions
"on-line" and allow execute this compiled function just in next line of script ?
Are "our" 3.5 functions{} some novelty in languages?
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
: I wonder - is there any other non-exotic language which compile functions
: "on-line" and allow execute this compiled function just in next line of script ?
: Are "our" 3.5 functions{} some novelty in languages?
Nope, it's nothing new. Many scripting languages use this technique for
speed. The most notorious one is Perl, which runs its scripts by first
byte-compiling them on the fly to memory and then interpreting this bytecode.
This is why Perl is so fast (as an interpreted scripting language).
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 6 Feb 2002 08:27:48 -0500, Warp <war### [at] tagpovrayorg> wrote:
> Nope, it's nothing new. Many scripting languages use this technique for
> speed. The most notorious one is Perl, which runs its scripts by first
> byte-compiling them on the fly to memory and then interpreting this bytecode.
> This is why Perl is so fast (as an interpreted scripting language).
I don't know Perl but what I understad from your answer Perl compiles whole
script. What I asked is: is there any other language which compile one
parametrized expresion to use in next expression within the same interpreted
script?
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
: What I asked is: is there any other language which compile one
: parametrized expresion to use in next expression within the same interpreted
: script?
Uh? What's the difference?
That's basically what Perl does.
--
#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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 6 Feb 2002 09:11:51 -0500, Warp wrote:
>: What I asked is: is there any other language which compile one
>: parametrized expresion to use in next expression within the same interpreted
>: script?
>
> Uh? What's the difference?
> That's basically what Perl does.
Nope, Perl compiles the whole script, then runs it. He's asking whether there
are any other languages that are hybrid between byte-compiled and interpreted.
--
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbt 1}hollow interior{media{emission T}}finish{
reflection.1}}#end Z(-x-x.2y)Z(-x-x.4x)camera{location z*-10rotate x*90}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ron Parker wrote:
>> Uh? What's the difference?
>> That's basically what Perl does.
>
> Nope, Perl compiles the whole script, then runs it. He's asking whether
> there are any other languages that are hybrid between byte-compiled and
> interpreted.
Yes, I think Clipper used such pseudointerpreted things... I used it for
years, but I don't remember anything right now. Memory is so nice... :)
--
Jaime Vives Piqueres
La Persistencia de la Ignorancia
http://www.ignorancia.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 6 Feb 2002 09:27:35 -0500, Ron Parker <ron### [at] povrayorg> wrote:
> Nope, Perl compiles the whole script, then runs it. He's asking whether there
> are any other languages that are hybrid between byte-compiled and interpreted.
Yes, that's it.
Let's imagine such example:
I can start infinite loop with 3.5 which all the time checks for existence of
two specified files. First contains vertices of poly, second - list of points.
When files appear then my loop starts macro, read first file and makes function
to test if given point is inside this polygon. Then it starts loop along second
file and checks all points with speed of compiled program. Somehow it outputs
result, unlocks variables, clear files and continue infinite loop.
Of course it's only imagination - in reality it could be wasting of CPU for this
infinite loop. What I wanted to show - all was done with only one script but
with speed of compiled program without anything like "eval" or included
temporary files.
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ron Parker <ron### [at] povrayorg> wrote:
: Nope, Perl compiles the whole script, then runs it. He's asking whether there
: are any other languages that are hybrid between byte-compiled and interpreted.
Ok. There might not be many popular languages which do this kind of thing
(although I wouldn't be surprised if there were less-known languages which
do something like this).
In fact, I have myself done a library which can be used for this kind of
thing: http://iki.fi/warp/FunctionParser/
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ron Parker wrote:
>
> He's asking whether there
> are any other languages that are hybrid between byte-compiled and interpreted.
Forth, but I don't think it's hybridized in the way that you want.
Deaken
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
<abx### [at] babilonorg> wrote:
>I wonder - is there any other non-exotic language which compile functions
>"on-line" and allow execute this compiled function just in next line of script ?
>Are "our" 3.5 functions{} some novelty in languages?
The first graphics software I saw using compiled functions was
FractInt (in the formula interpreter), and that was at least 5 years
ago.
/Erkki
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |