Re: ClojureCLR and CLR structs

2009-10-01 Thread Shawn Hoover
Works for me. Thanks! On Thu, Oct 1, 2009 at 1:24 AM, David Miller wrote: > > Should be fixed in the latest commit. > Any of the following will work. > > > (System.Reflection.Assembly/Load "WindowsBase, Version=3.0.0.0, > Culture=neutral, PublicKeyToken=31bf3856ad364e35") > (import '(System.Wind

Re: ClojureCLR and CLR structs

2009-09-30 Thread David Miller
Should be fixed in the latest commit. Any of the following will work. (System.Reflection.Assembly/Load "WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35") (import '(System.Windows.Media Matrix)) (defn b [m] (doto m (.Scale 2.0 3.0))) (defn a1 [] (b (Matrix.))) (defn

Re: ClojureCLR and CLR structs

2009-09-30 Thread Shawn Hoover
Hey, you're one up on IronRuby, which had a bug where one couldn't create an instance of a CLR struct! http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1788 On Wed, Sep 30, 2009 at 3:45 AM, David Miller wrote: > > Short answer: It's a bug. > Longer answer: It's a problem with type pro

Re: ClojureCLR and CLR structs

2009-09-30 Thread David Miller
Short answer: It's a bug. Longer answer: It's a problem with type propagation in let. It'll take me a day or so to fix it. The handling of non-primitive value types by the compiler still has some problems. Any place where the JVM compiler is discriminating between primitive types and reference

ClojureCLR and CLR structs

2009-09-29 Thread Shawn Hoover
Updates to local CLR struct instances seem to be lost as soon as they're made. Is this expected? In the test below, function a2 returns the identity matrix despite my attempt to scale it. Function a passes the newly constructed matrix to another function to do the scaling, and it returns the scaled