This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add := method(a, b, a + b) | |
getSlot("add") message setName("b") | |
getSlot("add") message next setName("-") | |
getSlot("add") message next argAt(0) setName("a") | |
# `add` now looks like | |
# method(a, b, b - a) | |
# Now I can't seem to get this part to work: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Syntax note: optionally whitespace-sensitive, \ is an alias for function, | |
// and -> at the end of a function means return the last value. | |
// Haskell-style (operator), which is implicit if an operator is the only | |
// argument to a function. | |
// The return value of a type function is compared to the value put in, | |
// and if they are === it type checks. | |
function Int(n) -> Math.floor(n) | |
function add(a: Int, b: Int) -> a + b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'yaml' | |
# colorscheme_dir is the directory where all the YAML color scheme files are stored, | |
# current_colorscheme is the path to a symlink to a file in that directory. | |
$colorscheme_dir = "#{ENV['HOME']}/colorschemes" | |
$current_colorscheme = "#{ENV['HOME']}/.colorscheme" | |
$i3_config = "#{ENV['HOME']}/.i3/config" | |
$i3_config_marker_start = "### Autogenerated by ~/scripts/colorscheme ###" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Scenario 2008-2009 Bruce Pascoe | |
Version 2.1 | |
Scenario is an advanced cutscene engine for Sphere which allows you to | |
coordinate complex cutscenes via forks and synchronization. | |
*/ | |
function Scenario () | |
{ | |
this.FadeMask = CreateColor(0,0,0,0); | |
this.FocusStack = []; |
NewerOlder