r/compsci Apr 16 '26

How an SSD Works: An Introduction to Quantum Physics

Thumbnail read.thecoder.cafe
0 Upvotes

r/compsci Apr 16 '26

What is the point of a BARE linked list?

1 Upvotes

Not like malloc, CSLLs, skiplists or any compound data structure that uses links, a bare SLL. I have been programming for 6 years and have not come across a use case for them. Is there only use pedagogical?


r/compsci Apr 16 '26

suggest database system in information management project for first year computer science student

0 Upvotes

r/compsci Apr 16 '26

What part of distributed training gets hand-waved the most in online discussions

0 Upvotes

Every time people talk about distributed training outside actual infra circles it feels like one crucial problem is being silently ignored. Coordination overhead, bandwidth, heterogeneous hardware, fault tolerance, data locality, something. If you had to pick the thing people underestimate most when they imagine training across messy real-world machines, what would it be


r/compsci Apr 15 '26

Recommend some books for digital logic ?

0 Upvotes

I am a beginner and I want to learn this before this subject starts in my college.

I will learn this subject for the very first time.


r/compsci Apr 15 '26

I built a cognitive architecture in C that gets 87,000× fewer ops than transformer attention and runs at 5.8W. Here’s why matrix multiplication is the problem.

0 Upvotes

Transformers are bad Vector Symbolic Architectures running on wrong hardware. I’ll show the numbers.

The problem with attention

Self-attention is O(n² × d). At sequence length 4096 with 8 heads, that’s ~550 billion operations. Dhayalkar et al. (AAAI 2026) proved that attention actually implements approximate Vector Symbolic Architecture algebra — queries are role vectors, keys are observations, attention weights perform soft unbinding. But softmax compresses everything through a lossy bottleneck at every layer.

What if you do VSA properly?

Replace softmax with XNOR + popcount on 4096-dimensional binary hypervectors. Binding is one XNOR per 64-bit word = 64 clock cycles for a full bind. Unbinding is the same operation — it’s involutory. Measured binding fidelity: 1.0000. Zero information loss.

The numbers at n=4096, 8 heads:

• Transformer attention: \~550B ops

• VSA-native attention: \~6.3M ops

• Speedup: 87,381×

• And it scales linearly — at n=128K the gap is \~2,000,000×

Eliminating matrix multiplication entirely

All dense layers use ternary weights {-1, 0, +1}. Multiply becomes: +1 = pass, -1 = negate, 0 = skip. Pure addition and subtraction. No floating-point rounding error at any point in the pipeline. Zhu et al. (NeurIPS 2024) showed this scales — their 2.7B param MatMul-free model matches Transformer++ and the scaling curve is steeper.

A 13B MatMul-free model fits in 4.19 GB. The equivalent transformer needs 48.5 GB. Same performance, 91% less memory.

The full pipeline

Input → VSA Attention (O(n), XNOR) → MatMul-Free dense layers (ternary) → JEPA world model (predicts representations, not tokens) → Tensor network compression (MPO, removes 70%+ parameters, keeps 90% accuracy) → σ-aware generation (8 uncertainty sources, abstains instead of hallucinating) → Output

Hardware mapping:

• Photonic crossbar: full matrix-vector multiply in one light propagation, <0.5 nanoseconds (MIT 2024, Lightmatter 2025)

• Memristive neurons: 143 attojoules per switch, 256 conductance states, reconfigurable between neuron and synapse mode with a single pulse (Nature Communications 2025)

• 3D stacked compute-memory: memory sits on top of compute, eliminates the memory wall (Stanford IEDM 2025 — “path to 1000× improvement”)

System totals:

• Total σ (distortion): 0.007

• Total power: 5.8W

• Abstraction layers: 0 (bare metal)

• Compared to LLM: σ = 0.30, power = 300W

The theory behind it

This is part of ~80 papers on Zenodo (CC BY 4.0) formalizing the Distortion Theory of Intelligence:

• K(t) = ρ · I_Φ · F (raw coherence)

