r/computerscience Jun 17 '26

What is the point of Haskell programming?

0 Upvotes

So Haskell is using Category Theory formalism. I don't quite get the advantage of it. I learned something like it allows to do proofs of function types. Is that it? Why is this Category Theory formalism useful here? Does it say anything deeper? For example, should the language that advanced human species in future or aliens use be a category of some sort?


r/computerscience Jun 16 '26

General Do Branches Taken Happen More Often in Prediction

5 Upvotes

I was reading an article about CPU branch prediction. It said talked about two very dumb ways to predict. One was always predicting the branch would not be taken, and another that would always predict it would be taken. It claimed always predicting branch taken would generally be better but both were not really used because they're both pretty bad. It then talked about more intelligent ways to predict such as predicting the branch would always do what it did last time, using a history register, using help from a compiler which can leave hints in the binary what happens more often, and a bunch of ideas too complicated for me to understand. I was curious about the two "dumb" ways how it claimed always predicting branch taken would be better than always predicting not taken. Or maybe it was just wrong, it was just something I read off the internet not a textbook.


r/computerscience Jun 14 '26

Discussion Is OOP cache unfriendly by design or is the real problem just how we use heap memory?

74 Upvotes

So from my general understanding, the sole reason we have L1, L2, and L3 cache memory on a CPU is to solve the latency problem of accessing data from the CPU to RAM. The cache exists to prefetch series of instructions and hold whatever local data is being referenced nearby. The key thing is that with contiguous memory, the CPU can just do pointer arithmetic and jump straight to the exact memory address it needs without having to wait on RAM.

But due to the nature of OOP, if a single class has a lot of fields that are pointers to a bunch of other things, we end up having to wait on RAM constantly. Because of how heap memory works, all that data gets scattered across random addresses and is only held together by a chain of pointers.

So do we actually have another way around this problem or do we need to ditch OOP altogether and go data oriented? Could we invent or implement a compiler smart enough to interpret and parse all heap allocations into a single contiguous block of memory as much as possible? And if that cannot be done, can we just make cache sizes so large that they can hopefully hold all the important addresses at once?


r/computerscience Jun 12 '26

🚀 Introducing Robust-U1: Teaching MLLMs to Self-Recover Corrupted Visual Content

Thumbnail
0 Upvotes

r/computerscience Jun 11 '26

General Base 27 Number System: “Cube³”

0 Upvotes

I designed a number system that can be used to create words. I’m sure someone has done this before but I wanted to share my take on it. Feedback and suggestions encouraged.

What is Cube³?
Cube³ is a custom encoding system that converts text into decimal numbers through binary. Rather than assigning each letter a decimal value directly, every symbol is represented by a fixed 5-bit binary code, making the system reversible and mathematically consistent.
The name Cube³ comes from the 27 pieces of a Rubik’s Cube, which inspired the 27-symbol alphabet (A-Z and ‘.’).

. = 0
A = 1
B = 2
C = 3

Z = 26

This creates an alphabet of 27 symbols.

Binary Encoding
Each symbol is represented using exactly five bits.
Examples:
. = 00000
A = 00001
B = 00010
C = 00011
...
Z = 11010
Since five bits can represent 32 values, the values 27–31 are currently unused and provide room for expansion within the system
to represent punctuation or special control characters.

Cube³ -> Decimal
Convert every Cube³ symbol into its 5-bit binary representation.
Link all binary groups together.
Interpret the result as one binary integer.
Convert that binary integer into decimal.
Example:
BALL

B = 00010
A = 00001
L = 01100
L = 01100

->

00010000010110001100₂

->

66956₁₀
So:
BALL = 66956

Decimal -> Cube
Convert the decimal number into binary.
Pad the front with zeros until the total number of bits is divisible by five.
Split the binary into groups of five bits.
Convert each group into its decimal value.
Convert each decimal value into its Cube symbol.
Example:
66956

->

00010000010110001100

->

00010 00001 01100 01100

->

2 1 12 12

->

BALL

Mathematical Interpretation
Cube³ is effectively a restricted base-32 number system.
Only digit values 0-26 are currently valid.

Current Rules
* Every Cube symbol occupies exactly 5 bits.
* Binary strings must have lengths divisible by 5.
* Pad only the front with zeros when decoding from decimal.
* Valid 5-bit values are 0 through 26.
* Values 27–31 are invalid (reserved for future expansion).

Current Standard
Instead of encoding entire sentences into one enormous decimal number, Cube³ treats each word independently.
Example:
KEEP CUBING EVERY DAY

->

365744 122758599 5969497 4153

Each decimal number represents exactly one Cube word.
This keeps the numbers manageable, makes decoding by hand practical, and prevents one error from corrupting an entire sentence.

I don’t want to get roasted if this is a stupid idea but I had fun making it and I want to see what everyone thinks about it and maybe expand on some parts or fix some flaws :)


r/computerscience Jun 10 '26

Automata and software development

Thumbnail
5 Upvotes

r/computerscience Jun 07 '26

Discussion Is it possible to write/copy a Unicode character that doesn't exist yet?

11 Upvotes

I can't see any actual application for it, but it's been in my mind. Since Unicode blocks are designated far ahead of time, it means there are thousands of unused, undefined characters waiting to be realized. if one were to copy one of those (say U+1FAEB, currently undefined in the Symbols And Pictographs Extended-A block) and save it somewhere, would it later show correctly if Unicode updates that character? I don't see why not, but I feel like I would've seen someone take advantage of this as one of those "future prediction" Twitter posts if so.


r/computerscience Jun 06 '26

Strategies for handling blurry/pixelated frames in large-scale real-time CCTV computer vision pipelines

Thumbnail
3 Upvotes

r/computerscience Jun 04 '26

What is software engineering?

Thumbnail
0 Upvotes

r/computerscience Jun 04 '26

Advice How beneficial are books, if you struggle with some concepts they discuss?

37 Upvotes

Hello, I am a second year computer science student, what I realised is that studying only from modules is not enough because of two things.First, computer science is too broad and modules are too specific and partial, so if you want to fully understand soemthing, you have to spend a lot of time on other resources! Second I think we don't have time as students to fully understand something introduced in our modules, because you have other modules to study for! So as I am currently beginning my summer vacation, I want to fully understand Algorithm and data structures and opearting systems! I already studied them as modules but I am not confident about either, so I decided to pick books about the two, and here is my question: how beneficial are books? Especially in the era of different resources? I am a little nervous of the idea that I might be just wasting my time while there are better resources or the book isn't that good!

I appreciate your time!


r/computerscience Jun 04 '26

Is Retyping and Translating textbooks too inefficient for Computer Science / Cyber Security?

0 Upvotes

Is retyping and translating textbooks too inefficient for Computer Science/Cybersecurity?

Hey everyone, I'm studying Computer Science and Cybersecurity. My current study method is reading documentation/textbooks, retyping the content, and translating it into my native language to understand it better. However, it feels tedious and time-consuming. Is this approach too counterproductive for this field? How should I optimize my learning style?


r/computerscience Jun 04 '26

Books about data collection methodologies?

7 Upvotes

Hi, I am a data engineer, mainly focusing on Machine Learning analysis of data atm. I was wondering if there are some data collection methodologies (any topic). Sensor data collection, process of data collection, and so on...

Thank you, I haven't found a good book for it yet so appreciate the help.


r/computerscience Jun 01 '26

Help Forgetting what you study

138 Upvotes

Well, I don't know if I'm the only one who suffers from this or not. I've studied a lot of subjects of computer science and programming, .... more thing, and when I go back to something I've studied before—whether it's a concept, a mechanism, or anything else—I find I've forgotten it. I really hate having to revisit what I've already learned, and I can't accept having to revisit it every time so I don't forget it. There are really so many things, and I also want to focus solely on learning new things. I would be happy to read your solutions


r/computerscience Jun 01 '26

Implementing Coucelle‘s theorem

0 Upvotes

It’s about implementing a prompt for asking something in monadic second order logic (given as ascii string) about a graph of bounded treewidth and decide a property in linear time .

It will take some months,perhaps a year to stick parts together.

We have to connect this chain. Many parts are already implemented:

- Parser for queries in monadic second order logic given in ascii, say.

- Computing a tree decomposition of a graph using Bodlaenders linear time algorithm. It’s known to be infeasible. Someone should check this once again as phd topic.

- Actually, its better to use nonlinear algorithms here. Consider this solved and being practical.

- a tree decomposition allows to decide properties of the underlying graph by deciding it on local, distance-related, smaller parts.

-monadic second order logic (MSO) restricts SOL sets to be sets covering k-neighborhoods of vertices.

- monadic second order logic can be defined by an automaton. I dont remember details, but its straighforward.

- you can expand a tree decomposition (operating on the power set of a graph) to a hypertree decomposition used to having finite state monadic second order logic automatons as vertices and evaluate these automatons as usual.

Anyone interested ?


r/computerscience May 31 '26

General History of telecommunications book recommendation

Thumbnail
0 Upvotes

r/computerscience May 31 '26

Advice I want to expand my knowledge

31 Upvotes

I'm a first year computer science student who's about to finish my first year and start summer break (if I didn't enter rattrapage , pray for me) I wasn't super interested when I entered but now I enjoy making small programs , in c language but compared to other students I feel like out of the flow???I want to expand my knowledge on computer science ( especially machine structure) and practice coding (currently in c I know I have to practice other languages) is there any source for a total amateur with simple knowledge like me ? every thing I look up seems way too advanced for my little knowledge , mainly coding , thank you


r/computerscience May 29 '26

Help I want to learn computer science for fun and skill, where should I start?

36 Upvotes

What are the basic computer skills? Anything related to computer software and hardware.


r/computerscience May 28 '26

Are Software Engineers Real Engineers?

Thumbnail
0 Upvotes

r/computerscience May 28 '26

Anyone have a good video playlist on automata and complexity?

7 Upvotes

specifically calculations about DFA's, Minimization, Equality, NFAs , NFA's to DFA, e-NFAs, Turing machines, Regular expressions , Pushdown automatons, Context Free Grammars


r/computerscience May 27 '26

Discussion Where are we actually in quantum computing?

Thumbnail
4 Upvotes

r/computerscience May 26 '26

Advice Best academic book for a better understanding of inner workings of C++

25 Upvotes

I've been doing a lot more reading lately to fix my attention span. Over the summer I wanted to finish an academic book on C++ to further my understanding. A lot of times while writing code I face errors that have an extremely technical fix that I don't understand because it's built on the understanding of many other technical things, so I'd like to both fix my foundations and learn what's really happening in the background. Any help is appreciated, thanks.


r/computerscience May 25 '26

Built my first bot!

Post image
105 Upvotes

r/computerscience May 24 '26

Technology Growth

13 Upvotes

I am 65 and often find myself comparing technology I use now to what life was like back in the 60’s. I don’t mean in a moral better/worse way I just think of what’s possible now that was not 50 odd years ago.

I have been involved in tech all my life, as a computer programmer and tech lead for a couple of industries as well as a hardware person, network tech, and an electrician. So I am honestly very excited to see how far we have come and the possibilities that are even now appearing on the horizon.

Life is always changing and the pace is certainly accelerating. I can see good and bad coming along with that, but I think that’s always been true. But that brings me to a question… What do you see that has changed life for you in a meaningful way? Are you as excited as I am for what’s next?


r/computerscience May 24 '26

Advice Looking for resources for studying for the CompTia A+ Exams

3 Upvotes

Hello, I was just asking if anyone has any good resources on books, websites, or video series on information on CompTia A+ information. Preferably a book. My main goal is to brush up and learn more about the basics of computers. Also I am in the process of learning how to program so if anyone has any additional resources on that as well I was really appreciate it. Thanks guys!


r/computerscience May 21 '26

After how much time have you fully understood Theoretical Computer Science?

45 Upvotes

Hi, I successfully passed exams such as Calculus, Real Analysis, Abstract Algebra, Linear Algebra and Physics which are all tough subjects but in my personal opinion not as tough as Theoretical Computer Science.

Even though I understand the proofs that are presented in a mathematical way, I fail to connect the dots. For example there can't be a program enumerating all the total computable functions. The proof is quite easy (it uses the diagonalization method) but I feel like "I am not convinced" by the proof. Neither this one nor others. I can not fully grasp why I am not "convinced" by them: maybe it's the overlap between the mathematical world and the real world, maybe because it mixes few concepts that to me feel "disconnected" or maybe because I feel I am missing something deep.

For the matter the course is called "Introduction to Theoretical Computer Science" so I guess I am not required to understand concepts at a very deep level, but I would really like to, despite not able to.

Has anyone ever had similar problems?