POV-Ray : Newsgroups : povray.general : FEATURE REQUEST: MS Notepad text editing keystroke definitions Server Time
12 Aug 2024 09:18:11 EDT (-0400)
  FEATURE REQUEST: MS Notepad text editing keystroke definitions (Message 11 to 18 of 18)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Johannes Hubert
Subject: Re: FEATURE REQUEST: MS Notepad text editing keystroke definitions
Date: 29 Mar 1999 11:27:16
Message: <36ffa9e4.0@news.povray.org>
Ken wrote in message <36FF4CCF.D2E56451@pacbell.net>...
[snip]
> Will it make my scenes look any better when they render ?

Yes in so far, as it may allow you to create better scripts in the first
place.

> If indenting is such an effecient method of writting data why
> haven't modern book and magazine publishers started selling books
> with indented pages ?

But they have!
Most books and and articles use a setting where the first line of each
paragraph is indented a few letters, for the obvious reason: It is so much
easier for the eye to find its way through the jungle of letters - just as
in source code.

> Will it make any difference in the greater scheme of things
> 30 years from now ?

Not in the greater scheme, but in the smaller scheme, and not only 30 years
from now, but in more cases than not already in 30 days from now, namely
when you have to get back to some code written 30 days ago during some
hacked-through night, or (much worse!) to code written by a co-worker.

Ken, not withstanding your obvious believe of the contrary, the convention
to indent code *is* a good one and its advantages *far* outweigh its
disadvantages - actually, with a smart editor that does the indenting for
you there are almost no disadvantages - and no amount of trying to ridicule
it with well thought out (and funny) questions and statements will change
that.

Talking of ridiculous and presumptious statements, I can add one myself:

I work in the field professional programming (obviously the area from where
the convention of indented code comes), and I see indenting (and commenting)
code as so important, that it would be a good reason for me to fire any
member of my programming team, who rejected indention as strongly as you do
:-) - as a common raytracing-fan however, you are welcome to structure your
code as you like, just as long as I never have to read through it ;-) but
simply can enjoy the images you create with it.

BTW: The pressure to finally start indenting your code must slowly become
unbearable, isn't it? I say this from observing your fixation with the
subject, since no posts with the mentioning of "indent" or "tab" goes by
without an answer from you. I can only interprete this as the prelimnary
signs of a mayor indention orgy on the verge of a breakthrough. Confess it!
Isn't your left hand itching for the TAB key right now? Doesn't your
ringfinger itch to touch that forbidden key? You can do it! Yes you can! You
will feel much better afterwards, you will feel free, born anew, don't mind
the consequences! You can, you can, you can! ...

See ya,
Johannes.


Post a reply to this message

From: Nieminen Mika
Subject: Re: FEATURE REQUEST: MS Notepad text editing keystroke definitions
Date: 29 Mar 1999 13:17:31
Message: <36ffc3bb.0@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
:  What is indenting ?

  It's making your code much more easy to understand by putting commands
in the same code block at the same column.

:  Is this a new feature in Pov ?

  No, it's an old feature in programming.

:  Will it make my scenes look any better when they render ?

  No, but your source codes will.

:  Will it take up less space on my hard drive when I use it ?

  No, it will take more.

:  How do they stick them little worms inside Mexican jumping beans -
:  are they indented into it ?

  I don't understand the question.

:  Will I be able to see more script on the editing page at one
:  time using this method ?

  No, but you will undestands better what you are seeing.

:  Will my files compress more when archived if I used indented
:  script ?

  As someone said, your compression percentage may increase.

:  Will the rendering engine handle the file any differently one
:  way or another if I do or if I do not ?

  No, and that's a good thing.

:  How do they electroplate plastic products when plastic does not
:  conduct electricity and does indenting have anything to do with
:  it ?

  I don't think so.

:  If indenting is such an effecient method of writting data why
:  haven't modern book and magazine publishers started selling books
:  with indented pages ?

  It's not an efficient way of writing data. It's a good way to write
programming language code.
  And certainly books and magazines use indenting in their own way: they
use paragraphs, empty lines, often white spaces at the beginning of
paragraphs, etc. They don't write all the text in one long line.

