This file contains 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
match someVal { | |
someFunc => {} | |
} | |
// someFunc is called with someVal | |
// ==> if (someFunc(someVal)) |
This file contains 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
A: class { | |
init: func {} | |
} | |
main: func { | |
a := A new() | |
if (a class == A) | |
"yay" println() | |
} |
This file contains 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
// imports | |
var sys = require("sys"); | |
var XMLHttpRequest = require("../../node-XMLHttpRequest/XMLHttpRequest").XMLHttpRequest; | |
function myCallback(key, value) { | |
console.log(key); | |
}; | |
var xhr = new XMLHttpRequest(); | |
xhr.onreadystatechange = function() { |
This file contains 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
// imports | |
var sys = require("sys"); | |
var XMLHttpRequest = require("../../node-XMLHttpRequest/XMLHttpRequest").XMLHttpRequest; | |
function myCallback(key, value) { | |
console.log(key); | |
}; | |
var xhr = new XMLHttpRequest(); | |
xhr.onreadystatechange = function() { |
This file contains 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
var sys = require("sys"); | |
var XMLHttpRequest = require("../../node-XMLHttpRequest/XMLHttpRequest").XMLHttpRequest; | |
function myCallback(key, value) { | |
console.log(key); | |
}; | |
var xhr = new XMLHttpRequest(); | |
xhr.onreadystatechange = function() { | |
if (xhr.readystate == 4) { |
This file contains 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
A: class extends Exception { | |
init: func(=message) { init() } | |
init: func ~noArg { } | |
} | |
B: class extends A { init: super func} | |
C: class extends B { init: super func} | |
main: func { |
This file contains 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
A: class extends OSException { init: super func} | |
B: class extends A { init: super func} | |
main: func { | |
B new() throw() | |
} |
This file contains 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
A: class extends Exception { | |
init: func (=message) { | |
init() | |
} | |
init: func ~noOrigin { | |
x := getOSError() | |
if ((message != null) && (!message empty?())) { | |
message = message append(':') append(x) | |
} else message = x |
This file contains 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
import myclasses | |
main: func { B new() } |
This file contains 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
fs = require "fs" | |
buffer = require "buffer" | |
binary = require "./binarystream" | |
FILENAME = "pic.png" | |
HEADER = new buffer.Buffer([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A]) | |
read = (fName) => | |
fs.readFileSync(fName) |