Re: [Mono-list] Businesses
If this is inappropriate, my apologizes and please do not respond but I watch the list and it is quite active. I just was wondering what companies are actually using Mono in a real world application. My company is using mono in a 3d game engine and wysiwyg game design tool. We have embedded mono and use it as a scripting language. This allows our users to pick from Javascript, C# and Boo. Being able to use multiple languages is just wonderful and adds a lot of value to our product. The speed of mono is absolutely stunning. (We are coming from python). Switching from python to mono was an absolute success. Rodrigo B. de Oliveira is currently developing the javascript like language for us. He is using the boo compilation pipeline, which is simply amazing. Considering that he made an already usable implementation of javascript in 20 hours. It will be open sourced once we are finished. Joachim Ante ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-devel-list] mono_jit_cleanup / mono_jit_init
Hi, Is there any particular reason why calling mono_jit_init then mono_jit_cleanup and then mono_jit_init again causes an abort? Would be really nice to be able to unload mono after you are done with a task and don't need it anymore. Joachim Ante www.otee.dk ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Comparing against null
Just to check, I had someone compile your test under MS csc version, and the code compiled by csc does call operator==. So this would really seem like an mcs bug. Thank you. Joachim Ante www.otee.dk ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Comparing against null
Ben, Just to check, I had someone compile your test under MS csc version, and the code compiled by csc does call operator==. So this would really seem like an mcs bug. Reading this and miguels comment i presume it will have to be fixed. Are you guys going to fix this soon? Like next week? If not i would really appreciate if you give me a few hints what i need to do to fix it. Joachim Ante www.otee.dk ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] Comparing against null
Hi, Is there a way to compare an object against null with a user defined operator? In mono 1.0.4 i did get operator == called even if comparing against null. In mono 1.1.6 that doesn't happen anymore. Is this according to the standard? If it is how do i overload comparison against null? using System; public class Test { static public bool operator == (Test x, Test y) { System.Console.WriteLine (The operator == is being called); return false; } static public bool operator != (Test x, Test y) { System.Console.WriteLine (The operator != is being called); return true; } public override bool Equals (object o) { System.Console.WriteLine (Equals function is being called); return false; } public override int GetHashCode () { System.Console.WriteLine (Hash function is being called); return 0; } }; public class Bug { static void Main(string[] args) { Test t = new Test (); if (t == null) { System.Console.WriteLine (The operator correctly returned false); } else { System.Console.WriteLine (The operator is never called); } } } ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Comparing against null
Yes, that is correct. On csc x == null *always* does a pointerwise comparison. I made mcs do this. In some ways it is an optimization (the user one will at the very least require a function call), in others a correctness (though that seems very pendantic -- I am not sure if there are any real life examples where it makes a difference). In our game engine we wrap C++ objects with small mono objects. The C++ representation might be destroyed. We use a lot of weak referencing and I want it to be straightforward to use. Comparing against null is the obvious way to do that. When invoking a member method of a C# wrapper this will always generate an exception anyway. So i need some way to check if the actual C++ referenced object is still around. If you absolutely need it, have a static readonly variable with the value of null. However, I'd advise that your equals impl only return `true' for the equality of null to another null. In the general case i agree but i think for what we are doing it makes obvious sense to compare against nulll and return true if the C++ representation is not around anymore, since it will generate exceptions if you use it anyway. Joachim Ante ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-list] Compiling and Embedding Mono with msvc
Hi, I couldn't agree more. I think the 1.0.1 release is a great opportunity to get the installers on windows right and put the dll's and lib files you need for embedding into the normal installer. Or create an additional sdk installer which has the libraries if you are concerned about download size. Joachim Ante I am interested in compiling mono with Microsoft Visual C++. Specifically, I want to be able to compile the samples/embed tests. This would require one of two things: a) Precompiled Libs to link with. b) A Visual Studio project file that would allow me to compile the said libs. Neither of which is available in the 2 windows distributions(source, binary installer). Could anyone point me to a solution (no pun intended) to my problem? Another less favorable option might be to modify the makefile so I can build a visual studio compatible libmono.dll/libmono.lib pair with gcc on cygwin. However I have no knowledge of how to do this. Any help would be greatly appreciated! BTW, before posting this message I did an extensive search of the message database looking for similar questions. The most promising was this: http://lists.ximian.com/archives/public/mono-list/2002-May/005432.html And I have sent the author an e-mail. However, since that was 27 months ago, I hold little hope for a reply. Thanks for reading this message. Here's hoping that someone out there has the answer! Sincerely, Dave B. ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Mono windows
HI, After trying to build mono on windows for 2 days using the help of a unix guy, it still doesn¹t work. I tried everything from the windows build scripts to the www.nullenvoid.com/wiki intro how to manually compile mono. To just trying to figure out the error msgs myself. I am getting problems like GCC hanging in monoburg.c, but mostly just pkgconfig not finding libraries. I am desperate now. Does anyone have a built mono install which includes the dll's and libraries needed for embedding mono and wants to send it over? Or what if someone smart would just put the dll's into the windows installer, wouldn¹t that be like real cute. Joachim Ante ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Mono windows
As posted earlier in the discussion list: http://forge.novell.com/modules/xfmod/project/showfiles.php?group_id=1395rel ease_id=1945dl=4409 See link for a download for a mono 1.0 installer for windows. Hi Jonathan, Thanks for the quick response. I downloaded, uninstalled the old mono installation and installed the installer you linked to. Unfortunately it does not include the mono runtime as an dll which is necessary to embed mono. Or am I on a wrong track here? (I want the windows equivalent of libmono.0.0.0.dylib on mac os x. So I can link against it and embed mono in my c application.) Joe Ante ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Mono windows genmdesc crash
Hi, I am trying to build mono on windows at the moment. After two days we have gotten at least somewhere in the middle of the make process. But it currently hangs in genmdesc.exe. Either it crashes or it just loops with 100% CPU usage. ./genmdesc ./cpu-pentium.md cpu-pentium.h pentium_desc gdb bt gives me the folling stacktrace for the place where it loops infinetely: #0 0x77e965d3 in Kernel32!GetPrivateProfileStructW () #1 0x1003e84 in getprogname () from /usr/bin/cygwin1.dll #2 0x00+af0d0 in ?? () Or: #0 0x77ea31c7 in Kenral32!GetAtomNameA () Any ideas, how to not make genmdesc crash? (Another person mailed me that he also crashes inside genmdesc) Joachim Ante ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Mono windows
Hi, Is there any reason for not having a windows installer which includes the dll's necessary for embedding mono? I tried building mono using the mono-build-win32.sh script but it failed: Installing glib... /usr/local/bin/mono-build-w32.sh: line 120: [: too many arguments /usr/local/bin/mono-build-w32.sh: line 126: [: too many arguments /usr/local/bin/mono-build-w32.sh: line 105: [: too many arguments ... Joachim Ante ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Mono windows
Hi, Is there any reason for not having a windows installer which includes the dll's necessary for embedding mono? I tried building mono using the mono-build-win32.sh script but it failed: Installing glib... /usr/local/bin/mono-build-w32.sh: line 120: [: too many arguments /usr/local/bin/mono-build-w32.sh: line 126: [: too many arguments /usr/local/bin/mono-build-w32.sh: line 105: [: too many arguments ... Btw. the install script fails because the place where I wanted to install mono contains space characters and the sh scripts doesn't have the correct quotes around its variables eg. In the install package function. Also at the very moment the go-mono.com server is down and the libraries the script tries to download are on that server... Joachim Ante ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Embedding mono
Hi, How do I control the optimizations that the jit will do to the code I loaded using mono_domain_assembly_open? Joe Ante ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Exception handling for constructor
Hi, I am implementing exception handling from the c side. When using mono_runtime_invoke I just check the returned exception for being non-NULL, this works nicely. The same is not possible when calling the constructor. For now I wrote my own mono_runtime_object_init function. I think it would make sense to change mono_runtime_object_init so that an MonoException** is passed through. If there is interest to make such a change in cvs I can send the diff. Btw. I am really really amazed by the code quality of the entire mono project. You guys are awesome. Joe Ante ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Embedding mono
HI, At the moment I am compiling all my scripts into one assembly. When a script is changed I serialize all scripts, compile all the scripts into one assembly, call mono_domain_assembly_open to open the domain, create all the script representations again and load the serialized state in again. This was all very easy and straightforward to do. Now I would like to: 1) Unload the old assembly. Is that possible? Which function should I use? 2) I would like to be able to load the assembly from memory if that is somehow possible without too much work. I tried using mono_image_open_from_data but that crashed the app so I assume I am not supposed to *just* call that function. Joe Ante ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Embedding mono
HI, The embedding sample code uses mono_runtime_exec_managed_code. And then loads the dlls inside the callback. This is a bit inconvenient for me and I wonder if it would be a valid strategy to do like (simplified): void main () { domain = mono_jit_init () mono_thread_attach (domain) mono_domain_assembly_open () mono_runtime_invoke } Instead of the way described in the mono embedded document: void callback () { mono_domain_assembly_open () mono_runtime_invoke } void main () { mono_jit_init () mono_runtime_exec_managed_code (callback) } Joe Ante ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Embedding mono
It sounds like you want a highly dynamic environment, in which existing code can be changed at runtime, with older code silently invoking newer code. I don't believe it's possible, or at least easily possible, to do this in C#. This sounds more like something System.Reflection.Emit and a custom compiler would be useful for. That way, you could ensure fast compile time, and you could come up with a custom way for pre-existing code to invoke newer code without requiring recompilation (interfaces might be good for this). Ok I think I formulated the problem not very well. I think its good enough to create one assembly for an island of scripts that somehow depend on each other. Very often in our engine we have the case that just 1-3 scripts depend on each other. So I want to make sure that when someone changes one of those 3 scripts, we will only recompile those 3 scripts and not every single script in the entire project. So I would like to have something like C's #include foobar.cs thingy, from which I can then generate a dependency list so that I know which files to recompile when the user saves a script. Am I completely off track and stuck in the C past with that idea? How does monodevelop handle this? I mean when you change a single file in one project does monodevelop recompile every single .cs file that makes up the exe? Joachim Ante www.otee.dk ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] mono_object_new
Hi, I am trying to instantiate a new class from c code. I am using mono_object_new. It creates the class successfully and I can call functions on it but the constructor is not called. Do I have to call a separate function to call the constructor? How do I call it? Default values of fields don¹t seem to get initialized as well when using mono_object_new? Joe Ante ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Embedding mono
Hi, We have been using python for scripting in our game engine before but we want to switch to mono. Our script files are currently not stored as individiual text files instead they are serialized in one big file. Is it possible to pass mono a c string for compiling instead of a file? With python we loaded scripts from the disk only on demand. Is it possible to do the same in mono? Our game engine is currently not built as a dll. Is it possible make mono call C functions directly in the executable or do we have to compile the engine into dll? Joe Ante www.otee.dk ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Embedding mono
It should be possible to load assemblies on demand. Ok so how exactly does this work? Say I have two .cs files. One calls a function in the other .cs file. Obviously just compiling the two .cs files seperately in two different .dll's gives me a compile error for the .cs file that tries to use the other .cs file. So is there some kind of import/include mechanism? The problem I am trying to solve is: We have a game creation tool which includes a text editor to change scripts (At the moment using python). Python has a import function, which is necessary if you want to use a class that is defined in another script file. We intercepted the import function and returned it the correct python script and built a dependency tree. When the user saves a pythonscript we recompile all pythonscripts that import the script the user has changed. It is very important for us that saving/recompiling is immediate (less than half a second). So whats the best way to do that? Joachim Ante www.otee.dk ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list