←back to thread

136 points d-yoda | 1 comments | | HN request time: 0.21s | source

Hi HN! I built pyscn for Python developers in the vibe coding era. If you're using Cursor, Claude, or ChatGPT to ship Python code fast, you know the feeling: features work, tests pass, but the codebase feels... messy.

Common vibe coding artifacts:

• Code duplication (from copy-pasted snippets)

• Dead code from quick iterations

• Over-engineered solutions for simple problems

• Inconsistent patterns across modules

pyscn performs structural analysis:

• APTED tree edit distance + LSH

• Control-Flow Graph (CFG) analysis

• Coupling Between Objects (CBO)

• Cyclomatic Complexity

Try it without installation:

  uvx pyscn analyze .          # Using uv (fastest)
  pipx run pyscn analyze .     # Using pipx
  (Or install: pip install pyscn)
Built with Go + tree-sitter. Happy to dive into the implementation details!
Show context
CuriouslyC ◴[] No.45482404[source]
I'm surprised you went with go for this, you're going to encounter so much pain with large codebases.
replies(1): >>45482545 #
dangoor ◴[] No.45482545[source]
Curious why you say this. It says in the readme it can do 100K lines per second.
replies(3): >>45482575 #>>45482599 #>>45485435 #
CuriouslyC ◴[] No.45482599[source]
The SIMD story in Rust or another lower level systems language is much better, and the memory control is more fine grained without forfeiting inlining. For a hot loop that's amenable to SIMD, Rust can deliver twice the performance of Go if you don't hand roll platform specific code.
replies(1): >>45482804 #
1. d-yoda ◴[] No.45482804[source]
Rust is definitely the king of performance! I personally love Go, but Rust's performance is truly impressive.