- Softcover
- Used

Seller: WorldofBooks, Goring-By-Sea, WS, United KingdomWorldofBooks
AbeBooks seller since March 16, 2007
Condition: Used - Very good
US$ 10.74
Quantity: 2 available
Add to basketItem description from seller
The book has been read, but is in excellent condition. Pages are intact and not marred by notes or highlighting. The spine remains undamaged.
Seller Inventory # GOR010183197
- Title
- Writing A Compiler In Go
- Author
- Ball, Thorsten
- Publisher
- Thorsten Ball
- Publication year
- 2018
- Condition
- Very Good
- Binding
- Paperback
- Language
- English
- ISBN 10
- 398201610X
- ISBN 13
- 9783982016108
- Item weight
- 522 grams
This is the sequel to Writing An Interpreter In Go. We're picking up right where we left off and write a compiler and a virtual machine for Monkey.
Runnable and tested code front and center, built from the ground up, step by step — just like before. But this time, we're going to define bytecode, compile Monkey and execute it in our very own virtual machine. It's the next step in Monkey's evolution. It's the sequel to … a programming language.
Writing A Compiler In Go is the sequel to Writing An Interpreter In Go.
It starts right where the first one stopped, with a fully-working, fully-tested Monkey interpreter in hand, connecting both books seamlessly, ready to build a compiler and a virtual machine for Monkey. In this book, we use the codebase (included in the book!) from the first part and extend it. We take the lexer, the parser, the AST, the REPL and the object system and use them to build a new, faster implementation of Monkey, right next to the tree-walking evaluator we built in the first book.
The approach is unchanged, too. Working, tested code is the focus, we build everything from scratch, do baby steps, write tests firsts, use no 3rd-party-libraries and see and understand how all the pieces fit together.It's a continuation in prose and in code. Do you need to read the first part before this one? If you're okay with treating the code from the first book as black box, then no. But that's not what these books are about; they're about opening up black boxes, looking inside and shining a light. You'll have the best understanding of where we're going in this book, if you know where we started.
Learn how to write a compiler and a virtual machine
Our main goal in in this book is to evolve Monkey. We change its architecture and turn it into a bytecode compiler and virtual machine.We'll take the lexer, the parser, the AST and the object system we wrote in the first book and use them to build our own Monkey compiler and virtual machine … from scratch! We'll build them side-by-side so that we'll always have a running system we can steadily evolve.What we end up with is not only much closer to the programming languages we use every day, giving us a better understanding of how they work, but also 3x faster. And that's without explicitly aiming for performance.
Here's what we'll do:
- We define our own bytecode instructions, specifying their operands and their encoding. Along the way, we also build a mini-disassembler for them.
- We write a compiler that takes in a Monkey AST and turns it into bytecode by emitting instructions
- At the same time we build a stack-based virtual machine that executes the bytecode in its main loop
We also
- build a symbol table and a constant pool
- do stack arithmetic
- generate jump instructions
- build frames into our VM to execute functions with local bindings and arguments!
- add built-in functions to the VM
- get real closures working in the virtual machine and learn why closure-compilation is so tricky
"Synopsis" may belong to another edition of this title.
WorldofBooks
Goring-By-Sea, WS, United Kingdom
AbeBooks seller since March 16, 2007
Shipping rates from United Kingdom to U.S.A.
| Item | 7 to 12 business days | 5 to 9 business days |
|---|---|---|
| First item | US$ 7.39 | US$ 15.84 |
Payment methods
Store description
In 2002, World of Books Group was founded on an ethos to do good, protect the planet and support charities by enabling more goods to be reused. Since then, we've grown into to a global company pioneering the circular economy. Today, we drive the circular economy through three re-commerce brands: - Wob: Through Wob, we sell. We provide affordable, preloved books and media to customers all over the world. A book leaves our collection of over seven million titles and begins a new chapter every two seconds, enabling more goods to be reused. - Ziffit: Through Ziffit, we buy. We give people around the world the opportunity to contribute to the circular economy, earn money and protect the planet, by trading their unwanted books and media. - Shopiago: Through Shopiago, we help others. By sharing the technology that has grown World of Books Group into the business it is today, we’re helping charities increase revenue and reduce waste through re-commerce.…
Specialty
COOKERY, RECYCLE, CHARITY, USED BOOKS, MODERN, HISTORY, CHILDRENS, FICTION, CHEAP BOOKS, NON -FICTIONSeller's business information
World of Books Ltd
Mulberry House, Woods Way Trading Estate
Goring-By-Sea, United Kingdom BN12 4QY
Terms of sale
WorldofBooks.com fully embraces the AbeBooks terms and conditions and we will do
what we can to resolve any issues.
Shipping terms
Orders ship within 2 business days. Shipping costs are based on books weighing 2.2 LB, or 1 KG. If your book order is heavy or oversized, we may contact you to let you know extra shipping is required.