POV-Ray : Newsgroups : povray.general : The Language of POV-Ray Server Time
10 Aug 2024 20:58:57 EDT (-0400)
  The Language of POV-Ray (Message 228 to 237 of 297)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: John VanSickle
Subject: Re: The Language of POV-Ray
Date: 15 Mar 2000 21:27:38
Message: <38D04923.FB37C959@erols.com>
Nieminen Juha wrote:
> 
> TonyB <ben### [at] panamac-comnet> wrote:
> : #for (Counter has an initial value established*, Condition to exit**,
> : Step***)
> 
>   No, no.
> 
> #for(Identifier initialization; Condition to _continue_; Identifier modification)
> 
> : ***example: I++, I--, I+3, etc.
> 
>   ++ and -- are just too difficult to implement. I+=1 would be it.

Or make it like C really is:

#for (whatever initialization you want;
      condition to continue;
      whatever update you want)

#end
(It can all be on one line, I split it up here for line length)

Since it doesn't really grant any more functionality than the current
state of affairs, I'm of the belief that the POV-team has bigger fish
to fry.

-- 
ICQ: 46085459


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: The Language of POV-Ray
Date: 15 Mar 2000 21:54:18
Message: <38D04B91.B3720BFC@hotmail.com>
David Fontaine wrote:
> 
> Tor Olav Kristensen wrote:
> 
> > People can press whatever keys they like.
> >
> > So if you preferred not to hit that function key, then the computer
> > wouldn't modify your work...
> 
> Okay, but what about 1, 2 and 3a? :-p

I see that I have to agree with you on those :-q

...But I have a tiny but...

With a mouse one can do copy and paste of long expressions
quite fast. But for systems without a pointing device I see 
that the problem could cause a lot of keyboard hammering.

-- 
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

From: Matt Giwer
Subject: Re: The Language of POV-Ray
Date: 16 Mar 2000 00:11:50
Message: <38D06D44.A6D87B5D@ij.net>
Nigel Stewart wrote:
> 
> > : From the viewpoint of a computer scientist (I'm one) this is a not a
> > : syntactically correct defiend for-loop. The variable of a for-loop
> > : belongs to the for-command and should be never _changable_ by the user.
> 
>         I strongly disagree.  It is in fact syntactically correct,
>         and there is no theoretical reason that the loop variable
>         is more sacred than any other variable.

for j = 1 to 10 step 1

for i = 1 to 10 step 1

if (i = 4) and (j = 2) and keypressed(E or e) then i = 2 and j =
4 

next i

next j 

-- 
A free internet for a free people.


Post a reply to this message

From: Matt Giwer
Subject: Re: The Language of POV-Ray
Date: 16 Mar 2000 00:17:45
Message: <38D06EA7.CC7540D9@ij.net>
Glen Berry wrote:
> 
> The for-loops I have used in the past have also allowed a
> STEP parameter that defined the amount of increment for each loop. One
> wouldn't have to be limited to incrementing or decrementing by one.

1 .. 99 initialization 

100 for infinity = 1 to 2 step 0 

stuff

10000 next infinity

	Which seems like a bit of a waste but some BASICs like Atari and
I think Palo Alto tiny BASIC (if a tokenized implementation)
would put a pointer to the beginning of the loop. That made the
execution of stuff faster than not having a loop and having the
last line GOTO 100. 

-- 
A free internet for a free people.


Post a reply to this message

From: Matt Giwer
Subject: Re: The Language of POV-Ray
Date: 16 Mar 2000 00:28:07
Message: <38D07115.B40CDB15@ij.net>
Chris Huff wrote:

> Still, my first point was a platform specific editor feature is no
> substitute for a language feature.

	What is a platform specific editor? And why care as this is
source code discussion? OK, you don't have a control key you
can't do ^esdx but that is a separater issue. I know of no editor
insisting upon an alt key that produced plain ascii output. If
you are trying to make MS Word your code editor ...

-- 
A free internet for a free people.


Post a reply to this message

From: Matt Giwer
Subject: Re: The Language of POV-Ray
Date: 16 Mar 2000 00:31:37
Message: <38D071E6.7163D148@ij.net>
Nieminen Juha wrote:

>   I think that the proposition was to bind a keyboard shortcut for the
> task. This is highly system-dependant.

	That is not a language issue. That is an editor issue. Anyone
interested in that sort of thing, even Windows has free editors
that will do such things. And they will invoke POV. 

-- 
A free internet for a free people.


Post a reply to this message

From: Matt Giwer
Subject: Re: The Language of POV-Ray
Date: 16 Mar 2000 00:40:36
Message: <38D07402.45F7A093@ij.net>
Chris Huff wrote:

> Bob Hughes. He mentioned that auto-completion would be a "nifty feature"
> in the Codemax editor, which as far as I know is Windows only. My point
> is that auto-completion is an editor-dependant feature, and thus
> platform dependant, and so it is a bad substitute for a language
> feature.(which would be completely platform independant)

	Which HAS TO BE platform independent else parser variations
where they are totally unnecessary. And platform dependent
parsers ... there is no reason for that in POV I can see. And
then where would cross compilers be if source were not identical? 

	Even in the "WordStar as editor" days ^kr <insert name of
favorite template, macro or whatever> worked just fine. A little
batch code that invoked it with the source and then invoked the
compiler to the source and then ran was trivial. Borland and a
few other IDEs just made it simpler overall. 

> Just because a program handles ASCII files doesn't mean it doesn't have
> a platform-specific interface. Writing for the Mac GUI is quite
> different from writing for the Windows GUI. The only way to get
> something consistant and which wouldn't have to be rewritten every time
> would be to use Java, which some people wouldn't like.

	That is talking about not just the editor but the editor
environment. 

	If that really turns someone on, they can write it and make it
public. That will have no effect upon the POV source. 

-- 
A free internet for a free people.


Post a reply to this message

From: Matt Giwer
Subject: Re: The Language of POV-Ray
Date: 16 Mar 2000 00:47:02
Message: <38D07584.F1E5C4A6@ij.net>
Tor Olav Kristensen wrote:

> I see that I have to agree with you on those :-q

> ...But I have a tiny but...

> With a mouse one can do copy and paste of long expressions
> quite fast. But for systems without a pointing device I see
> that the problem could cause a lot of keyboard hammering.

	Even in the oldest ^KB scroll ^KK scroll ^KC to copy and the
last ^KV to move. What carefully and note my hands never leave
the keyboard. 

	With a rat, click and move till hilited the ^C or ^X and then
move the rat again and ^V. Note very carefully my hands had to
leave the keyboard. 

	A lot of banging? Ain't no real difference in the time required.
Now if you have combinations of rat buttons programmed to avoid
going to the keyboard at all, I'll take that as over all faster. 

	And if this sort of thing consumes a significant amount of your
coding time, Te Salud!

-- 
A free internet for a free people.


Post a reply to this message

From: Matt Giwer
Subject: Re: The Language of POV-Ray
Date: 16 Mar 2000 01:18:58
Message: <38D07D01.441B3BE3@ij.net>
Chris Huff wrote:
> 
> In article <38CDD5B5.36C4EB94@ij.net>, Matt Giwer <jul### [at] ijnet>
> wrote:
> 
> > Chris Huff wrote:
> >
> >       Pardon for deleting all of yours but this is my issue.
> >
> >       If syntax is extended then those issues will have to be
> > addressed. That is my point.
> 
> What issues? That is what I want you to clarify.

	Will do. 

>     The for loop is well defined, POV would use the existing definition,
> which is quite possible with the POV syntax.

for i = 1 to 5

stuff(variables used elsewhere)

next i

	Is i ?= 5 evaluated before or after stuff? If before stuff is
evaluated 5 times. If after stuff is evaluated 6 times. In the
latter case the stuff variables have the value of i = 6. 

	But if the syntax is

for i = 1 to 5 inc 1 

stuff

#endfor

	pre-evaluation is implied but still may not be implemented that
way. 

	If you are writing the parser you have to decide these things
and document them. And you have to set up a tokenized first pass
that finds the next i (and bails out on i=5) rather than waiting
for it. If you wait for it you have to store the current and
previous stuff and when finding i = 5 throw away the current and
copy previous to the variables or some scheme like that. 

>     There is no debate that I have seen over integer versus float
> variables within a loop, and that is irrelevant anyway, since POV
> doesn't have separate types for integer and float.

	The lack of typing is a weakness that C folks love. (I will get
around to testing it some day but I think I have seen a problem
with #decare i = 1 and #declare i = 1.0 that has solved a loop
problem. I won't swear to it.) But if all variables are
automatically signed four bytes then it is not an efficient
engine. 

>     The ++ and -- operators would not fit in the current syntax of POV,
> so you can forget about them.

	I have no problem with those than inc and dec. But is it going
to be int + 1 or float + 1? But since it is not a typed language
again all the clarity of C and Forth is possible. 

> > One simple routine that can do everything is quite good enough.

> So we should drop the #switch, #macro, and #while features and add #goto
> and #label? And get rid of #local while we are at it...

	There is an old saying, "All things are simple to those who do
not have to do it themselves." I am of the KISS school. 

	#local is required when folks jump out of loops and such.
Therefore it is a good option to have. But if folks just do a bit
of extra typing there i1 i2 i3 i4 there is no need for it. 

	Most of my issue has been on alternatives to #while. I gave an
example on for ... next as opposed to while. If the answer to for
... next is to make it behave the same was while, why is there a
need for for ... next? 

	There is an issue of clarity. Clarity to who? To the author?
Clarity and familiarity are identical. 

	Clarity to others? Axiom of programming. Uncommented code is
unclear to others. Axiom the second. Commented code is likely
unclear to others. 

-- 
A free internet for a free people.


Post a reply to this message

From: Jon A  Cruz
Subject: Re: The Language of POV-Ray
Date: 16 Mar 2000 01:47:18
Message: <38D084EB.5E194B7C@geocities.com>
PoD wrote:

> XML defined languages are for ease of computer parsing, not for ease of
> human writing/reading, though they are human readable since they're
> plain text.

Good point. That's probably what it comes down to.

> Also XML is for markup languages. OK for modeller output, not so good
> for POV.
> I don't think loops, macros etc. work well in XML.

Personally I think loops, macros, etc could easily be done in XML.

<LOOP start='0' end ='100' step ='1' index='x'>
  ....
</LOOP>

<MACRO>
<PARAM name='foo' default='bar'/>
<PARAM name='baz' default='7'/>
...
</MACRO>

But then again there could be many ways to do things.

--
"My new computer's got the clocks, it rocks
But it was obsolete before I opened the box" - W.A.Y.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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