Skip to content

Instantly share code, notes, and snippets.

View leobalter's full-sized avatar
💭
status

Leo Balter leobalter

💭
status
View GitHub Profile
// Status of today + dynamic import() proposal, await unwraps namespace objects.
//--- a.js
export let then = async () => {/* code */};
//--- b.js
import * as ns from 'a.js';
async function fn() {
await Promise.resolve(ns); // should unwrap the "thenable" namespace

The "search" event

whatwg/html#667

Some browsers feature non-standard attributes incremental and onsearch for the <input type=search> elements. This also implies the search event being fired.

  • Specified? no
  • Proposed? no.
    • This link shows a refusal to propose the idea and reasons for it.
  • Is it a good idea? no.
  • The refusal to proposal the idea bases on the fact it's already redundant with the oninput and onsubmit event handlers
@leobalter
leobalter / karma.conf.js
Created November 12, 2015 23:01 — forked from frederickfogerty/karma.conf.js
Coverage + tests with webpack, babel, karma, mocha, and istanbul
var webpack = require('webpack')
module.exports = function (config) {
config.set({
browsers: [ 'Chrome' ], //run in Chrome
browserNoActivityTimeout: 60000,
singleRun: true, //just run once by default
frameworks: [ 'mocha' ], //use the mocha test framework
files: [
//'src/**/*.{jsx,js}',
#!/usr/bin/env perl
use strict;
use warnings;
use Getopt::Long qw(GetOptions);
my $args = '';
GetOptions(
Qual o resultado para:
// 1:
{}+{} // ?
// 2:
({}+{}) // ?
yarn test-test262
yarn test-test262 v1.0.2
$ babel-node scripts/test262.js
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
harness: Ran 0/181 (0.00%), Passed 0/0 (100%), Failed 0/0 (100%), Skipped 181/181 (100.00%)
intl402: Ran 0/44 (0.00%), Passed 0/0 (10
[~/dev/test262-integrator] (master)⚡
npm test
> test262-integrator@1.0.0 test /Users/leo/dev/test262-integrator
> node test/test.js
......
Failed: test/built-ins/ArrayBuffer/prototype/byteLength/detached-buffer.js
Test262Error: No method available to detach an ArrayBuffer
op_list = [
("<", lambda a, b: a < b, "less-than"),
("<=", lambda a, b: a <= b, "less-than-or-equal"),
(">", lambda a, b: a > b, "greater-than"),
(">=", lambda a, b: a >= b, "greater-than-or-equal"),
]
# This is the hex representation of Number.MAX_VALUE.
max_value_digits = "0xfffffffffffff8" + "0" * 242
@leobalter
leobalter / gist:1358053
Created November 11, 2011 13:55
Escrever Ruby de uma forma melhor, com tipagem ou código mais bonito!

Original em: http://leobalter.net/cases/escrever-ruby-de-uma-forma-melhor-com-tipagem-ou-codigo-mais-bonito/

Escrever Ruby de uma forma melhor, com tipagem ou código mais bonito!

Depois das ideias super bacanas que a comunidade Ruby trouxe, de fomentar o CoffeScript para escrever um “JavaScript” mais bonito, ou da Google de fazer o Dart para escrever um JavaScript “tipado”, resolvi também trabalhar em algo que deixaria o Ruby perfeito.

Puby e Juby! São dois projetos distintos mas com propósitos excelentes:

Puby