1. Wmotor/Xmotor interoperability

If I write an application for Wmotor and get it working under Windows, would the
corresponding set of source files run properly under Unix with Xmotor installed?
If not, is there a straightforward process to translate code intended for Wmotor
so as to execute properly using Xmotor?

CChris

new topic     » topic index » view message » categorize

2. Re: Wmotor/Xmotor interoperability

CChris wrote:
> 
> 
> If I write an application for Wmotor and get it working under Windows, would
> the corresponding set of source files run properly under Unix with Xmotor
> installed?
> If not, is there a straightforward process to translate code intended for
> Wmotor
> so as to execute properly using Xmotor?
> 
> CChris

First the version of xmotor/wmotor in the archive is shrouded and will
only run in eu version 2.5

I have been using an unshrouded version with eu 3.1.x and it also works.

The main library ( motor.eu ) is the same one in both wmotor and xmotor.

The only difference between wmotor and xmotor is the demos and the include
files.

xmotor -- is used to write programs in x, xt, athena, open-motif, presently
I am playing around with using it with GTK.

wmotor -- is used for writing win32 code.

To write a cross-platform program you would need to use motor.eu to create
a wrapper library to use win32 code on windows and (motif or athena) to
emulate the same win32 code on Linux.

The advanage of motor.eu library is the ease of wrapping, shared libraries,
structures, even varible argument parameters, and other Linux support code.

To use some functions in windows:

library("kernel32.dll")
declare("ConnectNamedPipe",2,s)
declare("ContinueDebugEvent",3,s)
declare("ConvertDefaultLocale",1,u)
declare("ConvertThreadToFiber",1,u)
declare("CopyFileA",3,s)

To use some functions in Linux using XT:

library("libXt.so")
declare("XtAppAddWorkProc",3,u)
declare("XtAppAddConverter",6,n)
declare("XtScreenDatabase",1,u)
declare("XtAppSetSelectionTimeout",2,n)
declare("XtVaGetApplicationResources","..",n) <<-- Note a variable argument
parameter .
declare("XtIsObject",1,u)

I am also contemplating adding in line Assembler support in euphoria
functions.

I have thought about releasing unshrouded code to the archive but
how do I protect my original ideas from others claiming to have
them as their own after I have invested all my hard work to
discover my ideas. 
 
Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view message » categorize

3. Re: Wmotor/Xmotor interoperability

Bernie Ryan wrote:
> 
> CChris wrote:
> > 
> > 
> > If I write an application for Wmotor and get it working under Windows, would
> > the corresponding set of source files run properly under Unix with Xmotor
> > installed?
> > If not, is there a straightforward process to translate code intended for
> > Wmotor
> > so as to execute properly using Xmotor?
> > 
> > CChris
> 
> First the version of xmotor/wmotor in the archive is shrouded and will
> only run in eu version 2.5
> 
> I have been using an unshrouded version with eu 3.1.x and it also works.
> 
> The main library ( motor.eu ) is the same one in both wmotor and xmotor.
> 
> The only difference between wmotor and xmotor is the demos and the include
> files.
> 
> xmotor -- is used to write programs in x, xt, athena, open-motif, presently
> I am playing around with using it with GTK.
> 
> wmotor -- is used for writing win32 code.
> 
> To write a cross-platform program you would need to use motor.eu to create
> a wrapper library to use win32 code on windows and (motif or athena) to
> emulate the same win32 code on Linux.
> 
> The advanage of motor.eu library is the ease of wrapping, shared libraries,
> structures, even varible argument parameters, and other Linux support code.
> 
> To use some functions in windows:
> 
> library("kernel32.dll")
> declare("ConnectNamedPipe",2,s)
> declare("ContinueDebugEvent",3,s)
> declare("ConvertDefaultLocale",1,u)
> declare("ConvertThreadToFiber",1,u)
> declare("CopyFileA",3,s)
> 
> To use some functions in Linux using XT:
> 
> library("libXt.so")
> declare("XtAppAddWorkProc",3,u)
> declare("XtAppAddConverter",6,n)
> declare("XtScreenDatabase",1,u)
> declare("XtAppSetSelectionTimeout",2,n)
> declare("XtVaGetApplicationResources","..",n) <<-- Note a variable argument
> parameter .
> declare("XtIsObject",1,u)
> 

Oh, so the main engine "only" provides for a common wrapper system for "any"
installed toolkit, but what is presented is the interface for each toolkit (gdi,
Xt,...). Got it now.

> I am also contemplating adding in line Assembler support in euphoria
> functions.
> 
> I have thought about releasing unshrouded code to the archive but
> how do I protect my original ideas from others claiming to have
> them as their own after I have invested all my hard work to
> discover my ideas. 
>  

Microsoft is well known for stealing small software companies' bright ideas and
settling the resulting patent litigations out of court, so... I don't see how you
could do that. Would it make sense in an open source environment anyway?

CChris

> Bernie
> 
> My files in archive:
> WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 
> 
> Can be downloaded here:
> <a
> href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a>

