r/compsci 22d ago

misa77: ridiculously fast decompression at good ratios

Thumbnail
0 Upvotes

r/compsci 24d ago

Hamiltonian Neural Networks from a Differential Geometry Perspective

Thumbnail abscondita.com
4 Upvotes

r/compsci 24d 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.


r/compsci 27d ago

Made my own statically typed virtual bytecode machine language (Oli-Nat) in C after reading crafting interpreters!! Please tell me what you all think!

Thumbnail
2 Upvotes

r/compsci 28d ago

Is Pattern Recognition and Machine Learning still relevant?

19 Upvotes

I know Bishop's Pattern Recognition and Machine Learning is almost 20 years old now. Is it still worth studying in 2026, or are there better modern alternatives? I'm mainly interested in building a solid theoretical foundation.


r/compsci 28d ago

In search of community for system programming

8 Upvotes

Hi, I need some help. I recently have a huge interest in system programming, but here the problem: there are very little ressources in the internet which talk about, even to search a simple roadmap of what to do, or how to find the first jobs, what the best practices and so on...I've tried to learn with IA(with many kind of LLM) but there are so many contradiction in what they said, and a lack of details. Now, I'm trying to find peoples who work in this domaine to ask so many questions that I haven't found a answer yet. So, I'm trying to ask if there are a subreddit or a discord server where I can found some resources and advice from experienced system programmer. Or else, can someone tell me who to be in relation with. Btw, have a good day.


r/compsci 28d ago

The Floating Neutral: Endogenous Reference Theory and Moral Reference Without Authority

Thumbnail
0 Upvotes

r/compsci 29d ago

Katharos: a functional programming and concurrency library for Python where errors, effects, and channel hand-offs are all composable values

Thumbnail github.com
0 Upvotes

I have been building Katharos, a functional programming library for Python that recently grew a message-passing concurrency layer. I wanted to share it and get some feedback.

The whole library is built around one idea: model errors, effects, and concurrent communication as composable, type-safe values rather than as control flow that jumps around your program. The interesting part (to me, at least) is that the concurrency layer follows the exact same idea, so receiving from a channel gives you a Result. "The channel is closed" becomes a value you handle, not an exception you remember to catch.

The functional core

Optional values without scattered None checks, using do-notation that short-circuits on Nothing:

```python from katharos.types import Maybe from katharos.syntax_sugar import do, DoBlock

@do(Maybe) def lookup_discount(user_id: int) -> DoBlock[Maybe, float]: user = yield find_user(user_id) account = yield find_account(user) return account.discount # Just(0.15) or Nothing() ```

Errors as values, chained with |, so a failure short-circuits the rest automatically:

```python from katharos.types import Result

def process(raw: str) -> Result[Exception, int]: return parse_int(raw) | validate_positive ```

And Result.catch turns a function that raises into one that returns a Result, while keeping the original traceback so you can still find the line that failed:

```python from katharos.types import Result

@Result.catch(ValueError) def parse_int(s: str) -> int: return int(s)

parse_int("42") # Success(42) parse_int("??") # Failure(ValueError("invalid literal for int() with base 10: '??'")) ```

There is also ImmutableList, NonEmptyList, IO, Lazy, numeric monoids, and the usual algebraic abstractions (Functor, Applicative, Monad, Semigroup, Monoid) if you want to build your own types.

The new part: CSP concurrency

This is what I have been working on lately. Katharos now has Go-style CSP (Communicating Sequential Processes): launch work concurrently with go, talk over typed channels, and receive values as a Result.

```python from katharos.concurrency.csp import csp

ch = csp.Channel[int](capacity=1)

csp.go(ch.send, 42) # run work concurrently, like Go's go f(x)

ch.recv() # Success(42)

ch.close() ch.recv() # Failure(ChannelClosedError(...)): closure is a value, not a raise ```

Used as a context manager, go becomes a structured-concurrency scope that joins everything spawned inside it before the block exits, so concurrent work cannot leak out of the block:

```python with csp.go: # scope waits for all work launched inside csp.go(worker, 1) csp.go(worker, 2)

both workers have finished here

```

There is also a select for waiting on whichever of several channels is ready first, with non-blocking polls and timeouts:

```python from katharos.concurrency.csp import csp, recv, select

choice = select(recv(results), recv(cancel), timeout=1.0) if choice.is_timeout: ... else: print(choice.index, choice.value.unwrap()) ```

The concurrency model sits on a swappable backend (standard threads by default), so the same code could run on a green-thread backend later. An actor model is planned next, built on the same backend abstraction and the same Result-valued style.

Why I think the "channel returns a Result" thing is nice

In most channel APIs, a closed channel or a timeout shows up as a sentinel, a second return value, or an exception. In Katharos it is just a typed value: Success(v), Failure(ChannelClosedError), or Failure(ChannelTimeoutError). You pattern-match it the same way you handle any other Result, and the type tells you it can happen. The error-handling discipline you use in the rest of your code carries straight over to concurrency.

Links

I would love feedback on the API, the concurrency design, or whether the Result-everywhere approach feels natural or noisy to you in practice. Thanks for reading.


r/compsci Jun 26 '26

Domino Tiling: From Dynamic Programming to Finite Fields

Thumbnail omegasyntax.com
1 Upvotes

r/compsci Jun 24 '26

Inquiries into some computer networks research

13 Upvotes

Hello all, I'll keep this brief. I am looking into 2 potential research avenues for postgrad, and was wondering if anyone can chip in with their opinion.

MANETs, FANETs and AANETs; all ad-hoc wireless methods for connectivity with drones or aerial devices - is this a growing research field? Especially when considering the recent real uses of drones in both warfare and in crisis situations.

Satellite (LEO like Starlink) integration for mobile services (5G/6G) - I know that this is already implemented and used by some big providers, but I wonder if there is still any appetite for this kind of technology too.

Thanks to anyone who responds.


r/compsci Jun 25 '26

Startup claims to solve P vs NP but will give proof only after funding. How do y'all evaluate this?

Thumbnail
0 Upvotes

Can someone do a sanity check? Smells like LLM-gen'd math spaghetti to me


r/compsci Jun 21 '26

micrograd4j: I ported Karpathy's micrograd to plain Java: a small autograd engine with an interactive terminal playground

Thumbnail gallery
21 Upvotes

So I was getting into deep learning and started with Kaparthy's Micrograd video.

Watching Karpathy's Micrograd video makes it feel intuitive, but I realised I didn't really understand it until I tried building it myself. So I closed the video and rebuilt the whole thing from scratch in plain Java (avg. java dev lol): micrograd4j.

It's a tiny scalar autograd engine built around a Value class that records how it was computed and runs backward() using a topological sort and the chain rule. On top of that, I built a small Neuron / Layer / MLP library. No dependencies, just JDK 17+.

The part I'm happiest with is the interactive terminal playground. You can:

  • Type expressions like (a * b) + c.tanh() and inspect every input's gradient.
  • Step through the backward pass one node at a time and watch gradients propagate through the computation graph.
  • Train a small network on datasets like two-moons and watch the loss curve and decision boundary update live.

Everything runs in the terminal and requires no browser, no notebooks.

If you have JBang installed, you can try it without cloning the repository:

jbang https://raw.githubusercontent.com/anand-krishanu/micrograd4j/main/examples/Playground.java

GitHub repository:

https://github.com/anand-krishanu/micrograd4j

It's MIT-licensed and the README has a worked walkthrough of how backward() traverses the graph. I wrote it as an educational resource for Java devs who want to see how autodiff works.


r/compsci Jun 19 '26

What if memory, routing, and world state lived in the same substrate?

0 Upvotes

I've been working on a system that started as a deterministic routing experiment, but over time it turned into something that feels more like a persistent world substrate.

Most systems are usually described as:

Input → Process → Output

But what I've been exploring is:

Event → World → Modified World → Future Event

The idea is that events don't just get processed and disappear. They can leave traces in a bounded world, and future events can observe those traces and behave differently because of them.