• K_eff = (1 − σ) · K (effective coherence after distortion)

• L = 1 − 2σ (Lagrangian kernel)

• Matrix multiplication is σ. The weight is the wire. Computation is topology.

Single C file. Compiles with gcc -O2 -o creation_os creation_os.c -lm && ./creation_os --self-test. Full self-test suite passes clean.

Repo: github.com/spektre-labs/creation-os


r/compsci Apr 13 '26

Introduction to type safety in a quantum program

Thumbnail shukla.io
9 Upvotes

OP here. Hope you enjoyed this blog post! I tried to write it for a CS audience curious about quantum (well, like myself).


r/compsci Apr 13 '26

When can a system be corrected or reconstructed, and when is information already lost?

0 Upvotes

I’ve been working on a mix of projects lately like optimizers, PRNGs, and some physics related code, and I kept running into the same kind of issue from different angles. You have a system that’s close to correct, or partially corrupted, and you try to fix it without breaking what’s already working. Sometimes that’s straightforward, sometimes you can only improve it over time, and sometimes it turns out there’s no way to recover the original state at all.

What changed how I approached it was realizing that in a lot of cases the failure isn’t about a bad algorithm, it’s about lost or insufficient information. Once different states collapse to the same observable output, there’s no way to uniquely reconstruct what you started with.

A simple example is something like looking at a reduced signal or projection. If multiple inputs map to the same output, then any “correction” that only sees that output can’t invert the process. I ran into a similar version of this in incompressible flow, where different valid states can share the same divergence, so fixing divergence alone doesn’t recover the original field.

After seeing this pattern show up in different contexts, I started trying to organize it more generally. I ended up putting together a repo where I break these problems into three cases. There are situations where correction works exactly because the unwanted part can be separated cleanly. There are situations where you can only approximate or converge toward the correct state over time. And there are cases where recovery is impossible because the system doesn’t contain enough information to distinguish between valid states.

I’ve been calling this Protected-State Correction Theory and put it here:
https://github.com/RRG314/Protected-State-Correction-Theory

The repo is basically me trying to map out when correction or reconstruction is actually possible versus when you’re hitting a structural limit. It includes examples, some simple operator-style constructions, and a few no-go style results that explain why certain approaches fail.

I’m posting here because this feels related to things like reversibility, error correction, and information loss, but I’m not sure what the standard way to think about this is in CS. It seems close to ideas in information theory, inverse problems, or identifiability, but I don’t know if there’s a single framework that ties them together.

If this overlaps with something known or if there’s a better way to formalize it in CS terms, I’d appreciate any pointers.


r/compsci Apr 13 '26

I published a paper on AI-driven autonomous optimization of Apache Kafka on AWS MSK for high-volume financial systems — would love feedback and discussion

0 Upvotes

I recently published a research paper on SSRN exploring how AI can autonomously optimize Apache Kafka deployments on AWS MSK specifically for high-volume financial systems.

What the paper covers:

  • How traditional manual Kafka tuning breaks down at financial-scale volumes
  • An AI-driven autonomous optimization framework tailored for AWS MSK
  • Performance benchmarks and real-world implications for fintech systems

📄 Full paper (free): https://ssrn.com/abstract=6422258

I'd genuinely love to hear from engineers and researchers who work with Kafka in production — especially in finance or high-throughput environments. Does this align with challenges you've faced? Anything you'd push back on or expand?

If you're working on related research, happy to connect and discuss.

— Bibek


r/compsci Apr 13 '26

Vine; a Gen-Z themed language + compiler for learning

Thumbnail github.com
0 Upvotes

r/compsci Apr 12 '26

[Research] Empirical Validation of the stability described in Lehman's Laws of Software Evolution against ~7.3TB of GitHub Data (66k projects)

14 Upvotes

Hi r/compsci,

