Hasty Briefsbeta

Show HN: Orbit a systems level programming language that compiles .sh to LLVM

17 hours ago
  • #systems-automation
  • #programming-language
  • #performance
  • Spaceship is a high-performance systems automation language designed to replace legacy shell scripting.
  • Features include a strict, Go-inspired syntax, a powerful fixed-width type system, and JIT compilation for POSIX commands built on LLVM.
  • Performance: Statically typed and JIT-compiled for maximum execution speed.
  • Security: Eliminates shell injection vulnerabilities via a strict Process API using direct OS-level syscalls.
  • Reliability: Explicit error handling model based on POSIX exit codes.
  • Modern Syntax: Clean, Go-inspired syntax for readability and writability.
  • Spaceship uses a strict, fixed-width type system with no type inference; all types must be explicitly declared.
  • Error handling is explicit, mapping directly to POSIX exit codes and errno, with functions that can fail prefixed with '!'.
  • External commands are executed using the Process API, preventing shell injection by passing arguments as structured arrays.
  • Deferred execution model for command pipelines, with operations chained using .then() and executed with .run().
  • @jit directive translates shell scripts into native POSIX logic, JIT-compiling them into the LLVM execution path.
  • Primary standard library includes JIT-compiled POSIX layer and Syscalls runtime library for efficient system-level operations.
  • Goal: Significant performance improvement over traditional shell scripting, aiming for ~14x faster execution in benchmarks.