14 comments

  • qalmakka 2 hours ago
    I think people don't really realise that compilers are "difficult" projects in the same way as an appendicectomy is for a skilled surgeon, i.e. the surgery is "routine" only because the surgeons spent decades honing their skills to do these routinely. The hard part was training someone to be able to do that.

    Writing a compiler/interpreter is _extremely_ straightforward; a lexer -> parser -> ast -> semantic analysis -> {codegen -> linker | evaluator} pipeline is a very widely understood and tested way to write a compiler in any language, regardless of what language you are trying to compile. The hard part is _learning_ how it works, but after that implementing a compiler is a kind of mechanical activity. That's why LLMs are so great at writing parsers: they can just read the source of any compiler (and they probably read all of them) and apply the same stuff mechanically, with almost a 100% accuracy. We even have formal languages to define parsers and RTL and stuff, that's how "mechanical" the whole process can be.

    I'm pretty sure that any skilled compiler dev with the ISO C standard and a few packs of Red Bulls can apecode a working C compiler in a few days, give or take. The hard part isn't doing that, the hard part is the decades of iterative improvements to make it generate extremely performant yet correct code as fast as possible.

  • swalsh 3 hours ago
    I bet claude was hyping this guy up as he was building it. "Absolutely, a rust compiler written in PHP is a great idea!"
    • embedding-shape 1 hour ago
      Does it matter who the sycophant was or just that there was a sycophant?

      My partner does that as well as LLMs at this point; "Sure honey, I remember you've talked a lot about Rust and about Clojure in the past, and you seem excited about this Clojure-To-Rust transpiler you're building, it sounds like a great idea!", is that bad too?

    • jlg23 1 hour ago
      Every compiler in any language for any language has at the very least educational value.

      On the other hand, demeaning comments without any traces of constructive criticism don't have any value.

    • nz 1 hour ago
      There is no comment on whether LLMs/agents have been used. I feel like projects should explicitly say if they were _or_ were not used. There is no license file, and no copyright header either. This feels like "fauxpen-source": imagine getting LEX+YACC to generate a parser, and presenting the generated C code as "open-source".

      This is just another way to throw binaries over the wire, but much worse. This has the _worst_ qualities of the GPL _and_ pseudo-free-software-licenses (i.e. the EULAs used by mongo and others). It has all the deceptive qualities of the latter (e.g. we are open but not really -- similar to Sun Microsystems [love this company btw, in spite of its blunders], trying to convince people that NeWS is "free" but that the cost of media [the CD-ROM] is $900), with the viral qualities of the former (e.g. the fruit of the poison tree problem -- if you use this in your code, then not only can you not copyright the code, but you might actually be liable for infringement of copyright and/or patents).

      I would appreciate it if the contributor, mrconter11, would treat HN as an internet space filled with intelligent thinking people, and not a bunch of shallow and mindless rubes. (Please (1) explicitly disclose both the use and absence of use of LLMs -- people are more likely to use your software this way, and preserves the integrity of the open source ecosystem, and (2) share you prompts and session).

      So passes the glory of open source.

      • stephenlind 1 hour ago
        According to his Readme he seems to have built a 3D engine completely from scratch 8 years ago without using any library:

        https://github.com/mrconter1/IntuitiveEngine

        > A simple 3D engine made only with 2D drawLine functions.

        • nz 1 hour ago
          That is reassuring. Nevertheless, we should be required to disclose whether the code has been (legally) tainted or not. This will help people make informed decisions, and will also help people replace the code if legal consequences appear on the horizon, or if they are ready to move from prototype to production.
    • throwaway613746 1 hour ago
      [dead]
  • medi8r 1 hour ago
    Next: A wordpress plugin to compile Firefox to WASM.
  • abricq 2 hours ago
    > Useful if you need to compile Rust on a shared hosting server from 2008 where the only installed runtime is PHP.

    Not sure if it was meant as a joke or not, but this cracked me up

  • nxtfari 4 hours ago
    you never know what’s going on in someone else’s claude max plan
  • mohsen1 2 hours ago
    Here I thought my experiment with pushing xz to compress Alpine binaries harder was a waste of time / tokens

    https://github.com/mohsen1/fesh

  • gregman1 3 hours ago
    You never know what’s going on in someone else’s Claude Max plan =D
    • orthogonal_cube 3 hours ago
      Interesting that both you and nxtfari made essentially the same comment within an hour of each other, though yours is slightly modified
      • dashzebra 3 hours ago
        Yeah, right? Are we just... talking with bots?
        • nirui 2 hours ago
          That's a collision of 64 letters of entropy within 20 mins.

          Searching the term on DDG return this very page as the only result, I can confirm it's not a common term/meme.

          We're living on a dead Internet are we?

        • didacusc 1 hour ago
          well there is a context to this of people doing ridiculous projects just because they can through LLMs, of which Claude excels at for code-writing, so it makes sense that two users would have a similar reaction to this. also copying jokes from other people is as old as time (just check youtube comments from 2008)
        • bakugo 1 hour ago
          It's pretty obvious that Anthropic has a bot army that advertises Claude in basically every post, I thought most people would've noticed by now.
          • IshKebab 1 hour ago
            I don't think it's obvious. A likelier explanation is just that a lot of people are using Claude (especially HN types). Do you have any actual evidence?
            • bakugo 1 minute ago
              You can explain away any obvious astroturfing campaign with "wow, so many people love this product and feel the need to bring it up all the time in unrelated contexts!" if you want to.

              If you think two people making the exact same comment about "Claude Max" (not even just Claude, specifically bringing up the $200 subscription) on an unrelated post is organic, I don't know what to tell you.

      • tgv 1 hour ago
        nxtfari is a less than half a year old account...
  • wiseowise 4 hours ago
    Are all PHP developers named Rasmus?
    • doctor_phil 4 hours ago
      I also for a second thought this was Rasmus Lerdorf, the creator of PHP. In my head I just have him as Rasmus L-something, so this guy was just a hash collision. :)
  • mike_d 4 hours ago
    Sometimes when doing offensive security work you end up in the strangest environments with limited tools, odd quirks, broken shells, and god knows what else. But you know what is almost always available and just works? PHP.
    • psychoslave 3 hours ago
      Nop. awk, bash or some POSIX shell certainly. Perl most likely, despite it’s plunge in popularity. On a modern Mac, awk, bash and Perl are preinstalled with the system. PHP is not even necessarily present at system level on a PHP dev box as it might be only installed in some container.
  • nasretdinov 4 hours ago
    I wonder if the compiler runs on https://github.com/VKCOM/kphp (a PHP->C++ transpiler)
  • dashzebra 4 hours ago
    This is a great example of how people waste our planet's resources faster with AI.

    Seriously, in what world do we need a rust compiler in php? I'd rather have cheap RAM and storage, which I can't because of this kind of stupid idea.

    I wonder how much energy was wasted on this. How many people got poisoned or killed in mines to create the GPUs that spewed out this useless code.

    The fact that we can do something doesn't mean we should. It's time to end this madness.

    EDIT: yeah keep your downvotes coming. Ignore the obvious problem. Easy, it's invisible, just don't think about it.

    • wolvesechoes 2 hours ago
      But it is not something new that came with AI, even if it is most recent and most visible symptom of the sickness. We keep buying tons of useless crap and convert to tons of trash. We waste tremendous amount of energy for most trivial whims. Frugality was never dominant idea.
    • binaryturtle 4 hours ago
      Why do we assume this was created with AI? Is there some marker we can use to detect that?
      • dashzebra 3 hours ago
        The amount of code committed per day suggest some kind of automation.

        Also, a passionate programmer usually will add a "why this exists" in his readme.

        I'd be very surprised if this wasn't AI.

    • sunrunner 2 hours ago
      > Seriously, in what world do we need a rust compiler in php?

      This is described in the README:

      > Useful if you need to compile Rust on a shared hosting server from 2008 where the only installed runtime is PHP.

      So I guess that world? I mean there's working around a problem and then there's working around a problem...

      It would be amusing if, in such a highly limited environment, the compiled binary was still unusable due to restrictions on setting the executable flag.

    • nineteen999 2 hours ago
      Flipside: how much RAM and storage do you need? What do you need it for? What are you going to fill it with? Vibe code? Porn? Pirated movies? One man's treasure is another's trash I suppose.

      FWIW I didn't downvote you, I don't have much use for a Rust compiler at all, let alone a toy one written in PHP.

      "It's time to end this madness" - this is like trying to shut the barn doors after the horses have bolted and are on a cruise ship that's already sailed, drinking martinis by the pool.

      People are having fun with a new way to code, trying things out they couldn't have ever done before. It's been just over a year since Claude code was launched, blowing the doors off all of the other coding models. Compared to the years of hype around cryptocoins and all the GPU cycles wasted on that, this is a bresh of fresh air for many people.

    • MarsIronPI 4 hours ago
      Why are you assuming this was AI? It doesn't show any obvious indications of being AI. Maybe this is just someone's random side project. I advise you against jumping to conclusions.
      • scandinavian 3 hours ago
        Just look at the commit cadance, the bulk of the 8k lines of code was added in a couple of hours. Most commits 2-4 minutes apart. This is 100% vibe coded and it's pretty obvious.

        > It doesn't show any obvious indications of being AI.

        I agree that he probably asked the AI to omit some common AI tells, like excessive comments, verbose readmes etc.

        • gitbashr 2 hours ago
          And then there's me...

          `git commit --amend`

        • gregman1 3 hours ago
          People are weird, I for one started to use em dash more often — look at me!
      • programmer543 1 hour ago
        He also built a 3d engine from scratch using only 2d line function, way before ai:

        https://github.com/mrconter1/IntuitiveEngine

      • dashzebra 3 hours ago
        Prove me wrong :)
  • holg 3 days ago
    interesting proof of concept, in php, who would have thought :D
    • devmor 4 hours ago
      I think that proof of concepts are PHP’s greatest strength, actually.

      These days it can be almost as strict as you want it to be, but it’s always been a “loose” enough language that you can implement things that work in very fragile ways and iterate at incredible speed.

      When I am designing PoC microservices that will eventually end up running as Go or Rust, I often start with a prototype in PHP.

  • techpulse_x 3 hours ago
    [dead]