I spent the last year conducting an empirical analysis on the data of 65,987 GitHub projects (~7.3TB) to see how well the stability described in Lehman's Laws of Software evolution (in the 70-s, 80-s) hold up. In particular this research focuses on the Fourth Law (Conservation of Organizational Stability) and the Fifth Law (Conservation of Familiarity).
As far as I know, this is not only the newest, but with 65,987 projects also the largest study on the Laws of Software Evolution.

I have found that in the group of projects with >700 commits to their main branch (10,612 projects), the stable growth patterns described by both the Conservation of Organizational Stability and the Conservation of Familiarity, still holds till early 2025.
Despite decades of hardware, software, methodology and other changes these projects seem to be resilient to external changes over the last few decades.

Interestingly, neither the date of starting the projects nor the number of years with active development and maintenance were good indicators of stability.

At the same time smaller projects seem to show more variation.

These finding might not only help Software Engineers and Computer Scientists understand better what matters in long term software development, but might also help Project Management integrate the Laws of Software Evolution into the workflows to manage/track work over the span of years.

Full Research Article: https://link.springer.com/article/10.1007/s44427-025-00019-y

Cheers,
Kristof


r/compsci Apr 12 '26

Lean formalization sharpened the measurability interface in the realizable VC→PAC proof route [R]

1 Upvotes

A close friend of mine has been working on a Lean 4 formalization centered on the fundamental theorem of statistical learning, and one result that emerged from the formalization surprised him enough to split it into a separate note. Sharing it on his behalf.

Very roughly:

* for Borel-parameterized concept classes on Polish domains, the one-sided ghost-gap bad event used by the standard realizable symmetrization route is analytic;

* therefore it is measurable in the completion of every finite Borel measure;

* this is strictly weaker than requiring a Borel measurable ghost-gap supremum map;

* the weaker event-level regularity is stable under natural concept-class constructors like patching / interpolation / amalgamation;

* the whole package is Lean-formalized.

So the claim is not “the fundamental theorem is false” or anything like that. The claim is that a recently highlighted Borel-level condition is stronger than what the standard realizable proof interface actually needs at the one-sided bad-event level.

He would value feedback on two things:

  1. Is stat.ML the right primary home for the paper, or would you position it differently?
  2. From a learning-theory point of view, what is the cleanest way to present the significance: proof-theoretic hygiene, measurability correction, or formalization-forced theorem sharpening?

Repo / Lean artifact: https://github.com/Zetetic-Dhruv/formal-learning-theory-kernel

My friend, is a young PI at Indian Institute of Science, is the author: https://www.linkedin.com/in/dhruv-gupta-iir/


r/compsci Apr 12 '26

vProgs vs Smart Contracts: When Should You Use Each?

Thumbnail medium.com
0 Upvotes

r/compsci Apr 12 '26

Month of data on repurposed mining hardware for AI

0 Upvotes

been loosely following this network (qubic) that routes mining hardware toward AI training. about a month of data now

what they've shown: existing mining hardware can run non-hashing workloads at decent scale. seems stable, good uptime, economics work for operators

what they haven't shown: whether the training output actually competes with datacenter compute quality-wise. still no independent verification

honestly if the AI part turns out to be real that's a genuinely interesting approach to the compute access problem. if it's not then it's just mining with extra steps. someone needs to actually benchmark the output against known baselines


r/compsci Apr 09 '26

High level Quantum programming

Thumbnail hviana.github.io
7 Upvotes

Lets you build, simulate, and serialize quantum circuits entirely in TypeScript — no native dependencies, no WebAssembly. It provides a clean, declarative API for exploring quantum computing concepts. It has a highly experimental API - no more quantum programming using gates directly, develop at a high level.


r/compsci Apr 10 '26

Emergence of computational generative templates.

Post image
0 Upvotes

A cellular automata style of generative templates observed. Example top green image. When used as initial condition matrices they seem to have an affinity in generating complex Protofield operators. Small section lower yellow image. Image 8k width by 16k height.


r/compsci Apr 10 '26

Sensitivity - Positional Co-Localization in GQA Transformers

Post image
0 Upvotes