:  Will it make any difference in the greater scheme of things
:  30 years from now ?

  Sure. People (including yourself) will understand the code much better.

:  Will society condem me and will I be ostrisized for non indented
:  code ?

  Sometimes. When you are making code for a company and you leave, the
next coder will curse you for making ununderstandable code.

:  Can you look at an image and tell if indenting was used to produce
:  it ?

  No.
  Can you say if the source code of POV-Ray is indented by using the
program?

  Indenting helps you a lot in understanding the program. For example it's
a lot easier to see where does a #while loop end when the code is indented.
  Can you tell me without editing this code what does it do?

#macro Random(Seed,Mid,Var) #local r=rand(Seed); #local lo=Mid-Var/2; #local
hi=lo+Var; #if(lo<0) #local lo=0; #end #if(hi>MaxVal) #local hi=MaxVal; #end
lo+r*(hi-lo) #end #macro CreatePlasmaArray(XSize,YSize,MaxVal,Seed) #declare
PCoord=array[XSize][YSize] #local R=seed(Seed); #local Div=2; #declare PCoord
[0][0]=Random(R,MaxVal/2,MaxVal); #while(Div/2<=XSize | Div/2<=YSize) #local
j=0; #while(j<Div) #local X=div(XSize*j,Div); #local Y=div(YSize*j,Div);
#local i=1; #while(i<Div) #local X1=div(XSize*(i-1),Div); #local X2=div(XSize
*(i+1),Div); #if(X2>X1+1) #local Xm=div(XSize*i,Div); #local C1=PCoord[X1][Y];
#local C2=PCoord[mod(X2,XSize)][Y]; #declare PCoord[Xm][Y]=Random(R,(C1+C2)/2,
X2-X1); #end #local Y1=div(YSize*(i-1),Div); #local Y2=div(YSize*(i+1),Div);
#if(Y2>Y1+1) #local Ym=div(YSize*i,Div); #local C1=PCoord[X][Y1]; #local C2=
PCoord[X][mod(Y2,YSize)]; #declare PCoord[X][Ym]=Random(R,(C1+C2)/2,Y2-Y1);
#end #local i=i+2; #end #local j=j+2; #end #local j=1; #while(j<Div) #local
Y=div(YSize*j,Div); #local Y1=div(YSize*(j-1),Div); #local Y2=div(YSize*(j+1),
Div); #if(Y2>Y1+1) #local i=1; #while(i<Div) #local X=div(XSize*i,Div); #local
X1=div(XSize*(i-1),Div); #local X2=div(XSize*(i+1),Div); #if(X2>X1+1) #local
C1=PCoord[X1][Y]+PCoord[mod(X2,XSize)][Y]+PCoord[X][Y1]+PCoord[X][mod(Y2,YSize
)]; #declare PCoord[X][Y]=Random(R,C1/4,(X2-X1+Y2-Y1)/2); #end #local i=i+2;
#end #end #local j=j+2; #end #local Div=Div*2; #end #end #macro CreatePlasma
(XSize,YSize,Roughness,Seed) #if(XSize<=1 | YSize<=1) #error "XSize and YSize
must be greater than 1" #end #if(Roughness<0) #warning "Roughness should be
greater than 0\n" #end #local MaxVal=Roughness*(XSize+YSize)/2;
CreatePlasmaArray(XSize,YSize,MaxVal,Seed) #local IndY=0; #while(IndY<YSize)
#local IndX=0; #while(IndX<XSize) PlasmaObject(IndX/(XSize-1),IndY/(YSize-1),
PCoord[IndX][IndY]/MaxVal) #local IndX=IndX+1; #end #local IndY=IndY+1; #end
#end


-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: David Wilkinson
Subject: Re: FEATURE REQUEST: MS Notepad text editing keystroke definitions
Date: 29 Mar 1999 13:51:54
Message: <3700ca1a.33407632@news.povray.org>
On Mon, 29 Mar 1999 18:27:41 +0200, "Johannes Hubert" <jhu### [at] algonetse>
wrote:

>Ken wrote in message <36FF4CCF.D2E56451@pacbell.net>...
>[snip]
>> Will it make my scenes look any better when they render ?
[snip]
>
>BTW: The pressure to finally start indenting your code must slowly become
>unbearable, isn't it? I say this from observing your fixation with the
>subject, since no posts with the mentioning of "indent" or "tab" goes by
>without an answer from you.

