橋本 Hashimoto   Baku

橋本 Hashimoto   Baku

Glim (Scratchpad)

This page is a personal scratchpad.
  • Glisp はS式をやめたほうがいい問題

リネームするとすればこれ...?

文法

{
  a = f(b, 20)
  b = normalize([20, 30] + [30, 40])
  f = (x: Number) => {
    x * x
  }
  g(circle(20, 40, 50))
  g(
    // This is one-liner comment
    /*
      this is multiline comments
    */
    style = fill('red')
    transform = rotation((π/2)rad + 2turn)
    
    circle#some\ id([50, 50], 100)
    ellipse#another\ id(20 40, 40, 20)

    ./#some\ id
  )

  square = (x: Number) =>
    `(~x * ~x)
}
^Type Value
Value: Type

どっちも使える

square = ^{
  doc: "Squares the input"
}

うーん、ダサい

やっぱり Glisp の文法はすき