Navigation Menu

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
Verifying that "sfgoto.id" is my Blockstack ID. https://onename.com/sfgoto

Trying to collect some options discussed here and see what they look like with syntax highlighting from various threads (see reference).

// ruby
let map = { a => 1, b => 2, c => 3 };

// kotlin
let map = { a to 1, b to 2, c to 3 };
@samuelgoto
samuelgoto / react.md
Last active August 4, 2017 20:09
snippets of react

foobar

import React, { PropTypes } from 'react';
import { StyleSheet, css } from 'aphrodite/no-important';
import { spacing } from '../../styles/base/spacing';

// CSS in JS
const styles = StyleSheet.create({
 card: {

Introduction

This is an exploration of a DST to be embedded in javascript designed specifically to build and manipulate the HTML DOM.

Largely inspired by a {Kotlin, JFX, Protobuf, JSON-ish}-like syntax (to intermingle well with javascript code) and a JSX-like DOM building algorithm.

Basic idea

Introduce syntax to javascript to intermingle tree-like docs and code and vice versa. Something like this:

Would it enable things like with(foo) { hello(); bar(); }?
much like lock(resource) { do(); }
https://kotlinlang.org/docs/reference/lambdas.html
?
@samuelgoto
samuelgoto / docscript.md
Last active September 11, 2017 16:55
A hypermedia API type

mustache

data

{
  "name": {
    "first": "Michael",
    "last": "Jackson"
 },
@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 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:


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).