POV-Ray : Newsgroups : povray.general : POV-CSDL (or Java Binding?) Server Time
10 Aug 2024 07:22:13 EDT (-0400)
  POV-CSDL (or Java Binding?) (Message 83 to 92 of 92)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Matt Giwer
Subject: Re: POV-CSDL (or Java Binding?)
Date: 16 Mar 2000 01:47:43
Message: <38D083BF.26CF94D8@ij.net>
Ken wrote:

> Speaking of errors something else that will have to be address is
> error handling of erroneous input. If the user_prompt is looking for
> a specific input and a wrong value is entered there needs to be
> some form of error trapping to get the right value from the user.

	That is an old one and should have a library for it some place.
An error drops you back to the editor at the right line with the
error highlighted. But usually POV does the best it can with what
it has and doesn't get to excited over the issue. 

-- 
A free internet for a free people.


Post a reply to this message

From: Matt Giwer
Subject: Re: POV-CSDL (or Java Binding?)
Date: 16 Mar 2000 02:01:39
Message: <38D08702.32BE025A@ij.net>
Ken wrote:

> Glen Berry wrote:

> > Hmmm... if a particular programmer could approve of for-loops, could
> > JPEG support happen in the future?

> The POV-Team has already officially announced that jpeg input support has
> been added to POV-Ray v3.5. Jpeg out will not be added or supported.

	How could it be an output as it has to be a conversion from an
existing normal output to a compressed output and thus cannot be
written directly. 

	Jpeg input will give some interesting effects to height fields.
It can be tried right now by saving one to jpg with lowest and
highest resolution, converting back to something currently
readable and comparing. Smooth it. 

	There are so many mountains and so few rolling hills. 

-- 
<A href="http://www.giwersworld.org">A free internet for a free
people.</a>


Post a reply to this message

From: Matt Giwer
Subject: Re: POV-CSDL (or Java Binding?)
Date: 16 Mar 2000 02:18:47
Message: <38D08B07.7587F6E4@ij.net>
Chris Huff wrote:
> 
> In article <38cd0388$1@news.povray.org>, "Johannes Hubert"
> <jht### [at] mailacom> wrote:
> 
> > Just don't reinvent the wheel!
> 
> What if I want to learn how to make wheels? And what if I can't find a
> wheel that fits?

	Maybe you have not looked around? There are enough free ones out
there that I could make an 18-wheeler and have spares. Ain't a
dime's worth of difference among them in my never humble opinion. 

> > Parsing and compiling is a well researched subject in computer science.
> > I recommend that you take a look at lex/yacc for example

> While those might be good for people who want rapid development, I am
> not sure they would apply in my case. I do think there is a set of
> Bison/Flex(or is it Flexx?) tools for CodeWarrior, but I have never used
> that kind of thing.

	Not quite the same thing. In the days of patchpanels it was
considered a daunting task just to parse words (trailing
whitespace) properly. That turned out to be simple. Praise the
lord and pass the card deck. 

	Converting infix to postfix notation to machine language turned
out to be easy also. Doing so efficiently turned out to be a
bitch and half. How many passes does your compiler make? 

	I do not know about POV but it appears to make exactly one pass
before execution. 

> > One of the standard books is: "The Theory and Practice of Compiler
> > Writing" by Jean-Paul Tremblay and Paul G. Sorenson (McGraw Hill). It
> > covers everything you need...
> > (you probably have it already :)
> 
> Actually, I don't have it. All the books I have are a couple standard
> "learn C++" books:
> Teach Yourself C++ in 21 Days(got this when I took C++ at school)
> Programming with C++
> Rescued by C++
> C++ Primer Plus(this one is actually my favorite, I rarely use the
> others)
> And a couple C and Java books, and one Pascal book(also from a class I
> took at school).

	That is something else entirely. The theory and practice of
compilers vice parsers (which are more like tokenizers in BASIC)
is something else entirely. Think about it. Everything you write
has to get to machine code instructions. 

	If there is anything I would like to see on POV it is a three or
four pass optimizing compiler against this single pass parser.
But then there are not enough gurus interested in this to do
that. 

