frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Sem: New primitive for code understanding – not LSPs, but entities on top of Git

https://ataraxy-labs.github.io/sem/
26•rohanucla•3h ago

Comments

Animats•1h ago
Is this for checking what Claude Code just did to your repo?
rohanucla•1h ago
It can do that, but that's a small slice of what it does. sem parses your codebase into entities (functions, classes, methods) and builds a dependency graph across files.

So instead of line level analysis the whole granularity of seeing changes and tracking thing shifts to entities. It helps in attention mapping of your agent and lets you track the changes faster.

LSPs have been doing it for quite long but using treesitters is faster even tho type awareness is not great with this approach but overall working across multiple languages with a single tool can be quite helpful.

hankbond•1h ago
I am interested in subtle ways in which we can change how we write software to get better outcomes out of harnesses (model + tools + skills). I'm imagining that use of Sem will be more effective on code written in some shapes than others.

Can you describe what ways this might be beyond just breaking up code into smaller functions?

An example of this is that Models tend to create unit tests that are mostly just mock + reimplementations of imperative code in the functions they test. If you could force behavioral testing by only allowing test creation agents to accessing the function docstring, name/args/types, branch statements and log events, you could potentially avoid these classes of weak tests being created. But that would mean that your code has to optimize to providing signal via those elements.

This is just an example I'm not sure that would actually work.

hankbond•46m ago
Also I keep seeing solutions in this space that are doing inheritance and call stack dependency linkage, but I haven't seen the same level of exploration into data lifetime dependency. Not lifetime in the way it exists in Rust (to my knowledge), but like including when you copy data and transform that copy. The motivation is "if I change this variable, enumerate all the areas that change would propagate to". The idea is similar, to evaluate blast radius of modifications. Ideally something like this could make refactoring more token efficient and consistent as well.

I don't know if you can reliably do that with static analysis tho. I would be interested in some sort of debug attachment like process that does a code coverage type evaluation. If you can't tell this is at least on the edge of (if not past) my depth of expertise

rohanucla•16m ago
This is a really interesting direction, you're essentially talking about data flow or taint analysis, where you track how a value propagates through copies and transformations rather than just following call edges. Honestly pure static analysis gets you partway there but it hits real limits once you run into dynamic dispatch, runtime branching, or serialization boundaries where data gets written somewhere and read back in a completely different part of the codebase.

We're on the structural side right now with call graphs and dependency edges, but a hybrid approach that combines the static graph with runtime instrumentation to fill in the gaps is definitely something I'd love to explore. Thanks for the feedback.

rohanucla•41m ago
What I've been more interested in lately is structural intelligence as a field in whole.

Things with LLMs break because our infra was always designed for analyzing lines(tools like grep fuzzy matching) and working on quite small sections of code. LLMs struggle with this in cases when they have to analyze different parts of a codebase they either get too much context where you're throwing whole files at them, or too little where they only see the function in isolation, with no real understanding of how the pieces actually connect to each other.

That's really the gap sem is trying to fill. With sem impact you can give an agent the precise blast radius of a change instead of guessing which files matter, and sem diff --patch lets you enforce that a change only touches specific functions and reject anything that bleeds outside that boundary something that's really hard to do with line-level diffs.

Your testing idea is actually closer than you might think. sem already extracts entity signatures, dependencies, and call graphs, so you could build a harness that gives the test-writing agent only the function signature with its dependency graph and behavioral contract, while withholding the implementation entirely. That would force the agent toward behavioral tests because it literally can't see the internals to mock them. I haven't built this harness myself yet but sem graph and sem inspect expose everything you'd need.

The general principle is that sem gives you a structural map of the codebase to both constrain and validate what the model produces, rather than treating code as flat text and hoping the model figures out the relationships on its own.

Another usecase can be about figuring out dead code present in the codebase.

Edit: Also one last thing because I started working on this while solving the fundamental issue of why merge conflicts were occuring with git, so you might also like the merge drive I open sourced on the same Github org - Weave

qudat•49m ago
I really like this idea and have been experimenting with it over a week or so.

I think there’s an opportunity to use an AST diff system for code forges where you don’t present the user with line diffs in the UI — or at least not as the first diff the user sees.

I firmly believe code review should happen in your editor.

rohanucla•35m ago
Really glad you've been using it, and yeah that's exactly the direction I've been thinking about. The line diff as the default view in code forges has always felt like an accident of history it definitely was easy to compute, but not what's actually useful for understanding what changed.
awoimbee•35m ago
The benchmarks aren't great, they're super specific to sem's output: why would I ask Claude how many "entities" were modified by a commit and do I need a tool specifically for this request ? Note that an "entity" is a sem-specific concept...
rohanucla•32m ago
Thanks for pointing it out. I agree with you here, my testing process was quite specific to sem's output but also would love any suggestion from you of how you would design the whole testing process for this kind of tool?

I can also give my thought process, because I was more interested in figuring out the model's inherent search results and understanding without sem.

andai•13m ago

  $ sem impact authenticateUser

  ⊕ function authenticateUser (src/auth/login.ts:26)

    → depends on:    db.findUser, rateLimiter.check
    ← used by:       loginRoute, authMiddleware
    ! 42 entities transitively affected
    ᛋ 7 tests affected
Okay that is pretty cool. I appreciate this information as a human also.

I got about halfway through reinventing something like this last year (minus the git part). I was trying to make a graph of dependencies in the codebase. (I actually got pretty far with a regex!)

rohanucla•10m ago
Ha, the regex approach is honestly how a lot of people start with this problem and you can get surprisingly far with it until you hit the edge cases around aliased imports, re-exports, and nested scopes where things start falling apart. That's basically why we went with tree-sitter under the hood it gives you the actual parse tree so you don't have to keep patching regex patterns for every new language construct.
docheinestages•3m ago
I doubt if this actually solves a real problem for humans or agents, especially in complex projects. It might help if the examples show scenarios where this tool and its commands could make a difference.

Ntsc-rs – open-source video emulation of analog TV and VHS artifacts

https://ntsc.rs/
212•gregsadetsky•4h ago•35 comments

Meta confirms 1000s of Instagram accounts were hacked by abusing its AI chatbot

https://this.weekinsecurity.com/meta-confirms-thousands-of-instagram-accounts-were-hacked-by-abus...
317•speckx•4h ago•112 comments

Zeroserve: A zero-config web server you can script with eBPF

https://su3.io/posts/introducing-zeroserve
172•losfair•8h ago•41 comments

Nvidia is proposing a beast of a CPU system for Windows PCs

https://twitter.com/lemire/status/2062880075117113739
217•tosh•10h ago•391 comments

Home alone: Remote work, isolation, and mental health

https://www.science.org/doi/10.1126/science.aec7671
94•speckx•3h ago•86 comments

What Columbus used instead of the North Star

https://signoregalilei.com/2026/05/24/what-columbus-used-instead-of-the-north-star/
14•surprisetalk•2d ago•1 comments

New U.S. college grads now have higher unemployment than the average worker

https://www.randalolson.com/2026/06/04/recent-grad-unemployment-flip/
97•davidbarker•2h ago•61 comments

You Can Run

https://magazine.atavist.com/2026/mccann-cocaine-fugitives
90•bryanrasmussen•7h ago•39 comments

Computex 2026: Are We Heading for the Agentic PC Era Yet?

https://www.eetimes.com/computex-2026-are-we-heading-for-the-agentic-pc-era-yet/
18•rbanffy•3h ago•17 comments

Sem: New primitive for code understanding – not LSPs, but entities on top of Git

https://ataraxy-labs.github.io/sem/
26•rohanucla•3h ago•13 comments

PyTorch Custom Operation

https://leimao.github.io/blog/PyTorch-Custom-Operation/
15•eigenBasis•5d ago•2 comments

Pokemon Emerald Ported to WebAssembly (100k FPS)

https://pokeemerald.com/
251•tripplyons•12h ago•68 comments

Show HN: Infinite canvas notes in the non-Euclidean Poincaré disk

https://uonr.github.io/poincake/
107•uonr•4d ago•18 comments

Pentagon raised threat of Israeli spying on U.S. to highest level, sources say

https://www.nbcnews.com/politics/national-security/pentagon-raised-threat-israeli-spying-us-highe...
346•MilnerRoute•5h ago•236 comments

Benchmarks in Leipzig

https://arxiv.org/abs/2606.05818
120•root-parent•9h ago•44 comments

Google to pay SpaceX $920M a month for compute capacity at xAI data centers

https://www.cnbc.com/2026/06/05/google-to-pay-spacex-920-million-a-month-for-xai-compute-capacity...
104•toephu2•1d ago•680 comments

Static Devirtualization of Themida

https://back.engineering/blog/09/05/2026/
15•homarp•4d ago•1 comments

Ask HN: What was your "oh shit" moment with GenAI?

530•andrehacker•1d ago•928 comments

Running Python code in a sandbox with MicroPython and WASM

https://simonwillison.net/2026/Jun/6/micropython-in-a-sandbox/
70•theanonymousone•9h ago•20 comments

WoofWare.PawPrint, a Deterministic .NET Runtime

https://www.patrickstevens.co.uk/posts/2026-06-04-announcing-woofware-pawprint/
47•Smaug123•2d ago•14 comments

S&P 500 rejects SpaceX, also blocking entry for OpenAI and Anthropic

https://arstechnica.com/tech-policy/2026/06/sp-500-blocks-fast-spacex-entry-wont-waive-rule-for-u...
1326•maltalex•18h ago•459 comments

Motorola effectively bricked its entire line of WiFi routers without explanation

https://mashable.com/tech/motorola-wifi-routers-stop-working-motosync-plus-app-down
34•thisislife2•8h ago•9 comments

Building Rust Procedural Macros from the Grounds Up

https://www.learnix-os.com/ch02-03-implementing-the-bitfields-proc-macro.html
79•Sagi21805•6d ago•15 comments

Summer of '85: DOSBOS is rejected by ANALOG Computing

https://www.goto10retro.com/p/summer-of-85-dosbos-is-rejected-by
48•ibobev•2d ago•11 comments

Mbodi AI (YC P25) Is Hiring Founding Machine Learning Engineer (Robotics)

https://www.ycombinator.com/companies/mbodi-ai/jobs/WYAcNkX-founding-machine-learning-engineer
1•chitianhao•11h ago

Ask HN: Why is the HN crowd so anti-AI?

351•Ekami•20h ago•596 comments

Trees to Flows and Back: Unifying Decision Trees and Diffusion Models

https://arxiv.org/abs/2605.00414
42•rsn243•10h ago•7 comments

The intracies of modern camera lens repair (2024)

https://salvagedcircuitry.com/sigma-45mm.html
239•transistor-man•22h ago•84 comments

Tribute to Jiro Yamada, Automotive Artist (1960-2025) [video]

https://www.youtube.com/watch?v=rJ2gQ5Md60U
41•NaOH•1d ago•4 comments

How LLMs work

https://www.0xkato.xyz/how-llms-actually-work/
834•0xkato•3d ago•228 comments