Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Both Terra and Extempore [1] implement the same basic idea, which is provide a way to generate performant machine code on the fly but keeping a language surface that feels like you are working with a dynamic language (Lua or Scheme correspondingly). I think Scopes [2] could be mentioned here too. The concept is really cool and different from JIT compiling in that the developer is given the tools to generate machine code, as opposed to some "magic" JIT compiling happening opaquely behind the scenes.

That being said, I don't think either of these languages is practical for real world projects for several reasons: lack of (or low quality) documentation, bus factor (lack of developers), tiny communities, lack of tools, lack of libraries, etc etc etc.

--

1: https://extemporelang.github.io/

2: https://sr.ht/~duangle/scopes/



> I don't think either of these languages is practical for real world projects

Maybe not yet, but prior work by this research team eventually lead to CUDA. Terra may be useful as a productivity DSL for some high-performance computations, e.g. listed in their papers:

  our DSL for stencil computations runs 2.3x faster than hand-written C
  our serialization library is 11 times faster than Kryo
  our dynamic assembler is 3–20 times faster than Google’s Chrome assembler
2021 HN thread, https://news.ycombinator.com/item?id=27334065

> Terra is a workhorse and it gets the job done.. Having first-class code generation capabilities has been really nice, especially with built-in support for things like parsing C header files, vectorization, and CUDA code generation. The language is stable and generally doesn't have many surprises. Unlike, say, C++ or Rust, there aren't as many corners to hide odd behaviors.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: