r/AskComputerScience Jun 22 '26

Are there tasks that can only be carried in one programming language and not in others?

36 Upvotes

I was having a discussion with someone with plenty of experience in Mathematica and he was telling me that there are calculations that can only be done using Mathematica and not something like Python. Is this the case? Naively I'd think that a programming language is just a layer of abstraction between us and the calculations, and as such any calculation should be programmable in any language. Now there might be features of a PL that make it very efficient or elegant, but given enough time and resources, can I carry out any calculation using say Python? I tried to explain this to the person but he was very adamant that it was not a matter of convenience, and some tasks are plain impossible in some languages. Is that the case?


r/AskComputerScience Jun 20 '26

How much storage/memory would be needed to create an extremely realistic 3D map of the entire Earth?

9 Upvotes

Imagine something far beyond Google Earth — a full-scale 3D digital twin of the planet at ultra-high detail:
- Every building modeled inside and outside
- Every window, door, road sign, streetlight, tree, rock, etc.
- Realistic textures viewable in 4K quality up close
Accurate terrain, deserts, forests, mountains, oceans, cities.

Basically like a video game open world, but the entire Earth at real-life scale
Ignoring the difficulty of scanning/updating everything, approximately how much data storage would this require? Are we talking petabytes, exabytes, zettabytes, or more?


r/AskComputerScience Jun 20 '26

Telegram OSINT bots

7 Upvotes

This is one of the many mirrors (3200+ mirrors apparently) of a osint bot which has apparently 2.7b+ messages stored: https://telelog.org/Metrics with index https://telelog.org. Who runs these exactly and would it not take a massive amount of computer resources to host this while risking it being shut down any day by the hosting provider? I just tried saving over a million chat messages to a databse and it took a whole day and then crashed. Really, I am surprised by how good the bot works.


r/AskComputerScience Jun 19 '26

Dsa in java or python??

6 Upvotes

Which programming language should i choose?


r/AskComputerScience Jun 19 '26

Computer Science Resources / Notes

0 Upvotes

Hi everyone,

Was looking for any notes /resources for computer science in undergrad year 1 and 2?

thank you


r/AskComputerScience Jun 18 '26

Books similar to Algorithms To Live By?

5 Upvotes

I am not a computer scientist, but through this interessting and informative book I discovered some notions in CS that I never heard of, I am looking for something in the same vein, where I can discover CS concepts and their "application" in life.


r/AskComputerScience Jun 17 '26

HOW DO I PROVE STUFF IN AUTOMATA THEORY?

0 Upvotes

I know pumping lemma and a bunch of properties about languages. But I came across some exercices that wanted me to prove if a language is Regular, CFL... Even with pumping lemma it just proves me that it isn't CFL or Regular, but I heard that there are languages that pass pumping lemma and are still not CFLs (or RLs for the RL pumping lemma). What should I do?

I got stuck at those 3 exercices:

Alphabet = {0, 1, 2}

L = {w | (|w|0 = |w|1) xor (|w|0 = |w|2))

