Live data from Hacker News

My AI-built PHP engine in Rust passes 17% of PHP-src tests, renders WordPress

ekinertac.com

61–70 of 73 posts

Re: My AI-built PHP engine in Rust passes 17% of PHP-src tests, renders WordPress

#61
post #13

My boss asked me to set up a WordPress for a product landing page. I naturally won't do this; it's no more than a couple of weeks ago that some SQL injection landed in the search query function of this monstrosity. WordPress always was and always will be terrible. So I set up the landing page with a Hugo static site, and I've been vibe-coding a WordPress-like dashboard that operates on git repositories containing Hug…

what, no HTMX?

Re: My AI-built PHP engine in Rust passes 17% of PHP-src tests, renders WordPress

#63
post #7

Author here. To be upfront about what this is: I'm not a Rust developer or a PHP internals person. This is an experiment in whether the "point the AI at the original project's test suite" methodology (the way Bun was driven against real-world suites) holds up when the human can't review the code. The oracle is php-src's own .phpt corpus, ~22k tests I didn't write. Current honest score: 3,844 passing (17.4%), with a r…

Will you answer questions yourself, or will you simply pass on what your LLM of choice writes for you? Edit: On further inspection, the blog design, the blog build, the blog articles and even the anecdotes used in the articles are entirely Claude generated. Stop being so lazy. Get Claude to do something interesting and use your own intellect to assess and challenge the work in your write up. Or the other way around.…

well, thanks for the tips on how to run my own blog :) but the post already tells you this, the last paragraph literally says an LLM drafted it and i edited it. the whole project is an experiment in what a non rust/php guy plus AI can ship, so hiding the AI in the writing while disclosing it in every commit would be a weird place to draw the line.

Re: My AI-built PHP engine in Rust passes 17% of PHP-src tests, renders WordPress

#64

Ill preface my comment with saying: this might not be the best solution give the goal of your project to iteratively loop through and improve on the tests each round, and using deps would make that process longer/more complicated having to work potentially with another project. .....however..... mago, a static analyzer for php is written in rust and might be useful for gaining some "free" performance uplift: https://…

thanks, mago is a cool project. probably not as a dep tho, the parser isnt where the time goes (the 55x gap is all in evaluation, thats what the bytecode vm is for) and our parser is deliberatly tuned to match php's exact parse error messages, which is itself worth tests in the corpus. but using it as a second oracle to cross check my parser against theirs is actually a neat idea, same trick as the phpt suite but at the syntax layer.

Re: My AI-built PHP engine in Rust passes 17% of PHP-src tests, renders WordPress

#65

Maybe the takeaway is that 20% is about all the LLM can muster.

> Maybe the takeaway is that 20% is about all the LLM can muster At this point there's a long list of projects that have used LLMs to rewrite a system in Rust including: - Bun (https://github.com/oven-sh/bun/pull/30412) - Valkey (https://github.com/ianm199/valdr) - Git (https://github.com/gitbutlerapp/grit) - Postgres (https://github.com/malisper/pgrust) With the exception of Bun, these projects were done pre-fable t…

[dead]

Re: My AI-built PHP engine in Rust passes 17% of PHP-src tests, renders WordPress

#66

Author here. To be upfront about what this is: I'm not a Rust developer or a PHP internals person. This is an experiment in whether the "point the AI at the original project's test suite" methodology (the way Bun was driven against real-world suites) holds up when the human can't review the code. The oracle is php-src's own .phpt corpus, ~22k tests I didn't write. Current honest score: 3,844 passing (17.4%), with a r…

This is a pretty cool experiment. Thanks for sharing!

thanks! the devlog in the repo has the longer war stories if you enjoy this kind of thing.

Re: My AI-built PHP engine in Rust passes 17% of PHP-src tests, renders WordPress

#67

Wow. Now did you try to check the setup with something like Claude Fable? Will it find issues, what kind of issues? Another question: how many tokens did this effort cost? Did you learn new prompting tricks?

[flagged]

Re: My AI-built PHP engine in Rust passes 17% of PHP-src tests, renders WordPress

#68

Why is the AI only able to reach 17%? Surely it can just keep iterating until it implements the full test suite?

its still iterating, 17% is just where the counter is today. three weeks ago it was at 10%, two weeks ago 13.8%. i didnt post this as a final result, i posted becuase wp-admin rendering surprised me. but no, it cant reach 100%. around 55-60% of the suite tests C extensions, gd, curl, soap, intl, mysqli, ffi, sockets etc. passing those would mean writing all those extensions from scratch too (libcurl, ICU, an image li…

most of those are just bindings, trivial work.

Re: My AI-built PHP engine in Rust passes 17% of PHP-src tests, renders WordPress

#69
post #53
post #32

Earlier quoted context omitted.

Just to clarify: you think your vibecoded dashboard is more secure than WordPress? Not saying you're wrong, just wondering why you think you're right. Are you auditing the generated code, or is it a giant yolo?

How do you hack a static HTML page? The point is that most WordPress pages don’t warrant the dynamic code execution on every page load. When you use a static site generator and make content creation convenient behind the scenes, you move the entire attack surface to, in my case, nginx, the load balancer, and OpenSSL.

You don't hack a static HTML page, you hack the (presumably public-facing) vibecoded admin panel that can update the static page.

Re: My AI-built PHP engine in Rust passes 17% of PHP-src tests, renders WordPress

#70
post #23

Earlier quoted context omitted.

Yeah, I agree. It will be like serverless but for code : codeless. It’s a disconcerting future.

Why disconcerting?

Seems like the reshaping of an industry and is disconcerting for those of us who work in it.
Post reply on HN