Lang.NET 2008 Wrap Up

I’ve recently returned from a trip to Redmond. I was at the Lang.NET conference sponsored by Microsoft. Overall it was great. Microsoft took care of us like royalty and the people and conversations were incredible. With all the big brains around I felt even more retarded than normal, I was definitely an amateur compared to a lot of the people who were attending. The only thing that was unfortunate was that I managed to get a cold just before going out there, which was mild at first, but caused me to miss out on a lot of the free beer supplied (and lots of breweries I haven’t had a chance to try out yet too!) as well as miss the 3rd day entirely! I was really looking forward to seeing the VSX presentation and get a chance to talk to someone about NBusiness and get some integration questions I have been kicking around answered. Also, based on the description of Don Box’s speech I’m really sad to have missed that.

I met a guy there named Ted Neward. He was going to hook me up with a chance to meet with Ken Levy to talk about VS integration. I had to miss it because I was too sick and had completely lost my voice but I have his email address and will probably be sending him an email with a few questions and ideas.
 
Besides Jason Bock and I there were at least two other people from Minneapolis, Wez Furlong from the PHP group as well as Charles Nutter who works on JRuby for Sun. There was another guy there from Sun named John Rose who had a lot of interesting things to say about the similarities between Java and .NET and also knew a lot about creating programming languages. He talked about a lot of interesting things with me at the Rock Bottom brewery. It’s really encouraging to see that it’s possible to collaborate and discuss topics such as programming languages even between competitors. It seems that programming languages might just unite nerds more than divide them after all.
Overall I’d say that this symposium really revealed an intense focus towards dynamic languages right now. Perhaps it’s just the language enthusiasts who are the most interested in dynamic languages. This was an overwhelming focal point for this event. It’s all very cool stuff and I’m completely sold on the idea of using a dynamic language for developing unit tests first then writing your application. I’m not completely sold on the idea of a dynamic language everywhere however. It seems like it’s perfect for the top tier of an application, where things change the most and need to be the most flexible, but the lower you go a nice strongly typed library with strict encapsulation is probably preferable.
I was able to see Anders Hejlsberg (C#), Jim Hugunin (Iron Ruby and the DLR), Erik Meijer and many others speak. The videos should be on Channel 9 any day now. Here is a channel9 interview that took place with some of the speakers called Erik Meijer, Gilad Bracha, Mads Torgersen: Perspectives on Programming Language Design and Evolution but this was not one of the actual presentations. I also recognized John Lam (Iron Ruby) and Miguel De Icaza (Mono) in the audience but I missed their talks because I was sick.
One other interesting thing was getting to talk to a guy from Intentional Software. Now this is real brain bending stuff and if you haven’t heard of intentional programming before I suggest you go look it up because it’s a fascinating idea… probably best left for another post.

 

Error Invoking AppDomain Proxy

I’m having one heck of an AppDomain bug. I have a situation where I am creating an AppDomain and then creating an instance and unwrapping it and invoking a method on that proxy instance. The first time I invoke this instance I get successful results and if I have a breakpoint inside of the proxy it will break on it, however the second time I invoke the method it will fail by yielding an incorrect return value.

Also, strangely enough, if I ever try to step INTO the method call with the debugger visual studio will suddenly shutdown. Examining the error code in the debugger doesn’t really reveal anything valuable either. Here is a link to the code in question:

ESharpCompiler.cs

Worse Than Win32 Programming

Here is my quote of the day from a conversation I had via instant messenger earlier today:

[13:04] justin chase: It’s not a native capability of .net winforms apparently
[13:04] justin chase: http://blogs.msdn.com/pedrosilva/archive/2005/03/09/391381.aspx
[13:04] Pat Cichanski: eck… win32 programming?
[13:04] justin chase: worse…
[13:04] justin chase: VB
[13:04] justin chase: :-X

Drop In

 

Last night I attended the monthly Twin Cities XNA User Group meeting. Instead of having a single presenter we have six members of the group stand up and talk about some projects they’ve been working on for 15 minutes or so. I have a feeling that everyone could have just gone on and on about what they were doing but, alas, there was no time.
I gave a presentation of the XNA game I have been working on called Drop In. Drop In is a pretty simple game with 3 screens. Also all of the artwork was created with Paint.NET and the music as created by Zach Adams along with some of the sound effects being created using a free tool called sfxr by DrPetter. So you can say that Drop In was created entirely with free tools!
Main Menu
 
Credits
 
Main Game
 
Code
The source code is broken up into an engine and Drop In specific projects. Currently it will only run on a PC but with some minimal hacking you could probably get it to work with an Xbox. I think the main problem is loading up XML files for settings off of the disk which I’m not sure if it will work.
One of the most interesting parts of the game is the AI used for one player mode. I created a reusable MinMax evaluator in the game engine library. I looked at a great applet created by Yosen Lin at Berkley as a reference for improving my implementation of the MinMax algorithm with Alpha Beta Pruning. It actually seems to work pretty well too. There are some deficiencies with how I evaluate states I think and also there is a problem where the computer will evaluate all states and determine that every move it makes will result in a loss and therefore it ends up making an effectively random choice. It doesn’t account for human error and should still probably try to pick the “best” of the losing moves.
Anyway, I have posted the code in its full form so you can play Drop In and also as prebuilt binaries if you don’t care about the code. You’ll need the XNA runtime to play it or the XNA Game Studio 2.0 to build it. I have also posted just my game engine in case anyone else is interested in creating a 2D game or just taking a look at the MinMax algorithm I have created in C#.
Next Steps
Next month’s user group meeting might focus on AI if so then I can talk more about the MinMax algorithm I implemented for anyone interested. I might actually be looking to improve this AI a little by then too, I’m thinking of including some sort of mechanism for machine learning for example. I am also toying with some ideas for changing the goal of the game and adding in some features for complexity. For example perhaps the goal shouldn’t be to just get 5 in a row but instead to get as many in a row as you can when the board fills up. I’m also toying with ideas of special pucks that do more than just drop, such as pucks that push other pucks down and pucks that blow up and pucks that change the colors of other pucks. Etc.
I also want to make the AI evaluate the state continuously, not just on the computers turn and include the possibility of network play… which should be pretty easily actually since I have abstracted the players pretty well.
If anyone out there has any motivation to create a 3D Puck model for me I’d be pretty happy about that! I’m looking to take this game engine (and Drop In) to the next dimension and to do that I will need some good models.

Twin Cities XNA User Group December 2007

This month at the Twin Cities XNA User Group meeting is a “Member Project” event, where members will show and talk about their various XNA projects instead of having a guest speaker. It should be pretty intesting.

I’m planning on showing a demo of a game I created called DropIn. I have an post about the game with source code on an old abandoned blog somwhere but I will probably repost everything to this blog sometime in the near future (once I get it working again that is).

So if you’re interested in XNA, pizza or swag then you should definitely come on down and check it out. At the very least you should get a good laugh watching me trying to show off my game!

Come on down to Magenic, on December 20th, 2007 at 6:00PM.