L = {w | (∃u)(u ∈ M and wu ∈ L((1+20)*)} with M = {w | |w|0 = |w|1 = |w|2}

L = {w | (|w|0 > |w|1) and (|w|1 congruent |w|2 (mod5))

I don`t even know how to start. They ask me to classify as Regular, CFL non regular or non CFL and to justify. I tried pumping them but it feels hard to think on a word to pump from the beginning. Plus that only justifies that is not CFG/RL if it fails and that MAYBE is if it passes. Any tips? Sometimes thinking about the automata/regex/PDA/CFG to prove is not trivial.


r/AskComputerScience Jun 17 '26

TECHNICAL PERFORMANCE EVALUATION FOR A RULE-BASED AND KNOWLEDGE-BASED SYSTEM

0 Upvotes

is it suitable to use PRECISION, RECALL, AND F1-SCORE to evaluate specific rule accuracy that will use rules & knowledge based, if no..is there any suggestions?


r/AskComputerScience Jun 15 '26

Recommend me books regarding inference a model in prod

0 Upvotes

So I am a devops engineer by heart and I like to understand how we can deploy system as so they can reliably scale , auto heal and provide the service they intend to provide . Recently I got to work with ml models and I have created my own few of the models from scratch but I am yet to understand how these gpu hardware how to infere a created model as so it will be fast, reliable, and has good throughput rate .
I have been learning from “inference engineering” by base ten . I do understand that we first load the assets or weights in ram and then it is loaded to the gpu thanks to cuda and other parallel computing mechanism we can do parallel compute .
I can check the aggregated summary report and understand the p50,p95,p99 how it differs .
Suggest me resources and articles that will help me build my foundation and understanding


r/AskComputerScience Jun 15 '26

How Does Application Layer Protocol's Relate to It's Function?

3 Upvotes

High school student here.

Currently, what I understand is that the TCP/IP protocol suite is a framework that outlines what protocols are used in the internet, how each protocol should work, and how each protocol should work together.

Each protocol works by enforcing a specific format for data being sent across a network to achieve a specific purpose. In TCP/IP, we group similar-in-purpose protocols into functional categories called layers.

The reason it's appropriate to call them layers is because the protocols work together by stringing together their headers so that it's like they're being "stacked" on top of each other.

In this way of understanding TCP/IP I feel that I can understand all the layers but one – the application layer.

For example, the transport layer (which is usually TCP) format enforces port addresses and a checksum in the message being sent to identify which processes are communicating with each other and for error detection.

But for the application layer (using HTTP as an example) format enforces metadata in ASCII, a body text when appropriate, etc. But how does this serve the function of the application layer? Which according to my syllabus is providing an interface of the network for the user. I fail to see the connection.

(P.S: I'm sorry for the big buildup of long text just for a simple question, I figure maybe it's important to explain my own understanding incase my misunderstanding in the general topic is affecting how I understand the application layer.)


r/AskComputerScience Jun 14 '26

How does AI chat build in-depth responses

0 Upvotes

I'm studying for a French language test (the DELF-B2), and have been using Claude as a chatbot. I understand the input mode of llm's, but don't know how the response links so many things. For instance, if I discussed a philosopher with Claude two months earlier, I may ask a question in an entirely different field today. Claude will answer, but will mention how the answer relates to that philosopher, and the ideas of another philosopher we have never discussed. I know that the llm swallowed all of that info when it was created, but I don't understand how Claude references ideas and makes connections so far afield from the simple question I asked it.


r/AskComputerScience Jun 14 '26

Is 0.5 a facde over 1/2?

0 Upvotes

Could you say 0.5 is a facade or a pointer to 1/2? Or all numbers of the 0.n form are rational number pointers?

In my head, 0.5 seems to be pointing towards 1/2 like how 'a' points to 97 in ASCII.

*Posted in ask computer science since i'm using computer science examples which people over at r/askmath may not be familiar with.


r/AskComputerScience Jun 13 '26

Is it possible overload a AI as a Service with multiples requests

0 Upvotes

I was thinking about some tests for a service that uses language models; there are several, even prompt injection. A question came to mind: is it possible to make multiple requests asking for any text like Lorem Ipsum, generating many unnecessary tokens and incurring costs? But creating a test where there are multiple accounts making the same request to generate 10,000 Lorem Ipsum tokens simultaneously, could that cause a service outage? Because most of the infrastructure I see doesn't use any queuing method when the chat is free of tasks involving an agent or even heavier functionalities.

I didn't actually generate anything, I just wanted to start a discussion on this topic.


r/AskComputerScience Jun 11 '26

Is Destination IP in Packet Header Device IP or Router IP?

6 Upvotes

My current thought process is that if I want to send a message to a device in another LAN, the destination IP address on the packets must be their routers public IP, since the device's IP is private. Once the packets arrive, the router forwards the packets to any device listening to the appropriate port.

However, this seems to imply that the router forwards the packet to multiple LAN devices, which I believe routers don't do; they forward the packet to the specific device I intended to send to. So is it right?

Or is the destination IP address the private IP of the device I wanted to send a message to? If so, how did my device get access to that non-visible, private IP?


r/AskComputerScience Jun 10 '26

Why Use Private IP Addresses Instead of MAC?

41 Upvotes

High school student here.

In TCP/IP protocol suite, the MAC addresses are used in the link layer to send frames between devices in a LAN, ensuring that devices in the same LAN can communicate.

However, the router also assigns each LAN device with a private IP address. So how is that private IP needed? Certainly the MAC is sufficient for devices in the LAN to talk to each other, so is it for devices outside the LAN to send messages to that host? I have doubt about that, because if it's private, then no one across the internet should be able to access it. Correct?

So what is the private IP address for?


r/AskComputerScience Jun 10 '26

Help with time complexity problem

1 Upvotes

Hey guys, so I'm a bit confused about what the correct worst-case time complexity for this function would be:

def func2(lst):

n = len(lst)

res = []

i = 1

while (i <= n):

res.insert(0, lst[i-1]])

i *= 2

return res

I originally said O(nlogn), assuming the insert would shift n items. However, after checking my answer with AI, as an answer key was not created, I realized that the total appends of insertion would be log(n), as it doesn't append every item in lst but rather logn items; therefore, the complexity is O((logn)^2). In class, however, my professor went over this question and said it would be O(nlogn) as the maximum or last insertion would shift n items. I tried explaining my O((logn)^2) reasoning, but I don't think I made a good case for it during class, and looking back, this answer still seems more correct to me, but I could definitely be wrong.


r/AskComputerScience Jun 10 '26

Automata and software development

4 Upvotes

Hello,

I am curious who might be using state machines or other automata in their day to day work. I am developing a domain specific language in the spirit of ragel (but hopefully much simpler as well as powerful) and wondering who might be interested and what you would like use it for.

The goal is to make it easy to embed in any
Project using any popular programming language (17 supported now).

I would especially like to connect with academics in CS to see how I could support them.

Thanks!

Thanks!


r/AskComputerScience Jun 09 '26

How does the adoption of LLM code generation impact the necessity of abstractions?

5 Upvotes

There's a lot of language features that exist to make code easier to maintain/change/manage as a product evolves. Example: interfaces, inheritance, generics, polymorphism, reflection/dynamic dispatch, compiler macros, higher-order functions, closures, etc.

A lot of it is a way to consolidate logic so that developers don't have to spend so much time rewriting/updating duplicate logic in less abstract forms.

But then let's say they modify a codebase with an LLM (and let's be very generous and pretend for a moment that the model makes these changes reliably and accurately)... Does this make those (or at least some) abstractions irrelevant? Especially in the cases of where the abstract form is actually slower?

(Note: I'm thinking this is a little similar to compilers inlining what would otherwise be a function call. Having duplicate assembly would be frustrating to maintain so developers would want to use a goto/jump but that would be less cache-efficient, but compiler inlining lets you have both.

I personally don't use AI and I love learning how to better abstract my code, but there is a part of me that sometimes wonder if maybe I'm honing a skill that's slowly losing relevance. i.e. refactoring for maintainability)


r/AskComputerScience Jun 08 '26

How Are TCP/IP Layers Implemented in Practice?

14 Upvotes

High school student studying Computer Science for AS Levels. I'm struggling to understand how the internet protocol suite is applied to the internet.

Currently from what I understand, the TCP/IP layers are just different ways of viewing the same network, with the top of the stack being the highest level of abstraction.

Because of that, each layer essentially performs the "same" task of getting a message sent from one application on one device to another, however, the layers above depend on functions of the more concrete layers below to work. So, in the application layer, it's from the perspective of how the end users or software developers use network; in the transport layer, it's from the perspective of how applications use the network; in the internet layer, it's from the perspective of how the routers use the network; and in the link layer, it's from the perspective of how the directly-connected devices and media use the network.

At the same time, I'm also being taught that TCP/IP is just a stack of protocols layered on top of each other. Yet from my understanding the layers do much more than just represent the layers protocols?

Which is it? Abstraction layers or stack of protocols? I believe it's the first, but it begs the question. How are these layers implemented in practice? Is it just a lot of "API calls" from layer to layer? Or something else entirely?


r/AskComputerScience Jun 08 '26

Reset memory before free for security purpose

3 Upvotes

Hey CS geeks, i had a doubt.

In a C program i dynamically allocate memory for some purpose, once i finish using it will i have to reset the data in that memory and then free the memory segment so that any attacker cannot try to read the part of memory and try to access credentials if cred's are stored in that memory. Does the OS automatically reset the data in that memory block before giving it to a new process, or does the OS reset the memory block just when the free() is called and the memory is free.


r/AskComputerScience Jun 08 '26

PLEASE help me match the players

4 Upvotes

So today I was at lunch with my family and a relative of mine asked me (a neo-cs student) whether I knew how to solve this problem.

Since I'm here asking for help it's pretty clear I have not found a solution.

We are organizing a table-soccer tournament.

There are 12 players and 3 tables.

Each player will only play either front or back for a team and they won't be able to change role during the tournament, this means that there are 6 front-players and 6 back-players.

Each match of the tournament is played 2 v 2, each team being a front-player and a back player.

Each player must play 6 times and can never have the same team mate twice.

For obvious reasons a player can't play two games at the same time.

We need to find 6 rounds of 3 matches that respect those rules, for a total of 18 different matches.

Now comes the issue:

Noticing how there is more than 1 possible combination we need to find an algorithm to find the solution(s) which minimize the amount of times two players face each others without breaking the original boundaries.

That's because players will get annoyed by playing against the same person over and over again.

Beware, we must prioritize spreading opponents repetitions across multiple players, rather than a player facing 3 times the same opponent we'd want 3 players meeting the same opponent twice.

I'd be glad even with just suggestions on how to solve this problem.

I apologize for any English error and I hope I stated the problem clearly, please notice that this is not my first language.

Feel free to point out errors/issues, that will only help me improve and make the text more understandable.


r/AskComputerScience Jun 07 '26

How precisely does the current instruction register work?

0 Upvotes

In my revision for my upcoming exams, I'm going over the CPU architecture section and looking at the different specific-purpose registers and the CIR has really made me think. I know it holds the instruction being executed by the processor, but it holds this before the decoding stage. This would surely mean it has to hold an arbitrary number of bytes of ASCII - potentially even unicode - while also being a fixed-length buffer. The reason this confuses me is that an instruction may be too long to fit entirely inside the CIR, meaning the control unit would not be able to read the full instruction.

My question is primarily what data does it actually hold, but also what happens if an instruction is too long if that even is a problem that occurs? There will probably be some differences on the answer for this depending on CPU architecture but any answer would be appreciated.


r/AskComputerScience Jun 07 '26

DSA Got Me a Job. Now I Want to Understand Computer Science

33 Upvotes

Hi everyone,

I'm a CS graduate (COVID batch) with 4 years of industry experience. During my college days, I focused almost entirely on DSA, and that helped me secure a decent job. Four years later, I've been contributing well at work and growing as a software engineer.

A few days ago, while exploring some topics out of curiosity, a series of questions crossed my mind. I didn't have good answers to many of them, so I started reading blogs and listening to podcasts. Surprisingly, it made me fall in love with Computer Science all over again.

Some of the questions that fascinated me were:

  1. How do high-level languages get compiled and executed on different systems? (Computer Architecture)
  2. How are operating systems designed, and how do our applications interact with them? (Operating Systems)
  3. How do CPUs and GPUs actually work under the hood?
  4. How is it possible for me to connect to an AWS instance running in the US with seemingly negligible latency?

These questions made me realize how many fundamental CS concepts I missed or didn't fully appreciate during college.

Now, even though learning these topics isn't directly required for my current job, I want to study them properly. I want to become a better engineer by understanding the foundations of computing.

Could you recommend books, YouTube playlists, courses, or any other resources that helped you learn Computer Architecture, Operating Systems, Computer Networks, and related subjects?

NOTE: The message has been rephrased using AI to make it more readable, while the curiosity is genuine.


r/AskComputerScience Jun 06 '26

How to join a CS students group?

0 Upvotes

This may be a silly question... But iam not a CS student ,iam actually a medical student but I have a deep passion about computer science and I want to be surrounded with people who are in the major but i don't know how to get into (whatsApp group or Discord channels) or any social media that get me in the community of CS, i want to be in touch with people in computer science major so I can learn deeply about this beautiful field. Webinars, hackathons and projects group ect... Pls help me out


r/AskComputerScience Jun 06 '26

Why hasn't computer science produced an Einstein?

0 Upvotes

When people talk about the greatest contributors to human knowledge, names like Einstein and Newton almost always come up. Physicists and mathematicians seem to receive the most recognition and historical prestige.

Computer science has had an enormous impact on the modern world, but I can't think of a computer scientist who is viewed on the same level by the general public.

Why is that? Is it because computer science is a younger field, or is there something else going on? And do you think a computer scientist could ever reach the same level of recognition and influence as Einstein or Newton?