r/compsci • u/Personal-Trainer-541 • 23h ago
The Chomsky Hierarchy - Explained
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 • u/iSaithh • Jun 16 '19
As there's been recently quite the number of rule-breaking posts slipping by, I felt clarifying on a handful of key points would help out a bit (especially as most people use New.Reddit/Mobile, where the FAQ/sidebar isn't visible)
First thing is first, this is not a programming specific subreddit! If the post is a better fit for r/Programming or r/LearnProgramming, that's exactly where it's supposed to be posted in. Unless it involves some aspects of AI/CS, it's relatively better off somewhere else.
r/ProgrammerHumor: Have a meme or joke relating to CS/Programming that you'd like to share with others? Head over to r/ProgrammerHumor, please.
r/AskComputerScience: Have a genuine question in relation to CS that isn't directly asking for homework/assignment help nor someone to do it for you? Head over to r/AskComputerScience.
r/CsMajors: Have a question in relation to CS academia (such as "Should I take CS70 or CS61A?" "Should I go to X or X uni, which has a better CS program?"), head over to r/csMajors.
r/CsCareerQuestions: Have a question in regards to jobs/career in the CS job market? Head on over to to r/cscareerquestions. (or r/careerguidance if it's slightly too broad for it)
r/SuggestALaptop: Just getting into the field or starting uni and don't know what laptop you should buy for programming? Head over to r/SuggestALaptop
r/CompSci: Have a post that you'd like to share with the community and have a civil discussion that is in relation to the field of computer science (that doesn't break any of the rules), r/CompSci is the right place for you.
And finally, this community will not do your assignments for you. Asking questions directly relating to your homework or hell, copying and pasting the entire question into the post, will not be allowed.
I'll be working on the redesign since it's been relatively untouched, and that's what most of the traffic these days see. That's about it, if you have any questions, feel free to ask them here!
r/compsci • u/Personal-Trainer-541 • 23h ago
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 • u/WeBeBallin • 2d ago
r/compsci • u/NewDamage5 • 1d ago
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 • u/rikulauttia • 1d ago
r/compsci • u/IntrepidAttention56 • 2d ago
r/compsci • u/IntrepidAttention56 • 2d ago
r/compsci • u/TheOptimistDev • 4d ago
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.
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 • u/encom-direct • 4d ago
The paper is only 15 pages long
r/compsci • u/ratsoup7 • 5d ago
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 • u/luckokkkk • 7d ago
Feynman’s contribution was a way to turn the machine’s parallel structure into a model programmers could reason about.
r/compsci • u/star_damage_bash • 7d ago
r/compsci • u/KnowledgeOk7634 • 9d ago
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 • u/boringmexican • 10d ago
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 • u/Personal-Trainer-541 • 10d ago
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 • u/PsychologicalTip3823 • 13d ago
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 • u/Curious-Ask8199 • 15d ago
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 • u/The_Mad_Pantser • 15d ago
r/compsci • u/Apprehensive_Knee502 • 16d ago
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 • u/Stock-Message4704 • 16d ago
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 • u/Akkeri • 17d ago
r/compsci • u/gmanflnj • 18d ago
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 • u/digital_n01se_ • 18d ago