Book Image

Learn Red ? Fundamentals of Red

By : Ivo Balbaert
Book Image

Learn Red ? Fundamentals of Red

By: Ivo Balbaert

Overview of this book

A key problem of software development today is software bloat, where huge toolchains and development environments are needed in software coding and deployment. Red significantly reduces this bloat by offering a minimalist but complete toolchain. This is the first introductory book about it, and it will get you up and running with Red as quickly as possible. This book shows you how to write effective functions, reduce code redundancies, and improve code reuse. It will be helpful for new programmers who are starting out with Red to explore its wide and ever-growing package ecosystem and also for experienced developers who want to add Red to their skill set. The book presents the fundamentals of programming in Red and in-depth informative examples using a step-by-step approach. You will be taken through concepts and examples such as doing simple metaprogramming, functions, collections, GUI applications, and more. By the end of the book, you will be fully equipped to start your own projects in Red.
Table of Contents (13 chapters)
11
Assessments

What this book covers

Chapter 1, Red's Mission, talks about the main characteristics of Red and motivates the reader to embark on their Red journey.

Chapter 2, Setting Up for Development, teaches the reader how to install Red on their system and start working with the Red console and with code files in a development environment.

Chapter 3, Using Words, Values, and Types, takes a look at the basic building blocks of a Red program—words and values. We discuss the different types available in Red.

Chapter 4, Code-Controlling Structures, focuses on how blocks, values, and words are evaluated through conditions, loop structures, and selections. This chapter also shows you how to do error handling in Red. We illustrate this throughout the chapter by developing a guessing-number game.

Chapter 5, Working with Series and Blocks, helps you to understand that blocks and series form the foundation of Red code. Developing in Red primarily means working with blocks, so that's what we will learn.

Chapter 6, Using Functions and Objects, deals with how to make your code more compact and readable using of functions and objects.

Chapter 7, Working with Files, helps you learn how to use files as a data store. We examine reading and writing files, either data files or code files. We'll develop the topic through an ongoing example of downloading currency exchange rates.

Chapter 8, Parsing Data, explores a first Red dialect called parse, which is specialized in analyzing data streams. We apply it to get meaningful information from the currency rates we stored previously.

Chapter 9, Composing Visual Interfaces, introduces a second Red dialect to build cross-platform graphical user interfaces. It builds upon Chapter 5, Working with Series and Blocks, and Chapter 7, Working with Files, to build a visual frontend for our exchange rate download, and we'll also develop a basic contacts data store app.

Chapter 10, Advanced Red, encounters the power of reactive programming to build highly reactive apps. You will get an idea of the foundational layer of it all, namely Red/System. Furthermore, you get to know how to interact with the operating system and use some high-performance datatypes. Also, Red's future in the blockchain programming world is discussed. Finally, we discuss what lies ahead of us, and provide some pointers to deepen the readers' Red knowledge.