frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

I built a C++ runtime with immutable objects and no GIL

1•gamarino•1h ago
I’ve spent the last few months rethinking how a dynamic language runtime should interact with modern hardware. The result is ProtoCore and its first major implementation, ProtoJS.

Most dynamic runtimes (Python, Ruby, and even JS engines) handle concurrency through Global Interpreter Locks (GIL) or complex memory barriers because managing mutable state across threads is notoriously difficult.

With ProtoCore, I took a different path based on three pillars:

Immutability by Default: All core data structures are immutable. Instead of locking, we use structural sharing for memory efficiency. This inherently eliminates data races at the object level.

Hardware-Aware Memory Model: Objects are cache-line aligned (64-byte cells) to prevent false sharing and optimize cache locality.

Tagged Pointers: We use a 56-bit embedded payload for SmallIntegers, meaning zero heap allocation for most numeric operations.

To prove the architecture, I built ProtoJS. It uses QuickJS for parsing but replaces the entire runtime with ProtoCore primitives. This allows for real worker thread execution ("Deferred") where immutable objects are shared across threads without copying or GIL-related contention.

Current Status:

ProtoCore: 100% test pass rate (50/50 tests) and a comprehensive technical audit completed today.

ProtoJS: Phase 1 complete, demonstrating real parallel execution and sub-1ms GC pauses.

I’m an Electronic Engineer by training (now a university professor), and I wanted to see if applying low-level hardware principles could fix the high-level concurrency "mess."

I’d love to hear your thoughts on the trade-offs of this immutable-first approach in systems programming.

ProtoCore (The engine): https://github.com/numaes/protoCore ProtoJS (The JS runtime): https://github.com/gamarino/protoJS

Comments

gamarino•1h ago
Context & Technical Highlights I’ve been exploring the intersection of low-level hardware constraints and high-level dynamic runtimes. The goal with ProtoCore was to build a system where concurrency isn’t an afterthought, but a result of the memory model itself.

Key Architectural Decisions:

Immutability-First: Every core data structure is immutable by default, utilizing structural sharing to remain memory-efficient. This allows us to run without a Global Interpreter Lock (GIL).

Hardware-Aware Design: Objects are allocated as 64-byte Cells, aligned with CPU cache lines to prevent false sharing and optimize cache locality.

Tagged Pointers: We use the lower bits for type tagging, allowing 56-bit integers to be stored directly in the pointer (zero-allocation for small integers).

Concurrent GC: A dedicated GC thread handles reclamation with minimal stop-the-world pauses (typically <1ms).

To demonstrate this, I built ProtoJS. It uses QuickJS for the frontend (parsing/bytecode) but replaces the entire runtime with ProtoCore primitives. This enables a unique "Deferred" execution model where we can ship bytecode to real worker threads and share immutable state with zero-copy overhead.

Project Status: ProtoCore has just passed a full technical audit with 100% test coverage (50/50 tests) and ~5,780 LOC of production-grade C++20. ProtoJS is currently in its Phase 1 (demonstrator), successfully proving parallel execution across thread pools.

I'm a university professor and electronic engineer based in Argentina, and I'm very interested in discussing the trade-offs of this "immutable-at-the-bottom" approach for future runtime development.

Proposed CA wealth tax may end founder control in CA and force market reval

https://taxfoundation.org/research/all/state/california-wealth-tax-billionaires-proposal/
1•atcon•50s ago•0 comments

Judge Orders ICE Chief to Appear in Court over Potential Contempt

https://www.nytimes.com/2026/01/27/us/politics/ice-director-minnesota-contempt.html
1•boplicity•2m ago•0 comments

Gaming the Answer Matcher: Text Manipulation vs. Automated Judgment

https://arxiv.org/abs/2601.08849
1•PaulHoule•3m ago•0 comments

Neurotech Startups Are Confusing

https://www.owlposting.com/p/questions-to-ponder-when-evaluating
1•abhishaike•4m ago•0 comments

