Chapter 8. Building AST. Part 2

In the second part of this chapter, I am talking about building the AST fragments for hosting strings, arrays, and hashes, as well as bigger constructs such as expressions, and how to manipulate these elements in a program.

In the second part of this chapter, I am talking about building the AST fragments for hosting strings, arrays, and hashes, as well as bigger constructs such as expressions, and how to manipulate these elements in a program.

Chapter 8. Building AST. Part 1

In this chapter, we will be working on implementing AST, the abstract syntax tree, that represents the program in the form of connected nodes, which are responsible for atomic actions such as variable declaration, or computing a sum of two values, or calling a function. This is probably the most difficult and brain-puzzling chapters in the book.

In this chapter, we will be working on implementing AST, the abstract syntax tree, that represents the program in the form of connected nodes, which are responsible for atomic actions such as variable declaration, or computing a sum of two values, or calling a function. This is probably the most difficult and brain-puzzling chapters in the book.

Chapter 7. Arrays and Hashes

In this chapter, we will extend the Lingua language with aggregate data types: arrays and hashes. From this point, we will call variables that contain numbers and strings scalar variables.

In this chapter, we will extend the Lingua language with aggregate data types: arrays and hashes. From this point, we will call variables that contain numbers and strings scalar variables.

On computing the number of recoveries

There are a number of issues with the raw COVID-19 statistical data. Most, if not all, of them come from the fact that different countries use different methods to get the numbers.

There are a number of issues with the raw COVID-19 statistical data. Most, if not all, of them come from the fact that different countries use different methods to get the numbers.

Chapter 6. Working with Strings

Until now, the language only worked with numbers—integer and floating point, both in regular and in scientific notation. In the following two chapters, we’ll update the language and integrate other data types to it: strings, arrays, and hashes. Let us start with strings.

Until now, the language only worked with numbers—integer and floating point, both in regular and in scientific notation. In the following two chapters, we’ll update the language and integrate other data types to it: strings, arrays, and hashes. Let us start with strings.

Chapter 5. Working on Grammar

In this chapter, we’ll review the grammar that was created so far and will try to make some changes to make the grammar and the actions more compact, more readable and more user-friendly. The bigger the language becomes, the more important it is to keep its code maintainable.

In this chapter, we’ll review the grammar that was created so far and will try to make some changes to make the grammar and the actions more compact, more readable and more user-friendly. The bigger the language becomes, the more important it is to keep its code maintainable.

A couple of syntax sweets in Raku

When working on preparing data for the covid.observer site, I discovered a couple of interesting findings, which I did not notice earlier or did not pay much attention to it.

When working on preparing data for the covid.observer site, I discovered a couple of interesting findings, which I did not notice earlier or did not pay much attention to it.

Chapter 4. A Better Interpreter

The goal of this chapter is to build a better interpreter using all the achievements of the previous three chapters. The new interpreter will be able to work with numbers of different types and to perform different arithmetic operations with variables. To make it even better, we’ll start with a very useful addition — comments.

The goal of this chapter is to build a better interpreter using all the achievements of the previous three chapters. The new interpreter will be able to work with numbers of different types and to perform different arithmetic operations with variables. To make it even better, we’ll start with a very useful addition — comments.

Chapter 3. Creating a Calculator

In this chapter, we will create a program that can evaluate simple arithmetic expressions such as 3 + 4 or 3 – 3 * 7. We’ll start from the simplest equations with two operands and will work until we can introduce parentheses.

In this chapter, we will create a program that can evaluate simple arithmetic expressions such as 3 + 4 or 3 – 3 * 7. We’ll start from the simplest equations with two operands and will work until we can introduce parentheses.

Chapter 2. Parsing a Number

In the following two chapters, we will temporary leave the compiler created in the previous chapter, and will be working on a separate helper project, a calculator. It is an interesting thing on its own, and we will explore it on an isolated example. In the next chapters, it will be integrated to the interpreter.

In the following two chapters, we will temporary leave the compiler created in the previous chapter, and will be working on a separate helper project, a calculator. It is an interesting thing on its own, and we will explore it on an isolated example. In the next chapters, it will be integrated to the interpreter.

Chapter 1. Creating a Simple Interpreter

Let’s start exploring the power or Raku’s grammars and regexes from a simple interpreter program that parses and executes the following tiny program. I will call this language Lingua.

Let’s start exploring the power or Raku’s grammars and regexes from a simple interpreter program that parses and executes the following tiny program. I will call this language Lingua.

My books on GitHub

Before the GitHub 02/02/2020 Archive program, I uploaded all my books published by DeepText to github.com/ash/books. I hope it will be frozen and archived for the future generations :-D.

Before the GitHub 02/02/2020 Archive program, I uploaded all my books published by DeepText to github.com/ash/books. I hope it will be frozen and archived for the future generations :-D.

🦋 Calling C++ and Fortran functions from Raku using the NativeCall interface

Some time ago, I published an article about using NativeCall in Raku to call functions written in C. Today, let’s see how you can call simple functions written in C++ or in Fortran.

Some time ago, I published an article about using NativeCall in Raku to call functions written in C. Today, let’s see how you can call simple functions written in C++ or in Fortran.

Factor at a Glance — A Language a Day, Advent Calendar 2019 Day 24/24

Welcome to Day 24 of this year’s A Language a Day Advent Calendar. Today’s topic is introduction to the Factor programming language.

Welcome to Day 24 of this year’s A Language a Day Advent Calendar. Today’s topic is introduction to the Factor programming language.