Essentials of interpretation. Checkpoint: part 1

This article describes in some details our interpreter which we have created during the course Essentials of interpretation. We summarize intermediate results and the main parts of the evaluator making notes which were omitted in the code articles.

Read more »

Essentials of interpretation. Intro.

“Essentials of interpretation” is a new series which consists of small lessons on interpretation of computer programs. The lessons are implemented in JavaScript and contain detailed comments. The sources can be found on the appropriate GitHub repository.

Available lessons:

Notes:

Read more »

ECMA-262-5 in detail. Chapter 3.2. Lexical environments: ECMAScript implementation.

Introduction

In this chapter we continue our consideration of lexical environments. In the previous sub chapter 3.1 we clarified the general theory related with the topic. In particular we have learned that the concept of environments is closely related with concepts of static scope and closures.

Read more »

JavaScript. Array “extras” in detail.

This is an external article written specially for Opera software and placed on the Opera’s developer center website.

In this article we’ll look at the functionality made available by the new methods of array objects standardized in ECMA-262 5th edition (aka ES5). Most of the methods discussed below are higher-order (we’ll clarify this term shortly below), and related to functional programming. In addition, most of them have been added to different JavaScript implementations since version 1.6 (SpiderMonkey), although these were only standardized in ES5.

Read more »

Note 4. Two words about “hoisting”.

My recent playground was the toy Scheme interpreter written in CoffeeScript. In the chapter of the metacircular evaluator of the SICP book, there is a section — 4.1.6 Internal Definitions suggesting to solve one interesting and subtle issue related with the (inner) definitions of functions.

Read more »

Note 3. CoffeeScript. Scheme on Coffee.

After the recent ECMAScript article on lexical environments, I wanted to provide some practical implementation of the general scope theory and variables look-up in the environment.

A good candidate for that became a toy Scheme interpreter written in the new and excellent language CoffeeScript. Also, beside the environment features, this task is quite interesting to play with interpreters themselves and their theory.

Read more »

JavaScript. Ядро.

Read this article in: English, Japanese, German, Arabic, Korean, French, Spanish, Chinese.

Данная обзорная лекция является обобщением того, что мы изучили в курсе “Тонкости ECMA-262-3“. Каждый раздел статьи содержит ссылки на соответствующие главы цикла ES3, который вы, в случае желания и интереса, можете рассмотреть подробно, получив более глубокие и детальные описания тем.

Read more »

ECMA-262-5 in detail. Chapter 3.1. Lexical environments: Common Theory.

Introduction

In this chapter we’ll talk in detail about lexical environments — a mechanism used in some languages to manage the static scoping. In order to understand this concept completely, we’ll also discuss briefly the alternative — dynamic scoping (which though isn’t used directly in ECMAScript). We’ll see how environments help to manage lexically nested structures of a code and to provide complete support of closures.

Read more »

JavaScript. The core.

Read this article in: Japanese, German, Arabic, Russian, Korean, French, Spanish, Chinese.

This note is an overview and summary of the “ECMA-262-3 in detail” series. Every section contains references to the appropriate matching chapters so you can read them to get a deeper understanding.

Read more »

Note 2. ECMAScript. Equality operators.


In this small note we clarify some technical features related with equality operators.

As we know in ECMAScript equality can be non-transitive.

Read more »