万本电子书0元读

万本电子书0元读

顶部广告

Learn Red – Fundamentals of Red电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:Ivo Balbaert

出  版  社:Packt Publishing

出版时间:2018-05-18

字       数:27.8万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Discover how to use the next-generation language Red for full-stack development, from systems coding over user-interfaces to blockchain programming About This Book ? Explore the latest features of Red to build scalable, fast, and secure applications ? Learn graphical programming and build highly sophisticated reactive applications ? Get familiar with the specific concepts and techniques of Red development, like working with series, viewing code as data, and using dialects. Who This Book Is For This book is for software developers and architects who want to learn Red because of its conciseness, flexibility, and expressiveness, and more specifically for its possibilities in GUI apps and blockchain / smart contracts programming. Some knowledge of the basic concepts and experience of any programming language is assumed. What You Will Learn ? Set up your Red environment to achieve the highest productivity ? Get grounded in Red, gaining experience and insight through many examples and exercises ? Build simple, compact, and portable applications ? Analyze streams of data through Parse ? Compose GUI applications with View and Draw ? Get prepared for smart contract blockchain programming in Red In Detail 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. Style and approach This book will gently guide you step by step into the fascinating programming universe of the Red language, offering real-world examples and practical exercises to sharpen your insight.
目录展开

Title Page

Copyright and Credits

Learn Red – Fundamentals of Red

Dedication

Packt Upsell

Why subscribe?

PacktPub.com

Foreword

Contributors

About the author

About the reviewer

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Conventions used

Get in touch

Reviews

Red's Mission

Technical requirements

A short history of Red

What Red stands for

Some history

What makes Red special?

A full-stack language – from the metal to the meta

Code is data and data is code

Data types built in

Small toolchain and executables

Dialects

Red's main features

Portability

Like a Swiss Army knife

Summary

Questions

Setting Up for Development

Technical requirements

Installing Red

Installing Red on Windows

Installing Red on Linux and macOS

A look at the source code

Working interactively in the Red console

Running and compiling your first script

Executing a script in the Red console

Compiling a script to an executable

Development mode

Release mode

Other compilation options

Red's compilation model

Development environments for writing Red

Simple text editors

More sophisticated editors

Summary

Questions

Using Words, Values, and Types

Technical requirements

Understanding words and values

Some common datatypes

Using blocks and parens

Comments

Word bindings

Inferring types

Assigning and copying

Working with words

More about types

Converting types

The type system

Evaluating expressions and blocks

Some basic operations

Working with Boolean values

Working with numbers

Making random objects

Order of evaluation

Evaluation with do and reduce

The structure of a Red program

Summary

Questions

Further reading

Code-Controlling Structures

Technical requirements

Getting input from the user – input and ask

Testing conditions

if

unless

either

Stopping a program – halt or quit

switch and case

catch and throw

Structuring repetitions

Repeating a number of times – loop or repeat

Repeating with a condition – while or until

A number-guessing game

Handling errors

attempt and try

Using error?

Creating and catching errors

Checking types

Summary

Questions

Working with Series and Blocks

Technical requirements

Series and blocks

Navigating and looping through a series

A step at a time – head, tail, index?, and next

Looping through a series – foreach and forall

Getting information from a series

Selecting an item – pick and /

Searching for an item – select and find

Sorting

Changing a series

Changing items – poke, replace, and change

Adding new items – append, repend, and insert

append

repend

insert

Deleting items – remove and take

Moving items – move and swap

Series as sets

Copying a series

Strings as series

Splitting a string – split

Turning a series into a string – form

Rejoining a block – rejoin

Clearing part of a string – clear and trim

Adding to a string – append and insert

Other useful tricks

Summary

Questions

Using Functions and Objects

Technical requirements

A fauna of functions

The do word

The does word

The has word

The func word

The function word

Copying a local series

Function attributes

Passing arguments

Typing arguments

Return values – return and exit

Refinements

Code style and documentation strings

Working with functions

Error handling

Recursive functions

Importing functions with do

Code is data and data is code

Using reflection on functions

The source word

The body-of function

Changing the header and body of a function through code

Code is just data – load

Using objects

The make word

Working with objects

Creating objects

Working with fields and functions

Copying objects and inheritance

Looking inside an object

Summary

Questions

Working with Files

Technical requirements

Selecting a file or folder

Working with file paths and directories

Reading and writing data files

Working with binary files

The image! datatype

Downloading a file from the internet

Loading and saving files

Saving and loading the console history

Downloading currency exchange rates

Using query string parameters

Summary

Questions

Parsing Data

Technical requirements

The bitset! datatype

Understanding how parse works

First parse examples

Using some and any

Matching positions

Choosing with |

Searching, extracting, and changing

Working with variables – to, thru, and copy

Executing code on a match

Changing data – change, remove, and insert

More features and examples

Using end

Building special languages

Changing a rule on the fly

Parsing blocks and code

Debugging parse

Summary

Questions

Composing Visual Interfaces

Technical requirements

Structuring an interface

First example – a screen for downloading exchange rates

Running the example

Examining the code

Building a layout

Faces and actions

Two-way binding

Container settings – view

Changing an app's icon

View's refinements

Using do in view

Layout commands

A faces walkthrough

Base, box, and image

Text faces – h1, text, field, and area

Button, check, and radio

List faces – text-list, drop-list, and drop-down

Panel, group-box, and tab-panel

Progress bar and slider

Styles

Events and actors

Multiple events

Timer event

Actors are objects

Detecting the keyboard

Menus

Basic contacts app

An introduction to the draw dialect

Summary

Questions

Further reading

Advanced Red

Technical requirements

Reactive programming

Red/System

Comparing Red and Red/System

Calling a Red/System script from within Red

Interacting with the operating system

Getting input from command-line arguments

Calling an external program – call

Using the OS clipboard – read-clipboard

Datatypes for performance

The vector! datatype

The map! and hash! datatypes

Embedded Red and macros

Embedded Red

Macros

Red for smart contract programming

Red/C3

Using Red for writing dapps

Red's roadmap

Some useful references

Summary

Questions

Further reading

Assessments

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部