POV-Ray : Newsgroups : povray.programming : POV-Ray 3.5 for AmigaOS Server Time
1 Jul 2024 06:20:46 EDT (-0400)
  POV-Ray 3.5 for AmigaOS (Message 11 to 20 of 37)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Warp
Subject: Re: Bah.
Date: 3 Jun 2004 12:13:10
Message: <40bf4e16@news.povray.org>
Dan P <dan### [at] yahoocom> wrote:
> Those warnings bug me, so I'm going to fix them. As a rule, I use 
> floor() and cast it to an int when I'm going from a double to an 
> integer.

  By doing that you will be slowing down the code.

  This: "int i = some_double;" is equivalent to this:
"int i = int(some_double);".
  However, you are adding an additional 'floor()' call which will
slow down the conversion needlessly.
  It will also probably give a different result with negative numbers.

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

From: Nicolas Calimet
Subject: Re: POV-Ray 3.5 for AmigaOS
Date: 3 Jun 2004 12:17:25
Message: <40bf4f15$1@news.povray.org>
> because I'm very, very strict about treating warnings as errors) I found 
> that, in the file "povmsgid.cpp", the enumerations were assigned to 
> static strings surrounded by single quotes, which is something I have 
> never seen before [snip]
> I still waswondering what the "goal" of those defines 
> was and if there is something fundamental that I'm missing about the 
> whole affair that is going to bite me in the cheeks later.

	Answer is much shorter than you think: yes you're running into
big trouble messing up with the code like this.
	Search google for "multicharacter constant" and look through
the gcc manpage for the -Wno-multichar warning option.

	- NC


PS: you should really-really wait for the 3.6 UNIX source code  :-)


Post a reply to this message

From: Warp
Subject: Re: POV-Ray 3.5 for AmigaOS
Date: 3 Jun 2004 12:20:07
Message: <40bf4fb7@news.povray.org>
Dan P <dan### [at] yahoocom> wrote:
> first, I thought enums had to assign to ints

  And since when 'abcd' has not been an int?

> and 
> second, I thought single quotes were for characters, not strings).

  No, 'a' is not a character, it's an integer. 'ab' is also an integer.

  Just try: std::cout << 'ab' << std::endl;

> The compiler agreed on both counts

  If enumerated types can only be assigned with integers (which is true)
and 'abcd' is not an integer (which is false), then the compiler would
give you an error. However, the compiler did not give you an error and
thus the compiler is disagreeing with you.

> So, I created a PERL script to grab each of those 
> strings and generate a file with defines called "povtypes.h" and made 
> those defines with unique IDs starting from 1000.

  What for? What is the current code doing wrong?

> Is there some program in-between that turns those 
> happy 'strings' into numbers?

  They are not strings. Learn C, will you?

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

From: ABX
Subject: Re: POV-Ray 3.5 for AmigaOS
Date: 3 Jun 2004 12:24:37
Message: <i2kub0tdgh8u03tonel42bks0skjtb1epi@4ax.com>
On Thu, 03 Jun 2004 18:17:24 +0200, Nicolas Calimet <pov### [at] freefr> wrote:
> Search google for "multicharacter constant"

No need for google. Searching this in povray.programming is enough.

ABX


Post a reply to this message

From: Nicolas Calimet
Subject: Re: POV-Ray 3.5 for AmigaOS
Date: 3 Jun 2004 12:25:00
Message: <40bf50dc$1@news.povray.org>
> Argh - lkjxfsliaejkisddjhfsuikufdfkljhfkljapsdauojsdl - my brain hurts when
> I even read about somebody doing pure nonsense this!

	Aouch !  Thorsten's got broken(*) !!
	It's Armaggedon right before the 3.6 release !!!
	HELP !!!!

	;-)

	- NC


(*) sounds like a top-ten hit in pop music  :-)


Post a reply to this message