> I don't have any books on algorithms or programming theory. I don't have
> much money to buy them either... :-(

	No library? 

-- 
<A href="http://www.giwersworld.org">A free internet for a free
people.</a>


Post a reply to this message

From: Nieminen Juha
Subject: Re: POV-CSDL (or Java Binding?)
Date: 16 Mar 2000 04:10:03
Message: <38d0a4eb@news.povray.org>
Jon A. Cruz <jon### [at] geocitiescom> wrote:
: and here is how the second one looks

: x = 2;
: foo(x);
: // what is x? 5

  Java is not any better:

Complex x(2,0);
foo(x);
// Did x change?

: Regarding operator overloading, yes I think it has it's place in C++. But I have
seen
: it used in actual production code in ways that have actually caused real bugs and
: problems for maintenance. If everyone who ever works at a company is in that small
: percentage of programmers who are an order of mangnatude more productive, then good.
If
: not...

  Again, if we remove everything dangerous, no matter how useful, what do
we have?
  Nothing, I think. Everything can be used wrong.

: Another thing that Java does differently is that usually you can only get a single
: value returned from a method.

  How do you get more than one value returned from a method in C++?
  Of course you can get a class (or struct) instance, but it's still just one
value.

  I'm not saying that Java is a bad language. It's safer and often more
pleasant to look at than C++. It's harder to make bad programming with it
(although possible).
  I just don't like the limits it imposes. Sorry :)

-- 
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: Nigel Stewart
Subject: Re: POV-CSDL (or Java Binding?)
Date: 16 Mar 2000 06:42:23
Message: <38D0C84D.484F2C3B@nigels.com>
Matt Giwer wrote:

> > One limitation of POV script is that it's not possible to
> > pass values into it without editing the source.  
> 
> I see this and the following but as a dumb question, why? 

	Hmmm... This is like saying that command line tools
	should have no prompts.

	Perhaps because it would be nice to call POV from
	another app without going to the trouble of generating
	POV script?

	Howabout:  
        C:\> povray +w100 +h20 +Ibanner.pov +DTEXT="Click Here!"

--
Nigel Stewart (nig### [at] nigelscom)
Research Student, Software Developer
Y2K is the new millenium for the mathematically challenged.


Post a reply to this message

From: Nigel Stewart
Subject: Re: POV-CSDL (or Java Binding?)
Date: 16 Mar 2000 06:46:15
Message: <38D0C938.C4BFFE7A@nigels.com>
> > The POV-Team has already officially announced that jpeg input support has
> > been added to POV-Ray v3.5. Jpeg out will not be added or supported.

	Anyone know the reasoning for this?
	Not even as a compile-time config option?

--
Nigel Stewart (nig### [at] nigelscom)
Research Student, Software Developer
Y2K is the new millenium for the mathematically challenged.


Post a reply to this message

From: Nigel Stewart
Subject: Re: POV-CSDL (or Java Binding?)
Date: 16 Mar 2000 07:02:24
Message: <38D0CD01.A86AC309@nigels.com>
>         Hmmm... This is like saying that command line tools
>         should have no prompts.

	DOH!  Let's try again...

         Hmmm... This is like saying that command line tools
         should have no command line options.
	
>         Perhaps because it would be nice to call POV from
>         another app without going to the trouble of generating
>         POV script?
> 
>         Howabout:
>         C:\> povray +w100 +h20 +Ibanner.pov +DTEXT="Click Here!"

--
Nigel Stewart (nig### [at] nigelscom)
Research Student, Software Developer
Y2K is the new millenium for the mathematically challenged.


Post a reply to this message

From: Ron Parker
Subject: Re: POV-CSDL (or Java Binding?)
Date: 16 Mar 2000 08:42:57
Message: <38d0e4e1$1@news.povray.org>
On Thu, 16 Mar 2000 22:44:56 +1100, Nigel Stewart wrote:
>
>> > The POV-Team has already officially announced that jpeg input support has
>> > been added to POV-Ray v3.5. Jpeg out will not be added or supported.
>
>	Anyone know the reasoning for this?

The main reasoning is, we didn't want the support nightmare that comes from
someone (tens of thousands of someones) discovering that a lossy format isn't 
the best option for primary output.

>	Not even as a compile-time config option?

No comment. :)

-- 
These are my opinions.  I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html


Post a reply to this message

From: Jon A  Cruz
Subject: Re: POV-CSDL (or Java Binding?)
Date: 16 Mar 2000 12:21:53
Message: <38D119A3.810FE60E@geocities.com>
Nieminen Juha wrote:

>   How do you get more than one value returned from a method in C++?
>   Of course you can get a class (or struct) instance, but it's still just one
> value.

Easily:

int foo( int &out1, int &out2, int &out3,  int in1 );

Most any Win32 COM stuff starts to act like that.

Here's the IDL stuff on the basic IDispatch interface. The invoke one is a call worth
noticing.

interface IDispatch : public IUnknown
                    {

                        public:

                        virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(
                        /* [out] */ UINT __RPC_FAR *pctinfo) = 0;

                        virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(
                        /* [in] */ UINT iTInfo,
                        /* [in] */ LCID lcid,
                        /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo) = 0;

                        virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(
                        /* [in] */ REFIID riid,
                        /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
                        /* [in] */ UINT cNames,
                        /* [in] */ LCID lcid,
                        /* [size_is][out] */ DISPID __RPC_FAR *rgDispId) = 0;

                        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Invoke(
                        /* [in] */ DISPID dispIdMember,
                        /* [in] */ REFIID riid,
                        /* [in] */ LCID lcid,
                        /* [in] */ WORD wFlags,
                        /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
                        /* [out] */ VARIANT __RPC_FAR *pVarResult,
                        /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
                        /* [out] */ UINT __RPC_FAR *puArgErr) = 0;

                    };

and you might get something like this in the header files:
#define
IDispatch_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
\
    (This)->lpVtbl ->
Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)


You can do things a little like that in Java, but you have to really work hard to do
so.


>   I'm not saying that Java is a bad language. It's safer and often more
> pleasant to look at than C++. It's harder to make bad programming with it
> (although possible).
>   I just don't like the limits it imposes. Sorry :)

Then you know the tasks you need to acomplish, and have made good evaluations based on
that.
A good programmer knows when to use which tools.

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

From: Chris Huff
Subject: Re: POV-CSDL (or Java Binding?)
Date: 16 Mar 2000 17:08:18
Message: <chrishuff_99-EE35E6.17101516032000@news.povray.org>
In article <38D08B07.7587F6E4@ij.net>, Matt Giwer <jul### [at] ijnet> 
wrote:

> 	Maybe you have not looked around? There are enough free ones out
> there that I could make an 18-wheeler and have spares. Ain't a
> dime's worth of difference among them in my never humble opinion. 

I know there are a lot of free parser frameworks/libraries, I would 
prefer to use a fairly standardized one like Flex/Bison or write one of 
my own which I could understand. I plan on looking into Flex and Bison 
to see if they have what I need.


> > While those might be good for people who want rapid development, I am
> > not sure they would apply in my case. I do think there is a set of
> > Bison/Flex(or is it Flexx?) tools for CodeWarrior, but I have never 
> > used
> > that kind of thing.
> 
> 	Not quite the same thing. In the days of patchpanels it was
> considered a daunting task just to parse words (trailing
> whitespace) properly. That turned out to be simple. Praise the
> lord and pass the card deck. 

Not quite the same thing as what? They are parser tools...I need a 
parser, and I would prefer to know how they work in some detail first.


> 	Converting infix to postfix notation to machine language turned
> out to be easy also. Doing so efficiently turned out to be a
> bitch and half. How many passes does your compiler make? 

Which compiler, the one I develop in C/C++ on? I really have no idea. 
And what does this have to do with C-SDL?


> > Actually, I don't have it. All the books I have are a couple standard
> > "learn C++" books:
> > Teach Yourself C++ in 21 Days(got this when I took C++ at school)
> > Programming with C++
> > Rescued by C++
> > C++ Primer Plus(this one is actually my favorite, I rarely use the
> > others)
> > And a couple C and Java books, and one Pascal book(also from a class I
> > took at school).
> 
> 	That is something else entirely. The theory and practice of
> compilers vice parsers (which are more like tokenizers in BASIC)
> is something else entirely. Think about it. Everything you write
> has to get to machine code instructions. 

Something else entirely from *what*? I listed the books I had, said they 
were mostly for learning the languages, and said I don't have any books 
on parsers or other algorithms.
And compilers don't interest me, nothing I do goes to machine code 
instructions except as data(and I can ignore the fact that my C++ code 
is converted to machine code), the only thing my program would do is 
convert C-SDL to POV-Script.


> > I don't have any books on algorithms or programming theory. I don't 
> > have much money to buy them either... :-(

> 	No library?

No good ones nearby, unfortunately. I don't live in a remote, 
unpopulated area, but we are a relatively long way from that kind of 
thing. And no transportation other than my parents, although I will be 
taking drivers training in June.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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