Re: Getting .NET Version of Clojure to run
Having this in hand would be awesome. -David On Aug 26, 3:29 pm, rodgertq wrote: > I'll also execute a CA and contribute back the require build script > changes as well :) > > On Aug 26, 3:26 pm, rodgertq wrote: > > > This can be done by MSBuild directly without involving an external > > tool like xcopy or robocopy using Item groups and built-in MSBuild > > tasks. We do this to deliver final artifacts in our build system. > > > I should have some time in the next day or two to dig into the build > > for ClojureCLR, I will post back the required "mojo" in a reply here > > (unless somebody beats me to it :) to do this without using anything > > other than what comes with VS. > > > On Aug 26, 11:50 am, Rich Hickey wrote: > > > > On Aug 26, 11:42 am, Shawn Hoover wrote: > > > > > On Sat, Aug 15, 2009 at 8:36 AM, David Miller > > > > wrote: > > > > > Clojure.Compile is just for AOT-compilation. It will compile whatever > > > > > libs are on the command line. As you state, it is used to bootstrap, > > > > > i.e. compile core.clj and the rest of the bootstap clojure code into > > > > > assemblies, which can then be loaded quickly by Clojure.Main. > > > > > > If you follow all the directions on the wiki, specifically, > > > > > >http://wiki.github.com/richhickey/clojure-clr/installing-clojureclr > > > > >http://wiki.github.com/richhickey/clojure-clr/compiling-clojureclr > > > > >http://wiki.github.com/richhickey/clojure-clr/running-clojureclr > > > > > > you should get up-and-running. > > > > > David, > > > > I wrote a post-build event script for Clojure.Compile that automates > > > > everything in compiling-clojureclr. If you're interested, I'll > > > > contribute > > > > it. > > > > > The downside is that in order to copy files in a hierarchy with limited > > > > extensions (clj, dll, pdb) I used robocopy.exe, which is standard on > > > > Vista > > > > but not XP. Or: > > > > - I could port it to xcopy to make it more portable (not hard--just > > > > requires > > > > several xcopy commands for one robocopy) > > > > - Developers on XP could install the Resource Kit that includes robocopy > > > > - Developers on XP could manually copy the files around as before > > > > I would greatly prefer that everything related to ClojureCLR worked on > > > stock XP. > > > > Rich --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Getting .NET Version of Clojure to run
I'll also execute a CA and contribute back the require build script changes as well :) On Aug 26, 3:26 pm, rodgertq wrote: > This can be done by MSBuild directly without involving an external > tool like xcopy or robocopy using Item groups and built-in MSBuild > tasks. We do this to deliver final artifacts in our build system. > > I should have some time in the next day or two to dig into the build > for ClojureCLR, I will post back the required "mojo" in a reply here > (unless somebody beats me to it :) to do this without using anything > other than what comes with VS. > > On Aug 26, 11:50 am, Rich Hickey wrote: > > > > > On Aug 26, 11:42 am, Shawn Hoover wrote: > > > > On Sat, Aug 15, 2009 at 8:36 AM, David Miller > > > wrote: > > > > Clojure.Compile is just for AOT-compilation. It will compile whatever > > > > libs are on the command line. As you state, it is used to bootstrap, > > > > i.e. compile core.clj and the rest of the bootstap clojure code into > > > > assemblies, which can then be loaded quickly by Clojure.Main. > > > > > If you follow all the directions on the wiki, specifically, > > > > >http://wiki.github.com/richhickey/clojure-clr/installing-clojureclr > > > >http://wiki.github.com/richhickey/clojure-clr/compiling-clojureclr > > > >http://wiki.github.com/richhickey/clojure-clr/running-clojureclr > > > > > you should get up-and-running. > > > > David, > > > I wrote a post-build event script for Clojure.Compile that automates > > > everything in compiling-clojureclr. If you're interested, I'll contribute > > > it. > > > > The downside is that in order to copy files in a hierarchy with limited > > > extensions (clj, dll, pdb) I used robocopy.exe, which is standard on Vista > > > but not XP. Or: > > > - I could port it to xcopy to make it more portable (not hard--just > > > requires > > > several xcopy commands for one robocopy) > > > - Developers on XP could install the Resource Kit that includes robocopy > > > - Developers on XP could manually copy the files around as before > > > I would greatly prefer that everything related to ClojureCLR worked on > > stock XP. > > > Rich --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Getting .NET Version of Clojure to run
This can be done by MSBuild directly without involving an external tool like xcopy or robocopy using Item groups and built-in MSBuild tasks. We do this to deliver final artifacts in our build system. I should have some time in the next day or two to dig into the build for ClojureCLR, I will post back the required "mojo" in a reply here (unless somebody beats me to it :) to do this without using anything other than what comes with VS. On Aug 26, 11:50 am, Rich Hickey wrote: > On Aug 26, 11:42 am, Shawn Hoover wrote: > > > > > > > On Sat, Aug 15, 2009 at 8:36 AM, David Miller wrote: > > > Clojure.Compile is just for AOT-compilation. It will compile whatever > > > libs are on the command line. As you state, it is used to bootstrap, > > > i.e. compile core.clj and the rest of the bootstap clojure code into > > > assemblies, which can then be loaded quickly by Clojure.Main. > > > > If you follow all the directions on the wiki, specifically, > > > >http://wiki.github.com/richhickey/clojure-clr/installing-clojureclr > > >http://wiki.github.com/richhickey/clojure-clr/compiling-clojureclr > > >http://wiki.github.com/richhickey/clojure-clr/running-clojureclr > > > > you should get up-and-running. > > > David, > > I wrote a post-build event script for Clojure.Compile that automates > > everything in compiling-clojureclr. If you're interested, I'll contribute > > it. > > > The downside is that in order to copy files in a hierarchy with limited > > extensions (clj, dll, pdb) I used robocopy.exe, which is standard on Vista > > but not XP. Or: > > - I could port it to xcopy to make it more portable (not hard--just requires > > several xcopy commands for one robocopy) > > - Developers on XP could install the Resource Kit that includes robocopy > > - Developers on XP could manually copy the files around as before > > I would greatly prefer that everything related to ClojureCLR worked on > stock XP. > > Rich --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Getting .NET Version of Clojure to run
On Aug 26, 11:42 am, Shawn Hoover wrote: > On Sat, Aug 15, 2009 at 8:36 AM, David Miller wrote: > > Clojure.Compile is just for AOT-compilation. It will compile whatever > > libs are on the command line. As you state, it is used to bootstrap, > > i.e. compile core.clj and the rest of the bootstap clojure code into > > assemblies, which can then be loaded quickly by Clojure.Main. > > > If you follow all the directions on the wiki, specifically, > > >http://wiki.github.com/richhickey/clojure-clr/installing-clojureclr > >http://wiki.github.com/richhickey/clojure-clr/compiling-clojureclr > >http://wiki.github.com/richhickey/clojure-clr/running-clojureclr > > > you should get up-and-running. > > David, > I wrote a post-build event script for Clojure.Compile that automates > everything in compiling-clojureclr. If you're interested, I'll contribute > it. > > The downside is that in order to copy files in a hierarchy with limited > extensions (clj, dll, pdb) I used robocopy.exe, which is standard on Vista > but not XP. Or: > - I could port it to xcopy to make it more portable (not hard--just requires > several xcopy commands for one robocopy) > - Developers on XP could install the Resource Kit that includes robocopy > - Developers on XP could manually copy the files around as before > I would greatly prefer that everything related to ClojureCLR worked on stock XP. Rich --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Getting .NET Version of Clojure to run
On Sat, Aug 15, 2009 at 8:36 AM, David Miller wrote: > Clojure.Compile is just for AOT-compilation. It will compile whatever > libs are on the command line. As you state, it is used to bootstrap, > i.e. compile core.clj and the rest of the bootstap clojure code into > assemblies, which can then be loaded quickly by Clojure.Main. > > If you follow all the directions on the wiki, specifically, > > http://wiki.github.com/richhickey/clojure-clr/installing-clojureclr > http://wiki.github.com/richhickey/clojure-clr/compiling-clojureclr > http://wiki.github.com/richhickey/clojure-clr/running-clojureclr > > you should get up-and-running. > David, I wrote a post-build event script for Clojure.Compile that automates everything in compiling-clojureclr. If you're interested, I'll contribute it. The downside is that in order to copy files in a hierarchy with limited extensions (clj, dll, pdb) I used robocopy.exe, which is standard on Vista but not XP. Or: - I could port it to xcopy to make it more portable (not hard--just requires several xcopy commands for one robocopy) - Developers on XP could install the Resource Kit that includes robocopy - Developers on XP could manually copy the files around as before Shawn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Getting .NET Version of Clojure to run
On Sat, Aug 15, 2009 at 11:38 PM, David Miller wrote: > [snip description of problem] > Thanks David. All the wiki steps succeed now and I can move forward. -- mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Getting .NET Version of Clojure to run
On Aug 15, 8:44 am, Mark wrote: > Thanks David, > > On Sat, Aug 15, 2009 at 8:36 AM, David Miller wrote: > ... > http://wiki.github.com/richhickey/clojure-clr/installing-clojureclr > > Done - I had no problems with this except that the mention of > BootstrapCompile does not appear to be correct. I believe it has changed to > Clojure.Compile. Thanks for noticing. I've updated the wiki page. > > >http://wiki.github.com/richhickey/clojure-clr/compiling-clojureclr > > Step 4 Fails. (I made sure to do steps 1..3 and reverified the copy of > *.clj files) > Acommand line of > [30 (master)]: .\Clojure.Compile.exe clojure.core clojure.set clojure.zip > clojure.main clojure.walk clojure.stacktrace clojure.template clojure.test > clojure.test.tap > > using the pull from github of sha1 ccf813c71c611d83a3343715305cd8f744c23448 > yields the following exception stack trace > > Unhandled Exception: System.TypeInitializationException: The type > initializer for 'clojure.lang.RT' threw an exception. > [Snip many lines of exceptions] I accidentally included the JVM version of genclass (which has not be moved to ClojureCLR yet) into the sources. It's now been replaced by a dummy. If you pull down the lastest commit, this has been fixed. Apologies for the waste of time. -David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Getting .NET Version of Clojure to run
Thanks David, On Sat, Aug 15, 2009 at 8:36 AM, David Miller wrote: ... > Simple.Console should be avoided at this point. OK. http://wiki.github.com/richhickey/clojure-clr/installing-clojureclr Done - I had no problems with this except that the mention of BootstrapCompile does not appear to be correct. I believe it has changed to Clojure.Compile. > http://wiki.github.com/richhickey/clojure-clr/compiling-clojureclr Step 4 Fails. (I made sure to do steps 1..3 and reverified the copy of *.clj files) Acommand line of [30 (master)]: .\Clojure.Compile.exe clojure.core clojure.set clojure.zip clojure.main clojure.walk clojure.stacktrace clojure.template clojure.test clojure.test.tap using the pull from github of sha1 ccf813c71c611d83a3343715305cd8f744c23448 yields the following exception stack trace Unhandled Exception: System.TypeInitializationException: The type initializer for 'clojure.lang.RT' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at clojure.lang.Util.NameForType(Type t) in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\Lib\Util.cs:line 175 at clojure.lang.Namespace.importClass(Type t) in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\Lib\Namespace.cs:line 266 at lambda_method(Closure ) at AFunction_impl.invoke() at REPLCall(Closure ) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at clojure.lang.Compiler.load(TextReader rdr, String sourcePath, String sourceName) in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\CljCompiler\Compiler.cs:line 1106 at clojure.lang.RT.LoadScript(FileInfo cljInfo) in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\Lib\RT.cs:line 1879 at clojure.lang.RT.load(String pathname, Boolean failIfNotFound) in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\Lib\RT.cs:line 1848 at clojure.lang.RT.load(String pathname) in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\Lib\RT.cs:line 1815 at lambda_method(Closure , Object ) at clojure.lang.RestFnImpl.doInvoke(Object args) in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\Lib\RestFnImpl.cs:line 277 at clojure.lang.RestFn.invoke(Object arg1) in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\Lib\RestFn.cs:line 451 at clojure.lang.RestFnImpl.invoke(Object arg1) in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\Lib\RestFnImpl.cs:line 407 at lambda_method(Closure ) at AFunction_impl.invoke() at REPLCall(Closure ) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at clojure.lang.Compiler.load(TextReader rdr, String sourcePath, String sourceName) in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\CljCompiler\Compiler.cs:line 1106 at clojure.lang.RT.LoadScript(FileInfo cljInfo) in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\Lib\RT.cs:line 1879 at clojure.lang.RT.load(String pathname, Boolean failIfNotFound) in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\Lib\RT.cs:line 1848 at clojure.lang.RT.load(String pathname) in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\Lib\RT.cs:line 1815 at clojure.lang.RT.DoInit() in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\Lib\RT.cs:line 494 at clojure.lang.RT..cctor() in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure\Lib\RT.cs:line 489 --- End of inner exception stack trace --- at BootstrapCompile.Compile.Main(String[] args) in D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure\Clojure.Compile\Compile.cs:line 20 > > http://wiki.github.com/richhickey/clojure-clr/running-clojureclr > > you should get up-and-running. > > Please let me know if you have problems or if the instructions are > unclear. > > -David > > > On Aug 14, 4:39 pm, Mark wrote: > > I am trying to learn Clojure and since I am also a .NET developer I > > thought I would compile the CLR version. > > > > I hav
Re: Getting .NET Version of Clojure to run
The warnings are given at any point where the compiler is compiling a host expression (CLR interop) and it can't resolve the exact method to call at compile-time. Some of these can't be avoided and are normal. The reflection warnings are because *warn-on-reflection* has been initialized to 'true'. I'll set it to 'false' in the next commit so you won't be bothered. Simple.Console should be avoided at this point. It was the first console app written for this environment. It loads a really minimal environment. Use Clojure.Main instead. It provides the full REPL experience of the clojure.main in the JVM version, as described on http://clojure.org/repl_and_main. Specifically, running Clojure.Main, without or with command-line args is equivalent to java -cp clojure.jar clojure.main java -cp clojure.jar clojure.main /path/to/myscript.clj java -cp clojure.jar clojure.main /path/to/myscript.clj arg1 arg2 arg3 Clojure.Compile is just for AOT-compilation. It will compile whatever libs are on the command line. As you state, it is used to bootstrap, i.e. compile core.clj and the rest of the bootstap clojure code into assemblies, which can then be loaded quickly by Clojure.Main. If you follow all the directions on the wiki, specifically, http://wiki.github.com/richhickey/clojure-clr/installing-clojureclr http://wiki.github.com/richhickey/clojure-clr/compiling-clojureclr http://wiki.github.com/richhickey/clojure-clr/running-clojureclr you should get up-and-running. Please let me know if you have problems or if the instructions are unclear. -David On Aug 14, 4:39 pm, Mark wrote: > I am trying to learn Clojure and since I am also a .NET developer I > thought I would compile the CLR version. > > I have successfully built it and it runs but when I try and run > Simple.Console (or the Clojure.Compile, which appears to be the > renamed bootstrapper) I get a series of error messages similar to... > > Reflection warning, D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure > \Simple.C > onsole\bin\Debug\clojure\core.clj:686 - call to unchecked_inc can't be > resolved. > > Reflection warning, D:\Projects\Dev\TestingStuffOut\clojure-clr\Clojure > \Simple.C > onsole\bin\Debug\clojure\core.clj:692 - call to unchecked_dec can't be > resolved. > > I have copied the bootstrap version of core.clj and it is successfully > being found but I am not quite sure about where to go from there. > > If this is not the right forum for this question please just let me > know where to redirect it to. > > Thanks > -mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---