First, does Clojure 1.2 build under mono? The clojure-clr tree only
appears to have a .sln file; is there some sane way to convert that to
a Makefile or a shell script that can be used under *nix?
Secondly, has anybody tried deploying a clojure-based app under XNA
(the XBox API)? I've seen some basic howtos for F#-based XNA
development; I'd be interested in hearing about anybody's experience
doing this with Clojure.
Thanks for any input.
As far as XNA...last I heard XNA did not have any support for emit,
and as such is incapable of running any sort of jit code. Basically
all .NET code has to be ahead-of-time compiled to run a XBOX via XNA.
It's the same limitation that IronPython has
(http://ironpython.codeplex.com/wikipage?title=FAQ).
Timothy
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
--
“One of the main causes of the fall of the Roman Empire was
that–lacking zero–they had no way to indicate successful termination
of their C programs.”
(Robert Firth)
Actually I think it's a bit worse than that. LISP treats all code as
data and all data as code. Basically, in LISP you can take any list
and attempt to execute it. So even if you completely AOT compile the
code you're going to have to rip out any JIT functions to get it to
properly transfer to the Xbox.
>
> Also, I asked a similar question where I was concerned about the
> things Timothy mentioned. The one answer I got was pretty much that
> if the Xbox version of .Net had everything Clojure needed the Xbox
> just wouldn't run clojure very well. Just like with Dalvik, the
> Compact .Net handles GC poorly.
>
The biggest issue is that Clojure, IronPython, etc. are based on the
Microsoft DLR. This DLR makes heavy, heavy use of on-the-fly code
generation. As far as I know the 360 does not implement a full-blown
JIT (the bytecodes are translated to machine code on the development
PC then the resulting binary is shipped to the Xbox). Therefore the
DLR will not run on the Xbox and languages that require it will
either. That link you supplied doesn't state that "Xbox 360 has all
you need to run Clojure" but simply states that in addition to any
other issues you may have, Clojure would kill the GC.
Now what could happen is this: Someone could take the AST classes in
Clojure-CLR and convert them from code generation routines to
interpreted routines. Interpreted Clojure would run on the Xbox, there
just isn't an interpreter written yet.
Timothy
This is a common issue in most game consoles.
Ok, I'll have a look at that. I currently know nothing of .NET or
mono, so it's all news to me :)
> As far as XNA...last I heard XNA did not have any support for emit,
> and as such is incapable of running any sort of jit code. Basically
> all .NET code has to be ahead-of-time compiled to run a XBOX via XNA.
> It's the same limitation that IronPython has
> (http://ironpython.codeplex.com/wikipage?title=FAQ).
Ok, so for XBox stuff, ScalaCLR or F# would probably be more
practical. That's unfortunate, but I'm not way too surprised. Thanks
for the info!
And, as a lovely self-reply, replace that last "practical" with
"possible". I think that's more accurate.
Meh...that's not exactly true. Many games (Warhammer 40k, Supreme
Commander, WoW, etc.) use stock LUA, and some (Civ IV) use Python.
Both of these are not JIT languages. Actually I would assume LIPS like
languages would actually run better than most in an interpreted VM due
to the simplicity of the VM. In fact picoLISP released some benchmarks
back in 2006 were they showed that interpreted picoLisp was actually
faster than compiled Common LISP [1].
So while having a highly advanced JIT like the JVM provides, I'm not
sure it's exactly a requirement for an acceptable Clojure variant.
Timothy Baldridge
[1] http://www.software-lab.de/radical.pdf
Civ 4 uses python but it targets PC too. Consoles have very different and
strict set of rules.
We tried this last year, while we could get a bunch of CLR
languages to do basic things, they were failure from practical
use POV.
Yes it's possible to use embedded lisp as a scripting DSL on console,
GOAL on playstation is such an example. But again, it was designed from
ground up to do this. If that's what you want to do, you'd have better luck
starting with ecl(embedded common lisp). We've gotten that to work on
iPhone even.