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 };

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:

@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: {
Would it enable things like with(foo) { hello(); bar(); }?
much like lock(resource) { do(); }
https://kotlinlang.org/docs/reference/lambdas.html
?
@samuelgoto
samuelgoto / dsl.md
Last active November 29, 2017 22:24

Heavily inspired by kotlin and groovy, what would the following syntax simplication enable?

a {}

// syntact sugar for

a(function() {});

?

@samuelgoto
samuelgoto / docscript.md
Last active September 11, 2017 16:55
A hypermedia API type

mustache

data

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

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