Re: [vos-d] Swig

2006-03-13 Thread George Birbilis



Plus the GNU guys have been building a C# compiler 
that compiles to native code and targets native libraries (instead of a .NET [or 
compatible] runtime). So one could use it instead of C++ I suppose on 
Unix
 
---George Birbilis <[EMAIL PROTECTED]>Microsoft MVP J# 
2004-2006http://www.kagi.com/birbilis


  That it costs anything is a common misconception:
   
  The Microsoft C# compiler comes for free with Windows.
  You can download the Visual Studio 2005 Express Editions for free for a 
  year.
  You can download other integrated development enviroments for free (such 
  as SharpDevelop)
  You can build C# in Mono for free, which also runs on Linux which is 
  a free OS.
  All the MSDN documentation is available for free online.
   
  So altogether, it is highly possible to spend no money and build C# 
  apps. 
  On 3/12/06, sconzey 
  <[EMAIL PROTECTED]> wrote: 

  
The problem is that as far as I know, C# isn't 
anywhere near as portable as python, nor is it anywhere near as open. There 
are many free python development applications, whereas to write C# requires 
£300 worth of software. My vote's cast for python.

On 3/12/06, Hugh Perkins 
< 
[EMAIL PROTECTED]> wrote:


  
  
  Hmmm,
   
  After playing around a little with C#, I have to agree with Neil: C# 
  rocks.
   
  Just to throw some salt in the wounds of the Python discussions, I 
  cant help thinking that C# has all the advantages of both Python (run from 
  source, easy to read) and C++ (strong typing, runs quickly).
   
  Btw, OSMP is now available in a C# version ;-)
   
  http://manageddreams.com/osmpbb/viewtopic.php?t=333
   
  On 9/2/05, Neil 
  Mosafi <[EMAIL PROTECTED]> 
  wrote: 
  

Yep, not had much practise with managed C++ as I'm lazy and C# is so much easier (!), but I guess managed C++ 
could be the way to go for integrating with VOS as it can fully utilise 
the C++ classes. 
 
Still there'd be work required to make the API more ".net 
like"  
  
___vos-d mailing 
[email protected]://www.interreality.org/cgi-bin/mailman/listinfo/vos-d 



-- 
QOTD:"Violence is the last resort of the 
incompetent"-- 
Isaac Asimov GPG Public Key: http://www.jargonjunkie.com/rants/scones.ascWebsite: 
http://www.jargonjunkie.com/___vos-d 
mailing [email protected]://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
  
  

  ___vos-d mailing 
  [email protected]://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] Swig

2006-03-12 Thread Hugh Perkins
Yeah, Neil is 100% right.
 
FWIW, I'm using Scite as my editor, and lescript as my build tool.
 
Scite: http://www.scintilla.org/SciTE.html
lescript: http://manageddreams.com/utils/lescriptmar9.zip
 
Lescript lets you use C# as though it is a scripting language, ie you can do:
 
C:\> lescript --nologo helloworld.cs
 
Hello World!
 
C:\>
 
You need to have .Net Framework 1.1 runtime installed to use lescript ( http://www.microsoft.com/downloads/details.aspx?FamilyID=262d25e3-f589-4842-8157-034d1e7cf3a3&DisplayLang=en
 )
 
Hugh
http://manageddreams.com
 
On 3/13/06, Neil Mosafi <[EMAIL PROTECTED]> wrote:


That it costs anything is a common misconception:
 
The Microsoft C# compiler comes for free with Windows.
You can download the Visual Studio 2005 Express Editions for free for a year.
You can download other integrated development enviroments for free (such as SharpDevelop)
You can build C# in Mono for free, which also runs on Linux which is a free OS.
All the MSDN documentation is available for free online.
 
So altogether, it is highly possible to spend no money and build C# apps. 
___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] Swig

2006-03-12 Thread Neil Mosafi
That it costs anything is a common misconception:
 
The Microsoft C# compiler comes for free with Windows.
You can download the Visual Studio 2005 Express Editions for free for a year.
You can download other integrated development enviroments for free (such as SharpDevelop)
You can build C# in Mono for free, which also runs on Linux which is a free OS.
All the MSDN documentation is available for free online.
 
So altogether, it is highly possible to spend no money and build C# apps. 
On 3/12/06, sconzey <[EMAIL PROTECTED]> wrote:

The problem is that as far as I know, C# isn't anywhere near as portable as python, nor is it anywhere near as open. There are many free python development applications, whereas to write C# requires £300 worth of software. 
My vote's cast for python.

On 3/12/06, Hugh Perkins <
[EMAIL PROTECTED]> wrote:




Hmmm,
 
After playing around a little with C#, I have to agree with Neil: C# rocks.
 
Just to throw some salt in the wounds of the Python discussions, I cant help thinking that C# has all the advantages of both Python (run from source, easy to read) and C++ (strong typing, runs quickly).
 
Btw, OSMP is now available in a C# version ;-)
 
http://manageddreams.com/osmpbb/viewtopic.php?t=333
 
On 9/2/05, Neil Mosafi <[EMAIL PROTECTED]> wrote: 



Yep, not had much practise with managed C++ as I'm lazy and C# is so much easier (!), but I guess managed C++ could be the way to go for integrating with VOS as it can fully utilise the C++ classes. 

 
Still there'd be work required to make the API more ".net like"  

___vos-d mailing list
[email protected]://www.interreality.org/cgi-bin/mailman/listinfo/vos-d



-- QOTD:"Violence is the last resort of the incompetent"-- Isaac Asimov GPG Public Key: 
http://www.jargonjunkie.com/rants/scones.ascWebsite: http://www.jargonjunkie.com/
___vos-d mailing [email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] Swig

2006-03-12 Thread sconzey
The problem is that as far as I know, C# isn't anywhere near as portable as python, nor is it anywhere near as open. There are many free python development applications, whereas to write C# requires £300 worth of software.
My vote's cast for python.On 3/12/06, Hugh Perkins <[EMAIL PROTECTED]> wrote:
Hmmm,
 
After playing around a little with C#, I have to agree with Neil: C# rocks.
 
Just to throw some salt in the wounds of the Python discussions, I cant help thinking that C# has all the advantages of both Python (run from source, easy to read) and C++ (strong typing, runs quickly).
 
Btw, OSMP is now available in a C# version ;-)
 
http://manageddreams.com/osmpbb/viewtopic.php?t=333
 
On 9/2/05, Neil Mosafi <[EMAIL PROTECTED]> wrote:



Yep, not had much practise with managed C++ as I'm lazy and C# is so much easier (!), but I guess managed C++ could be the way to go for integrating with VOS as it can fully utilise the C++ classes.

 
Still there'd be work required to make the API more ".net like"  
___vos-d mailing [email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d-- QOTD:"Violence is the last resort of the incompetent"-- Isaac Asimov
GPG Public Key: http://www.jargonjunkie.com/rants/scones.ascWebsite: http://www.jargonjunkie.com/
___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] Swig

2006-03-11 Thread Hugh Perkins
Hmmm,
 
After playing around a little with C#, I have to agree with Neil: C# rocks.
 
Just to throw some salt in the wounds of the Python discussions, I cant help thinking that C# has all the advantages of both Python (run from source, easy to read) and C++ (strong typing, runs quickly).
 
Btw, OSMP is now available in a C# version ;-)
 
http://manageddreams.com/osmpbb/viewtopic.php?t=333
 
On 9/2/05, Neil Mosafi <[EMAIL PROTECTED]> wrote:


Yep, not had much practise with managed C++ as I'm lazy and C# is so much easier (!), but I guess managed C++ could be the way to go for integrating with VOS as it can fully utilise the C++ classes.

 
Still there'd be work required to make the API more ".net like"  
___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] SWIG help?

2005-09-30 Thread Peter Amstutz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Uh... I don't think so.  The only large-scale change I did (which was a 
while ago) was to introduce empty virtual destructors in all the pure 
abstract interface classes, so that gcc4 wouldn't complain.  But I don't 
see how that would confuse SWIG...  Otherwise, I can't think of any API 
changes I've made recently.


On Fri, 30 Sep 2005, Reed Hedges wrote:



Thanks Hugh, that helps a lot.  I was confused because it seemed to happen all
of a sudden without too many changes in VOS, and the problem affects almost all
of the Python classes.  One additional thing I noticed is that this doesn't
affect the *Ptr classes, e.g. Vobject class has the raise in __init__ but
VobjectPtr doesn't.  The problem seems to affect classes that do not have common
parent classes as well (e.g. it isn't just Vobject-derived classes), but Pete,
did you change some namespace notation or the virtuality of some stuff in
Vobject or VobjectBase?

Reed


On Fri, Sep 30, 2005 at 12:27:58AM +0200, Hugh Perkins wrote:

Not all objects can be constructed, for example anything pure virtual
Swig attempts to detect which objects can and cant be constructed. Sometimes
it gets it wrong
One way in which it gets wrong are where you instantiate a method in a
derived class that was pure virtual in the base class. If the method
parameters are not textually identical, Swig gets confused. For example if
one has VOP::sometype, and the other has sometype, swig considers this as
too differentypes. Since swig considers the derived class can no longer be
constructed, you get the error below.

Theres an option on the commandline to change behavior for creatoin of
constructors, but you're probably better off diagnosing why the constructor
is not being created.

Note that this issue is a PAIN IN THE BUTT to diagnose. You might consider
rebuilding swig from scratch and getting it to pump out rather more
debugging information than it does. Otherwise look forward to a good half
hour or more of instantiating all your methods (replacing = 0 with {} ) and
stuff...

Hugh

On 9/28/05, Reed Hedges <[EMAIL PROTECTED]> wrote:



Hello, after about a week hiatus, I returned to a little bit of work I
was doing with Python. All of a sudden the SWIG wrapper won't work for
me and I don't know why. I may have done something to break it (I have
made a few changes to vos_swig.i etc.) but I can't figure out what. I
just updated VOS from CVS (excepting my local changes to SWIG of course).

Every proxy class in Python that Swig generates now has the following in
its __init__ definition:

def __init__(self): raise RuntimeError, "No constructor defined"

WTF? This makes it impossible to create any Python objects!

Help!

Any ideas?

Reed



___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d




___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d



___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d



[   Peter Amstutz   ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED]  ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDPYtoaeHUyhjCHfcRAv2KAKCvfu7HiqSKKt7H3sTDS/jKmAQQlwCfcAJR
1mEHmh3sAzkG9O81uZTzrL4=
=7V0Q
-END PGP SIGNATURE-


___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] SWIG help?

2005-09-30 Thread Reed Hedges

Thanks Hugh, that helps a lot.  I was confused because it seemed to happen all
of a sudden without too many changes in VOS, and the problem affects almost all
of the Python classes.  One additional thing I noticed is that this doesn't
affect the *Ptr classes, e.g. Vobject class has the raise in __init__ but
VobjectPtr doesn't.  The problem seems to affect classes that do not have common
parent classes as well (e.g. it isn't just Vobject-derived classes), but Pete,
did you change some namespace notation or the virtuality of some stuff in
Vobject or VobjectBase?

Reed


On Fri, Sep 30, 2005 at 12:27:58AM +0200, Hugh Perkins wrote:
> Not all objects can be constructed, for example anything pure virtual
> Swig attempts to detect which objects can and cant be constructed. Sometimes
> it gets it wrong
> One way in which it gets wrong are where you instantiate a method in a
> derived class that was pure virtual in the base class. If the method
> parameters are not textually identical, Swig gets confused. For example if
> one has VOP::sometype, and the other has sometype, swig considers this as
> too differentypes. Since swig considers the derived class can no longer be
> constructed, you get the error below.
> 
> Theres an option on the commandline to change behavior for creatoin of
> constructors, but you're probably better off diagnosing why the constructor
> is not being created.
> 
> Note that this issue is a PAIN IN THE BUTT to diagnose. You might consider
> rebuilding swig from scratch and getting it to pump out rather more
> debugging information than it does. Otherwise look forward to a good half
> hour or more of instantiating all your methods (replacing = 0 with {} ) and
> stuff...
> 
> Hugh
> 
> On 9/28/05, Reed Hedges <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hello, after about a week hiatus, I returned to a little bit of work I
> > was doing with Python. All of a sudden the SWIG wrapper won't work for
> > me and I don't know why. I may have done something to break it (I have
> > made a few changes to vos_swig.i etc.) but I can't figure out what. I
> > just updated VOS from CVS (excepting my local changes to SWIG of course).
> >
> > Every proxy class in Python that Swig generates now has the following in
> > its __init__ definition:
> >
> > def __init__(self): raise RuntimeError, "No constructor defined"
> >
> > WTF? This makes it impossible to create any Python objects!
> >
> > Help!
> >
> > Any ideas?
> >
> > Reed
> >
> >
> >
> > ___
> > vos-d mailing list
> > [email protected]
> > http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
> >

> ___
> vos-d mailing list
> [email protected]
> http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] SWIG help?

2005-09-29 Thread Hugh Perkins
Not all objects can be constructed, for example anything pure virtual
Swig attempts to detect which objects can and cant be constructed.  Sometimes it gets it wrong
One way in which it gets wrong are where you instantiate a method in a
derived class that was pure virtual in the base class.  If the
method parameters are not textually identical, Swig gets
confused.  For example if one has VOP::sometype, and the other has
sometype, swig considers this as too differentypes.   Since
swig considers the derived class can no longer be constructed, you get
the error below.

Theres an option on the commandline to change behavior for creatoin of
constructors, but you're probably better off diagnosing why the
constructor is not being created.

Note that this issue is a PAIN IN THE BUTT to diagnose.  You might
consider rebuilding swig from scratch and getting it to pump out rather
more debugging information than it does.  Otherwise look forward
to a good half hour or more of instantiating all your methods
(replacing = 0 with {} ) and stuff...

HughOn 9/28/05, Reed Hedges <[EMAIL PROTECTED]> wrote:
Hello, after about a week hiatus, I returned to a little bit of work Iwas doing with Python.  All of a sudden the SWIG wrapper won't work forme and I don't know why.  I may have done something to break it (I have
made a few changes to vos_swig.i etc.) but I can't figure out what. Ijust updated VOS from CVS (excepting my local changes to SWIG of course).Every proxy class in Python that Swig generates now has the following in
its __init__ definition:def __init__(self): raise RuntimeError, "No constructor defined"WTF?  This makes it impossible to create any Python objects!Help!Any ideas?Reed
___vos-d mailing [email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] Swig

2005-09-02 Thread Hugh Perkins
> Anyway I can't possibly agree with Hugh's statement about C# being the same as VB!  It's much closer to C++/Java

Well, partly it's to be controversial :-)  but I cant help
thinking that C# is a genius marketing from Microsoft for Visual
Basic.  VB has generally been an excellent language for business
applications - especially the frontend GUIs - because its fairly quick
to write things in, and who cares if it runs a bit more slowly?

However, VB has zero streetcred (negative streetcred perhaps?), so even
though the VB of today offers full classes, objects and so on, no-one
wants to be seen dead writing it.  That's despite the fact that
many people find C++ pretty challenging, what with all those pointers
and things which, lets face it, are really a pain in the butt :-/
So, along comes C#.  It sounds like C++, it looks like C++, but
it's easy like VB.  Suddenly people can program in VB whilst
having street-cred.  What an awesome combo!  So, there we go,
all cred to Microsoft for an awesome bit of marketing there!

Not really on topic, but good for a short debate perhaps :-)

Hugh
On 9/2/05, Neil Mosafi <[EMAIL PROTECTED]> wrote:
Yep, not had much practise with managed C++ as I'm lazy and C# is
so much easier (!), but I guess managed C++ could be the way to go
for integrating with VOS as it can fully utilise the C++ classes.
 
Still there'd be work required to make the API more ".net like" 
On 9/2/05, Peter Amstutz <[EMAIL PROTECTED]
> wrote:
-BEGIN PGP SIGNED MESSAGE-Hash: SHA1On Fri, 2 Sep 2005, Reed Hedges wrote:
> Am I correct that it's no problem to call C++ code or link against a C++
> library from .net?  Would the C++ library (libvos for example :) need to> be compiled with CLR (".net extensions") enabled?>> ReedSee my last email :-)Basically, linking managed/unmanaged C++ is easy.  Linking unmanged c++ to
any other .Net language requires writing a mananged API wrapper.[   Peter Amstutz   ][ [EMAIL PROTECTED]
 ][ [EMAIL PROTECTED]
  ][Lead Programmer][Interreality Project][Virtual Reality for the Internet][ VOS: Next Generation Internet Communication][ 
http://interreality.org ][ 
http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)iD8DBQFDGG6waeHUyhjCHfcRAlLbAJ9wodC0Z1VkrdSeE36IO2zR6WSBtQCgkRmU
Cfy3UPQaqbXk9kMlykrTY6A==fVjl-END PGP SIGNATURE-___vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


___vos-d mailing [email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] Swig

2005-09-02 Thread Neil Mosafi
Yep, not had much practise with managed C++ as I'm lazy and C# is so much easier (!), but I guess managed C++ could be the way to go for integrating with VOS as it can fully utilise the C++ classes.
 
Still there'd be work required to make the API more ".net like" 
On 9/2/05, Peter Amstutz <[EMAIL PROTECTED]> wrote:
-BEGIN PGP SIGNED MESSAGE-Hash: SHA1On Fri, 2 Sep 2005, Reed Hedges wrote:> Am I correct that it's no problem to call C++ code or link against a C++
> library from .net?  Would the C++ library (libvos for example :) need to> be compiled with CLR (".net extensions") enabled?>> ReedSee my last email :-)Basically, linking managed/unmanaged C++ is easy.  Linking unmanged c++ to
any other .Net language requires writing a mananged API wrapper.[   Peter Amstutz   ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED]
  ][Lead Programmer][Interreality Project][Virtual Reality for the Internet][ VOS: Next Generation Internet Communication][ http://interreality.org ][ 
http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.1 (GNU/Linux)iD8DBQFDGG6waeHUyhjCHfcRAlLbAJ9wodC0Z1VkrdSeE36IO2zR6WSBtQCgkRmU
Cfy3UPQaqbXk9kMlykrTY6A==fVjl-END PGP SIGNATURE-___vos-d mailing [email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] Swig

2005-09-02 Thread Peter Amstutz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 2 Sep 2005, Reed Hedges wrote:

Am I correct that it's no problem to call C++ code or link against a C++ 
library from .net?  Would the C++ library (libvos for example :) need to 
be compiled with CLR (".net extensions") enabled?


Reed


See my last email :-)

Basically, linking managed/unmanaged C++ is easy.  Linking unmanged c++ to 
any other .Net language requires writing a mananged API wrapper.


[   Peter Amstutz   ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED]  ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDGG6waeHUyhjCHfcRAlLbAJ9wodC0Z1VkrdSeE36IO2zR6WSBtQCgkRmU
Cfy3UPQaqbXk9kMlykrTY6A=
=fVjl
-END PGP SIGNATURE-


___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] Swig

2005-09-02 Thread Peter Amstutz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

At work we have a large application that incorporates Managed and 
Unmanaged C++, C# and several COM objects.  .Net/CLR does a pretty good 
job of tying it all together without too much fuss (except for the COM 
objects, which are ugly and we're trying to get rid of).


For C++, it's easy for managed code to call unmanaged code, and I think 
it's at least possible for unmananged code to call managed code.  You just 
compile the unmanaged project as /clr, and your managed code can #include 
the headers and use the DLL just like normal.  I presume it figures out 
the P/Invoke stuff for you.


Calling unmanaged C code from C# is harder, because you have to explicitly 
declare each function in your C# code.  Creating C++ objects and calling 
C++ methods from C# with P/Invoke is probably not possible.


So I expect it would be pretty easy to integrate VOS into a managed C++ 
project.  To integrate VOS into an arbitrary .Net project, a set of API 
wrappers would need to be written (or possibly generated by SWIG!)  These 
would convert std::string to System.String, manage the VOS reference 
count, etc.  This would be a lot more work.


For Unix, there's the Mono project.  I don't know if they have any plans 
for supporting Managed C++ (actually, I just did a google search, and it 
looks like there is a nascent project to add it to GCC).  Visual C++ 8 is 
also going to have a totally new syntax for the managed extensions, so 
it's probably not wise to put too much effort into it, anyway...


That said, I am interested in supporting VOS in .Net as this certainly is 
where the Windows world is going.  I don't know what the priority should 
be, though.  We should get at least one set of cross-language bindings 
finished and integrated before worrying about others!


However, I'm just one developer, so unless someone is volunteering to work 
on this, I think that I need to prioritize my time on fixing bugs and 
adding features which will bring in some end users and attract more 
attention.


On Fri, 2 Sep 2005, Neil Mosafi wrote:


Hi
Well finally something I feel qualified to comment on!
I'm not sure about C++ functions, but you can definitely call C functions
which are exposed in DLLs using P/Invoke in .NET. It's very simple - you
just create a bunch of .NET functions which match the C function signatures,
then you can use certain attributes for telling it which DLL the method is
in and how to marshal the managed memory to unmanaged memory. If you want a
nice API it's best to design something that behaves more like a .NET
component would (e.g using delegates and event handlers rather than
inheriting off the PropertyListener for notifications) which would take some
work.
Anyway I can't possibly agree with Hugh's statement about C# being the same
as VB! It's much closer to C++/Java. Maybe he meant that
VB.NETand C# will both compile into the same MSIL code
or something?
Regards,
Neil


[   Peter Amstutz   ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED]  ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDGG5DaeHUyhjCHfcRAmi9AJ9fgTgQPhVy+YJ0Wq0Okpx4C23+VACfbjrJ
QrYY5Am+F6HKtNhfxih61jA=
=stfu
-END PGP SIGNATURE-


___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] Swig

2005-09-02 Thread Neil Mosafi
Hi
 
Well finally something I feel qualified to comment on!
 
I'm not sure about C++ functions, but you can definitely call C functions which are exposed in DLLs using P/Invoke in .NET.  It's very simple - you just create a bunch of .NET functions which match the C function signatures, then you can use certain attributes for telling it which DLL the method is in and how to marshal the managed memory to unmanaged memory.  If you want a nice API it's best to design something that behaves more like a .NET component would (
e.g using delegates and event handlers rather than inheriting off the PropertyListener for notifications) which would take some work.
 
Anyway I can't possibly agree with Hugh's statement about C# being the same as VB!  It's much closer to C++/Java.  Maybe he meant that VB.NET and C# will both compile into the same MSIL code or something?

 
Regards,Neil
 
On 9/2/05, Reed Hedges <[EMAIL PROTECTED]> wrote:
On Thu, Sep 01, 2005 at 11:32:11PM +0200, Hugh Perkins wrote:> What Peter said. I think. It's been a while :-)
>> Random aside: I've been playing with .Net at work; it's kindof cool, though> it's basically VB with a C++ syntactic sugar. I dunno why people claim that> C# means the end of VB, since C# basically *is* VB. It's still pretty cool
> though :-)Am I correct that it's no problem to call C++ code or link against a C++ libraryfrom .net?  Would the C++ library (libvos for example :) need to be compiledwith CLR (".net extensions") enabled?
Reed___vos-d mailing [email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] Swig

2005-09-02 Thread Reed Hedges
On Thu, Sep 01, 2005 at 11:32:11PM +0200, Hugh Perkins wrote:
> What Peter said. I think. It's been a while :-)
> 
> Random aside: I've been playing with .Net at work; it's kindof cool, though 
> it's basically VB with a C++ syntactic sugar. I dunno why people claim that 
> C# means the end of VB, since C# basically *is* VB. It's still pretty cool 
> though :-)


Am I correct that it's no problem to call C++ code or link against a C++ library
from .net?  Would the C++ library (libvos for example :) need to be compiled
with CLR (".net extensions") enabled?

Reed


___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] Swig

2005-09-01 Thread Hugh Perkins
What Peter said.  I think.  It's been a while :-)

Random aside: I've been playing with .Net at work; it's kindof cool,
though it's basically VB with a C++ syntactic sugar.  I dunno why
people claim that C# means the end of VB, since C# basically *is*
VB.  It's still pretty cool though :-)

HughOn 9/1/05, Peter Amstutz <[EMAIL PROTECTED]> wrote:
-BEGIN PGP SIGNED MESSAGE-Hash: SHA1Welcome back, Reed :-)I haven't touched it for a 2-3 months, but when Hugh Perkins and I wereworking on it we had wrapped most of the core API and were working on
wrapping the Property metaobject.  I think the most important thing thatneeds to be done is to wrap the rest of the metaobjects (misc, a3dl).I don't remember if we figured out how to implement new metaobjects from
Python yet.It's implemented as a Python extension, so you can write VOS programs inpure Python.  Another thing to do is to write some glue code toincorporate the Python interpreter so that a C++ app can embed Python
code.On Thu, 1 Sep 2005, Reed Hedges wrote:> Hello, what's the current state of Swig and Python?>> Thanks>> Reed[   Peter Amstutz   ][ 
[EMAIL PROTECTED] ][ [EMAIL PROTECTED]  ][Lead Programmer][Interreality Project][Virtual Reality for the Internet][ VOS: Next Generation Internet Communication][ 
http://interreality.org ][ http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]
-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.1 (GNU/Linux)iD8DBQFDF2V0aeHUyhjCHfcRAuXZAJ4ocbPOOBF580NzlJYqIWb8DT+kawCdH6XAG5/pAX0ArnWMrX1DxPr/mfY==y+jn-END PGP SIGNATURE-
___vos-d mailing [email protected]://www.interreality.org/cgi-bin/mailman/listinfo/vos-d

___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] Swig

2005-09-01 Thread Peter Amstutz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Welcome back, Reed :-)

I haven't touched it for a 2-3 months, but when Hugh Perkins and I were 
working on it we had wrapped most of the core API and were working on 
wrapping the Property metaobject.  I think the most important thing that 
needs to be done is to wrap the rest of the metaobjects (misc, a3dl).


I don't remember if we figured out how to implement new metaobjects from 
Python yet.


It's implemented as a Python extension, so you can write VOS programs in 
pure Python.  Another thing to do is to write some glue code to 
incorporate the Python interpreter so that a C++ app can embed Python 
code.


On Thu, 1 Sep 2005, Reed Hedges wrote:


Hello, what's the current state of Swig and Python?

Thanks

Reed


[   Peter Amstutz   ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED]  ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDF2V0aeHUyhjCHfcRAuXZAJ4ocbPOOBF580NzlJYqIWb8DT+kawCdH6XA
G5/pAX0ArnWMrX1DxPr/mfY=
=y+jn
-END PGP SIGNATURE-


___
vos-d mailing list
[email protected]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d