POV-Ray : Newsgroups : povray.general : How about $ for declare? Server Time
3 Aug 2024 00:20:23 EDT (-0400)
  How about $ for declare? (Message 21 to 30 of 37)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>
From: Samuel Benge
Subject: Re: How about $ for declare?
Date: 14 Aug 2004 13:23:38
Message: <411E28B8.7080203@hotmail.com>
Brian Elliott wrote:
<snip>

> Also, though this doesn't help those on open-source ports of PoV-Ray, the
> Windows users of PoV-Ray have that lovely in-built editor.  All one need do
> on WinPov is type "sph" then press Tab, and you have your complete word.
> Try it with "pig" as well!
<clip>


I've been using the Tab shortcut for quite sometime now. I can't 
remember if I found it accidentally or not... it doesn't matter. What 
matters is that it WORKS. I save a lot of time using it.

The more I thought about my 'aliasing' idea last night, the closer to 
your opinion I found myself..... and then there was your reply. We don't 
need to confuse the code and make it unreadable. It's not so hard to 
type out the keywords, especially if we have the Tab feature built into 
the editor. Perhaps those working on other operating systems can push to 
have this functionality placed into their editor?

-Sam


Post a reply to this message

From: Florian Brucker
Subject: Re: How about $ for declare?
Date: 14 Aug 2004 13:30:23
Message: <411e4c2f$1@news.povray.org>
> Also, though this doesn't help those on open-source ports of PoV-Ray, the
> Windows users of PoV-Ray have that lovely in-built editor.  All one need do
> on WinPov is type "sph" then press Tab, and you have your complete word.
> Try it with "pig" as well!
Dunno about povmode for emacs etc., but if you're using QtPOVEditor 
(qtpoveditor.sf.net), you have that auto-complete-thingy for both 
keywords and custom identifiers.


I normally don't like full-quotes, but I got the impression that if 
everyone anticipating in this discussion right now would reread 
Christoph's post, there would not be much to discuss anymore:

"It leads to awfully obfuscated code. [...] With the same arguments you 
could replace every  other keyword with the shortest unique abbreviation 
- but no one could read the code any more then."

So, think again - how much time do you really spend with typing only 
when you're creating a POV scene? IMHO POV SDL allows some pretty 
cryptic stuff already (and yes, I'm using that, too ;) so there's no 
need to make it even more complicated.

While talking about SDL changes, the only thing that one would IMHO 
benefit from is the #set keyword from former MegaPOV, combined with an 
error/warning when trying to re-declare already declared identifiers.

Florian (who would like to have references in POV-SDL, too ;)


Post a reply to this message

From: Jim Charter
Subject: Re: How about $ for declare?
Date: 14 Aug 2004 15:40:12
Message: <411e6a9c$1@news.povray.org>
Rafal 'Raf256' Maj wrote:
> run### [at] runevisioncom news:411e20a7$1@news.povray.org
> 
> 
>>Try to type the following (where *TAB* means pressing TAB):
>>light*TAB**TAB*
> 
> 
> Oh, I thought that You where talking about this ctlr+space thingy, this 
> definetely should be in FAQ, help and Tip of the day.
> 
> But I still suggest shortucts for most long expressions, for example 
> reflection -> refl 
> specular .5 roughness 0.01  -> spec .5, 0.01
> 
> etc... why not?
> 
Because the full English words are standard and self-documenting
Because it adds unnecessary complication to every aspect of the endeavour
Because it would in no way result in better pictures
Because it is a bloat-feature based in a bloat mentality


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: How about $ for declare?
Date: 14 Aug 2004 16:46:34
Message: <411e7a2a@news.povray.org>
In article <411e6a9c$1@news.povray.org> , Jim Charter <jrc### [at] msncom> 
wrote:

>> etc... why not?
>>
> Because the full English words are standard and self-documenting
> Because it adds unnecessary complication to every aspect of the endeavour
> Because it would in no way result in better pictures
> Because it is a bloat-feature based in a bloat mentality

Very well said!

    Thorsten

____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: How about $ for declare?
Date: 14 Aug 2004 17:17:32
Message: <Xns9545ED4602E3Craf256com@203.29.75.35>
jrc### [at] msncom news:411e6a9c$1@news.povray.org

> Because the full English words are standard and self-documenting

cone { begin_point x*4  end_point 5*x  radius 10 }

this is self-documented

> Because it adds unnecessary complication to every aspect of the endeavour

I dont know what endeavour is, but as for implementation the basic aliases 
are very easy to implement

> Because it would in no way result in better pictures

More comfortable work = more time to concentrate on picture itself.

> Because it is a bloat-feature based in a bloat mentality

?

-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: How about $ for declare?
Date: 14 Aug 2004 17:20:30
Message: <Xns9545EDC67E010raf256com@203.29.75.35>
spa### [at] raf256com news:Xns9545ED4602E3Craf256com@203.29.75.35

(...)

but anyway I do not insist so hard about aliases, since Tab future is 
greate, if only it would be implemented also in linux-editors...

-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Greg M  Johnson
Subject: Re: How about $ for declare?
Date: 14 Aug 2004 21:11:57
Message: <411eb85d$1@news.povray.org>
agreed.

"Jim Charter" <jrc### [at] msncom> wrote in message
news:411e6a9c$1@news.povray.org...
> Rafal 'Raf256' Maj wrote:
> > run### [at] runevisioncom news:411e20a7$1@news.povray.org
> >
> >
> >>Try to type the following (where *TAB* means pressing TAB):
> >>light*TAB**TAB*
> >
> >
> > Oh, I thought that You where talking about this ctlr+space thingy, this
> > definetely should be in FAQ, help and Tip of the day.
> >
> > But I still suggest shortucts for most long expressions, for example
> > reflection -> refl
> > specular .5 roughness 0.01  -> spec .5, 0.01
> >
> > etc... why not?
> >
> Because the full English words are standard and self-documenting
> Because it adds unnecessary complication to every aspect of the endeavour
> Because it would in no way result in better pictures
> Because it is a bloat-feature based in a bloat mentality


Post a reply to this message

From: Doppelganger
Subject: Re: How about $ for declare?
Date: 14 Aug 2004 23:35:20
Message: <411ed9f8$1@news.povray.org>
>More comfortable work = more time to concentrate on picture itself.

this is only true for short term work. though I'm not a POV-Ray expert, my
experience with other languages in which shorthand syntax exists makes me
say that it's only "comfortable work" for 2 or 3 lines worth of code in
every 500. The code with dense shorthand easily becomes cluttered and
impossible to read.

Giving an example of how bad short hand can be in Mathematica code (and I
tried using this sort of code for serious programming -- to give up
reasonably soon afterwards):

Compare:

f[x_]=x^2;
list=Map[f,{1,2,3,4}];
Apply[Plus,list];
list

With:

Plus@@((#^2)&/@{1,2,3,4})

they both get the list {1, 2, 3, 4}, square all entries, and sum all the
entries. Which code segment do you think you'd understand for what it is 2
months after you'd written it? I had to rtfm to get the second one right to
make this point (though I wrote fluently like it when I used it), whereas
the first one came naturally.

> > Because it is a bloat-feature based in a bloat mentality
>
> ?

it's a non-feature. It's not necessary, hardly useful, and it makes (as
illustrated) for more hard than good.


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: How about $ for declare?
Date: 15 Aug 2004 23:10:17
Message: <41202599@news.povray.org>
So it's not so good idea. I AM lazy but you are right.

--
- Nicolas Alvarez
nicoalvar0 [at] hotmail [dot] com



news:411de774@news.povray.org...
> "Samuel Benge" <stb### [at] hotmailcom> wrote in message
> news:411### [at] hotmailcom...
> > Rafal 'Raf256' Maj wrote:
> > >
> > > Btw, how about adding some shorten forms for long and often used
> keywords,
> > > it could spedd up typing and comforable level of hand-typing .pov
code,
> > > like
> >
> > Better yet, why not have the ability to make new #aliases for keywords.
> > Something like this:
> >
> > #alias sphere=sph;
> >
> > sph{ <0,0,0>, 10 pigment{White} }
> >
> > -Sam
> >
>
> Hello all,
>
> Some cautionary words.
>
> Aliasing sounds really beguiling, because being IT/Comp/Sci/Tech types,
> we're all lazy when it comes to typing and repetition, and we tend to
like
> using the shortest sequence of keystrokes to create our code.   :-)
>
> But on reflection (argh a RT pun), I believe it could unleash a bad genie
on
> the PoV-Ray community.  The genie's curse will be reduced legibility and
> portability of the SDL.
>
> Human nature being what it is, what'll happen is that the single PoV-Ray
> language we have now will be replaced by a multitude of personal
dialects,
> as people make up whatever words they personally enjoy.  Instead of
> "sphere", some will use "sph"; or "sp"; and there will be those who
> particularly enjoy terse and dense code, who will condense it to a mere
"s".
> Authors from non-English origins might customise the SDL for their own
> convenience, and use, eg., "esfera" instead!
>
> This is perfectly fine if it is confined to one's own bedroom or study,
but
> there's an intensely active and diverse community around PoV-Ray and,
let's
> face it, this code will be shared on the Internet!
>
> When reading someone else's aliased code, to ensure you understand their
> typography, you must first seek and refer to their dictionary before you
can
> to understand the SDL body -eg. When this author writes "sp" on line 145
of
> "myscene.pov" or "includefile3.inc", does it mean a "sphere" or a
"spline"
> or a locally-declared object type?
>
> Also, consider portability:  Incorporating aliased segments of another
> author's code into your work, which is either not aliased or uses
different
> conventions, will no longer be a simple drop-in operation -- it will be
much
> harder to port.
>
> Imagine using code from three sources, created with three different
> conventions.  What will you have to do to get it to work in your designs?
> Especially if their "dictionary" is tucked away in a minor include file
> somewhere, or it's spread across multiple files of hundreds of lines.  If
> one of your sources aliased "sphere" with "sp" while another had aliased
> "spline" with "sp", and you are trying to merge the two into a new scene
or
> into your whole code library, you have a real mess to sort out!!!
>
> The end effect:  I think there are many people who would discard such
code
> rather then face the extra time and frustration of translating it.  Great
> ideas could be discarded or not even looked at, because the author used
> idiosyncratic language.  The free community exchange of ideas that
happens
> now would probably be reduced if aliasing were common, and I think that
> would be a great pity if it happened.
>
> Alternately, if you had aliased code and wanted to offer your creation
into
> the public community, you might have to convert it bact to standard
syntax
> first, nullifying any gains you originally got from it, either in
time-saved
> or visuals.
>
> My sense of it is that the disadvantages eventually outweigh the
advantages.
>
> $0.02
> Cheers,
>   Brian
>
>


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: How about $ for declare?
Date: 15 Aug 2004 23:14:05
Message: <4120267d@news.povray.org>
I'm working on a typing test (in HTML and Javascript). It's a modification
of one found in http://javascriptsource.com.

If you are interested, mail me.

--
- Nicolas Alvarez
nicoalvar0 [at] hotmail [dot] com



news:411df175$1@news.povray.org...
> > I did a little experiment just now, and I succeded in typing "sphere "
(with
> > trailing space) 19 times in 30 seconds, and that was WITH correcting
several
> > mistakes.
>
> I did 30 "sphere"s/30secs after a few practice runs. So, what is the
> POV-Ray community unofficial record? Only correctly typed words count.
>
> I also think that there is little to gain by using aliasing. Also, how
> many people knows how to use TAB (at least in windows version) to use
> autocomplete feature? It also speeds up writing.
>
> Severi


Post a reply to this message

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

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