8 ms·
> I used Claude Code and Codex for the translation. This was human-directed, not autonomous code generation. I decided what to port, in what order, and what the
by skerit 8mo ago
> I used Claude Code and Codex for the translation. This was human-directed, not autonomous code generation. I decided what to port, in what order, and what the Rust code should look like. It was hundreds of small prompts, steering the agents where things needed to go. After the initial translation, I ran multiple passes of adversarial review, asking different models to analyze the code for mistakes and bad patterns.
> The requirement from the start was byte-for-byte identical output from both pipelines. The result was about 25,000 lines of Rust, and the entire port took about two weeks. The same work would have taken me multiple months to do by hand. We’ve verified that every AST produced by the Rust parser is identical to the C++ one, and all bytecode generated by the Rust compiler is identical to the C++ compiler’s output. Zero regressions across the board
This is the way. Coding assistants are also really great at porting from one language to the other, especially if you have existing tests.
- giancarlostoro 8mo agoThis is also how some of us use Claude despite what the haters say. You dont just go “build thing” you architect, review, refine, test and build.
- gnfargbl 8mo agoIt's how most of us are actually going to end up using AI agents for the foreseeable future, perhaps with increasing degrees of abstraction as we move to a teams-of-agents model. The industry hasn't come up with a simple meme-format term to explain this workflow pattern yet, so people aren't excited about it. But don't worry, we'll surely have a bullshit term for it soon, and managers everywhere will be excited. In the meantime, we can just continue doing work with these new tools.
- card_zero 8mo agoThis is an opportunity to select some stupid words that you would like to hear repeated a million times. The process is like patiently nurturing a well-contained thing, so how about "egg coding"?
- DANmode 8mo agoHow about “engineering”?
- mr_mitm 8mo agoI thought the term was "agentic engineering"
- simonw 8mo agoYeah that's the top contender at the moment. I think it's pretty good.
- giancarlostoro 8mo agoI like "spec driven development" but I honestly don't care what you call it, just let me build things and leave me alone. :)
- newswasboring 8mo agoSDD is more like a subset. There are different ways to manage context in agentic engineering
- giancarlostoro 8mo agoI guess, I just know I force my agent to use a ticketing system like Beads (I made my own).
- DANmode 8mo ago> SDD Don’t do that! On a two-day-old term?! No wonder we’re called gatekeepers.
- newswasboring 8mo agoOk jeez, calm down. I am not shouldering all of the AI discourse lol.
- DANmode 8mo ago^_^
- viraptor 8mo agoI'm not sure there's going to be a term, because there's no difference from normal, good quality engineering. You iterate on design, validate results, prioritise execution. It's just that you hand over the writing code part. It's as boring as it gets.
- giancarlostoro 8mo agoI havent quite dealt with "teams of agents" yet outside of Claude Code itself spawning subagents, but I have some ideas as to how to achieve it in a meaningful way without giving a developer 10 claude code licenses, I think the real approach that makes more sense to me is to still have humans in the loop, but have their respective agents sync together and divide work towards one goal, but being able to determine which tasks are left to be worked one and tested. I do think for the foreseeable future you will need human validation for AI.
- gf000 8mo agohttps://youtu.be/JV-wY5pxXLo?si=ga-9Gg8IZfU6g8Tg https://youtu.be/JV-wY5pxXLo?si=ga-9Gg8IZfU6g8Tg It's vibe engineering
- gnfargbl 8mo agoThis does not spark joy.
- latexr 8mo ago> how some of us Operative word being “some”. The issue is that too many aren’t doing it that way. > You dont just go “build thing” Tell that to the overwhelming majority of posters discussing vibe coding, including on HN.
- tonyedgecombe 8mo agoI suppose to some extent those people have always existed. The ones who would choose the most expedient solution. The difference now is they can get much further along.
- danielvaughn 8mo agoSure, but they're going to be stuck writing software for yesterday's problems. As our tools become more powerful, we're going to unlock new problems and expectations that would be impossible or impractical to solve with yesterday's tooling.
- coldtea 8mo ago>Sure, but they're going to be stuck writing software for yesterday's problems As long as they get paid for it (or have fun, if it's a personal project), they couldn't care less about that. Tomorrow's problems are overrated.
- philipallstar 8mo ago> despite what the haters say Thinking people who disagree with you hate you or hate the thing you like is a recipe for disaster. It's much better to not love or hate things like this, and instead just observe and come to useful, outcome-based conclusions.
- simonw 8mo agoLLMs really do attract haters in the classic sense though. You'll find them in almost every thread on here.
- jcgrillo 8mo agoThey also attract grifters, frauds, conmen, snake oil peddlers, and every stripe of bullshit artist. I'm someone you probably would view as a hater, but I truly don't hate LLMs. I hate the lies. Projects like this are interesting, I wish there was a lot more of this and a lot less of the "trust me bro" stuff.
- rstuart4133 8mo agoAt this point, I say it attracts LLM Luddites. I have a lot of sympathy for the Luddites after reading about the sudden loss of jobs and lifestyle, the new textile factories running roughshod over all sorts of ethical boundaries in pursuit of profit - like using child labour, and horrendous accident rates and working hours. It's sad in a way the Luddites weren't more successful than they were, as there were decades of harm inflicted by these newfangled ideas before the kinks were ironed out. But some of the blame for that must be laid at the Luddites' feet - they were focused on preserving the past, choosing to remain in denial about the inevitability of the wave of change crashing down on them. They left the job of ironing out the kinks to the workers in the factories that displaced them. With LLMs, we look be to taking the same broken path as the textile industry and its Luddites, sadly.
- giancarlostoro 8mo agoLook at any HN thread that has a project that uses AI in any way, shape or form. People quickly remark that it is slop, without even reviewing the code. If that's not blind hatred of AI, I don't know what is. There's a huge distinction between Vibe Coding, and actual software engineers using AI tooling effectively. I vibe code for fun sometimes too, nothing wrong with it, helps me figure out how the model behaves in some instances, and to push the limits of what I understand.
- embedding-shape 8mo agoAgree, and it's also such a shame that none of the AI companies actually focus on that way of using AI. All of them are moving into the direction of "less human involved and agents do more", while what I really want is better tooling for me to work closer with AI and be better at reviewing/steering it, and be more involved. I don't want "Fire one prompt and get somewhat working code", I want a UX tailored for long sessions with back and forth, letting me leverage my skills, rather than agents trying to emulate what I already can do myself. It was said a long time ago about computing in general, but more fitting than ever, "Augmenting the human intellect" is what we should aim for, not replacing the human intellect. IA ("Intelligence amplification") rather than AI. But I'm guessing the target market for such tools would be much smaller, basically would require you to already understand software development, and know what you want, while all AI companies seem to target non-developers wanting to build software now. It's no-code all over again essentially.
- dsr_ 8mo agoIs it any surprise that the cocaine cartels really want you to buy more cocaine, so they don't focus on its usefulness in pain relief and they refine it and cut it with the cheapest substances that will work rather than medical-grade reagents? Same thing.
- embedding-shape 8mo agoIt's surprising that the ones who are producing the cocaine, don't try to find the best use of the cocaine, yes. But then these are VC-fueled businesses, then it all goes out the window, unfortunately. Otherwise they'd actually focus on usefulness, not just "usage" or whatever KPI they go by and share with their investors.
- Barbing 8mo agoLLMs are drugs because they’re addictive and sap your abilities, is it? (or generally: “Is the cocaine cartel comparison fair or unfair?”)
- 8mo ago
- otikik 8mo agoI am learning rust myself and one of the things I definetly didn't want to do was let Claude write all the code. But I needed guidance. I decided to create a Claude skill called "teach". When I enable it, Claude never writes any code. It just gives me hints - progressively more detailed if I am stuck. Then it reviews what I write. I am finding it very satisfying to work this way - Rust in particular is a language where there's little space to "wing it". Most language features are interlaced with each other and having an LLM supporting me helps a lot. "Let's not declare a type for this right now, we would have to deal with several lifetime issues, let's add a note to the plan and revisit this later".
- deleted 8mo ago[deleted]
- philipportner 8mo agoFYI: Claude has output styles, one of them is called `learning`. Instead of writing the code itself, it will add `TODO(human)` and comments to explain how to. Also adds `Insights` explaining concepts to you in its output. This link also has a comparison to Skills further down. https://code.claude.com/docs/en/output-styles#built-in-output-styles https://code.claude.com/docs/en/output-styles#built-in-outpu...
- nu11ptr 8mo agoQuite good. I ported my codebase from Go to Rust in a fraction of the time it would have taken me to rewrite it.
- patates 8mo ago> Coding assistants are also really great at porting from one language to the other I had a broken, one-off Perl script, a relic from the days when everyone thought Drupal was the future (long time ago). It was originally designed to migrate a site from an unmaintained internal CMS to Drupal. The CMS was ancient and it only ran in a VM for "look what we built a million years ago" purposes (I even had written permission from my ex-employer to keep that thing). Just for a laugh, I fed this mess of undeclared dependencies and missing logic into Claude and told it to port the whole thing to Rust. It spent 80 minutes researching Drupal and coding, then "one-shotted" a functional import tool. Not only did it mirror the original design and module structure, but it also implemented several custom plugins based on hints it found in my old code comments. It burned through a mountain of tokens, but 10/10 - would generate tens of thousands of lines of useless code again. The Epilogue: That site has since been ported to WordPress, then ProcessWire, then rebuilt as a Node.js app. Word on the street is that some poor souls are currently trying to port it to Next.js.
- josephg 8mo ago> 10/10 - would generate tens of thousands of lines of useless code again. Me too! A couple days ago I gave claude the JMAP spec and asked it to write a JMAP based webmail client in rust from scratch. And it did! It burned a mountain of tokens, and its got more than a few bugs. But now I've got my very own email client, powered by the stalwart email server. The rust code compiles into a 2mb wasm bundle that does everything client side. Its somehow insanely fast. Honestly, its the fastest email client I've ever used by far. Everything feels instant. I don't need my own email client, but I have one now. So unnecessary, and yet strangely fun. Its quite a testament to JMAP that you can feed the RFC into claude and get a janky client out. I wonder what semi-useless junk I should get it to make next? I bet it wouldn't do as good a job with IMAP, but maybe if I let it use an IMAP library someone's already made? Might be worth a try!
- metabeard 8mo agoPlease post this. I'd love to play with it and, especially, see how fast it is.
- polyterative 8mo agoI am having immense success with the latest models developing a personal project that I open sourced and then got burned off by.I can't write anymore by hands but I do enjoy writing prompts with my voice.I have been shipping the best code the project has ever seen.The revolution is real.
- staticassertion 8mo agoI had a script in another language. It was node, took up >200MB of RAM that I wanted back. "claude, rewrite this in rust". 192MB of memory returned to me.
- zozbot234 8mo agoSolving the big RAM shortage one prompt at a time.
- ricardobeat 8mo agoThis is sad to see. Node was originally one of the memory efficient options – it’s roots are solving the c10k problem. Mind sharing what libraries/frameworks you were using?
- staticassertion 8mo agoIt was an express server. I don't think c10k is particularly interesting since it mostly just involves having cooperating scheduling. Doesn't really impact flat memory overhead etc. I mean, the binary for node alone, without any libraries etc, is larger than the produced rust binary.
- ricardobeat 8mo agoBefore Node/libuv holding open connections was really expensive resource-wise, dropping that cost to <30KB per connection was massive. The node binary is huge due to inclusion of i18n libraries to support the native APIs, and should have little impact on memory consumption. There is a way to opt out.
- shakow 8mo ago> it’s roots are solving the c10k problem The C10K was a long-solved problem when Node came out; just it was not for what 99% of people used at the time, i.e. PHP/Python/Ruby.
- vunderba 8mo agoI used to have a bunch of bespoke node express server utilities that I liked to keep running in the background to have access to throughout the day but 40-50mb per process adds up quickly. I’ve been throwing codex at them and now they’ve all been rewritten in Go - cut down to about 10mb per process.
- codegladiator 8mo ago> This was human-directed, not autonomous code generation. All my vibe coded projects are human directed, unless explicitly stated otherwise
- Aurornis 8mo agoCoding assistants are great at pattern matching and pattern following. This is why it’s a good idea to point them at any examples or demos that come with the libraries you want to use, too.
- bee_rider 8mo agoI haven’t done a ton of porting. And when I did, it was more like a reimplementation. > We’ve verified that every AST produced by the Rust parser is identical to the C++ one, and all bytecode generated by the Rust compiler is identical to the C++ compiler’s output. Is this a conventional goal? It seems like quite an achievement.
- tinco 8mo agoMy company helps companies do migrations using LLM agents and rigid validations, and it is not a surprising goal. Of course most projects are not as clean as a compiler is in terms of their inputs and outputs, but our pitch to customers is that we aim to do bug-for-bug compatible migrations. Porting a project from PHP7 to PHP8, you'd want the exact same SQL statements to be sent to the server for your test suite, or at least be able to explain the differences. Porting AngularJS to Vue, you'd want the same backend requests, etc..
- adw 8mo agoIt’s a very good way of getting LLMs to work autonomously for a long time; give it a spec and a complete test suite, shut the door; and ask it to call you when all the tests pass.
- dwood_dev 8mo agoI had a bash spaghetti code script that I wrote a few years ago to handle TLS certificates(generate CSRs, bundle up trust chains, match keys to certs, etc). It was fragile, slow, extremely dependent on specific versions of OpenSSL, etc. I used Claude to rewrite it in golang and extend its features. Now I have tests, automatic AIA chain walking, support for all the DER and JKS formats, and it’s fast. My bash script could spend a few minutes churning through a folder with certs and keys, my golang version does a few thousand in a second. So I basically built a limited version of OpenSSL with better ergonomics and a lot of magic under the hood because you don’t have to specify input formats at all. I wasn’t constrained by things like backwards compatibility and interface stability, which let me make something much nicer to use. I even was able to build a wasm version so it can run in the browser. All this from someone that is not a great coder. Don’t worry, I’m explicitly not rolling my own crypto.
- hsaliak 8mo agoThis is the way. This exact workflow is my sweet spot. In my coding agent std::slop I've optimized for this workflow https://github.com/hsaliak/std_slop/blob/main/docs/mail_model.md https://github.com/hsaliak/std_slop/blob/main/docs/mail_mode... basically the idea is that you are the 'maintainer' and you get bisect safe, git patches that you review (or ask a code reviewer skill or another agent to review). Any change re-rolls the whole stack. Git already supports such a flow and I added it to the agent. A simple markdown skill does not work because it 'forgets'. A 'github' based PR flow felt too externally dependent. This workflow is enforced by a 'patcher' skill, and once that's active, tools do not work unless they follow the enforced flow. I think a lot of people are going to feel comfortable using agents this way rather than going full blast. I do all my development this way.
- tarasglek 8mo agoyour patch queue approach is very clever. Solves a huge tech debt poblem with llm code gen. Should work with jujitsu too probably. Would be curious to see more about how you save tokens with lua too. Do you blog?
- hsaliak 8mo agoThanks for your interest in this work - I do not blog(maybe I should?) but i have posted a bit more on X about this work. - A bit more on mail mode https://x.com/hsaliak/status/2020022329154420830 https://x.com/hsaliak/status/2020022329154420830 - on the Lua integration https://x.com/hsaliak/status/2022911468262350976 https://x.com/hsaliak/status/2022911468262350976 (I've since disabled the recursion, not every code file is long and it seems simpler to not do it), but the rest of it is still there - hotwords for skill activation https://x.com/hsaliak/status/2024322170353037788 https://x.com/hsaliak/status/2024322170353037788 Also /review and /feedback. /feedback (the non code version) opens up the LLM's last response in an editor so you can give line by line comments. Inspired by "not top posting" from mailing lists.
- tarasglek 8mo agoI quit x so cant read beyond toplevel links. I subscribed to your tool on github, would appreciate blog-posts-in-release notes to keep up with future developments. Will try the tool. Rare to find something new among ai hype, thank you.
- scuff3d 8mo agoWe keep seeing this pattern over and over as well. Despite LLM companies' almost tangible desperation to show that they can replace software engineers, the real value comes from domain experts using the tools to enhance what they're already good at.
- wwweston 8mo agoI'd guess this is a bet on which market is more lucrative: * domain experts paying for tooling that will enhance their productivity * capital/management class hoping to significantly replace domain experts Software devs have been a famously tough market to sell tools to for a long time, so the better bet is B. Plus, the story on B is fantastic for fundraising; if there's a 10% chance that it checks out, you want some part of that as your capital portfolio.
- scuff3d 8mo agoI don't think they actually care if it ever materializes. They just have to sell execs on it. As long as they can the exec will sell it to their higher ups, mostly by just flat out lying about it. I see it all the time at the Director and VP level. Once big money is on the line, there are no failures, just "opportunities for strategic realignment"
- nz 8mo agoHow does he solve the Fruit of the Poison Tree problem? For all he know, his LLMs included a bunch copyrighted or patented code throughout the codebase. How is he going to convince serious people that this port is not just a transformation of an _asset_ into a _liability_? And you might say that this is a hypothetical problem, one that is not practically occurring. Well, we had a similar problem like this in the recent past, that LLMs are close to _making actual_. When it comes to software patents, they were considered a _hypothetical_ problem (i.e. nobody is going to bother suing you unless you were so big that violating a patent was a near certainty). We were instructed (at pretty much all jobs), to never read patents, so that we cannot incriminate ourselves in the discovery process. That is going to change soon (within a year). I have friend, whom I won't name, who is working on a project, using LLMs, to discover whether software (open source and proprietary) is likely to be violating a software patent from a patent database. And it is designed to be used, not by programmers, but by law firms, patent attorneys, etc. Even though it is not marketed this way, it is essentially a target acquisition system for use by patent trolls. It is hard for me to tell if this means that we will have to keep ignoring patents for that plausible deniability, or if this means that we will have to become hyper informed about all patents. I suppose, we can just subscribe to the patent-agent, and hope that it guides the other coding agents into avoiding the insertion of potentially infringing code. (I also have a friend who built a system in 2020 that could translate between C++ and Python, and guarantee equivalent results, and code that looks human-written. This was a very impressive achievement, especially because of how it guarantees the equivalence (it did not require machine-learning nor GPUs, just CPUs and some classic algorithms from the 80s). The friend informs me that they are very disheartened to see that now any toddler with a credit card can mindlessly do something similar, invalidating around a decade of unpublished research. They tell me that it will remain unpublished, and if they could go back in time, they would spend that decade extracting as much surplus from society as possible, by hook or by crook (apparently they had the means and the opportunity, but lacked the motive); we should all learn from my friend's mistake. The only people who succeed are, sadly, perversely, those who brazenly and shamelessly steal -- and make no mistake, the AI companies are built on theft. When millionaires do it, they become billionaires -- when Aaron Swartz does it, he is sentenced to federal prison. I'm not quite a pessimist yet, but it really is saddening to watch my friend go from a passionate optimist to a cold nihilist.).
- einpoklum 8mo ago> Coding assistants are also really great at porting from one language to the other No, they are quite terrible at doing that. They may (I guess?) produce code that compiles, but they will, almost certainly not produce the appropriate combination of idioms and custom abstractions that may the code "at home" in the target language. PS - Please fix your blockquote... HN ignores single linebreaks, so you have to either using pairs of them, or possibly go with italicization of the quoted text.
- xhkkffbf 8mo agoIf every AST is isomorphic, why bother? Don't you miss getting some of the advantages of Rust?
- qwm 8mo agoI did this exact same thing for porting a compiler from one language to another with Codex. I run tests at every step, and verified that bytecode output was byte-for-byte identical. I was very impressed at the results, and this is coming from someone who's always pointing out issues with AI programming.