Hacker Newsnew | past | comments | ask | show | jobs | submit | micahscopes's commentslogin

It makes me wince a little


This one was a huge success:

https://github.com/micahscopes/radix_immutable

I took an existing MIT licensed prefix tree crate and had Claude+Gemini rewrite it to support immutable quickly comparable views. The execution took about one day's work, following two or three weeks thinking about the problem part time. I scoured the prefix tree libraries available in rust, as well as the various existing immutable collections libraries and found that nothing like this existed. I wanted O(1) comparable views into a prefix tree. This implementation has decently comprehensive tests and benchmarks.

No code for the next two but definitely results...

Tabu search guided graph layout:

https://bsky.app/profile/micahscopes.bsky.social/post/3luh4d...

https://bsky.app/profile/micahscopes.bsky.social/post/3luh4s...

Fast Gaussian blue noise with wgpu:

https://bsky.app/profile/micahscopes.bsky.social/post/3ls3bz...

In both these examples, I leaned on Claude to set up the boilerplate, the GUI, etc, which gave me more mental budget for playing with the challenging aspects of the problem. For example, the tabu graph layout is inspired by several papers, but I was able to iterate really quickly with claude on new ideas from my own creative imagination with the problem. A few of them actually turned out really well.


With access to good MCP tools, I've had really good experience using claude code to write rust: https://news.ycombinator.com/item?id=44702820


What MCP tools are you using?


Honestly, it's mostly just some random LSP adapter I forked and fixed a few bugs on, and it's not even that comprehensive but it goes a long way and seems most essential. Then I have some notes in the long term context about how to use a combination of gh CLI and cargo docs to read documentation and dependency source code/examples.

A few things beyond your question, for anyone curious:

I've also poked around with a custom MCP server that attempts to teach the LLM how to use ast-grep, but that didn't really work as hoped. It helps sometimes but my next shot on that project will be to rely on GritQL. Smaller LLMs stumble over the YAML indentation. GritQL is more like a template language for AST aware code transformations.

Lastly, there are probably a lot of little things in my long term context that help get into a successful flow. I wouldn't be surprised if a key difference between getting good results and getting bad results with these agentic LLM tools is how people are reacting to failures. If a failure makes you immediately throw up your hands and give up, you're not doing it right. If instead you press the little '#' (in claude code) and enter some instructions to the long term context memory, you'll get results. It's about persistence and really learning to understand these things as tools.


Interesting, so an LSP MCP like this?: https://github.com/isaacphi/mcp-language-server

Also interesting note on the docs, though, Claude does try to use cargo doc by itself sometimes.

I was actually wondering why GritQL did not have an MCP, this seems like a natural fit. Would be interested to know if this works for you.

I'm always a bit hesitant to add things to the long term context as it feels very finicky to not have it be ignored and having more seems to make it more likely to be ignored. Instead I usually just repeat myself.

Thank you for the answer, seems there is still lots of things to try.


No code to share yet, but results nonetheless.

Tabu search guided graph layout:

https://bsky.app/profile/micahscopes.bsky.social/post/3luh4s...

https://bsky.app/profile/micahscopes.bsky.social/post/3luh4d...

Fast Gaussian blue noise with wgpu:

https://bsky.app/profile/micahscopes.bsky.social/post/3ls3bz...

In both these examples, I leaned on Claude to set up the boilerplate, the GUI, etc, which gave me more mental budget for playing with the challenging aspects of the problem. For example, the tabu graph layout is inspired by several papers, but I was able to iterate really quickly with claude on new ideas from my own creative imagination with the problem. A few of them actually turned out really well.

Sometimes I'll admit that I do treat Claude like a slot machine, just shooting for luck. But in the end that's more trouble than it's worth.

The most fruitful approach is to maintain a solid understanding of what's happening and guide it the whole way. Ask it to prove that it's doing what it says it's doing by writing tests and using debug statements. Channel it toward double checking its own work. Challenge it.

Another thing that worked really well the other day was to use Claude to rewrite some old JavaScript libraries I hand wrote a few years ago in rust. Those kinds of things aren't slot machine problems. Claude code nails that kind of thing consistently.

