POV-Ray : Newsgroups : moray.win : Plugin idea Server Time
29 Jul 2024 12:19:14 EDT (-0400)
  Plugin idea (Message 11 to 20 of 28)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 8 Messages >>>
From: Ph Gibone
Subject: Re: Plugin idea
Date: 15 Mar 1999 13:00:16
Message: <36ed4ab0.0@news.povray.org>

>Ph Gibone wrote:
>
>>
>> Moray doesn't use or support any scripting language so far
>>
>> Philippe
>
>  Moray can use the older versions or Pov script if run thorugh a parser
>first. Has been able to do that for years now. Not that many people
>go thorugh the trouble but it is possible.
>
>--
>Ken Tyler
>
>mailto://tylereng@pacbell.net


I'm part of the last category !

To make things clear, when I wrote about a scripting language for Moray I
thought that it would be very convenient to be able to write a plugin even
if you don't know C, C++, WIndows SDK, That's what Java wants to do.
Personnaly I don't care : I'm a C++ programmer and Ive been an assembly
programmer during years.

Philippe


Post a reply to this message

From: Twyst
Subject: Re: Plugin idea
Date: 15 Mar 1999 16:01:07
Message: <36ed7513.0@news.povray.org>
I think you both have misunderstood the concept that I was trying to
present.

Java has nothing to do with this. I am talking about a plugin that will read
a text file and according to what it has in it, it draws a dialog.

***NOTE***

this is meant to allow non-programmers to write their own plugins, using a
specified format.
*** Java is NOT good for this.. ... ..

the format doesn't matter - but the idea is that John Q. Public can create a
text file that has his custom "plugin" and then send it to his buddy who
also has the plugin.

Here's an example mIRC script that will create a dialog -- this is sort of
what I'm thinking of.:

Dialog AllDialog {

  Title "Example Dialog Window"
  Size -1 -1 300 200

  Button "Ok", 1, 5 175 55 20, ok
  Button "Cancel", 2, 65 175 55 20, cancel

  Box "Box 1", 3, 5 5 140 70
  Box "Box 2", 4, 5 80 140 85
  Box "Box 3", 5, 155 130 140 60

  Radio "Item 1 - Dotted Radio", 6, 10 20 130 15, group
  Radio "Item 2 - Dotted Radio", 7, 10 35 130 15,
  Radio "Item 3 - Dotted Radio", 8, 10 50 130 15,

  Radio "Item 1", 9, 10 140 60 18, group push
  Radio "Item 2", 10, 75 140 60 18, push

  Check "Item 1 - Checkbox", 11, 165 147 120 15
  Check "Item 2 - Checkbox", 12, 165 167 120 15

  Edit "", 13, 10 95 125 22, autohs

  List 14, 155 50 140 80, sort

  Combo 15, 155 10 140 150, drop

  Text "Edit box", 16, 10 120 125 20

  Text "Drop Down Combo Box", 17, 155 32 140 20

  Text "List box", 18, 155 112 140 20
}

for example, in the first row containing "Button", it breaks down like so:

Object_type "Name" ,ID, X Y Width Height,  value

this is relatively simple, and easily coded without the need for java or
javascript. (i mean the script, not the plugin.)

Of course, there will need to be methods for getting values, output, and for
resetting to defaults.

List of features that would be nice:

- ability to spawn child dialogs
- sliders/spinners
- Loading scripts


I'd try -- but I don't know C/C++, and I don't think that Visual Basic would
work for this...


Twyst
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/O d+(-) s-: a-- C+++(++++) UL++ P+(--) L+ E- W+++>$ N++ o- K-
w+(---) O- M-- V- PS+ PE+ Y PGP t 5 X R tv- b++++ DI++ D G++ e h* r-- !y++
------END GEEK CODE BLOCK------
Johannes Hubert wrote in message <36ecc5e6.0@news.povray.org>...
>Ph Gibone wrote in message <36ecbcc9.0@news.povray.org>...
>>

