Skip to content

Instantly share code, notes, and snippets.

View samuelgoto's full-sized avatar
💭
hello world!

Sam Goto samuelgoto

💭
hello world!
View GitHub Profile
@samuelgoto
samuelgoto / gns.md
Last active January 27, 2018 00:30

A human-readable and shareable naming system to open location codes on top of DNS with the proper authority verification. The system works as a hierarchical delegation of authority which is used to enforce authority: the owner of a GNS sub-domain should indeed be the owner of that geo location.

Examples

  • 23450.mount-eden.saratoga.ca.us
  • 360.aldo-grigol.campinas.sp.br

Use Cases

Publishing digital content associated with an address that you own: augmented reality assets, post signs, security codes, menus, reservation forms, etc.

Introduction

I'll use this doc here to aggregate some extra information for people visting the Bay Area for the TC39 meeting.

Feel free to add advice at the bottom as a comment!!

Airports

  • San Jose Airport: smaller but great airport, really close to the meeting, super conveninent. Smaller than SFO so fewer flights, but if you find anything landing there I'd use it. Could save you a lot of headache worrying about traffic to SFO.
  • San Francisco Airport: bigger airport, farther from the meeting. Huge, so a lot more options to fly in and out. About 45 mins away from the meeting without traffic and 1h30 hours with rush hour traffic.

Message Passing

const api = await remote {
  import foo from 'foo.js';

  export class A {
    func() {

Markdown

example:

# import "http://commonsense.org/stdlib.en"
# import "http://opentable.com/restaurants.en"

...
@samuelgoto
samuelgoto / microforms.md
Last active October 16, 2017 17:01
A hypermedia API file type

Microforms

microforms is a file type (application/microforms) designed to expose REST endpoints.

The syntax, inspired by kotlin, is designed to intermingle data (text) with control (hypertext) more ergonomically (compared to HTML or JSON).

Like HTML, it defines a set of affordances (e.g. links, forms, imports, etc, designed to be isomorphic to HTML) and is typically used with a client side library that follows instructions sent by the server.

{

This is a very early stage 0 exploration to add enums to Javascript, as a syntatic simplication over a common pattern to define enumerations.

Introduction

Enums come up often in code bases (TODO: try to estimate a number) and it is easy to get it incorrectly. Specifically, it is easy to forget:

  • to Object.freeze the object
  • to declare it as a const which avoids having the symbol redefined

With this in mind, we propose a nem keyword to javascript, say enum which de-sugars to the following:


THIS DRAFT HAS BEEN SUPERCEEDED BY THIS


This is a stream of random notes taken while talking to @rbuckton and @dherman about throw expressions and do expressions, as well as an early exploration of an attempt to get some clarity towards a cohesive/coherent story between the different statement types.

Categorization

This is not a perfect categorization, just one of many :) Also, originally categorized by @rbuckton in his presentation (and polished here talking f2f).

This is a stage 0 proposal to add named parameters to Javascript.

In this formulation, an opt-in mechanism is introduced to expose parameter names with a new keyword as:

function dostuff(b as b, c as c) {
}

That enables callers of your function to use named parameters:

mustache

data

{
  "name": {
    "first": "Michael",
    "last": "Jackson"
 },