Learn Red Fundamentals of Red
Get up and running with the Red language for full-stack development
Ivo Balbaert
BIRMINGHAM - MUMBAI
Learn Red Fundamentals of Red
Copyright 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Richa Tripathi
Acquisition Editor: Denim Pinto
Content Development Editor: Akshada Iyer
Technical Editor: Abhishek Sharma
Copy Editor: Safis Editing
Project Coordinator: Prajakta Naik
Proofreader: Safis Editing
Indexer: Tejal Daruwale Soni
Graphics: Jisha Chirayil
Production Coordinator: Shraddha Falebhai
First published: May 2018
Production reference: 1170518
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78913-070-6
www.packtpub.com
To my wife, Christiane, for the loving support during the writing of this book
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
PacktPub.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Foreword
When a new language is created, programmers and technology pundits are quick to ask "Why?," whether it's a programming, markup, or modeling language. Designers are often criticized, rather than praised, as if looking for new and better approaches is a bad thing. The critics couldn't be more wrong. That doesn't mean every new tool or idea will succeed, in theory or in practice. However, we must keep trying, if we hope to move forward or even keep pace. The world isn't standing still, and neither can we. As a conservative technologist (nee Luddite), I have to be reminded of this from time to time.
When an author, in this day and age, writes a book about technology, others are quick to ask "Why? Isn't everything you need to know available on the internet?." Sure, if you know where to look, are able to separate the wheat from the chaff (Luddites love time-tested idioms), and your noble goal is to work from original sources. If, however, you're a programmer in 2018, you may not have the luxury and time for pure research about every new technology that comes along, at an ever-increasing pace.
At this point, you're looking for a TL;DR ( Too Long; Didn't Read) , right? You're three paragraphs in, and already feeling pressured to move on. Your time is valuable and isn't to be wasted. I couldn't agree more. That's why you should read this book. It is a TL;DR for the Red language, and the Red language is your TL;DR for software development.
If you've never heard of Red, you don't know what makes it special, how to use it, or what it's capable of. This book will show you. It's not a primer or a technical manual; it's an introduction. It's your friend Ivo, waving you over at a cocktail party and saying "Hey, this is Red. I think you two might get along. Red is..." and runs down Red's C.V. while throwing in a few saucy details to pique your interest.
The more you talk to Red, the more it opens your mind to new ways of thinking. That's your job, remember? Thinking and solving problems. Writing code is, or should be, incidental. Sadly, the complexity of modern software development has turned things upside down, while simultaneously sucking the fun out of making software. Red wants to change that, and this book will help you get started.
Red will seem familiar, but also strange. It's approachable, but technically advanced. There's nothing quite like it (except its predecessor, Rebol, of course). One minute you're using it as a scripting language, the next it's cross-compiling your reactive GUI application, from your current environment, with C-level speed extensions, into stand-alone executables, each about 1 MB in size. You look like a superhero, but your sidekick is the one doing all the work.
Or maybe you thought we don't need any new languages.
Gregg Irwin
Red Community Manager
Head of the Operational Team of the Red Language Foundation
Contributors
About the author
Ivo Balbaert is a former lecturer for (Web) programming and databases at CVO Antwerpen, a community college in Belgium. He received a PhD in applied physics from the University of Antwerp in 1986. He worked for 20 years in the software industry as a developer and consultant in several companies, and for 10 years as a project manager at the University Hospital of Antwerp. Since 2000, he has been partly teaching, developing software, and writing technical books, among others:
- Rust Essentials
- Getting Started with Julia
- The Way to Go
I would especially like to thank my reviewer, Rudolf Meijer, who clarified many things and made this book so much better and more accurate. Also, my gratitude to the many experts in the Red community, especially Mike Parr, Nick Antonaccio, and Andr Ungaretti, and above all, the deepest admiration for Nenad Rakocevic, the creator of Red, and Carl Sassenrath, who started it all with Rebol.
Next page