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 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.

Io at a Glance — A Language a Day, Advent Calendar Day 23/24

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

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

Zig at a Glance — A Language a Day, Advent Calendar Day 22/24

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

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

D at a Glance — A Language a Day, Advent Calendar Day 21/24

About this ‘A Language a Day’ Advent Calendar This article became a part of my book ‘A Language a Day’, which you can get in both electronic and paper format. Languages covered in the book: C++, Clojure, Crystal, D, Dart, Elixir, Factor, Go, Hack, Hy, Io, Julia, Kotlin, Lua, Mercury, Nim, OCaml, Raku, Rust, Scala, and … Continue reading “D at a Glance — A Language a Day, Advent Calendar Day 21/24”

Mercury at a Glance — A Language a Day, Advent Calendar Day 20/24

About this ‘A Language a Day’ Advent Calendar This article became a part of my book ‘A Language a Day’, which you can get in both electronic and paper format. Languages covered in the book: C++, Clojure, Crystal, D, Dart, Elixir, Factor, Go, Hack, Hy, Io, Julia, Kotlin, Lua, Mercury, Nim, OCaml, Raku, Rust, Scala, and … Continue reading “Mercury at a Glance — A Language a Day, Advent Calendar Day 20/24”

Red at a Glance — A Language a Day, Advent Calendar Day 19/24

About this ‘A Language a Day’ Advent Calendar This series of publications transformed into my book ‘A Language a Day’, which you can get in both electronic and paper format. Languages covered in the book: C++, Clojure, Crystal, D, Dart, Elixir, Factor, Go, Hack, Hy, Io, Julia, Kotlin, Lua, Mercury, Nim, OCaml, Raku, Rust, Scala, and … Continue reading “Red at a Glance — A Language a Day, Advent Calendar Day 19/24”

Hy at a Glance — A Language a Day, Advent Calendar Day 18/24

About this ‘A Language a Day’ Advent Calendar This article became a part of my book ‘A Language a Day’, which you can get in both electronic and paper format. Languages covered in the book: C++, Clojure, Crystal, D, Dart, Elixir, Factor, Go, Hack, Hy, Io, Julia, Kotlin, Lua, Mercury, Nim, OCaml, Raku, Rust, Scala, and … Continue reading “Hy at a Glance — A Language a Day, Advent Calendar Day 18/24”

Go at a Glance — A Language a Day, Advent Calendar Day 17/24

About this ‘A Language a Day’ Advent Calendar This article became a part of my book ‘A Language a Day’, which you can get in both electronic and paper format. Languages covered in the book: C++, Clojure, Crystal, D, Dart, Elixir, Factor, Go, Hack, Hy, Io, Julia, Kotlin, Lua, Mercury, Nim, OCaml, Raku, Rust, Scala, and … Continue reading “Go at a Glance — A Language a Day, Advent Calendar Day 17/24”

V at a Glance — A Language a Day, Advent Calendar Day 16/24

About this ‘A Language a Day’ Advent Calendar This series of publications transformed into my book ‘A Language a Day’, which you can get in both electronic and paper format. Languages covered in the book: C++, Clojure, Crystal, D, Dart, Elixir, Factor, Go, Hack, Hy, Io, Julia, Kotlin, Lua, Mercury, Nim, OCaml, Raku, Rust, Scala, and … Continue reading “V at a Glance — A Language a Day, Advent Calendar Day 16/24”

Nim at a Glance — A Language a Day, Advent Calendar Day 15/24

About this ‘A Language a Day’ Advent Calendar This article became a part of my book ‘A Language a Day’, which you can get in both electronic and paper format. Languages covered in the book: C++, Clojure, Crystal, D, Dart, Elixir, Factor, Go, Hack, Hy, Io, Julia, Kotlin, Lua, Mercury, Nim, OCaml, Raku, Rust, Scala, and … Continue reading “Nim at a Glance — A Language a Day, Advent Calendar Day 15/24”