>>>
>>>Uhm.
>>>
>>>Java sucks. End of story. Apart from the fact that Moray doesn't use or
>>>support it.
>>>--
>>
>>
>>Java Exists. End of story
>>
>>Moray doesn't use or support any scripting language so far
>>
>
>
>That's the reason for my previous "Huh?": Java is not a scripting language,
>so I don't really see a good reason to use it here.
>Maybe you mean JavaScript??? (Wouldn't be very useful either, since it is
>mostly web-oriented)
>
>Johannes.
>
>
>


Post a reply to this message

From: Rudy Velthuis
Subject: Re: Plugin idea
Date: 15 Mar 1999 17:15:59
Message: <36ed869f.0@news.povray.org>
Twyst schrieb in Nachricht <36ed7513.0@news.povray.org>...
>
>I'd try -- but I don't know C/C++, and I don't think that Visual Basic
would
>work for this...

It should, if you can get someone to translate the main header file for you
and if you can create real normal dlls (not OLE or ActiveX dlls) with VB (I
think VB6 can do this, not sure tho). Otherwise you're out of luck. Would be
a nice interface.

--
Rudy


Post a reply to this message

From: Ph Gibone
Subject: Re: Plugin idea
Date: 15 Mar 1999 17:39:32
Message: <36ed8c24.0@news.povray.org>
Hi TWYST

5 more things :

1) I'm not a Java Fan
2) The actual Plugin interface is pure genius, very easy to use as long as
you know C/C++, which is the least for a DLL
3) If you want to have a full featured language one day or another you will
need something as sophisticated as JavaScript (if we can say it is),
Personally I'm very glad with the actual interface, and I don't need
anything else.
4) A good idea for plugins would be for any of us that has an idea for a
good plugin : send a mail to Lutz so that he can publish your request, and
publish a request in this forum, I'm sure that some one will take it, and if
not, the language will not be the reason.
5) The following lines of codes are JavaScript, isn't it what you ask for ?
This is not a very rich example, and I agree that the presence of items like
this.form can sound cryptic. For me the *ONLY* advantage of JavaScript is :
it exists !

<SCRIPT LANGUAGE="JavaScript">

<!-- Original: Rick Johnson -->
<!-- Web Site:  http://members.tripod.com/~RickJohnson -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function a_plus_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=a+b
form.ans.value = c
}
function a_minus_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=a-b
form.ans.value=c
}
function a_times_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=a*b
form.ans.value=c
}
function a_div_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=a/b
form.ans.value = c
}
function a_pow_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=Math.pow(a, b)
form.ans.value = c
}
// End -->
</SCRIPT>

<!-- STEP TWO: Put this code into the BODY of your HTML document  -->

<BODY>
<CENTER>
<FORM name="formx"><input type=text size=4 value=12 name="a">
<input type="button" value="  +  " onClick="a_plus_b(this.form)">
<input type="button" value="  -  " onClick="a_minus_b(this.form)">
<input type="button" value="  x  " onClick="a_times_b(this.form)">
<input type="button" value="  /  " onClick="a_div_b(this.form)">
<input type="button" value="  ^  " onClick="a_pow_b(this.form)">
<input type="number" size=4 value=3 name="b"> = <input type "number" value=0
name="ans" size=9>
</FORM>
</CENTER>

<!-- Script Size:  1.72 KB  -->


Philippe


Post a reply to this message

From: Nathan Kopp
Subject: Re: Plugin idea
Date: 15 Mar 1999 23:17:55
Message: <36EDDB2A.6C1C618D@Kopp.com>
Twyst,

I really like your concept (I've been following this thread for a bit).  I
think that you'll a bit more powerful of a scripting language, though, in
order for a plug-in to be able to do anything useful.  Trying to jump all
the way to javascript (or something like it) would probably be a bit
difficult (unless there's open source code available to parse and execute
it already).  Maybe something a bit simpler, but something that is
designed for growth.

-Nathan

Twyst wrote:
> 
> I think you both have misunderstood the concept that I was trying to
> present.
> 
> Java has nothing to do with this. I am talking about a plugin that will read
> a text file and according to what it has in it, it draws a dialog.
> 
> ***NOTE***
> 
> this is meant to allow non-programmers to write their own plugins, using a
> specified format.
> *** Java is NOT good for this.. ... ..
> 
> the format doesn't matter - but the idea is that John Q. Public can create a
> text file that has his custom "plugin" and then send it to his buddy who
> also has the plugin.
> 
> Here's an example mIRC script that will create a dialog -- this is sort of
> what I'm thinking of.:
> 
> Dialog AllDialog {
> 
>   Title "Example Dialog Window"
>   Size -1 -1 300 200
> 
>   Button "Ok", 1, 5 175 55 20, ok
>   Button "Cancel", 2, 65 175 55 20, cancel
> 
>   Box "Box 1", 3, 5 5 140 70
>   Box "Box 2", 4, 5 80 140 85
>   Box "Box 3", 5, 155 130 140 60
> 
>   Radio "Item 1 - Dotted Radio", 6, 10 20 130 15, group
>   Radio "Item 2 - Dotted Radio", 7, 10 35 130 15,
>   Radio "Item 3 - Dotted Radio", 8, 10 50 130 15,
> 
>   Radio "Item 1", 9, 10 140 60 18, group push
>   Radio "Item 2", 10, 75 140 60 18, push
> 
>   Check "Item 1 - Checkbox", 11, 165 147 120 15
>   Check "Item 2 - Checkbox", 12, 165 167 120 15
> 
>   Edit "", 13, 10 95 125 22, autohs
> 
>   List 14, 155 50 140 80, sort
> 
>   Combo 15, 155 10 140 150, drop
> 
>   Text "Edit box", 16, 10 120 125 20
> 
>   Text "Drop Down Combo Box", 17, 155 32 140 20
> 
>   Text "List box", 18, 155 112 140 20
> }
> 
> for example, in the first row containing "Button", it breaks down like so:
> 
> Object_type "Name" ,ID, X Y Width Height,  value
> 
> this is relatively simple, and easily coded without the need for java or
> javascript. (i mean the script, not the plugin.)
> 
> Of course, there will need to be methods for getting values, output, and for
> resetting to defaults.
> 
> List of features that would be nice:
> 
> - ability to spawn child dialogs
> - sliders/spinners
> - Loading scripts
> 
> I'd try -- but I don't know C/C++, and I don't think that Visual Basic would
> work for this...
> 
> Twyst
> --
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.1
> GCS/O d+(-) s-: a-- C+++(++++) UL++ P+(--) L+ E- W+++>$ N++ o- K-
> w+(---) O- M-- V- PS+ PE+ Y PGP t 5 X R tv- b++++ DI++ D G++ e h* r-- !y++
> ------END GEEK CODE BLOCK------
> Johannes Hubert wrote in message <36ecc5e6.0@news.povray.org>...
> >Ph Gibone wrote in message <36ecbcc9.0@news.povray.org>...
> >>

> >>>
> >>>Uhm.
> >>>
> >>>Java sucks. End of story. Apart from the fact that Moray doesn't use or
> >>>support it.
> >>>--
> >>
> >>
> >>Java Exists. End of story
> >>
> >>Moray doesn't use or support any scripting language so far
> >>
> >
> >
> >That's the reason for my previous "Huh?": Java is not a scripting language,
> >so I don't really see a good reason to use it here.
> >Maybe you mean JavaScript??? (Wouldn't be very useful either, since it is
> >mostly web-oriented)
> >
> >Johannes.
> >
> >
> >


Post a reply to this message

From: Johannes Hubert
Subject: Re: Plugin idea
Date: 16 Mar 1999 03:00:26
Message: <36ee0f9a.0@news.povray.org>
Ph Gibone wrote in message <36ed4961.0@news.povray.org>...
>>Maybe you mean JavaScript??? (Wouldn't be very useful either, since it is
>>mostly web-oriented)
>>
>
>
>You're right on this point, but at least you can define something which
more
>or less looks like a dialog box !


OK, now I get your point that you were thinking about how to define
dialogs...
Well, I still don't think that Java or JavaScript would be the right thing,
but at least my initial "Huh?" is cleared up! ;-)

Johannes.


Post a reply to this message

From: Johannes Hubert
Subject: Re: Plugin idea
Date: 16 Mar 1999 03:25:16
Message: <36ee156c.0@news.povray.org>
Twyst wrote in message <36ed7513.0@news.povray.org>...
>I think you both have misunderstood the concept that I was trying to
>present.


Actually, I understood you quite well the first time. That is why I was so
confused when Phillipe suggested Java.

I aggree that it is probably easiest to define a new simple script-language
that makes part of the power of the plugin-interface/SDK available to non
C/C++ programmers.
But we shouldn't kid ourselves: It will not work for non-programmers,
because it will still be a programming language. It will only take away the
need of that DLL building and stuff. Anyway, it sound like a cool idea to
me, something that seems worthy of checking out...

Johannes.


Post a reply to this message

From: Johannes Hubert
Subject: Re: Plugin idea
Date: 16 Mar 1999 03:25:17
Message: <36ee156d.0@news.povray.org>
Ph Gibone wrote in message <36ed4ab0.0@news.povray.org>...
>
>To make things clear, when I wrote about a scripting language for Moray I
>thought that it would be very convenient to be able to write a plugin even
>if you don't know C, C++, WIndows SDK,
[snip]

That is where the misunderstanding was, I think:

Twyst was thinking of a plug-in that would offer a simply scripting-language
to make part of the plug-in interface available to non (C/C++)-programmers,
or at least available without the need of compiling and building DLLs.

Your idea was to change/adapt the plugin interface of Moray so that it would
facilitate writing plugins in Java instead of C/C++.

Both are good ideas, but different ones, in my view.

You idea may be possible to realize in two ways: First (of course) would be
for Markus and Lutz to change the plugin-interface to allow interfacing to
Java (frankly, I don't see this happening ;-)
Or someone could write a Moray plugin in C++ that is actually only a wrapper
for the plugin-interface, and that exposes all interface methods and members
to a similar Java interface.

But the main question is: Is this needed?
Are there really people who are dying to write a Moray plugin and only don't
do so because they would have to program in C/C++? And would the same people
start programming like hell, if they could do so in Java instead?
I don't think so, because even in Java it would still require some
above-beginner-level programming skills, and people with such skills are
usually not bothered by the fact of which language they would have to use
for a certain task.

Java has other disadvantages for a project like this: The number of
different VM's that all behave slightly different would require quite some
testing of such a plugin, to make sure that it runs everywhere. Or the
author could require a certain VM (and a certain version of it) to be
installed, adding more installation burdon to the end-user.
Then there is the general sluggishness of Java (granted, it can be overcome
by the right programming, but still...).
Also the memory usage: Expect your VM (with a program loaded and running) to
use up at least 5-10 Megs of RAM - memory that is no longer available for
Moray (and more importantly POV-Ray) anymore.
And last not least: The look and feel (even with Swing's Windows L&F) would
be different between Moray and Java plugins, making them appear less
"seamless".

OK, just to clear that up (and because Philippe always stresses that he is
*not* a "Java-fan" ;-) I want to stress that I am not a Java "basher":
Actually, I earn my living by programming in Java and I like it (but it also
makes me very aware of its many shortcomings).

Greetings,
Johannes.


Post a reply to this message

From: Ph Gibone
Subject: Re: Plugin idea
Date: 16 Mar 1999 03:40:22
Message: <36ee18f6.0@news.povray.org>
>But we shouldn't kid ourselves: It will not work for non-programmers,
>because it will still be a programming language.

That's exactly what I mean, so why not take advantage of an existing one ?

Philippe


Post a reply to this message

From: Ph Gibone
Subject: Re: Plugin idea
Date: 16 Mar 1999 04:00:21
Message: <36ee1da5.0@news.povray.org>
Hi Johannes

I agree to most of the things you just wrote, but I want to add a few things

1) I was not thinking of a full featured Java VM, but I was thinking of
using the syntax of JavaScript, because, as you pointed it, someone will
need a very simple tool and some other will need a very sophisticated one,
so we need something sophisticated enough.

2) Don't hide yourself behind your finger (nothing personnal), writing a
plugin needs some skills, but it would be nice to get rid of SDK's hassles.

3) I insist : if someone has a good idea for a plugin, just publish the
request, I (or somebody else) will be glad to take it

Philippe


Post a reply to this message

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

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