new topic     » goto parent     » topic index » view message » categorize

4. Re: Wmotor/Xmotor interoperability

CChris wrote:

> Oh, so the main engine "only" provides for a common wrapper system for "any"
> installed toolkit, but what is presented is the interface for each toolkit
> (gdi,
> Xt,...). Got it now.
> 

Yes, you will notice that you need only to declare the name of a function,
the number of parameters, and the return type and you are ready to call it.

>
> Microsoft is well known for stealing small software companies' bright ideas
> and settling the resulting patent litigations out of court, so... I don't see
> how you could do that. Would it make sense in an open source environment
> anyway?
> 

Hee Hee !
I do not own a small software company; just an old man writing code.

I don't think any major company would be interested in my Euphoria code.

Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view message » categorize

5. Re: Wmotor/Xmotor interoperability

Bernie Ryan wrote:
> 
> CChris wrote:
> > 
> > 
> > If I write an application for Wmotor and get it working under Windows, would
> > the corresponding set of source files run properly under Unix with Xmotor
> > installed?
> > If not, is there a straightforward process to translate code intended for
> > Wmotor
> > so as to execute properly using Xmotor?
> > 
> > CChris
> 
> First the version of xmotor/wmotor in the archive is shrouded and will
> only run in eu version 2.5
> 
> I have been using an unshrouded version with eu 3.1.x and it also works.
> 
> The main library ( motor.eu ) is the same one in both wmotor and xmotor.
> 
> The only difference between wmotor and xmotor is the demos and the include
> files.
> 
> xmotor -- is used to write programs in x, xt, athena, open-motif, presently
> I am playing around with using it with GTK.
> 
> wmotor -- is used for writing win32 code.
> 
> To write a cross-platform program you would need to use motor.eu to create
> a wrapper library to use win32 code on windows and (motif or athena) to
> emulate the same win32 code on Linux.
> 
> The advanage of motor.eu library is the ease of wrapping, shared libraries,
> structures, even varible argument parameters, and other Linux support code.
> 
> To use some functions in windows:
> 
> library("kernel32.dll")
> declare("ConnectNamedPipe",2,s)
> declare("ContinueDebugEvent",3,s)
> declare("ConvertDefaultLocale",1,u)
> declare("ConvertThreadToFiber",1,u)
> declare("CopyFileA",3,s)
> 
> To use some functions in Linux using XT:
> 
> library("libXt.so")
> declare("XtAppAddWorkProc",3,u)
> declare("XtAppAddConverter",6,n)
> declare("XtScreenDatabase",1,u)
> declare("XtAppSetSelectionTimeout",2,n)
> declare("XtVaGetApplicationResources","..",n) <<-- Note a variable argument
> parameter .
> declare("XtIsObject",1,u)
> 
> I am also contemplating adding in line Assembler support in euphoria
> functions.
> 
> I have thought about releasing unshrouded code to the archive but
> how do I protect my original ideas from others claiming to have
> them as their own after I have invested all my hard work to
> discover my ideas. 

Hi

I'm interested Bernie, has this ever happened before in this community, has
anyone knowingly plaguerised code written by others.
>  
> Bernie
> 
> My files in archive:
> WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 
> 
> Can be downloaded here:
> <a
> href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a>

You write in a later message you're just an old man writing code, but one
who has helped me out of many other difficult situations. I wouldn't be
interested in stealing your code, just using it with the recognition it 
deserves (for any of my programs that may become used by the general public)

Thanks

Chris

new topic     » goto parent     » topic index » view message » categorize

6. Re: Wmotor/Xmotor interoperability

ChrisBurch3 wrote:

> You write in a later message you're just an old man writing code, but one
> who has helped me out of many other difficult situations. I wouldn't be
> interested in stealing your code, just using it with the recognition it 
> deserves (for any of my programs that may become used by the general public)
> 

Chris:
  
A user once included some of my code in a library and then declared that

new library had an open source license without asking my permission.

I didn't consider it stealing code but just poor manners.

Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view message » categorize

7. Re: Wmotor/Xmotor interoperability

Bernie Ryan wrote:
> 
> ChrisBurch3 wrote:
> 
> > You write in a later message you're just an old man writing code, but one
> > who has helped me out of many other difficult situations. I wouldn't be
> > interested in stealing your code, just using it with the recognition it 
> > deserves (for any of my programs that may become used by the general public)
> > 
> 
> Chris:
>   
> A user once included some of my code in a library and then declared that
> 
> new library had an open source license without asking my permission.
> 
> I didn't consider it stealing code but just poor manners.
> 
> Bernie
> 
> My files in archive:
> WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 
> 
> Can be downloaded here:
> <a
> href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a>

It's a bit of both, actually. I support open source, but for all but trivial
code then attribution should be made...

Then again on my latest contribution I didn't attribute any of the code... I
should fix that. It was basically put together from snippets on the list though.

--
A complex system that works is invariably found to have evolved from a simple
system that works.
--John Gall's 15th law of Systemantics.

"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare

j.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu