Author Topic: Terra A low-level counterpart to Lua  (Read 3396 times)

kryton9

  • Guest
Terra A low-level counterpart to Lua
« on: October 10, 2013, 02:55:26 PM »
Terra currently runs Mac OS X, Linux, and 64-bit Windows.

Like C, Terra is a simple, statically-typed, compiled language with manual memory management. But unlike C, it is designed from the beginning to interoperate with Lua. Terra functions are first-class Lua values created using the terra keyword. When needed they are JIT-compiled to machine code.

You can use Terra and Lua as…
1. A scripting-language with high-performance extensions.
2. An embedded JIT-compiler for building languages.
3. A stand-alone low-level language.

This means that Terra code performs similarly to equivalent C code. For instance, our translations of the nbody and fannhakunen programs from the programming language shootout perform within 5% of the speed of their C equivalents when compiled with Clang, LLVM’s C frontend. Terra also includes built-in support for SIMD operations, and other low-level features like non-temporal writes and prefetches.

To simplify meta-programming, Lua and Terra share the same lexical environment, but, to ensure performance, Terra code can execute independently of Lua’s runtime. We evaluate our design by reimplementing existing multi-language systems entirely in Terra. Our Terra-based auto-tuner for BLAS routines performs within 20% of ATLAS, and our DSL for stencil computations runs 2.3x faster than hand-written C.

http://terralang.org/
« Last Edit: October 10, 2013, 04:12:43 PM by kryton9 »

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Re: Terra A low-level counterpart to Lua
« Reply #1 on: October 10, 2013, 04:51:56 PM »
Kent,

Don't be offended if I show no interest in this. I'm really happy with the way things are going with Nimrod and Claro-AIR. I hope to use these tools to create a cross platform IDE for SB.

John

kryton9

  • Guest
Re: Terra A low-level counterpart to Lua
« Reply #2 on: October 10, 2013, 06:57:52 PM »
No, of course not John. I just put the info here for others and for future reference.

Making an IDE is quite a project, good luck!
« Last Edit: October 10, 2013, 07:06:00 PM by kryton9 »