Best of
Programming-Languages

2018

Getting Clojure


Russ Olsen - 2018
    The vision behind Clojure is of a radically simple language framework holding together a sophisticated collection of programming features. Learning Clojure involves much more than just learning the mechanics of the language. To really get Clojure you need to understand the ideas underlying this structure of framework and features. You need this book: an accessible introduction to Clojure that focuses on the ideas behind the language as well as the practical details of writing code.

Writing A Compiler In Go


Thorsten Ball - 2018
    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'll learn a lot about computers, how they work, what machine code and opcodes are, what the stack is and how to work with stack pointers and frame pointers, what it means to define a calling convention, and much more. 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

The Little Typer


Daniel P. Friedman - 2018
    Dependent types are a first-class part of a language, and are much more powerful than other kinds of types; using just one language for types and programs allows program descriptions to be as powerful as the programs they describe. The Little Typer explains dependent types, beginning with a very small language that looks very much like Scheme and extending it to cover both programming with dependent types and using dependent types for mathematical reasoning. Readers should be familiar with the basics of a Lisp-like programming language, as presented in the first four chapters of The Little Schemer.The first five chapters of The Little Typer provide the needed tools to understand dependent types; the remaining chapters use these tools to build a bridge between mathematics and programming. Readers will learn that tools they know from programming—pairs, lists, functions, and recursion—can also capture patterns of reasoning. The Little Typer does not attempt to teach either practical programming skills or a fully rigorous approach to types. Instead, it demonstrates the most beautiful aspects as simply as possible, one step at a time.

Kotlin Programming: The Big Nerd Ranch Guide


Matthew Mathias - 2018
     Based on Big Nerd Ranch's popular Kotlin Essentials course, this guide shows you how to work effectively with the Kotlin programming language through hands-on examples and clear explanations of key Kotlin concepts and foundational APIs. Written for Kotlin 1.2, this book will also introduce you to JetBrains' IntelliJ IDEA development environment. Whether you are an experienced Android developer looking for modern features beyond what Java offers or a new developer ready to learn your first programming language, the authors will guide you from first principles to advanced usage of Kotlin. By the end of this book, you will be empowered to create reliable, concise applications in Kotlin.

Beginning C++17: From Novice to Professional


Ivor Horton - 2018
    You'll start with the basics and progress through step-by-step examples to become a working C++ programmer. All you need are Beginning C++17 and any recent C++ compiler and you'll soon be writing real C++ programs. There is no assumption of prior programming knowledge.All language concepts that are explained in the book are illustrated with working program examples, and all chapters include exercises for you to test and practice your knowledge. Code downloads are provided for all examples from the text and solutions to the exercises.This latest edition has been fully updated to the latest version of the language, C++17, and to all conventions and best practices of so-called modern C++. Beginning C++17 also introduces the elements of the C++ Standard Library that provide essential support for the C++17 language. What You'll LearnDefine variables and make decisionsWork with arrays and loops, pointers and references, strings, and moreWrite your own functions, types, and operatorsDiscover the essentials of object-oriented programmingUse overloading, inheritance, virtual functions and polymorphismWrite generic function templates and class templates Get up to date with modern C++ features: auto type declarations, move semantics, lambda expressions, and moreExamine the new additions to C++17Who This Book Is ForProgrammers new to C++ and those who may be looking for a refresh primer on the C++17 programming language in general.

Get Programming with Go


Nathan Youngman - 2018
    By working through 32 quick-fire lessons, you'll quickly pick up the basics of the innovative Go programming language!Hobbyists, newcomers, and professionals alike can benefit from a fast, modern language; all you need is the right resource! Get Programming with Go provides a hands-on introduction to Go language fundamentals, serving as a solid foundation for your future programming projects. You'll master Go syntax, work with types and functions, and explore bigger ideas like state and concurrency, with plenty of exercises to lock in what you learn.What's inside* Language concepts like slices, interfaces, pointers, and concurrency* Seven capstone projects featuring spacefaring gophers, Mars rovers, ciphers, and simulations* All examples run in the Go Playground - no installation required!This book is for anyone familiar with computer programming, as well as anyone with the desire to learn.Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.