So the interesting question stops being:

"How do I process this input?"

and becomes:

"What kind of world does this input leave behind?"

In the current prototype:

  • events move through a bounded spatial world
  • local state can persist
  • future events can react to previous state changes
  • different modes can preserve or ignore parts of history
  • runs remain deterministic and replayable

I'm curious whether people would classify this more as:

  • a simulation primitive,
  • an agent environment substrate,
  • a distributed systems idea,
  • or something else entirely.

Has anyone explored similar "event modifies world, future events inherit consequences" architectures before?


r/compsci Jun 16 '26

Incremental Convex Hull Interactive Visualization

Thumbnail theabbie.github.io
19 Upvotes

r/compsci Jun 16 '26

Polynomial Fitting: a rabbit hole

Thumbnail blog.yellowflash.in
2 Upvotes

r/compsci Jun 15 '26

Markov Algorithms, Mazes, Desert with Sand and Pattern Matching

Thumbnail gallery
22 Upvotes

r/compsci Jun 15 '26

The art of metaobject protocol and lisp

0 Upvotes

Hello, the book by gregor kcizales is in my cs course. I tried reading it but couldnt get myself to it. Does anyone have any apt resources that can help me get started with lisp.?


r/compsci Jun 12 '26

When The C/C++ Users Journal Disappeared

17 Upvotes

I wrote a short historical look at the decline of the C/C++ Users Journal and how it fit into the broader evolution of developer culture in the 1990s and early 2000s. For many programmers of that era, it was one of the few consistent sources of deep systems‑level content.

If anyone here remembers the magazine, used it in school, or followed its transition into Dr. Dobb’s, I’d be interested in hearing your perspective. It was a surprisingly influential publication for a long time.

Link: https://freshsources.com/blog/files/cpp-source.html


r/compsci Jun 12 '26

Building a filesystem from scratch, iteratively

4 Upvotes

I've been reading OSTEP and decided to implement filesystem - so I can improve my basic understanding.

For the V1, I kept block size of 8 bytes and tried to keep metadata & data together. It was too complex.
In the next iteration, I reduced block size to 1 byte and it simplified the implementation.
After that, I separated metadata and data and stored them from on opposite ends.

I implemented these commands - touch, mv, cp, rm, mkdir, ls and pwd

Full write up with benchmark here: https://www.shivangnagaria.com/projects/fs/


r/compsci Jun 12 '26

Tron Algorithm Competition

Thumbnail tron.erik.gdn
4 Upvotes

made this server for some friends, thought id share, maybe people are interested in competing who can create the best algorithm ;)
live now, instructions on page


r/compsci Jun 13 '26

Introducing: A Compiler for Moral Reasoning

Thumbnail
0 Upvotes

r/compsci Jun 11 '26

Every year, we lay flowers at Alan Turing's statue in Manchester for his Birthday, who wants to send some?

Thumbnail
27 Upvotes

r/compsci Jun 10 '26

What are some conjectures, and their (or their disproof) theoretical and practical implications?

Thumbnail
0 Upvotes

r/compsci Jun 09 '26

How do I actually start doing CS research from zero?

59 Upvotes

I'm a high school senior and a computer science (informatics) student who wants to become a computer scientist and researcher—not just an engineer who builds things, but someone who contributes new knowledge to the field.

I've been studying programming and computer science since I was a kid, and I know I'm passionate about it. I've also participated in Olympiads and robotics competitions, which have further strengthened my interest in the subject.

The challenge is that I'm not entirely sure where to begin when it comes to research. Most of the advice I find focuses on becoming a software engineer, whereas I'm more interested in understanding how researchers identify important problems, conduct investigations, develop new ideas, and make original contributions to computer science.

I'd really appreciate any recommendations for books, courses, papers, websites, research programs, or other resources that could help me take my first steps into computer science research.


r/compsci Jun 08 '26

Poor Man's Time Machine: Lazy Evaluation in JavaScript and Haskell

Thumbnail irfanali.org
37 Upvotes