Home Page Icon
Home Page
Table of Contents for
Learn Bosque Programming
Close
Learn Bosque Programming
by
Learn Bosque Programming
Learn Bosque Programming
Contributors
About the authors
About the reviewers
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Section 1: Introduction
Chapter 1: Exploring Bosque
Identifying the need for another language
Learning what Intermediate Representation is
Discovering regularized programming
Understanding accidental complexity
Immutability
Loop-free
Indeterminate behaviors
Data invariant violations
Aliasing
How the experiment is going so far
What next?
Bosque applications
Cloud-first development
Automatic verification
Synthesis programming
Summary
Questions
Further reading
Chapter 2: Configuring the Bosque Environment
Technical requirements
Prerequisites for Bosque
64-bit operating system
The LTS version of Node.js and NPM
TypeScript
Installing a C++ compiler
Windows
Linux
MacOS
Installing Bosque
Setting up the IDE for Bosque
Windows
Linux and MacOS
Writing a "Hello, World!" program
Understanding the code
ExeGen – Ahead-of-time Bosque compilation
Parameters for ExeGen
Summary
Questions
Further reading
Chapter 3: Bosque Key Features
Technical requirements
Identifying immutable values
The let keyword
The var keyword
The ref keyword
Introducing typed strings
SafeString
StringOf
Discovering bulk algebraic data operations
Bulk read
Bulk update
Projection
Merge
Learning iterative processing in Bosque
Identifying recursive functions in Bosque
Validating program behavior using the built-in mechanism
Summary
Questions
Further reading
Section 2: The Bosque Language Overview
Chapter 4: Entrypoint Function
Technical requirements
Why do we need an entrypoint function?
Writing our first entrypoint function
Passing arguments and returning values
Summary
Questions
Further reading
Chapter 5: Types and Operators
Technical requirements
Bosque type system
Nominal type system
Structural type system
Core types
Int
Bool
String
Float64
Typed strings
SafeString<T>
StringOf<T>
Operators
Unary operators
Binary operators
Logic operators
Order comparison operators
Equality comparison operators
Select operators
Summary
Questions
Further reading
Chapter 6: Bosque Statements
Technical requirements
Writing comments
Understanding variables
Using constants
Using conditionals
Understanding switch
Understanding return and yield
Understanding blocks
Writing validations
Summary
Questions
Further reading
Chapter 7: Project: Bosque in the Cloud
Technical requirements
Defining requirements
Implementing the solution
Getting the RSSI values detected by the receiver for the three known access points
Calculating the distance in meters using each of the measured RSSI values
Calculating our x, y coordinates using the 2D trilateration method
Building an API to expose our program as a web service
Running our program in the cloud
Compiling the Bosque program
Running the Express server
Making an HTTP request to our exposed API
Summary
Further reading
Section 3: Practicing Bosque
Chapter 8: Expressions in Bosque
Technical requirements
Understanding parameters handling in Bosque
Recognizing named parameters
Using rest and spread operators
Key-value argument notation
Learning about scoped access and invocations
Understanding variable scoped access
Learning about scoped invocations
Chaining in Bosque
Introducing PCode types and constructors
Recognizing PCode types
Discovering PCode constructors
Identifying access operators
The tuple typed access operator
The record typed access operator
The nominal typed access operator
Summary
Questions
Chapter 9: Collections
Technical requirements
Learning about List and ListOf
Reviewing standard List methods
Discovering Bosque additions to List
Introducing ListOf
Getting familiar with Map and DynamicMap
Reviewing standard Map methods
Discovering Bosque additions to Map
Introducing DynamicMap
Understanding Set and DynamicSet
Reviewing standard Set methods
Discovering Bosque additions to Set
Introducing DynamicSet
Discovering Stack and Queue
Reviewing Stack methods
Reviewing Queue methods
Summary
Questions
Further reading
Chapter 10: Iterative Processing and Recursion
Technical requirements
Learning about structured loops
Practicing iterative processing without structured loops
Multiplying vectors
Grouping list elements by key
Discovering the NSIterate namespace and its helper functions
The reduce<T>() function
The steps<S>() function
The until<S>() and while<S>() functions
Recursion and the recursive keyword
Summary
Questions
Further reading
Chapter 11: Project: AI Classifier
Technical requirements
Defining project requirements
Understanding the approach
Brief introduction to neural networks
Designing a model
Implementing the intelligent model
Creating the basic functionality
Writing the training algorithm
Wrapping the classification feature
Defining two entrypoint functions
Testing the program
Improving the code
Enhancing ideas and suggestions
Summary
Questions
Further reading
Section 4: Exploring Advanced Features
Chapter 12: Namespaces, Concepts, and Entities
Technical requirements
Using namespaces to organize code
Understanding concepts and entities
Concepts
Entities
Exploring fields and methods
Using inheritance
Using static methods
Understanding parametric polymorphism
Summary
Questions
Chapter 13: Testing in Bosque
Technical requirements
Discovering symbolic execution
Introducing SymTest – the Bosque symbolic testing tool
Creating an alias for the SymTest command
Command line parameters and flags
Practicing symbolic testing
Working with sanity checks in Bosque
Summary
Questions
Further reading
Chapter 14: Project: Path Optimizer
Technical requirements
Defining requirements
Implementation of the program
Storing our problem data in an orderly structure
Implementing Dijkstra's algorithm to get the optimal route
Processing our data using the written algorithm and returning a human-readable format
Demo and running our program
Summary
Questions
Further reading
Appendix A: Advanced Topics
Technical requirements
Discovering the Bosque source code and the project structure
Understanding the design of a programming language
Looking at the Bosque source code
Summarizing the Bosque structure
Learning how to report bugs and feature requests
Learning how to contribute
Summary
Questions
Further reading
Appendix B: What's Next in Bosque?
Exploring the Bosque language roadmap
What we should expect in the next versions
Summary
Why subscribe?
Other Books You May Enjoy
Packt is searching for authors like you
Leave a review - let other readers know what you think
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Next
Next Chapter
Learn Bosque Programming
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset