HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
rafal-qa
slopo
Python2026–2026
rafal-qa / slopo

slopo

Embedding-based discovery of duplicated logic for projects too large or messy to maintain reliably

2Distinct people
5Mentions
0Explicit recommenders
830GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Embedding-based discovery of duplicated logic for projects too large or messy to maintain reliably

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by 3-hour interval5 dated mentions

Observed mentions: 2026-07-02 14:19:24 UTC to 2026-07-04 09:45:58 UTC.

0122026-07-02 12:00:00 UTC to 2026-07-02 15:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsJul 2, 12:002026-07-02 15:00:00 UTC to 2026-07-02 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-02 18:00:00 UTC to 2026-07-02 21:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2026-07-02 21:00:00 UTC to 2026-07-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-03 00:00:00 UTC to 2026-07-03 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-03 03:00:00 UTC to 2026-07-03 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-03 06:00:00 UTC to 2026-07-03 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-03 09:00:00 UTC to 2026-07-03 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJul 3, 09:002026-07-03 12:00:00 UTC to 2026-07-03 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-03 15:00:00 UTC to 2026-07-03 18:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-07-03 18:00:00 UTC to 2026-07-03 21:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-03 21:00:00 UTC to 2026-07-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-04 00:00:00 UTC to 2026-07-04 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-04 03:00:00 UTC to 2026-07-04 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-04 06:00:00 UTC to 2026-07-04 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-04 09:00:00 UTC to 2026-07-04 12:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJul 4, 09:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jul 2, 12:002026-07-02 12:00:00 UTC2026-07-02 15:00:00 UTC110
Jul 2, 15:002026-07-02 15:00:00 UTC2026-07-02 18:00:00 UTC000
Jul 2, 18:002026-07-02 18:00:00 UTC2026-07-02 21:00:00 UTC202
Jul 2, 21:002026-07-02 21:00:00 UTC2026-07-03 00:00:00 UTC000
Jul 3, 00:002026-07-03 00:00:00 UTC2026-07-03 03:00:00 UTC000
Jul 3, 03:002026-07-03 03:00:00 UTC2026-07-03 06:00:00 UTC000
Jul 3, 06:002026-07-03 06:00:00 UTC2026-07-03 09:00:00 UTC000
Jul 3, 09:002026-07-03 09:00:00 UTC2026-07-03 12:00:00 UTC000
Jul 3, 12:002026-07-03 12:00:00 UTC2026-07-03 15:00:00 UTC000
Jul 3, 15:002026-07-03 15:00:00 UTC2026-07-03 18:00:00 UTC101
Jul 3, 18:002026-07-03 18:00:00 UTC2026-07-03 21:00:00 UTC000
Jul 3, 21:002026-07-03 21:00:00 UTC2026-07-04 00:00:00 UTC000
Jul 4, 00:002026-07-04 00:00:00 UTC2026-07-04 03:00:00 UTC000
Jul 4, 03:002026-07-04 03:00:00 UTC2026-07-04 06:00:00 UTC000
Jul 4, 06:002026-07-04 06:00:00 UTC2026-07-04 09:00:00 UTC000
Jul 4, 09:002026-07-04 09:00:00 UTC2026-07-04 12:00:00 UTC101

What Hacker News says

5 sources
"Non-exact" may be interpreted in different ways, so let's look at the example report: https://github.com/rafal-qa/slopo/tree/main/doc/example-repo... * cluster-01.md has the highest similarity, and jscpd probably will detect this too. * cluster-10.md has the lowest similarity still above the threshold, and I don't think jscpd will detect this as clones. Because they are not clones, this is a false positive that needs to be discarded. But in other cases this kind of similar code may be worth acting on. I didn't compare with jscpd because I don't consider it a competition. Embedding-based duplication detection works differently, gives different results and has its own trade-offs.
In Show HN: CLI tool for detecting non-exact code duplication with embedding models
Slopo doesn't deduplicate. It only reports similar code units, which in most cases are not duplicates. This needs to be cleaned up by the user, which is fast and easy with coding agents. Embedding calculation is also outsourced externally: it's only a simple API call with a LiteLLM wrapper. "brute-force similarity search" and O(n^2) may sound scary, but it works fine and this is not a bottleneck. For large projects, other parts are much slower, which has room for improvement. [1] is an implementation you probably saw. It uses NumPy, spreads work across all CPU cores and there is also a split into blocks (block_size = 1000). In larger sets, all vectors are not loaded into memory at once. Where I need to be honest, I didn't measure actual memory usage. I just tested this on large repos, so I'm aware of bottlenecks. From my perspective, this
Read the rest
is the easiest part. Code extraction, chunking, applying boost, clustering, generating report and designing everything as a single user-friendly tool is a real challenge. Architectural and product decisions are more difficult than implementation and solving performance issues. [1] https://github.com/rafal-qa/slopo/blob/v0.3.0/src/slopo/anal...
In Show HN: CLI tool for detecting non-exact code duplication with embedding models
It looks like it works only on function bodies[1]. I'm not sure I understand why you would want to look at invoked callables code, though. Calling the same set of helper functions is already flagged; repeated code in helpers is flagged as well when those helpers are analyzed. Do you have a specific example where you'd like a function flagged as a duplicate based on the code it calls out to? [1] https://github.com/rafal-qa/slopo/blob/main/src/slopo/indexi...
In Show HN: CLI tool for detecting non-exact code duplication with embedding models
Correct me if I'm wrong, but looking at [1] it seems to be specifically using function definitions (I'm guessing this works with functions, methods, and lambdas (the "<unknown>" part)?) as units of repetition. If yes, that's fine, but I would seriously consider adding some settings to allow the user to control that granularity. Sometimes, the repeated code is a conditional branch within larger functions (i.e., "every else:" or "every except Ex:" looks the same). If the functions are large enough, the dissimilarity of the rest of the body would (probably?) cause such things to be missed. I would also consider - perhaps as a separate pass, with scoring set differently - to analyze comments (especially docstrings in Python). If I read the code correctly, you're currently just stripping them, which is the right thing to do when looking for co
Read the rest
de duplication, but duplicated docstrings are also often a signal that something is wrong in the codebase. The "different scoring" is because we expect docstring to be structured similarly (at least more than normal code), so some tweaking would be needed. Finally: very nice project, congrats! :) [1] https://github.com/rafal-qa/slopo/blob/main/src/slopo/indexi...
In Show HN: CLI tool for detecting non-exact code duplication with embedding models

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.