frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Coderive – Iterating through 1 Quintillion Inside a Loop in just 50ms

https://github.com/DanexCodr/Coderive
7•DanexCodr•4d ago
Author: Danison Nuñez Project: Coderive Project Type: Programming Language Highlight: Formula-based Execution

## Coderive - Iterating Through 1 Quintillion in a Loop

*Subtitle: How a phone interpreter achieves what supercomputers cannot*

The Impossible Loop:

```java // In any other language, this would be computational suicide for i in [0 to 1Qi] { // 1,000,000,000,000,000,000 iterations arr[i] = i * i } ```

Traditional Reality:

· Python: MemoryError at array creation · Java/C++: Theoretical 31 years (with 8 exabytes of RAM) · NumPy/TensorFlow: Immediate crash · GPU Computing: 80GB VRAM limit exceeded

Coderive's Reality: 50 milliseconds.

The Magic Behind It:

1. NaturalArray: Virtual arrays that store formulas, not data 2. Runtime Pattern Detection: Transforms loops to mathematical expressions 3. Lazy Evaluation: Computes only what's accessed 4. Formula Storage: LoopFormula, ConditionalFormula, MultiBranchFormula

Technical Deep Dive:

```java // What you write: for i in [0 to 1Qi] { if i % 2 == 0 { arr[i] = i * i } elif i % 3 == 0 { arr[i] = i * i * i } else { arr[i] = i } }

// What Coderive creates internally: arr.addMultiBranchFormula( conditions: [i%2==0, i%3==0], expressions: [ii, iii], elseExpr: i, range: [0, 1Qi] ) ```

The Optimization Pipeline:

``` User Code → Pattern Detection → Formula Creation → Lazy Evaluation ↓ ↓ ↓ ↓ O(n) O(1) O(1) O(1) per access ```

Complete Pattern Coverage:

· Simple Transformations: arr[i] = f(i) → LoopFormula · Binary Decisions: if-else → ConditionalFormula · Multi-way Branches: if-elif-else → MultiBranchFormula · Partial Updates: if-only with implicit else preservation

Real-World Impact:

```java // Process every pixel in 8K video (≈33 million frames) for frame in [0 to 33M] { for pixel in [0 to 7680

4320] { // 33 million frames × 33 million pixels if brightness > 128 { pixels[pixel] = 255 } elif brightness > 64 { pixels[pixel] = 128 } else { pixels[pixel] = 0 } } } // Traditional: Impossible // Coderive: Seconds, not centuries ```

The Secret Sauce:

· No data movement (arrays stay virtual) · No parallel programming (formulas are inherently parallel) · No memory management (O(1) memory complexity) · No specialized hardware (runs on Java 7)

Conclusion: Coderive doesn't just make loops faster—it redefines what's computationally possible on commodity hardware.

