top | item 47121491

(no title)

patates | 8 days 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.

discuss

order

josephg|8 days 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!

mr_mitm|8 days ago

Same 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

metabeard|8 days ago

Please post this. I'd love to play with it and, especially, see how fast it is.

yc-kraln|7 days ago

Interesting! 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?

mjrpes|7 days ago

Did 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.

soperj|8 days ago

Can you release it as open source code?

uyzstvqs|8 days 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|8 days ago

Wasting electricity to "generate tens of thousands of lines of useless code" at will? Why is that in any way a desirable future?

LoganDark|8 days ago

I bet RAM production will only increase to meet AI demand and there will be none left for you. Or me. Or anyone. Crucial is already going probably forever and I'm sure more will follow...

tasuki|8 days 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|8 days ago

I'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.

oblio|8 days 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|8 days ago

It was below 100$, but only after burning through the 20x max session limit.

ErikBjare|8 days ago

The subsidized Codex/Claude subscriptions make it not so bad.

otabdeveloper4|7 days ago

It's something you'd do once for shits and giggles, before realizing it's only funny once.

pjmlp|8 days ago

There are plenty of SMEs trapped into that future. :)