6 ms·
> 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 th
by 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.
- easterncalculus 8mo agoSeconding this comment, as someone who loves JMAP.
- josephg 8mo agoCode is here: https://github.com/josephg/claude-mail https://github.com/josephg/claude-mail The JMAP client itself is hosted here: https://seph.au/claude-webmail/ https://seph.au/claude-webmail/ I can't prove this but its a purely static web app. You need a jmap server to use it. If you use stalwart, set: server.listener.http.permissive-cors = true or server.listener.https.permissive-cors = true Then you should be able to put https://localhost:8080/ into the URL box. It should also work with fastmail, but I haven't tested it.
- mr_mitm 8mo agoSame here. I had Claude write me a web based RSS feed reader in Rust. It has some minor glitches I still need to iron out, but it works great, is fast as can be, and is easy on the eyes. https://github.com/AdrianVollmer/FluxFeed https://github.com/AdrianVollmer/FluxFeed
- echelon 8mo agoRust is the final language. Defect free. Immaculate types. Safe. Ergonomic. Beautiful to read. AI is going to be writing a lot of Rust. The final arguments of "rust is hard to write" are going to quiet down. This makes it even more accessible.
- tekne 8mo agoNeeds monads (not joking)
- lproven 8mo ago> Rust is the final language. I honestly can't tell if this is a humorous attack or not. Poe's law is validated once again.
- echelon 8mo agoIt's honest. If we can serialize our ideas to any language for durability, Rust is the way to go. It's not the best tool for the job for a lot of things, but if the LLMs make writing it as fast as anything else - whelp, I can't see any reason not to do it in Rust. If you get any language outputs "for free", Rust is the way to go. I've been using Claude to go ridiculously fast in Rust recently. In the pre-LLM years I wrote a lot of Rust, but it definitely was a slow to author language. Claude helps me produce it as fast as I can think. I spend most of my time reviewing the code and making small fixes and refactors. It's great.
- sdkfjhdsjk 8mo ago[dead]
- grey-area 8mo agoJust curious, does it look anything like this library? https://docs.rs/jmap-client/latest/jmap_client/ https://docs.rs/jmap-client/latest/jmap_client/
- therein 8mo agoAlso curious why would one be proud of having an LLM rewrite something that there is already a library for. I personally feel that proud LLM users boasting sounds as if they are on amphetamines.
- josephg 8mo agoIt made a webmail client. Not a jmap library.
- grey-area 8mo agoNot sure I understand, wouldn’t a webmail client in rust need client code like this or to use a library like this?
- josephg 8mo agoYeah but it’s like saying, “why are you impressed with Claude making a car when there are plans for an engine online?”. Even if Claude used that code (it didn't), it made the whole car. Not just an engine. There’s a lot more stuff going on than simply calling a backend mail server over jmap. And fyi, jmap is just a protocol for doing email over json & http. It’s not that hard to roll your own. Especially in a web browser.
- grey-area 8mo agoYour initial claim talked about jmap and this looks to me like a full implementation of the RFC in rust. That is the hard part of an email client IMO so I’m not sure I’d agree with your analogy, but you’re saying it made a web app which called a library like this? Would be interesting to see it, did you publish it yet?
- soperj 8mo agoCan you release it as open source code?
- mjrpes 8mo agoDid you use dioxus? I had claude write up a test web app with it, but when attempting to use a javascript component it built it couldn't get past memory access out of bound errors.
- josephg 8mo agoI used leptos. Before I started I made a text file containing the entire leptos manual, and told claude to read it. I don't know if that helped, but claude seems to use it just fine.
- yc-kraln 8mo agoInteresting! I am getting tired of looking at Roundcube and having weird issues and was thinking of doing the same. Were you planning on making the result public?
- tapstapstaps 8mo ago[dead]
- tasuki 8mo ago> a relic from the days when everyone thought Drupal was the future (long time ago). Drupal is the future. I never really used it properly, but if you fully buy into Drupal, it can do most everything without programming, and you can write plugins (extensions? whatever they're called...) to do the few things that do need programming. > 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. This is the problem! Fickle halfwits mindlessly buying into whatever "next big thing" is currently fashionable. They shoulda just learned Drupal...
- patates 8mo agoI'm not sure if you're serious or not, but while I never liked Drupal (even used to hate it once upon a time), I always liked the pragmatism surrounding it, reaching to the point of saving php code into the mysql database and executing from there.
- Twirrim 8mo ago> reaching to the point of saving php code into the mysql database and executing from there. Wordpress loves to shove php objects into the database (been a good long while since I used it, don't remember the mechanism, it'd be the equivalent of `pickle` in python, only readable by php). Not sure if they've improved it since I last dealt with it about 15 years ago, but at the time there was no way to have a full separated staging and production environment, lots of the data stored in the database that way had hardcoded domain names built into it. We needed to have a staging and production kind of set-up, so we ended up having to write a PHP script that would dump the staging database, fix every reference, and push it to production. Fun times.
- rovr138 8mo agoThere's implode() and explode() as well as serialize() and unseralize() No idea what's used in wordpress, but back in D6 and before, it was common to see it when it would store multiple values for an instance.
- oblio 8mo ago> It burned through a mountain of tokens, but 10/10 - would generate tens of thousands of lines of useless code again. Pardon me, and, yes, I know we're on HN, but I guess you're... rich? I imagine a single run like this probably burns through tens or hundreds of dollars. For a joke, basically. I guess I understand why some people really like AI :-)
- patates 8mo agoIt was below 100$, but only after burning through the 20x max session limit.
- ErikBjare 8mo agoThe subsidized Codex/Claude subscriptions make it not so bad.
- otabdeveloper4 8mo agoIt's something you'd do once for shits and giggles, before realizing it's only funny once.
- pjmlp 8mo agoThere are plenty of SMEs trapped into that future. :)
- uyzstvqs 8mo ago> It burned through a mountain of tokens, but 10/10 - would generate tens of thousands of lines of useless code again. This is the biggest bottleneck at this point. I'm looking forward to RAM production increasing, and getting to a point where every high-end PC (workstation & gaming) has a dedicated NPU next to the GPU. You'll be able to do this kind of stuff as much as you want, using any local model you want. Run a ralph loop continuously for 72 hours? No problem.
- Sharlin 8mo agoWasting electricity to "generate tens of thousands of lines of useless code" at will? Why is that in any way a desirable future?
- Barbing 8mo agoOptimists will imagine it to one day be as taxing and thus as wasteful as firing up MS Paint. No that’s a stretch, but firing up a AAA game.
- Sharlin 8mo agoAt least you (hopefully) get hours of entertainment from firing up an AAA game. Whereas generating vast amounts of code that you're never going to use has… some novelty value, I suppose. Luckily the novelty is going to wear off soon, I can't really see many people getting their daily happiness boost from making code machine say brrrrt straight to /dev/null. Even generating smut is a vastly more understandable (and vastly more commonplace, even now) use case for running genAI every day for hours.
- embedding-shape 8mo ago> I can't really see many people getting their daily happiness boost from making code machine say brrrrt straight to /dev/null How long time do we have to wait before these people get bored? Or might they actually find what they generate useful and it doesn't all go straight to /dev/null, since seemingly it seems to gain usage, not drop in usage?