Skip to content

Instantly share code, notes, and snippets.

View rwaldron's full-sized avatar

Rick Waldron rwaldron

  • Boston, MA
View GitHub Profile
// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.wake
description: >
Test that Atomics.wake wakes agents in the order they are waiting.
features: [Atomics, SharedArrayBuffer, TypedArray]
---*/
@rwaldron
rwaldron / results.txt
Created March 11, 2018 15:01
test/language/expressions/**/tco*.js
$ test262-runner "test/language/expressions/**/tco*.js"
--hostType=d8
FAIL test/language/expressions/call/tco-call-args.js (strict mode)
Expected no error, got RangeError: Maximum call stack size exceeded
FAIL test/language/expressions/call/tco-member-args.js (strict mode)
Expected no error, got RangeError: Maximum call stack size exceeded
FAIL test/language/expressions/call/tco-non-eval-function-dynamic.js (default)
Expected no error, got RangeError: Maximum call stack size exceeded
From 4aebb770e48493f9ca46ca708a6271c8b0ef3045 Mon Sep 17 00:00:00 2001
From: Rick Waldron <waldron.rick@gmail.com>
Date: Mon, 26 Feb 2018 12:33:54 -0500
Subject: [PATCH] Enable SharedArrayBuffer for Testing
---
Source/WTF/wtf/Platform.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
@rwaldron
rwaldron / Setting up Google Cloud Storage with CORS for Web Fonts.md
Created January 16, 2018 21:47 — forked from mhulse/Setting up Google Cloud Storage with CORS for Web Fonts.md
Setting up CORS on Google Cloud Storage: An unofficial quick start guide to serving web fonts from Google's cloud. (I'm sure a lot of this info could be improved... Please leave comments if you have tips/improvements.)

Login:

Google Cloud Storage

You'll want to login using an official Google account (i.e. if this is for your company, use the comapany Gmail account vs. a personal one.)

When logging in, you might be prompted to verify the account; if so, enter your cell number to get a verification e-mail or phone call.

Once verified, you'll have to agree to the terms of service; do that, and click continue.

/*
Discovered in https://github.com/tc39/test262/blob/master/test/built-ins/Array/S15.4_A1.1_T10.js
*/
var x = [];
var k = 1;
for (var i = 0; i < 32; i++) {
k = k * 2;
x[k - 2] = k;
}
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# ninja log v5
325 507 0 pal/src/CMakeFiles/Chakra.Pal.dir/cruntime/silent_printf.cpp.o 510d96c6ced2561f
326 548 0 pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/file.cpp.o 596ad9e2f9a25a3
508 704 0 pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/filecrt.cpp.o 2c919074645016a6
549 749 0 pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/finite.cpp.o fe8bd1464762b1a9
706 889 0 pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/lstr.cpp.o a4b2cdd661c51dac
749 967 0 pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/malloc.cpp.o c7ef7f3f0d6e02cc
890 1132 0 pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/misctls.cpp.o b1fe18c32cfbaa40
968 1184 0 pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/mbstring.cpp.o bc43e84f72566ac2
1133 1385 0 pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/misc.cpp.o 72d122ccdc88d755

In JavaScript, all binding declarations are instantiated when control flow enters the scope in which they appear. Legacy var and function declarations allow access to those bindings before the actual declaration, with a "value" of undefined. That legacy behavior is known as "hoisting". let and const binding declarations are also instantiated when control flow enters the scope in which they appear, with access prevented until the actual declaration is reached; this is called the Temporal Dead Zone. The TDZ exists to prevent the sort of bugs that legacy hoisting can create.

Labyrinth generated with JavaScript:<br><br>
<script>
for (var line=1; line<60; line++) {
for(var i=1;i<29;i++) {
var s = (Math.floor((Math.random()*2)%2)) ? "╱" : "╲";
document.write(s);
}
document.writeln("<br>");
}
</script>
"use strict";
const net = require("net");
const monitor = {
connection: null,
queue: [],
write() {
if (monitor.connection === null) {
monitor.queue.push(arguments);
} else {
monitor.connection.write.apply(monitor.connection, arguments);