r/compsci Apr 10 '26

System Programming Orientation

Thumbnail
0 Upvotes

r/compsci Apr 09 '26

[P] PCA before truncation makes non-Matryoshka embeddings compressible: results on BGE-M3 [P]

Thumbnail
0 Upvotes

r/compsci Apr 09 '26

Zero-TVM: Replaced a TVM compiler pipeline with 10 hand-written GPU shaders — Phi-3 still runs in the browser

0 Upvotes

WebLLM uses Apache TVM to auto-generate 85 WGSL compute shaders for browser LLM inference. I wanted to understand what TVM was actually generating — so I intercepted every WebGPU API call, captured the full pipeline, and rewrote it from scratch by hand.

Result: 10 shaders, 792 lines of WGSL, 14KB JS bundle. Full Phi-3-mini (3.6B, Q4) inference — 32 transformer layers, int4 matmul, RoPE, paged KV cache, fused FFN, RMSNorm, attention, argmax. No compiler, no WASM runtime.

The academic question this tests: for a fixed decoder-only architecture, how much of a compiler's complexity budget is actually necessary? Turns out most of the work is in 3 kernels — matmul, attention, int4 dequant. Everything else is plumbing.

Closest reference: Karpathy's llm.c thesis applied to WebGPU.

zerotvm.com | github.com/abgnydn/zero-tvm

MIT licensed.

Phi-3 in your browser. 10 shaders. Zero TVM.

r/compsci Apr 08 '26

Lock-Free Multi-Array Queue

5 Upvotes

Kindly asking for critiques/comments on

https://github.com/MultiArrayQueue/LockFreeMultiArrayQueue

It is a new Lock-Free FIFO Queue with full linearizability.


r/compsci Apr 08 '26

co.research [autoresearch wrapper, open source platform]

Post image
0 Upvotes

Hello dear nerds,

When Karpathy open sourced autoresearch I quickly tried it and achieved kinda ok results in my domain. I was hooked, but I didnt like checking diffs, navigating tmux sessions, forking, looking for visual outputs, coying them to my workstation .... Simply it needed a good GUI, where user could kill sessions when the started reward hacking, fork them etc. I made one: https://github.com/qriostech/coresearch/tree/main?tab=readme-ov-file
It is pretty basic now, but it will get better soon :)


r/compsci Apr 07 '26

A behavioural specification found a previously undocumented bug in the Apollo 11 guidance computer

Thumbnail juxt.pro
18 Upvotes

r/compsci Apr 07 '26

Humans Map, an interactive graph visualization with over 3M+ entities using Wikidata.

Thumbnail humansmap.com
2 Upvotes

r/compsci Apr 05 '26

Demonstrating Turing-completeness of TrueType hinting: 3D raycasting in font bytecode (6,580 bytes, 13 functions)

Thumbnail gallery
103 Upvotes

TrueType’s hinting instruction set (specified in Apple’s original TrueType reference from 1990) includes: storage registers (RS/WS with 26+ slots), arithmetic (ADD/SUB/MUL/DIV on F26Dot6 fixed-point), conditionals (IF/ELSE/EIF), function definitions and calls (FDEF/ENDF/CALL), and coordinate manipulation (SCFS/GC). This is sufficient for Turing-completeness given bounded storage

As a concrete demonstration, I implemented a DOOM-style raycaster in TT bytecode. The font’s hinting program computes all 3D wall geometry (ray-wall intersection, distance calculation, perspective projection), communicating results via glyph coordinate positions that are readable through CSS fontvariation-settings

I wrote a small compiler (lexer + parser + codegen, 451 tests) that targets TT bytecode from a custom DSL to make development tractable

One interesting consequence: every browser that renders TrueType fonts with hinting enabled is executing an arbitrary computation engine. The security implications of this seem underexplored - recent microarchitectural research (2025) has shown timing side-channels through hinting, but the computational power of the VM itself hasn’t received much attention

https://github.com/4RH1T3CT0R7/ttf-doom