Check Coderive now at: [https://github.com/DanexCodr/Coderive](https://github.com/DanexCodr/Coderive)

Comments

onion2k•1h ago
I'm intrigued about how you're loading a 13.66 days long 8K video into memory to be able to process all the pixels in 50ms...
schobi•1h ago
I'm confused by the claims..

You try to compute something that supercomputer can't - by not computing it? Instead the formula is stored in a data structure. But once you need to access all the values you still have something that does not fit the memory and needs to be computed.

I can't judge on the Java side, but suggest to pick a better example on how this can be useful.

Validark•1h ago
Why did you restrict yourself to mobile development only?
MobiusHorizons•50m ago
> Conclusion: Coderive doesn't just make loops faster—it redefines what's computationally possible on commodity hardware.

I mean this as kindly as possible, but please don’t say things like this if you want to be taken seriously. Computer languages cannot possibly change what is possible on a given machine for the simple reason that whatever they are doing had to previously be possible in assembly on the same machine.

I don’t mean to overly discourage you. Lazy execution can be very useful, but it’s also not clearly new or hard to get in other languages (although it would require different syntax than an idiomatic for loop most of the time). It may help to try to pick an example where the lazy execution is actually exercised. Preferably one that would be hard for an optimizing compiler to optimize.

I would also not recommend claiming iteration if you also claim 50ms, since that’s clearly impossible regardless of memory consumption, so you have to optimize away or defer the work in some way (at which point iteration is no longer occurring).

For these examples, I think you would just express the code as a function taking i instead of pre-populating the array. This doesn’t seem hard at least for the provided examples, and has the benefit that it can be opted into when appropriate.

Maybe the default settings are too high

https://www.raptitude.com/2025/12/maybe-the-default-settings-are-too-high/
624•htk•11h ago•189 comments

The Algebra of Loans in Rust

https://nadrieril.github.io/blog/2025/12/21/the-algebra-of-loans-in-rust.html
14•g0xA52A2A•3d ago•2 comments

Geometric Algorithms for Translucency Sorting in Minecraft [pdf]

https://douira.dev/assets/document/douira-master-thesis.pdf
8•HeliumHydride•59m ago•10 comments

Building an AI agent inside a 7-year-old Rails monolith

https://catalinionescu.dev/ai-agent/building-ai-agent-part-1/
42•cionescu1•3h ago•10 comments

MiniMax M2.1: Built for Real-World Complex Tasks, Multi-Language Programming

https://www.minimaxi.com/news/minimax-m21
149•110•9h ago•44 comments

TurboDiffusion: 100–200× Acceleration for Video Diffusion Models

https://github.com/thu-ml/TurboDiffusion
91•meander_water•7h ago•11 comments

Show HN: Gaming Couch – a local multiplayer party game platform for 8 players

https://gamingcouch.com
206•ChaosOp•4d ago•55 comments

Show HN: GeneGuessr – a daily biology web puzzle

https://geneguessr.brinedew.bio/
35•brinedew•3d ago•7 comments

Tiled Art

https://tiled.art/en/home/?id=SilverAndGold
149•meander_water•6d ago•5 comments

Fahrplan – 39C3

https://fahrplan.events.ccc.de/congress/2025/fahrplan/
260•rurban•16h ago•76 comments

Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster

https://fidget-spinner.github.io/posts/no-longer-sorry.html
365•lumpa•21h ago•125 comments

The entire New Yorker archive is now digitized

https://www.newyorker.com/news/press-room/the-entire-new-yorker-archive-is-now-fully-digitized
419•thm•5d ago•57 comments

Tachyon: High frequency statistical sampling profiler

https://docs.python.org/3.15/library/profiling.sampling.html
58•vismit2000•3d ago•3 comments

Animating Quines for Larva Labs

https://destroytoday.com/blog/animating-quines-for-larva-labs
15•speckx•3d ago•0 comments

Ultimate-Linux: Userspace for Linux in Pure JavaScript

https://github.com/popovicu/ultimate-linux
66•radeeyate•8h ago•15 comments

Lessons from a year of Postgres CDC in production

https://clickhouse.com/blog/postgres-cdc-year-in-review-2025
34•saisrirampur•6d ago•0 comments

How to Reproduce This Book with LaTeX

https://github.com/BenjaminGor/Latex_Notes_Tutorial
15•nill0•6d ago•2 comments

CUDA Tile Open Sourced

https://github.com/NVIDIA/cuda-tile
177•JonChesterfield•6d ago•87 comments

Seven Diabetes Patients Die Due to Undisclosed Bug in Abbott's Glucose Monitors

https://sfconservancy.org/blog/2025/dec/23/seven-abbott-freestyle-libre-cgm-patients-dead/
279•pabs3•10h ago•92 comments

Paperbacks and TikTok

https://calnewport.com/on-paperbacks-and-tiktok/
121•zdw•3d ago•73 comments

When a driver challenges the kernel's assumptions

http://miod.online.fr/software/openbsd/stories/udl.html
57•todsacerdoti•10h ago•14 comments

Asahi Linux with Sway on the MacBook Air M2 (2024)

https://daniel.lawrence.lu/blog/2024-12-01-asahi-linux-with-sway-on-the-macbook-air-m2/
239•andsoitis•20h ago•238 comments

Archiving Git branches as tags

https://etc.octavore.com/2025/12/archiving-git-branches-as-tags/
112•octavore•3d ago•36 comments

Ask HN: What skills do you want to develop or improve in 2026?

116•meridion•18h ago•161 comments

The Program 2025 annual review: How much money does an audio drama podcast make?

https://programaudioseries.com/the-program-results-7/
75•I-M-S•3d ago•16 comments

I sell onions on the Internet (2019)

https://www.deepsouthventures.com/i-sell-onions-on-the-internet/
448•sogen•18h ago•128 comments

Show HN: Lamp Carousel – DIY kinetic sculpture powered by lamp heat (2024)

https://evan.widloski.com/posts/spinners/
82•Evidlo•1d ago•14 comments

Memory Safety

https://www.memorysafety.org/
58•pmaddams•13h ago•89 comments

We invited a man into our home at Christmas and he stayed with us for 45 years

https://www.bbc.co.uk/news/articles/cdxwllqz1l0o
1068•rajeshrajappan•1d ago•250 comments

Fabrice Bellard Releases MicroQuickJS

https://github.com/bellard/mquickjs/blob/main/README.md
1458•Aissen•2d ago•546 comments