Ah, one more huge success with code: https://github.com/micahscopes/radix_immutable

I took an existing MIT licensed prefix tree crate and had Claude+Gemini rewrite it to support immutable quickly comparable views. In about one day's work. I scoured the prefix tree libraries available in rust, as well as the various existing immutable collections libraries and found that nothing like this existed. This implementation has decently comprehensive tests and benchmarks.

One more I'll share, an embarrassing failure: https://github.com/micahscopes/splice-weaver-mcp

I used vibe kanban like a slot machine and ended up with a messy MCP server that doesn't really do anything useful that I can tell. Mostly because I didn't have a clear vision when I went into it.


I worked on the sound effects and music for the game Wilderplace and used WebDX7 for all of the sound (everything but some sculpted white noise for rain as DX7 doesn't offer pure noise or filters). All the sequencing/synthesis happens real-time in the game. DX7 was crazy fun to work with, like working with clay or something...

DX7 patches have this way of layering with each other that feels both clear and warm at the same time. They don't accumulate mud in the same way that sample-based instruments do. They do have this challenge of accumulating digital-sounding cruft, but I think this is part of their gritty, organic beauty.

Okay but that said I'd love to experience a stereo GPU-based FM synth with high dynamic range and a fully configurable operator graph.


I recently used it (in combination with copilot) to help me implement weighted, blended, order-independent transparency for a network visualization project I'm working on... in just one long evening.

Only to realize in the process that all I really needed was to modify the shader program's depth checking behavior. Even just disabling it altogether looks fine and makes everything way faster. Never in my wildest imagination a year ago would I even dream of implementing WBOIT in one night and then just leaving it in a branch for a one line change.

In the process I realized a little trick on my own, using what I learned, that modifying the depth values in the fragment shader could allow selective alpha-blending/occlusion. Basically the idea was to put stuff I wanted to blend order-independently all at an equal z position and then set the depth function to "less than or equal" instead of "less than". I used the occluding geometry's depth buffer as a source to modify the translucent stuff's depth buffer in the fragment shader (with a slight offset to get it behind the occluding stuff).

There's absolutely no way I'd have had the guts to try all that in one night without the robot tools.


That’s what I’ve been using it for - unblocking my own mind. It almost never had the answer for me. But it breaks down my mental barrier. I’ve achieved more in the last three months than three years for this reason alone.


Okay wow, it's fun and surreal to see code you're working on pop up in the comment section unexpectedly right in front of your eyes :D

I've been helping Santi on this wiki application and we've actually been dreaming about how nice it'd be to eventually have some kind of schema language for defining Hyper Hyper Space types. In the current version of HHS, data types are fully defined via TypeScript classes, and constraints like that are implemented via the validation method you discovered. If that method returns false, the data won't even be stored or synced, let alone make it to the UI. So for now it's an open ended way of defining constraints, making it easier to explore and experiment. Many of the core HHS data types have constraints built into them too, enforced via the validate method. For example, the CausalSet type can be made to only allow certain elements as members.

Anyway there are a few reasons I can see that it'd be amazing to have something more like JSON Schema. One is that it'd just clarify using these data types outside of TypeScript, and ideally they'd be more succinct to read and write than TypeScript classes.

Another reason I'm especially curious about is the possibility of using it along with some kind of query system, which could potentially make a bunch of stuff easier both both in selecting data for applications and in implementing casual validation logic. Validating multiple interacting causal data types requires looking at chains of events in the DAG. Maybe being able to query for these chains could make this nicer?

All that to say, my guess is that the hardest part of moving to a succinct schema definition format would be how to deal with constraint/validation specification.

> I haven't found the underlying text or rich text CRDT implementation yet.

I think something like this in the works! Right now we're just using last write wins. We did experiment with using Y.js for realtime collaboration, but we ran into some complexity in reliably ensuring that the Y.js state could get persisted to the HHS data types without race conditions, so we took a step back from that idea.


I encourage you to follow up on the schema language plus a code generator. It’s a powerful technique that can make your implementation more agile as you develop new strategies.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: