82 pointsby guerrilla2 hours ago13 comments
  • veltas26 minutes ago
    The unofficial repo continuing tcc has geoblocked the UK.

    https://repo.or.cz/tinycc.git

  • kimixaan hour ago
    Man I can't wait for tcc to be reposted for the 4th time this week with the license scrubbed and the comment of "The Latest AI just zero-shotted an entire C compiler in 5 minutes!"
    • overgard34 minutes ago
      And the subsequent youtube hype videos of "COMPILER WRITING IS OVER!"
    • resonious33 minutes ago
      There actually was an article like this from Anthropic the other day but instead of 5 minutes I think it was weeks and $20,000 worth of tokens. Don't have the link handy though.
      • logicprog23 minutes ago
        Except it was written in a completely different language (Rust), which would have necessitated a completely different architecture, and nobody has established any relationship either algorithmically or on any other level between that compiler and TCC.
        • 14 minutes ago
          undefined
    • rowanG07726 minutes ago
      I may have missed this. Do you have a link when AI verbatim copied tcc and it was publicized? I have my doubts.
  • asdefghyk12 minutes ago
    I recall, there where similar items back in late 70s and early 80s .

    Tiny C, Small C are names I seem to recall, buts its very fuzzy - Not sure if they were compilers, may have been interpreters....

  • gnufxan hour ago
    • guerrilla17 minutes ago
      Riiiight, I forgot about htat.
  • haunter2 hours ago
    There is an actively maintained fork with RISC-V support and such

    https://repo.or.cz/w/tinycc.git

    https://github.com/TinyCC/tinycc

    • csb6an hour ago
      I've never seen another repo with public commit access like that. I guess the project is niche enough that you don't get spammed with bad or malicious commits.
      • haunteran hour ago
        Yeah it's basically anarchy (to some extent)

        https://repo.or.cz/h/mob.html

        >The idea is to provide unmoderated side channel for random contributors to work on a project, with similar rationale as e.g. Wikipedia - that given enough interested people, the quality will grow rapidly and occassional "vandalism" will get fixed quickly. Of course this may not work nearly as well for software, but here we are, to give it a try.

      • riffraff41 minutes ago
        When pugs (a perl6 implementation in Haskell) was a thing, you gained commit access by asking and it was immediately granted to everyone. It was insane and awesome.
    • veltas20 minutes ago
      I would be interested in contributing to this but the UK is geoblocked.
    • einpokluman hour ago
      It is also interesting to note that while the repository is quite active, there has not been any release for _8 years_, and the website is the same one at the top of this conversation, i.e. the one where the old maintainer says he quit and the benchmarks are from 20 years ago.

      A small and minimalistic C compiler is actually a very important foundational project for the software world IMNSHO.

      I'm definitely reminded of: https://xkcd.com/2347/

  • kristianpan hour ago
    Does anyone use libtcc for a scripting language backend? Smaller and faster than llvm. You'd have to transpile to a C ast I imagine.
    • kgeistan hour ago
      Years ago I built a scripting language that transpiled to TCC and then compiled to machine code in memory. It produced human-readable C code so it was very easy to get going: when debugging the compiler I could just look at the generated C code without having to learn any special infrastructure/ecosystem/syntax etc. Plus basically zero-overhead interop with C out of the box => immediate access to a lot of existing libraries (although a few differences in calling conventions between TCC and GCC did bite me once). Another feature I had was "inline C" if you wanted to go low level, it was super trivial to add, too. It was pretty fast, maybe two times slower than GCC, IIRC, but more than enough for a scripting language.
    • olivia-banksan hour ago
      libtcc doesn't give you much control AST wise, you basically just feed it strings. I'm using it for the purpose you mentioned though--scripting language backend--since for my current "scripting-language" project I can emit C89, and it's plenty fast enough for a REPL!

          /* add a file (either a C file, dll, an object, a library or an ld script). Return -1 if error. */
          int tcc_add_file(TCCState *s, const char *filename);
      
          /* compile a string containing a C source. Return non zero if error. */
          int tcc_compile_string(TCCState *s, const char *buf);
  • throwatdem12311an hour ago
    This was the compiler I was required to use for my courses in university. GCC was forbidden. The professor just really liked tcc for some reason.
    • II2II23 minutes ago
      > The professor just really liked tcc for some reason.

      Perhaps, or maybe they just got tired of students coming in and claiming that their program worked perfectly on such-and-such compiler.[1] It looks like tcc would run on most systems from the time of its introduction, and perhaps some that are a great deal older. When I took a few computer science courses, they were much more restrictive. All code had to be compiled with a particular compiler on their computers, and tested on their computers. They said it was to prevent cheating but, given how trivial it would have been to cheat with their setup, I suspect it had more to do with shutting down arguments with students who came in to argue over grades.

      [1] I was a TA in the physical sciences for a few years. Some students would try to argue anything for a grade, and would persist if you let them.

    • mort96an hour ago
      Seems like a good way to get students to write C rather than GNU C.
      • ueckeran hour ago
        TCC - just like many other C compilers - supports many GNU extensions.
      • einpokluman hour ago
        The professor could have just insisted on `-std=c99` or a similar GCC flag which disallows GNU extensions.

        When I taught programming (I started teaching 22 years ago), the course was still having students either use GCC with their university shell accounts, or if they were Windows people, they would use Borland C++ we could provide under some kind of fair use arrangement IIANM, and that worked within a command shell on Windows.

        • actionfromafar42 minutes ago
          On the other hand, with tcc, you'd know exactly what you were dealing with.

          I used it just the other day to do some tests. No dependencies, no fiddling around with libwhater-1.0.dll or stuff like that when on Windows and so on.

  • olivia-banksan hour ago
    TCC is fantastic! I use it a lot to do fast native-code generation for language projects, and it works really really well.
  • markus_zhangan hour ago
    I mixed it up with LCC which was used in Quake 3. Still this is pretty cool.
  • pbohunan hour ago
    There also is an unofficial mirror which has updates.

    https://github.com/TinyCC/tinycc

  • rustyhancock2 hours ago
    What a blast from the past TCC!

    Sad but not surprised to see it's no longer maintained (8 years ago!).

    Even in the era of terabyte NVMe drives my eyes water when I install MSVC (and that's usually just for the linker!)

    • antirez2 hours ago
      That is, I believe, one the points of AI and Open Source many contacts. Something like TCC, with a good coding agent and a developer that cares about the project, and knows enough about it, can turn into a project that can be maintained without the otherwise large efforts needed, that resulted into the project being abandoned. I'm resurrecting many projects of mine I had no longer the time to handle, like dump1090, linenoise, ...
    • pkal2 hours ago
      I don't think it is not maintained, there is plenty of activity going on in the repo: https://repo.or.cz/tinycc.git, they just don't seem to be cutting releases?
    • shaknaan hour ago
      Still maintained. You have the mob repo in another comment.

      Debian, Fedora, Arch and others pull their package from the mob repo. They're pretty good at pulling in CVE fixes almost immediately.

      Thomas Preud'homme is the new maintainer lead, though the code is a mob approach.

    • kristianp2 hours ago
      There's still activity on the mailing list. It may still be maintained.

      https://lists.nongnu.org/archive/html/tinycc-devel/2026-02/t...

  • deividan hour ago
    TCC is fantastic! Very hackable, easy to compile to WASM for some interesting in-browser compilation
  • MarginalGainz15 minutes ago
    [dead]