From: Dan P
Subject: Re: Bah.
Date: 3 Jun 2004 19:15:19
Message: <40bfb107$1@news.povray.org>
Warp wrote:
> Dan P <dan### [at] yahoocom> wrote:
> 
>>Those warnings bug me, so I'm going to fix them. As a rule, I use 
>>floor() and cast it to an int when I'm going from a double to an 
>>integer.
> 
> 
>   By doing that you will be slowing down the code.
> 
>   This: "int i = some_double;" is equivalent to this:
> "int i = int(some_double);".
>   However, you are adding an additional 'floor()' call which will
> slow down the conversion needlessly.
>   It will also probably give a different result with negative numbers.
> 

That makes sense.

-- 
Respectfully,          "Leave it to the coward to make a religion
Dan P            of his cowardice by preaching humility."
                                    - George Bernard Shaw
http://<broken link>


Post a reply to this message

From: Dan P
Subject: Re: POV-Ray 3.5 for AmigaOS
Date: 3 Jun 2004 19:17:48
Message: <40bfb19c$1@news.povray.org>
Warp wrote:

<lots of crap that drains another's enthusiasm />

Right; this is what I expected when I posted to this group. That initial 
post threw me off. I thought maybe you and TF weren't listening. Okay, 
listen; I didn't know about the MultiCharacter constant thing. There's a 
lot I didn't know about. So, kiss my ass.

-- 
Respectfully,          "Leave it to the coward to make a religion
Dan P            of his cowardice by preaching humility."
                                    - George Bernard Shaw
http://<broken link>


Post a reply to this message

From: Dan P
Subject: Re: Bah.
Date: 3 Jun 2004 19:20:18
Message: <40bfb232$1@news.povray.org>
Thorsten Froehlich wrote:

> In article <40bebe43$1@news.povray.org> , Dan P <dan### [at] yahoocom>
> wrote:
> 
>>Those warnings bug me, so I'm going to fix them. As a rule, I use
>>floor() and cast it to an int when I'm going from a double to an
>>integer. I think that is the default behavior anyway so I'm going to add
>>the necessary code to make it compile cleanly (at least, on this platform).
> 
> 
> Argh!  Don't do something like that, it is plain wrong!  If you compiler
> issues nonsensical warnings, the right thing to do is to disable them, not
> to destroy your source code!
> 
>     Thorsten

Warnings warn you of when your code may behave differently on other OS's 
as well. I'm not saying that is true in this case -- it makes sense not 
to call another function there if we don't have to -- but I didn't think 
it was "nonsensical".

Oh, and if your code was so damn good, TF, it wouldn't have crashed 
using a straight-up clean compile on this OS so step-off.

-- 
Respectfully,          "Leave it to the coward to make a religion
Dan P            of his cowardice by preaching humility."
                                    - George Bernard Shaw
http://<broken link>


Post a reply to this message

From: Dan P
Subject: Re: POV-Ray 3.5 for AmigaOS
Date: 3 Jun 2004 19:29:23
Message: <40bfb453$1@news.povray.org>
Warp wrote:

> Dan P <dan### [at] yahoocom> wrote:

<snip />

>   They are not strings. Learn C, will you?

You know what? I've decided against doing this port after all. I've got 
other plans. With this kind of attitude, and any of you who think this 
is a way to act as a team, you all can kiss my ass, not just Thorsten. 
The last thing I need is to deal with premadonnas like you.

I'm out.

-- 
Respectfully,          "Leave it to the coward to make a religion
Dan P            of his cowardice by preaching humility."
                                    - George Bernard Shaw
http://<broken link>


Post a reply to this message

From: Warp
Subject: Re: POV-Ray 3.5 for AmigaOS
Date: 3 Jun 2004 19:43:17
Message: <40bfb795@news.povray.org>
Dan P <dan### [at] yahoocom> wrote:
> There's a lot I didn't know about. So, kiss my ass.

  When you don't know, the first thing to do is to ask, not to go and
"fix" someone else's code and make a post with a tone of voice which
sounds like you know better than the original code and that the current
code sucks.

  So, it should be: "Hey, there's some odd code which I don't understand
and which looks wrong to me. Is it wrong?" "No." "Ah, ok, never mind."

  Not: "Hey, there's some odd code which looks wrong to me so I went
and fixed it, even though I don't really understand what's going on."

  If you don't understand how a code works and why it is done as it is
done, ask.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


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.