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•2h ago

Comments

TheCodingDecode•2h 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•57m 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•1h ago
What on earth is the value of a “hypothetical benchmark” as shown in the readme?
aeve890•36m ago
After the table it says it's a theoretical benchmark though.

Marking this as AI slop.

forgotpwd16•1h 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•17m ago
Nice "functional programming synatx."
gavinray•14m 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;
  }
Ciantic•3m ago
> designed to replace legacy shell scripting ... as arguments are passed as a structured array, not a raw string to be parsed by a shell

I find shell scripters prefer ubiquity and readability over raw performance. And making it mandatory to give arguments as arrays worsens the readabilty. However having both options would be good, your example doesn't actually require the shell escaping so it could have simpler way.

Here is equivalent in Deno for instance

    #!/usr/bin/env -S deno run --allow-all
    import $ from "jsr:@david/dax"; 
    const command = $`grep -r keyword .`.pipe($`wc -l`);
    const result = await command;
Deno (via library) and Bun both have $ that can also handle escaping, e.g.

    const dirName = "Dir with spaces";
    await $`mkdir ${dirName}`; // executes as: mkdir 'Dir with spaces'
I don't think syntax is your biggest hurdle though, biggest hurdle is that Bash is so common, Powershell was supposed to be better shell scripting, yet it takes nowhere outside Windows space.

Beginning January 2026, all ACM publications will be made open access

https://dl.acm.org/openaccess
1745•Kerrick•19h ago•205 comments

Getting bitten by Intel's poor naming schemes

https://lorendb.dev/posts/getting-bitten-by-poor-naming-schemes/
133•LorenDB•5h ago•67 comments

We pwned X, Vercel, Cursor, and Discord through a supply-chain attack

https://gist.github.com/hackermondev/5e2cdc32849405fff6b46957747a2d28
883•hackermondev•15h ago•334 comments

Texas is suing all of the big TV makers for spying on what you watch

https://www.theverge.com/news/845400/texas-tv-makers-lawsuit-samsung-sony-lg-hisense-tcl-spying
837•tortilla•2d ago•419 comments

1.5 TB of VRAM on Mac Studio – RDMA over Thunderbolt 5

https://www.jeffgeerling.com/blog/2025/15-tb-vram-on-mac-studio-rdma-over-thunderbolt-5
421•rbanffy•12h ago•124 comments

History LLMs: Models trained exclusively on pre-1913 texts

https://github.com/DGoettlich/history-llms
519•iamwil•12h ago•214 comments

From Zero to QED: An informal introduction to formality with Lean 4

https://sdiehl.github.io/zero-to-qed/01_introduction.html
53•rwosync•5d ago•1 comments

Noclip.website – A digital museum of video game levels

https://noclip.website/
216•ivmoreau•8h ago•28 comments

Making Google Sans Flex

https://design.google/library/google-sans-flex-font
52•meetpateltech•4h ago•21 comments

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

https://github.com/SIE-Libraries/orbit
15•TheCodingDecode•2h ago•8 comments

GPT-5.2-Codex

https://openai.com/index/introducing-gpt-5-2-codex/
495•meetpateltech•16h ago•256 comments

How China built its ‘Manhattan Project’ to rival the West in AI chips

https://www.japantimes.co.jp/business/2025/12/18/tech/china-west-ai-chips/
351•artninja1988•16h ago•383 comments

The state of the kernel Rust experiment

https://lwn.net/SubscriberLink/1050174/63aa7da43214c3ce/
101•dochtman•6d ago•60 comments

Prompt caching: 10x cheaper LLM tokens, but how?

https://ngrok.com/blog/prompt-caching/
127•samwho•2d ago•19 comments

Reconstructed Commander Keen 1-3 Source Code

https://pckf.com/viewtopic.php?t=18248
80•deevus•7h ago•10 comments

Pingfs: Stores your data in ICMP ping packets

https://github.com/yarrick/pingfs
11•linkdd•5d ago•2 comments

Designing a Passive Lidar Detector Device

https://www.atredis.com/blog/2025/11/20/designing-a-passive-lidar-detection-sensor
7•speckx•3d ago•0 comments

Show HN: Picknplace.js, an alternative to drag-and-drop

https://jgthms.com/picknplace.js/
308•bbx•2d ago•115 comments

SMB Direct – SMB3 over RDMA – The Linux Kernel Documentation

https://docs.kernel.org/filesystems/smb/smbdirect.html
30•tambourine_man•9h ago•6 comments

Property-Based Testing Caught a Security Bug I Never Would Have Found

https://kiro.dev/blog/property-based-testing-fixed-security-bug/
25•nslog•11h ago•5 comments

Skills for organizations, partners, the ecosystem

https://claude.com/blog/organization-skills-and-directory
269•adocomplete•17h ago•148 comments

Show HN: Stop AI scrapers from hammering your self-hosted blog (using porn)

https://github.com/vivienhenz24/fuzzy-canary
250•misterchocolat•2d ago•177 comments

2026 Apple introducing more ads to increase opportunity in search results

https://ads.apple.com/app-store/help/ad-placements/0082-search-results
167•punnerud•5h ago•169 comments

Great ideas in theoretical computer science

https://www.cs251.com/
113•sebg•12h ago•21 comments

Firefox will have an option to disable all AI features

https://mastodon.social/@firefoxwebdevs/115740500373677782
436•twapi•16h ago•396 comments

I've been writing ring buffers wrong all these years (2016)

https://www.snellman.net/blog/archive/2016-12-13-ring-buffers/
122•flaghacker•2d ago•50 comments

Telegraph chess: A 19th century tech marvel

https://spectrum.ieee.org/telegraph-chess
33•sohkamyung•6d ago•9 comments

Delty (YC X25) Is Hiring an ML Engineer

https://www.ycombinator.com/companies/delty/jobs/MDeC49o-machine-learning-engineer
1•lalitkundu•13h ago

T5Gemma 2: The next generation of encoder-decoder models

https://blog.google/technology/developers/t5gemma-2/
136•milomg•15h ago•25 comments

Two kinds of vibe coding

https://davidbau.com/archives/2025/12/16/vibe_coding.html
96•jxmorris12•13h ago•63 comments