Re: [vos-d] Swig
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 canbuild 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 guessmanaged 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 listvos-d@interreality.orghttp://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 listvos-d@interreality.orghttp://www.interreality.org/cgi-bin/mailman/listinfo/vos-d ___vos-d mailing listvos-d@interreality.orghttp://www.interreality.org/cgi-bin/mailman/listinfo/vos-d ___ vos-d mailing list vos-d@interreality.org http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
Re: [vos-d] Swig
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 canbuild 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 guessmanaged 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 vos-d@interreality.orghttp://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 listvos-d@interreality.org http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d ___ vos-d mailing list vos-d@interreality.org http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
Re: [vos-d] Swig
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 --nologohelloworld.cs Hello World! C:\ You need to have .Net Framework 1.1runtimeinstalled to use lescript ( http://www.microsoft.com/downloads/details.aspx?FamilyID=262d25e3-f589-4842-8157-034d1e7cf3a3DisplayLang=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 canbuild 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 vos-d@interreality.org http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
Re: [vos-d] Swig
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 guessmanaged 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 vos-d@interreality.org http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
[vos-d] SWIG help?
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 vos-d@interreality.org http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
Re: [vos-d] Swig
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 vos-d@interreality.org http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
Re: [vos-d] Swig
-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.NEThttp://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 vos-d@interreality.org http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d
Re: [vos-d] Swig
-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 vos-d@interreality.org http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d