Note: For now, Apple Silicon users need to be set up for x86 mode
First, download Go or brew install go
. Then, put largetype.go
in a directory called largetype
and from there run:
$ go mod init largetype
from boto.route53.connection import Route53Connection | |
# your amazon keys | |
key = "" | |
access = "" | |
if __name__ == '__main__': | |
zones = {} | |
route53 = Route53Connection(key, access) | |
#!/usr/bin/env ruby | |
module PipeOperator | |
refine Array do | |
def |(x) | |
PipeLine.new(self) | x | |
end | |
end | |
end |
ObjC.import('Cocoa') | |
function UserInterface() { | |
this.okButton = Button(300, 10, 90, 26); { | |
this.okButton.title = 'OK' | |
} | |
this.cancelButton = Button(210, 10, 90, 26); { | |
this.cancelButton.title = 'Cancel' | |
this.cancelButton.keyEquivalent = '\u{1b}' | |
} |
Note: For now, Apple Silicon users need to be set up for x86 mode
First, download Go or brew install go
. Then, put largetype.go
in a directory called largetype
and from there run:
$ go mod init largetype
package main | |
import ( | |
"bytes" | |
"crypto/rand" | |
"encoding/gob" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"time" |
The question: how can we use ES6 modules in Node.js, where modules-as-functions is very common? That is, given a future in which V8 supports ES6 modules:
export
syntax, without breaking consumers that do require("function-module")()
?import
syntax, while not demanding that the module author rewrites his code to ES6 export
?@wycats showed me a solution. It involves hooking into the loader API to do some rewriting, and using a distinguished name for the single export.
This is me eating crow for lots of false statements I've made all over Twitter today. Here it goes.
#!/bin/sh | |
# | |
# For each ref, validate the commit. | |
# | |
# - It disallows deleting branches without a /. | |
# - It disallows non fast-forward on branches without a /. | |
# - It disallows deleting tags without a /. | |
# - It disallows unannotated tags to be pushed. |
#!/usr/bin/env bash | |
VERSION=4.0.1 | |
SCRIPT=`basename "$0"` | |
APPNAME="My App" | |
APPICONS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns" | |
OSX_VERSION=`sw_vers -productVersion` | |
PWD=`pwd` | |
function usage { |
Before we get started…
Prefer script-src-elem
over script-src
for better cross-browser support of this solution.
I have a variation on this solution using embedded workers with blob URLs at https://gist.github.com/dfkaye/14e5cc5dbe5bb38a9d80f25f54061c7f.
This essay explains how the ES6 Realm API makes it possible to create robust language abstractions that allow hooking into the behavior of eval
, and how this can be used to implement different dialects of JavaScript.
Imagine we want to add Doug Crockford's ??
operator, which acts like a short-circuiting logical OR operator, except instead of checking truthiness, it returns the first argument's value if the first argument is any value other than undefined
.
Since it makes everything simpler and cleaner, I'm going to assume I can use do
-expressions for the implementation. (They're looking good for ES7!) So with that said, when we "crockpile" EXPR1 ?? EXPR2
we