This document discusses lexical environments and execution contexts in ECMAScript according to ECMA-262 Edition 5. It explains how lexical environments contain environment records that bind identifiers to values and reference outer environments. Execution contexts contain a lexical environment, variable environment, and this binding. The document provides examples of identifier resolution, function closures, and how the with statement affects lexical and variable environments.
Не так давно Гор Нишанов представил свой доклад: C++ Coroutines a negative overhead abstraction. В этом докладе Гор упомянул, что предложенный дизайн корутин позволяет их использовать практически в любых окружениях, в том числе и с "бедным" C++ рантаймом.
Я решил попробовать запустить корутины в следующих окружениях: обычное приложение, драйвер ОС Windows, EFI приложение. Только в одном из этих окружений есть полноценный C++ рантайм и поддержка исключений, в остальных ничего этого нет. Более того, EFI приложение вообще выполняется до старта ОС.
Я хочу рассказать о том, как мне удалось запустить корутины в этих окружениях, поговорим о том, какие проблемы существуют в асинхронном системном программировании и как их можно обойти.
Не так давно Гор Нишанов представил свой доклад: C++ Coroutines a negative overhead abstraction. В этом докладе Гор упомянул, что предложенный дизайн корутин позволяет их использовать практически в любых окружениях, в том числе и с "бедным" C++ рантаймом.
Я решил попробовать запустить корутины в следующих окружениях: обычное приложение, драйвер ОС Windows, EFI приложение. Только в одном из этих окружений есть полноценный C++ рантайм и поддержка исключений, в остальных ничего этого нет. Более того, EFI приложение вообще выполняется до старта ОС.
Я хочу рассказать о том, как мне удалось запустить корутины в этих окружениях, поговорим о том, какие проблемы существуют в асинхронном системном программировании и как их можно обойти.
This contains all the slides used in Silicon Valley Code Camp presentation on Sunday Oct 4, 10:45 session on "Amazing new features in JavaScript". At the end ut also includes the last year presentation covering ES 5
ITGM #9 - Коварный CodeType, или от segfault'а к работающему кодуdelimitry
Доклад с ITGM #9 рассказывающий про реальный пример поиска и исправления Segmentation fault при генерации функции на Python в одном проекте
(Доклад вместе с http://www.slideshare.net/AndreyZakharevich)
A brief look at the new features coming in Javascript ES6:
- Scope and control
- Iterators and Generators
- Collections
- Typed objects
- Direct proxies
- Template strings
- API improvements
- Modularity
Practical JavaScript Programming - Session 6/8Wilson Su
JavaScript is one of the most popular skills in today’s job market. It allows you to create both client- and server-side applications quickly and easily. Having a solid understanding of this powerful and versatile language is essential to anyone who uses it.
“Practical JavaScript Programming” does not only focus on best practices, but also introduces the fundamental concepts. This course will take you from JavaScript basics to advanced. You’ll learn about topics like Data Types, Functions, Events, AJAX and more.
Explaining ES6: JavaScript History and What is to ComeCory Forsyth
An overview of some of the history of JavaScript, how it became ECMAScript (and what Ecma is), as well as highlights of the new features and syntax in ES6 aka ES2015.
Originally presented to the New York Public Library on June 4 2015.
Those slides, inspired by the works and ideas of many, are a state of what PHP gets in upgrades as of Q4 2018.
Market share and evolution.
PHP 7.3
PHP 7.4
PHP 8.0
This contains all the slides used in Silicon Valley Code Camp presentation on Sunday Oct 4, 10:45 session on "Amazing new features in JavaScript". At the end ut also includes the last year presentation covering ES 5
ITGM #9 - Коварный CodeType, или от segfault'а к работающему кодуdelimitry
Доклад с ITGM #9 рассказывающий про реальный пример поиска и исправления Segmentation fault при генерации функции на Python в одном проекте
(Доклад вместе с http://www.slideshare.net/AndreyZakharevich)
A brief look at the new features coming in Javascript ES6:
- Scope and control
- Iterators and Generators
- Collections
- Typed objects
- Direct proxies
- Template strings
- API improvements
- Modularity
Practical JavaScript Programming - Session 6/8Wilson Su
JavaScript is one of the most popular skills in today’s job market. It allows you to create both client- and server-side applications quickly and easily. Having a solid understanding of this powerful and versatile language is essential to anyone who uses it.
“Practical JavaScript Programming” does not only focus on best practices, but also introduces the fundamental concepts. This course will take you from JavaScript basics to advanced. You’ll learn about topics like Data Types, Functions, Events, AJAX and more.
Explaining ES6: JavaScript History and What is to ComeCory Forsyth
An overview of some of the history of JavaScript, how it became ECMAScript (and what Ecma is), as well as highlights of the new features and syntax in ES6 aka ES2015.
Originally presented to the New York Public Library on June 4 2015.
Those slides, inspired by the works and ideas of many, are a state of what PHP gets in upgrades as of Q4 2018.
Market share and evolution.
PHP 7.3
PHP 7.4
PHP 8.0
Think Async: Asynchronous Patterns in NodeJSAdam L Barrett
JavaScript is single threaded, so understanding the async patterns available in the language is critical to creating maintainable NodeJS applications with good performance. In order to master “thinking in async”, we’ll explore the async patterns available in node and JavaScript including standard callbacks, promises, thunks/tasks, the new async/await, the upcoming asynchronous iteration features, streams, CSP and ES Observables.
Découverte d'algèbre, d'interpréteur par la création d'un DSL pour la base de données Aerospike. Le tout est implémenté dans le langage Scala avec un style fonctionnel.
1. what is the different unbuffered and buffered channel?
2. how to implement a job queue in golang?
3. how to stop the worker in a container?
4. Shutdown with Sigterm Handling
5. Canceling Workers without Context
6. Graceful shutdown with worker
7. How to auto-scaling build agent?
8. How to cancel the current Job?
ZIO: Powerful and Principled Functional Programming in ScalaWiem Zine Elabidine
This is an introduction of purely functional programming type safe abstractions that provide a variety of features for building asynchronous and concurrent applications data structures built on ZIO.
You'll learn by examples about the power of functional programming to solve the hard problems of software development in a principled, without compromises.
This is the slide for what I shared in JS Group meetup, 2014, Taiwan. It covers what JavaScript could do for making the program more "functional", the benefits, price and the limitation.
What is ES6/ES2015, and what does it mean for Javascript development? What does the new syntax look like, and how can we use it today? Featuring side-by-side comparisons!
5. I will note that there are some real
improvements in ES5, in particular to
Chapter 10 which now uses declarative
binding environments. ES1-3's abuse of
objects for scopes (again I'm to blame
for doing so in JS in 1995, economizing on objects
needed to implement the language in a big hurry) was
a bug, not a feature.
https://mail.mozilla.org/pipermail/es-discuss/2010-April/010915.html
13. Components of Lexical Environment
lexical environment = {
environment record : -,
outer environment reference : -
}
지역 식별자 덩어리
유효범위 내의 식별자를 바인딩
중첩 유효범위를 가질 수 있는 환경에
서 상위 lexical environment를 참조
14. 2 type of environment record
Declarative
vs
Object
19. function sum(x, y){
var result = x + y;
var barr = function(){
console.log("barr");
}
function printResult(){
console.log(result);
}
return printResult;
}
sum(10, 20);
Global
Execution Context
sum’s
Execution Context
Function Code
20. thisBinding
sunFunctionEC.thisBinding = null;
function sum(x, y){
var result = x + y;
var barr = function(){
console.log("barr");
}
function printResult(){
console.log(result);
}
return printResult;
}
sum(10, 20);
{
ThisBinding : null,
}
sumFunctionEC
21. thisBinding
sunFunctionEC.thisBinding = null;
function sum(x, y){
var result = x + y;
var barr = function(){
console.log("barr");
}
function printResult(){
console.log(result);
}
return printResult;
}
sum(10, 20);
{
ThisBinding : null,
}
sumFunctionEC
ThisBinding이 null, undefined인 경우
this = global
“use strict” 모드에서는
this = null
32. outer environment reference
The outer environment reference is used
to model the logical nesting of Lexical Environment values
33. var a = 10;
(function foo() {
var b = 20;
(function bar() {
var c = 30;
console.log( a + b + c );
})();
})();
Identifier Resolution #1
Global
Execution Context
foo’s
Execution Context
bar’s
Execution Context
34. var a = 10;
(function foo() {
var b = 20;
(function bar() {
var c = 30;
console.log( a + b + c );
})();
})();
LexicalEnvironment : {
EnvironmentRecord : {
c : 30
}
OuterEnvironmentReference :
fooEC.LexicalEnvironment
},
bar’s EC
LexicalEnvironment : {
EnvironmentRecord : {
b : 20
}
OuterEnvironmentReference :
globalEC.LexicalEnvironment
},
foo’s EC
LexicalEnvironment : {
EnvironmentRecord : {
a : 10
}
OuterEnvironmentReference : null
},
Global EC
Identifier Resolution #1
35. var a = 10;
(function foo() {
var b = 20;
(function bar() {
var c = 30;
console.log( a + b + c );
})();
})();
LexicalEnvironment : {
EnvironmentRecord : {
c : 30
}
OuterEnvironmentReference :
fooEC.LexicalEnvironment
},
barEC
LexicalEnvironment : {
EnvironmentRecord : {
b : 20
}
OuterEnvironmentReference :
globalEC.LexicalEnvironment
},
fooEC
LexicalEnvironment : {
EnvironmentRecord : {
a : 10
}
OuterEnvironmentReference : null
},
globalEC
Identifier Resolution #2
37. A lexical environment that defines the environment
in which a Function object is executed.
Function Object’s
Internal property
[[Scope]]
38. function sum(x, y){
var result = x + y;
function printResult(){
console.log("foo:”+ result);
}
return printResult;
}
var print = sum(10, 20);
print();
LexicalEnvironment = {
EnvironmentRecord : {
x : 10,
y : 20,
result : undefined,
printResult : function
},
OuterEnvironmentReference :
globalEC.lexicalEnvironment
},
ThisBinding : null
sum’s EC
[[Scope]]:
printResult function
sumEC’s lexical environment
Creating Function Object
39. function sum(x, y){
var result = x + y;
function printResult(){
console.log("foo:”+ result);
}
return printResult;
}
var print = sum(10, 20);
print();
[[Scope]]:
printResult function
sumEC’s lexical environment
ThisBinding : null
sum’s EC
LexicalEnvironment = {
EnvironmentRecord : {
x : 10,
y : 20,
result : undefined,
printResult : function
},
OuterEnvironmentReference :
globalEC.lexicalEnvironment
},
Closure
40. function sum(x, y){
var result = x + y;
function printResult(){
console.log("foo:”+ result);
}
return printResult;
}
var print = sum(10, 20);
print();
[[Scope]]:
printResult function
sumEC’s lexical environment
LexicalEnvironment = {
EnvironmentRecord : {
x : 10,
y : 20,
result : undefined,
printResult : function
},
OuterEnvironmentReference :
globalEC.lexicalEnvironment
},
Closure
41. [[Scope]]: sumEC’s lexical environment
printResult function
Creating printResult’s EC
LexicalEnvironment = {
EnvironmentRecord : {
…
},
OuterEnvironmentReference :
sumEC’s lexical environment
},
ThisBinding : null
printResult’s ECfunction sum(x, y){
var result = x + y;
function printResult(){
console.log("foo:”+ result);
}
return printResult;
}
var print = sum(10, 20);
print();
46. The value of the VariableEnvironment component
never changes while the value of the
LexicalEnvironment component
may change
during execution of code within an execution context.
- 10.3 Execution Contexts in ECMA 262-5 -