Skip to content

Instantly share code, notes, and snippets.

View jorendorff's full-sized avatar

Jason Orendorff jorendorff

View GitHub Profile
changeset: 509196:cd2bd76439e0
user: Jason Orendorff <[email protected]>
date: Wed Oct 24 14:20:29 2018 -0500
files: js/src/tests/non262/ReadableStream/basic-pull.js js/src/tests/non262/ReadableStream/basic-push.js js/src/tests/non262/ReadableStream/shell.js
description:
Bug 1503012 - Part 1: Some basic ReadableStream tests that run in the shell. r?tcampbell
diff --git a/js/src/tests/non262/ReadableStream/basic-pull.js b/js/src/tests/non262/ReadableStream/basic-pull.js
new file mode 100644
Cannot find `DA:5,1` in the following Lcov result:
TN:Realm_5f107b2f000
SF:self-hosted
FN:7826,WeakSetConstructorInit
FN:7815,WeakMapConstructorInit
FN:7787,FilterTypedSeqImpl
FN:7758,ReduceTypedSeqImpl
FN:7732,DoMapTypedSeqDepthN
FN:7724,DoMapTypedSeqDepth1Simple
FN:7711,DoMapTypedSeqDepth1
Compiling baldrdash v0.1.0 (/Users/jorendorff/work/gecko/js/src/wasm/cranelift)
error: failed to run custom build command for `baldrdash v0.1.0 (/Users/jorendorff/work/gecko/js/src/wasm/cranelift)`
process didn't exit successfully: `/Users/jorendorff/work/gecko/js/src/build_TEST.OBJ/js/src/rust/debug/build/baldrdash-ce641da643be4c49/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=baldrapi.h
cargo:rerun-if-changed=/Users/jorendorff/work/gecko/js/src/build_TEST.OBJ/js/src/rust/extra-bindgen-flags
--- stderr
/usr/local/Cellar/llvm/7.0.0/lib/clang/7.0.0/include/inttypes.h:30:15: fatal error: 'inttypes.h' file not found
/usr/local/Cellar/llvm/7.0.0/lib/clang/7.0.0/include/inttypes.h:30:15: fatal error: 'inttypes.h' file not found, err: true

Changes in the standard that we need to adopt

  • "3.8.3. new ReadableStreamDefaultController" and "3.10.3 new ReadableByteStreamController" should always throw a TypeError now. Controller setup is done in "3.9.11. SetUpReadableStreamDefaultController".

    Our CreateReadableByteStreamController() is also questionable.

  • 3.8.4.2 has changed; ReadableStreamDefaultControllerCanCloseOrEnqueue

console.log("hel")
console.log("lowo")
console.log("rld")

Real-world testing for readable streams

The goal of this testing project is to:

  • Find existing web sites that actually do use streams in Firefox Nightly (when streams are enabled);

  • Test the user experience with those sites and report any bugs or performance problems.

(We already have API-level tests for streams that run in automation, so we are not requesting new automated tests that exercise the streams API directly.)

;; amb.scm - Nondeterminism using call/cc <3
(define (fail)
(error 'require "no solutions"))
(define backtrack fail)
(define (require ok)
(if (not ok)
(backtrack)))
// bug 1479391
var g = newGlobal();
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
dbg.onDebuggerStatement = frame => {
frame.onPop = () => ({return: "ok"});
};
g.eval("function* g() { for (var i = 0; i < 10; i++) { debugger; yield i; } }");
g.eval("var it = g();");
var rv = gw.executeInGlobal("it.next()");

Author Notes: This recipe is served as a starter to each dinner table at Kindred Restaurant in Davidson, North Carolina. But the dough doesn't stop there. It can be used as sandwich bread, French toast, burger buns, doughnuts, and more. This is a bread that merges utility and taste, seamlessly. —catherine margaret o'donnell

Makes: 6 rolls, two 9- by 5-inch loaves, or 12 split-top buns
Prep time: 2 hrs
Cook time: 1 hrs

  • 5 1/3 cups bread flour, divided, plus more for surface (Kindred uses King Arthur)
  • 1 cup heavy cream
  • 1/3 cup mild honey (such as wildflower or alfalfa)
  • 3 tablespoons nonfat dry milk powder (such as Alba)

Anomalies in mainstream programming language grammar: an incomplete freak show

Parser generators have existed forever. Why don't any serious compilers use them?

Well, Python uses one... written from scratch to parse Python, unsuitable for any other project.

One reason is that programming languages are such amazing trash. The more widely used a language is, the more likely it is