I started to toy with the idea of working on a subset of J that can be compiled. The idea has been brought up before in the past. Yes, I realize it's a path fraught with peril and a likely premature demise. Still, as a toy, I figure it would be fun.
Options for intermediate language: 1. GCC RTL - It looks very challenging and as far as I can tell would require recompiling GCC, which is something I don't want to do 2. LLVM IR - I cobbled together a small example that emits IR which can then be compiled. Hypothetically, we could use the LLVM C bindings to generate IR from J words directly from J. For my proof of concept, I used fsharp bindings since that seemed to be the easiest path on wndows. Julia, Rust, and Haskell have LLVM targets. 3. C - Either clang, gcc or tinycc. Generating C doesn't seem as stable and professional grade as the earlier options. However, I have come across decent languages that do it (Chicken Scheme and others). ELI does it, http://fastarray.appspot.com/compile.html. APEX also does it, http://www.snakeisland.com/apexup.htm. Could be used to also JIT code from J for small functions. I'm currently edging towards the C path. Maybe that makes more sense as a little proof of concept since it seems like it'd be quicker to get up and running. My vision here is to implement a subset of verbs in C ({ i. # $) .. really basic .. and then have a parser that takes a series of J expressions and translates them into the corresponding running list of C function calls - all in a single main(). Some things I'm excited about trying out: 1. clang/llvm vectorization - http://blog.llvm.org/2013/05/llvm-33-vectorization-improvements.html 2. parallel computation and concurrency - http://opensource.mlba-team.de/xdispatch/docs/current/index.html ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