Keep it up Ken!
Your TIC comments are one of the delectations of this newsgroup.
David

ps;  TIC=tongue in cheek
------------
dav### [at] cwcomnet
http://www.hamiltonite.mcmail.com
------------


Post a reply to this message

From: Margus Ramst
Subject: Re: FEATURE REQUEST: MS Notepad text editing keystroke definitions
Date: 29 Mar 1999 14:42:02
Message: <36ffd78a.0@news.povray.org>
Ken wrote in message <36FF4CCF.D2E56451@pacbell.net>...
/.../
>
> Will it make my scenes look any better when they render ?
>

No, but your scene files look better. Before, during and after.

> How do they stick them little worms inside Mexican jumping beans -
> are they indented into it ?
>

Have you ever done that without identing?

> If indenting is such an effecient method of writting data why
> haven't modern book and magazine publishers started selling books
> with indented pages ?
>

The TAB key isn't just used in programming, you know. I do hope you break up
your texts into chapters and paragraphs. Otherwise I'd blatantly refuse to
read them (scared yet?)

> Will society condem me and will I be ostrisized for non indented
> code ?
>


Just wait and see. You'll be happy we don't have the Inquisition anymore!
Beware, thou shalt be punished for thy foul heresy!

> I have the answer to all of these quetions if you want to hear it.
>


I have the common denominator for all of these questions. Demagogy >:)

Margus


Post a reply to this message

From: Margus Ramst
Subject: Re: FEATURE REQUEST: MS Notepad text editing keystroke definitions
Date: 29 Mar 1999 14:43:21
Message: <36ffd7d9.0@news.povray.org>
Nieminen Mika wrote in message <36ffc3bb.0@news.povray.org>...

/.../
>  Can you tell me without editing this code what does it do?
>

Easy. It's your plasma macro :)

Margus

>#macro Random(Seed,Mid,Var) #local r=rand(Seed); #local lo=Mid-Var/2;
#local
>hi=lo+Var; #if(lo<0) #local lo=0; #end #if(hi>MaxVal) #local hi=MaxVal;
#end
>lo+r*(hi-lo) #end #macro CreatePlasmaArray(XSize,YSize,MaxVal,Seed)
#declare
>PCoord=array[XSize][YSize] #local R=seed(Seed); #local Div=2; #declare
PCoord
>[0][0]=Random(R,MaxVal/2,MaxVal); #while(Div/2<=XSize | Div/2<=YSize)
#local
>j=0; #while(j<Div) #local X=div(XSize*j,Div); #local Y=div(YSize*j,Div);
>#local i=1; #while(i<Div) #local X1=div(XSize*(i-1),Div); #local
X2=div(XSize
>*(i+1),Div); #if(X2>X1+1) #local Xm=div(XSize*i,Div); #local
C1=PCoord[X1][Y];
>#local C2=PCoord[mod(X2,XSize)][Y]; #declare
PCoord[Xm][Y]=Random(R,(C1+C2)/2,
>X2-X1); #end #local Y1=div(YSize*(i-1),Div); #local
Y2=div(YSize*(i+1),Div);
>#if(Y2>Y1+1) #local Ym=div(YSize*i,Div); #local C1=PCoord[X][Y1]; #local
C2=
>PCoord[X][mod(Y2,YSize)]; #declare PCoord[X][Ym]=Random(R,(C1+C2)/2,Y2-Y1);
>#end #local i=i+2; #end #local j=j+2; #end #local j=1; #while(j<Div) #local
>Y=div(YSize*j,Div); #local Y1=div(YSize*(j-1),Div); #local
Y2=div(YSize*(j+1),
>Div); #if(Y2>Y1+1) #local i=1; #while(i<Div) #local X=div(XSize*i,Div);
#local
>X1=div(XSize*(i-1),Div); #local X2=div(XSize*(i+1),Div); #if(X2>X1+1)
#local
>C1=PCoord[X1][Y]+PCoord[mod(X2,XSize)][Y]+PCoord[X][Y1]+PCoord[X][mod(Y2,YS
ize
>)]; #declare PCoord[X][Y]=Random(R,C1/4,(X2-X1+Y2-Y1)/2); #end #local
i=i+2;
>#end #end #local j=j+2; #end #local Div=Div*2; #end #end #macro
CreatePlasma
>(XSize,YSize,Roughness,Seed) #if(XSize<=1 | YSize<=1) #error "XSize and
YSize
>must be greater than 1" #end #if(Roughness<0) #warning "Roughness should be
>greater than 0\n" #end #local MaxVal=Roughness*(XSize+YSize)/2;
>CreatePlasmaArray(XSize,YSize,MaxVal,Seed) #local IndY=0;
#while(IndY<YSize)
>#local IndX=0; #while(IndX<XSize)
PlasmaObject(IndX/(XSize-1),IndY/(YSize-1),
>PCoord[IndX][IndY]/MaxVal) #local IndX=IndX+1; #end #local IndY=IndY+1;
#end
>#end
>
>
>--
>main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
>):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Ken
Subject: Re: FEATURE REQUEST: MS Notepad text editing keystroke definitions
Date: 29 Mar 1999 18:26:30
Message: <36FFEEFF.B85573B2@pacbell.net>
Nieminen Mika wrote:

>   Can you tell me without editing this code what does it do?
> #macro Random(Seed,Mid,Var) #local r=rand(Seed); #local lo=Mid-Var/2; #local
> hi=lo+Var; #if(lo<0) #local lo=0; #end #if(hi>MaxVal) #local hi=MaxVal; #end
    <snip>
> CreatePlasmaArray(XSize,YSize,MaxVal,Seed) #local IndY=0; #while(IndY<YSize)
> #local IndX=0; #while(IndX<XSize) PlasmaObject(IndX/(XSize-1),IndY/(YSize-1),
> PCoord[IndX][IndY]/MaxVal) #local IndX=IndX+1; #end #local IndY=IndY+1; #end
> #end

  I couldn't tell you what that code did even if it were indented so
it's a lost point.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Bob Hughes
Subject: Re: FEATURE REQUEST: MS Notepad text editing keystroke definitions
Date: 29 Mar 1999 20:01:13
Message: <370021F2.B5826D4A@aol.com>
Don't think I saw this possible explanation in all that ongoing rhetoric
in this thread, so...
it might be due to the POV-Ray script language setting in Editor/CodeMax
Properties under the Language/Tabs tab.
Or you may even have that set wrong, to some other programming script
format by mistake(?), best to check. Though when installed it is set to
<none> and indentation follows previous line, tabs are converted to
spaces.


Gordon wrote:
> 
> Nieminen Mika wrote in message <36fa4155.0@news.povray.org>...
> >"Greg M. Johnson" <"greg;-)j56590"> wrote:
> >: In POV 3.1, the End key does not move to the end of the actual text on a
> >: line, but for some reason moves one practically offscreen to the far
> >: right.
> >
> >  In my copy of 3.1 the end key works just fine: it goes to the end of
> >the line.
> >  Perhaps you have lots of whitespaces at the end of the lines?
> 
> I have had this problem, the question is how to avoid the spaces at the end
> of the line in the first place. I certainly never typed them there, and
> clicking the mouse past the end of the line "shouldn't" insert them, so
> whence the spaces?
> 
> In general though I would agree with Ken that the new editor is very cool. I
> particularly like the block indent/outdent feature. Makes cleaning up your
> indenting real easy. (Though Ken wouldn't use this feature!)
> 
> Thanks for any hints on this.
> 
> Gordon
> <gbe### [at] birdcameroncomau>
> 
> >
> >--
> >main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> >):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/homepage.htm
 mailto:inv### [at] aolcom?Subject=PoV-News


Post a reply to this message

From: Lance Birch
Subject: Re: FEATURE REQUEST: MS Notepad text editing keystroke definitions
Date: 30 Mar 1999 04:38:42
Message: <37009ba2.0@news.povray.org>
Oh really, well, I'd prefer it if he'd just shut up but that isn't the point
is it?

GO JOHANNES!!!

--
Lance.


---
For the latest 3D Studio MAX plug-ins, images and much more, go to:
The Zone - http://come.to/the.zone


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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