When Fixed-Point Beats Floating-Point (and When It Doesn't)

https://speytech.com/insights/fixed-point-vs-floating-point-tradeoffs/
1•william1872•4m ago•0 comments

Samsung's TriFold phone will cost $2,899 in the US

https://techcrunch.com/2026/01/27/samsungs-trifold-phone-will-cost-2899-in-the-us/
1•gloxkiqcza•5m ago•0 comments

I Built a 2300-File Codebase with AI. How I Prevented Architectural Drift

https://medium.com/@stefanvanegmond/i-built-a-2300-file-codebase-with-ai-heres-the-jig-i-built-to...
1•stefanve•7m ago•1 comments

Show HN: Semantic Primitives- TypeScript types that understand natural language

https://github.com/elicollinson/semantic-primitives
1•emcodes•7m ago•0 comments

Show HN: I vibecoded an X64, ARM64 operating system that boots on real hardware

https://github.com/viralcode/vib-OS
2•xdpi542•8m ago•0 comments

Show HN: Kimi K2.5 (Agent Swarm, beats GPT-5) now on RouterLab (Swiss hosting)

https://routerlab.ch/blog/kimi-k2-5
1•ScioNos•11m ago•0 comments

Hope vs. Realism: The Stockdale Paradox

https://www.leadingsapiens.com/stockdale-paradox/
1•sherilm•11m ago•0 comments

Nils' K1v – Kawai K1 Emulation Plugin VSTi/AU

https://www.nilsschneider.de/wp/nils-k1v/
1•unleaded•11m ago•0 comments

Ask HN: Best email service for custom domain?

1•max_•11m ago•1 comments

Yahoo Scout, a New AI Answer Engine

https://www.yahooinc.com/press/introducing-yahoo-scout-a-new-ai-answer-engine
1•drtz•12m ago•0 comments

Ask HN: Anyone else finding Claude failures almost unusable?

1•boringg•14m ago•1 comments

China has purged its highest-ranked military general. Why?

https://www.bbc.com/news/articles/c8d0l0g8yz5o
2•tartoran•15m ago•0 comments

Professional wedding photo retouching service

https://www.photorestorationretouching.com/wedding-photo-retouching/
1•prophoto•15m ago•1 comments

Cursor lied about it's new Browser [video]

https://www.youtube.com/watch?v=U7s_CaI93Mo
1•shantnutiwari•16m ago•0 comments

Sync vs. async vs. event-driven AI requests: what works in production

https://modelriver.com/how-modelriver-works/event-driven-async
2•akarshc•18m ago•5 comments

Kimi K2.5 – new open weights SOTA

https://huggingface.co/moonshotai/Kimi-K2.5
1•nikhizzle•19m ago•0 comments

The Mysterious Electrides

https://knowablemagazine.org/content/article/physical-world/2026/chemistry-of-electrides-new-cata...
1•Brajeshwar•19m ago•0 comments

A drying climate is making East Africa pull apart faster

https://www.livescience.com/planet-earth/a-drying-climate-is-making-east-africa-pull-apart-faster
1•Brajeshwar•19m ago•0 comments

An ultra-high-resolution map of (dark) matter

https://arxiv.org/abs/2601.17239
1•Brajeshwar•19m ago•0 comments

Show HN: SpecFlow – I added a "Bad Cop" auditor to Claude Code

https://github.com/ivkan/specflow-cc
1•easysolpro•20m ago•0 comments

Ask HN: How do you budget for token based AI APIs?

1•Barathkanna•22m ago•1 comments

Decoding the elite soccer player's psychological profile

https://www.pnas.org/doi/10.1073/pnas.2415126122
1•mhb•23m ago•0 comments

Claude-subconscious: Give Claude Code a subconscious

https://github.com/letta-ai/claude-subconscious
1•simonpure•23m ago•0 comments

Medusa AI-First Security Scanner – A Simple Look at Its Powerful Features

https://thecyberedition.com/medusa-ai-first-security-scanner-a-simple-look-at-its-powerful-features/
1•thehacknews•23m ago•0 comments

What Happened to MCP?

https://hntrends.net/compare/words?words=mcp
1•TimCTRL•23m ago•1 comments

DeepMind chief Demis Hassabis warns AI investment looks 'bubble-like'

https://www.ft.com/content/a1f04b0e-73c5-4358-a65e-09e9a6bba857
2•1vuio0pswjnm7•24m ago•1 comments