POV-Ray : Newsgroups : povray.beta-test : ior.inc fails in 3.7.1 beta 3 Server Time
21 Dec 2024 11:41:34 EST (-0500)
  ior.inc fails in 3.7.1 beta 3 (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Cousin Ricky
Subject: ior.inc fails in 3.7.1 beta 3
Date: 21 Feb 2017 15:41:32
Message: <58aca5fc@news.povray.org>
This is the first time I have tried the 3.7.1 version of ior.inc.

----------[BEGIN CODE]----------
#version 3.71;
global_settings { assumed_gamma 1 }
#include "ior.inc"
//#include "/[REDACTED]/povray-3.7.0.0/distribution/include/ior.inc"
#debug concat ("iorDiamond = ", str (iorDiamond, 0, -1), "\n")
#debug concat ("dispDiamond = ", str (dispDiamond, 0, -1), "\n")
-----------[END CODE]-----------

----------[BEGIN MESSAGE EXCERPT]----------
File 'ior.inc' line 84: Parse Error: Expected ''[' or '.'', ( found instead
Fatal error in parser: Cannot parse input.
Render failed
-----------[END MESSAGE EXCERPT]-----------

It works perfectly fine when I use the 3.7.0.0 include file.

3.7.1-beta.3.unofficial (g++ 4.8 @ x86_64-suse-linux-gnu)
(g++ 4.8 @ x86_64-suse-linux-gnu)
openSUSE 13.2 GNU/Linux


Post a reply to this message

From: ThH
Subject: Re: ior.inc fails in 3.7.1 beta 3
Date: 22 Feb 2017 02:24:24
Message: <58ad3ca8$1@news.povray.org>
Am 21.02.2017 um 21:45 schrieb Cousin Ricky:
> #version 3.71;
> global_settings { assumed_gamma 1 }
> #include "ior.inc"
> //#include "/[REDACTED]/povray-3.7.0.0/distribution/include/ior.inc"
> #debug concat ("iorDiamond = ", str (iorDiamond, 0, -1), "\n")
> #debug concat ("dispDiamond = ", str (dispDiamond, 0, -1), "\n")

Confirmed.

Same here on my Debian box.

-- 
Thorsten aka ThH


Post a reply to this message

From: Kenneth
Subject: Re: ior.inc fails in 3.7.1 beta 3
Date: 22 Feb 2017 08:10:00
Message: <web.58ad8cb22743ac3f883fb31c0@news.povray.org>
Confirmed on Windows 7 (64-bit) as well.

However, the problem seems to be just simple syntax errors in the ior.inc file,
causing it to fail. Easily fixed (or so it seems!)

One of the new features of v3.71 is the "optional" keyword, for macros. (It's
*completely* new to me, so I haven't had a chance to figure out how it works.)
But in POV-Ray's help file, an example is given that's written like this...

#macro Foo(P1, optional P2)
#ifndef(local.P2) #local P2 = 0; #end // provide default for P2
.....
#end

Note the 'dot' before P2.

However, in 3.7.1 beta 3's ior.inc file, there's no 'dot' preceding such an
'optional' variable (quite a few of those variables, in fact.) I think that's
where the fatal error message(s) are coming from.

Instead, such constructs are erroneously(?) written there as

#ifdef(local (disp))    (this is the first error at line 84)

They should be like this, AFAIK...

#ifdef(local.disp)

I did a search-and-replace of all such syntax errors, and the ior.inc file no
longer fails. (I haven't actually *used* that new ior.inc file yet, though...)


Post a reply to this message

From: William F Pokorny
Subject: Re: ior.inc fails in 3.7.1 beta 3
Date: 22 Feb 2017 09:21:26
Message: <58ad9e66$1@news.povray.org>
On 02/22/2017 08:07 AM, Kenneth wrote:
>
> Confirmed on Windows 7 (64-bit) as well.
>
> However, the problem seems to be just simple syntax errors in the ior.inc file,
> causing it to fail. Easily fixed (or so it seems!)
>
> One of the new features of v3.71 is the "optional" keyword, for macros. (It's
> *completely* new to me, so I haven't had a chance to figure out how it works.)
> But in POV-Ray's help file, an example is given that's written like this...
>
> #macro Foo(P1, optional P2)
> #ifndef(local.P2) #local P2 = 0; #end // provide default for P2
> .....
> #end
>
> Note the 'dot' before P2.
>
> However, in 3.7.1 beta 3's ior.inc file, there's no 'dot' preceding such an
> 'optional' variable (quite a few of those variables, in fact.) I think that's
> where the fatal error message(s) are coming from.
>
> Instead, such constructs are erroneously(?) written there as
>
> #ifdef(local (disp))    (this is the first error at line 84)
>
> They should be like this, AFAIK...
>
> #ifdef(local.disp)
>
> I did a search-and-replace of all such syntax errors, and the ior.inc file no
> longer fails. (I haven't actually *used* that new ior.inc file yet, though...)
>
>

With commits 2b12beb and e592aaf, November 21, 2016, Christoph replaced 
the  `local()`/`global()` pseudo-functions with `local`/`global` 
pseudo-dictionaries.

I believe your updates to ior.inc should have been implemented at that 
time.

Are you up for submitting a github pull request against the 3.7.1 branch 
with your updates? If not, would you please make your updates available 
here in a scene file newsgroup so someone else might create the pull req 
or otherwise pick up your changes?

Thanks.
Bill P.


Post a reply to this message

From: Kenneth
Subject: Re: ior.inc fails in 3.7.1 beta 3
Date: 22 Feb 2017 11:00:00
Message: <web.58adb4e52743ac3f883fb31c0@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

>
> Are you up for submitting a github pull request against the 3.7.1 branch
> with your updates? If not, would you please make your updates available
> here in a scene file newsgroup so someone else might create the pull req
> or otherwise pick up your changes?
>

I guess you mean Christoph (?)  I'm clueless about 'pull requests' and such. But
I'll be glad to post my corrected ior.inc file in the scene-files section, if
that would help.


Post a reply to this message

From: clipka
Subject: Re: ior.inc fails in 3.7.1 beta 3
Date: 22 Feb 2017 11:56:42
Message: <58adc2ca$1@news.povray.org>
Am 22.02.2017 um 14:07 schrieb Kenneth:

> Instead, such constructs are erroneously(?) written there as
> 
> #ifdef(local (disp))    (this is the first error at line 84)
> 
> They should be like this, AFAIK...
> 
> #ifdef(local.disp)

What the...!

Until reading Cousin Ricky's post, I was adamantly convinced I had
already checked in a corresponding fix for this issue earlier during our
preparations for the beta.

Not sure where I dropped /that/ ball.


Post a reply to this message

From: Cousin Ricky
Subject: Re: ior.inc fails in 3.7.1 beta 3
Date: 22 Feb 2017 15:27:57
Message: <58adf44d$1@news.povray.org>
On 02/22/2017 10:21 AM, William F Pokorny wrote:
> Are you up for submitting a github pull request against the 3.7.1 branch
> with your updates? If not, would you please make your updates available
> here in a scene file newsgroup so someone else might create the pull req
> or otherwise pick up your changes?

There are 6 occurrences in the file:

----------[BEGIN DIFF OUTPUT]----------
84c84
<   #ifdef(local(disp))
---
 >   #ifdef(local.disp)
87c87
<   ( iorResult , local(dispResult) )
---
 >   ( iorResult , local.dispResult )
92c92
<   #ifdef(local(n2))
---
 >   #ifdef(local.n2)
97,98c97,98
<   #ifdef(local(disp1))
<     #ifdef(local(disp2))
---
 >   #ifdef(local.disp1)
 >     #ifdef(local.disp2)
104c104
<   IorData_n_disp(n, local(disp))
---
 >   IorData_n_disp(n, local.disp)
-----------[END DIFF OUTPUT]-----------

If you use kwrite, the changes can be made by pressing Ctrl-R and 
entering the fields:

Find:    local\(([A-Za-z0-9_]+)\)
Replace: local.\1
Mode:    Regular expression

Then click Replace All.

I doubt there's a one-step solution with the POVWin editor.


Post a reply to this message

From: William F Pokorny
Subject: Re: ior.inc fails in 3.7.1 beta 3
Date: 23 Feb 2017 09:47:49
Message: <58aef615$1@news.povray.org>
On 02/22/2017 10:57 AM, Kenneth wrote:
> William F Pokorny <ano### [at] anonymousorg> wrote:
>
>>
>> Are you up for submitting a github pull request against the 3.7.1 branch
>> with your updates? If not, would you please make your updates available
>> here in a scene file newsgroup so someone else might create the pull req
>> or otherwise pick up your changes?
>>
>
> I guess you mean Christoph (?)  I'm clueless about 'pull requests' and such. But
> I'll be glad to post my corrected ior.inc file in the scene-files section, if
> that would help.
>
>

I had in mind this issue being a good example that information made 
available on https://github.com/POV-Ray/povray is useful to the POV-Ray 
community as a whole - no matter who makes it available there.

Christoph is the effective github gate keeper for the code base and I 
see this morning a git commit/fix was made. Jim Holsenback similarly is 
the gate keeper for documentation. Either can make changes to 'POV-Ray' 
directly.

Any of us willing to climb the learning curve can submit a 
code/distribution pull requests via git & github.  There is too a 
simpler method to edit and submit small changes directly on github 
without having to get fully into git / github though you need an account.

See:
https://help.github.com/articles/editing-files-in-your-repository/

No matter who publishes fixes/changes/'commits' to github, these are 
publicly available to everyone via the github web site. Christoph's 
'commit' can be seen in the list of commits for the v3.7.1 at:

https://github.com/POV-Ray/povray/commits/release/v3.7.1

click on the particular commit "Fix `ior.inc`." and see the edits needed 
to get running with ior.inc prior to any new official release.

The differences shown are those Cousin Ricky posted in this thread -  in 
a form all can see - and that all of us up and running with git and 
github can with a click/command or two immediately use & test locally 
and well ahead of - or even completely apart from - any official 
'POV-Ray' adoption and release.

In general I'm advocating for more github use by the POV-Ray community - 
as a place to publish code controlled object libraries too.

Bill P.


Post a reply to this message

From: Bald Eagle
Subject: Re: ior.inc fails in 3.7.1 beta 3
Date: 23 Feb 2017 10:10:01
Message: <web.58aefa282743ac3fc437ac910@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

> In general I'm advocating for more github use by the POV-Ray community -
> as a place to publish code controlled object libraries too.

An excellent suggestion - though I need to work on my github fluency.

Perhaps a newsgroup subgroup is something to think about, so that we can all
benefit from the questions / answers _here_  ?

I'm only sugesting that from the viewpoint of keeping everything in one place.


Post a reply to this message

From: dick balaska
Subject: Re: ior.inc fails in 3.7.1 beta 3
Date: 23 Feb 2017 10:36:17
Message: <58af0171$1@news.povray.org>
Am 2017-02-23 10:05, also sprach Bald Eagle:

>
> An excellent suggestion - though I need to work on my github fluency.

I suggest SmartGit. I know there's a free version, but I paid for mine. 
You need to know basic git flow and commands (push, pull, clone) but I 
find its interface much nicer than github's web.


-- 
dik


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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