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 »
November 21st, 2011 |
8 Comments |
4029 views
Category: Courses |
Tags: assignment, Essentials of interpretation, eval, Interpreter, lexical environment, Scope chain, variable
“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 »
August 10th, 2011 |
9 Comments |
6460 views
Category: Courses |
Tags: Essentials of interpretation, Interpreter, PLAI, SICP
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 »
July 26th, 2011 |
16 Comments |
6571 views
Category: ECMAScript |
Tags: Closure, declarative environment record, ECMA-262-5, environment record, Function Declaration, Function Expression, identifier resolution, lexical environment, name binding, object environment record, this binding, variable environment
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 »
February 23rd, 2011 |
0 Comments |
1795 views
Category: ECMAScript |
Tags: array extras, arrays, ECMA-262, ECMAScript 5, filter, foreach, JavaScript, map
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 »
February 7th, 2011 |
9 Comments |
4943 views
Category: Notes |
Tags: CoffeeScript, ECMAScript, Hoisting, Mutual recursion, Notes, SICP
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 »
January 31st, 2011 |
0 Comments |
2857 views
Category: Notes |
Tags: CoffeeScript, Evaluator, Interpreter, Lisp, Notes, Scheme, SICP
Read this article in: English, Chinese, Japanese, German, Arabic, Korean, French, Spanish.
Данная обзорная лекция является обобщением того, что мы изучили в курсе “Тонкости ECMA-262-3“. Каждый раздел статьи содержит ссылки на соответствующие главы цикла ES3, который вы, в случае желания и интереса, можете рассмотреть подробно, получив более глубокие и детальные описания тем.
Read more »
January 18th, 2011 |
35 Comments |
50695 views
Category: ECMAScript |
Tags: ECMA-262-3, ECMAScript, JavaScript, Russian, Scope chain, this, Замыкание, контекст исполнения, Объект активации, Объект переменных, ООП, Прототип, Фунарг
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 »
December 12th, 2010 |
23 Comments |
7573 views
Category: ECMAScript |
Tags: activation record, call-stack, Closure, dynamic scope, ECMA-262-5, environment frame, Funarg, lexical environment, lexical scope, name binding, static scope
Read this article in: Chinese, Japanese, German, Arabic, Russian, Korean, French, Spanish.
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 »
September 2nd, 2010 |
77 Comments |
65978 views
Category: ECMAScript |
Tags: Activation object, ECMA-262-3, ECMAScript, execution context, JavaScript, OOP, Scope chain, this, Variable object, [[Scope]]
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 »
June 25th, 2010 |
21 Comments |
5029 views
Category: Notes |
Tags: equality, non-strict equal, Notes, strict equal, typeof