rcc

Languages and libraries

c compiler

SHOW HN2016

175points
50comments
#174of 2,264 in 2016
Top 8%of 2016 by points

How HN took it

CuriousMostly questions and neutral comments

3 positive, 9 neutral or asking, 0 mixed, 3 critical, out of 15 comments about the project. Thread score -0.08.

Execution: 1 for, 0 againstDesign: 0 for, 1 againstIdea: 0 for, 1 againstDocs: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Fun project and good learning goal

    From 3 comments
    • I will always upvote something like this, but I am wondering: why write it in C++? I didn't really read the whole thing, but I skimmed a bit, and didn't see a lot of advantage…
      pmiller2 on HN
    • kudos to you, this is something I don't think I could ever accomplish but I know it's not easy. Keep learning and growing.
      warmwaffles on HN
    • This is awesome. Thank you for sharing it with us. :)
      markchristian on HN
  • Code base looks clean and easy to navigate

    From 1 comment
    • The code base looks nice and easy to navigate. I didn't see any license mentioned - I'd suggest stating one clearly for those considering to build something on top of it, or to…
      d99kris on HN

Objections

  • Written in C++ rather than C, which prevents self-hosting

    From 2 comments
    • I will always upvote something like this, but I am wondering: why write it in C++? I didn't really read the whole thing, but I skimmed a bit, and didn't see a lot of advantage…
      pmiller2 on HN
    • I would completely agree with you if this weren't a C compiler project. In this case, the advantage of having a self-hosting compiler is huge! Among other things, you can use the…
      pmiller2 on HN
  • No license stated, so it is not free software

    From 2 comments
    • Can you please add a free software license to your project, as it's currently proprietary? I'd recommend GPL, but go with whatever you want. Contrary to popular opinion,…
      cyphar on HN
    • The code base looks nice and easy to navigate. I didn't see any license mentioned - I'd suggest stating one clearly for those considering to build something on top of it, or to…
      d99kris on HN
  • Automatic parallelisation is a poor idea

    From 1 comment
    • Automatic parallelisation is a bad idea because the overhead caused by synchronisation is bigger than the gain. It's also a bad idea to take away control from the programmer.…
      imtringued on HN

Requests

  • Add a free software license

    From 2 comments
    • The code base looks nice and easy to navigate. I didn't see any license mentioned - I'd suggest stating one clearly for those considering to build something on top of it, or to…
      d99kris on HN
    • Can you please add a free software license to your project, as it's currently proprietary? I'd recommend GPL, but go with whatever you want. Contrary to popular opinion,…
      cyphar on HN
  • Suggestions for test suites such as gcc testsuite, csmith, or tcc tests

    From 4 comments
    • Where does one go for a fully representative sample of all kinds of valid C code to test a project like this? Or -- given a formal grammar, has someone produced a tool that…
      m1n1 on HN
    • For specific test cases, you could use gcc's test cases: https://github.com/gcc-mirror/gcc/tree/master/gcc/testsuite Not sure about the latter, but you could probably accomplish…
      robertelder on HN
    • There's csmith: https://embed.cs.utah.edu/csmith/
      moosingin3space on HN
    • For gradual implementation I would start from a test suite in tcc [1]. Eventually adopting the one from gcc and csmith. [1] http://bellard.org/tcc/
      zzzcpan on HN

Questions

  • Why use a generated parser instead of recursive descent or precedence climbing

    From 1 comment
    • I'm curious to know your reasoning behind using a generated parser instead of writing your own. This might be the first "just for fun" C compiler I've seen on HN or elsewhere…
      userbinator on HN
  • Why write it in C++

    From 2 comments
    • I will always upvote something like this, but I am wondering: why write it in C++? I didn't really read the whole thing, but I skimmed a bit, and didn't see a lot of advantage…
      pmiller2 on HN
    • I was wondering the same thing... ?? Oh, and you get an upvote from me too.
      codewritinfool on HN

Alternatives named

  • LLVM Kaleidoscope tutorial

    From 1 comment
    • Does the LLVM introduction tutorial[0] kind of fit what you're suggesting? You learn how to implement a toy language called Kaleidoscope on top of the LLVM infrastructure with…
      tmm on HN
  • c9x.me small C compiler

    From 1 comment
    • Seems like the ETH work on Oberon etc did that. The students kept learning by improving on or porting both the compilers and OS's. A2 Bluebottle is a fast, usable OS as a result.…
      nickpsecurity on HN
  • TCC

    From 1 comment
    • For gradual implementation I would start from a test suite in tcc [1]. Eventually adopting the one from gcc and csmith. [1] http://bellard.org/tcc/
      zzzcpan on HN
  • CompCert

    From 1 comment
    • Actually the bugs they found in CompCert were not in the proved sections. The CSmith paper says "As of early 2011, the under-development version of CompCert is the only compiler…
      Jabbles on HN
  • Andrew Chambers' self-hosting C compiler

    From 1 comment
    • could you add my own self hosting C compiler: https://github.com/andrewchambers/c
      andrewchambers on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/11903674)