frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

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

https://github.com/SIE-Libraries/orbit
15•TheCodingDecode•1h ago

Comments

TheCodingDecode•1h ago
Spaceship: A JIT-compiled systems language that compiles .sh to LLVM

I’ve always felt that the gap between "one-off shell scripts" and "robust systems code" is too wide. Bash is ubiquitous but dangerous; Go is safe but can feel heavy for quick automation.

I’m building Spaceship to bridge that gap. It’s a Go-inspired systems language with a C++/Boost-based compiler that JIT-compiles everything—including legacy shell scripts—directly into native machine code via LLVM.

The highlights:

* @jit Directive: You can take an existing .sh file and run @jit("script.sh"). Instead of spawning a subshell, Spaceship parses the shell logic, translates it to POSIX-compliant AST nodes, and JIT-compiles it into the current execution path. * Zero-Trust JIT Sandbox: Security is enforced at the LLVM IR lowering phase. If your script doesn't explicitly allow a capability (like network.tcp or process.fork) in the security manifest, the JIT simply refuses to generate the machine code for those instructions. No runtime interceptor overhead. * Arbitrary Bit-Widths: Since it’s LLVM-native, you aren't stuck with i32 or i64. If you're interfacing with specific hardware or protocols, you can use i1, i23, i25, etc. * The !i32 Contract: All system calls return a success value or an i32 POSIX error code, handled via a check/except flow that mirrors C++ exception speed but keeps the simplicity of Go’s error handling. * Unified Backend: We use Boost (Asio, Process, Filesystem) as the high-performance standard library that the JIT links against, ensuring POSIX compatibility across Linux and macOS.

The parser is implemented in C++ and handles deferred execution pipelines—nothing runs until you call .run(), which allows the JIT to optimize the entire chain of operations.

I'd love to hear your thoughts on the "Security through Omission" model and the feasibility of replacing dash/bash with a JIT-ted environment for high-performance automation.

keepamovin•47m ago
Cool, I am also working on a systems language targeting binaries. FreedomLang (freelang.dev) takes a radically different approach by using direct PE/Mach-O emission with zero runtime dependencies, built specifically for security agents and DevSecOps automation.

The key philosophical differences:

FSABI (Filesystem ABI) Concurrency: Instead of JIT-compiling shell pipelines, we use the filesystem as the concurrency boundary. Jobs fork with typed params written to /jobs/job<id>/inbox/*.<type>, execute in isolated processes, and write results to ./outbox. Debuggable with ls -R, reproducible, and naturally auditable. No shared memory, no race conditions.

Windows "Self-Exec" Model: Since Windows has no fork(), we re-spawn the binary with --flx-worker flags—the child reads its entire state from the FSABI inbox. Zero runtime shims, no process table magic.

Raw Assembly -> Kernel Only: Our binaries are tiny (7.5KB hello world, ~22KB for realistic file I/O + control flow + assertions) and link only against kernel32.dll (Windows) or raw syscalls (Linux). No libc, no CRT startup, direct CreateProcessA/WriteFile calls. The attack surface is just the kernel interface.

Fail-Fast by Design: fall for bugs (immediate termination), explicit variants for world state (missing files, timeouts). No exceptions, no silent recoveries that hide security issues in production agents.

We're in RFC/private beta right now, targeting security teams that need to justify every line of code running in their scanning agents and CI/CD gates. The ability to audit the entire compiler/runtime in an afternoon is the feature.

Questions on yours:

Your shell-to-LLVM JIT is fascinating -- how are you handling the semantic gap between Bash's lenient error model (pipelines succeed if any command succeeds) and POSIX's strict contracts? Do you expose multiple error handling modes, or force everything through the check/except flow?

Also curious: when you JIT-compile legacy .sh scripts, do you preserve the original behavior of things like unquoted variable expansion and word splitting, or do you enforce stricter semantics? What do you think of shc?

bayesnet•55m ago
What on earth is the value of a “hypothetical benchmark” as shown in the readme?
aeve890•26m ago
After the table it says it's a theoretical benchmark though.

Marking this as AI slop.

forgotpwd16•55m ago
Thing with LLMs, they'll tell you what a great idea and then output a design and tons of code for you which if lack the necessary knowledge will look coherent and correct. It's good to throw the design/code back in and tell them to review it and explicitly prompt them to tell you what is wrong.

So here it says your error handling maps directly to POSIX exit code. But then "On success, the function returns a non-zero value."

For the sh JIT: The slowness isn't due to the language per se but due to launching multiple processes. If performance is really the goal then you essentially need to replace every process launch with a built-in command. The benchmark is an hallucination unless can indeed be run. Hypothetical benchmarks with hypothetical results are nonsense. (Unless you've a mathematical model backing it up.)

keyle•7m ago
Nice "functional programming synatx."
gavinray•4m ago
Hmmmm

  llvm::Value* JitDirectiveNode::CodeGen(Compiler& compiler) {
    // TODO: Implement the @jit shell-to-native translation engine.
    // 1. Read the content of the shell script at FilePath.
    // 2. Parse the shell script into a sequence of POSIX-equivalent commands.
    // 3. Translate these commands into LLVM IR, similar to ProcessCallNode.
    // 4. Inline the generated IR into the current function.
    // This is a major and complex part of the compiler.
    return nullptr;
  }

If anyone is confused where to start AI, comment here

1•agilefever•1m ago•0 comments

Project Vend: Phase Two

https://www.anthropic.com/research/project-vend-2
1•Anon84•2m ago•0 comments

The Exascale Computing Era: From Megaflops to Exaflops

https://ignitehub.tech/supercomputing-technology/exascale-computing-era/
1•HichamAG•2m ago•0 comments

MG begins deliveries of first mass-produced EV with a semi-solid-state battery

https://electrek.co/2025/12/18/mg-delivers-first-mass-produced-ev-with-semi-solid-state-battery/
1•breve•4m ago•0 comments

Future Fed Leaders Push Rate Cuts

https://comuniq.xyz/post?t=629
1•01-_-•12m ago•0 comments

Designing Team Traditions That Fit Your Team

https://www.christiecosky.com/posts/2025/12/traditions-wrap-up/
1•kiyanwang•14m ago•0 comments

Pulumi for All Your IaC – Including Terraform and HCL

https://www.pulumi.com/blog/all-iac-including-terraform-and-hcl/
1•cnunciato•15m ago•0 comments

How to Not Be Replaced by AI

https://www.maxberry.ca/p/how-to-not-be-replaced-by-ai
1•kiyanwang•15m ago•0 comments

FPGAs Need a New Future

https://www.allaboutcircuits.com/industry-articles/fpgas-need-a-new-future/
2•thawawaycold•18m ago•0 comments

Where's Putin? How the Kremlin Hides Him with Three Nearly Identical Offices

https://www.rferl.org/a/kremlin-trickery-putin-offices-secrecy-investigation/33586451.html
1•KomoD•19m ago•1 comments

AI Is Creating More Work, Countering the Doomers for Now

https://humanprogress.org/ai-is-creating-more-work-countering-the-doomers-for-now/
1•doener•19m ago•0 comments

Show HN: CodexPad – a Notion-style workspace with Vim-native editing

https://codex-pad.vercel.app/
1•Animesh0764•24m ago•0 comments

Deep Generative Models – Stanford CS236 Lecture Notes

https://deepgenerativemodels.github.io/
1•hamburgererror•26m ago•0 comments

Fraud Intelligence for Africa

https://www.protegey.com/
2•Captaindiallo•27m ago•1 comments

PostgreSQL extension for BM25 relevance-ranked full-text search

https://github.com/timescale/pg_textsearch
1•jascha_eng•29m ago•0 comments

Monett: Social Media Made for Humans

https://monnett.social/
1•doener•30m ago•0 comments

Building Blocks for Agents in C++

https://github.com/mozilla-ai/agent.cpp
2•daavoo•30m ago•0 comments

Thoughts on paying down tech debt

https://www.proactiveengineer.com/p/26-when-to-pay-down-tech-debts
2•shehabas•34m ago•0 comments

The Edge-First Manifesto

https://marcobambini.substack.com/p/the-edge-first-manifesto
1•daviducolo•36m ago•0 comments

If You've Never Broken It, You Don't Know It

https://www.oreilly.com/radar/if-youve-never-broken-it-you-dont-really-know-it/
2•ArmageddonIt•39m ago•0 comments

NetBSD/Amiga

https://wiki.netbsd.org/ports/amiga/
1•doener•40m ago•0 comments

The Day Our Own Queries DoS'ed Us: Inside Zalando Search

https://engineering.zalando.com/posts/2025/12/we-hacked-ourselves-so-you-dont-have-to.html
1•shutty•41m ago•0 comments

Evaluating Large Language Models in Scientific Discovery

https://arxiv.org/abs/2512.15567
1•mpweiher•43m ago•0 comments

Amazon will allow ePub and PDF downloads for DRM-free eBooks

https://www.kdpcommunity.com/s/article/New-eBook-Download-Options-for-Readers-Coming-in-2026?lang...
1•captn3m0•43m ago•0 comments

The Fight Inside Amnesty International over Its Hamas Report

https://www.thefp.com/p/the-fight-inside-amnesty-international
4•barry-cotter•44m ago•1 comments

New York's Phone Ban Saved High School

https://nymag.com/intelligencer/article/how-new-york-public-school-phone-ban-saved-high-school.html
1•Anon84•44m ago•0 comments

Show HN: Agents.db – an AGENTS.md alternative for LLM agent context

https://github.com/krazyjakee/AGENTS.db
1•krazyjakee•44m ago•0 comments

Getting Ethereum Ready for GigaGas

https://www.nethermind.io/blog/getting-ethereum-ready-for-gigagas
1•benaadams•45m ago•0 comments

Candleloriam: The Cursed Tree

https://medium.com/luminasticity/candleloriam-18f8043d1c0c
1•bryanrasmussen•46m ago•0 comments

Life, Death and Mowing

https://www.cam.ac.uk/stories/lawnmower-poetry
1•timthorn•49m ago•1 comments