'Writing a C Compiler' is a book
The "Writing a C Compiler" series transitions into a book by No Starch Press, focusing on building a C compiler with practical guidance, pseudocode examples, and essential compiler concepts for a broad audience.
Read original articleThe "Writing a C Compiler" series has been transformed into a book titled "Writing a C Compiler: Build a Real Programming Language from Scratch," set to be released by No Starch Press in late 2023. The book offers a hands-on guide to creating a C compiler, starting from compiling a basic C program to x64 assembly and gradually adding new features in each chapter. It aims to make the process accessible to a wide audience by presenting the implementation code in pseudocode, allowing readers to implement their compiler in any language. The book covers fundamental topics such as expressions, variables, control flow statements, function calls, various types like floating-point numbers, arrays, pointers, and structs, as well as classic optimizations including constant folding, dead code elimination, and register allocation. The author highlights the need for a new intermediate representation in the book, diverging from the original series, and mentions that the blog series will not continue. Despite the delay in the release date, readers who have preordered are assured that efforts are being made to deliver a comprehensive and valuable resource.
Related
The C Standard charter was updated, now with security principles as well
The ISO/IEC JTC1/SC22/WG14 committee oversees C Standard development, focusing on portability, efficiency, and stability. Collaboration with the C++ committee ensures compatibility. Principles guide feature integration, code efficiency, security, and adaptability.
Weekend projects: getting silly with C
The C programming language's simplicity and expressiveness, despite quirks, influence other languages. Unconventional code structures showcase creativity and flexibility, promoting unique coding practices. Subscription for related content is encouraged.
Boosting Compiler Testing by Injecting Real-World Code
The research introduces a method to enhance compiler testing by using real-world code snippets to create diverse test programs. The approach, implemented in the Creal tool, identified and reported 132 bugs in GCC and LLVM, contributing to compiler testing practices.
Beating the Compiler
The blog post discusses optimizing interpreters in assembly to outperform compilers. By enhancing the Uxn CPU interpreter, a 10-20% speedup was achieved through efficient assembly implementations and techniques inspired by LuaJIT.
Crafting Interpreters
The book "Crafting Interpreters" by Robert Nystrom is a detailed guide on creating programming languages. It covers parsing, semantics, bytecode, and more. Nystrom provides free online access and additional resources.
However, looking at the table of contents [0], she seems to spend a lot of the book on types and pointers. That's cool, since the compiler books that I've seen don't cover languages with pointers and pointer arithmetic (and the analyses that come with that), or representations of types.
C's selling point is performance and portability and this book covers neither
Related
The C Standard charter was updated, now with security principles as well
The ISO/IEC JTC1/SC22/WG14 committee oversees C Standard development, focusing on portability, efficiency, and stability. Collaboration with the C++ committee ensures compatibility. Principles guide feature integration, code efficiency, security, and adaptability.
Weekend projects: getting silly with C
The C programming language's simplicity and expressiveness, despite quirks, influence other languages. Unconventional code structures showcase creativity and flexibility, promoting unique coding practices. Subscription for related content is encouraged.
Boosting Compiler Testing by Injecting Real-World Code
The research introduces a method to enhance compiler testing by using real-world code snippets to create diverse test programs. The approach, implemented in the Creal tool, identified and reported 132 bugs in GCC and LLVM, contributing to compiler testing practices.
Beating the Compiler
The blog post discusses optimizing interpreters in assembly to outperform compilers. By enhancing the Uxn CPU interpreter, a 10-20% speedup was achieved through efficient assembly implementations and techniques inspired by LuaJIT.
Crafting Interpreters
The book "Crafting Interpreters" by Robert Nystrom is a detailed guide on creating programming languages. It covers parsing, semantics, bytecode, and more. Nystrom provides free online access and additional resources.