points by lelanthran 3 months ago

> > It cost $20,000

> I'm curious - do you have ANY idea what it costs to have humans write 100,000 lines of code???

I'll bite - I can write you an unoptimised C compiler that emits assembly for $20k, and it won't be 100k lines of code (maybe 15k, the last time I did this?).

It won't take me a week, though.

I think this project is a good frame of reference and matches my experience - vibing with AI is sometimes more expensive than doing it myself, and always results in much more code than necessary.

flakiness 3 months ago

Does it support x64, x8664, arm64 and riscv? (sorry, just trolling - we don't know the quality of backend other than x8664 which is supposed to be able to build bootable linux.)

  • lelanthran 3 months ago

    It's not hard to build a compiler just for a bootable linux.

    I see no test criteria that actually runs that built linux through various test plans, so, yeah emitting enough asm just to boot is doable.

p-e-w 3 months ago

> I can write you an unoptimised C compiler that emits assembly for $20k

You may be willing to sell your work at that price, but that’s not the market rate, to put it very mildly. Even 10 times that would be seriously lowballing in the realm of contract work, regardless of whether it’s “optimised” or not (most software isn’t).

  • lelanthran 3 months ago

    > You may be willing to sell your work at that price, but that’s not the market rate, to put it very mildly.

    It is now.

    At any rate, this is my actual rate. I live in South Africa, and that's about 4 weeks of work for me, without an AI.

    • qarl 3 months ago

      Deal. I'll pay you IF you can achieve the same level of performance. Heck, I'll double it.

      You must provide the entire git history with small commits.

      I won't be holding my breath.

      • lelanthran 3 months ago

        > Deal. I'll pay you IF you can achieve the same level of performance. Heck, I'll double it.

        > You must provide the entire git history with small commits.

        > I won't be holding my breath.

        Sure; I do this often (I operate as a company because I am a contractor) - money to be held in escrow, all the usual contracts, etc.

        It's a big risk for you, though - the level of performance isn't stated in the linked article so a parser in Python is probably sufficient.

        TCC, which has in the past compiled bootable Linux images, was only around 15k LoC in C!

        For reference, for a engraved-in-stone spec, producing a command-line program (i.e. no tech stack other than a programming language with the standard library), a coder could reasonably produce +5000LoC per week.

        Adding the necessary extensions to support booting isn't much either, because the 16-bit stuff can be done just the same as CC did it - shell out to GCC (thereby not needing many of the extensions).

        Are you *really* sure that a simple C compiler will cost more than 4 weeks f/time to do? It takes 4 weeks or so in C, are you really sure it will take longer if I switch to (for example) Python?

        • qarl 3 months ago

          > the level of performance isn't stated in the linked article so a parser in Python is probably sufficient.

          No, you'll have to match the performance of the actual code, regardless of what happens to be written in the article. It is a C compiler written in Rust.

          Obviously. Your games reveal your malign intent.

          EDIT: And good LORD. Who writes a C compiler in python. Do you know any other languages?!?

          • lelanthran 3 months ago

            > No, you'll have to match the performance of the actual code, regardless of what is in the article. It is a C compiler written in Rust.

            Look, it's clear that you don't hire s/ware developers very much - your specs are vague and open to interpretation, and it's also clear that I do get hired often, because I pointed out that your spec isn't clear.

            As far as "playing games" goes, I'm not allowing you to change your single-sentence spec which, very importantly, has "must match performance", which I shall interpret to as "performance of emitted code" and not "performance of compiler".

            > Your games reveal your intent.

            It should be obvious to you by know that I've done this sort of thing before. The last C compiler I wrote was 95% compliant with the (at the time, new) C99 standard, and came to around 7000LoC - 8000LoC of C89.

            > EDIT: And good LORD. Who writes a C compiler in python. Do you know any other languages?!?

            Many. The last language I implemented (in C99) took about two weeks after hours (so, maybe 40 hours total?), was interpreted, and was a dialect of Lisp. It's probably somewhere on Github still, and that was (IIRC) only around 2000LoC.

            What you appear to not know (maybe you're new to C) is that C was specifically designed for ease of implementation.

            1. It was designed to be quick and easy to implement.

            2. The extensions in GCC to allow building bootable Linux images are minimal, TBH.

            3. The actual 16-bit emission necessary for booting was not done by CC, but by shelling out to GCC.

            4. The 100kLoC does not include the tests; it used the GCC tests.

            I mean, this isn't arcane and obscure knowledge, you know. You can search the net right now and find 100s of undergrad CS projects where they implement enough of C to compile many compliant existing programs.

            I'm wondering; what languages did you write an implementation for? Any that you designed and then implemented?

        • f1shy 3 months ago

          And having TCC, GCC, CLANG and any other project lying around as cheat sheet, as the trained model, in some way, had.

      • bee_rider 3 months ago

        You seem to have doubled down on a bluff that was already called.

        • qarl 3 months ago

          Naw. I got him to reveal himself, which was the whole point.

          It's amazing what you can get people to do.

          • lelanthran 3 months ago

            > Naw. I got him to reveal himself, which was the whole point.

            Reveal myself as ... a contractor agreeing to your bid?

            > It's amazing what you can get people to do.

            There's a ton of money now floating around in pursuit of "proving" how cost-efficient LLM coding is.

            I'm sure they can spare you the $40k to put into escrow?

            After all, if I don't deliver, then the AI booster community gets a huge win - highly respected ex-FAANG staff engineer with 30 years of verified dev experience could not match the cost efficiency of Claude Code.

            I am taking you up on your original offer: $40k for a C compiler that does exactly what the CCC program in the video does.

    • zingar 3 months ago

      That’s a VERY nice rate for SA; approximately what I charge in the UK. I assume these are not local companies who hire you.

      • lelanthran 3 months ago

        > That’s a VERY nice rate for SA; approximately what I charge in the UK. I assume these are not local companies who hire you.

        A local Fintech needing PCI work pays that, but that's not long-term contracts.

  • psychoslave 3 months ago

    That feels like Silicon-Valley-centric point of view. Plus who would really spend $20k in building any C compiler today in the actual landscape of software?

    All that this is saying is that license laundering of a code-base is now $20k away through automated processes, at least if the original code base is fully available. Well, with current state-of-the-art you’ll actually end up with a code-base which is not as good as the original, but that’s it.

  • wavemode 3 months ago

    No, you're overestimating how complex it is to write an unoptimized C compiler. C is (in the grand scheme of things) a very simple language to implement a compiler for.

    The rate probably goes up if you ask for more and more standards (C11, C17, C23...) but it's still a lot easier than compilers for almost any other popular language.

  • seg_lol 3 months ago

    This is very much a John Brown claim that will in the end, kill the OP. I'd rather have the OP using LLM powered code review tools to add their experience to that AI generated compiler.