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 / docscript.md
Last active September 11, 2017 16:55
A hypermedia API type
@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() {});

?

Would it enable things like with(foo) { hello(); bar(); }?
much like lock(resource) { do(); }
https://kotlinlang.org/docs/reference/lambdas.html
?
@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:

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