For what it's worth you can implement a C compiler in under 10kLOC. The chibi C compiler is only a few thousand lines [1]. There is also Cake [2] and the tiny C compiler [3] which are both relatively small. [1] https://github.com/rui314/chibicc [3] https://bellard.org/tcc/. - Source: Hacker News / about 1 month ago
I was going to say, the list should include something by Fabrice Bellard. Tiny C Compiler is one. https://bellard.org/tcc/ I was thinking, maybe first version/commit of QEMU would be interesting to read. - Source: Hacker News / 9 months ago
I occasionally use tcc (https://bellard.org/tcc/) like an interpreter (`tcc -run`), it's convenient for certain odd tasks. Not so much for interactive stuff, but if I'm building little PoCs for an idea that will get dropped into a C project, or fiddling with structs work out how something should/is being stored, or in situations where I'm making stuff that interacts with or examples based on C code and I want to... - Source: Hacker News / 11 months ago
This reminded me the idea of compilers bootstrapping (https://news.ycombinator.com/item?id=35714194). That is, now you can code in SectorC some slightly more advanced version of C capable of compiling TCC (https://bellard.org/tcc/), and then with TCC you can go forward to GCC and so on. - Source: Hacker News / 11 months ago
The tinyc compiler reads scripts like a c-interpreter, with shebang and all. Source: about 1 year ago
I remember the good old days when you could put TCC into your bootloader, so you could boot the kernel from source code. Source: about 1 year ago
While Fabrice Bellard is no longer working on TCC [0] and an official release tarball hasn't been packaged since version 0.9.27 (5 years ago) the project is by no means unmaintained. For details, check their current working repository [1] and mailing list [2]. [0]: https://bellard.org/tcc/ [1]: https://repo.or.cz/tinycc.git [2]: https://lists.nongnu.org/archive/html/tinycc-devel/. - Source: Hacker News / about 1 year ago
What you're looking for is probably Bellard's Tiny C Compiler (TCC). Source: about 1 year ago
Virgin stripped-down Tiny-C vs Chad Bellard's TCC (gcc but FAST (to compile, not execute)). Source: about 1 year ago
Not to be confused with https://bellard.org/tcc/, which is a tiny compiler for the C language. - Source: Hacker News / about 1 year ago
I thought is was about this: https://bellard.org/otcc/otcc.c (a tiny, obfuscated C compiler, winner of the 2001 IOCCC). It has led to TinyCC (https://bellard.org/tcc/), not as tiny, but also more complete, not obfuscated and actually useful. It turns out the compiler in the article is the opposite of that. It it a simple toy transpiler and the code is very clear and mostly made of comments. The former is a feat of... - Source: Hacker News / about 1 year ago
I didn't really understand forth till I tried implementing eforth in c. https://github.com/tehologist/forthkit That was so much fun I built a second one in under 300 lines of javascript for experimenting with canvas api in web browser. Single file doesn't require a server, you can drag and drop code onto text window. https://github.com/tehologist/ecma6-forth... - Source: Hacker News / over 1 year ago
Try tcc https://bellard.org/tcc/ be warned it doesnt do c++. Source: over 1 year ago
TCC allows you to use c like scripting language. Source: over 1 year ago
But I don't think Rust fits in here: https://suckless.org/philosophy/ > How is Rust incompatible with aligning with the philosophy that encourages building simple yet functional things? I would say it attracts different kind of developers that in turn make respective design choices, and I believe Rust, its syntax, package management ecosystem and community reflect that. Can you write simple system tools in... - Source: Hacker News / over 1 year ago
I was thinking of writing a transpile to C that compiles and executes at runtime. Sounds like you want TCC: > Compile and execute C source directly. No linking or assembly necessary. > TCCBOOT, a hack where TCC loads and boots a Linux kernel from source in about 10 seconds. That is to say, it is a "boot loader" that reads Linux kernel source code from disk, writes executable... - Source: Hacker News / over 1 year ago
There are also https://bellard.org/tcc/ and https://github.com/jserv/amacc that contain mostly complete C compilers. - Source: Hacker News / over 1 year ago
Or just use tcc. The binaries on their download page are like 500k. Source: almost 2 years ago
* libtcc is licensed under LGPL, as can be verified by downloading the source [2]. The bulk of the alleged violations come from the vendored version of this project. * il-opcodes.h [3] is included in libtcc, but has a GPL license in the header. As the GPL license author is the author of libtcc (Fabrice Bellard), this seems like a mistake in that single header and the general license of the project should take... - Source: Hacker News / about 2 years ago
Those GPL files are part of a vendored dependency (TCC) [1] which has been licensed under LGPL. IANAL but GPL does state that you can relicense under any other later version of the license, and LGPL states that it counts as GPL 2.1. Either way, it is hard to blame the author of Cheat Engine for this. If there is any violation it comes from a vendored dependency. Again, IANAL, but if someone presents you code and... - Source: Hacker News / about 2 years ago
You could review and hand-compile a version of something like tcc. Source: about 2 years ago
Do you know an article comparing Tiny C Compiler to other products?
Suggest a link to a post with product alternatives.
This is an informative page about Tiny C Compiler. You can review and discuss the product here. The primary details have not been verified within the last quarter, and they might be outdated. If you think we are missing something, please use the means on this page to comment or suggest changes. All reviews and comments are highly encouranged and appreciated as they help everyone in the community to make an informed choice. Please always be kind and objective when evaluating a product and sharing your opinion.