Dailydave mailing list archives

Re: 1 day?


From: Matt Hargett <matt () use net>
Date: Mon, 30 Aug 2004 11:39:08 +0000

Dave Aitel wrote:
This is a pretty interesting article on .Net. The surprising thing for
me was how quickly (1 day) they were able to port Quake II's C++ code to
managed C++ code. I'm not sure yet how managed this code actually is -
do they have overflow protection and memory management? They can
definitely inter-operate between .Net classes and the C++ stuff.
Anyways. It's interesting.

http://www.vertigosoftware.com/Quake2NETDownloads/Quake%20II%20NET%20Port%20Whitepaper.pdf

In .NET, you can have "mixed mode" assemblies that contain voth CIL and native machine code. When you flip the configuration flag for a C++ project to "managed", the compiler figures out what can be deterministically put into CIL and what can't. The blocks that can't are marked as "unsafe". They call this "IJW" ("it Just Works"). It's pretty neat. One of the nifty things they are doing in the new MC++ is that many more C++ constrcts will compile down to "safe" CIL. Like you see in the paper, once the C++ is compiled as managed, it's accessible from other managed languages. So while Quake II's source is "C++" (C without globals), and is compiled as managed C++, the little radar "applet" (pardon my use of the word) is C#. There's also only a 15% performance hit in my tests with freesci and other things.

What you don't get for free is garbage collection -- you only get that for managed types (types marked with a ^ in MC++ 2.0). For those of you who haven't seen the new MC++ stuff, it's pretty neat. The original MC++ was a retarded joke -- it was pretty much an unusable syntax.

This Quake II MC++ demo is about 2 years old, btw.
_______________________________________________
Dailydave mailing list
Dailydave () lists immunitysec com
http://www.immunitysec.com/mailman/listinfo/dailydave


Current thread: