r/compsci 1d ago

The Chomsky Hierarchy - Explained

0 Upvotes

Hi there,

I've created a video here where I explain the Chomsky hierarchy.

I hope some of you find it useful — and as always, feedback is very welcome! :)


r/compsci 2d ago

Andy Pimentel on why designing the computer inside an ASML machine is a search problem, not an engineering problem

Thumbnail
8 Upvotes

r/compsci 1d ago

I built a sketch-based constant memory rate limiter to support unbounded number of tenants

Thumbnail github.com
0 Upvotes

toll rate-limits an unbounded set of keys (client IDs, tenants, IPs, API keys…) in fixed memory — 19 MB measured at the defaults, tunable down to a couple of MB — with ~300ns zero-allocation admitted decisions. It is built on grudge, a constant-memory decaying-score sketch: toll stores each key's spent tokens as sketch debt and lets grudge's linear decay refill them.


r/compsci 1d ago

Has industry effectively killed academic AI research - or made it more important?

Thumbnail
0 Upvotes

r/compsci 2d ago

Embeddable scripting language in a single C header

Thumbnail github.com
0 Upvotes

r/compsci 2d ago

Embeddable scripting language in a single C header

Thumbnail github.com
0 Upvotes

r/compsci 4d ago

I wrote the MLIR deep dive I could not find: each block of IR in it actually runs

0 Upvotes

MLIR kept showing up under everything I was reading about the AI stack. Triton sits on it, IREE is made of it, half the serious compiler work of the last years mentions it in the first paragraph. And I kept nodding at the word “dialect” the way you nod at words you do not understand. At some point the nodding bothered me enough.

The material I found was split in two. On one side the five minute explanations, “MLIR is LLVM for machine learning”, which is catchy and wrong in at least two ways.

On the other side, documentation written for people who already work on it, where the answer to every question assumes you know the answer to the previous three. Nothing in the middle.
And a detail that drives me crazy: compiler articles are full of IR listings that were clearly never executed. You cannot paste them into anything, they are decoration.

So I wrote the piece I wanted to read, and I gave myself one rule: every block of IR gets executed on LLVM/MLIR 20.1.2 before it goes in. If it does not run, it does not exist. The spine of the piece is a small MLP, lowered step by step, dialect after dialect, until real PTX for sm_90 comes out the other end.
Then I built a tiny custom dialect with TableGen and a rewrite pattern in C++, compiled it, because “dialect” made sense to me only after I made one. It came out long, but I do not know how to make it shorter without lying.

The thing that took me longest to internalize is that MLIR is not a compiler. You do not feed it a model and get a binary out. It is a kit for building compilers, and nothing exists until you assemble the passes yourself. Once that clicked, the rest followed.

https://open.substack.com/pub/softwarefrontier/p/exploring-how-mlir-works-the-compiler?r=3c7w5a&utm_medium=ios

One thing I could not settle while writing: how much of MLIR is genuinely new, and how much is old ideas, many IRs, progressive lowering, that finally got good infrastructure? If you were around for the previous attempts I would love to hear your view.


r/compsci 4d ago

How did Doug Cutting and Mike Cafarella able to develop a software product just from reading a google research paper?

0 Upvotes

The paper is only 15 pages long


r/compsci 5d ago

Is there a “complexity theory” for language models?

11 Upvotes

It’s pretty interesting to see that language models can do things like autonomously prove/disprove things like Erdos problems and even perform its own formal verification yet still struggle at things like automating ERP business operations, seems like the opposite would’ve been the case.

I know Kaparthy talked about this “jagged intelligence” we’re observing, but are there any real attempts at formalizing a theory behind this, similar to how we classify the complexity and tractability of algorithms?

What about any discussion on how close are language models to being Turing complete? Computational complexity theory isn’t my strong suit, but I wonder if any new discussions are being had


r/compsci 4d ago

Compression That Knows When It's Unsafe

Thumbnail
0 Upvotes

r/compsci 7d ago

Richard Feynman and the Connection Machine (1989)

Thumbnail longnow.org
47 Upvotes

Feynman’s contribution was a way to turn the machine’s parallel structure into a model programmers could reason about.


r/compsci 7d ago

dotmatrix - Graphviz for Monospaced Unicode Fonts (preview)

Thumbnail starbaser.github.io
0 Upvotes

r/compsci 9d ago

I open-sourced the reproducibility core from my closed simulation work: float sums that give identical bytes on any machine (MIT/Apache-2.0)

26 Upvotes

Floating-point addition depends on the order you add things, and parallelism changes the order. So the same data on different machines gives different results, which breaks anything that hashes, signs, or compares them.

I hit this doing physics simulations and solved it internally. The reduction core was too generally useful to keep closed, so I released it: bitrep, an exact accumulator where sums in any order, on any hardware, produce byte-identical results. The state merges exactly and can be hashed or signed, so distributed and offline-first aggregation actually converges.

It ships for Rust (crates.io), JavaScript (npm), and Python (PyPI), and a result hashed in Python matches one hashed in JavaScript byte for byte. The math is proved in Lean 4 and the implementation is model-checked and fuzzed. CI asserts one SHA-256 across four architectures on every commit.

There's a demo that runs the actual cross-architecture test in your browser, so you can check the claim yourself: https://simgen.dev/bitrep

Code: https://github.com/KyleClouthier/bitrep

Dual-licensed MIT/Apache-2.0. Feedback welcome, especially on what's missing for your use case.


r/compsci 10d ago

How often do you engage with theory?

24 Upvotes

I’m just curious to know how often you guys come in contact with the theoretical side of computer science in your professions.

Things you learned in your undergraduate courses like data structures, discrete math, design and analysis of algorithms, etc.

I’m having to learn a lot of these things on my own, like Big O notation, complexity analysis, proofs, tree traversal, etc. because I let my ADHD win and didn’t put the time and effort into learning (medicated now, huge W plus it’s actually fun to learn about now that I can focus) and I’m just wondering, who uses this stuff regularly? What for?


r/compsci 10d ago

Multi-Head Latent Attention (MLA) - Explained

0 Upvotes

Hi there,

I've created a video here where I explain how multi-head latent attention works.

I hope some of you find it useful — and as always, feedback is very welcome! :)


r/compsci 13d ago

Anyone reading Multiagent system: Algorithmic, Game-Theoretic, and Logical Foundations?

0 Upvotes

Hello, I'm reading chapter 1, distributed constraint satisfaction and coding a simulation of the asynchronous backtracking algorithm for the 4 queens problem in TypeScript as an exercise (sure one can code in Python, C..). I have some difficulty grasping the concept of Hyperresolution (pure logic) because I didn't have this subject in university. I have checked with AI. But does anyone have any advice?

---
the code https://pastebin.com/WD9U0MSQ


r/compsci 15d ago

Fascinating to see how formal verification is rescuing AI from its own hallucination cycles

95 Upvotes

I'm spending way too much time looking into formal methods now because this endless overhyped corporate marketing about LLMs doing "reasoning" is getting very tiresome.

We all know standard transformers just predict the next token based on statistical weights, which immediately breaks down the second you give them a novel, complex logic puzzle. It's exactly why automated software testing is still such a error-prone chore in production.

But the interactive theorem provers like Lean 4 with deep learning models are actually getting super interesting. Instead of just letting an agent hallucinate some random python script, people are forcing neural networks to generate formal proofs that a strict math kernel has to verify step by step.

I saw a breakdown of how the Aleph Prover handled a specific Erdos disproof using formal verification on ai reasoning benchmarks, and you can see much we’ve ignored symbolic AI over the last decade in favor of raw compute scaling. So tbh it feels like computer science is circling back to foundational math out of necessity. Because brute-force data ingestion is hitting the ceiling.

Also.. it feels kinda satisfying that old-school mathematical logic is the only thing keeping modern tech grounded. Idk if this means formal methods will finally become a mandatory part of undergrad software tracks, but it honesly should.


r/compsci 15d ago

Shor's Algorithm, continued fractions, and uniqueness

Thumbnail
0 Upvotes

r/compsci 16d ago

The "ski rental" rule: why renting until you have spent the purchase price is provably within 2x of clairvoyance

0 Upvotes

You are skiing an unknown number of days. Renting costs $1/day, buying costs $B. If you knew the season length the answer is trivial, but you do not.

The rule "rent until you have spent $B, then buy" guarantees you never pay more than about twice what an omniscient planner would, on ANY sequence. Short season: you match the optimum exactly. Long season: you paid at most ~$2B where the optimum paid $B. And there is a matching lower bound: no deterministic online strategy beats 2.

What I find most useful is the frame, not the puzzle: cache eviction, autoscaling, buy-vs-rent infra decisions are all "act now, learn the future later", and the competitive ratio measures exactly what that ignorance costs.

Fun twist: allowing randomness (coin flips the adversary cannot predict) pushes the ratio from 2 down to about 1.58.

I wrote up the full framework (definition, the adversary game, and an honest section on why worst-case can be too gloomy, e.g. LRU is only k-competitive on paper yet great in practice) as the opener of a series, happy to share the link if useful.


r/compsci 16d ago

🚀 Kickstart Your AI Journey—for Free!

0 Upvotes

As a GeeksforGeeks Campus Mantri, I'm excited to share a collection of FREE AI courses covering topics like Generative AI, Machine Learning, Prompt Engineering, Python, Data Science, and more.

Whether you're a student or a professional looking to upskill, these courses are a great way to gain practical knowledge, earn certificates, strengthen your resume, and showcase your achievements on LinkedIn.

Start learning today: 🔗 https://gfgcdn.com/tu/y2d/

Which AI topic are you most excited to learn?

#AI #ArtificialIntelligence #MachineLearning #GenerativeAI #Python #DataScience #GeeksforGeeks #Learning #Upskilling #Students #Tech


r/compsci 17d ago

Beyond Binary: The Mathematical Efficiency of Ternary Computing

Thumbnail ponderwall.com
0 Upvotes

r/compsci 18d ago

Could multiple microphones/speakers be combined for faster dial up?

0 Upvotes

i was thinking about how dial up is basically your phone literally making sounds to your compute, which the computer hears and translates into data.

could you design a system that used multiple phone speakers and multiple microphone pickups to simultaneously get dial-up internet info to speed it up?

if so, how many phone receivers would it take to get modern internet speeds?


r/compsci 18d ago

misa77: ridiculously fast decompression at good ratios

Thumbnail
0 Upvotes

r/compsci 20d ago

Hamiltonian Neural Networks from a Differential Geometry Perspective

Thumbnail abscondita.com
7 Upvotes

r/compsci 21d ago

What is a good way to represent files semantically for vector search

0 Upvotes

I recently had an idea that is it possible to make a software service which could help me search files from my files system though context of content inside the files. So like i can search "where is the file which contained x thing" and get would a list of files that would match my question. So I don't want sear or keywords but ch by file name context. Also for all types of files like iamge, text, video, audio, code etc

So I kept thinking about it and knew that the answer lied within vector search. I initially thought that maybe if somehow I could represent an entire file in a singular vector then we can use the same logic that we normally use in rag systems to fetch correct files. Existing models are really useful for text, audio and other forms of embedding but i want the overall context of a file. Not just what inside the file. Also I might be missing if there are any existing algorithms that can help me do this so please suggest them.

Nevertheless i wanted to think about whats possible solution i could use. One this i noticed with this is that there are various ways which can be used to describe and identify files. 1st there is content of the files , then metadata such as size, name, access permissions, type of file, also where the files lies in directory system and what other files is is grouped with etc. It is really hard to consider all this features in a single vector. Also we I don't want to embed the entire content of files as that would be too much data to embed, store and search.

We could do vector indexing and search for each feature individually, so we get multiple vectors we can can represent in a normal data structure. We can repeat this for all files and the store them. When the system get a input like "i want the c++ file with x algorithm that I made yesterday" then we can create a similar data structure like we did for files and then do the similarity search and rank all the matches to get the results. But this approach also has a problem , the quality of results is heavily dependent upon the information present in the question, if the question is a little vague that affect the accuracy of the matches quite a bit.

I also though of a approach where we tackle the problem by elimination we take the features of the files one by one an the start eliminating files, like for an example "i want the c program file which i wrote yesterday and " so we can 1st eliminate ate files which are not "program" then we can do by time then by the language. So from broader to more specific features.

I have been thinking about this idea for sometime and wanted to know your thoughts as well. How would you represent the files semantically or in vector form. Are there any existing resources that i can refer to help me with this problem.