diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..5f8a2dd --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,68 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + // + + "version": "0.2.0", + "configurations": [ + + { + "type": "chrome", + "request": "launch", + "name": "launch local HTTP only", + "url": "http://localhost:8000/index.html", + "webRoot": "${workspaceFolder}", + //"runtimeArgs": [ "--disable-web-security" ], + "enableContentValidation": false, + "sourceMaps": true, + "sourceMapPathOverrides": { + "/Users/steve/_projects/sites/ioWASM/": "${workspaceRoot}/" + } + }, + + { + "type": "chrome", + "request": "launch", + "name": "build & launch local HTTP", + "url": "http://localhost:8000/index.html", + "webRoot": "${workspaceFolder}", + //"runtimeArgs": [ "--disable-web-security" ], + "preLaunchTask": "Build", + "enableContentValidation": false, + "sourceMaps": true, + //"sourceRoot": "${workspaceFolder}", + "sourceMapPathOverrides": { + "/Users/steve/_projects/sites/ioWASM/": "${workspaceRoot}/" + } + }, + + { + "type": "chrome", + "request": "launch", + "name": "api example local HTTP", + "url": "http://localhost:8000/api_example.html", + "webRoot": "${workspaceFolder}", + "runtimeArgs": [ + "--disable-web-security" + ], + "preLaunchTask": "Build api example", + "enableContentValidation": false, + "sourceMaps": true, + // "sourceRoot": "${workspaceFolder}/io-master" + + "sourceMapPathOverrides": { + "/Users/steve/_projects/sites/ioWASM/": "${workspaceRoot}/" + } + } + /* + { + "name": "Launch emrun", + "type": "shell", + "request": "launch", + "command": "emrun " + } + */ + + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b10fa9e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "cmake.configureOnOpen": true, + "files.associations": { + "assert.h": "c" + } +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..1b77bc6 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,107 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Run local node HTTPS server", + "type": "shell", + "command": "node", + "args": [ + "local-web-server/main.js" + ], + "options": { + "cwd": "${workspaceFolder}", + "_runner": "terminal", + "isBackground": "false", + }, + "presentation": { + "reveal": "silent", + "panel": "shared", + "clear": false, + "close": false, + }, + "problemMatcher": [], + }, + + { + "label": "Build", + "type": "shell", + "command": "/bin/zsh", + "args": [ + "./_compile.sh" + ], + "options": { + "cwd": "${workspaceFolder}", + "_runner": "terminal", + "isBackground": "false", + }, + "presentation": { + "panel": "shared", + "clear": false, + "close": true, + }, + "problemMatcher": [] + }, + + { + "label": "Build api example", + "type": "shell", + "command": "/bin/zsh", + "args": [ + "./api_example.sh" + ], + "options": { + "cwd": "${workspaceFolder}", + "_runner": "terminal", + "isBackground": "false", + }, + "presentation": { + "panel": "shared", + "clear": false, + "close": true, + }, + "problemMatcher": [] + } + /* + { + "label": "Build", + "type": "shell", + "command": "/bin/zsh", + "args": [ + "./_emcc_build.sh" + ], + "options": { + "cwd": "${workspaceFolder}/io-master", + "_runner": "terminal", + "isBackground": "false", + }, + "presentation": { + "reveal": "silent", + "panel": "shared", + "clear": true, + "close": true, + }, + "problemMatcher": [] + } + */ + + /* + + { + "label": "emrun", + "type": "shell", + "command": "emrun", + "args": [ + "${workspaceFolder}/io-master/tools/iovm.html" + ], + "options": { + "cwd": "${workspaceFolder}", + "_runner": "terminal", + "isBackground": "false", + } + } + */ + + ] +} \ No newline at end of file diff --git a/Boot.js b/Boot.js new file mode 100644 index 0000000..e67aa0e --- /dev/null +++ b/Boot.js @@ -0,0 +1,51 @@ +"use strict"; + +class Boot extends Object { + + files () { + return [ + "shared/Base/getGlobalThis.js", + "shared/Base/Base.js", + "shared/Base/Type.js", + "WasmLoader.js", + "IoRepl.js" + ] + } + + start () { + this._queue = this.files().slice() + this.loadNext() + } + + loadNext () { + if (this._queue.length) { + const file = this._queue.shift() + this.loadScript(file, () => this.loadNext()) + } else { + this.didFinish() + } + } + + loadScript (url, callback) { + //console.log("load url '" + url + "'") + const head = document.getElementsByTagName('head')[0]; + const script = document.createElement('script'); + //script.type = 'text/javascript'; + script.type = "module"; + script.src = url; + script.onreadystatechange = (event) => { + callback(); + } + script.onload = callback; + script.onerror = (error) => { + console.log(error) + } + head.appendChild(script); + } + + didFinish () { + //IoRepl.launch(); + } +}; + +new Boot().start() diff --git a/IoRepl.js b/IoRepl.js new file mode 100644 index 0000000..71e4bd0 --- /dev/null +++ b/IoRepl.js @@ -0,0 +1,219 @@ + + +// --------------------------------------------------------------------- + +/* +if (!window.chrome) { + const e = document.getElementById('status'); + e.innerHTML = "Sorry, this currently only works with the Chrome browser." + e.style.color = "orange" +} +*/ + + +(class IoRepl extends Base { + + static launch () { + const w = WasmLoader.shared() + w.setPath("./iovm.js") + w.setDelegate(IoRepl.shared()) + w.load() + } + + initPrototype () { + this.newSlot("wasmLoader", null) + this.newSlot("ioState", null) + this.newSlot("isEvaling", false) + this.newSlot("history", null) + this.newSlot("historyIndex", 0) + } + + init () { + super.init() + this.setHistory([]) + this.inputElement().addEventListener("keydown", (event) => { this.onKeyDown(event); }) + //this.inputElement().addEventListener("keyup", (event) => { this.onKeyUp(event); }) + } + + // --- WasmLoader protocol --- + + onLoadedWasm () { + this.run() + } + + onStandardError (s) { + this.addOutput(s) + } + + onStandardOutput (s) { + this.addOutput(s) + } + + // --- keyboard controls --- + + onKeyDown (event) { + //console.log("down ", event.keyCode, " meta: ", event.metaKey) + + const returnKeyCode = 13; + const upArrowKeyCode = 38; + const downArrowKeyCode = 40; + const kKeyCode = 75; + + if (event.keyCode == returnKeyCode && event.metaKey) { + this.onInput() + this.clearInput() + event.preventDefault() + } + + if (event.keyCode == upArrowKeyCode && event.metaKey) { + this.onCommandUpArrowKey(event) + } + + if (event.keyCode == downArrowKeyCode && event.metaKey) { + this.onCommandDownArrowKey(event) + } + + if (event.keyCode == kKeyCode && !event.shiftKey && event.metaKey) { + this.clearInput() + } + + if (event.keyCode == kKeyCode && event.shiftKey && event.metaKey) { + this.clearOutput() + } + + this.textAreaAdjust() + } + + outputElement () { + return document.getElementById('output'); + } + + inputElement () { + return document.getElementById('input'); + } + + statusElement () { + return document.getElementById('status'); + } + + replElement () { + return document.getElementById('repl'); + } + + resetIoState () { + this.setIoState(this.newIoState()) + } + + wasm () { + return WasmLoader.shared().module() + } + + newIoState () { + this.cleanup() + const ioState = this.wasm()._IoState_new() + this.wasm()._IoState_init(ioState); + return ioState + } + + cleanup () { + const ioState = this.ioState() + if (ioState) { + this.wasm()._IoState_free(ioState) + this.setIoState(null) + } + } + + run () { + this.setIoState(this.newIoState()) + this.statusElement().innerHTML = "" + //this.statusElement().display = "none" + this.replElement().style.opacity = 1 + this.replElement().style.animation = "fadein 2s" + this.inputElement().value = '"Hello world!"' + this.inputElement().focus() + } + + onInput () { + const s = this.inputElement().value + //console.log("onInput:'" + s + "'") + this.eval(s) + //this.clearInput() + } + + clearInput () { + this.inputElement().value = "" + //this.inputElement().focus() + } + + clearOutput () { + this.outputElement().innerHTML = "" + } + + eval (jsString) { + try { + this.addResultElement(jsString) + //const runString = jsString + const runString = "(" + jsString + ") println" + console.log("eval: ", runString) + this.setIsEvaling(true) + const ioState = this.ioState() + const wasm = this.wasm() + const ioLobby = wasm._IoState_lobby(ioState); + const cString = wasm.allocateUTF8(runString); + const cLabel = wasm.allocateUTF8("command line code"); + const result = wasm._IoState_on_doCString_withLabel_(ioState, ioLobby, cString, cLabel); + wasm._free(cString); + wasm._free(cLabel); + this.setIsEvaling(false) + //console.log("result:", result) + window.scrollTo(0, document.body.scrollHeight); + this.inputElement().focus() + } catch (e) { + this.addOutput("" + e) + this.resetIoState() + } + } + + addInput (text) { + this.outputElement().innerHTML += text + "
" + } + + addOutput (text) { + this.lastResultElement().innerHTML += text + '
'; + } + + addResultElement (text) { + const e = document.createElement('div') + e.innerHTML = '
' + text + '

'; + this.outputElement().appendChild(e) + } + + lastResultElement () { + const resultElements = document.getElementsByClassName("result"); + if (resultElements.length) { + return resultElements[resultElements.length-1] + } + return undefined + } + + onSampleMenu (selectedOption) { + const e = this.inputElement() + e.opacity = 0 + e.value = "" + e.style.animation = "" + setTimeout(() => { + e.value = selectedOption.value + e.opacity = 1 + e.style.animation = "fadein 1s" + }, 1) + } + + textAreaAdjust () { + const e = this.inputElement() + e.style.height = "1px"; + e.style.height = (20 + e.scrollHeight)+"px"; + } + +}.initThisClass()); + +IoRepl.launch() \ No newline at end of file diff --git a/WasmLoader.js b/WasmLoader.js new file mode 100644 index 0000000..63287e5 --- /dev/null +++ b/WasmLoader.js @@ -0,0 +1,92 @@ + +(class WasmLoader extends Base { + initPrototype () { + this.newSlot("path", "./iovm.js") + this.newSlot("module", null) + this.newSlot("delegate", null) + } + + init () { + super.init() + this.setModule({}) + this.setupModule() + } + + setupModule () { + const m = this.module() + + m.printErr = () => { + const d = this.delegate() + d.onStandardError.apply(d, arguments) + } + + m.print = () => { + const d = this.delegate() + d.onStandardOutput.apply(d, arguments) + } + + m.onRuntimeInitialized = () => { + const d = this.delegate() + d.onLoadedWasm.apply(d, arguments) + } + } + + load () { + import(this.path()).then((m) => { + m.default(this.module()) + }) + } + +}.initThisClass()); + +/* +window.IoWASM = { + preRun: [], + + postRun: [], + + 'printErr': function (text) { + console.log('stderr: ' + text) + }, + + print: function (text) { + if (arguments.length > 1) { + text = Array.prototype.slice.call(arguments).join(' '); + } + // These replacements are necessary if you render to raw HTML + text = text.replace(/&/g, "&"); + text = text.replace(//g, ">"); + text = text.replace('\n', '
', 'g'); + console.log(text); + IoRepl.shared().addOutput(text) + }, + + canvas: (function() { + var canvas = document.getElementById('canvas'); + // As a default initial behavior, pop up an alert when webgl context is lost. To make your + // application robust, you may want to override this behavior before shipping! + // See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2 + canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false); + return canvas; + })(), + + setStatus: function (text) { + console.log("setStatus:", text); + }, + + totalDependencies: 0, + + monitorRunDependencies: function (left) { + this.totalDependencies = Math.max(this.totalDependencies, left); + MyModule.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.'); + }, + + onRuntimeInitialized: function () { + window.main(this) + } +}; + +import initModule from "./iovm.js"; +initModule(IoWASM); +*/ \ No newline at end of file diff --git a/_compile.sh b/_compile.sh new file mode 100755 index 0000000..db38001 --- /dev/null +++ b/_compile.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +export PATH=$PATH:/Users/steve/_projects/sites/ioWASM/emscripten/emsdk/upstream/emscripten/ + +emcc \ + -I io-master/libs/basekit/source \ + -I io-master/libs/basekit/source/simd_cph/include \ + io-master/libs/basekit/source/*.c \ + -I io-master/libs/coroutine/source/ \ + io-master/libs/coroutine/emsource/*.c \ + -I io-master/libs/garbagecollector/source/ \ + io-master/libs/garbagecollector/source/*.c \ + -I io-master/libs/iovm/source/ \ + io-master/libs/iovm/source/*.c \ + -I io-master/libs/iovm/source/parson \ + io-master/libs/iovm/source/parson/*.c \ + -I io-master/addons/ReadLine/source \ + io-master/addons/ReadLine/source/*.c \ + -I io-master/addons/ReadLine/source/tiny-readline \ + io-master/addons/ReadLine/source/tiny-readline/readline.c \ + -g -gsource-map --source-map-base ./ --emit-symbol-map -o iovm.js \ + -s ASYNCIFY -s LINKABLE=1 -s EXPORT_ALL=1 -s EXPORT_ES6=1 \ + -s ALLOW_MEMORY_GROWTH=1 --profiling-funcs -s EMULATE_FUNCTION_POINTER_CASTS -s SAFE_HEAP=1 -s MODULARIZE=1 \ + -sENVIRONMENT=web + + # -s ASSERTIONS=1 // causes ERROR: "Exception has occurred: TypeError: Cannot set property thisProgram of # which has only a getter" + # -s DETERMINISTIC=1 // causes ERROR: "Exception has occurred: TypeError: Cannot set property thisProgram of # which has only a getter" diff --git a/emscripten/a.out.js b/emscripten/a.out.js new file mode 100644 index 0000000..6e487bc --- /dev/null +++ b/emscripten/a.out.js @@ -0,0 +1,2007 @@ + + +// The Module object: Our interface to the outside world. We import +// and export values on it. There are various ways Module can be used: +// 1. Not defined. We create it here +// 2. A function parameter, function(Module) { ..generated code.. } +// 3. pre-run appended it, var Module = {}; ..generated code.. +// 4. External script tag defines var Module. +// We need to check if Module already exists (e.g. case 3 above). +// Substitution will be replaced with actual code on later stage of the build, +// this way Closure Compiler will not mangle it (e.g. case 4. above). +// Note that if you want to run closure, and also to use Module +// after the generated code, you will need to define var Module = {}; +// before the code. Then that object will be used in the code, and you +// can continue to use Module afterwards as well. +var Module = typeof Module != 'undefined' ? Module : {}; + +// See https://caniuse.com/mdn-javascript_builtins_object_assign + +// See https://caniuse.com/mdn-javascript_builtins_bigint64array + +// --pre-jses are emitted after the Module integration code, so that they can +// refer to Module (if they choose; they can also define Module) +// {{PRE_JSES}} + +// Sometimes an existing Module object exists with properties +// meant to overwrite the default module functionality. Here +// we collect those properties and reapply _after_ we configure +// the current environment's defaults to avoid having to be so +// defensive during initialization. +var moduleOverrides = Object.assign({}, Module); + +var arguments_ = []; +var thisProgram = './this.program'; +var quit_ = (status, toThrow) => { + throw toThrow; +}; + +// Determine the runtime environment we are in. You can customize this by +// setting the ENVIRONMENT setting at compile time (see settings.js). + +// Attempt to auto-detect the environment +var ENVIRONMENT_IS_WEB = typeof window == 'object'; +var ENVIRONMENT_IS_WORKER = typeof importScripts == 'function'; +// N.b. Electron.js environment is simultaneously a NODE-environment, but +// also a web environment. +var ENVIRONMENT_IS_NODE = typeof process == 'object' && typeof process.versions == 'object' && typeof process.versions.node == 'string'; +var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; + +if (Module['ENVIRONMENT']) { + throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)'); +} + +// `/` should be present at the end if `scriptDirectory` is not empty +var scriptDirectory = ''; +function locateFile(path) { + if (Module['locateFile']) { + return Module['locateFile'](path, scriptDirectory); + } + return scriptDirectory + path; +} + +// Hooks that are implemented differently in different runtime environments. +var read_, + readAsync, + readBinary, + setWindowTitle; + +// Normally we don't log exceptions but instead let them bubble out the top +// level where the embedding environment (e.g. the browser) can handle +// them. +// However under v8 and node we sometimes exit the process direcly in which case +// its up to use us to log the exception before exiting. +// If we fix https://github.com/emscripten-core/emscripten/issues/15080 +// this may no longer be needed under node. +function logExceptionOnExit(e) { + if (e instanceof ExitStatus) return; + let toLog = e; + if (e && typeof e == 'object' && e.stack) { + toLog = [e, e.stack]; + } + err('exiting due to exception: ' + toLog); +} + +if (ENVIRONMENT_IS_NODE) { + if (typeof process == 'undefined' || !process.release || process.release.name !== 'node') throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)'); + // `require()` is no-op in an ESM module, use `createRequire()` to construct + // the require()` function. This is only necessary for multi-environment + // builds, `-sENVIRONMENT=node` emits a static import declaration instead. + // TODO: Swap all `require()`'s with `import()`'s? + // These modules will usually be used on Node.js. Load them eagerly to avoid + // the complexity of lazy-loading. + var fs = require('fs'); + var nodePath = require('path'); + + if (ENVIRONMENT_IS_WORKER) { + scriptDirectory = nodePath.dirname(scriptDirectory) + '/'; + } else { + scriptDirectory = __dirname + '/'; + } + +// include: node_shell_read.js + + +read_ = (filename, binary) => { + // We need to re-wrap `file://` strings to URLs. Normalizing isn't + // necessary in that case, the path should already be absolute. + filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename); + return fs.readFileSync(filename, binary ? undefined : 'utf8'); +}; + +readBinary = (filename) => { + var ret = read_(filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; +}; + +readAsync = (filename, onload, onerror) => { + // See the comment in the `read_` function. + filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename); + fs.readFile(filename, function(err, data) { + if (err) onerror(err); + else onload(data.buffer); + }); +}; + +// end include: node_shell_read.js + if (process['argv'].length > 1) { + thisProgram = process['argv'][1].replace(/\\/g, '/'); + } + + arguments_ = process['argv'].slice(2); + + if (typeof module != 'undefined') { + module['exports'] = Module; + } + + process['on']('uncaughtException', function(ex) { + // suppress ExitStatus exceptions from showing an error + if (!(ex instanceof ExitStatus)) { + throw ex; + } + }); + + // Without this older versions of node (< v15) will log unhandled rejections + // but return 0, which is not normally the desired behaviour. This is + // not be needed with node v15 and about because it is now the default + // behaviour: + // See https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode + process['on']('unhandledRejection', function(reason) { throw reason; }); + + quit_ = (status, toThrow) => { + if (keepRuntimeAlive()) { + process['exitCode'] = status; + throw toThrow; + } + logExceptionOnExit(toThrow); + process['exit'](status); + }; + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; + +} else +if (ENVIRONMENT_IS_SHELL) { + + if ((typeof process == 'object' && typeof require === 'function') || typeof window == 'object' || typeof importScripts == 'function') throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)'); + + if (typeof read != 'undefined') { + read_ = function shell_read(f) { + return read(f); + }; + } + + readBinary = function readBinary(f) { + let data; + if (typeof readbuffer == 'function') { + return new Uint8Array(readbuffer(f)); + } + data = read(f, 'binary'); + assert(typeof data == 'object'); + return data; + }; + + readAsync = function readAsync(f, onload, onerror) { + setTimeout(() => onload(readBinary(f)), 0); + }; + + if (typeof scriptArgs != 'undefined') { + arguments_ = scriptArgs; + } else if (typeof arguments != 'undefined') { + arguments_ = arguments; + } + + if (typeof quit == 'function') { + quit_ = (status, toThrow) => { + logExceptionOnExit(toThrow); + quit(status); + }; + } + + if (typeof print != 'undefined') { + // Prefer to use print/printErr where they exist, as they usually work better. + if (typeof console == 'undefined') console = /** @type{!Console} */({}); + console.log = /** @type{!function(this:Console, ...*): undefined} */ (print); + console.warn = console.error = /** @type{!function(this:Console, ...*): undefined} */ (typeof printErr != 'undefined' ? printErr : print); + } + +} else + +// Note that this includes Node.js workers when relevant (pthreads is enabled). +// Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and +// ENVIRONMENT_IS_NODE. +if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled + scriptDirectory = self.location.href; + } else if (typeof document != 'undefined' && document.currentScript) { // web + scriptDirectory = document.currentScript.src; + } + // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them. + // otherwise, slice off the final part of the url to find the script directory. + // if scriptDirectory does not contain a slash, lastIndexOf will return -1, + // and scriptDirectory will correctly be replaced with an empty string. + // If scriptDirectory contains a query (starting with ?) or a fragment (starting with #), + // they are removed because they could contain a slash. + if (scriptDirectory.indexOf('blob:') !== 0) { + scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, "").lastIndexOf('/')+1); + } else { + scriptDirectory = ''; + } + + if (!(typeof window == 'object' || typeof importScripts == 'function')) throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)'); + + // Differentiate the Web Worker from the Node Worker case, as reading must + // be done differently. + { +// include: web_or_worker_shell_read.js + + + read_ = (url) => { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.send(null); + return xhr.responseText; + } + + if (ENVIRONMENT_IS_WORKER) { + readBinary = (url) => { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.responseType = 'arraybuffer'; + xhr.send(null); + return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response)); + }; + } + + readAsync = (url, onload, onerror) => { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'arraybuffer'; + xhr.onload = () => { + if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 + onload(xhr.response); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + } + +// end include: web_or_worker_shell_read.js + } + + setWindowTitle = (title) => document.title = title; +} else +{ + throw new Error('environment detection error'); +} + +var out = Module['print'] || console.log.bind(console); +var err = Module['printErr'] || console.warn.bind(console); + +// Merge back in the overrides +Object.assign(Module, moduleOverrides); +// Free the object hierarchy contained in the overrides, this lets the GC +// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. +moduleOverrides = null; +checkIncomingModuleAPI(); + +// Emit code to handle expected values on the Module object. This applies Module.x +// to the proper local x. This has two benefits: first, we only emit it if it is +// expected to arrive, and second, by using a local everywhere else that can be +// minified. + +if (Module['arguments']) arguments_ = Module['arguments'];legacyModuleProp('arguments', 'arguments_'); + +if (Module['thisProgram']) thisProgram = Module['thisProgram'];legacyModuleProp('thisProgram', 'thisProgram'); + +if (Module['quit']) quit_ = Module['quit'];legacyModuleProp('quit', 'quit_'); + +// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message +// Assertions on removed incoming Module JS APIs. +assert(typeof Module['memoryInitializerPrefixURL'] == 'undefined', 'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['pthreadMainPrefixURL'] == 'undefined', 'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['cdInitializerPrefixURL'] == 'undefined', 'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['filePackagePrefixURL'] == 'undefined', 'Module.filePackagePrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['read'] == 'undefined', 'Module.read option was removed (modify read_ in JS)'); +assert(typeof Module['readAsync'] == 'undefined', 'Module.readAsync option was removed (modify readAsync in JS)'); +assert(typeof Module['readBinary'] == 'undefined', 'Module.readBinary option was removed (modify readBinary in JS)'); +assert(typeof Module['setWindowTitle'] == 'undefined', 'Module.setWindowTitle option was removed (modify setWindowTitle in JS)'); +assert(typeof Module['TOTAL_MEMORY'] == 'undefined', 'Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY'); +legacyModuleProp('read', 'read_'); +legacyModuleProp('readAsync', 'readAsync'); +legacyModuleProp('readBinary', 'readBinary'); +legacyModuleProp('setWindowTitle', 'setWindowTitle'); +var IDBFS = 'IDBFS is no longer included by default; build with -lidbfs.js'; +var PROXYFS = 'PROXYFS is no longer included by default; build with -lproxyfs.js'; +var WORKERFS = 'WORKERFS is no longer included by default; build with -lworkerfs.js'; +var NODEFS = 'NODEFS is no longer included by default; build with -lnodefs.js'; + +assert(!ENVIRONMENT_IS_SHELL, "shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."); + + + + +var STACK_ALIGN = 16; +var POINTER_SIZE = 4; + +function getNativeTypeSize(type) { + switch (type) { + case 'i1': case 'i8': case 'u8': return 1; + case 'i16': case 'u16': return 2; + case 'i32': case 'u32': return 4; + case 'i64': case 'u64': return 8; + case 'float': return 4; + case 'double': return 8; + default: { + if (type[type.length - 1] === '*') { + return POINTER_SIZE; + } + if (type[0] === 'i') { + const bits = Number(type.substr(1)); + assert(bits % 8 === 0, 'getNativeTypeSize invalid bits ' + bits + ', type ' + type); + return bits / 8; + } + return 0; + } + } +} + +// include: runtime_debug.js + + +function legacyModuleProp(prop, newName) { + if (!Object.getOwnPropertyDescriptor(Module, prop)) { + Object.defineProperty(Module, prop, { + configurable: true, + get: function() { + abort('Module.' + prop + ' has been replaced with plain ' + newName + ' (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)'); + } + }); + } +} + +function ignoredModuleProp(prop) { + if (Object.getOwnPropertyDescriptor(Module, prop)) { + abort('`Module.' + prop + '` was supplied but `' + prop + '` not included in INCOMING_MODULE_JS_API'); + } +} + +// forcing the filesystem exports a few things by default +function isExportedByForceFilesystem(name) { + return name === 'FS_createPath' || + name === 'FS_createDataFile' || + name === 'FS_createPreloadedFile' || + name === 'FS_unlink' || + name === 'addRunDependency' || + // The old FS has some functionality that WasmFS lacks. + name === 'FS_createLazyFile' || + name === 'FS_createDevice' || + name === 'removeRunDependency'; +} + +function missingLibrarySymbol(sym) { + if (typeof globalThis !== 'undefined' && !Object.getOwnPropertyDescriptor(globalThis, sym)) { + Object.defineProperty(globalThis, sym, { + configurable: true, + get: function() { + // Can't `abort()` here because it would break code that does runtime + // checks. e.g. `if (typeof SDL === 'undefined')`. + var msg = '`' + sym + '` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line'; + // DEFAULT_LIBRARY_FUNCS_TO_INCLUDE requires the name as it appears in + // library.js, which means $name for a JS name with no prefix, or name + // for a JS name like _name. + var librarySymbol = sym; + if (!librarySymbol.startsWith('_')) { + librarySymbol = '$' + sym; + } + msg += " (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=" + librarySymbol + ")"; + if (isExportedByForceFilesystem(sym)) { + msg += '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you'; + } + warnOnce(msg); + return undefined; + } + }); + } +} + +function unexportedRuntimeSymbol(sym) { + if (!Object.getOwnPropertyDescriptor(Module, sym)) { + Object.defineProperty(Module, sym, { + configurable: true, + get: function() { + var msg = "'" + sym + "' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"; + if (isExportedByForceFilesystem(sym)) { + msg += '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you'; + } + abort(msg); + } + }); + } +} + +// end include: runtime_debug.js + + +// === Preamble library stuff === + +// Documentation for the public APIs defined in this file must be updated in: +// site/source/docs/api_reference/preamble.js.rst +// A prebuilt local version of the documentation is available at: +// site/build/text/docs/api_reference/preamble.js.txt +// You can also build docs locally as HTML or other formats in site/ +// An online HTML version (which may be of a different version of Emscripten) +// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html + +var wasmBinary; +if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];legacyModuleProp('wasmBinary', 'wasmBinary'); +var noExitRuntime = Module['noExitRuntime'] || true;legacyModuleProp('noExitRuntime', 'noExitRuntime'); + +if (typeof WebAssembly != 'object') { + abort('no native wasm support detected'); +} + +// Wasm globals + +var wasmMemory; + +//======================================== +// Runtime essentials +//======================================== + +// whether we are quitting the application. no code should run after this. +// set in exit() and abort() +var ABORT = false; + +// set by exit() and abort(). Passed to 'onExit' handler. +// NOTE: This is also used as the process return code code in shell environments +// but only when noExitRuntime is false. +var EXITSTATUS; + +/** @type {function(*, string=)} */ +function assert(condition, text) { + if (!condition) { + abort('Assertion failed' + (text ? ': ' + text : '')); + } +} + +// We used to include malloc/free by default in the past. Show a helpful error in +// builds with assertions. +function _malloc() { + abort("malloc() called but not included in the build - add '_malloc' to EXPORTED_FUNCTIONS"); +} +function _free() { + // Show a helpful error since we used to include free by default in the past. + abort("free() called but not included in the build - add '_free' to EXPORTED_FUNCTIONS"); +} + +// include: runtime_strings.js + + +// runtime_strings.js: String related runtime functions that are part of both +// MINIMAL_RUNTIME and regular runtime. + +var UTF8Decoder = typeof TextDecoder != 'undefined' ? new TextDecoder('utf8') : undefined; + +/** + * Given a pointer 'idx' to a null-terminated UTF8-encoded string in the given + * array that contains uint8 values, returns a copy of that string as a + * Javascript String object. + * heapOrArray is either a regular array, or a JavaScript typed array view. + * @param {number} idx + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) { + var endIdx = idx + maxBytesToRead; + var endPtr = idx; + // TextDecoder needs to know the byte length in advance, it doesn't stop on + // null terminator by itself. Also, use the length info to avoid running tiny + // strings through TextDecoder, since .subarray() allocates garbage. + // (As a tiny code save trick, compare endPtr against endIdx using a negation, + // so that undefined means Infinity) + while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr; + + if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { + return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)); + } + var str = ''; + // If building with TextDecoder, we have already computed the string length + // above, so test loop end condition against that + while (idx < endPtr) { + // For UTF8 byte structure, see: + // http://en.wikipedia.org/wiki/UTF-8#Description + // https://www.ietf.org/rfc/rfc2279.txt + // https://tools.ietf.org/html/rfc3629 + var u0 = heapOrArray[idx++]; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + var u1 = heapOrArray[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + var u2 = heapOrArray[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + if ((u0 & 0xF8) != 0xF0) warnOnce('Invalid UTF-8 leading byte ' + ptrToString(u0) + ' encountered when deserializing a UTF-8 string in wasm memory to a JS string!'); + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63); + } + + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } + return str; +} + +/** + * Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the + * emscripten HEAP, returns a copy of that string as a Javascript String object. + * + * @param {number} ptr + * @param {number=} maxBytesToRead - An optional length that specifies the + * maximum number of bytes to read. You can omit this parameter to scan the + * string until the first \0 byte. If maxBytesToRead is passed, and the string + * at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the + * string will cut short at that byte index (i.e. maxBytesToRead will not + * produce a string of exact length [ptr, ptr+maxBytesToRead[) N.B. mixing + * frequent uses of UTF8ToString() with and without maxBytesToRead may throw + * JS JIT optimizations off, so it is worth to consider consistently using one + * @return {string} + */ +function UTF8ToString(ptr, maxBytesToRead) { + return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ''; +} + +/** + * Copies the given Javascript String object 'str' to the given byte array at + * address 'outIdx', encoded in UTF8 form and null-terminated. The copy will + * require at most str.length*4+1 bytes of space in the HEAP. Use the function + * lengthBytesUTF8 to compute the exact number of bytes (excluding null + * terminator) that this function will write. + * + * @param {string} str - The Javascript string to copy. + * @param {ArrayBufferView|Array} heap - The array to copy to. Each + * index in this array is assumed + * to be one 8-byte element. + * @param {number} outIdx - The starting offset in the array to begin the copying. + * @param {number} maxBytesToWrite - The maximum number of bytes this function + * can write to the array. This count should + * include the null terminator, i.e. if + * maxBytesToWrite=1, only the null terminator + * will be written and nothing else. + * maxBytesToWrite=0 does not write any bytes + * to the output, not even the null + * terminator. + * @return {number} The number of bytes written, EXCLUDING the null terminator. + */ +function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) { + // Parameter maxBytesToWrite is not optional. Negative values, 0, null, + // undefined and false each don't write out any bytes. + if (!(maxBytesToWrite > 0)) + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code + // unit, not a Unicode code point of the character! So decode + // UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description + // and https://www.ietf.org/rfc/rfc2279.txt + // and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) { + var u1 = str.charCodeAt(++i); + u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF); + } + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + heap[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + heap[outIdx++] = 0xC0 | (u >> 6); + heap[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + heap[outIdx++] = 0xE0 | (u >> 12); + heap[outIdx++] = 0x80 | ((u >> 6) & 63); + heap[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 3 >= endIdx) break; + if (u > 0x10FFFF) warnOnce('Invalid Unicode code point ' + ptrToString(u) + ' encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).'); + heap[outIdx++] = 0xF0 | (u >> 18); + heap[outIdx++] = 0x80 | ((u >> 12) & 63); + heap[outIdx++] = 0x80 | ((u >> 6) & 63); + heap[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + heap[outIdx] = 0; + return outIdx - startIdx; +} + +/** + * Copies the given Javascript String object 'str' to the emscripten HEAP at + * address 'outPtr', null-terminated and encoded in UTF8 form. The copy will + * require at most str.length*4+1 bytes of space in the HEAP. + * Use the function lengthBytesUTF8 to compute the exact number of bytes + * (excluding null terminator) that this function will write. + * + * @return {number} The number of bytes written, EXCLUDING the null terminator. + */ +function stringToUTF8(str, outPtr, maxBytesToWrite) { + assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} + +/** + * Returns the number of bytes the given Javascript string takes if encoded as a + * UTF8 byte array, EXCLUDING the null terminator byte. + * + * @param {string} str - JavaScript string to operator on + * @return {number} Length, in bytes, of the UTF8 encoded string. + */ +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code + // unit, not a Unicode code point of the character! So decode + // UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var c = str.charCodeAt(i); // possibly a lead surrogate + if (c <= 0x7F) { + len++; + } else if (c <= 0x7FF) { + len += 2; + } else if (c >= 0xD800 && c <= 0xDFFF) { + len += 4; ++i; + } else { + len += 3; + } + } + return len; +} + +// end include: runtime_strings.js +// Memory management + +var HEAP, +/** @type {!ArrayBuffer} */ + buffer, +/** @type {!Int8Array} */ + HEAP8, +/** @type {!Uint8Array} */ + HEAPU8, +/** @type {!Int16Array} */ + HEAP16, +/** @type {!Uint16Array} */ + HEAPU16, +/** @type {!Int32Array} */ + HEAP32, +/** @type {!Uint32Array} */ + HEAPU32, +/** @type {!Float32Array} */ + HEAPF32, +/** @type {!Float64Array} */ + HEAPF64; + +function updateGlobalBufferAndViews(buf) { + buffer = buf; + Module['HEAP8'] = HEAP8 = new Int8Array(buf); + Module['HEAP16'] = HEAP16 = new Int16Array(buf); + Module['HEAP32'] = HEAP32 = new Int32Array(buf); + Module['HEAPU8'] = HEAPU8 = new Uint8Array(buf); + Module['HEAPU16'] = HEAPU16 = new Uint16Array(buf); + Module['HEAPU32'] = HEAPU32 = new Uint32Array(buf); + Module['HEAPF32'] = HEAPF32 = new Float32Array(buf); + Module['HEAPF64'] = HEAPF64 = new Float64Array(buf); +} + +var STACK_SIZE = 65536; +if (Module['STACK_SIZE']) assert(STACK_SIZE === Module['STACK_SIZE'], 'the stack size can no longer be determined at runtime') + +var INITIAL_MEMORY = Module['INITIAL_MEMORY'] || 16777216;legacyModuleProp('INITIAL_MEMORY', 'INITIAL_MEMORY'); + +assert(INITIAL_MEMORY >= STACK_SIZE, 'INITIAL_MEMORY should be larger than STACK_SIZE, was ' + INITIAL_MEMORY + '! (STACK_SIZE=' + STACK_SIZE + ')'); + +// check for full engine support (use string 'subarray' to avoid closure compiler confusion) +assert(typeof Int32Array != 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray != undefined && Int32Array.prototype.set != undefined, + 'JS engine does not provide full typed array support'); + +// If memory is defined in wasm, the user can't provide it. +assert(!Module['wasmMemory'], 'Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally'); +assert(INITIAL_MEMORY == 16777216, 'Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically'); + +// include: runtime_init_table.js +// In regular non-RELOCATABLE mode the table is exported +// from the wasm module and this will be assigned once +// the exports are available. +var wasmTable; + +// end include: runtime_init_table.js +// include: runtime_stack_check.js + + +// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode. +function writeStackCookie() { + var max = _emscripten_stack_get_end(); + assert((max & 3) == 0); + // If the stack ends at address zero we write our cookies 4 bytes into the + // stack. This prevents interference with the (separate) address-zero check + // below. + if (max == 0) { + max += 4; + } + // The stack grow downwards towards _emscripten_stack_get_end. + // We write cookies to the final two words in the stack and detect if they are + // ever overwritten. + HEAPU32[((max)>>2)] = 0x2135467; + HEAPU32[(((max)+(4))>>2)] = 0x89BACDFE; + // Also test the global address 0 for integrity. + HEAPU32[0] = 0x63736d65; /* 'emsc' */ +} + +function checkStackCookie() { + if (ABORT) return; + var max = _emscripten_stack_get_end(); + // See writeStackCookie(). + if (max == 0) { + max += 4; + } + var cookie1 = HEAPU32[((max)>>2)]; + var cookie2 = HEAPU32[(((max)+(4))>>2)]; + if (cookie1 != 0x2135467 || cookie2 != 0x89BACDFE) { + abort('Stack overflow! Stack cookie has been overwritten at ' + ptrToString(max) + ', expected hex dwords 0x89BACDFE and 0x2135467, but received ' + ptrToString(cookie2) + ' ' + ptrToString(cookie1)); + } + // Also test the global address 0 for integrity. + if (HEAPU32[0] !== 0x63736d65 /* 'emsc' */) { + abort('Runtime error: The application has corrupted its heap memory area (address zero)!'); + } +} + +// end include: runtime_stack_check.js +// include: runtime_assertions.js + + +// Endianness check +(function() { + var h16 = new Int16Array(1); + var h8 = new Int8Array(h16.buffer); + h16[0] = 0x6373; + if (h8[0] !== 0x73 || h8[1] !== 0x63) throw 'Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)'; +})(); + +// end include: runtime_assertions.js +var __ATPRERUN__ = []; // functions called before the runtime is initialized +var __ATINIT__ = []; // functions called during startup +var __ATMAIN__ = []; // functions called when main() is to be run +var __ATEXIT__ = []; // functions called during shutdown +var __ATPOSTRUN__ = []; // functions called after the main() is called + +var runtimeInitialized = false; + +function keepRuntimeAlive() { + return noExitRuntime; +} + +function preRun() { + + if (Module['preRun']) { + if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; + while (Module['preRun'].length) { + addOnPreRun(Module['preRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPRERUN__); +} + +function initRuntime() { + assert(!runtimeInitialized); + runtimeInitialized = true; + + checkStackCookie(); + + + callRuntimeCallbacks(__ATINIT__); +} + +function preMain() { + checkStackCookie(); + + callRuntimeCallbacks(__ATMAIN__); +} + +function postRun() { + checkStackCookie(); + + if (Module['postRun']) { + if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; + while (Module['postRun'].length) { + addOnPostRun(Module['postRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPOSTRUN__); +} + +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} + +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} + +function addOnPreMain(cb) { + __ATMAIN__.unshift(cb); +} + +function addOnExit(cb) { +} + +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} + +// include: runtime_math.js + + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32 + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc + +assert(Math.imul, 'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.fround, 'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.clz32, 'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.trunc, 'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); + +// end include: runtime_math.js +// A counter of dependencies for calling run(). If we need to +// do asynchronous work before running, increment this and +// decrement it. Incrementing must happen in a place like +// Module.preRun (used by emcc to add file preloading). +// Note that you can add dependencies in preRun, even though +// it happens right before run - run will be postponed until +// the dependencies are met. +var runDependencies = 0; +var runDependencyWatcher = null; +var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled +var runDependencyTracking = {}; + +function getUniqueRunDependency(id) { + var orig = id; + while (1) { + if (!runDependencyTracking[id]) return id; + id = orig + Math.random(); + } +} + +function addRunDependency(id) { + runDependencies++; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(!runDependencyTracking[id]); + runDependencyTracking[id] = 1; + if (runDependencyWatcher === null && typeof setInterval != 'undefined') { + // Check for missing dependencies every few seconds + runDependencyWatcher = setInterval(function() { + if (ABORT) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + return; + } + var shown = false; + for (var dep in runDependencyTracking) { + if (!shown) { + shown = true; + err('still waiting on run dependencies:'); + } + err('dependency: ' + dep); + } + if (shown) { + err('(end of list)'); + } + }, 10000); + } + } else { + err('warning: run dependency added without ID'); + } +} + +function removeRunDependency(id) { + runDependencies--; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(runDependencyTracking[id]); + delete runDependencyTracking[id]; + } else { + err('warning: run dependency removed without ID'); + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); // can add another dependenciesFulfilled + } + } +} + +/** @param {string|number=} what */ +function abort(what) { + if (Module['onAbort']) { + Module['onAbort'](what); + } + + what = 'Aborted(' + what + ')'; + // TODO(sbc): Should we remove printing and leave it up to whoever + // catches the exception? + err(what); + + ABORT = true; + EXITSTATUS = 1; + + // Use a wasm runtime error, because a JS error might be seen as a foreign + // exception, which means we'd run destructors on it. We need the error to + // simply make the program stop. + // FIXME This approach does not work in Wasm EH because it currently does not assume + // all RuntimeErrors are from traps; it decides whether a RuntimeError is from + // a trap or not based on a hidden field within the object. So at the moment + // we don't have a way of throwing a wasm trap from JS. TODO Make a JS API that + // allows this in the wasm spec. + + // Suppress closure compiler warning here. Closure compiler's builtin extern + // defintion for WebAssembly.RuntimeError claims it takes no arguments even + // though it can. + // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure gets fixed. + /** @suppress {checkTypes} */ + var e = new WebAssembly.RuntimeError(what); + + // Throw the error whether or not MODULARIZE is set because abort is used + // in code paths apart from instantiation where an exception is expected + // to be thrown when abort is called. + throw e; +} + +// {{MEM_INITIALIZER}} + +// include: memoryprofiler.js + + +// end include: memoryprofiler.js +// show errors on likely calls to FS when it was not included +var FS = { + error: function() { + abort('Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM'); + }, + init: function() { FS.error() }, + createDataFile: function() { FS.error() }, + createPreloadedFile: function() { FS.error() }, + createLazyFile: function() { FS.error() }, + open: function() { FS.error() }, + mkdev: function() { FS.error() }, + registerDevice: function() { FS.error() }, + analyzePath: function() { FS.error() }, + loadFilesFromDB: function() { FS.error() }, + + ErrnoError: function ErrnoError() { FS.error() }, +}; +Module['FS_createDataFile'] = FS.createDataFile; +Module['FS_createPreloadedFile'] = FS.createPreloadedFile; + +// include: URIUtils.js + + +// Prefix of data URIs emitted by SINGLE_FILE and related options. +var dataURIPrefix = 'data:application/octet-stream;base64,'; + +// Indicates whether filename is a base64 data URI. +function isDataURI(filename) { + // Prefix of data URIs emitted by SINGLE_FILE and related options. + return filename.startsWith(dataURIPrefix); +} + +// Indicates whether filename is delivered via file protocol (as opposed to http/https) +function isFileURI(filename) { + return filename.startsWith('file://'); +} + +// end include: URIUtils.js +/** @param {boolean=} fixedasm */ +function createExportWrapper(name, fixedasm) { + return function() { + var displayName = name; + var asm = fixedasm; + if (!fixedasm) { + asm = Module['asm']; + } + assert(runtimeInitialized, 'native function `' + displayName + '` called before runtime initialization'); + if (!asm[name]) { + assert(asm[name], 'exported native function `' + displayName + '` not found'); + } + return asm[name].apply(null, arguments); + }; +} + +var wasmBinaryFile; + wasmBinaryFile = 'a.out.wasm'; + if (!isDataURI(wasmBinaryFile)) { + wasmBinaryFile = locateFile(wasmBinaryFile); + } + +function getBinary(file) { + try { + if (file == wasmBinaryFile && wasmBinary) { + return new Uint8Array(wasmBinary); + } + if (readBinary) { + return readBinary(file); + } + throw "both async and sync fetching of the wasm failed"; + } + catch (err) { + abort(err); + } +} + +function getBinaryPromise() { + // If we don't have the binary yet, try to to load it asynchronously. + // Fetch has some additional restrictions over XHR, like it can't be used on a file:// url. + // See https://github.com/github/fetch/pull/92#issuecomment-140665932 + // Cordova or Electron apps are typically loaded from a file:// url. + // So use fetch if it is available and the url is not a file, otherwise fall back to XHR. + if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { + if (typeof fetch == 'function' + && !isFileURI(wasmBinaryFile) + ) { + return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) { + if (!response['ok']) { + throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; + } + return response['arrayBuffer'](); + }).catch(function () { + return getBinary(wasmBinaryFile); + }); + } + else { + if (readAsync) { + // fetch is not available or url is file => try XHR (readAsync uses XHR internally) + return new Promise(function(resolve, reject) { + readAsync(wasmBinaryFile, function(response) { resolve(new Uint8Array(/** @type{!ArrayBuffer} */(response))) }, reject) + }); + } + } + } + + // Otherwise, getBinary should be able to get it synchronously + return Promise.resolve().then(function() { return getBinary(wasmBinaryFile); }); +} + +// Create the wasm instance. +// Receives the wasm imports, returns the exports. +function createWasm() { + // prepare imports + var info = { + 'env': asmLibraryArg, + 'wasi_snapshot_preview1': asmLibraryArg, + }; + // Load the wasm module and create an instance of using native support in the JS engine. + // handle a generated wasm instance, receiving its exports and + // performing other necessary setup + /** @param {WebAssembly.Module=} module*/ + function receiveInstance(instance, module) { + var exports = instance.exports; + + Module['asm'] = exports; + + wasmMemory = Module['asm']['memory']; + assert(wasmMemory, "memory not found in wasm exports"); + // This assertion doesn't hold when emscripten is run in --post-link + // mode. + // TODO(sbc): Read INITIAL_MEMORY out of the wasm file in post-link mode. + //assert(wasmMemory.buffer.byteLength === 16777216); + updateGlobalBufferAndViews(wasmMemory.buffer); + + wasmTable = Module['asm']['__indirect_function_table']; + assert(wasmTable, "table not found in wasm exports"); + + addOnInit(Module['asm']['__wasm_call_ctors']); + + removeRunDependency('wasm-instantiate'); + + } + // we can't run yet (except in a pthread, where we have a custom sync instantiator) + addRunDependency('wasm-instantiate'); + + // Prefer streaming instantiation if available. + // Async compilation can be confusing when an error on the page overwrites Module + // (for example, if the order of elements is wrong, and the one defining Module is + // later), so we save Module and check it later. + var trueModule = Module; + function receiveInstantiationResult(result) { + // 'result' is a ResultObject object which has both the module and instance. + // receiveInstance() will swap in the exports (to Module.asm) so they can be called + assert(Module === trueModule, 'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?'); + trueModule = null; + // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line. + // When the regression is fixed, can restore the above USE_PTHREADS-enabled path. + receiveInstance(result['instance']); + } + + function instantiateArrayBuffer(receiver) { + return getBinaryPromise().then(function(binary) { + return WebAssembly.instantiate(binary, info); + }).then(function (instance) { + return instance; + }).then(receiver, function(reason) { + err('failed to asynchronously prepare wasm: ' + reason); + + // Warn on some common problems. + if (isFileURI(wasmBinaryFile)) { + err('warning: Loading from a file URI (' + wasmBinaryFile + ') is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing'); + } + abort(reason); + }); + } + + function instantiateAsync() { + if (!wasmBinary && + typeof WebAssembly.instantiateStreaming == 'function' && + !isDataURI(wasmBinaryFile) && + // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously. + !isFileURI(wasmBinaryFile) && + // Avoid instantiateStreaming() on Node.js environment for now, as while + // Node.js v18.1.0 implements it, it does not have a full fetch() + // implementation yet. + // + // Reference: + // https://github.com/emscripten-core/emscripten/pull/16917 + !ENVIRONMENT_IS_NODE && + typeof fetch == 'function') { + return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) { + // Suppress closure warning here since the upstream definition for + // instantiateStreaming only allows Promise rather than + // an actual Response. + // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure is fixed. + /** @suppress {checkTypes} */ + var result = WebAssembly.instantiateStreaming(response, info); + + return result.then( + receiveInstantiationResult, + function(reason) { + // We expect the most common failure cause to be a bad MIME type for the binary, + // in which case falling back to ArrayBuffer instantiation should work. + err('wasm streaming compile failed: ' + reason); + err('falling back to ArrayBuffer instantiation'); + return instantiateArrayBuffer(receiveInstantiationResult); + }); + }); + } else { + return instantiateArrayBuffer(receiveInstantiationResult); + } + } + + // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback + // to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel + // to any other async startup actions they are performing. + // Also pthreads and wasm workers initialize the wasm instance through this path. + if (Module['instantiateWasm']) { + try { + var exports = Module['instantiateWasm'](info, receiveInstance); + return exports; + } catch(e) { + err('Module.instantiateWasm callback failed with error: ' + e); + return false; + } + } + + instantiateAsync(); + return {}; // no exports yet; we'll fill them in later +} + +// Globals used by JS i64 conversions (see makeSetValue) +var tempDouble; +var tempI64; + +// === Body === + +var ASM_CONSTS = { + +}; + + + + + + /** @constructor */ + function ExitStatus(status) { + this.name = 'ExitStatus'; + this.message = 'Program terminated with exit(' + status + ')'; + this.status = status; + } + + function callRuntimeCallbacks(callbacks) { + while (callbacks.length > 0) { + // Pass the module as the first argument. + callbacks.shift()(Module); + } + } + + + /** + * @param {number} ptr + * @param {string} type + */ + function getValue(ptr, type = 'i8') { + if (type.endsWith('*')) type = '*'; + switch (type) { + case 'i1': return HEAP8[((ptr)>>0)]; + case 'i8': return HEAP8[((ptr)>>0)]; + case 'i16': return HEAP16[((ptr)>>1)]; + case 'i32': return HEAP32[((ptr)>>2)]; + case 'i64': return HEAP32[((ptr)>>2)]; + case 'float': return HEAPF32[((ptr)>>2)]; + case 'double': return HEAPF64[((ptr)>>3)]; + case '*': return HEAPU32[((ptr)>>2)]; + default: abort('invalid type for getValue: ' + type); + } + return null; + } + + function ptrToString(ptr) { + return '0x' + ptr.toString(16).padStart(8, '0'); + } + + + /** + * @param {number} ptr + * @param {number} value + * @param {string} type + */ + function setValue(ptr, value, type = 'i8') { + if (type.endsWith('*')) type = '*'; + switch (type) { + case 'i1': HEAP8[((ptr)>>0)] = value; break; + case 'i8': HEAP8[((ptr)>>0)] = value; break; + case 'i16': HEAP16[((ptr)>>1)] = value; break; + case 'i32': HEAP32[((ptr)>>2)] = value; break; + case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math.min((+(Math.floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)] = tempI64[0],HEAP32[(((ptr)+(4))>>2)] = tempI64[1]); break; + case 'float': HEAPF32[((ptr)>>2)] = value; break; + case 'double': HEAPF64[((ptr)>>3)] = value; break; + case '*': HEAPU32[((ptr)>>2)] = value; break; + default: abort('invalid type for setValue: ' + type); + } + } + + function warnOnce(text) { + if (!warnOnce.shown) warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + if (ENVIRONMENT_IS_NODE) text = 'warning: ' + text; + err(text); + } + } + + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.copyWithin(dest, src, src + num); + } + + var printCharBuffers = [null,[],[]]; + function printChar(stream, curr) { + var buffer = printCharBuffers[stream]; + assert(buffer); + if (curr === 0 || curr === 10) { + (stream === 1 ? out : err)(UTF8ArrayToString(buffer, 0)); + buffer.length = 0; + } else { + buffer.push(curr); + } + } + function flush_NO_FILESYSTEM() { + // flush anything remaining in the buffers during shutdown + _fflush(0); + if (printCharBuffers[1].length) printChar(1, 10); + if (printCharBuffers[2].length) printChar(2, 10); + } + + var SYSCALLS = {varargs:undefined,get:function() { + assert(SYSCALLS.varargs != undefined); + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function(ptr) { + var ret = UTF8ToString(ptr); + return ret; + }}; + function _fd_write(fd, iov, iovcnt, pnum) { + // hack to support printf in SYSCALLS_REQUIRE_FILESYSTEM=0 + var num = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAPU32[((iov)>>2)]; + var len = HEAPU32[(((iov)+(4))>>2)]; + iov += 8; + for (var j = 0; j < len; j++) { + printChar(fd, HEAPU8[ptr+j]); + } + num += len; + } + HEAPU32[((pnum)>>2)] = num; + return 0; + } + + function _proc_exit(code) { + EXITSTATUS = code; + if (!keepRuntimeAlive()) { + if (Module['onExit']) Module['onExit'](code); + ABORT = true; + } + quit_(code, new ExitStatus(code)); + } + /** @param {boolean|number=} implicit */ + function exitJS(status, implicit) { + EXITSTATUS = status; + + checkUnflushedContent(); + + // if exit() was called explicitly, warn the user if the runtime isn't actually being shut down + if (keepRuntimeAlive() && !implicit) { + var msg = 'program exited (with status: ' + status + '), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)'; + err(msg); + } + + _proc_exit(status); + } + + function handleException(e) { + // Certain exception types we do not treat as errors since they are used for + // internal control flow. + // 1. ExitStatus, which is thrown by exit() + // 2. "unwind", which is thrown by emscripten_unwind_to_js_event_loop() and others + // that wish to return to JS event loop. + if (e instanceof ExitStatus || e == 'unwind') { + return EXITSTATUS; + } + checkStackCookie(); + if (e instanceof WebAssembly.RuntimeError) { + if (_emscripten_stack_get_current() <= 0) { + err('Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to ' + STACK_SIZE + ')'); + } + } + quit_(1, e); + } +var ASSERTIONS = true; + +function checkIncomingModuleAPI() { + ignoredModuleProp('fetchSettings'); +} +var asmLibraryArg = { + "emscripten_memcpy_big": _emscripten_memcpy_big, + "fd_write": _fd_write +}; +var asm = createWasm(); +/** @type {function(...*):?} */ +var ___wasm_call_ctors = Module["___wasm_call_ctors"] = createExportWrapper("__wasm_call_ctors"); + +/** @type {function(...*):?} */ +var _main = Module["_main"] = createExportWrapper("main"); + +/** @type {function(...*):?} */ +var ___errno_location = Module["___errno_location"] = createExportWrapper("__errno_location"); + +/** @type {function(...*):?} */ +var _fflush = Module["_fflush"] = createExportWrapper("fflush"); + +/** @type {function(...*):?} */ +var _emscripten_stack_init = Module["_emscripten_stack_init"] = function() { + return (_emscripten_stack_init = Module["_emscripten_stack_init"] = Module["asm"]["emscripten_stack_init"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _emscripten_stack_get_free = Module["_emscripten_stack_get_free"] = function() { + return (_emscripten_stack_get_free = Module["_emscripten_stack_get_free"] = Module["asm"]["emscripten_stack_get_free"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _emscripten_stack_get_base = Module["_emscripten_stack_get_base"] = function() { + return (_emscripten_stack_get_base = Module["_emscripten_stack_get_base"] = Module["asm"]["emscripten_stack_get_base"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _emscripten_stack_get_end = Module["_emscripten_stack_get_end"] = function() { + return (_emscripten_stack_get_end = Module["_emscripten_stack_get_end"] = Module["asm"]["emscripten_stack_get_end"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var stackSave = Module["stackSave"] = createExportWrapper("stackSave"); + +/** @type {function(...*):?} */ +var stackRestore = Module["stackRestore"] = createExportWrapper("stackRestore"); + +/** @type {function(...*):?} */ +var stackAlloc = Module["stackAlloc"] = createExportWrapper("stackAlloc"); + +/** @type {function(...*):?} */ +var _emscripten_stack_get_current = Module["_emscripten_stack_get_current"] = function() { + return (_emscripten_stack_get_current = Module["_emscripten_stack_get_current"] = Module["asm"]["emscripten_stack_get_current"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var dynCall_jiji = Module["dynCall_jiji"] = createExportWrapper("dynCall_jiji"); + + + + + +// === Auto-generated postamble setup entry stuff === + + +var unexportedRuntimeSymbols = [ + 'run', + 'UTF8ArrayToString', + 'UTF8ToString', + 'stringToUTF8Array', + 'stringToUTF8', + 'lengthBytesUTF8', + 'addOnPreRun', + 'addOnInit', + 'addOnPreMain', + 'addOnExit', + 'addOnPostRun', + 'addRunDependency', + 'removeRunDependency', + 'FS_createFolder', + 'FS_createPath', + 'FS_createDataFile', + 'FS_createPreloadedFile', + 'FS_createLazyFile', + 'FS_createLink', + 'FS_createDevice', + 'FS_unlink', + 'getLEB', + 'getFunctionTables', + 'alignFunctionTables', + 'registerFunctions', + 'prettyPrint', + 'getCompilerSetting', + 'out', + 'err', + 'callMain', + 'abort', + 'keepRuntimeAlive', + 'wasmMemory', + 'stackAlloc', + 'stackSave', + 'stackRestore', + 'getTempRet0', + 'setTempRet0', + 'writeStackCookie', + 'checkStackCookie', + 'ptrToString', + 'zeroMemory', + 'stringToNewUTF8', + 'exitJS', + 'getHeapMax', + 'abortOnCannotGrowMemory', + 'emscripten_realloc_buffer', + 'ENV', + 'ERRNO_CODES', + 'ERRNO_MESSAGES', + 'setErrNo', + 'inetPton4', + 'inetNtop4', + 'inetPton6', + 'inetNtop6', + 'readSockaddr', + 'writeSockaddr', + 'DNS', + 'getHostByName', + 'Protocols', + 'Sockets', + 'getRandomDevice', + 'warnOnce', + 'traverseStack', + 'UNWIND_CACHE', + 'convertPCtoSourceLocation', + 'readEmAsmArgsArray', + 'readEmAsmArgs', + 'runEmAsmFunction', + 'runMainThreadEmAsm', + 'jstoi_q', + 'jstoi_s', + 'getExecutableName', + 'listenOnce', + 'autoResumeAudioContext', + 'dynCallLegacy', + 'getDynCaller', + 'dynCall', + 'handleException', + 'runtimeKeepalivePush', + 'runtimeKeepalivePop', + 'callUserCallback', + 'maybeExit', + 'safeSetTimeout', + 'asmjsMangle', + 'asyncLoad', + 'alignMemory', + 'mmapAlloc', + 'writeI53ToI64', + 'writeI53ToI64Clamped', + 'writeI53ToI64Signaling', + 'writeI53ToU64Clamped', + 'writeI53ToU64Signaling', + 'readI53FromI64', + 'readI53FromU64', + 'convertI32PairToI53', + 'convertI32PairToI53Checked', + 'convertU32PairToI53', + 'getCFunc', + 'ccall', + 'cwrap', + 'uleb128Encode', + 'sigToWasmTypes', + 'generateFuncType', + 'convertJsFunctionToWasm', + 'freeTableIndexes', + 'functionsInTableMap', + 'getEmptyTableSlot', + 'updateTableMap', + 'addFunction', + 'removeFunction', + 'reallyNegative', + 'unSign', + 'strLen', + 'reSign', + 'formatString', + 'setValue', + 'getValue', + 'PATH', + 'PATH_FS', + 'intArrayFromString', + 'intArrayToString', + 'AsciiToString', + 'stringToAscii', + 'UTF16Decoder', + 'UTF16ToString', + 'stringToUTF16', + 'lengthBytesUTF16', + 'UTF32ToString', + 'stringToUTF32', + 'lengthBytesUTF32', + 'allocateUTF8', + 'allocateUTF8OnStack', + 'writeStringToMemory', + 'writeArrayToMemory', + 'writeAsciiToMemory', + 'SYSCALLS', + 'getSocketFromFD', + 'getSocketAddress', + 'JSEvents', + 'registerKeyEventCallback', + 'specialHTMLTargets', + 'maybeCStringToJsString', + 'findEventTarget', + 'findCanvasEventTarget', + 'getBoundingClientRect', + 'fillMouseEventData', + 'registerMouseEventCallback', + 'registerWheelEventCallback', + 'registerUiEventCallback', + 'registerFocusEventCallback', + 'fillDeviceOrientationEventData', + 'registerDeviceOrientationEventCallback', + 'fillDeviceMotionEventData', + 'registerDeviceMotionEventCallback', + 'screenOrientation', + 'fillOrientationChangeEventData', + 'registerOrientationChangeEventCallback', + 'fillFullscreenChangeEventData', + 'registerFullscreenChangeEventCallback', + 'JSEvents_requestFullscreen', + 'JSEvents_resizeCanvasForFullscreen', + 'registerRestoreOldStyle', + 'hideEverythingExceptGivenElement', + 'restoreHiddenElements', + 'setLetterbox', + 'currentFullscreenStrategy', + 'restoreOldWindowedStyle', + 'softFullscreenResizeWebGLRenderTarget', + 'doRequestFullscreen', + 'fillPointerlockChangeEventData', + 'registerPointerlockChangeEventCallback', + 'registerPointerlockErrorEventCallback', + 'requestPointerLock', + 'fillVisibilityChangeEventData', + 'registerVisibilityChangeEventCallback', + 'registerTouchEventCallback', + 'fillGamepadEventData', + 'registerGamepadEventCallback', + 'registerBeforeUnloadEventCallback', + 'fillBatteryEventData', + 'battery', + 'registerBatteryEventCallback', + 'setCanvasElementSize', + 'getCanvasElementSize', + 'demangle', + 'demangleAll', + 'jsStackTrace', + 'stackTrace', + 'ExitStatus', + 'getEnvStrings', + 'checkWasiClock', + 'flush_NO_FILESYSTEM', + 'dlopenMissingError', + 'createDyncallWrapper', + 'setImmediateWrapped', + 'clearImmediateWrapped', + 'polyfillSetImmediate', + 'uncaughtExceptionCount', + 'exceptionLast', + 'exceptionCaught', + 'ExceptionInfo', + 'exception_addRef', + 'exception_decRef', + 'Browser', + 'setMainLoop', + 'wget', + 'FS', + 'MEMFS', + 'TTY', + 'PIPEFS', + 'SOCKFS', + '_setNetworkCallback', + 'tempFixedLengthArray', + 'miniTempWebGLFloatBuffers', + 'heapObjectForWebGLType', + 'heapAccessShiftForWebGLHeap', + 'GL', + 'emscriptenWebGLGet', + 'computeUnpackAlignedImageSize', + 'emscriptenWebGLGetTexPixelData', + 'emscriptenWebGLGetUniform', + 'webglGetUniformLocation', + 'webglPrepareUniformLocationsBeforeFirstUse', + 'webglGetLeftBracePos', + 'emscriptenWebGLGetVertexAttrib', + 'writeGLArray', + 'AL', + 'SDL_unicode', + 'SDL_ttfContext', + 'SDL_audio', + 'SDL', + 'SDL_gfx', + 'GLUT', + 'EGL', + 'GLFW_Window', + 'GLFW', + 'GLEW', + 'IDBStore', + 'runAndAbortIfError', + 'ALLOC_NORMAL', + 'ALLOC_STACK', + 'allocate', +]; +unexportedRuntimeSymbols.forEach(unexportedRuntimeSymbol); +var missingLibrarySymbols = [ + 'zeroMemory', + 'stringToNewUTF8', + 'getHeapMax', + 'abortOnCannotGrowMemory', + 'emscripten_realloc_buffer', + 'setErrNo', + 'inetPton4', + 'inetNtop4', + 'inetPton6', + 'inetNtop6', + 'readSockaddr', + 'writeSockaddr', + 'getHostByName', + 'getRandomDevice', + 'traverseStack', + 'convertPCtoSourceLocation', + 'readEmAsmArgs', + 'runEmAsmFunction', + 'runMainThreadEmAsm', + 'jstoi_q', + 'jstoi_s', + 'getExecutableName', + 'listenOnce', + 'autoResumeAudioContext', + 'dynCallLegacy', + 'getDynCaller', + 'dynCall', + 'runtimeKeepalivePush', + 'runtimeKeepalivePop', + 'callUserCallback', + 'maybeExit', + 'safeSetTimeout', + 'asmjsMangle', + 'asyncLoad', + 'alignMemory', + 'mmapAlloc', + 'writeI53ToI64', + 'writeI53ToI64Clamped', + 'writeI53ToI64Signaling', + 'writeI53ToU64Clamped', + 'writeI53ToU64Signaling', + 'readI53FromI64', + 'readI53FromU64', + 'convertI32PairToI53', + 'convertI32PairToI53Checked', + 'convertU32PairToI53', + 'getCFunc', + 'ccall', + 'cwrap', + 'uleb128Encode', + 'sigToWasmTypes', + 'generateFuncType', + 'convertJsFunctionToWasm', + 'getEmptyTableSlot', + 'updateTableMap', + 'addFunction', + 'removeFunction', + 'reallyNegative', + 'unSign', + 'strLen', + 'reSign', + 'formatString', + 'intArrayFromString', + 'intArrayToString', + 'AsciiToString', + 'stringToAscii', + 'UTF16ToString', + 'stringToUTF16', + 'lengthBytesUTF16', + 'UTF32ToString', + 'stringToUTF32', + 'lengthBytesUTF32', + 'allocateUTF8', + 'allocateUTF8OnStack', + 'writeStringToMemory', + 'writeArrayToMemory', + 'writeAsciiToMemory', + 'getSocketFromFD', + 'getSocketAddress', + 'registerKeyEventCallback', + 'maybeCStringToJsString', + 'findEventTarget', + 'findCanvasEventTarget', + 'getBoundingClientRect', + 'fillMouseEventData', + 'registerMouseEventCallback', + 'registerWheelEventCallback', + 'registerUiEventCallback', + 'registerFocusEventCallback', + 'fillDeviceOrientationEventData', + 'registerDeviceOrientationEventCallback', + 'fillDeviceMotionEventData', + 'registerDeviceMotionEventCallback', + 'screenOrientation', + 'fillOrientationChangeEventData', + 'registerOrientationChangeEventCallback', + 'fillFullscreenChangeEventData', + 'registerFullscreenChangeEventCallback', + 'JSEvents_requestFullscreen', + 'JSEvents_resizeCanvasForFullscreen', + 'registerRestoreOldStyle', + 'hideEverythingExceptGivenElement', + 'restoreHiddenElements', + 'setLetterbox', + 'softFullscreenResizeWebGLRenderTarget', + 'doRequestFullscreen', + 'fillPointerlockChangeEventData', + 'registerPointerlockChangeEventCallback', + 'registerPointerlockErrorEventCallback', + 'requestPointerLock', + 'fillVisibilityChangeEventData', + 'registerVisibilityChangeEventCallback', + 'registerTouchEventCallback', + 'fillGamepadEventData', + 'registerGamepadEventCallback', + 'registerBeforeUnloadEventCallback', + 'fillBatteryEventData', + 'battery', + 'registerBatteryEventCallback', + 'setCanvasElementSize', + 'getCanvasElementSize', + 'demangle', + 'demangleAll', + 'jsStackTrace', + 'stackTrace', + 'getEnvStrings', + 'checkWasiClock', + 'createDyncallWrapper', + 'setImmediateWrapped', + 'clearImmediateWrapped', + 'polyfillSetImmediate', + 'ExceptionInfo', + 'exception_addRef', + 'exception_decRef', + 'setMainLoop', + '_setNetworkCallback', + 'heapObjectForWebGLType', + 'heapAccessShiftForWebGLHeap', + 'emscriptenWebGLGet', + 'computeUnpackAlignedImageSize', + 'emscriptenWebGLGetTexPixelData', + 'emscriptenWebGLGetUniform', + 'webglGetUniformLocation', + 'webglPrepareUniformLocationsBeforeFirstUse', + 'webglGetLeftBracePos', + 'emscriptenWebGLGetVertexAttrib', + 'writeGLArray', + 'SDL_unicode', + 'SDL_ttfContext', + 'SDL_audio', + 'GLFW_Window', + 'runAndAbortIfError', + 'ALLOC_NORMAL', + 'ALLOC_STACK', + 'allocate', +]; +missingLibrarySymbols.forEach(missingLibrarySymbol) + + +var calledRun; + +dependenciesFulfilled = function runCaller() { + // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) + if (!calledRun) run(); + if (!calledRun) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled +}; + +function callMain(args) { + assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'); + assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called'); + + var entryFunction = Module['_main']; + + var argc = 0; + var argv = 0; + + try { + + var ret = entryFunction(argc, argv); + + // In PROXY_TO_PTHREAD builds, we should never exit the runtime below, as + // execution is asynchronously handed off to a pthread. + // if we're not running an evented main loop, it's time to exit + exitJS(ret, /* implicit = */ true); + return ret; + } + catch (e) { + return handleException(e); + } +} + +function stackCheckInit() { + // This is normally called automatically during __wasm_call_ctors but need to + // get these values before even running any of the ctors so we call it redundantly + // here. + _emscripten_stack_init(); + // TODO(sbc): Move writeStackCookie to native to to avoid this. + writeStackCookie(); +} + +/** @type {function(Array=)} */ +function run(args) { + args = args || arguments_; + + if (runDependencies > 0) { + return; + } + + stackCheckInit(); + + preRun(); + + // a preRun added a dependency, run will be called later + if (runDependencies > 0) { + return; + } + + function doRun() { + // run may have just been called through dependencies being fulfilled just in this very frame, + // or while the async setStatus time below was happening + if (calledRun) return; + calledRun = true; + Module['calledRun'] = true; + + if (ABORT) return; + + initRuntime(); + + preMain(); + + if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); + + if (shouldRunNow) callMain(args); + + postRun(); + } + + if (Module['setStatus']) { + Module['setStatus']('Running...'); + setTimeout(function() { + setTimeout(function() { + Module['setStatus'](''); + }, 1); + doRun(); + }, 1); + } else + { + doRun(); + } + checkStackCookie(); +} + +function checkUnflushedContent() { + // Compiler settings do not allow exiting the runtime, so flushing + // the streams is not possible. but in ASSERTIONS mode we check + // if there was something to flush, and if so tell the user they + // should request that the runtime be exitable. + // Normally we would not even include flush() at all, but in ASSERTIONS + // builds we do so just for this check, and here we see if there is any + // content to flush, that is, we check if there would have been + // something a non-ASSERTIONS build would have not seen. + // How we flush the streams depends on whether we are in SYSCALLS_REQUIRE_FILESYSTEM=0 + // mode (which has its own special function for this; otherwise, all + // the code is inside libc) + var oldOut = out; + var oldErr = err; + var has = false; + out = err = (x) => { + has = true; + } + try { // it doesn't matter if it fails + flush_NO_FILESYSTEM(); + } catch(e) {} + out = oldOut; + err = oldErr; + if (has) { + warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.'); + warnOnce('(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)'); + } +} + +if (Module['preInit']) { + if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; + while (Module['preInit'].length > 0) { + Module['preInit'].pop()(); + } +} + +// shouldRunNow refers to calling main(), not run(). +var shouldRunNow = true; + +if (Module['noInitialRun']) shouldRunNow = false; + +run(); + + + + + diff --git a/emscripten/a.out.wasm b/emscripten/a.out.wasm new file mode 100755 index 0000000..9e23d78 Binary files /dev/null and b/emscripten/a.out.wasm differ diff --git a/emscripten/hello.html b/emscripten/hello.html new file mode 100644 index 0000000..464e351 --- /dev/null +++ b/emscripten/hello.html @@ -0,0 +1,1296 @@ + + + + + + Emscripten-Generated Code + + + + + image/svg+xml + + +
+
Downloading...
+ + + Resize canvas + Lock/hide mouse pointer     + + + + +
+ +
+ + +
+ +
+ + + + + + + + diff --git a/emscripten/hello.js b/emscripten/hello.js new file mode 100644 index 0000000..9d48c67 --- /dev/null +++ b/emscripten/hello.js @@ -0,0 +1,2007 @@ + + +// The Module object: Our interface to the outside world. We import +// and export values on it. There are various ways Module can be used: +// 1. Not defined. We create it here +// 2. A function parameter, function(Module) { ..generated code.. } +// 3. pre-run appended it, var Module = {}; ..generated code.. +// 4. External script tag defines var Module. +// We need to check if Module already exists (e.g. case 3 above). +// Substitution will be replaced with actual code on later stage of the build, +// this way Closure Compiler will not mangle it (e.g. case 4. above). +// Note that if you want to run closure, and also to use Module +// after the generated code, you will need to define var Module = {}; +// before the code. Then that object will be used in the code, and you +// can continue to use Module afterwards as well. +var Module = typeof Module != 'undefined' ? Module : {}; + +// See https://caniuse.com/mdn-javascript_builtins_object_assign + +// See https://caniuse.com/mdn-javascript_builtins_bigint64array + +// --pre-jses are emitted after the Module integration code, so that they can +// refer to Module (if they choose; they can also define Module) +// {{PRE_JSES}} + +// Sometimes an existing Module object exists with properties +// meant to overwrite the default module functionality. Here +// we collect those properties and reapply _after_ we configure +// the current environment's defaults to avoid having to be so +// defensive during initialization. +var moduleOverrides = Object.assign({}, Module); + +var arguments_ = []; +var thisProgram = './this.program'; +var quit_ = (status, toThrow) => { + throw toThrow; +}; + +// Determine the runtime environment we are in. You can customize this by +// setting the ENVIRONMENT setting at compile time (see settings.js). + +// Attempt to auto-detect the environment +var ENVIRONMENT_IS_WEB = typeof window == 'object'; +var ENVIRONMENT_IS_WORKER = typeof importScripts == 'function'; +// N.b. Electron.js environment is simultaneously a NODE-environment, but +// also a web environment. +var ENVIRONMENT_IS_NODE = typeof process == 'object' && typeof process.versions == 'object' && typeof process.versions.node == 'string'; +var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; + +if (Module['ENVIRONMENT']) { + throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)'); +} + +// `/` should be present at the end if `scriptDirectory` is not empty +var scriptDirectory = ''; +function locateFile(path) { + if (Module['locateFile']) { + return Module['locateFile'](path, scriptDirectory); + } + return scriptDirectory + path; +} + +// Hooks that are implemented differently in different runtime environments. +var read_, + readAsync, + readBinary, + setWindowTitle; + +// Normally we don't log exceptions but instead let them bubble out the top +// level where the embedding environment (e.g. the browser) can handle +// them. +// However under v8 and node we sometimes exit the process direcly in which case +// its up to use us to log the exception before exiting. +// If we fix https://github.com/emscripten-core/emscripten/issues/15080 +// this may no longer be needed under node. +function logExceptionOnExit(e) { + if (e instanceof ExitStatus) return; + let toLog = e; + if (e && typeof e == 'object' && e.stack) { + toLog = [e, e.stack]; + } + err('exiting due to exception: ' + toLog); +} + +if (ENVIRONMENT_IS_NODE) { + if (typeof process == 'undefined' || !process.release || process.release.name !== 'node') throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)'); + // `require()` is no-op in an ESM module, use `createRequire()` to construct + // the require()` function. This is only necessary for multi-environment + // builds, `-sENVIRONMENT=node` emits a static import declaration instead. + // TODO: Swap all `require()`'s with `import()`'s? + // These modules will usually be used on Node.js. Load them eagerly to avoid + // the complexity of lazy-loading. + var fs = require('fs'); + var nodePath = require('path'); + + if (ENVIRONMENT_IS_WORKER) { + scriptDirectory = nodePath.dirname(scriptDirectory) + '/'; + } else { + scriptDirectory = __dirname + '/'; + } + +// include: node_shell_read.js + + +read_ = (filename, binary) => { + // We need to re-wrap `file://` strings to URLs. Normalizing isn't + // necessary in that case, the path should already be absolute. + filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename); + return fs.readFileSync(filename, binary ? undefined : 'utf8'); +}; + +readBinary = (filename) => { + var ret = read_(filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; +}; + +readAsync = (filename, onload, onerror) => { + // See the comment in the `read_` function. + filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename); + fs.readFile(filename, function(err, data) { + if (err) onerror(err); + else onload(data.buffer); + }); +}; + +// end include: node_shell_read.js + if (process['argv'].length > 1) { + thisProgram = process['argv'][1].replace(/\\/g, '/'); + } + + arguments_ = process['argv'].slice(2); + + if (typeof module != 'undefined') { + module['exports'] = Module; + } + + process['on']('uncaughtException', function(ex) { + // suppress ExitStatus exceptions from showing an error + if (!(ex instanceof ExitStatus)) { + throw ex; + } + }); + + // Without this older versions of node (< v15) will log unhandled rejections + // but return 0, which is not normally the desired behaviour. This is + // not be needed with node v15 and about because it is now the default + // behaviour: + // See https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode + process['on']('unhandledRejection', function(reason) { throw reason; }); + + quit_ = (status, toThrow) => { + if (keepRuntimeAlive()) { + process['exitCode'] = status; + throw toThrow; + } + logExceptionOnExit(toThrow); + process['exit'](status); + }; + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; + +} else +if (ENVIRONMENT_IS_SHELL) { + + if ((typeof process == 'object' && typeof require === 'function') || typeof window == 'object' || typeof importScripts == 'function') throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)'); + + if (typeof read != 'undefined') { + read_ = function shell_read(f) { + return read(f); + }; + } + + readBinary = function readBinary(f) { + let data; + if (typeof readbuffer == 'function') { + return new Uint8Array(readbuffer(f)); + } + data = read(f, 'binary'); + assert(typeof data == 'object'); + return data; + }; + + readAsync = function readAsync(f, onload, onerror) { + setTimeout(() => onload(readBinary(f)), 0); + }; + + if (typeof scriptArgs != 'undefined') { + arguments_ = scriptArgs; + } else if (typeof arguments != 'undefined') { + arguments_ = arguments; + } + + if (typeof quit == 'function') { + quit_ = (status, toThrow) => { + logExceptionOnExit(toThrow); + quit(status); + }; + } + + if (typeof print != 'undefined') { + // Prefer to use print/printErr where they exist, as they usually work better. + if (typeof console == 'undefined') console = /** @type{!Console} */({}); + console.log = /** @type{!function(this:Console, ...*): undefined} */ (print); + console.warn = console.error = /** @type{!function(this:Console, ...*): undefined} */ (typeof printErr != 'undefined' ? printErr : print); + } + +} else + +// Note that this includes Node.js workers when relevant (pthreads is enabled). +// Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and +// ENVIRONMENT_IS_NODE. +if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled + scriptDirectory = self.location.href; + } else if (typeof document != 'undefined' && document.currentScript) { // web + scriptDirectory = document.currentScript.src; + } + // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them. + // otherwise, slice off the final part of the url to find the script directory. + // if scriptDirectory does not contain a slash, lastIndexOf will return -1, + // and scriptDirectory will correctly be replaced with an empty string. + // If scriptDirectory contains a query (starting with ?) or a fragment (starting with #), + // they are removed because they could contain a slash. + if (scriptDirectory.indexOf('blob:') !== 0) { + scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, "").lastIndexOf('/')+1); + } else { + scriptDirectory = ''; + } + + if (!(typeof window == 'object' || typeof importScripts == 'function')) throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)'); + + // Differentiate the Web Worker from the Node Worker case, as reading must + // be done differently. + { +// include: web_or_worker_shell_read.js + + + read_ = (url) => { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.send(null); + return xhr.responseText; + } + + if (ENVIRONMENT_IS_WORKER) { + readBinary = (url) => { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.responseType = 'arraybuffer'; + xhr.send(null); + return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response)); + }; + } + + readAsync = (url, onload, onerror) => { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'arraybuffer'; + xhr.onload = () => { + if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 + onload(xhr.response); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + } + +// end include: web_or_worker_shell_read.js + } + + setWindowTitle = (title) => document.title = title; +} else +{ + throw new Error('environment detection error'); +} + +var out = Module['print'] || console.log.bind(console); +var err = Module['printErr'] || console.warn.bind(console); + +// Merge back in the overrides +Object.assign(Module, moduleOverrides); +// Free the object hierarchy contained in the overrides, this lets the GC +// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. +moduleOverrides = null; +checkIncomingModuleAPI(); + +// Emit code to handle expected values on the Module object. This applies Module.x +// to the proper local x. This has two benefits: first, we only emit it if it is +// expected to arrive, and second, by using a local everywhere else that can be +// minified. + +if (Module['arguments']) arguments_ = Module['arguments'];legacyModuleProp('arguments', 'arguments_'); + +if (Module['thisProgram']) thisProgram = Module['thisProgram'];legacyModuleProp('thisProgram', 'thisProgram'); + +if (Module['quit']) quit_ = Module['quit'];legacyModuleProp('quit', 'quit_'); + +// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message +// Assertions on removed incoming Module JS APIs. +assert(typeof Module['memoryInitializerPrefixURL'] == 'undefined', 'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['pthreadMainPrefixURL'] == 'undefined', 'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['cdInitializerPrefixURL'] == 'undefined', 'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['filePackagePrefixURL'] == 'undefined', 'Module.filePackagePrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['read'] == 'undefined', 'Module.read option was removed (modify read_ in JS)'); +assert(typeof Module['readAsync'] == 'undefined', 'Module.readAsync option was removed (modify readAsync in JS)'); +assert(typeof Module['readBinary'] == 'undefined', 'Module.readBinary option was removed (modify readBinary in JS)'); +assert(typeof Module['setWindowTitle'] == 'undefined', 'Module.setWindowTitle option was removed (modify setWindowTitle in JS)'); +assert(typeof Module['TOTAL_MEMORY'] == 'undefined', 'Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY'); +legacyModuleProp('read', 'read_'); +legacyModuleProp('readAsync', 'readAsync'); +legacyModuleProp('readBinary', 'readBinary'); +legacyModuleProp('setWindowTitle', 'setWindowTitle'); +var IDBFS = 'IDBFS is no longer included by default; build with -lidbfs.js'; +var PROXYFS = 'PROXYFS is no longer included by default; build with -lproxyfs.js'; +var WORKERFS = 'WORKERFS is no longer included by default; build with -lworkerfs.js'; +var NODEFS = 'NODEFS is no longer included by default; build with -lnodefs.js'; + +assert(!ENVIRONMENT_IS_SHELL, "shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."); + + + + +var STACK_ALIGN = 16; +var POINTER_SIZE = 4; + +function getNativeTypeSize(type) { + switch (type) { + case 'i1': case 'i8': case 'u8': return 1; + case 'i16': case 'u16': return 2; + case 'i32': case 'u32': return 4; + case 'i64': case 'u64': return 8; + case 'float': return 4; + case 'double': return 8; + default: { + if (type[type.length - 1] === '*') { + return POINTER_SIZE; + } + if (type[0] === 'i') { + const bits = Number(type.substr(1)); + assert(bits % 8 === 0, 'getNativeTypeSize invalid bits ' + bits + ', type ' + type); + return bits / 8; + } + return 0; + } + } +} + +// include: runtime_debug.js + + +function legacyModuleProp(prop, newName) { + if (!Object.getOwnPropertyDescriptor(Module, prop)) { + Object.defineProperty(Module, prop, { + configurable: true, + get: function() { + abort('Module.' + prop + ' has been replaced with plain ' + newName + ' (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)'); + } + }); + } +} + +function ignoredModuleProp(prop) { + if (Object.getOwnPropertyDescriptor(Module, prop)) { + abort('`Module.' + prop + '` was supplied but `' + prop + '` not included in INCOMING_MODULE_JS_API'); + } +} + +// forcing the filesystem exports a few things by default +function isExportedByForceFilesystem(name) { + return name === 'FS_createPath' || + name === 'FS_createDataFile' || + name === 'FS_createPreloadedFile' || + name === 'FS_unlink' || + name === 'addRunDependency' || + // The old FS has some functionality that WasmFS lacks. + name === 'FS_createLazyFile' || + name === 'FS_createDevice' || + name === 'removeRunDependency'; +} + +function missingLibrarySymbol(sym) { + if (typeof globalThis !== 'undefined' && !Object.getOwnPropertyDescriptor(globalThis, sym)) { + Object.defineProperty(globalThis, sym, { + configurable: true, + get: function() { + // Can't `abort()` here because it would break code that does runtime + // checks. e.g. `if (typeof SDL === 'undefined')`. + var msg = '`' + sym + '` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line'; + // DEFAULT_LIBRARY_FUNCS_TO_INCLUDE requires the name as it appears in + // library.js, which means $name for a JS name with no prefix, or name + // for a JS name like _name. + var librarySymbol = sym; + if (!librarySymbol.startsWith('_')) { + librarySymbol = '$' + sym; + } + msg += " (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=" + librarySymbol + ")"; + if (isExportedByForceFilesystem(sym)) { + msg += '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you'; + } + warnOnce(msg); + return undefined; + } + }); + } +} + +function unexportedRuntimeSymbol(sym) { + if (!Object.getOwnPropertyDescriptor(Module, sym)) { + Object.defineProperty(Module, sym, { + configurable: true, + get: function() { + var msg = "'" + sym + "' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"; + if (isExportedByForceFilesystem(sym)) { + msg += '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you'; + } + abort(msg); + } + }); + } +} + +// end include: runtime_debug.js + + +// === Preamble library stuff === + +// Documentation for the public APIs defined in this file must be updated in: +// site/source/docs/api_reference/preamble.js.rst +// A prebuilt local version of the documentation is available at: +// site/build/text/docs/api_reference/preamble.js.txt +// You can also build docs locally as HTML or other formats in site/ +// An online HTML version (which may be of a different version of Emscripten) +// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html + +var wasmBinary; +if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];legacyModuleProp('wasmBinary', 'wasmBinary'); +var noExitRuntime = Module['noExitRuntime'] || true;legacyModuleProp('noExitRuntime', 'noExitRuntime'); + +if (typeof WebAssembly != 'object') { + abort('no native wasm support detected'); +} + +// Wasm globals + +var wasmMemory; + +//======================================== +// Runtime essentials +//======================================== + +// whether we are quitting the application. no code should run after this. +// set in exit() and abort() +var ABORT = false; + +// set by exit() and abort(). Passed to 'onExit' handler. +// NOTE: This is also used as the process return code code in shell environments +// but only when noExitRuntime is false. +var EXITSTATUS; + +/** @type {function(*, string=)} */ +function assert(condition, text) { + if (!condition) { + abort('Assertion failed' + (text ? ': ' + text : '')); + } +} + +// We used to include malloc/free by default in the past. Show a helpful error in +// builds with assertions. +function _malloc() { + abort("malloc() called but not included in the build - add '_malloc' to EXPORTED_FUNCTIONS"); +} +function _free() { + // Show a helpful error since we used to include free by default in the past. + abort("free() called but not included in the build - add '_free' to EXPORTED_FUNCTIONS"); +} + +// include: runtime_strings.js + + +// runtime_strings.js: String related runtime functions that are part of both +// MINIMAL_RUNTIME and regular runtime. + +var UTF8Decoder = typeof TextDecoder != 'undefined' ? new TextDecoder('utf8') : undefined; + +/** + * Given a pointer 'idx' to a null-terminated UTF8-encoded string in the given + * array that contains uint8 values, returns a copy of that string as a + * Javascript String object. + * heapOrArray is either a regular array, or a JavaScript typed array view. + * @param {number} idx + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) { + var endIdx = idx + maxBytesToRead; + var endPtr = idx; + // TextDecoder needs to know the byte length in advance, it doesn't stop on + // null terminator by itself. Also, use the length info to avoid running tiny + // strings through TextDecoder, since .subarray() allocates garbage. + // (As a tiny code save trick, compare endPtr against endIdx using a negation, + // so that undefined means Infinity) + while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr; + + if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { + return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)); + } + var str = ''; + // If building with TextDecoder, we have already computed the string length + // above, so test loop end condition against that + while (idx < endPtr) { + // For UTF8 byte structure, see: + // http://en.wikipedia.org/wiki/UTF-8#Description + // https://www.ietf.org/rfc/rfc2279.txt + // https://tools.ietf.org/html/rfc3629 + var u0 = heapOrArray[idx++]; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + var u1 = heapOrArray[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + var u2 = heapOrArray[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + if ((u0 & 0xF8) != 0xF0) warnOnce('Invalid UTF-8 leading byte ' + ptrToString(u0) + ' encountered when deserializing a UTF-8 string in wasm memory to a JS string!'); + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63); + } + + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } + return str; +} + +/** + * Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the + * emscripten HEAP, returns a copy of that string as a Javascript String object. + * + * @param {number} ptr + * @param {number=} maxBytesToRead - An optional length that specifies the + * maximum number of bytes to read. You can omit this parameter to scan the + * string until the first \0 byte. If maxBytesToRead is passed, and the string + * at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the + * string will cut short at that byte index (i.e. maxBytesToRead will not + * produce a string of exact length [ptr, ptr+maxBytesToRead[) N.B. mixing + * frequent uses of UTF8ToString() with and without maxBytesToRead may throw + * JS JIT optimizations off, so it is worth to consider consistently using one + * @return {string} + */ +function UTF8ToString(ptr, maxBytesToRead) { + return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ''; +} + +/** + * Copies the given Javascript String object 'str' to the given byte array at + * address 'outIdx', encoded in UTF8 form and null-terminated. The copy will + * require at most str.length*4+1 bytes of space in the HEAP. Use the function + * lengthBytesUTF8 to compute the exact number of bytes (excluding null + * terminator) that this function will write. + * + * @param {string} str - The Javascript string to copy. + * @param {ArrayBufferView|Array} heap - The array to copy to. Each + * index in this array is assumed + * to be one 8-byte element. + * @param {number} outIdx - The starting offset in the array to begin the copying. + * @param {number} maxBytesToWrite - The maximum number of bytes this function + * can write to the array. This count should + * include the null terminator, i.e. if + * maxBytesToWrite=1, only the null terminator + * will be written and nothing else. + * maxBytesToWrite=0 does not write any bytes + * to the output, not even the null + * terminator. + * @return {number} The number of bytes written, EXCLUDING the null terminator. + */ +function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) { + // Parameter maxBytesToWrite is not optional. Negative values, 0, null, + // undefined and false each don't write out any bytes. + if (!(maxBytesToWrite > 0)) + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code + // unit, not a Unicode code point of the character! So decode + // UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description + // and https://www.ietf.org/rfc/rfc2279.txt + // and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) { + var u1 = str.charCodeAt(++i); + u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF); + } + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + heap[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + heap[outIdx++] = 0xC0 | (u >> 6); + heap[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + heap[outIdx++] = 0xE0 | (u >> 12); + heap[outIdx++] = 0x80 | ((u >> 6) & 63); + heap[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 3 >= endIdx) break; + if (u > 0x10FFFF) warnOnce('Invalid Unicode code point ' + ptrToString(u) + ' encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).'); + heap[outIdx++] = 0xF0 | (u >> 18); + heap[outIdx++] = 0x80 | ((u >> 12) & 63); + heap[outIdx++] = 0x80 | ((u >> 6) & 63); + heap[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + heap[outIdx] = 0; + return outIdx - startIdx; +} + +/** + * Copies the given Javascript String object 'str' to the emscripten HEAP at + * address 'outPtr', null-terminated and encoded in UTF8 form. The copy will + * require at most str.length*4+1 bytes of space in the HEAP. + * Use the function lengthBytesUTF8 to compute the exact number of bytes + * (excluding null terminator) that this function will write. + * + * @return {number} The number of bytes written, EXCLUDING the null terminator. + */ +function stringToUTF8(str, outPtr, maxBytesToWrite) { + assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} + +/** + * Returns the number of bytes the given Javascript string takes if encoded as a + * UTF8 byte array, EXCLUDING the null terminator byte. + * + * @param {string} str - JavaScript string to operator on + * @return {number} Length, in bytes, of the UTF8 encoded string. + */ +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code + // unit, not a Unicode code point of the character! So decode + // UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var c = str.charCodeAt(i); // possibly a lead surrogate + if (c <= 0x7F) { + len++; + } else if (c <= 0x7FF) { + len += 2; + } else if (c >= 0xD800 && c <= 0xDFFF) { + len += 4; ++i; + } else { + len += 3; + } + } + return len; +} + +// end include: runtime_strings.js +// Memory management + +var HEAP, +/** @type {!ArrayBuffer} */ + buffer, +/** @type {!Int8Array} */ + HEAP8, +/** @type {!Uint8Array} */ + HEAPU8, +/** @type {!Int16Array} */ + HEAP16, +/** @type {!Uint16Array} */ + HEAPU16, +/** @type {!Int32Array} */ + HEAP32, +/** @type {!Uint32Array} */ + HEAPU32, +/** @type {!Float32Array} */ + HEAPF32, +/** @type {!Float64Array} */ + HEAPF64; + +function updateGlobalBufferAndViews(buf) { + buffer = buf; + Module['HEAP8'] = HEAP8 = new Int8Array(buf); + Module['HEAP16'] = HEAP16 = new Int16Array(buf); + Module['HEAP32'] = HEAP32 = new Int32Array(buf); + Module['HEAPU8'] = HEAPU8 = new Uint8Array(buf); + Module['HEAPU16'] = HEAPU16 = new Uint16Array(buf); + Module['HEAPU32'] = HEAPU32 = new Uint32Array(buf); + Module['HEAPF32'] = HEAPF32 = new Float32Array(buf); + Module['HEAPF64'] = HEAPF64 = new Float64Array(buf); +} + +var STACK_SIZE = 65536; +if (Module['STACK_SIZE']) assert(STACK_SIZE === Module['STACK_SIZE'], 'the stack size can no longer be determined at runtime') + +var INITIAL_MEMORY = Module['INITIAL_MEMORY'] || 16777216;legacyModuleProp('INITIAL_MEMORY', 'INITIAL_MEMORY'); + +assert(INITIAL_MEMORY >= STACK_SIZE, 'INITIAL_MEMORY should be larger than STACK_SIZE, was ' + INITIAL_MEMORY + '! (STACK_SIZE=' + STACK_SIZE + ')'); + +// check for full engine support (use string 'subarray' to avoid closure compiler confusion) +assert(typeof Int32Array != 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray != undefined && Int32Array.prototype.set != undefined, + 'JS engine does not provide full typed array support'); + +// If memory is defined in wasm, the user can't provide it. +assert(!Module['wasmMemory'], 'Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally'); +assert(INITIAL_MEMORY == 16777216, 'Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically'); + +// include: runtime_init_table.js +// In regular non-RELOCATABLE mode the table is exported +// from the wasm module and this will be assigned once +// the exports are available. +var wasmTable; + +// end include: runtime_init_table.js +// include: runtime_stack_check.js + + +// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode. +function writeStackCookie() { + var max = _emscripten_stack_get_end(); + assert((max & 3) == 0); + // If the stack ends at address zero we write our cookies 4 bytes into the + // stack. This prevents interference with the (separate) address-zero check + // below. + if (max == 0) { + max += 4; + } + // The stack grow downwards towards _emscripten_stack_get_end. + // We write cookies to the final two words in the stack and detect if they are + // ever overwritten. + HEAPU32[((max)>>2)] = 0x2135467; + HEAPU32[(((max)+(4))>>2)] = 0x89BACDFE; + // Also test the global address 0 for integrity. + HEAPU32[0] = 0x63736d65; /* 'emsc' */ +} + +function checkStackCookie() { + if (ABORT) return; + var max = _emscripten_stack_get_end(); + // See writeStackCookie(). + if (max == 0) { + max += 4; + } + var cookie1 = HEAPU32[((max)>>2)]; + var cookie2 = HEAPU32[(((max)+(4))>>2)]; + if (cookie1 != 0x2135467 || cookie2 != 0x89BACDFE) { + abort('Stack overflow! Stack cookie has been overwritten at ' + ptrToString(max) + ', expected hex dwords 0x89BACDFE and 0x2135467, but received ' + ptrToString(cookie2) + ' ' + ptrToString(cookie1)); + } + // Also test the global address 0 for integrity. + if (HEAPU32[0] !== 0x63736d65 /* 'emsc' */) { + abort('Runtime error: The application has corrupted its heap memory area (address zero)!'); + } +} + +// end include: runtime_stack_check.js +// include: runtime_assertions.js + + +// Endianness check +(function() { + var h16 = new Int16Array(1); + var h8 = new Int8Array(h16.buffer); + h16[0] = 0x6373; + if (h8[0] !== 0x73 || h8[1] !== 0x63) throw 'Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)'; +})(); + +// end include: runtime_assertions.js +var __ATPRERUN__ = []; // functions called before the runtime is initialized +var __ATINIT__ = []; // functions called during startup +var __ATMAIN__ = []; // functions called when main() is to be run +var __ATEXIT__ = []; // functions called during shutdown +var __ATPOSTRUN__ = []; // functions called after the main() is called + +var runtimeInitialized = false; + +function keepRuntimeAlive() { + return noExitRuntime; +} + +function preRun() { + + if (Module['preRun']) { + if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; + while (Module['preRun'].length) { + addOnPreRun(Module['preRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPRERUN__); +} + +function initRuntime() { + assert(!runtimeInitialized); + runtimeInitialized = true; + + checkStackCookie(); + + + callRuntimeCallbacks(__ATINIT__); +} + +function preMain() { + checkStackCookie(); + + callRuntimeCallbacks(__ATMAIN__); +} + +function postRun() { + checkStackCookie(); + + if (Module['postRun']) { + if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; + while (Module['postRun'].length) { + addOnPostRun(Module['postRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPOSTRUN__); +} + +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} + +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} + +function addOnPreMain(cb) { + __ATMAIN__.unshift(cb); +} + +function addOnExit(cb) { +} + +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} + +// include: runtime_math.js + + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32 + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc + +assert(Math.imul, 'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.fround, 'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.clz32, 'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.trunc, 'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); + +// end include: runtime_math.js +// A counter of dependencies for calling run(). If we need to +// do asynchronous work before running, increment this and +// decrement it. Incrementing must happen in a place like +// Module.preRun (used by emcc to add file preloading). +// Note that you can add dependencies in preRun, even though +// it happens right before run - run will be postponed until +// the dependencies are met. +var runDependencies = 0; +var runDependencyWatcher = null; +var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled +var runDependencyTracking = {}; + +function getUniqueRunDependency(id) { + var orig = id; + while (1) { + if (!runDependencyTracking[id]) return id; + id = orig + Math.random(); + } +} + +function addRunDependency(id) { + runDependencies++; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(!runDependencyTracking[id]); + runDependencyTracking[id] = 1; + if (runDependencyWatcher === null && typeof setInterval != 'undefined') { + // Check for missing dependencies every few seconds + runDependencyWatcher = setInterval(function() { + if (ABORT) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + return; + } + var shown = false; + for (var dep in runDependencyTracking) { + if (!shown) { + shown = true; + err('still waiting on run dependencies:'); + } + err('dependency: ' + dep); + } + if (shown) { + err('(end of list)'); + } + }, 10000); + } + } else { + err('warning: run dependency added without ID'); + } +} + +function removeRunDependency(id) { + runDependencies--; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(runDependencyTracking[id]); + delete runDependencyTracking[id]; + } else { + err('warning: run dependency removed without ID'); + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); // can add another dependenciesFulfilled + } + } +} + +/** @param {string|number=} what */ +function abort(what) { + if (Module['onAbort']) { + Module['onAbort'](what); + } + + what = 'Aborted(' + what + ')'; + // TODO(sbc): Should we remove printing and leave it up to whoever + // catches the exception? + err(what); + + ABORT = true; + EXITSTATUS = 1; + + // Use a wasm runtime error, because a JS error might be seen as a foreign + // exception, which means we'd run destructors on it. We need the error to + // simply make the program stop. + // FIXME This approach does not work in Wasm EH because it currently does not assume + // all RuntimeErrors are from traps; it decides whether a RuntimeError is from + // a trap or not based on a hidden field within the object. So at the moment + // we don't have a way of throwing a wasm trap from JS. TODO Make a JS API that + // allows this in the wasm spec. + + // Suppress closure compiler warning here. Closure compiler's builtin extern + // defintion for WebAssembly.RuntimeError claims it takes no arguments even + // though it can. + // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure gets fixed. + /** @suppress {checkTypes} */ + var e = new WebAssembly.RuntimeError(what); + + // Throw the error whether or not MODULARIZE is set because abort is used + // in code paths apart from instantiation where an exception is expected + // to be thrown when abort is called. + throw e; +} + +// {{MEM_INITIALIZER}} + +// include: memoryprofiler.js + + +// end include: memoryprofiler.js +// show errors on likely calls to FS when it was not included +var FS = { + error: function() { + abort('Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM'); + }, + init: function() { FS.error() }, + createDataFile: function() { FS.error() }, + createPreloadedFile: function() { FS.error() }, + createLazyFile: function() { FS.error() }, + open: function() { FS.error() }, + mkdev: function() { FS.error() }, + registerDevice: function() { FS.error() }, + analyzePath: function() { FS.error() }, + loadFilesFromDB: function() { FS.error() }, + + ErrnoError: function ErrnoError() { FS.error() }, +}; +Module['FS_createDataFile'] = FS.createDataFile; +Module['FS_createPreloadedFile'] = FS.createPreloadedFile; + +// include: URIUtils.js + + +// Prefix of data URIs emitted by SINGLE_FILE and related options. +var dataURIPrefix = 'data:application/octet-stream;base64,'; + +// Indicates whether filename is a base64 data URI. +function isDataURI(filename) { + // Prefix of data URIs emitted by SINGLE_FILE and related options. + return filename.startsWith(dataURIPrefix); +} + +// Indicates whether filename is delivered via file protocol (as opposed to http/https) +function isFileURI(filename) { + return filename.startsWith('file://'); +} + +// end include: URIUtils.js +/** @param {boolean=} fixedasm */ +function createExportWrapper(name, fixedasm) { + return function() { + var displayName = name; + var asm = fixedasm; + if (!fixedasm) { + asm = Module['asm']; + } + assert(runtimeInitialized, 'native function `' + displayName + '` called before runtime initialization'); + if (!asm[name]) { + assert(asm[name], 'exported native function `' + displayName + '` not found'); + } + return asm[name].apply(null, arguments); + }; +} + +var wasmBinaryFile; + wasmBinaryFile = 'hello.wasm'; + if (!isDataURI(wasmBinaryFile)) { + wasmBinaryFile = locateFile(wasmBinaryFile); + } + +function getBinary(file) { + try { + if (file == wasmBinaryFile && wasmBinary) { + return new Uint8Array(wasmBinary); + } + if (readBinary) { + return readBinary(file); + } + throw "both async and sync fetching of the wasm failed"; + } + catch (err) { + abort(err); + } +} + +function getBinaryPromise() { + // If we don't have the binary yet, try to to load it asynchronously. + // Fetch has some additional restrictions over XHR, like it can't be used on a file:// url. + // See https://github.com/github/fetch/pull/92#issuecomment-140665932 + // Cordova or Electron apps are typically loaded from a file:// url. + // So use fetch if it is available and the url is not a file, otherwise fall back to XHR. + if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { + if (typeof fetch == 'function' + && !isFileURI(wasmBinaryFile) + ) { + return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) { + if (!response['ok']) { + throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; + } + return response['arrayBuffer'](); + }).catch(function () { + return getBinary(wasmBinaryFile); + }); + } + else { + if (readAsync) { + // fetch is not available or url is file => try XHR (readAsync uses XHR internally) + return new Promise(function(resolve, reject) { + readAsync(wasmBinaryFile, function(response) { resolve(new Uint8Array(/** @type{!ArrayBuffer} */(response))) }, reject) + }); + } + } + } + + // Otherwise, getBinary should be able to get it synchronously + return Promise.resolve().then(function() { return getBinary(wasmBinaryFile); }); +} + +// Create the wasm instance. +// Receives the wasm imports, returns the exports. +function createWasm() { + // prepare imports + var info = { + 'env': asmLibraryArg, + 'wasi_snapshot_preview1': asmLibraryArg, + }; + // Load the wasm module and create an instance of using native support in the JS engine. + // handle a generated wasm instance, receiving its exports and + // performing other necessary setup + /** @param {WebAssembly.Module=} module*/ + function receiveInstance(instance, module) { + var exports = instance.exports; + + Module['asm'] = exports; + + wasmMemory = Module['asm']['memory']; + assert(wasmMemory, "memory not found in wasm exports"); + // This assertion doesn't hold when emscripten is run in --post-link + // mode. + // TODO(sbc): Read INITIAL_MEMORY out of the wasm file in post-link mode. + //assert(wasmMemory.buffer.byteLength === 16777216); + updateGlobalBufferAndViews(wasmMemory.buffer); + + wasmTable = Module['asm']['__indirect_function_table']; + assert(wasmTable, "table not found in wasm exports"); + + addOnInit(Module['asm']['__wasm_call_ctors']); + + removeRunDependency('wasm-instantiate'); + + } + // we can't run yet (except in a pthread, where we have a custom sync instantiator) + addRunDependency('wasm-instantiate'); + + // Prefer streaming instantiation if available. + // Async compilation can be confusing when an error on the page overwrites Module + // (for example, if the order of elements is wrong, and the one defining Module is + // later), so we save Module and check it later. + var trueModule = Module; + function receiveInstantiationResult(result) { + // 'result' is a ResultObject object which has both the module and instance. + // receiveInstance() will swap in the exports (to Module.asm) so they can be called + assert(Module === trueModule, 'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?'); + trueModule = null; + // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line. + // When the regression is fixed, can restore the above USE_PTHREADS-enabled path. + receiveInstance(result['instance']); + } + + function instantiateArrayBuffer(receiver) { + return getBinaryPromise().then(function(binary) { + return WebAssembly.instantiate(binary, info); + }).then(function (instance) { + return instance; + }).then(receiver, function(reason) { + err('failed to asynchronously prepare wasm: ' + reason); + + // Warn on some common problems. + if (isFileURI(wasmBinaryFile)) { + err('warning: Loading from a file URI (' + wasmBinaryFile + ') is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing'); + } + abort(reason); + }); + } + + function instantiateAsync() { + if (!wasmBinary && + typeof WebAssembly.instantiateStreaming == 'function' && + !isDataURI(wasmBinaryFile) && + // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously. + !isFileURI(wasmBinaryFile) && + // Avoid instantiateStreaming() on Node.js environment for now, as while + // Node.js v18.1.0 implements it, it does not have a full fetch() + // implementation yet. + // + // Reference: + // https://github.com/emscripten-core/emscripten/pull/16917 + !ENVIRONMENT_IS_NODE && + typeof fetch == 'function') { + return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) { + // Suppress closure warning here since the upstream definition for + // instantiateStreaming only allows Promise rather than + // an actual Response. + // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure is fixed. + /** @suppress {checkTypes} */ + var result = WebAssembly.instantiateStreaming(response, info); + + return result.then( + receiveInstantiationResult, + function(reason) { + // We expect the most common failure cause to be a bad MIME type for the binary, + // in which case falling back to ArrayBuffer instantiation should work. + err('wasm streaming compile failed: ' + reason); + err('falling back to ArrayBuffer instantiation'); + return instantiateArrayBuffer(receiveInstantiationResult); + }); + }); + } else { + return instantiateArrayBuffer(receiveInstantiationResult); + } + } + + // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback + // to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel + // to any other async startup actions they are performing. + // Also pthreads and wasm workers initialize the wasm instance through this path. + if (Module['instantiateWasm']) { + try { + var exports = Module['instantiateWasm'](info, receiveInstance); + return exports; + } catch(e) { + err('Module.instantiateWasm callback failed with error: ' + e); + return false; + } + } + + instantiateAsync(); + return {}; // no exports yet; we'll fill them in later +} + +// Globals used by JS i64 conversions (see makeSetValue) +var tempDouble; +var tempI64; + +// === Body === + +var ASM_CONSTS = { + +}; + + + + + + /** @constructor */ + function ExitStatus(status) { + this.name = 'ExitStatus'; + this.message = 'Program terminated with exit(' + status + ')'; + this.status = status; + } + + function callRuntimeCallbacks(callbacks) { + while (callbacks.length > 0) { + // Pass the module as the first argument. + callbacks.shift()(Module); + } + } + + + /** + * @param {number} ptr + * @param {string} type + */ + function getValue(ptr, type = 'i8') { + if (type.endsWith('*')) type = '*'; + switch (type) { + case 'i1': return HEAP8[((ptr)>>0)]; + case 'i8': return HEAP8[((ptr)>>0)]; + case 'i16': return HEAP16[((ptr)>>1)]; + case 'i32': return HEAP32[((ptr)>>2)]; + case 'i64': return HEAP32[((ptr)>>2)]; + case 'float': return HEAPF32[((ptr)>>2)]; + case 'double': return HEAPF64[((ptr)>>3)]; + case '*': return HEAPU32[((ptr)>>2)]; + default: abort('invalid type for getValue: ' + type); + } + return null; + } + + function ptrToString(ptr) { + return '0x' + ptr.toString(16).padStart(8, '0'); + } + + + /** + * @param {number} ptr + * @param {number} value + * @param {string} type + */ + function setValue(ptr, value, type = 'i8') { + if (type.endsWith('*')) type = '*'; + switch (type) { + case 'i1': HEAP8[((ptr)>>0)] = value; break; + case 'i8': HEAP8[((ptr)>>0)] = value; break; + case 'i16': HEAP16[((ptr)>>1)] = value; break; + case 'i32': HEAP32[((ptr)>>2)] = value; break; + case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math.min((+(Math.floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)] = tempI64[0],HEAP32[(((ptr)+(4))>>2)] = tempI64[1]); break; + case 'float': HEAPF32[((ptr)>>2)] = value; break; + case 'double': HEAPF64[((ptr)>>3)] = value; break; + case '*': HEAPU32[((ptr)>>2)] = value; break; + default: abort('invalid type for setValue: ' + type); + } + } + + function warnOnce(text) { + if (!warnOnce.shown) warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + if (ENVIRONMENT_IS_NODE) text = 'warning: ' + text; + err(text); + } + } + + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.copyWithin(dest, src, src + num); + } + + var printCharBuffers = [null,[],[]]; + function printChar(stream, curr) { + var buffer = printCharBuffers[stream]; + assert(buffer); + if (curr === 0 || curr === 10) { + (stream === 1 ? out : err)(UTF8ArrayToString(buffer, 0)); + buffer.length = 0; + } else { + buffer.push(curr); + } + } + function flush_NO_FILESYSTEM() { + // flush anything remaining in the buffers during shutdown + _fflush(0); + if (printCharBuffers[1].length) printChar(1, 10); + if (printCharBuffers[2].length) printChar(2, 10); + } + + var SYSCALLS = {varargs:undefined,get:function() { + assert(SYSCALLS.varargs != undefined); + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function(ptr) { + var ret = UTF8ToString(ptr); + return ret; + }}; + function _fd_write(fd, iov, iovcnt, pnum) { + // hack to support printf in SYSCALLS_REQUIRE_FILESYSTEM=0 + var num = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAPU32[((iov)>>2)]; + var len = HEAPU32[(((iov)+(4))>>2)]; + iov += 8; + for (var j = 0; j < len; j++) { + printChar(fd, HEAPU8[ptr+j]); + } + num += len; + } + HEAPU32[((pnum)>>2)] = num; + return 0; + } + + function _proc_exit(code) { + EXITSTATUS = code; + if (!keepRuntimeAlive()) { + if (Module['onExit']) Module['onExit'](code); + ABORT = true; + } + quit_(code, new ExitStatus(code)); + } + /** @param {boolean|number=} implicit */ + function exitJS(status, implicit) { + EXITSTATUS = status; + + checkUnflushedContent(); + + // if exit() was called explicitly, warn the user if the runtime isn't actually being shut down + if (keepRuntimeAlive() && !implicit) { + var msg = 'program exited (with status: ' + status + '), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)'; + err(msg); + } + + _proc_exit(status); + } + + function handleException(e) { + // Certain exception types we do not treat as errors since they are used for + // internal control flow. + // 1. ExitStatus, which is thrown by exit() + // 2. "unwind", which is thrown by emscripten_unwind_to_js_event_loop() and others + // that wish to return to JS event loop. + if (e instanceof ExitStatus || e == 'unwind') { + return EXITSTATUS; + } + checkStackCookie(); + if (e instanceof WebAssembly.RuntimeError) { + if (_emscripten_stack_get_current() <= 0) { + err('Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to ' + STACK_SIZE + ')'); + } + } + quit_(1, e); + } +var ASSERTIONS = true; + +function checkIncomingModuleAPI() { + ignoredModuleProp('fetchSettings'); +} +var asmLibraryArg = { + "emscripten_memcpy_big": _emscripten_memcpy_big, + "fd_write": _fd_write +}; +var asm = createWasm(); +/** @type {function(...*):?} */ +var ___wasm_call_ctors = Module["___wasm_call_ctors"] = createExportWrapper("__wasm_call_ctors"); + +/** @type {function(...*):?} */ +var _main = Module["_main"] = createExportWrapper("main"); + +/** @type {function(...*):?} */ +var ___errno_location = Module["___errno_location"] = createExportWrapper("__errno_location"); + +/** @type {function(...*):?} */ +var _fflush = Module["_fflush"] = createExportWrapper("fflush"); + +/** @type {function(...*):?} */ +var _emscripten_stack_init = Module["_emscripten_stack_init"] = function() { + return (_emscripten_stack_init = Module["_emscripten_stack_init"] = Module["asm"]["emscripten_stack_init"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _emscripten_stack_get_free = Module["_emscripten_stack_get_free"] = function() { + return (_emscripten_stack_get_free = Module["_emscripten_stack_get_free"] = Module["asm"]["emscripten_stack_get_free"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _emscripten_stack_get_base = Module["_emscripten_stack_get_base"] = function() { + return (_emscripten_stack_get_base = Module["_emscripten_stack_get_base"] = Module["asm"]["emscripten_stack_get_base"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _emscripten_stack_get_end = Module["_emscripten_stack_get_end"] = function() { + return (_emscripten_stack_get_end = Module["_emscripten_stack_get_end"] = Module["asm"]["emscripten_stack_get_end"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var stackSave = Module["stackSave"] = createExportWrapper("stackSave"); + +/** @type {function(...*):?} */ +var stackRestore = Module["stackRestore"] = createExportWrapper("stackRestore"); + +/** @type {function(...*):?} */ +var stackAlloc = Module["stackAlloc"] = createExportWrapper("stackAlloc"); + +/** @type {function(...*):?} */ +var _emscripten_stack_get_current = Module["_emscripten_stack_get_current"] = function() { + return (_emscripten_stack_get_current = Module["_emscripten_stack_get_current"] = Module["asm"]["emscripten_stack_get_current"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var dynCall_jiji = Module["dynCall_jiji"] = createExportWrapper("dynCall_jiji"); + + + + + +// === Auto-generated postamble setup entry stuff === + + +var unexportedRuntimeSymbols = [ + 'run', + 'UTF8ArrayToString', + 'UTF8ToString', + 'stringToUTF8Array', + 'stringToUTF8', + 'lengthBytesUTF8', + 'addOnPreRun', + 'addOnInit', + 'addOnPreMain', + 'addOnExit', + 'addOnPostRun', + 'addRunDependency', + 'removeRunDependency', + 'FS_createFolder', + 'FS_createPath', + 'FS_createDataFile', + 'FS_createPreloadedFile', + 'FS_createLazyFile', + 'FS_createLink', + 'FS_createDevice', + 'FS_unlink', + 'getLEB', + 'getFunctionTables', + 'alignFunctionTables', + 'registerFunctions', + 'prettyPrint', + 'getCompilerSetting', + 'out', + 'err', + 'callMain', + 'abort', + 'keepRuntimeAlive', + 'wasmMemory', + 'stackAlloc', + 'stackSave', + 'stackRestore', + 'getTempRet0', + 'setTempRet0', + 'writeStackCookie', + 'checkStackCookie', + 'ptrToString', + 'zeroMemory', + 'stringToNewUTF8', + 'exitJS', + 'getHeapMax', + 'abortOnCannotGrowMemory', + 'emscripten_realloc_buffer', + 'ENV', + 'ERRNO_CODES', + 'ERRNO_MESSAGES', + 'setErrNo', + 'inetPton4', + 'inetNtop4', + 'inetPton6', + 'inetNtop6', + 'readSockaddr', + 'writeSockaddr', + 'DNS', + 'getHostByName', + 'Protocols', + 'Sockets', + 'getRandomDevice', + 'warnOnce', + 'traverseStack', + 'UNWIND_CACHE', + 'convertPCtoSourceLocation', + 'readEmAsmArgsArray', + 'readEmAsmArgs', + 'runEmAsmFunction', + 'runMainThreadEmAsm', + 'jstoi_q', + 'jstoi_s', + 'getExecutableName', + 'listenOnce', + 'autoResumeAudioContext', + 'dynCallLegacy', + 'getDynCaller', + 'dynCall', + 'handleException', + 'runtimeKeepalivePush', + 'runtimeKeepalivePop', + 'callUserCallback', + 'maybeExit', + 'safeSetTimeout', + 'asmjsMangle', + 'asyncLoad', + 'alignMemory', + 'mmapAlloc', + 'writeI53ToI64', + 'writeI53ToI64Clamped', + 'writeI53ToI64Signaling', + 'writeI53ToU64Clamped', + 'writeI53ToU64Signaling', + 'readI53FromI64', + 'readI53FromU64', + 'convertI32PairToI53', + 'convertI32PairToI53Checked', + 'convertU32PairToI53', + 'getCFunc', + 'ccall', + 'cwrap', + 'uleb128Encode', + 'sigToWasmTypes', + 'generateFuncType', + 'convertJsFunctionToWasm', + 'freeTableIndexes', + 'functionsInTableMap', + 'getEmptyTableSlot', + 'updateTableMap', + 'addFunction', + 'removeFunction', + 'reallyNegative', + 'unSign', + 'strLen', + 'reSign', + 'formatString', + 'setValue', + 'getValue', + 'PATH', + 'PATH_FS', + 'intArrayFromString', + 'intArrayToString', + 'AsciiToString', + 'stringToAscii', + 'UTF16Decoder', + 'UTF16ToString', + 'stringToUTF16', + 'lengthBytesUTF16', + 'UTF32ToString', + 'stringToUTF32', + 'lengthBytesUTF32', + 'allocateUTF8', + 'allocateUTF8OnStack', + 'writeStringToMemory', + 'writeArrayToMemory', + 'writeAsciiToMemory', + 'SYSCALLS', + 'getSocketFromFD', + 'getSocketAddress', + 'JSEvents', + 'registerKeyEventCallback', + 'specialHTMLTargets', + 'maybeCStringToJsString', + 'findEventTarget', + 'findCanvasEventTarget', + 'getBoundingClientRect', + 'fillMouseEventData', + 'registerMouseEventCallback', + 'registerWheelEventCallback', + 'registerUiEventCallback', + 'registerFocusEventCallback', + 'fillDeviceOrientationEventData', + 'registerDeviceOrientationEventCallback', + 'fillDeviceMotionEventData', + 'registerDeviceMotionEventCallback', + 'screenOrientation', + 'fillOrientationChangeEventData', + 'registerOrientationChangeEventCallback', + 'fillFullscreenChangeEventData', + 'registerFullscreenChangeEventCallback', + 'JSEvents_requestFullscreen', + 'JSEvents_resizeCanvasForFullscreen', + 'registerRestoreOldStyle', + 'hideEverythingExceptGivenElement', + 'restoreHiddenElements', + 'setLetterbox', + 'currentFullscreenStrategy', + 'restoreOldWindowedStyle', + 'softFullscreenResizeWebGLRenderTarget', + 'doRequestFullscreen', + 'fillPointerlockChangeEventData', + 'registerPointerlockChangeEventCallback', + 'registerPointerlockErrorEventCallback', + 'requestPointerLock', + 'fillVisibilityChangeEventData', + 'registerVisibilityChangeEventCallback', + 'registerTouchEventCallback', + 'fillGamepadEventData', + 'registerGamepadEventCallback', + 'registerBeforeUnloadEventCallback', + 'fillBatteryEventData', + 'battery', + 'registerBatteryEventCallback', + 'setCanvasElementSize', + 'getCanvasElementSize', + 'demangle', + 'demangleAll', + 'jsStackTrace', + 'stackTrace', + 'ExitStatus', + 'getEnvStrings', + 'checkWasiClock', + 'flush_NO_FILESYSTEM', + 'dlopenMissingError', + 'createDyncallWrapper', + 'setImmediateWrapped', + 'clearImmediateWrapped', + 'polyfillSetImmediate', + 'uncaughtExceptionCount', + 'exceptionLast', + 'exceptionCaught', + 'ExceptionInfo', + 'exception_addRef', + 'exception_decRef', + 'Browser', + 'setMainLoop', + 'wget', + 'FS', + 'MEMFS', + 'TTY', + 'PIPEFS', + 'SOCKFS', + '_setNetworkCallback', + 'tempFixedLengthArray', + 'miniTempWebGLFloatBuffers', + 'heapObjectForWebGLType', + 'heapAccessShiftForWebGLHeap', + 'GL', + 'emscriptenWebGLGet', + 'computeUnpackAlignedImageSize', + 'emscriptenWebGLGetTexPixelData', + 'emscriptenWebGLGetUniform', + 'webglGetUniformLocation', + 'webglPrepareUniformLocationsBeforeFirstUse', + 'webglGetLeftBracePos', + 'emscriptenWebGLGetVertexAttrib', + 'writeGLArray', + 'AL', + 'SDL_unicode', + 'SDL_ttfContext', + 'SDL_audio', + 'SDL', + 'SDL_gfx', + 'GLUT', + 'EGL', + 'GLFW_Window', + 'GLFW', + 'GLEW', + 'IDBStore', + 'runAndAbortIfError', + 'ALLOC_NORMAL', + 'ALLOC_STACK', + 'allocate', +]; +unexportedRuntimeSymbols.forEach(unexportedRuntimeSymbol); +var missingLibrarySymbols = [ + 'zeroMemory', + 'stringToNewUTF8', + 'getHeapMax', + 'abortOnCannotGrowMemory', + 'emscripten_realloc_buffer', + 'setErrNo', + 'inetPton4', + 'inetNtop4', + 'inetPton6', + 'inetNtop6', + 'readSockaddr', + 'writeSockaddr', + 'getHostByName', + 'getRandomDevice', + 'traverseStack', + 'convertPCtoSourceLocation', + 'readEmAsmArgs', + 'runEmAsmFunction', + 'runMainThreadEmAsm', + 'jstoi_q', + 'jstoi_s', + 'getExecutableName', + 'listenOnce', + 'autoResumeAudioContext', + 'dynCallLegacy', + 'getDynCaller', + 'dynCall', + 'runtimeKeepalivePush', + 'runtimeKeepalivePop', + 'callUserCallback', + 'maybeExit', + 'safeSetTimeout', + 'asmjsMangle', + 'asyncLoad', + 'alignMemory', + 'mmapAlloc', + 'writeI53ToI64', + 'writeI53ToI64Clamped', + 'writeI53ToI64Signaling', + 'writeI53ToU64Clamped', + 'writeI53ToU64Signaling', + 'readI53FromI64', + 'readI53FromU64', + 'convertI32PairToI53', + 'convertI32PairToI53Checked', + 'convertU32PairToI53', + 'getCFunc', + 'ccall', + 'cwrap', + 'uleb128Encode', + 'sigToWasmTypes', + 'generateFuncType', + 'convertJsFunctionToWasm', + 'getEmptyTableSlot', + 'updateTableMap', + 'addFunction', + 'removeFunction', + 'reallyNegative', + 'unSign', + 'strLen', + 'reSign', + 'formatString', + 'intArrayFromString', + 'intArrayToString', + 'AsciiToString', + 'stringToAscii', + 'UTF16ToString', + 'stringToUTF16', + 'lengthBytesUTF16', + 'UTF32ToString', + 'stringToUTF32', + 'lengthBytesUTF32', + 'allocateUTF8', + 'allocateUTF8OnStack', + 'writeStringToMemory', + 'writeArrayToMemory', + 'writeAsciiToMemory', + 'getSocketFromFD', + 'getSocketAddress', + 'registerKeyEventCallback', + 'maybeCStringToJsString', + 'findEventTarget', + 'findCanvasEventTarget', + 'getBoundingClientRect', + 'fillMouseEventData', + 'registerMouseEventCallback', + 'registerWheelEventCallback', + 'registerUiEventCallback', + 'registerFocusEventCallback', + 'fillDeviceOrientationEventData', + 'registerDeviceOrientationEventCallback', + 'fillDeviceMotionEventData', + 'registerDeviceMotionEventCallback', + 'screenOrientation', + 'fillOrientationChangeEventData', + 'registerOrientationChangeEventCallback', + 'fillFullscreenChangeEventData', + 'registerFullscreenChangeEventCallback', + 'JSEvents_requestFullscreen', + 'JSEvents_resizeCanvasForFullscreen', + 'registerRestoreOldStyle', + 'hideEverythingExceptGivenElement', + 'restoreHiddenElements', + 'setLetterbox', + 'softFullscreenResizeWebGLRenderTarget', + 'doRequestFullscreen', + 'fillPointerlockChangeEventData', + 'registerPointerlockChangeEventCallback', + 'registerPointerlockErrorEventCallback', + 'requestPointerLock', + 'fillVisibilityChangeEventData', + 'registerVisibilityChangeEventCallback', + 'registerTouchEventCallback', + 'fillGamepadEventData', + 'registerGamepadEventCallback', + 'registerBeforeUnloadEventCallback', + 'fillBatteryEventData', + 'battery', + 'registerBatteryEventCallback', + 'setCanvasElementSize', + 'getCanvasElementSize', + 'demangle', + 'demangleAll', + 'jsStackTrace', + 'stackTrace', + 'getEnvStrings', + 'checkWasiClock', + 'createDyncallWrapper', + 'setImmediateWrapped', + 'clearImmediateWrapped', + 'polyfillSetImmediate', + 'ExceptionInfo', + 'exception_addRef', + 'exception_decRef', + 'setMainLoop', + '_setNetworkCallback', + 'heapObjectForWebGLType', + 'heapAccessShiftForWebGLHeap', + 'emscriptenWebGLGet', + 'computeUnpackAlignedImageSize', + 'emscriptenWebGLGetTexPixelData', + 'emscriptenWebGLGetUniform', + 'webglGetUniformLocation', + 'webglPrepareUniformLocationsBeforeFirstUse', + 'webglGetLeftBracePos', + 'emscriptenWebGLGetVertexAttrib', + 'writeGLArray', + 'SDL_unicode', + 'SDL_ttfContext', + 'SDL_audio', + 'GLFW_Window', + 'runAndAbortIfError', + 'ALLOC_NORMAL', + 'ALLOC_STACK', + 'allocate', +]; +missingLibrarySymbols.forEach(missingLibrarySymbol) + + +var calledRun; + +dependenciesFulfilled = function runCaller() { + // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) + if (!calledRun) run(); + if (!calledRun) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled +}; + +function callMain(args) { + assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'); + assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called'); + + var entryFunction = Module['_main']; + + var argc = 0; + var argv = 0; + + try { + + var ret = entryFunction(argc, argv); + + // In PROXY_TO_PTHREAD builds, we should never exit the runtime below, as + // execution is asynchronously handed off to a pthread. + // if we're not running an evented main loop, it's time to exit + exitJS(ret, /* implicit = */ true); + return ret; + } + catch (e) { + return handleException(e); + } +} + +function stackCheckInit() { + // This is normally called automatically during __wasm_call_ctors but need to + // get these values before even running any of the ctors so we call it redundantly + // here. + _emscripten_stack_init(); + // TODO(sbc): Move writeStackCookie to native to to avoid this. + writeStackCookie(); +} + +/** @type {function(Array=)} */ +function run(args) { + args = args || arguments_; + + if (runDependencies > 0) { + return; + } + + stackCheckInit(); + + preRun(); + + // a preRun added a dependency, run will be called later + if (runDependencies > 0) { + return; + } + + function doRun() { + // run may have just been called through dependencies being fulfilled just in this very frame, + // or while the async setStatus time below was happening + if (calledRun) return; + calledRun = true; + Module['calledRun'] = true; + + if (ABORT) return; + + initRuntime(); + + preMain(); + + if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); + + if (shouldRunNow) callMain(args); + + postRun(); + } + + if (Module['setStatus']) { + Module['setStatus']('Running...'); + setTimeout(function() { + setTimeout(function() { + Module['setStatus'](''); + }, 1); + doRun(); + }, 1); + } else + { + doRun(); + } + checkStackCookie(); +} + +function checkUnflushedContent() { + // Compiler settings do not allow exiting the runtime, so flushing + // the streams is not possible. but in ASSERTIONS mode we check + // if there was something to flush, and if so tell the user they + // should request that the runtime be exitable. + // Normally we would not even include flush() at all, but in ASSERTIONS + // builds we do so just for this check, and here we see if there is any + // content to flush, that is, we check if there would have been + // something a non-ASSERTIONS build would have not seen. + // How we flush the streams depends on whether we are in SYSCALLS_REQUIRE_FILESYSTEM=0 + // mode (which has its own special function for this; otherwise, all + // the code is inside libc) + var oldOut = out; + var oldErr = err; + var has = false; + out = err = (x) => { + has = true; + } + try { // it doesn't matter if it fails + flush_NO_FILESYSTEM(); + } catch(e) {} + out = oldOut; + err = oldErr; + if (has) { + warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.'); + warnOnce('(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)'); + } +} + +if (Module['preInit']) { + if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; + while (Module['preInit'].length > 0) { + Module['preInit'].pop()(); + } +} + +// shouldRunNow refers to calling main(), not run(). +var shouldRunNow = true; + +if (Module['noInitialRun']) shouldRunNow = false; + +run(); + + + + + diff --git a/emscripten/hello.wasm b/emscripten/hello.wasm new file mode 100755 index 0000000..9e23d78 Binary files /dev/null and b/emscripten/hello.wasm differ diff --git a/emscripten/hello_world.c b/emscripten/hello_world.c new file mode 100644 index 0000000..b37a49b --- /dev/null +++ b/emscripten/hello_world.c @@ -0,0 +1,13 @@ +/* + * Copyright 2011 The Emscripten Authors. All rights reserved. + * Emscripten is available under two separate licenses, the MIT license and the + * University of Illinois/NCSA Open Source License. Both these licenses can be + * found in the LICENSE file. + */ + +#include + +int main() { + printf("hello, world!\n"); + return 0; +} diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..6848441 Binary files /dev/null and b/favicon.ico differ diff --git a/fonts/Helvetica/1489424/37953885-0443-4c72-a693-9152a9f5a901.woff2 b/fonts/Helvetica/1489424/37953885-0443-4c72-a693-9152a9f5a901.woff2 new file mode 100644 index 0000000..63d4438 Binary files /dev/null and b/fonts/Helvetica/1489424/37953885-0443-4c72-a693-9152a9f5a901.woff2 differ diff --git a/fonts/Helvetica/1489424/fcce277c-07e2-4c88-ad8b-a71b484e2cbe.woff b/fonts/Helvetica/1489424/fcce277c-07e2-4c88-ad8b-a71b484e2cbe.woff new file mode 100644 index 0000000..a7a71a3 Binary files /dev/null and b/fonts/Helvetica/1489424/fcce277c-07e2-4c88-ad8b-a71b484e2cbe.woff differ diff --git a/fonts/Helvetica/1489430/0976eae4-2818-43ff-8f87-70dcbb0f9ea9.woff2 b/fonts/Helvetica/1489430/0976eae4-2818-43ff-8f87-70dcbb0f9ea9.woff2 new file mode 100644 index 0000000..69894d4 Binary files /dev/null and b/fonts/Helvetica/1489430/0976eae4-2818-43ff-8f87-70dcbb0f9ea9.woff2 differ diff --git a/fonts/Helvetica/1489430/a26a74ab-9781-4c48-bcfb-e2e63bc068d5.woff b/fonts/Helvetica/1489430/a26a74ab-9781-4c48-bcfb-e2e63bc068d5.woff new file mode 100644 index 0000000..6e37ba0 Binary files /dev/null and b/fonts/Helvetica/1489430/a26a74ab-9781-4c48-bcfb-e2e63bc068d5.woff differ diff --git a/fonts/Helvetica/1489436/57055fe4-c2d3-4287-bac2-eece43fdcbd3.woff b/fonts/Helvetica/1489436/57055fe4-c2d3-4287-bac2-eece43fdcbd3.woff new file mode 100644 index 0000000..b7ad54f Binary files /dev/null and b/fonts/Helvetica/1489436/57055fe4-c2d3-4287-bac2-eece43fdcbd3.woff differ diff --git a/fonts/Helvetica/1489436/89294146-207c-4803-91fe-338f0d0094bd.woff2 b/fonts/Helvetica/1489436/89294146-207c-4803-91fe-338f0d0094bd.woff2 new file mode 100644 index 0000000..8146c70 Binary files /dev/null and b/fonts/Helvetica/1489436/89294146-207c-4803-91fe-338f0d0094bd.woff2 differ diff --git a/fonts/Helvetica/1489444/6389110a-e983-4d95-8d1f-5a87de018aac.woff b/fonts/Helvetica/1489444/6389110a-e983-4d95-8d1f-5a87de018aac.woff new file mode 100644 index 0000000..b7ce78a Binary files /dev/null and b/fonts/Helvetica/1489444/6389110a-e983-4d95-8d1f-5a87de018aac.woff differ diff --git a/fonts/Helvetica/1489444/ac4134ce-b28e-4df9-b88c-a67db965774e.woff2 b/fonts/Helvetica/1489444/ac4134ce-b28e-4df9-b88c-a67db965774e.woff2 new file mode 100644 index 0000000..6c8eb5d Binary files /dev/null and b/fonts/Helvetica/1489444/ac4134ce-b28e-4df9-b88c-a67db965774e.woff2 differ diff --git a/fonts/Helvetica/1489452/7ce0a2f5-eb00-46aa-919c-5b3f3667646c.woff2 b/fonts/Helvetica/1489452/7ce0a2f5-eb00-46aa-919c-5b3f3667646c.woff2 new file mode 100644 index 0000000..dd1162b Binary files /dev/null and b/fonts/Helvetica/1489452/7ce0a2f5-eb00-46aa-919c-5b3f3667646c.woff2 differ diff --git a/fonts/Helvetica/1489452/cad22c74-45b4-4c49-9e6a-0cd3768a7bc7.woff b/fonts/Helvetica/1489452/cad22c74-45b4-4c49-9e6a-0cd3768a7bc7.woff new file mode 100644 index 0000000..7e0a0f1 Binary files /dev/null and b/fonts/Helvetica/1489452/cad22c74-45b4-4c49-9e6a-0cd3768a7bc7.woff differ diff --git a/fonts/Helvetica/1489460/17d3cf02-3e99-48c3-953a-b26082b28949.woff b/fonts/Helvetica/1489460/17d3cf02-3e99-48c3-953a-b26082b28949.woff new file mode 100644 index 0000000..cd4029c Binary files /dev/null and b/fonts/Helvetica/1489460/17d3cf02-3e99-48c3-953a-b26082b28949.woff differ diff --git a/fonts/Helvetica/1489460/3e13f208-91f2-41ec-b1bf-e5b29d486821.woff2 b/fonts/Helvetica/1489460/3e13f208-91f2-41ec-b1bf-e5b29d486821.woff2 new file mode 100644 index 0000000..5cc18d0 Binary files /dev/null and b/fonts/Helvetica/1489460/3e13f208-91f2-41ec-b1bf-e5b29d486821.woff2 differ diff --git a/fonts/Helvetica/1489468/140cbf94-b441-4980-b031-0a614cdee9a8.woff2 b/fonts/Helvetica/1489468/140cbf94-b441-4980-b031-0a614cdee9a8.woff2 new file mode 100644 index 0000000..62f64f6 Binary files /dev/null and b/fonts/Helvetica/1489468/140cbf94-b441-4980-b031-0a614cdee9a8.woff2 differ diff --git a/fonts/Helvetica/1489468/c13f2d0e-112f-4829-96e7-573d38f83066.woff b/fonts/Helvetica/1489468/c13f2d0e-112f-4829-96e7-573d38f83066.woff new file mode 100644 index 0000000..1859b74 Binary files /dev/null and b/fonts/Helvetica/1489468/c13f2d0e-112f-4829-96e7-573d38f83066.woff differ diff --git a/fonts/Helvetica/1489474/07818719-eb0b-475f-ab2b-3cb4ee66e0d9.woff b/fonts/Helvetica/1489474/07818719-eb0b-475f-ab2b-3cb4ee66e0d9.woff new file mode 100644 index 0000000..ef465c3 Binary files /dev/null and b/fonts/Helvetica/1489474/07818719-eb0b-475f-ab2b-3cb4ee66e0d9.woff differ diff --git a/fonts/Helvetica/1489474/471483bd-1422-4548-a1cf-a7fa9fdf5b59.woff2 b/fonts/Helvetica/1489474/471483bd-1422-4548-a1cf-a7fa9fdf5b59.woff2 new file mode 100644 index 0000000..98d045e Binary files /dev/null and b/fonts/Helvetica/1489474/471483bd-1422-4548-a1cf-a7fa9fdf5b59.woff2 differ diff --git a/fonts/Helvetica/1489480/a9b0bbff-d4ce-481a-ade4-32c7e112125f.woff b/fonts/Helvetica/1489480/a9b0bbff-d4ce-481a-ade4-32c7e112125f.woff new file mode 100644 index 0000000..0f7ddc9 Binary files /dev/null and b/fonts/Helvetica/1489480/a9b0bbff-d4ce-481a-ade4-32c7e112125f.woff differ diff --git a/fonts/Helvetica/1489480/da1e3389-7cb1-4bbe-a8cb-9d8c12bed489.woff2 b/fonts/Helvetica/1489480/da1e3389-7cb1-4bbe-a8cb-9d8c12bed489.woff2 new file mode 100644 index 0000000..d5f6c7f Binary files /dev/null and b/fonts/Helvetica/1489480/da1e3389-7cb1-4bbe-a8cb-9d8c12bed489.woff2 differ diff --git a/fonts/Helvetica/1489486/a3434dce-e398-47cf-8746-83306c679298.woff b/fonts/Helvetica/1489486/a3434dce-e398-47cf-8746-83306c679298.woff new file mode 100644 index 0000000..1921e86 Binary files /dev/null and b/fonts/Helvetica/1489486/a3434dce-e398-47cf-8746-83306c679298.woff differ diff --git a/fonts/Helvetica/1489486/ae28463c-ff37-41b4-b03c-4ccb49d556f2.woff2 b/fonts/Helvetica/1489486/ae28463c-ff37-41b4-b03c-4ccb49d556f2.woff2 new file mode 100644 index 0000000..53696e4 Binary files /dev/null and b/fonts/Helvetica/1489486/ae28463c-ff37-41b4-b03c-4ccb49d556f2.woff2 differ diff --git a/fonts/Helvetica/1489492/b2dc2dea-700a-4f4a-8d54-410cab0563eb.woff2 b/fonts/Helvetica/1489492/b2dc2dea-700a-4f4a-8d54-410cab0563eb.woff2 new file mode 100644 index 0000000..6150171 Binary files /dev/null and b/fonts/Helvetica/1489492/b2dc2dea-700a-4f4a-8d54-410cab0563eb.woff2 differ diff --git a/fonts/Helvetica/1489492/db750bb2-16e0-4166-a692-163c51ea3190.woff b/fonts/Helvetica/1489492/db750bb2-16e0-4166-a692-163c51ea3190.woff new file mode 100644 index 0000000..7e0ce59 Binary files /dev/null and b/fonts/Helvetica/1489492/db750bb2-16e0-4166-a692-163c51ea3190.woff differ diff --git a/fonts/Helvetica/1489498/57c443b8-3809-443e-90cb-82c5adee7c79.woff b/fonts/Helvetica/1489498/57c443b8-3809-443e-90cb-82c5adee7c79.woff new file mode 100644 index 0000000..e581edb Binary files /dev/null and b/fonts/Helvetica/1489498/57c443b8-3809-443e-90cb-82c5adee7c79.woff differ diff --git a/fonts/Helvetica/1489498/836434bb-026b-4b96-9158-34f76cc2cdc6.woff2 b/fonts/Helvetica/1489498/836434bb-026b-4b96-9158-34f76cc2cdc6.woff2 new file mode 100644 index 0000000..ce94d62 Binary files /dev/null and b/fonts/Helvetica/1489498/836434bb-026b-4b96-9158-34f76cc2cdc6.woff2 differ diff --git a/fonts/Helvetica/1489504/c3e64e07-d679-43dc-982a-6d21239f752e.woff b/fonts/Helvetica/1489504/c3e64e07-d679-43dc-982a-6d21239f752e.woff new file mode 100644 index 0000000..11fc910 Binary files /dev/null and b/fonts/Helvetica/1489504/c3e64e07-d679-43dc-982a-6d21239f752e.woff differ diff --git a/fonts/Helvetica/1489504/cc8baf39-7363-4096-9272-744ba5d42550.woff2 b/fonts/Helvetica/1489504/cc8baf39-7363-4096-9272-744ba5d42550.woff2 new file mode 100644 index 0000000..bc53368 Binary files /dev/null and b/fonts/Helvetica/1489504/cc8baf39-7363-4096-9272-744ba5d42550.woff2 differ diff --git a/fonts/Helvetica/1489510/2bf6c0ba-69c7-4dde-ae8e-80047b60ebc1.woff2 b/fonts/Helvetica/1489510/2bf6c0ba-69c7-4dde-ae8e-80047b60ebc1.woff2 new file mode 100644 index 0000000..299b5ba Binary files /dev/null and b/fonts/Helvetica/1489510/2bf6c0ba-69c7-4dde-ae8e-80047b60ebc1.woff2 differ diff --git a/fonts/Helvetica/1489510/b659afed-b043-4147-84b5-8ef7fcdbbeef.woff b/fonts/Helvetica/1489510/b659afed-b043-4147-84b5-8ef7fcdbbeef.woff new file mode 100644 index 0000000..488ed2c Binary files /dev/null and b/fonts/Helvetica/1489510/b659afed-b043-4147-84b5-8ef7fcdbbeef.woff differ diff --git a/fonts/Helvetica/1489516/0ec178c4-7cd1-4236-8b55-ad77cb3ceae8.woff b/fonts/Helvetica/1489516/0ec178c4-7cd1-4236-8b55-ad77cb3ceae8.woff new file mode 100644 index 0000000..aa81fcd Binary files /dev/null and b/fonts/Helvetica/1489516/0ec178c4-7cd1-4236-8b55-ad77cb3ceae8.woff differ diff --git a/fonts/Helvetica/1489516/318f10c9-cc4d-47d1-a357-05d8a36bd49c.woff2 b/fonts/Helvetica/1489516/318f10c9-cc4d-47d1-a357-05d8a36bd49c.woff2 new file mode 100644 index 0000000..d79edf0 Binary files /dev/null and b/fonts/Helvetica/1489516/318f10c9-cc4d-47d1-a357-05d8a36bd49c.woff2 differ diff --git a/fonts/Helvetica/1489522/09e06020-4637-43c8-9783-bf71198454e5.woff b/fonts/Helvetica/1489522/09e06020-4637-43c8-9783-bf71198454e5.woff new file mode 100644 index 0000000..51510a7 Binary files /dev/null and b/fonts/Helvetica/1489522/09e06020-4637-43c8-9783-bf71198454e5.woff differ diff --git a/fonts/Helvetica/1489522/2d15f0a2-cc5c-478c-89d0-a5aebc6339ee.woff2 b/fonts/Helvetica/1489522/2d15f0a2-cc5c-478c-89d0-a5aebc6339ee.woff2 new file mode 100644 index 0000000..8e2acfe Binary files /dev/null and b/fonts/Helvetica/1489522/2d15f0a2-cc5c-478c-89d0-a5aebc6339ee.woff2 differ diff --git a/fonts/Helvetica/1489528/4464a79b-239b-48ad-88ab-e4518082b9b6.woff b/fonts/Helvetica/1489528/4464a79b-239b-48ad-88ab-e4518082b9b6.woff new file mode 100644 index 0000000..fc5e7b7 Binary files /dev/null and b/fonts/Helvetica/1489528/4464a79b-239b-48ad-88ab-e4518082b9b6.woff differ diff --git a/fonts/Helvetica/1489528/9a21b599-8254-4b46-af23-7c49a2a127be.woff2 b/fonts/Helvetica/1489528/9a21b599-8254-4b46-af23-7c49a2a127be.woff2 new file mode 100644 index 0000000..4d34ca5 Binary files /dev/null and b/fonts/Helvetica/1489528/9a21b599-8254-4b46-af23-7c49a2a127be.woff2 differ diff --git a/fonts/Helvetica/1489536/7a971f81-127b-458a-a5ee-02f9290ef997.woff2 b/fonts/Helvetica/1489536/7a971f81-127b-458a-a5ee-02f9290ef997.woff2 new file mode 100644 index 0000000..103e27c Binary files /dev/null and b/fonts/Helvetica/1489536/7a971f81-127b-458a-a5ee-02f9290ef997.woff2 differ diff --git a/fonts/Helvetica/1489536/c2db5131-f641-4a27-963c-c1a7435d71da.woff b/fonts/Helvetica/1489536/c2db5131-f641-4a27-963c-c1a7435d71da.woff new file mode 100644 index 0000000..e2f562b Binary files /dev/null and b/fonts/Helvetica/1489536/c2db5131-f641-4a27-963c-c1a7435d71da.woff differ diff --git a/fonts/Helvetica/1489544/18bfa02e-fa40-421f-bdf5-ac405949e426.woff2 b/fonts/Helvetica/1489544/18bfa02e-fa40-421f-bdf5-ac405949e426.woff2 new file mode 100644 index 0000000..4ac6069 Binary files /dev/null and b/fonts/Helvetica/1489544/18bfa02e-fa40-421f-bdf5-ac405949e426.woff2 differ diff --git a/fonts/Helvetica/1489544/cb05eea2-2432-4559-9eb4-83addd62b9e0.woff b/fonts/Helvetica/1489544/cb05eea2-2432-4559-9eb4-83addd62b9e0.woff new file mode 100644 index 0000000..1d1ec3d Binary files /dev/null and b/fonts/Helvetica/1489544/cb05eea2-2432-4559-9eb4-83addd62b9e0.woff differ diff --git a/fonts/Helvetica/1489552/1311d206-4d5e-4bb7-9eb2-067a37aa10d7.woff b/fonts/Helvetica/1489552/1311d206-4d5e-4bb7-9eb2-067a37aa10d7.woff new file mode 100644 index 0000000..36b2270 Binary files /dev/null and b/fonts/Helvetica/1489552/1311d206-4d5e-4bb7-9eb2-067a37aa10d7.woff differ diff --git a/fonts/Helvetica/1489552/1812bdf9-4db0-46d1-8df8-2d43822ddd1a.woff2 b/fonts/Helvetica/1489552/1812bdf9-4db0-46d1-8df8-2d43822ddd1a.woff2 new file mode 100644 index 0000000..b65f6ad Binary files /dev/null and b/fonts/Helvetica/1489552/1812bdf9-4db0-46d1-8df8-2d43822ddd1a.woff2 differ diff --git a/fonts/Helvetica/1566264/3c6ab608-39c8-4a90-849c-c2a32ea0a949.woff b/fonts/Helvetica/1566264/3c6ab608-39c8-4a90-849c-c2a32ea0a949.woff new file mode 100644 index 0000000..681642a Binary files /dev/null and b/fonts/Helvetica/1566264/3c6ab608-39c8-4a90-849c-c2a32ea0a949.woff differ diff --git a/fonts/Helvetica/1566264/d9174fff-293c-4d3c-9480-438cfec8ba57.woff2 b/fonts/Helvetica/1566264/d9174fff-293c-4d3c-9480-438cfec8ba57.woff2 new file mode 100644 index 0000000..1fc3666 Binary files /dev/null and b/fonts/Helvetica/1566264/d9174fff-293c-4d3c-9480-438cfec8ba57.woff2 differ diff --git a/fonts/Helvetica/1566270/382794c0-b52b-4279-a296-9c1f37b6cebf.woff2 b/fonts/Helvetica/1566270/382794c0-b52b-4279-a296-9c1f37b6cebf.woff2 new file mode 100644 index 0000000..072cffb Binary files /dev/null and b/fonts/Helvetica/1566270/382794c0-b52b-4279-a296-9c1f37b6cebf.woff2 differ diff --git a/fonts/Helvetica/1566270/8726ba91-3222-4344-878a-87bcb74ac7d3.woff b/fonts/Helvetica/1566270/8726ba91-3222-4344-878a-87bcb74ac7d3.woff new file mode 100644 index 0000000..b04600b Binary files /dev/null and b/fonts/Helvetica/1566270/8726ba91-3222-4344-878a-87bcb74ac7d3.woff differ diff --git a/fonts/Helvetica/1566276/94c1b92e-68ab-4029-8e1e-ba7e3e5bcb8b.woff2 b/fonts/Helvetica/1566276/94c1b92e-68ab-4029-8e1e-ba7e3e5bcb8b.woff2 new file mode 100644 index 0000000..c32c508 Binary files /dev/null and b/fonts/Helvetica/1566276/94c1b92e-68ab-4029-8e1e-ba7e3e5bcb8b.woff2 differ diff --git a/fonts/Helvetica/1566276/e1f1dbd2-827c-423b-8b9a-660116820c77.woff b/fonts/Helvetica/1566276/e1f1dbd2-827c-423b-8b9a-660116820c77.woff new file mode 100644 index 0000000..688dcc9 Binary files /dev/null and b/fonts/Helvetica/1566276/e1f1dbd2-827c-423b-8b9a-660116820c77.woff differ diff --git a/fonts/Helvetica/1566282/847d8475-4db3-43ce-9bc9-003ce96e1ff6.woff2 b/fonts/Helvetica/1566282/847d8475-4db3-43ce-9bc9-003ce96e1ff6.woff2 new file mode 100644 index 0000000..65cf8d4 Binary files /dev/null and b/fonts/Helvetica/1566282/847d8475-4db3-43ce-9bc9-003ce96e1ff6.woff2 differ diff --git a/fonts/Helvetica/1566282/b33db801-fb57-4998-83c2-79868ea9f00b.woff b/fonts/Helvetica/1566282/b33db801-fb57-4998-83c2-79868ea9f00b.woff new file mode 100644 index 0000000..5480784 Binary files /dev/null and b/fonts/Helvetica/1566282/b33db801-fb57-4998-83c2-79868ea9f00b.woff differ diff --git a/fonts/Helvetica/fonts.css b/fonts/Helvetica/fonts.css new file mode 100644 index 0000000..b48307d --- /dev/null +++ b/fonts/Helvetica/fonts.css @@ -0,0 +1,118 @@ + @font-face{ + font-family:"Helvetica Neue"; + src:url("1489436/89294146-207c-4803-91fe-338f0d0094bd.woff2") format("woff2"),url("1489436/57055fe4-c2d3-4287-bac2-eece43fdcbd3.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica Neue Bold"; + src:url("1489452/7ce0a2f5-eb00-46aa-919c-5b3f3667646c.woff2") format("woff2"),url("1489452/cad22c74-45b4-4c49-9e6a-0cd3768a7bc7.woff") format("woff"); + } + + + @font-face{ + font-family:"Helvetica"; + src:url("1489436/89294146-207c-4803-91fe-338f0d0094bd.woff2") format("woff2"),url("1489436/57055fe4-c2d3-4287-bac2-eece43fdcbd3.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica Bold"; + src:url("1489452/7ce0a2f5-eb00-46aa-919c-5b3f3667646c.woff2") format("woff2"),url("1489452/cad22c74-45b4-4c49-9e6a-0cd3768a7bc7.woff") format("woff"); + } + + + + + @font-face{ + font-family:"Helvetica LT W01 Light"; + src:url("1489424/37953885-0443-4c72-a693-9152a9f5a901.woff2") format("woff2"),url("1489424/fcce277c-07e2-4c88-ad8b-a71b484e2cbe.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Light Oblique"; + src:url("1489430/0976eae4-2818-43ff-8f87-70dcbb0f9ea9.woff2") format("woff2"),url("1489430/a26a74ab-9781-4c48-bcfb-e2e63bc068d5.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Roman"; + src:url("1489436/89294146-207c-4803-91fe-338f0d0094bd.woff2") format("woff2"),url("1489436/57055fe4-c2d3-4287-bac2-eece43fdcbd3.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Obliqu1489444"; + src:url("1489444/ac4134ce-b28e-4df9-b88c-a67db965774e.woff2") format("woff2"),url("1489444/6389110a-e983-4d95-8d1f-5a87de018aac.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Bold"; + src:url("1489452/7ce0a2f5-eb00-46aa-919c-5b3f3667646c.woff2") format("woff2"),url("1489452/cad22c74-45b4-4c49-9e6a-0cd3768a7bc7.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Bold O1489460"; + src:url("1489460/3e13f208-91f2-41ec-b1bf-e5b29d486821.woff2") format("woff2"),url("1489460/17d3cf02-3e99-48c3-953a-b26082b28949.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Black"; + src:url("1489468/140cbf94-b441-4980-b031-0a614cdee9a8.woff2") format("woff2"),url("1489468/c13f2d0e-112f-4829-96e7-573d38f83066.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Black Oblique"; + src:url("1489474/471483bd-1422-4548-a1cf-a7fa9fdf5b59.woff2") format("woff2"),url("1489474/07818719-eb0b-475f-ab2b-3cb4ee66e0d9.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Light Cond"; + src:url("1489480/da1e3389-7cb1-4bbe-a8cb-9d8c12bed489.woff2") format("woff2"),url("1489480/a9b0bbff-d4ce-481a-ade4-32c7e112125f.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Light Cn Obl"; + src:url("1489486/ae28463c-ff37-41b4-b03c-4ccb49d556f2.woff2") format("woff2"),url("1489486/a3434dce-e398-47cf-8746-83306c679298.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Condensed"; + src:url("1489492/b2dc2dea-700a-4f4a-8d54-410cab0563eb.woff2") format("woff2"),url("1489492/db750bb2-16e0-4166-a692-163c51ea3190.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Condensed Obl"; + src:url("1489498/836434bb-026b-4b96-9158-34f76cc2cdc6.woff2") format("woff2"),url("1489498/57c443b8-3809-443e-90cb-82c5adee7c79.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Bold Cond"; + src:url("1489504/cc8baf39-7363-4096-9272-744ba5d42550.woff2") format("woff2"),url("1489504/c3e64e07-d679-43dc-982a-6d21239f752e.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Bold Cond Obl"; + src:url("1489510/2bf6c0ba-69c7-4dde-ae8e-80047b60ebc1.woff2") format("woff2"),url("1489510/b659afed-b043-4147-84b5-8ef7fcdbbeef.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Black Cond"; + src:url("1489516/318f10c9-cc4d-47d1-a357-05d8a36bd49c.woff2") format("woff2"),url("1489516/0ec178c4-7cd1-4236-8b55-ad77cb3ceae8.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Black Cn Obl"; + src:url("1489522/2d15f0a2-cc5c-478c-89d0-a5aebc6339ee.woff2") format("woff2"),url("1489522/09e06020-4637-43c8-9783-bf71198454e5.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Compressed"; + src:url("1489528/9a21b599-8254-4b46-af23-7c49a2a127be.woff2") format("woff2"),url("1489528/4464a79b-239b-48ad-88ab-e4518082b9b6.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 X Compressed"; + src:url("1489536/7a971f81-127b-458a-a5ee-02f9290ef997.woff2") format("woff2"),url("1489536/c2db5131-f641-4a27-963c-c1a7435d71da.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Ult Comp"; + src:url("1489544/18bfa02e-fa40-421f-bdf5-ac405949e426.woff2") format("woff2"),url("1489544/cb05eea2-2432-4559-9eb4-83addd62b9e0.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica Inserat LT W01 Rg"; + src:url("1489552/1812bdf9-4db0-46d1-8df8-2d43822ddd1a.woff2") format("woff2"),url("1489552/1311d206-4d5e-4bb7-9eb2-067a37aa10d7.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Narrow"; + src:url("1566264/d9174fff-293c-4d3c-9480-438cfec8ba57.woff2") format("woff2"),url("1566264/3c6ab608-39c8-4a90-849c-c2a32ea0a949.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Narrow Obl"; + src:url("1566270/382794c0-b52b-4279-a296-9c1f37b6cebf.woff2") format("woff2"),url("1566270/8726ba91-3222-4344-878a-87bcb74ac7d3.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Bold Narrow"; + src:url("1566276/94c1b92e-68ab-4029-8e1e-ba7e3e5bcb8b.woff2") format("woff2"),url("1566276/e1f1dbd2-827c-423b-8b9a-660116820c77.woff") format("woff"); + } + @font-face{ + font-family:"Helvetica LT W01 Bold Nr Obl"; + src:url("1566282/847d8475-4db3-43ce-9bc9-003ce96e1ff6.woff2") format("woff2"),url("1566282/b33db801-fb57-4998-83c2-79868ea9f00b.woff") format("woff"); + } diff --git a/fonts/OpenSans/OpenSans-Bold.ttf b/fonts/OpenSans/OpenSans-Bold.ttf new file mode 100644 index 0000000..fd79d43 Binary files /dev/null and b/fonts/OpenSans/OpenSans-Bold.ttf differ diff --git a/fonts/OpenSans/OpenSans-BoldItalic.ttf b/fonts/OpenSans/OpenSans-BoldItalic.ttf new file mode 100644 index 0000000..9bc8009 Binary files /dev/null and b/fonts/OpenSans/OpenSans-BoldItalic.ttf differ diff --git a/fonts/OpenSans/OpenSans-CondBold.ttf b/fonts/OpenSans/OpenSans-CondBold.ttf new file mode 100644 index 0000000..83966f2 Binary files /dev/null and b/fonts/OpenSans/OpenSans-CondBold.ttf differ diff --git a/fonts/OpenSans/OpenSans-CondLight.ttf b/fonts/OpenSans/OpenSans-CondLight.ttf new file mode 100644 index 0000000..97c355b Binary files /dev/null and b/fonts/OpenSans/OpenSans-CondLight.ttf differ diff --git a/fonts/OpenSans/OpenSans-CondLightItalic.ttf b/fonts/OpenSans/OpenSans-CondLightItalic.ttf new file mode 100644 index 0000000..0b45898 Binary files /dev/null and b/fonts/OpenSans/OpenSans-CondLightItalic.ttf differ diff --git a/fonts/OpenSans/OpenSans-ExtraBold.ttf b/fonts/OpenSans/OpenSans-ExtraBold.ttf new file mode 100644 index 0000000..21f6f84 Binary files /dev/null and b/fonts/OpenSans/OpenSans-ExtraBold.ttf differ diff --git a/fonts/OpenSans/OpenSans-ExtraBoldItalic.ttf b/fonts/OpenSans/OpenSans-ExtraBoldItalic.ttf new file mode 100644 index 0000000..31cb688 Binary files /dev/null and b/fonts/OpenSans/OpenSans-ExtraBoldItalic.ttf differ diff --git a/fonts/OpenSans/OpenSans-Italic.ttf b/fonts/OpenSans/OpenSans-Italic.ttf new file mode 100644 index 0000000..c90da48 Binary files /dev/null and b/fonts/OpenSans/OpenSans-Italic.ttf differ diff --git a/fonts/OpenSans/OpenSans-Light.ttf b/fonts/OpenSans/OpenSans-Light.ttf new file mode 100644 index 0000000..0d38189 Binary files /dev/null and b/fonts/OpenSans/OpenSans-Light.ttf differ diff --git a/fonts/OpenSans/OpenSans-LightItalic.ttf b/fonts/OpenSans/OpenSans-LightItalic.ttf new file mode 100644 index 0000000..68299c4 Binary files /dev/null and b/fonts/OpenSans/OpenSans-LightItalic.ttf differ diff --git a/fonts/OpenSans/OpenSans-Regular.ttf b/fonts/OpenSans/OpenSans-Regular.ttf new file mode 100644 index 0000000..db43334 Binary files /dev/null and b/fonts/OpenSans/OpenSans-Regular.ttf differ diff --git a/fonts/OpenSans/OpenSans-Semibold.ttf b/fonts/OpenSans/OpenSans-Semibold.ttf new file mode 100644 index 0000000..1a7679e Binary files /dev/null and b/fonts/OpenSans/OpenSans-Semibold.ttf differ diff --git a/fonts/OpenSans/OpenSans-SemiboldItalic.ttf b/fonts/OpenSans/OpenSans-SemiboldItalic.ttf new file mode 100644 index 0000000..59b6d16 Binary files /dev/null and b/fonts/OpenSans/OpenSans-SemiboldItalic.ttf differ diff --git a/fonts/OpenSans/OpenSansCondensed-Bold.ttf b/fonts/OpenSans/OpenSansCondensed-Bold.ttf new file mode 100644 index 0000000..0bc5fe5 Binary files /dev/null and b/fonts/OpenSans/OpenSansCondensed-Bold.ttf differ diff --git a/fonts/OpenSans/OpenSansCondensed-Light.ttf b/fonts/OpenSans/OpenSansCondensed-Light.ttf new file mode 100644 index 0000000..81e0b71 Binary files /dev/null and b/fonts/OpenSans/OpenSansCondensed-Light.ttf differ diff --git a/fonts/OpenSans/OpenSansCondensed-LightItalic.ttf b/fonts/OpenSans/OpenSansCondensed-LightItalic.ttf new file mode 100644 index 0000000..d14c6e1 Binary files /dev/null and b/fonts/OpenSans/OpenSansCondensed-LightItalic.ttf differ diff --git a/home.css b/home.css new file mode 100644 index 0000000..8c72f41 --- /dev/null +++ b/home.css @@ -0,0 +1,210 @@ + +html, body { + height: 100%; + width: auto; +} + +html { + color: #f4f4ec; + font-family: "Helvetica Neue", "Helvetica", sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + font-size: 14px; +} + +body { + background: #191919; + line-height: 1.4667; + margin: 0px; +} + +/* --- links --- */ + +a:link, +a:visited { + color: #565553; + text-decoration: none; + transition: background-color .15s linear, color .15s linear; +} + +a:hover { + color: #3c3c3b; +} + +/* -- content --- */ + +.text { + max-width: 40em; + margin-right: 1.3em; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-size: 1.06em; + font-weight: 300; + line-height: 1.86em; +} + +.container { + position: relative; + width: auto; +} + +/* --- nav --- */ + +.navigation { + list-style: none; + margin: 0; + padding: 0; + animation: fadein 1.5s; +} + +.link, .linkFar, .linkDocs { + font-size: 4em; + line-height: 1em; + display: block; + -webkit-font-smoothing: antialiased; + -transition-delay: 0s, 0s; + -webkit-transition-duration: 0.15s, 0.15s; + -webkit-transition-property: background-color, color; + -webkit-transition-timing-function: linear, linear; + /* + color: rgb(86, 85, 83); + */ + + color: rgb(106, 105, 103); + font-family: "Helvetica Neue Bold", sans-serif; + font-weight: 200; + letter-spacing: -0.04em; + list-style-position: outside; + text-decoration: none; + transition-duration: 0.15s, 0.15s; + transition-property: background-color, color; + transition-timing-function: linear, linear; +} + +/* +.link a, .linkFar a, .linkDocs a { + color: rgb(86, 85, 83); +} +*/ + + +.link:hover { + color: #aaaa33; + /* + color: #2277ff; + color: #3c3c3b; + color: #a041ca; + color: #99c; + */ +} + +.linkFar:hover { + color: #2dc6ad; + /* + color: #5e5b84; + color: #a77; + color: #3c3c3b; + color: #e28728; + color: #966; + */ +} + +.linkDocs:hover { + color: #aaaa33; + /* + color: #b4b044; + color: #aaaa33; + */ +} + +/* ------------------- */ + +@media only screen and (max-width: 885px) { + .link, .linkFar, .linkDocs + { + font-size: 4em; + line-height: 1em; + } + +} + +@media only screen and (max-width: 720px) { + .link, .linkFar, .linkDocs + { + font-size: 3.3em; + line-height: 1em; + } +} + + +@media only screen and (max-width: 475px) { + .link, .linkFar, .linkDocs + { + font-size: 3.3em; + line-height: 1em; + } +} + +@media only screen and (max-width: 320px) { + .link, .linkFar, .linkDocs + { + font-size: 2.13em; + line-height: 1em; + } + + .message { + font-size: 0.86em; + line-height: 1em; + } +} + +/* --- index --- */ + +.entryLink:hover { + color: #ccc; + border-left: 1px solid #777; + margin-left: -1px; + background-color: #3a3a3a; +} + +.entry { + animation: fadein 2s; + display: inline-block; + border-left: 1px solid #444; + height: 70px; + margin-top: -1px; + width: 250px; + margin-left: -1px; + font-size: 1em; + transition: .15s; +} + +.entry:hover { + color: #ccc; + border-left: 1px solid #777; + margin-left: -1px; + background-color: #3a3a3a; +} + +.name { + display: block; + color: #fff; + font-family: "Helvetica Neue Bold", sans-serif; + font-weight: 200; + line-height: 15px; + margin-top: 15px; + margin-left: 15px; + + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +.comment { + display: block; + margin-top: 0px; + padding-top: 0px; + margin-left: 15px; + font-family: "Helvetica Neue", sans-serif; + /*font-weight: 400;*/ + color: #ccc; +} \ No newline at end of file diff --git a/home_header.css b/home_header.css new file mode 100644 index 0000000..4b78ea8 --- /dev/null +++ b/home_header.css @@ -0,0 +1,159 @@ + +.topSpace { + padding-top: 180px; +} + +.leftSpace { + margin-left: 100px; +} + +/* +.pageHeader { +} +*/ + +/* +.header { + +} +*/ + +.pageHeader a { + color: rgb(244, 244, 236); +} + +.pageHeader a:hover { + color: #aaa; +} + +.pageTitle { + font-family: "Helvetica Neue Bold", sans-serif; + font-weight: 200; + text-transform: lowercase; + display: block; + font-size: 5em; + line-height: 1em; + letter-spacing: -2px; + width: fit-content; + padding-right: 0.1em; +} + +.pageTitle a { + font-family: inherit; + text-transform: inherit; + font-weight: inherit; +} + +.pageSubtitle { + animation: fadein 1s; + font-family: "Helvetica Neue Bold", sans-serif; + font-weight: 200; + color: rgb(244, 244, 236); + + font-size: 1em; + line-height: 1em; + + display: block; + margin-top: 0.2em; + margin-bottom: 1.5em; +} + +/* +.pageSubtitle::before { +} +*/ + +@media only screen and (max-width: 720px) { + .pageTitle { + font-size: 4em; + } + + .pageSubtitle { + font-size: 1em; + line-height: 1em; + margin-top: 0.6em; + } + + .topSpace { + padding-top: 3.3em; + } + + .leftSpace { + margin-left: 3.3em; + } + + .message { + font-size: 1em; + } +} + +@media only screen and (max-width: 475px) { + .pageTitle { + font-size: 3.3em; + line-height: 30px; + } + + .pageSubtitle { + font-size: 1em; + line-height: 1em; + } + + .topSpace { + padding-top: 1.6em; + } + + .leftSpace { + margin-left: 2em; + } + + .message { + font-size: 0.7em; + } +} + +@media only screen and (max-width: 320px) { + .pageTitle { + font-size: 2.1em; + line-height: 1em; + } + + .pageSubtitle { + font-size: 1em; + line-height: 1em; + } + + .topSpace { + padding-top: 2em; + } + + .leftSpace { + margin-left: 1.3em; + } + + .message { + font-size: 0.5em; + } +} + +/* --- fade in --- */ + + +@keyframes fadein { + 0% { + opacity:0; + } + 100% { + opacity:1; + } +} + + +@keyframes fadeout { + 0% { + opacity:1; + } + 100% { + opacity:0; + } +} + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..5996d34 --- /dev/null +++ b/index.html @@ -0,0 +1,297 @@ + + + + + io language REPL + + + + + + + + + + + +
+
+ +
+ +
+ Loading interpreter... +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
+
+
+ +
+
+ + + +
+
+ + + + + + + + + + + + + + + + +
EVALCOMMAND RETURN
CLEAR OUTPUTCOMMAND SHIFT K
CLEAR INPUTCOMMAND K
+


+
+
+
+ + diff --git a/io-master/.clang-format b/io-master/.clang-format new file mode 100644 index 0000000..96132af --- /dev/null +++ b/io-master/.clang-format @@ -0,0 +1,4 @@ +BasedOnStyle: LLVM +IndentWidth: 4 +IncludeBlocks: Preserve +SortIncludes: false diff --git a/io-master/.gitattributes b/io-master/.gitattributes new file mode 100755 index 0000000..d02f9e9 --- /dev/null +++ b/io-master/.gitattributes @@ -0,0 +1,3 @@ +projects/*/*.xcodeproj/* -diff -merge +*.pbxproj -crlf -diff -merge +*.pbxuser -crlf -diff -merge diff --git a/io-master/.github/workflows/ci.yml b/io-master/.github/workflows/ci.yml new file mode 100755 index 0000000..1fc14fd --- /dev/null +++ b/io-master/.github/workflows/ci.yml @@ -0,0 +1,97 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + formatter: + + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Check format + uses: DoozyX/clang-format-lint-action@v0.12 + with: + source: 'libs' + extensions: 'h,c' + style: file + clangFormatVersion: 12 + + unix: + + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ macOS-latest, ubuntu-latest ] + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: 'recursive' + + # needed to test localy with nektos/act, don't delete it + # neither uncomment, because on Github the image already has build-essential + # - name: Install Makefile + # if: matrix.os == 'ubuntu-latest' + # run: | + # apt-get update -y + # apt-get install -y build-essential sudo git + + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@v1.9 + + - name: Build + run: | + mkdir build + cd build + cmake .. + make + + - name: Install + run: | + cd build + sudo make install + + - name: Test + run: | + cd build + ./_build/binaries/io --version + ./_build/binaries/io ../libs/iovm/tests/correctness/run.io + + windows: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Build + run: | + mkdir build + cd build + cmake -G"MinGW Makefiles" .. + make + + - name: Install + run: | + cd build + make install + + - name: Test + run: | + cd build + & _build/binaries/io_static.exe --% --version + & _build/binaries/io_static.exe --% ../libs/iovm/tests/correctness/run.io diff --git a/io-master/.gitignore b/io-master/.gitignore new file mode 100755 index 0000000..34af30f --- /dev/null +++ b/io-master/.gitignore @@ -0,0 +1,98 @@ +*.lib +*.dll +*.manifest +*.obj +*.exp +*.ilk +._* +*.pdb +*.hi +*.o +*.so +*.dylib +*.cmd +.mod.c* +*.tmp_versions +*CVS +*RCS +*IoVMCode.c* +*Io*Init.c* +~* +*_darcs +*_build +*_ioCodeProcessed +*errors +*.bak* +*.BAK* +*.orig* +*vssver.scc* +*.swp* +*MT +*\{arch\} +*.arch-ids +*, +*.class* +*.prof* +*.DS_Store* +*.FBCLockFolder +*BitKeeper +*ChangeSet +*.svn +.cvsignore* +.gdb_history* +*Thumbs.db* +.DS_Store +.libs +.deps* +*.la +*.lo +*.so +*.dylib +*.exe +*.Po +*.Tlo +*.Plo +_objs +_includes +*_libs +*Io.*Code.c* +io2c +*Io.*Init.c* +*pngtest* +*steve.model* +*skipdbtest* +*config.log* +*config.status* +.rej* +*autom4te.cache* +*.cache +*.user +*_include +*tags* +./addons/SGML/source/libsgml/Makefile* +./addons/SGML/source/libsgml/examples/Makefile* +./addons/SGML/source/libsgml/src/Makefile* +tools/editlib_test/editlib_test +extras/IoPlayers/MSWindows/ioplayer/ioplayer.ncb +extras/IoPlayers/MSWindows/ioplayer/ioplayer.suo +extras/IoPlayers/MSWindows/ioplayer/ioplayer/Debug +extras/IoPlayers/MSWindows/ioplayer/ioplayer/Release +extras/IoPlayers/MSWindows/ioplayer/ioplayer/ioplayer.vcproj.CUSTOMER2007.Customer.user +extras/IoPlayers/MSWindows/ioplayer/pingme.txt +extras/IoPlayers/MSWindows/ioplayer/smysrv +libs/iovm/docs/docs.txt +addons/*/docs/docs.txt +*.mode1 +*.pbxuser +*.mode1v3 +extras/osxvm/build +extras/osxmain/build +*~ +CMakeFiles +CMakeCache.txt +cmake_install.cmake +install_manifest.txt +Makefile +IoInstallPrefix.h +xcuserdata +build \ No newline at end of file diff --git a/io-master/.gitmodules b/io-master/.gitmodules new file mode 100755 index 0000000..b278aff --- /dev/null +++ b/io-master/.gitmodules @@ -0,0 +1,6 @@ +[submodule "deps/parson"] + path = deps/parson + url = https://github.com/kgabis/parson.git +[submodule "eerie"] + path = eerie + url = https://github.com/IoLanguage/eerie.git diff --git a/io-master/.travis.yml b/io-master/.travis.yml new file mode 100755 index 0000000..01ddd33 --- /dev/null +++ b/io-master/.travis.yml @@ -0,0 +1,34 @@ +dist: trusty +sudo: required + +language: c + +os: + - linux + - osx + +compiler: + - gcc + - clang + +install: + - 'if [ "${TRAVIS_OS_NAME}" == "linux" ]; then + sudo apt-get install libyajl-dev; + sudo apt-get install libev-libevent-dev; + sudo apt-get install libpcre3-dev; + fi' + - 'if [ "${TRAVIS_OS_NAME}" == "osx" ]; then + brew install yajl; + brew install libevent; + brew install pcre; + fi' + + +before_script: + - mkdir build + - cd build + +script: + - cmake .. + - make + - ./_build/binaries/io ../libs/iovm/tests/correctness/run.io diff --git a/io-master/CMakeLists.txt b/io-master/CMakeLists.txt new file mode 100755 index 0000000..082edb8 --- /dev/null +++ b/io-master/CMakeLists.txt @@ -0,0 +1,212 @@ +# Base Io build system +# Written by Jeremy Tregunna +# +# This file is the top level CMakeLists.txt and all the items defined in this +# file are inherited by CMakeLists.txt throughout the rest of the system, if +# they can be traced back through subdirectories to this file. +# +# This is an experimental build system, and it should be treated as such. It +# is being developed on a Mac OS X system, and tested as well on a FreeBSD +# system. I have no access to other platforms to test there. If this notice +# goes away, then it can be said that this system works on at least three +# major platforms: +# 1. Mac OS X +# 2. Linux +# 3. Windows +# +# If you find a bug for a particular platform, please feel free to fix it, or +# contact the iolanguage mailing list, file a bug report, or contact Jeremy +# Tregunna directly, at the e-mail address above. Please follow that order. + +# Require CMake 2.8. I know for sure that this will not work with CMake 2.6 +# due to the use of the FILE command we use when creating the bundle +# hierarchy. +cmake_minimum_required(VERSION 2.8) + +# Mac OS X: Setting policy CMP0042 to the new behavior generates dylibs with +# RPATH-relative install name that is better suited for Mac OS X applications +# embedding Io in their bundle. +if(POLICY CMP0042) + cmake_policy(SET CMP0042 NEW) +endif() + +# Project name, this gets prefixed to a bunch of stuff under the hood. No +# spaces, or anything silly like that please. +project(IoLanguage C) + +# Default config when building with gcc variants +IF(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang")) + SET(CMAKE_BUILD_TYPE_DebugFast) + SET(CMAKE_CXX_FLAGS_DEBUGFAST "-g -O0") + SET(CMAKE_C_FLAGS_DEBUGFAST "-g -O0") + SET(CMAKE_C_FLAGS "-msse2") + if(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE "DebugFast") + endif(NOT CMAKE_BUILD_TYPE) +ENDIF(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang")) + +MESSAGE(STATUS "Configuration set to: ${CMAKE_BUILD_TYPE}") + +# Don't want a coloured Makefile. On some platforms, the blue that is used is +# so dark it's illegible. +set(CMAKE_COLOR_MAKEFILE off) + +# We want our binaries to go here +set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/_build/binaries) + +# Macro to create the _build directory hierarchy. +# Note: I'm not sure we need lib/ or objs/ in there. But I'll leave them in +# anyway, I'm just not going to do anything with them unless it breaks doing +# nothing breaks something. +macro(make_build_bundle NAME) + file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${NAME}/binaries ${CMAKE_CURRENT_BINARY_DIR}/${NAME}/objs ${CMAKE_CURRENT_BINARY_DIR}/${NAME}/headers ${CMAKE_CURRENT_BINARY_DIR}/${NAME}/lib ${CMAKE_CURRENT_BINARY_DIR}/${NAME}/dll) +endmacro(make_build_bundle) + +# Generic macro to copy files mattching GLOBPAT in the current source +# directory into another directory. +macro(copy_files NAME GLOBPAT DSTDIR) + # Get a list of the filenames mattching the pattern GLOBPAT + file(GLOB ${NAME} ${GLOBPAT}) + + # Create a custom copy target and display a message + add_custom_target(copy_${NAME} ALL COMMENT "Copying files: ${CMAKE_CURRENT_SOURCE_DIR}/${GLOBPAT} to ${DSTDIR}") + + foreach(FILENAME ${${NAME}}) + # Finally, copy the files. + add_custom_command( + TARGET copy_${NAME} + COMMAND ${CMAKE_COMMAND} -E copy ${FILENAME} ${DSTDIR} + ) + endforeach(FILENAME) +endmacro(copy_files) + +# Binary suffix is used to append things like .exe to binary names, for +# windows support. +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(BINARY_SUFFIX ".exe") + set(CMAKE_STATIC_LIBRARY_PREFIX "lib") + set(CMAKE_SHARED_LIBRARY_PREFIX "lib") + set(CMAKE_IMPORT_LIBRARY_PREFIX "lib") +else() + set(BINARY_SUFFIX "") +endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + +# Definitions on where we can find headers and whatnot. Convenience definitions. +set(COROUTINE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/libs/coroutine/source) +set(BASEKIT_SOURCE_DIR ${PROJECT_SOURCE_DIR}/libs/basekit/source) +set(GARBAGECOLLECTOR_SOURCE_DIR ${PROJECT_SOURCE_DIR}/libs/garbagecollector/source) +set(IOVM_SOURCE_DIR ${PROJECT_SOURCE_DIR}/libs/iovm/source) + +# Subdirectories. These directories should have their own CMakeLists.txt. +add_subdirectory(libs) +add_subdirectory(tools) + +# Ensure the _build hierarchy is created top-level, this is where our +# binaries go. +make_build_bundle(_build) + +# Next we NEED to copy all the libs headers into one single dir in the bundle. +copy_files(coroutine_headers ${PROJECT_SOURCE_DIR}/libs/coroutine/source/*.h ${CMAKE_CURRENT_BINARY_DIR}/_build/headers) +copy_files(basekit_headers ${PROJECT_SOURCE_DIR}/libs/basekit/source/*.h ${CMAKE_CURRENT_BINARY_DIR}/_build/headers) +copy_files(garbagecollector_headers ${PROJECT_SOURCE_DIR}/libs/garbagecollector/source/*.h ${CMAKE_CURRENT_BINARY_DIR}/_build/headers) +copy_files(iovm_headers ${PROJECT_SOURCE_DIR}/libs/iovm/source/*.h ${CMAKE_CURRENT_BINARY_DIR}/_build/headers) + +# Packaging stuff + +#Modified from: http://www.mail-archive.com/cmake@cmake.org/msg32916.html +MACRO (TODAY RESULT) + IF (WIN32) + EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT}) + string(REGEX REPLACE "(..)/(..)/(....).*" "\\1.\\2.\\3" ${RESULT} +${${RESULT}}) + ELSEIF(UNIX) + EXECUTE_PROCESS(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE ${RESULT}) + string(REGEX REPLACE "(..)/(..)/(....).*" "\\1.\\2.\\3" ${RESULT} +${${RESULT}}) + ELSE (WIN32) + MESSAGE(SEND_ERROR "date not implemented") + SET(${RESULT} 00.00.0000) + ENDIF (WIN32) +ENDMACRO (TODAY) + +TODAY(CMD_DATE) +STRING(SUBSTRING ${CMD_DATE} 0 2 CMD_DATE_DAY) +STRING(SUBSTRING ${CMD_DATE} 3 2 CMD_DATE_MON) +STRING(SUBSTRING ${CMD_DATE} 6 4 CMD_DATE_YEAR) +SET(CMD_DATE "${CMD_DATE_YEAR}.${CMD_DATE_MON}.${CMD_DATE_DAY}") + +# If source tree is not a git repository this will not work +#IF(WIN32 AND NOT CYGWIN) +# execute_process(COMMAND "cmd" " /C git rev-parse --short HEAD" OUTPUT_VARIABLE IO_GIT_REV) +#ELSE(WIN32 AND NOT CYGWIN) +# execute_process(COMMAND git rev-parse --short HEAD OUTPUT_VARIABLE IO_GIT_REV) +#ENDIF(WIN32 AND NOT CYGWIN) +#string(REGEX REPLACE "(.......)." "\\1" IO_GIT_REV ${IO_GIT_REV}) + +SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) +SET(CPACK_PACKAGE_VENDOR "iolanguage.com") +SET(CPACK_PACKAGE_CONTACT "iolanguage@yahoogroups.com") +SET(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE.txt) +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Io Language") +SET(CPACK_PACKAGE_VERSION "${CMD_DATE}") +SET(CPACK_PACKAGE_VERSION_MAJOR ${CMD_DATE_YEAR}) +SET(CPACK_PACKAGE_VERSION_MINOR ${CMD_DATE_MON}) +SET(CPACK_PACKAGE_VERSION_PATCH ${CMD_DATE_DAY}) +SET(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) + +IF(WIN32) + # It's not very clear whether redist files for MSVC build are in the path bellow... + # The semi-hardcoded path bellow is for Visual Studio 2008 Express. + # Anyway, we have to distinguish between Debug and Release redist files as well. + IF(MSVC) + STRING(REGEX REPLACE "\\\\" "\\\\\\\\" VC_INSTALL_PATH "$ENV{VCINSTALLDIR}") + SET(VC_RUNTIME_REDIST_FILES "File '${VC_INSTALL_PATH}\\\\redist\\\\Debug_NonRedist\\\\x86\\\\Microsoft.VC90.DebugCRT\\\\*.*'") + ENDIF(MSVC) + + SET(CPACK_SET_DESTDIR "OFF") + SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.iolanguage.com") + SET(CPACK_NSIS_HELP_LINK "http://www.iolanguage.com") + SET(CPACK_NSIS_MODIFY_PATH "ON") + SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " + WriteIniStr '\$INSTDIR\\\\IoLanguageWebSite.url' 'InternetShortcut' 'URL' '${CPACK_NSIS_URL_INFO_ABOUT}' + SetOutPath '\$INSTDIR\\\\lib' + SetOverwrite try + ${VC_RUNTIME_REDIST_FILES} + ") + SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " + Delete '\$INSTDIR\\\\IoLanguageWebSite.url' + Delete '\$INSTDIR\\\\lib\\\\*.*' + ") + + SET(CPACK_NSIS_CREATE_ICONS " + CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Io CLI.lnk' '$INSTDIR\\\\bin\\\\io.exe' + CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\IoLanguage Web Site.lnk' '\$INSTDIR\\\\IoLanguageWebSite.url' + ") + SET(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '\$DESKTOP\\\\Io CLI.lnk' '$INSTDIR\\\\bin\\\\io.exe'") + SET(CPACK_NSIS_DELETE_ICONS " + Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\Io CLI.lnk' + Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\IoLanguage Web Site.lnk' + ") + SET(CPACK_NSIS_DELETE_ICONS_EXTRA "Delete '\$DESKTOP\\\\Io CLI.lnk'") +ENDIF(WIN32) + +IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + SET(CPACK_SET_DESTDIR "ON") + + FIND_PROGRAM(DPKG_CMD dpkg) + IF(DPKG_CMD) + SET(CPACK_GENERATOR ${CPACK_GENERATOR} DEB) + ELSE(DPKG_CMD) + MESSAGE( STATUS "dpkg binary not found, not building debian package" ) + ENDIF(DPKG_CMD) + + FIND_PROGRAM(RPMBUILD_CMD rpmbuild) + IF(RPMBUILD_CMD) + SET( CPACK_GENERATOR ${CPACK_GENERATOR} RPM ) + ELSE(RPMBUILD_CMD) + MESSAGE( STATUS "rpmbuild binary not found, not building rpm package" ) + ENDIF(RPMBUILD_CMD) +ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + +include(CPack) + diff --git a/io-master/LICENSE.txt b/io-master/LICENSE.txt new file mode 100755 index 0000000..4e08222 --- /dev/null +++ b/io-master/LICENSE.txt @@ -0,0 +1,16 @@ +(This is the 3-clause BSD License) + +Copyright (c) 2002, 2003 Steve Dekorte +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + diff --git a/io-master/README.md b/io-master/README.md new file mode 100755 index 0000000..d85ef87 --- /dev/null +++ b/io-master/README.md @@ -0,0 +1,347 @@ +# The Io Language + +_Note: This document is intended to be used as a reference for setting up and configuring Io. For a guide on how to use the language itself, please visit the website at ._ + +# Table of Contents + +* [Table of Contents](#table-of-contents) +* [What is Io?](#what-is-io) + * [Example Code](#example-code) + * [Quick Links](#quick-links) +* [Installing](#installing) + * [From a Package Manager](#from-a-package-manager) + * [From Source](#from-source) + * [Linux Build Instructions](#linux-build-instructions) + * [macOS Build Instructions](#macOS-build-instructions) + * [Windows Build Instructions](#windows-build-instructions) + * [Building with MinGW-W64](#building-with-mingw-w64) + * [Building with MinGW](#building-with-mingw-recommended) + * [Building with MSVC](#building-with-msvc) + * [Building with Cygwin](#building-with-cygwin) +* [Running Tests](#running-tests) +* [Installing Addons](#installing-addons) + +What is Io? +===== + +Io is a dynamic prototype-based programming language in the same realm as +Smalltalk and Self. It revolves around the idea of message passing from object +to object. + +For further information, the programming guide and reference manual can be found +in the docs folder. + + +Example Code +--- +Basic Math + +```Io +Io> 1 + 1 +==> 2 + +Io> 2 sqrt +==> 1.4142135623730951 +``` + +Lists + +```Io +Io> d := List clone append(30, 10, 5, 20) +==> list(30, 10, 5, 20) + +Io> d := d sort +==> list(5, 10, 20, 30) + +Io> d select (>10) +==> list(20, 30) +``` + +Objects + +```Io +Io> Contact := Object clone +==> Contact_0x7fbc3bc8a6d0: + type = "Contact" + +Io> Contact name ::= nil +==> nil + +Io> Contact address ::= nil +==> nil + +Io> Contact city ::= nil +==> nil + +Io> holmes := Contact clone setName("Holmes") setAddress("221B Baker St") setCity("London") +==> Contact_0x7fbc3be2b470: + address = "221B Baker St" + city = "London" + name = "Holmes" + +Io> Contact fullAddress := method(list(name, address, city) join("\n")) +==> method( + list(name, address, city) join("\n") +) + +Io> holmes fullAddress +==> Holmes +221B Baker St +London +``` + + + + +Quick Links +--- +* The Wikipedia page for Io has a good overview and shows a few interesting + examples of the language: + . +* The entry on the c2 wiki has good discussion about the merits of the language: + . + + +Installing +========== + +From a Package Manager +--- + +Io is currently only packaged for OS X. To install it, open a terminal and type: + +``` +brew install io +``` + +Note that this package may not be as updated as the version from the source +repository. + +To install via Homebrew on an M1 Mac, first install Homebrew under x86_64, into /usr/local: + +``` +arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +``` + +Then install io with this installation of Homebrew: + +``` +arch -x86_64 /usr/local/Homebrew/bin/brew install io +``` + +Following that, you can run io under Rosetta 2 with: + +``` +arch -x86_64 io +``` + +From Source +--- + +First, make sure that this repo and all of its submodules have been cloned to +your computer by running `git clone` with the `--recursive` flag: + +``` +git clone --recursive https://github.com/IoLanguage/io.git +``` + +Io uses the [CMake build system](https://cmake.org/) and supports all of the +normal flags and features provided by CMake. + +In a production environment, pass the flag `-DCMAKE_BUILD_TYPE=release` to the +`cmake` command to ensure that the C compiler does the proper optimizations. +Without this flag, Io is built in debug mode without standard C optimizations. + +To install to a specific folder, pass the flag +`-DCMAKE_INSTALL_PREFIX=/path/to/your/folder/` to the `cmake` command. + +### Linux Build Instructions + +To prepare the project for building, run the following commands: + +``` +cd io/ # To get into the cloned folder +mkdir build # To contain the CMake data +cd build/ +cmake .. # This populates the build folder with a Makefile and all of the related things necessary to begin building +``` + +In a production environment, pass the flag `-DCMAKE_BUILD_TYPE=release` to the +`cmake` command to ensure that the C compiler does the proper optimizations. +Without this flag, Io is built in debug mode without standard C optimizations. + +To install to a different folder than `/usr/local/bin/`, pass the flag +`-DCMAKE_INSTALL_PREFIX=/path/to/your/folder/` to the `cmake` command. + +To build without Eerie, the Io package manager, pass the flag +`-DWITHOUT_EERIE=1` to the `cmake` command. + +Once CMake has finished preparing the build environment, ensure you are inside +the build folder, and run: + +``` +make +sudo make install +``` + +Finally, install [Eerie](https://github.com/IoLanguage/eerie), the Io package +manager (see Eerie [repo](https://github.com/IoLanguage/eerie) for installation +options): + +``` +export PATH=$PATH:_build/binaries/; . ./install_unix.sh +``` + +Io can then be run with the `io` command and Eerie can be run with the `eerie` +command. + + +### macOS Build Instructions + +See the [Linux build instructions](#linux-build-instructions). + +Note: Building Io for arm64-based macOS machines is unsupported. To build and run +on an M1 or newer, build Io for x86_64 by adding +`-DCMAKE_OSX_ARCHITECTURES="x86_64"` to your CMake invocation. + +### Windows Build Instructions + +You need CMake or CMake Cygwin (at least v2.8), depending on the building method +you choose. + +For the `make install` command, if you are on Windows 7/Vista you will need to +run your command prompts as Administrator: right-click on the command prompt +launcher->"Run as administrator" or something similar. + +You will also need to add `:\\bin` and +`:\\lib` to your `PATH` environment variable. + + +#### Building with MinGW-W64 (Recommended) + +We use this method in our CI, so this should be considered an official/supported +method of building on Windows. + +1. `cd` to your Io root folder +2. We want to do an out-of-source build, so: `mkdir buildroot` and `cd buildroot` +3. a) `cmake -G"MinGW Makefiles" ..` + + or + + b) `cmake -G"MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=:/ ..` (eg: `cmake -G"MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:/Io ..`) +4. `mingw32-make` +5. `mingw32-make install` (if you use cmd.exe, you should run it as + Administrator) +6. Install [Eerie](https://github.com/IoLanguage/eerie), the Io package manager + (see Eerie [repo](https://github.com/IoLanguage/eerie) for installation + options): `_build\binaries\io_static setup.io`. + + +#### Building with MinGW + +For automatic MinGW install: + + +For non-automatic MinGW install and detailed instructions refer to: + + +1. `cd` to your Io root folder +2. We want to do an out-of-source build, so: `mkdir buildroot` and `cd buildroot` +3. a) `cmake -G"MSYS Makefiles" ..` + + or + + b) `cmake -G"MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=:/ ..` (eg: `cmake -G"MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=C:/Io ..`) +4. `make` +5. `make install` +6. Install [Eerie](https://github.com/IoLanguage/eerie), the Io package manager + (see Eerie [repo](https://github.com/IoLanguage/eerie) for installation + options): `./_build/binaries/io_static setup.io`. + + +#### Building with MSVC + +1. Install Microsoft Visual C++ 2008 Express (should work with other versions). +2. Install Microsoft Windows SDK 7.0 (or newer). +3. Install CMake (v2.8 at least) +4. Run "Visual Studio 2008 Command Prompt" from the "Microsoft Visual Studio + 2008" start menu. +5. `cd` to `:\Microsoft SDKs\Windows\v7.0\Setup` then run: + `WindowsSdkVer.exe -version:v7.0` +6. Close the command prompt window and run step 4 again +7. Ensure CMake bin path is in the `PATH` environment variable (eg: `echo + %PATH%` and see that the folder is there) if not you will have to add it to + your `PATH`. +8. `cd` to your Io root folder +9. We want to do an out-of-source build, so: `mkdir buildroot` and `cd buildroot` +10. a) `cmake ..` + + or + + b) `cmake -DCMAKE_INSTALL_PREFIX=:\ ..` (eg: `cmake -DCMAKE_INSTALL_PREFIX=C:\Io ..`) +11. `nmake` +12. `nmake install` +13. Install [Eerie](https://github.com/IoLanguage/eerie), the Io package manager + (see Eerie [repo](https://github.com/IoLanguage/eerie) for installation + options): `./_build/binaries/io_static setup.io`. + + +#### Building with Cygwin + +Install Cygwin from: + +1. `cd` to your Io root folder +2. We want to do an out-of-source build, so: `mkdir buildroot` and `cd buildroot` +3. a) `cmake ..` + + or + + b) `cmake -DCMAKE_INSTALL_PREFIX=:/ ..` + (eg: `cmake -DCMAKE_INSTALL_PREFIX=C:/Io ..`) +4. `make` +5. `make install` +6. Install [Eerie](https://github.com/IoLanguage/eerie), the Io package manager + (see Eerie [repo](https://github.com/IoLanguage/eerie) for installation + options): `./_build/binaries/io_static setup.io`. + +Note: If you also have CMake 2.8 for Windows installed (apart from CMake for +Cygwin) check your `PATH` environment variable so you won't be running CMake for +Windows instead of Cygwin version. + + +Running Tests +=== + +You should be inside your out-of-source build dir. The vm tests can be run with +the command: + + io ../libs/iovm/tests/correctness/run.io + +Installing Addons +=== + +Many of the common features provided by the Io language aren't prepackaged in +the Io core. Instead, these features are contained in addons that get loaded +when launching the Io VM. In the past, these addons were automatically installed +by the build process, but now they must be installed through +[Eerie](https://github.com/IoLanguage/eerie), the Io package manager. + +Most of these addons are housed under the IoLanguage group on GitHub: +https://github.com/IoLanguage. + +To install an addon, ensure both Io and Eerie are installed correctly, then run: + +``` +eerie install +``` + +For example, to build and install the `Range` addon, run the command: + +``` +eerie install https://github.com/IoLanguage/Range.git +``` + +To ensure that an addon installed correctly, pull up an Io interpreter and type +the name of the object provided by the addon. It should load dynamically and +automatically into the interpreter session, populating a slot in `Lobby Protos +Addons`. diff --git a/io-master/addons/ReadLine/LICENSE b/io-master/addons/ReadLine/LICENSE new file mode 100644 index 0000000..0f6a85c --- /dev/null +++ b/io-master/addons/ReadLine/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2007, Jonaa Eschenburg +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/io-master/addons/ReadLine/README.md b/io-master/addons/ReadLine/README.md new file mode 100644 index 0000000..423fd09 --- /dev/null +++ b/io-master/addons/ReadLine/README.md @@ -0,0 +1,10 @@ +# ReadLine +Binding to GNU readline. + +# Installation + +ReadLine should be installed and foundable on your system. Then: + +``` +eerie install https://github.com/IoLanguage/ReadLine.git +``` diff --git a/io-master/addons/ReadLine/build.io b/io-master/addons/ReadLine/build.io new file mode 100644 index 0000000..2fdba76 --- /dev/null +++ b/io-master/addons/ReadLine/build.io @@ -0,0 +1,6 @@ +AddonBuilder clone do( + dependsOnLib("readline") + dependsOnHeader("readline/readline.h") + dependsOnHeader("readline/history.h") + dependsOnHeader("locale.h") +) diff --git a/io-master/addons/ReadLine/io/ReadLine.io b/io-master/addons/ReadLine/io/ReadLine.io new file mode 100644 index 0000000..85b2bde --- /dev/null +++ b/io-master/addons/ReadLine/io/ReadLine.io @@ -0,0 +1 @@ +/* ReadLine */ diff --git a/io-master/addons/ReadLine/package.json b/io-master/addons/ReadLine/package.json new file mode 100644 index 0000000..02dbb19 --- /dev/null +++ b/io-master/addons/ReadLine/package.json @@ -0,0 +1,15 @@ +{ + "name": "ReadLine", + "version": "0.1", + "description": "Binding to GNU readline.", + "author": "Jonaa Eschenburg", + "website": "http://iolanguage.com/", + "readme": "README.md", + "protos": ["ReadLine"], + "dependencies": { + "libs": ["readline"], + "headers": ["readline/readline.h", "readline/history.h"], + "protos": [], + "packages": [] + } +} diff --git a/io-master/addons/ReadLine/source/IoReadLine.c b/io-master/addons/ReadLine/source/IoReadLine.c new file mode 100644 index 0000000..79a1e32 --- /dev/null +++ b/io-master/addons/ReadLine/source/IoReadLine.c @@ -0,0 +1,124 @@ +//metadoc ReadLine copyright Jonaa Eschenburg, 2007 +//metadoc ReadLine license BSD revised +//metadoc ReadLine category API +/*metadoc ReadLine description +Binding to GNU readline. +*/ + +#include +#include +#include +//#include +//#include +#include "readline.h" + +#include "IoReadLine.h" + +static const char *protoId = "ReadLine"; + +#define DATA(self) ((readline_t *)IoObject_dataPointer(self)) + +IoTag *IoReadLine_newTag(void *state) +{ + IoTag *tag = IoTag_newWithName_("ReadLine"); + IoTag_state_(tag, state); + IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoReadLine_free); + return tag; +} + +IoReadLine *IoReadLine_proto(void *state) +{ + IoMethodTable methodTable[] = { + {"readLine", IoReadLine_readLine}, + {"addHistory", IoReadLine_addHistory}, + {"loadHistory", IoReadLine_loadHistory}, + {"saveHistory", IoReadLine_saveHistory}, + {NULL, NULL}, + }; + + IoObject *self = IoObject_new(state); + IoObject_tag_(self, IoReadLine_newTag(state)); + + IoObject_setSlot_to_(self, IOSYMBOL("prompt"), IOSYMBOL("")); + + /* Make sure readline returns characters in the multi-byte charset + of the locale */ + setlocale(LC_CTYPE, ""); + /* Actually initialize GNU readly and history */ + //rl_initialize(); + //using_history(); + + IoState_registerProtoWithFunc_((IoState *)state, self, protoId); + + char *buffer = io_calloc(1, 1024*1024); + readline_t *rl = readline_new(buffer); + IoObject_setDataPointer_(self, rl); + + IoObject_addMethodTable_(self, methodTable); + + return self; +} + +void IoReadLine_free(IoReadLine *self) { + readline_free(DATA(self)); +} + + +/* ----------------------------------------------------------- */ + +IoObject *IoReadLine_readLine(IoReadLine *self, IoObject *locals, IoMessage *m) +{ + const char *prompt = NULL; + + if (IoMessage_argCount(m) == 0) { + IoObject *p = IoObject_rawGetSlot_(self, IOSYMBOL("prompt")); + if (p && ISSEQ(p)) { + prompt = CSTRING(p); + } else { + prompt = ""; + } + } else { + prompt = IoMessage_locals_cStringArgAt_(m, locals, 0); + } + +// const char *line = readline(prompt); + const char *line = readline_next(DATA(self)); + printf("got input readline:'%s'\n", line); + + if (line) { + return IOSEQ((const unsigned char*)line, strlen(line)); + } else { + return IONIL(self); + } +} + +IoObject *IoReadLine_addHistory(IoReadLine *self, IoObject *locals, IoMessage *m) { + IoSeq *line = IoMessage_locals_seqArgAt_(m, locals, 0); + + //add_history(CSTRING(line)); + + return self; +} + +IoObject *IoReadLine_loadHistory(IoReadLine *self, IoObject *locals, IoMessage *m) { + char *filename = IoMessage_argCount(m) >= 1 ? IoMessage_locals_cStringArgAt_(m, locals, 0) : NULL; + //int err = read_history(filename); + int err = 1; + + if (err != 0) + IoState_error_(IOSTATE, m, "while loading history file '%s', reason: %s", filename, strerror(err)); + + return self; +} + +IoObject *IoReadLine_saveHistory(IoReadLine *self, IoObject *locals, IoMessage *m) +{ + char *filename = IoMessage_argCount(m) >= 1 ? IoMessage_locals_cStringArgAt_(m, locals, 0) : NULL; + //int err = write_history(filename); + int err = 1; + + if (err != 0) + IoState_error_(IOSTATE, m, "while saving history file '%s', reason: %s", filename, strerror(err)); + + return self; +} diff --git a/io-master/addons/ReadLine/source/IoReadLine.h b/io-master/addons/ReadLine/source/IoReadLine.h new file mode 100644 index 0000000..c34e50b --- /dev/null +++ b/io-master/addons/ReadLine/source/IoReadLine.h @@ -0,0 +1,30 @@ +//metadoc ReadLine copyright Jonaa Eschenburg, 2007 +//metadoc ReadLine license BSD revised + +#ifndef IoReadLine_DEFINED +#define IoReadLine_DEFINED 1 + +#include "Common.h" +#include "IoObject.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ISREADLINE(self) IoObject_hasCloneFunc_(self, (IoTagCloneFunc *)IoReadLine_rawClone) + +typedef IoObject IoReadLine; + +IoReadLine *IoReadLine_proto(void *state); +IoReadLine *IoReadLine_rawClone(IoReadLine *self); +void IoReadLine_free(IoReadLine *self); + +IoObject *IoReadLine_readLine(IoReadLine *self, IoObject *locals, IoMessage *m); +IoObject *IoReadLine_addHistory(IoReadLine *self, IoObject *locals, IoMessage *m); +IoObject *IoReadLine_loadHistory(IoReadLine *self, IoObject *locals, IoMessage *m); +IoObject *IoReadLine_saveHistory(IoReadLine *self, IoObject *locals, IoMessage *m); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/io-master/addons/ReadLine/source/tiny-readline/README.md b/io-master/addons/ReadLine/source/tiny-readline/README.md new file mode 100644 index 0000000..2dda4e8 --- /dev/null +++ b/io-master/addons/ReadLine/source/tiny-readline/README.md @@ -0,0 +1,81 @@ +readline +================ + +Tiny C readline library, note: this is not used in CLI-readline's one. + + +Installation +================== + +Install it with git + +```bash +$ git clone https://github.com/yorkie/readline.git master +``` + +Install it with [clib](https://github.com/clibs/clib) + +```bash +$ clib install clibs/readline +``` + +Get Started +================= + +```c +#include "readline.h" + +readline_t * rl = readline_new(text); +char * line; + +do { + line = readline_next(rl); + // get line. + +} while (line != NULL); + +// free memory +readline_free(rl); +``` + +API +================= + +```c + +/* + * Create a context of readline from a buffer + */ +readline_t * +readline_new(char * buffer); + +/* + * Get the next line of the context + */ +char * +readline_next(readline_t * rl); + +/* + * Get last line of a buffer, ignoring any context of readline + */ +char * +readline_last_from_rl(readline_t * rl); + +/* + * Get the last line directly buffer + */ +char * +readline_last(char * buffer); + +/* + * free the object + */ +void +readline_free(readline_t * rl); +``` + + +License +=================== + +MIT diff --git a/io-master/addons/ReadLine/source/tiny-readline/readline.c b/io-master/addons/ReadLine/source/tiny-readline/readline.c new file mode 100644 index 0000000..5cb0c30 --- /dev/null +++ b/io-master/addons/ReadLine/source/tiny-readline/readline.c @@ -0,0 +1,109 @@ + +// +// readline.c +// +// Copyright (c) 2014 Yorkie Neil +// + +#include +#include +#include +#include +#include "readline.h" + +readline_t * +readline_new(char * buffer) { + readline_t * rl = (readline_t*) calloc(1, sizeof(readline_t)); + if (NULL == rl) { + return rl; + } + size_t len = strlen(buffer); + + rl->buffer = (char*) malloc(len); + if( NULL == rl->buffer ) { + free(rl); + return NULL; + } + + memcpy(rl->buffer, buffer, len); + return rl; +} + +char * +readline_next(readline_t * rl) { + char * ret = NULL; + size_t cur = rl->cursor; + size_t len; + size_t buffer_len = strlen(rl->buffer); + + assert(rl->buffer != NULL); + + while ( + rl->buffer[cur++] != '\n' && + cur <= buffer_len); + + len = cur - rl->cursor - 1; + ret = (char*) malloc(len); + + if (ret == NULL) { + return NULL; + } else if (len == 0 && cur > buffer_len) { + free(ret); + return NULL; + } + + memcpy(ret, rl->buffer+rl->cursor, len); + rl->cursor = cur; + rl->line += 1; + return ret; +} + +char * +readline_last_from_rl(readline_t * rl) { + char * ret = NULL; + size_t cur = strlen(rl->buffer)-1; /* skip \0 of the last line */ + size_t len; + size_t buffer_len = cur; + + assert(rl->buffer != NULL); + + while (cur--) { + if (rl->buffer[cur] == '\n') { + cur++; + break; + } + } + + len = buffer_len - cur; + ret = (char*) malloc(len); + + if (ret == NULL) { + return NULL; + } else if (len == 0 && cur > buffer_len) { + free(ret); + return NULL; + } + + memcpy(ret, rl->buffer+cur, len); + return ret; +} + +char * +readline_last(char * buffer) { + readline_t * rl = readline_new(buffer); + if (NULL == rl) { + return NULL; + } + char * ret = readline_last_from_rl(rl); + readline_free(rl); + return ret; +} + +void +readline_free(readline_t * rl) { + assert(rl->buffer != NULL); + assert(rl != NULL); + + free(rl->buffer); + free(rl); +} diff --git a/io-master/addons/ReadLine/source/tiny-readline/readline.h b/io-master/addons/ReadLine/source/tiny-readline/readline.h new file mode 100644 index 0000000..a43aa49 --- /dev/null +++ b/io-master/addons/ReadLine/source/tiny-readline/readline.h @@ -0,0 +1,52 @@ + +// +// readline.h +// +// Copyright (c) 2014 Yorkie Neil +// + +#ifndef READLINE__H_ +#define READLINE__H_ + +/* + * Readline struct + */ + +typedef struct readline_s { + char * buffer; + size_t cursor; + size_t line; +} readline_t; + +/* + * create a new readline struct + */ +readline_t * +readline_new(char * buffer); + +/* + * next cursor + */ +char * +readline_next(readline_t * rl); + +/* + * Get last line of a buffer, ignoring any context of readline + */ +char * +readline_last_from_rl(readline_t * rl); + +/* + * Get the last line directly buffer + */ +char * +readline_last(char * buffer); + +/* + * free the object + */ +void +readline_free(readline_t * rl); + + +#endif diff --git a/io-master/addons/ReadLine/source/tiny-readline/test.c b/io-master/addons/ReadLine/source/tiny-readline/test.c new file mode 100644 index 0000000..b61140d --- /dev/null +++ b/io-master/addons/ReadLine/source/tiny-readline/test.c @@ -0,0 +1,162 @@ + +#include +#include +#include +#include +#include "readline.h" + +#define test_start() \ + printf("\n================\n") \ + +/* + * Reads two lines + */ +void +test_readline_simple() { + + test_start(); + char * buf = "" \ + "c++\n" + "lua\n"; + + readline_t * rl = readline_new(buf); + char * line = NULL; + size_t count = 0; + + while ((line = (readline_next(rl))) != NULL) { + count++; + printf("line: %s\n", line); + } + + assert(count == 2); + printf("\t OK\n"); +} + +/* + * Reads 3 lines, including an empty line + */ +void +test_readline_empty_line() { + test_start(); + char * buf = "" \ + "c++\n" + "\n" + "javascript"; + + readline_t * rl = readline_new(buf); + char * line = NULL; + size_t count = 0; + + while ((line = (readline_next(rl))) != NULL) { + count++; + printf("line: %s\n", line); + } + + assert(count == 3); + printf("\t OK\n"); +} + +/* + * Reads the last line + */ +void +test_readline_last_line() { + + test_start(); + char * buf = "" \ + "c++\n" + "lua\n" + "javascript"; + + readline_t * rl = readline_new(buf); + char * line = NULL; + size_t count = 0; + + while ((line = (readline_next(rl))) != NULL) { + count++; + printf("line: %s\n", line); + assert(count <= 3); + } + + assert(count == 3); + printf("\t OK\n"); +} + +/* + * Reads the last that isn't empty + */ +void +test_readline_last_empty_line() { + + test_start(); + char * buf = "" \ + "c++\n" + "lua\n" + ""; + + readline_t * rl = readline_new(buf); + char * line = NULL; + size_t count = 0; + + while ((line = (readline_next(rl))) != NULL) { + count++; + printf("line: %s\n", line); + } + + assert(count == 2); + printf("\t OK\n"); +} + +/* + * Reads the last line + */ +void +test_readline_last() { + + test_start(); + char * buf = "" \ + "c++\n" + "lua\n" + "javascript\n"; + + char * last = readline_last(buf); + printf("last: %s\n", last); + + assert(strcmp("javascript", last) == 0); + printf("\t OK\n"); +} + +/* + * Reads the last line without \n + */ +void +test_readline_last_without_10() { + + test_start(); + char * buf = "" \ + "c++\n" + "lua\n" + "javascript"; + + char * last = readline_last(buf); + printf("last: %s\n", last); + + assert(strcmp("javascript", last) == 0); + printf("\t OK\n"); +} + + +int +main() { + + /* next func */ + test_readline_simple(); + test_readline_empty_line(); + test_readline_last_line(); + test_readline_last_empty_line(); + + /* last line */ + test_readline_last(); + test_readline_last_without_10(); + return 0; +} diff --git a/io-master/addons/ReadLine/tests/correctness/ReadLineTest.io b/io-master/addons/ReadLine/tests/correctness/ReadLineTest.io new file mode 100644 index 0000000..a2bd2a3 --- /dev/null +++ b/io-master/addons/ReadLine/tests/correctness/ReadLineTest.io @@ -0,0 +1,45 @@ +System temporaryDirectory := method( + list("TMP", "TEMP", "TMPDIR") foreach(v, + if (path := System getEnvironmentVariable(v), return path) + ) +) + +ReadLineTest := UnitTest clone do( + + testCannotLoadHistoryFromNonexistentFile := method( + historyFilePath := Path with(System temporaryDirectory, "io-nonexistent-history") + assertRaisesException( ReadLine loadHistory(historyFilePath) ) + ) + + testSaveHistoryFile := method( + historyFilePath := Path with(System temporaryDirectory, "io-new-history") + + ReadLine addHistory("history line") + ReadLine saveHistory(historyFilePath) + + historyFile := File with(historyFilePath) + + assertTrue(historyFile exists) + assertEquals("history line", historyFile readLines last) + + historyFile remove + ) + + testCanLoadHistoryFromExistingFile := method( + historyFilePath := Path with(System temporaryDirectory, "io-existing-history") + historyFile := File with(historyFilePath) + historyFile open + historyFile write("history line") + historyFile close + + ReadLine loadHistory(historyFilePath) + ReadLine addHistory("history line 2") + ReadLine saveHistory(historyFilePath) + + historyFile := File with(historyFilePath) + + assertEquals(list("history line", "history line 2"), historyFile readLines) + + historyFile remove + ) +) diff --git a/io-master/addons/ReadLine/tests/correctness/run.io b/io-master/addons/ReadLine/tests/correctness/run.io new file mode 100644 index 0000000..3cbb586 --- /dev/null +++ b/io-master/addons/ReadLine/tests/correctness/run.io @@ -0,0 +1 @@ +TestSuite clone setPath(System launchPath) run diff --git a/io-master/build.sh b/io-master/build.sh new file mode 100755 index 0000000..7e473e1 --- /dev/null +++ b/io-master/build.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# Build script for Steve + +INSTALL_PREFIX="${INSTALL_PREFIX:-/usr/local}" + +if [ X"$1" = X"linkInstall" ]; then + rm -rf $INSTALL_PREFIX/lib/io $INSTALL_PREFIX/bin/io + for i in $PWD/build/_build/dll/*; do ln -s $i $INSTALL_PREFIX/lib/`basename $i`; done + mkdir $INSTALL_PREFIX/lib/io + ln -s $PWD/addons $INSTALL_PREFIX/lib/io/ +elif [ X"$1" = X"install" ]; then + cd build + make install +elif [ X"$1" = X"help" ]; then + echo "Io build and installation" + echo "Usage: $0 [help|install|linkInstall|clean]" + echo -e "help\n\tThis message" + echo -e "install\n\tInstalls Io (must have built it first)" + echo -e "linkInstall\n\tLike above, but creates links into this hierarchy" + echo -e "clean\n\tRemoves all build files. This will break a linkInstall." + echo -e "Any other arguments, or lack thereof will build Io." +elif [ X"$1" = X"clean" ]; then + [ -d build ] && rm -rf build || echo "Nothing to clean." +else + mkdir -p build + cd build + cmake -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" .. + make all +fi + diff --git a/io-master/docs/IoCodingStandards.html b/io-master/docs/IoCodingStandards.html new file mode 100755 index 0000000..19f9449 --- /dev/null +++ b/io-master/docs/IoCodingStandards.html @@ -0,0 +1,117 @@ + + + + + +Io Programming Guide + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Io Coding Standards

+ +
+ +

+
+
+
+ + + +



+

+
+

Conventions

+
+      +

Naming

+
+
    +
  • Prototypes should begin with a capital letter, e.g. Array, Map, Object.
  • +
  • Methods producing a (possibly modified) copy of an object should begin with "as", e.g. asMutable, asUppercase, asNumber.
  • +
+




+

Comments

+
+ ... +




+

Indentation

+
+ ... +




+

Whitespace

+
+ spaces and tabs, trailing spaces +




+

Commit Messages

+
+ A short description of the change with a reference to the issue # if relevant. +




+
+ + + + + +


+


+ + diff --git a/io-master/docs/IoGuide.html b/io-master/docs/IoGuide.html new file mode 100755 index 0000000..373bcbc --- /dev/null +++ b/io-master/docs/IoGuide.html @@ -0,0 +1,2748 @@ + + + + + +Io Programming Guide + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Io Programming Guide

+ +
+ +

+
+
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +



+ +

+

Introduction

+
+      + + +
+ + + +

Overview

+
+ +Io is a dynamic prototype-based programming language. The ideas in Io are mostly inspired by Smalltalk[1] (all values are objects), Self[2] (prototype-based), NewtonScript[3] (differential inheritance), Act1[4] (actors and futures for concurrency), Lisp[5] (code is a runtime inspectable / modifiable tree) and Lua[6] (small, embeddable). + +

Perspective

+
+ + + + +The focus of programming language research for the last thirty years has been to combine the expressive power of high level languages like Smalltalk and the performance of low level language like C with little attention paid to advancing expressive power itself. The result has been a series of languages which are neither as fast as C or as expressive as Smalltalk. Io's purpose is to refocus attention on expressiveness by exploring higher level dynamic programming features with greater levels of runtime flexibility and simplified programming syntax and semantics. + +

+ +In Io, all values are objects (of which, anything can change at runtime, including slots, methods and inheritance), all code is made up of expressions (which are runtime inspectable and modifiable) and all expressions are made up of dynamic message sends (including assignment and control structures). Execution contexts themselves are objects and activatable objects such as methods/blocks and functions are unified into blocks with assignable scope. Concurrency is made more easily manageable through actors and implemented using coroutines for scalability. + +

Goals

+ +To be a language that is: +

+ +simple +

    +
  • conceptually simple and consistent +
  • easily embedded and extended +
+powerful +
    +
  • highly dynamic and introspective +
  • highly concurrent (via coroutines and async i/o) +
+practical +
    +
  • fast enough +
  • multi-platform +
  • unrestrictive BSD/MIT license +
  • comprehensive standard packages in distro +
+ + + +
+

Downloading

+
+ +
+ +Io distributions are available at: +
http://iolanguage.com
+ + +
+ +
+ +

Installing

+
+ + + Follow the README.txt file in the download to compile and install io. + + +
+ +

Running Scripts

+
+ + +An example of running a script: + +
+io samples/misc/HelloWorld.io
+
+ +There is no main() function or object that gets executed first in Io. Scripts are executed when compiled. + + +
+ +

Interactive Mode

+
+ + +Running: + +
+./_build/binaries/io
+
+ +Or, if Io is installed, running: + +
+io
+
+ +will open the Io interpreter prompt. +

+You can evaluate code by entering it directly. Example: + +

+Io> "Hello world!" println
+==> Hello world!
+
+ +Expressions are evaluated in the context of the Lobby: + +
+Io> print
+[printout of lobby contents]
+
+ +If you have a .iorc file in your home folder, it will be evaled before the interactive prompt starts. + + +
+ +
+ + +

Inspecting objects

+
+ +You can get a list of the slots of an object like this: + +
+Io> someObject slotNames
+
+ +To show them in sorted order: + +
+Io> someObject slotNames sort
+
+ +For a nicely formatted description of an object, the slotSummary method is handy: + +
+Io> slotSummary
+==>  Object_0x20c4e0:
+  Lobby            = Object_0x20c4e0
+  Protos           = Object_0x20bff0
+  exit             = method(...)
+  forward          = method(...)
+
+ +Exploring further: + +
+Io> Protos
+==>  Object_0x20bff0:
+  Addons           = Object_0x20c6f0
+  Core             = Object_0x20c4b0
+
+Io> Protos Addons
+==>  Object_0x20c6f0:
+  ReadLine         = Object_0x366a10
+
+ +Only ReadLine is seen in the Addons since no other Addons have been loaded yet. +

+Inspecting a method will print a decompiled version of it: + +

+Io> Lobby getSlot("forward")
+==> # io/Z_Importer.io:65
+method(
+    Importer import(call)
+)
+
+ +
+ +

doFile and doString

+ +A script can be run from the interactive mode using the doFile method: + +
+doFile("scriptName.io")
+
+ +The evaluation context of doFile is the receiver, which in this case would be the lobby. To evaluate the script in the context of some other object, simply send the doFile message to it: + +
+someObject doFile("scriptName.io")
+
+ +The doString method can be used to evaluate a string: + +
+Io> doString("1+1")
+==> 2
+
+ +And to evaluate a string in the context of a particular object: + +
+someObject doString("1 + 1")
+
+ +

Command Line Arguments

+ +Example of printing out command line arguments: + +
+System args foreach(k, v, write("'", v, "'\n"))
+
+ +

launchPath

+ +The System "launchPath" slot is set to the location of the initial source file that is executed; when the interactive prompt is started (without specifying a source file to execute), the launchPath is the current working directory: + +
+System launchPath
+
+ + + +




+ +
+

Syntax

+
+ +




+ + +
+ + + +
+ +

Expressions

+
+ +Io has no keywords or statements. Everything is an expression composed entirely of messages, each of which is a runtime accessible object. The informal BNF description: + +
+exp        ::= { message | terminator }
+message    ::= symbol [arguments]
+arguments  ::= "(" [exp [ { "," exp } ]] ")"
+symbol     ::= identifier | number | string
+terminator ::= "\n" | ";"
+
+ +For performance reasons, String and Number literal messages have their results cached in their message objects. + + +
+ +

Messages

+
+ + +Message arguments are passed as expressions and evaluated by the receiver. Selective evaluation of arguments can be used to implement control flow. Examples: + +
+for(i, 1, 10, i println)
+a := if(b == 0, c + 1, d)
+
+ +In the above code, "for" and "if" are just normal messages, not special forms or keywords. +

+ +Likewise, dynamic evaluation can be used with enumeration without the need to wrap the expression in a block. Examples: + +

+people select(person, person age < 30)
+names := people map(person, person name)
+
+ +Methods like map and select will typically apply the expression directly to the values if only the expression is provided: + +
+people select(age < 30)
+names := people map(name)
+
+ +There is also some syntax sugar for operators (including assignment), which are handled by an Io macro executed on the expression after it is compiled into a message tree. Some sample source code: + +
+Account := Object clone
+Account balance := 0
+Account deposit := method(amount,
+    balance = balance + amount
+)
+
+account := Account clone
+account deposit(10.00)
+account balance println
+
+ +Like Self[2], Io's syntax does not distinguish between accessing a slot containing a method from one containing a variable. + + +
+ +
+ + +

Operators

+
+ + +An operator is just a message whose name contains no alphanumeric characters (other than ";", "_", '"' or ".") or is one of the following words: or, and, return. Example: + +
+1 + 2
+
+ +This just gets compiled into the normal message: + +
+1 +(2)
+
+ +Which is the form you can use if you need to do grouping: + +
+1 +(2 * 4)
+
+ +Standard operators follow C's precedence order, so: + +
+1 + 2 * 3 + 4
+
+ +Is parsed as: + +
+1 +(2 *(3)) +(4)
+
+ +User defined operators (that don't have a standard operator name) are performed left to right. + + +
+ +

Assignment

+
+ +Io has three assignment operators: + +

+ + + + + + + + + + + + + + + + + + + + + +
+operator + +action +
+::= + +Creates slot, creates setter, assigns value +
+:= + +Creates slot, assigns value +
+= + +Assigns value to slot if it exists, otherwise raises exception +
+

+ +These operators are compiled to normal messages whose methods can be overridden. For example: + + +

+ + + + + + + + + + + + + + + + + + + + + +
+source + +compiles to +
+a ::= 1 + +newSlot("a", 1) +
+a := 1 + +setSlot("a", 1) +
+a = 1 + +updateSlot("a", 1) +
+

+ +On Locals objects, updateSlot is overridden so it will update the slot in the object in which the method was activated if the slot is not found the locals. This is done so update assignments in methods don't require self to be an explicit target. + + +

+ +
+ + +

Numbers

+
+ + +The following are examples of valid number formats: + +
+123
+123.456
+0.456
+.456
+123e-4
+123e4
+123.456e-7
+123.456e2
+
+ +Hex numbers are also supported (in any casing): + +
+0x0
+0x0F
+0XeE
+
+ + +
+ + +

Strings

+
+ + +Strings can be defined surrounded by a single set of double quotes with escaped quotes (and other escape characters) within. + +
+s := "this is a \"test\".\nThis is only a test."
+
+ +Or for strings with non-escaped characters and/or spanning many lines, triple quotes can be used. + +
+s := """this is a "test".
+This is only a test."""
+
+ +
+ +

Comments

+
+ + +Comments of the //, /**/ and # style are supported. Examples: + +
+a := b // add a comment to a line
+
+/* comment out a group
+a := 1
+b := 2
+*/
+
+ +The "#" style is useful for unix scripts: + +
+#!/usr/local/bin/io
+
+ +That's it! You now know everything there is to know about Io's syntax. Control flow, objects, methods, exceptions are expressed with the syntax and semantics described above. + + + + + +





+ +
+

Objects

+
+
+ + + +



+ +
+ +

Overview

+
+ + + +Io's guiding design principle is simplicity and power through conceptual unification. +

+ + + + + + + + + + + + + + + + + + + + + +
+concept + +unifies +
+scopable blocks    + +functions, methods, closures +
+prototypes + +objects, classes, namespaces, locals +
+messages + +operators, calls, assigns, var access +
+ + +

+ +

Prototypes

+
+ + +In Io, everything is an object (including the locals storage of a block and the namespace itself) and all actions are messages (including assignment). Objects are composed of a list of key/value pairs called slots, and an internal list of objects from which it inherits called protos. A slot's key is a symbol (a unique immutable sequence) and its value can be any type of object. + +

clone and init

+New objects are made by cloning existing ones. A clone is an empty object that has the parent in its list of protos. A new instance's init slot will be activated which gives the object a chance to initialize itself. Like NewtonScript[3], slots in Io are create-on-write. + +
+me := Person clone
+
+ +To add an instance variable or method, simply set it: + +
+myDog name := "rover"
+myDog sit := method("I'm sitting\n" print)
+
+ +When an object is cloned, its "init" slot will be called if it has one. + + +
+ +

Inheritance

+
+ + +When an object receives a message it looks for a matching slot, if not found, the lookup continues depth first recursively in its protos. Lookup loops are detected (at runtime) and avoided. If the matching slot contains an activatable object, such as a Block or CFunction, it is activated, if it contains any other type of value it returns the value. Io has no globals and the root object in the Io namespace is called the Lobby. +

+Since there are no classes, there's no difference between a subclass and an instance. Here's an example of creating the equivalent of a subclass: + +

+Io> Dog := Object clone
+==> Object_0x4a7c0 
+
+ +The above code sets the Lobby slot "Dog" to a clone of the Object object; the protos list of this new object contains only a reference to Object, essentially indicating that a subclass of Object has been created. Instance variables and methods are inherited from the objects referenced in the protos list. If a slot is set, it creates a new slot in our object instead of changing the protos: + +
+  Io> Dog color := "red"
+  Io> Dog
+  ==> Object_0x4a7c0:
+    color := "red"
+
+ + +
+ +

Multiple Inheritance

+ + +You can add any number of protos to an object's protos list. When responding to a message, the lookup mechanism does a depth first search of the proto chain. + + + +
+ +

Methods

+
+ + +A method is an anonymous function which, when called, creates an object to store its locals and sets the local's proto pointer and its self slot to the target of the message. The Object method method() can be used to create methods. Example: + +
+method((2 + 2) print)
+
+ +An example of using a method in an object: + +
+Dog := Object clone
+Dog bark := method("woof!" print)
+
+ +The above code creates a new "subclass" of object named Dog and adds a bark slot containing a block that prints "woof!". Example of calling this method: + +
+Dog bark
+
+ +The default return value of a block is the result of the last expression. + +

Arguments

+ +Methods can also be defined to take arguments. Example: + +
+add := method(a, b, a + b)
+
+ +The general form is: + +

+method(<arg name 0>, <arg name 1>, ..., <do message>)
+
+ + +
+ +

Blocks

+
+ + + + +A block is the same as a method except it is lexically scoped. That is, variable lookups continue in the context of where the block was created instead of the target of the message which activated the block. A block can be created using the Object method block(). Example of creating a block: + +
+b := block(a, a + b)
+
+ +

Blocks vs. Methods

+ +This is sometimes a source of confusion so it's worth explaining in detail. Both methods and blocks create an object to hold their locals when they are called. The difference is what the "proto" and "self" slots of that locals object are set to. In a method, those slots are set to the target of the message. In a block, they're set to the locals object where the block was created. So a failed variable lookup in a block's locals continue in the locals where it was created. And a failed variable lookup in a method's locals continue in the object to which the message that activated it was sent. + +

call and self slots

+ +When a locals object is created, its self slot is set (to the target of the message, in the case of a method, or to the creation context, in the case of a block) and its call slot is set to a Call object that can be used to access information about the block activation: + +

+ + + + + + + + + + + + + + + + + + + + + + + +
+slot + +returns +
+call sender + +locals object of caller +
+call message + +message used to call this method/block +
+call activated + +the activated method/block +
+call slotContext + +context in which slot was found +
+call target + +current object +
+ +

Variable Arguments

+ +The "call message" slot in locals can be used to access the unevaluated argument messages. Example of implementing if() within Io: + +
+myif := method(
+    (call sender doMessage(call message argAt(0))) ifTrue( 
+    call sender doMessage(call message argAt(1))) ifFalse( 
+    call sender doMessage(call message argAt(2)))
+)
+
+myif(foo == bar, write("true\n"), write("false\n"))
+
+ +The doMessage() method evaluates the argument in the context of the receiver. + +A shorter way to express this is to use the evalArgAt() method on the call object: + +
+myif := method(
+    call evalArgAt(0) ifTrue(
+    call evalArgAt(1)) ifFalse( 
+    call evalArgAt(2))
+)
+
+myif(foo == bar, write("true\n"), write("false\n"))
+
+ +
+ +

Forward

+
+ + +If an object doesn't respond to a message, it will invoke its "forward" method if it has one. Here's an example of how to print the information related lookup that failed: + +
+MyObject forward := method(
+    write("sender = ", call sender, "\n")
+    write("message name = ", call message name, "\n")
+    args := call message argsEvaluatedIn(call sender)
+    args foreach(i, v, write("arg", i, " = ", v, "\n") )
+)
+
+ +
+ +

Resend

+
+ +Sends the current message to the receiver's protos with self as the context. Example: + +
+A := Object clone
+A m := method(write("in A\n"))
+B := A clone
+B m := method(write("in B\n"); resend)
+B m
+
+ +will print: + +
+in B
+in A
+
+ +For sending other messages to the receiver's proto, super is used. + + +
+ +
+ + +

Super

+
+ + +Sometimes it's necessary to send a message directly to a proto. Example: + +
+Dog := Object clone
+Dog bark := method(writeln("woof!"))
+
+fido := Dog clone
+fido bark := method(
+    writeln("ruf!")
+    super(bark)
+)
+
+ +Both resend and super are implemented in Io. + + +
+ +

Introspection

+
+ + +Using the following methods you can introspect the entire Io namespace. There are also methods for modifying any and all of these attributes at runtime. + +

slotNames

+ +The slotNames method returns a list of the names of an object's slots: + +
+Io> Dog slotNames
+==> list("bark")
+
+ +

protos

+ +The protos method returns a list of the objects which an object inherits from: + +
+Io> Dog protos map(type)
+==> list(Object)
+
+ +

getSlot

+ +The "getSlot" method can be used to get the value of a block in a slot without activating it: + +
+myMethod := Dog getSlot("bark")
+
+ +Above, we've set the locals object's "myMethod" slot to the bark method. It's important to remember that if you then want use the myMethod without activating it, you'll need to use the getSlot method: + +
+otherObject newMethod := getSlot("myMethod")
+
+ +Here, the target of the getSlot method is the locals object. + +

code

+ +The arguments and expressions of methods are open to introspection. A useful convenience method is "code", which returns a string representation of the source code of the method in a normalized form. + +
+Io> method(a, a * 2) code
+==> "method(a, a *(2))"
+
+ + + +






+ +
+

Control Flow

+
+ +




+ + +
+ + +
+ +

true, false and nil

+
+ + + +There are singletons for true, false and nil. nil is typically used to indicate an unset or missing value. + +
+ +

Comparison

+
+ +The comparison methods: + +
+==, !=, >=, <=, >, < 
+
+ +return either the true or false. The compare() method is used to implement the comparison methods and returns -1, 0 or 1 which mean less-than, equal-to or greater-than, respectively. + +
+ +

if, then, else

+
+ +The if() method can be used in the form: + +

+if(<condition>, <do message>, <else do message>)
+
+ +Example: + +
+if(a == 10, "a is 10" print)
+
+ +The else argument is optional. The condition is considered false if the condition expression evaluates to false or nil, and true otherwise. +

+The result of the evaluated message is returned, so: + +

+if(y < 10, x := y, x := 0)
+
+ +is the same as: + +
+x := if(y < 10, y, 0)
+
+ +Conditions can also be used in this form: + +
+if(y < 10) then(x := y) else(x := 2)
+
+ +elseif() is supported: + +
+if(y < 10) then(x := y) elseif(y == 11) then(x := 0) else(x := 2)
+
+ +
+ +

ifTrue, ifFalse

+
+ +Also supported are Smalltalk style ifTrue, ifFalse, ifNil and ifNonNil methods: + +
+(y < 10) ifTrue(x := y) ifFalse(x := 2)
+
+ +Notice that the condition expression must have parentheses surrounding it. + + + +
+ +

loop

+
+ + +The loop method can be used for "infinite" loops: + +
+loop("foo" println)
+
+ +
+ +
+ + +

repeat

+
+ +The Number repeat method can be used to repeat a loop a given number of times. + +
+3 repeat("foo" print)
+==> foofoofoo
+
+ + +
+ +

while

+
+ +Arguments: + +
+while(<condition>, <do message>)
+ +Example: + +
+a := 1
+while(a < 10, 
+    a print
+    a = a + 1
+)
+
+ +
+ +

for

+
+ +Arguments: + +
for(<counter>, <start>, <end>, <optional step>, <do message>)
+ +The start and end messages are only evaluated once, when the loop starts. + +Example: + +
+for(a, 0, 10, 
+    a println
+)
+
+ +Example with a step: + +
+for(x, 0, 10, 3, x println)
+
+ +Which would print: + +
+0
+3
+6
+9
+
+ +To reverse the order of the loop, add a negative step: + +
+for(a, 10, 0, -1, a println)
+
+ +Note: the first value will be the first value of the loop variable and the last will be the last value on the final pass through the loop. So a loop of 1 to 10 will loop 10 times and a loop of 0 to 10 will loop 11 times. + +
+ +

break, continue

+
+ +loop, repeat, while and for support the break and continue methods. Example: + +
+for(i, 1, 10, 
+    if(i == 3, continue)
+    if(i == 7, break)
+    i print
+)
+
+ +Output: + +
+12456
+
+ + +
+ +

return

+
+ +Any part of a block can return immediately using the return method. Example: + +
+Io> test := method(123 print; return "abc"; 456 print)
+Io> test
+123
+==> abc
+
+ +Internally, break, continue and return all work by setting a IoState internal variable called "stopStatus" which is monitored by the loop and message evaluation code. + + +



+ +
+

Importing

+
+ +



+ +
+ +The Importer proto implements Io's built-in auto importer feature. If you put each of your proto's in their own file, and give the file the same name with and ".io" extension, the Importer will automatically import that file when the proto is first referenced. The Importer's default search path is the current working directory, but can add search paths using its addSearchPath() method. + +
+



+ +
+

Concurrency

+
+ +
+ + +
+ +

Coroutines

+
+ + +Io uses coroutines (user level cooperative threads), instead of preemptive OS level threads to implement concurrency. This avoids the substantial costs (memory, system calls, locking, caching issues, etc) associated with native threads and allows Io to support a very high level of concurrency with thousands of active threads. + +
+ +

Scheduler

+
+ + + +The Scheduler object is responsible for resuming coroutines that are yielding. The current scheduling system uses a simple first-in-first-out policy with no priorities. + + +
+ +

Actors

+
+ + +An actor is an object with its own thread (in our case, its own coroutine) which it uses to process its queue of asynchronous messages. Any object in Io can be sent an asynchronous message by placing using the asyncSend() or futureSend() messages. +

+Examples: + +

+result := self foo // synchronous 
+futureResult := self futureSend(foo) // async, immediately returns a Future
+self asyncSend(foo) // async, immediately returns nil
+
+ +When an object receives an asynchronous message it puts the message in its queue and, if it doesn't already have one, starts a coroutine to process the messages in its queue. Queued messages are processed sequentially in a first-in-first-out order. Control can be yielded to other coroutines by calling "yield". Example: + +
+obj1 := Object clone
+obj1 test := method(for(n, 1, 3, n print; yield))
+obj2 := obj1 clone
+obj1 asyncSend(test); obj2 asyncSend(test)
+while(Scheduler yieldingCoros size > 1, yield)
+
+ +This would print "112233". + +Here's a more real world example: + +
+HttpServer handleRequest := method(aSocket,
+    HttpRequestHandler clone asyncSend(handleRequest(aSocket))
+)
+
+ +
+ +
+ + +

Futures

+
+ + + + +Io's futures are transparent. That is, when the result is ready, they become the result. If a message is sent to a future (besides the two methods it implements), it waits until it turns into the result before processing the message. Transparent futures are powerful because they allow programs to minimize blocking while also freeing the programmer from managing the fine details of synchronization. + +

Auto Deadlock Detection

+ +An advantage of using futures is that when a future requires a wait, it will check to see if pausing to wait for the result would cause a deadlock and if so, avoid the deadlock and raise an exception. It performs this check by traversing the list of connected futures. + +

Futures and the Command Line Interface

+ +The command line will attempt to print the result of expressions evaluated in it, so if the result is a Future, it will attempt to print it and this will wait on the result of Future. Example: + +
+Io> q := method(wait(1))
+Io> futureSend(q)
+[1-second delay]
+==> nil
+
+ +To avoid this, just make sure the Future isn't the result. Example: + +
+Io> futureSend(q); nil
+[no delay]
+==> nil
+
+ + +
+ +

Yield

+
+ + +An object will automatically yield between processing each of its asynchronous messages. The yield method only needs to be called if a yield is required during an asynchronous message execution. + +

Pause and Resume

+ +It's also possible to pause and resume an object. See the concurrency methods of the Object primitive for details and related methods. + + + + +
+

Exceptions

+
+ +
+ +



+
+ +

Raise

+
+ + + +An exception can be raised by calling raise() on an exception proto. + +
+Exception raise("generic foo exception")
+
+ + + + +
+ +

Try and Catch

+
+ + + +To catch an exception, the try() method of the Object proto is used. try() will catch any exceptions that occur within it and return the caught exception or nil if no exception is caught. + +

+e := try(<doMessage>)
+
+ +To catch a particular exception, the Exception catch() method can be used. Example: + +
+e := try(
+    // ...
+) 
+
+e catch(Exception,
+    writeln(e coroutine backTraceString)
+)
+
+ + +The first argument to catch indicates which types of exceptions will be caught. catch() returns the exception if it doesn't match and nil if it does. + + +
+ +

Pass

+
+ + +To re-raise an exception caught by try(), use the pass method. This is useful to pass the exception up to the next outer exception handler, usually after all catches failed to match the type of the current exception: + +
+e := try(
+    // ...
+) 
+
+e catch(Error,
+    // ...
+) catch(Exception,
+    // ...
+) pass
+
+ + +
+ +

Custom Exceptions

+
+ + +Custom exception types can be implemented by simply cloning an existing Exception type: + +
+MyErrorType := Error clone
+
+ + + +




+ +
+

Primitives

+
+ +




+ +
+ +Primitives are objects built into Io whose methods are typically implemented in C and store some hidden data in their instances. For example, the Number primitive has a double precision floating point number as its hidden data and its methods that do arithmetic operations are C functions. All Io primitives inherit from the Object prototype and are mutable. That is, their methods can be changed. The reference docs contain more info on primitives. +

+ +This document is not meant as a reference manual, but an overview of the base primitives and bindings is provided here to give the user a jump-start and a feel for what is available and where to look in the reference documentation for further details. + + +

+ +

Object

+
+ + + +

The ? Operator

+ +Sometimes it's desirable to conditionally call a method only if it exists (to avoid raising an exception). Example: + +
+if(obj getSlot("foo"), obj foo)
+
+ +Putting a "?" before a message has the same effect: + +
+obj ?foo
+
+ +
+ +

List

+
+ + + +A List is an array of references and supports all the standard array manipulation and enumeration methods. Examples: +

+Create an empty list: + +

+a := List clone
+
+ +Create a list of arbitrary objects using the list() method: + +
+a := list(33, "a")
+
+ +Append an item: + +
+a append("b")
+==> list(33, "a", "b")
+
+ +Get the list size: + +
+a size
+==> 3
+
+ +Get the item at a given index (List indexes begin at zero): + +
+a at(1)
+==> "a"
+
+ +Note: List indexes begin at zero and nil is returned if the accessed index doesn't exist. +

+Set the item at a given index: + +

+a atPut(2, "foo")
+==> list(33, "a", "foo")
+
+a atPut(6, "Fred")
+==> Exception: index out of bounds
+
+ +Remove the given item: + +
+a remove("foo")
+==> list(33, "a", "b")
+
+ +Inserting an item at a given index: + +
+a atInsert(2, "foo")
+==> list(33, "a", "foo", "b")
+
+ +

foreach

+ +The foreach, map and select methods can be used in three forms: + +
+Io> a := list(65, 21, 122)
+
+ +In the first form, the first argument is used as an index variable, the second as a value variable and the 3rd as the expression to evaluate for each value. + +
+Io> a foreach(i, v, write(i, ":", v, ", "))
+==> 0:65, 1:21, 2:122,
+
+ +The second form removes the index argument: + +
+Io> a foreach(v, v println)
+==> 65
+21
+122
+
+ +The third form removes the value argument and simply sends the expression as a message to each value: + +
+Io> a foreach(println)
+==> 65
+21
+122
+
+ +

map and select

+ +Io's map and select (known as filter in some other languages) methods allow arbitrary expressions as the map/select predicates. + +
+Io> numbers := list(1, 2, 3, 4, 5, 6)
+
+Io> numbers select(isOdd)
+==> list(1, 3, 5)
+
+Io> numbers select(x, x isOdd)
+==> list(1, 3, 5)
+
+Io> numbers select(i, x, x isOdd)
+==> list(1, 3, 5)
+
+Io> numbers map(x, x*2)
+==> list(2, 4, 6, 8, 10, 12)
+
+Io> numbers map(i, x, x+i)
+==> list(1, 3, 5, 7, 9, 11)
+
+Io> numbers map(*3)
+==> list(3, 6, 9, 12, 15, 18)
+
+ +The map and select methods return new lists. To do the same operations in-place, you can use selectInPlace() and mapInPlace() methods. + + +
+ +
+ + +

Sequence

+
+ + + +In Io, an immutable Sequence is called a Symbol and a mutable Sequence is the equivalent of a Buffer or String. Literal strings(ones that appear in source code surrounded by quotes) are Symbols. Mutable operations cannot be performed on Symbols, but one can make mutable copy of a Symbol calling its asMutable method and then perform the mutation operations on the copy. +Common string operations +Getting the length of a string: + +
+"abc" size
+==> 3
+
+ +Checking if a string contains a substring: + +
+"apples" containsSeq("ppl")
+==> true
+
+ +Getting the character (byte) at position N: + +
+"Kavi" at(1)
+==> 97
+
+ +Slicing: + +
+"Kirikuro" exSlice(0, 2)
+==> "Ki"
+
+"Kirikuro" exSlice(-2)  # NOT: exSlice(-2, 0)!
+==> "ro"
+
+Io> "Kirikuro" exSlice(0, -2)
+==> "Kiriku"
+
+ +Stripping whitespace: + +
+"  abc  " asMutable strip
+==> "abc"
+
+"  abc  " asMutable lstrip
+==> "abc  "
+
+"  abc  " asMutable rstrip
+==> "  abc"
+
+ +Converting to upper/lowercase: + +
+"Kavi" asUppercase
+==> "KAVI"
+"Kavi" asLowercase
+==> "kavi"
+
+ +Splitting a string: + +
+"the quick brown fox" split
+==> list("the", "quick", "brown", "fox")
+
+ +Splitting by other characters is possible as well. + +
+"a few good men" split("e")
+==> list("a f", "w good m", "n")
+
+ +Converting to number: + +
+"13" asNumber
+==> 13
+
+"a13" asNumber
+==> nan
+
+ +String interpolation: + +
+name := "Fred"
+==> Fred
+"My name is #{name}" interpolate
+==> My name is Fred
+ 
+ +Interpolate will eval anything with #{} as Io code in the local context. The code may include loops or anything else but needs to return an object that responds to asString. + + +
+ +

Ranges

+
+ + +A range is a container containing a start and an end point, and instructions on how to get from the start to the end. Using Ranges is often convenient when creating large lists of sequential data as they can be easily converted to lists, or as a replacement for the for() method. + +

The Range protocol

+ +Each object that can be used in Ranges needs to implement a "nextInSequence" method which takes a single optional argument (the number of items to skip in the sequence of objects), and return the next item after that skip value. The default skip value is 1. The skip value of 0 is undefined. An example: + +
+Number nextInSequence := method(skipVal,
+    if(skipVal isNil, skipVal = 1)
+    self + skipVal
+)
+
+ +With this method on Number (it's already there in the standard libraries), you can then use Numbers in Ranges, as demonstrated below: + +
+1 to(5) foreach(v, v println)
+
+ +The above will print 1 through 5, each on its own line. + + +
+ +

File

+
+ + + +The methods openForAppending, openForReading, or openForUpdating are used for opening files. To erase an existing file before opening a new open, the remove method can be used. Example: + +
+f := File with("foo.txt")
+f remove
+f openForUpdating
+f write("hello world!")
+f close
+
+ + +
+ +

Directory

+
+ + +Creating a directory object: + +
+dir := Directory with("/Users/steve/")
+
+ +Get a list of file objects for all the files in a directory: + +
+files := dir files
+==> list(File_0x820c40, File_0x820c40, ...)
+
+ +Get a list of both the file and directory objects in a directory: + +
+items := dir items
+==> list(Directory_0x8446b0, File_0x820c40, ...)
+
+items at(4) name
+==> DarkSide-0.0.1 # a directory name
+
+ +Setting a Directory object to a certain directory and using it: + +
+root := Directory clone setPath("c:/")
+==> Directory_0x8637b8
+
+root fileNames
+==> list("AUTOEXEC.BAT", "boot.ini", "CONFIG.SYS", ...)
+
+ +Testing for existence: + +
+Directory clone setPath("q:/") exists
+==> false
+
+ +Getthing the current working directory: + +
+Directory currentWorkingDirectory
+==> "/cygdrive/c/lang/IoFull-Cygwin-2006-04-20"
+
+ + +
+ +

Date

+
+ +Creating a new date instance: + +
+d := Date clone
+
+ +Setting it to the current date/time: + +
+d now
+
+ +Getting the date/time as a number, in seconds: + +
+Date now asNumber
+==> 1147198509.417114
+
+Date now asNumber
+==> 1147198512.33313
+
+ +Getting individual parts of a Date object: + +
+d := Date now
+==> 2006-05-09 21:53:03 EST
+
+d
+==> 2006-05-09 21:53:03 EST
+
+d year
+==> 2006
+
+d month
+==> 5
+
+d day
+==> 9
+
+d hour
+==> 21
+
+d minute
+==> 53
+
+d second
+==> 3.747125
+
+ +Find how long it takes to execute some code: + +
+Date cpuSecondsToRun(100000 repeat(1+1))
+==> 0.02
+
+ + +
+ +
+ + +

Networking

+
+ + +All of Io's networking is done with asynchronous sockets underneath, but operations like reading and writing to a socket appear to be synchronous since the calling coroutine is unscheduled until the socket has completed the operation, or a timeout occurs. Note that you'll need to first reference the associated addon in order to cause it to load before using its objects. In these examples, you'll have to reference "Socket" to get the Socket addon to load first. +

+Creating a URL object: + +

+url := URL with("http://example.com/")
+
+ +Fetching an URL: + +
+data := url fetch  
+
+ +Streaming a URL to a file: + +
+url streamTo(File with("out.txt"))
+
+ +A simple whois client: + +
+whois := method(host,
+    socket := Socket clone \
+		setHost("rs.internic.net") setPort(43) 
+    socket connect streamWrite(host, "\n")
+    while(socket streamReadNextChunk, nil)
+    return socket readBuffer
+)
+
+ +A minimal web server: + +
+WebRequest := Object clone do(
+    handleSocket := method(aSocket,
+        aSocket streamReadNextChunk
+        request := aSocket readBuffer \
+			betweenSeq("GET ", " HTTP")
+        f := File with(request) 
+        if(f exists, 
+			f streamTo(aSocket)
+		, 
+			aSocket streamWrite("not found")
+		)
+        aSocket close
+    )
+)
+
+WebServer := Server clone do(
+    setPort(8000)
+    handleSocket := method(aSocket, 
+        WebRequest clone asyncSend(handleSocket(aSocket))
+    )
+)
+
+WebServer start
+
+ + +
+ +
+ + +

XML

+
+ +Using the XML parser to find the links in a web page: + +
+SGML // reference this to load the SGML addon
+xml := URL with("http://www.yahoo.com/") fetch asXML
+links := xml elementsWithName("a") map(attributes at("href"))
+
+ + +
+ +

Vector

+
+ + +Io's Vectors are built on its Sequence primitive and are defined as: + +
+Vector := Sequence clone setItemType("float32")
+
+ +The Sequence primitive supports SIMD acceleration on a number of float32 operations. Currently these include add, subtract, multiple and divide but in the future can be extended to support most math, logic and string manipulation related operations. + +Here's a small example: + +
+iters := 1000
+size := 1024
+ops := iters * size
+
+v1 := Vector clone setSize(size) rangeFill
+v2 := Vector clone setSize(size) rangeFill
+
+dt := Date secondsToRun(
+    iters repeat(v1 *= v2)
+)
+
+writeln((ops/(dt*1000000000)) asString(1, 3), " GFLOPS")
+
+ +Which when run on 2Ghz Mac Laptop, outputs: + +
+1.255 GFLOPS
+
+ +A similar bit of C code (without SIMD acceleration) outputs: + +
+0.479 GFLOPS
+
+ +So for this example, Io is about three times faster than plain C. + + + + + +




+ +
+

Unicode

+
+ +




+ +
+ + +
+ +

Sequences

+
+ + + + +In Io, symbols, strings, and vectors are unified into a single Sequence prototype which is an array of any available hardware data type such as: + +
+uint8, uint16, uint32, uint64
+int8, int16, int32, int64
+float32, float64
+
+ + +
+ +

Encodings

+
+ + + +Also, a Sequence has a encoding attribute, which can be: + +
+number, ascii, ucs2, ucs4, utf8
+
+ +UCS-2 and UCS-4 are the fixed character width versions of UTF-16 and UTF-32, respectively. A String is just a Sequence with a text encoding, a Symbol is an immutable String and a Vector is a Sequence with a number encoding. +

+UTF encodings are assumed to be big endian. +

+Except for input and output, all strings should be kept in a fixed character width encoding. This design allows for a simpler implementation, code sharing between vector and string ops, fast index-based access, and SIMD acceleration of Sequence operations. All Sequence methods will do automatic type conversions as needed. + + +

+ +

Source Code

+
+ + +Io source files are assumed to be in UTF8 (of which ASCII is a subset). When a source file is read, its symbols and strings are stored in Sequences in their minimal fixed character width encoding. Examples: + +
+Io> "hello" encoding
+==> ascii
+
+Io> "π" encoding
+==> ucs2
+
+Io> "∞" encoding
+==> ucs2
+
+ + + +We can also inspect the internal representation: + +
+Io> "π" itemType
+==> uint16
+
+Io> "π" itemSize
+==> 2
+
+ +
+ +

Conversion

+
+ + + +The Sequence object has a number of conversion methods: + +
+asUTF8
+asUCS2
+asUCS4
+
+ + + + + + +




+ +
+

Embedding

+
+ +




+ + +
+ + +
+ +

Conventions

+
+ + + +Io's C code is written using object oriented style conventions where structures are treated as objects and functions as methods. Familiarity with these may help make the embedding APIs easier to understand. + +

Structures

+ +Member names are words that begin with a lower case character with successive words each having their first character upper cased. Acronyms are capitalized. Structure names are words with their first character capitalized. + +Example: + +
+typdef struct 
+{
+    char *firstName;
+    char *lastName;
+    char *address;
+} Person;
+
+ +

Functions

+ +Function names begin with the name of structure they operate on followed by an underscore and the method name. Each structure has a new and free function. +

+ +Example: + +

+List *List_new(void);
+void List_free(List *self);
+
+ +All methods (except new) have the structure (the "object") as the first argument the variable is named "self". Method names are in keyword format. That is, for each argument, the method name has a description followed by an underscore. The casing of the descriptions follow that of structure member names. +

+Examples: + +

+int List_count(List *self); // no argument 
+void List_add_(List *self, void *item); // one argument
+void Dictionary_key_value_(Dictionary *self, 
+	char *key, char *value); 
+
+ +

File Names

+ +Each structure has its own separate .h and .c files. The names of the files are the same as the name of the structure. These files contain all the functions(methods) that operate on the given structure. + + +
+ +
+ + +

IoState

+
+ + + + +An IoState can be thought of as an instance of an Io "virtual machine", although "virtual machine" is a less appropriate term because it implies a particular type of implementation. + +

Multiple states

+ +Io is multi-state, meaning that it is designed to support multiple state instances within the same process. These instances are isolated and share no memory so they can be safely accessed simultaneously by different os threads, though a given state should only be accessed by one os thread at a time. + +

Creating a state

+Here's a simple example of creating a state, evaluating a string in it, and freeing the state: + +
+#include "IoState.h"
+
+int main(int argc, const char *argv[])
+{
+    IoState *self = IoState_new();
+    IoState_init(self);
+    IoState_doCString_(self, "writeln(\"hello world!\"");
+    IoState_free(self);
+    return 0;
+}
+
+ + +
+ +

Values

+
+ + + +We can also get return values and look at their types and print them: + +
+IoObject *v = IoState_doCString_(self, someString);
+char *name = IoObject_name(v);
+printf("return type is a ‘%s', name);
+IoObject_print(v);
+
+ +

Checking value types

+ +There are some macro short cuts to help with quick type checks: + +
+if (ISNUMBER(v))
+{
+    printf("result is the number %f", IoNumber_asFloat(v));
+} 
+else if(ISSEQ(v))
+{
+    printf("result is the string %s", IoSeq_asCString(v));
+}
+else if(ISLIST(v))
+{
+    printf("result is a list with %i elements", 
+		IoList_rawSize(v));
+}
+
+ +Note that return values are always proper Io objects (as all values are objects in Io). You can find the C level methods (functions like IoList_rawSize()) for these objects in the header files in the folder Io/libs/iovm/source. + + + + +




+ +
+

Bindings

+
+ +




+ + +
+ +Documentation on how to write bindings/addons forthcoming.. + +
+ + +




+ +
+

Appendix

+
+ +




+ +
+ + +
+ +

Grammar

+
+ + + +

messages

+
+expression ::= { message | sctpad }
+message ::= [wcpad] symbol [scpad] [arguments]
+arguments ::= Open [argument [ { Comma argument } ]] Close
+argument ::= [wcpad] expression [wcpad]
+
+ +

symbols

+ +
+symbol ::= Identifier | number | Operator | quote
+Identifier ::= { letter | digit | "_" }
+Operator ::= { ":" | "." | "'" | "~" | "!" | "@" | "$" | 
+"%" | "^" | "&" | "*" | "-" | "+" | "/" | "=" | "{" | "}" | 
+"[" | "]" | "|" | "\" | "<" | ">" | "?" }
+
+ +

quotes

+
+quote ::= MonoQuote | TriQuote
+MonoQuote ::= """ [ "\"" | not(""")] """
+TriQuote ::= """"" [ not(""""")] """""
+
+ +

spans

+
+Terminator ::= { [separator] ";" | "\n" | "\r" [separator] }
+separator ::= { " " | "\f" | "\t" | "\v" }
+whitespace ::= { " " | "\f" | "\r" | "\t" | "\v" | "\n" }
+sctpad ::= { separator | Comment | Terminator }
+scpad ::= { separator | Comment }
+wcpad ::= { whitespace | Comment }
+
+ +

comments

+
+Comment ::= slashStarComment | slashSlashComment | poundComment
+slashStarComment ::= "/*" [not("*/")] "*/"
+slashSlashComment ::= "//" [not("\n")] "\n"
+poundComment ::= "#" [not("\n")] "\n"
+
+ +

numbers

+
+number ::= HexNumber | Decimal
+HexNumber ::= "0" anyCase("x") { [ digit | hexLetter ] }
+hexLetter ::= "a" | "b" | "c" | "d" | "e" | "f"
+Decimal ::= digits | "." digits | 
+	digits "." digits ["e" [-] digits]
+
+ +

characters

+
+Comma ::= ","
+Open ::= "(" | "[" | "{"
+Close ::= ")" | "]" | "}"
+letter ::= "a" ... "z" | "A" ... "Z"
+digit ::= "0" ... "9"
+digits ::= { digit }
+
+ +The uppercase words above designate elements the lexer treats as tokens. + + +
+ +
+ + +

Credits

+
+ + +Io is the product of all the talented folks who taken the time and interest to make a contribution. The complete list of contributors is difficult to keep track of, but some of the recent major contributors include; Jonathan Wright, Jeremy Tregunna, Mike Austin, Chris Double, Rich Collins, Oliver Ansaldi, James Burgess, Baptist Heyman, Ken Kerahone, Christian Thater, Brian Mitchell, Zachary Bir and many more. The mailing list archives, repo inventory and release history are probably the best sources for a more complete record of individual contributions. + + +
+ +

References

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+1 + +Goldberg, A et al.
+Smalltalk-80: The Language and Its Implementation
+Addison-Wesley, 1983
+
+2 + +Ungar, D and Smith,
+RB. Self: The Power of Simplicity
+OOPSLA, 1987
+
+3 + +Smith, W.
+Class-based NewtonScript Programming
+PIE Developers magazine, Jan 1994
+
+4 + +Lieberman
+H. Concurrent Object-Oriented Programming in Act 1
+MIT AI Lab, 1987
+
+5 + +McCarthy, J et al.
+LISP I programmer's manual
+MIT Press, 1960
+
+6 + +Ierusalimschy, R, et al.
+Lua: an extensible extension language
+John Wiley & Sons, 1996
+
+ + +
+ +

License

+
+ + + +Copyright 2006-2010 Steve Dekorte. All rights reserved. +

+Redistribution and use of this document with or without modification, are permitted provided that the copies reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +

+This documentation is provided "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the authors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this documentation, even if advised of the possibility of such damage. + + +




+ +

+ + + + diff --git a/io-master/docs/IoTutorial.html b/io-master/docs/IoTutorial.html new file mode 100755 index 0000000..c92c243 --- /dev/null +++ b/io-master/docs/IoTutorial.html @@ -0,0 +1,239 @@ + + + + +Io Tutorial + + + + + +

Io Tutorial

+

+
+ + + + + + + + + + + + + + + + + + + +

Math

+
+ + +
+Io> 1+1
+==> 2
+
+Io> 2 sin
+==> 0.909297
+
+Io> 2 sqrt
+==> 1.414214
+
+ +

Variables

+
+ + +
+Io> a := 1
+==> 1
+
+Io> a
+==> 1
+
+Io> b := 2 * 3
+==> 6
+
+Io> a + b
+==> 7
+
+ +

Conditions

+
+ +
+Io> a := 2
+
+Io> if(a == 1) then(writeln("a is one")) else(writeln("a is not one"))
+a is not one
+
+Io> if(a == 1, writeln("a is one"), writeln("a is not one"))
+a is not one
+
+ + +

Lists

+
+ +
+Io> d := List clone append(30, 10, 5, 20)    
+==> list(30, 10, 5, 20)   
+
+Io> d size
+==> 4
+
+Io> d print
+==> list(30, 10, 5, 20)
+
+Io> d := d sort
+==> list(5, 10, 20, 30)
+
+Io> d first
+==> 5
+
+Io> d last
+==> 30
+
+Io> d at(2)
+==> 20
+
+Io> d remove(30)
+==> list(5, 10, 20)
+
+Io> d atPut(1, 123)
+==> list(5, 123, 20)
+
+Io> list(30, 10, 5, 20) select(>10)
+==> list(30, 20)
+
+Io> list(30, 10, 5, 20) detect(>10)
+==> 30
+
+Io> list(30, 10, 5, 20) map(*2)
+==> list(60, 20, 10, 40)
+
+Io> list(30, 10, 5, 20) map(v, v*2)
+==> list(60, 20, 10, 40)
+
+ +

Loops

+
+ +
+Io> for(i, 1, 10, write(i, " "))
+1 2 3 4 5 6 7 8 9 10 
+
+Io> d foreach(i, v, writeln(i, ": ", v))
+0: 5
+1: 123
+2: 20
+
+Io> list("abc", "def", "ghi") foreach(println)
+abc
+def
+ghi
+
+ + +

Strings

+
+ +
+Io> a := "foo"
+==> "foo"
+
+Io> b := "bar"
+==> "bar"
+
+Io> c := a .. b
+==> "foobar"
+
+Io> c at(0)
+==> 102
+
+Io> c at(0) asCharacter
+==> "f"
+
+Io> s := "this is a test"
+==> "this is a test"
+
+Io> words := s split(" ", "\t") print
+"this", "is", "a", "test"
+
+Io> s findSeq("is")
+==> 2
+
+Io> s findSeq("test")
+==> 10
+
+Io> s exSlice(10)
+==> "test"
+
+Io> s exSlice(2, 10)
+==> "is is a "
+
+
+

More

+ +      Quag's Getting Started Tutorial + +
+ +
+
+
+
+
+
diff --git a/io-master/docs/docs.css b/io-master/docs/docs.css new file mode 100755 index 0000000..6dd1109 --- /dev/null +++ b/io-master/docs/docs.css @@ -0,0 +1,336 @@ +html { + background: #fff; + color: #000; + font-family: 'Helvetica Neue', 'Helvetica', Arial, sans-serif; + padding: 0em; + margin: 0em; +} + +a { + color: #777; + text-decoration: none; +} + +a:active { + outline: 0; +} + +body { + font-family: 'Helvetica Neue', 'Helvetica', sans-serif; + margin: 8px 8px 8px 4em; + font-size:13px; +} + +ul { + padding: 0em 0em 0em 3.1em; +} + +hr { + height:0em; +} + +.Version { + color: #bbb; + text-align: left; +} + +.indent { + margin-left: 0em; +} + +h1 { + color: #000; + font-family: 'Helvetica-Bold', 'Helvetica'; + font-size: 3em; + font-style: normal; + font-variant: normal; + font-weight: bold; + letter-spacing: 0; + line-height: 1.3; + margin: 1em 0 0.9em 9; + text-align: left; + text-decoration: none; + text-indent: 0.00em; + text-transform: none; + vertical-align: 0; + vertical-align: text-top; +} + +h2 { + page-break-before: always; + color: #000; + font-family: 'Helvetica', 'Helvetica'; + font-size: 2em; + font-style: normal; + font-variant: normal; + font-weight: bold; + letter-spacing: 0; + line-height: 1.21; + margin: 2em 0 1em 0; + padding: 0; + text-decoration: none; + text-indent: 0sem; + text-transform: none; + vertical-align:text-top; +} + +h3 { + color: #000; + font-family: 'Helvetica-Bold', 'Helvetica'; + font-size: 1em; + font-style: normal; + font-variant: normal; + font-weight: bold; + letter-spacing: 0; + margin-left: 0em; + margin-right: 0em; + text-decoration: none; + text-indent: 0.00em; + text-transform: none; + vertical-align:text-top; +} + +h4 { + color: #000; + font-family: 'Helvetica-Bold', 'Helvetica'; + font-size: 1em; + font-style: bold; + font-variant: normal; + font-weight: bold; + letter-spacing: 0; + line-height: 1.18em; + margin: 1.5em 0 0.7em 0; + text-align: left; + text-decoration: none; + text-indent: 0.00em; + text-transform: none; + vertical-align: text-top; +} + +td +{ + vertical-align: text-top; +} + +.indexSection +{ + line-height: 1.5em; + margin-top:1em; +} + +.indexSection a +{ + font-weight: bold; + color: black; +} + +.indexItem +{ + letter-spacing: 0; + line-height: 1.5em; + margin-top: 0em; + margin-bottom: 0em; + margin-left: 0em; + margin-right: 0em; + text-align: left; + text-indent: 0.00em; + text-transform: none; + vertical-align: 0; +} + +.indexItemSelected a +{ + letter-spacing: 0; + line-height: 1.4em; + margin: 0; + text-align: left; + text-indent: 0; + text-transform: none; + vertical-align: 0; + color: black; + font-weight: bold; +} + +.indexItem a +{ + color: #777; + font-family: 'Helvetica'; + font-size: 1em; + font-style: normal; + font-variant: normal; + font-weight: normal; + letter-spacing: 0; + line-height: 1.4em; + text-decoration: none; +} + +.sectionDivider +{ + padding-top:1.5em; +} + +pre +{ + white-space: pre; + color: #333; + font-family: 'Inconsolata', 'Courier', monspace; + font-size: .95em; + font-style: normal; + font-variant: normal; + font-weight: normal; + letter-spacing: 0; + line-height: 1.22; + + margin: 1.5em 0 1.5em 2em; + + text-align: left; + text-decoration: none; + text-indent: 0em; + text-transform: none; + vertical-align: 0em; +} + +.infoTable +{ + margin-left:1.5em; + margin-top:2em; + margin-bottom:2em; +} + +.infoTable td +{ + font-weight:normal; + font-style:normal; + padding-right:1em; +} + +.infoTable th +{ + text-align: left; + font-weight:bold; + font-style:normal; + padding-right:1em; +} + +code { + font-family: 'Inconsolata', 'Courier', monospace; +} + +.quote { + color: #777; + font-family: 'Helvetica'; + font-size: 1em; + font-style: italic; + font-variant: normal; + font-weight: normal; + letter-spacing: 0; + line-height: 1.22; + + margin: 1.5em 0; + + text-align: left; + text-decoration: none; + text-indent: 0em; + text-transform: none; + vertical-align: 0em; +} + +.error { + color: red; +} + +.protoDescription { + margin: 1em 0 2.5em 0; +} + +.slots { + margin: 4em 0 0 0; +} + +.slotDescription { + margin: 1em 0 3em 2em; +} + +#search { + position: fixed; + right: 4em; +} + +#searchResults { + position: fixed; + right: 4em; + list-style: none; + min-width: 200px; + padding: 2px; + margin: 20px -6px 0 0; + text-indent: 0; + z-index: 2; + background: rgba(0, 0, 0, 0.9); + -webkit-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6); + -moz-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6); +} + +#searchResults li a { + display: block; + padding: 2px; + color: #fff; +} + +#searchResults span { + display: inline-block; + min-width: 8.5em; +} + +#browser { + border: 0; + margin-left: 0; + line-height: 1.2em; +} + +#browser td.column { + text-align: left; + width: 12em; +} + +#slots { + width: auto !important; +} + +#slots a:active { + font-weight: bold; + color: #000; +} + +#protoDescription, #protoSlots { + margin: 0 0 0 8em; + line-height: 1.2em; + width: 40em; +} + +#protoDescription { + margin-top: 6em; + padding-bottom: 1em; + border-bottom: 1px solid #ddd; +} + +#protoSlots { + margin-top: 3em; +} + +span.args { + font-weight: normal !important; +} + +span.optionalArgs { + font-style: italic; +} + +@page { + size: 8in 11in; + margin: 100mm 100mm 100mm 100mm; +} + +div.pagebreak +{ + page-break-before: always; +} \ No newline at end of file diff --git a/io-master/docs/js/browser.js b/io-master/docs/js/browser.js new file mode 100755 index 0000000..44462cd --- /dev/null +++ b/io-master/docs/js/browser.js @@ -0,0 +1,383 @@ +String.prototype.interpolate = function (obj) { + if(!obj) + return this; + + return this.replace(/#{(\w+)}/g, function (match, key) { + return obj[key] || ""; + }); +}; + +var DocsBrowser = { + currentCategory: null, + currentAddon: null, + currentProto: null, + currentSlot: null, + collapsed: false, + + init: function () { + this.loadDocs(); + }, + loadDocs: function () { + var self = this; + $.getJSON("docs.json", function (docs) { + if(!docs) + return false; + + self.docs = docs; + self.createIndex(); + self.attachEvents(); + self.listCategories(); + }); + }, + _pathsIndex: [], + _protosIndex: {}, + createIndex: function () { + for(var category in this.docs) + for(var addon in this.docs[category]) + for(var proto in this.docs[category][addon]) { + this._protosIndex[proto] = [category, addon, proto]; + for(var slot in this.docs[category][addon][proto].slots) + this._pathsIndex.push([category, addon, proto, slot]); + } + }, + monitorHash: function () { + var self = DocsBrowser; + + if(self._last_hash === window.location.hash) + return; + + var hash = window.location.hash.split("/").slice(1); + if(hash.length == 0) + return; + + if(self.currentCategory !== hash[0]) + self.listAddons(hash[0]); + if(hash.length >= 1 && self.currentAddon !== hash[1]) + self.listProtos(hash[1]); + if(hash.length > 2 && self.currentProto !== hash[2]) + self.listSlots(hash[2]); + if(hash.length > 3) + self.showSlot(hash[3]); + + self._last_hash = window.location.hash; + }, + attachEvents: function () { + var self = this; + + $("h1") + .before('

') + .before(''); + $("body") + .append('

') + .append('
'); + $("#categories").parent() + .append('') + .append('') + .append(''); + + setInterval(this.monitorHash, 200); + + $("#searchResults").click(function () { + $(this).empty().hide(); + $("#search")[0].value = ""; + }); + + $("#search").keyup(function (e) { + // Enter key + if(e.keyCode === 13) { + var link = $("#searchResults a:first").attr("href"); + if(link) { + window.location.hash = link; + $("#searchResults").click(); + this.value = ""; + } + } else if(this.value.length) { + self.search(this.value); + } else { + $("#searchResults").empty().hide(); + } + }); + + $(window).keyup(function (e) { + if(e.target.nodeName.toLowerCase() === "html" + && String.fromCharCode(e.keyCode).toLowerCase() === "f") + $("#search")[0].focus(); + }); + }, + + listCategories: function () { + var $categories = $("#categories"); + this.appendItemsToList($categories, this.docs, "linkToCategory"); + $("#categories-column").prepend($categories); + }, + listAddons: function (category) { + var $addons = $("#addons"), + addons = this.docs[category]; + this.currentCategory = category; + this.curentAddon = null; + this.currentProto = null; + this.currentSlot = null; + this.highlightMenuItem(category + "_category"); + + this.appendItemsToList($addons, addons, "linkToAddon"); + $("#protos").empty(); + $("#slots").empty(); + $("#protoDescription").empty(); + $("#protoSlots").empty(); + $addons.insertAfter("#categories"); + + if(addons[category] && window.location.hash.split("/").length == 2) { + window.location = window.location + "/" + category; + this.listProtos(category); + } + }, + listProtos: function (addon) { + if(!addon) + return false; + + var $protos = $("#protos"), + protos = this.docs[this.currentCategory][addon]; + this.currentAddon = addon; + this.highlightMenuItem(addon + "_addon"); + + this.appendItemsToList($protos, protos, "linkToProto"); + $("#slots").empty(); + $("#protoDescription").empty(); + $("#protoSlots").empty(); + $protos.insertAfter("#addons"); + + if(protos[addon] && window.location.hash.split("/").length == 3) { + window.location = window.location + "/" + addon; + this.listSlots(addon); + } + }, + listSlots: function (proto) { + var $slots = $("#slots"), + $descriptions = $("#protoSlots"), + _proto = this.docs[this.currentCategory][this.currentAddon][proto], + slots = _proto.slots, + description = _proto.description, + html_description = "#{title}

#{body}

"; + this.currentProto = proto; + this.highlightMenuItem(proto + "_proto"); + + var keys = [], n = 0; + for(var slot in slots) + keys.push(slot); + + keys = keys.sort().reverse(); + n = keys.length; + $slots.detach().empty(); + $descriptions.detach().empty(); + + while(n--) { + var slot = keys[n]; + $slots.append(this.linkToSlot(slot)); + $descriptions.append(html_description.interpolate({ + aName: this.aNameForHash(slot), + title: this.parseSlotName(slot), + body: this.parseSlotDescription(slots[slot]) + })); + } + + $("#protoDescription").html(this.parseSlotDescription(description) || ""); + + $slots.insertAfter("#protos"); + $descriptions.appendTo("body"); + }, + showSlot: function (slot) { + // Some nice scrolling effect? + //$("a[name=" + window.location.hash.slice(1) + "]").next(); + }, + + _searchCache: {}, + search: function (term) { + if(this._searchCache[term]) + return this.displaySearch(term, this._searchCache[term]); + + var results = [], + mode = this.getSearchMode(term); + + switch(mode) { + case "currentProto": + var scope = this.docs[this.currentCategory][this.currentAddon][this.currentProto].slots, + _term = $.trim(term); + + for(var slot in scope) + if(slot.indexOf(_term) !== -1) + results.push([this.currentCategory, this.currentAddon, this.currentProto, slot]); + break; + + case "givenProto": + var __term = term.split(" "), + _term = $.trim(__term[1]), + ca = this.getPathToProto(__term[0]); + if(!ca) + break; + + var scope = this.docs[ca[0]][ca[1]][__term[0]].slots; + for(var slot in scope) + if(slot.indexOf(_term) !== -1) + results.push([ca[0], ca[1], __term[0], slot]); + break; + + case "searchProto": + var index = this._protosIndex; + for(var proto in index) + if(proto.indexOf(term) !== -1) + results.push(index[proto]); + + break; + + case "allProtos": + var index = this._pathsIndex, n = index.length; + while(n--) + if(index[n][3].indexOf(term) !== -1) + results.push(index[n]); + break; + + case "none": + default: + return false; + } + + this._searchCache[term] = results; + this.displaySearch(term, results); + }, + getSearchMode: function (term) { + var firstChar = term[0]; + + if(term.length < 2) + return "none"; + else if(firstChar === " ") + return "currentProto"; + else if(firstChar == firstChar.toUpperCase()) + if(term.indexOf(" ") == -1) + return "searchProto"; + else + return "givenProto"; + else + return "allProtos"; + + return none; + }, + getPathToProto: function (proto) { + return this._protosIndex[proto] || false; + }, + displaySearch: function (term, results) { + var $results = $("#searchResults"), + _term = $.trim(term), + mode = this.getSearchMode(term), + n = results.length; + + if(!n) { + $results.empty().hide(); + return false; + } + + if(mode === "givenProto") + _term = _term.split(" ")[1]; + + $results.detach().empty(); + while(n--) { + var result = results[n], + slot = (result[3] || result[2]).replace(_term, "" + _term + ""), + data = { + link: "#/" + result.join("/").split("(")[0], + slot: slot, + proto: result[2] + }; + + if(mode === "searchProto") + data.proto = result.slice(0, -1).join(" "); + + data.proto = "" + data.proto.split(" ").join("") + ""; + $results.prepend("
  • #{proto} #{slot}
  • ".interpolate(data)); + } + + $results.show().insertBefore("h1"); +// $results.show().css("top", $("#search").offset().top).appendTo("body"); + }, + + createMenuLink: function (text, type, link) { + arguments[2] = link.split("(")[0]; + return ''.interpolate(arguments); + }, + linkToCategory: function (category) { + return this.createMenuLink(category, "category", category); + }, + linkToAddon: function (addon) { + return this.createMenuLink(addon, "addon", [this.currentCategory, addon].join("/")); + }, + linkToProto: function (proto) { + return this.createMenuLink(proto, "proto", [this.currentCategory, this.currentAddon, proto].join("/")); + }, + linkToSlot: function (slot) { + var url = this.aNameForHash(slot), + text = this.parseSlotName(slot); + return ''.interpolate([slot, url, text]); + }, + highlightMenuItem: function (id) { + var $link = $(document.getElementById(id)); + $link.parent().find(".indexItemSelected").removeClass("indexItemSelected").addClass("indexItem"); + $link.addClass("indexItemSelected").removeClass("indexItem"); + }, + /* + collapseMenu: function () { + this.collapsed = true; + $("#browser ol .indexItem").fadeOut("fast"); + }, + showMenu: function () { + this.collapsed = false; + $("#browser ol .indexItem").fadeIn("fast"); + }, */ + parseSlotName: function (slot) { + return slot + .replace(/\<(.+)\>/, "<$1>") + .replace(/\((.*)\)/, "($1)") + .replace(/\[(.+)\]/, "$1") + .replace(/(\.{3})/, ""); + }, + parseSlotDescription: function (body) { + var self = this; + return body.replace(/\[\[(\w+) (\w+)\]\]/g, function (line, proto, slot) { + var link = self.getPathToProto(proto); + if(!link) + return '#{1} #{2}'.interpolate(arguments); + + link.push(proto, slot); + return '#{1} #{2}'.interpolate([self.pathToHash(link), proto, slot]); + }).replace(/\[\[(\w+)\]\]/g, function (line, proto) { + var link = self.getPathToProto(proto); + if(!link) + return '' + proto + ''; + + return '#{1}'.interpolate([self.pathToHash(link), proto]); + }); + }, + pathToHash: function (path) { + return "#/" + path.join("/"); + }, + aNameForHash: function (slot) { + slot = slot ? "/" + slot.split("(")[0] : ""; + return window.location.hash.split("(")[0].split("/").slice(1, 4).join("/") + slot; + }, + appendItemsToList: function($list, items, linkToFn) { + $list.detach().empty(); + var keys = [], + makeLink = this[linkToFn], + n; + + for(var item in items) + keys.push(item); + + n = keys.length; + keys = keys.sort().reverse(); + while(n--) + $list.append(this[linkToFn](keys[n])); + + return $list; + } +}; + +$(function() { DocsBrowser.init(); }) diff --git a/io-master/docs/js/jquery.js b/io-master/docs/js/jquery.js new file mode 100755 index 0000000..7c24308 --- /dev/null +++ b/io-master/docs/js/jquery.js @@ -0,0 +1,154 @@ +/*! + * jQuery JavaScript Library v1.4.2 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Sat Feb 13 22:33:48 2010 -0500 + */ +(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, +Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& +(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, +a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== +"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, +function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
    a"; +var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, +parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= +false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= +s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, +applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; +else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, +a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== +w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, +cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= +c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); +a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, +function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); +k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), +C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= +e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& +f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; +if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", +e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, +"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, +d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, +e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); +t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| +g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, +CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, +text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, +setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= +h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== +"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, +h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& +q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

    ";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); +(function(){var g=s.createElement("div");g.innerHTML="
    ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: +function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= +{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== +"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", +d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== +1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
    ","
    "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, +""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); +return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", +""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= +c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? +c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= +function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= +Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, +"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= +a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= +a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== +"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
    ").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, +serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), +function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, +global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& +e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? +"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== +false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= +false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", +c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| +d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); +g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== +1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== +"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; +if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== +"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| +c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; +this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= +this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, +e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
    "; +a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); +c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, +d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- +f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": +"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in +e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); diff --git a/io-master/docs/reference/Apple/AppleSensors/AppleSensors/index.html b/io-master/docs/reference/Apple/AppleSensors/AppleSensors/index.html new file mode 100755 index 0000000..de5524a --- /dev/null +++ b/io-master/docs/reference/Apple/AppleSensors/AppleSensors/index.html @@ -0,0 +1,152 @@ + + + + + AppleSensors + + + + + +
    +

    Io Reference

    +


    +


    +Apple +  /   +AppleSensors +  /   +AppleSensors +


    +


    + + + + + + + + + + + + + +
    A singleton which on Apple computers can: +
      +
    • get and set display and keyboard brightness +
    • read left and right ambient light sensors (laptops only) +
    • read accelerometer sensor (laptops only) +
    +Example use; +
    	
    +sensors = AppleSensors clone
    +value := sensors getRightLightSensor
    +
    +
     
     
     
    + +
    +

    + +getBatteryTemperature + +

    +

    +Returns a number for the Battery temperature sensor. +
    + +getCPUTemperature + +

    +

    +Returns a number for the CPU temperature sensor. +
    + +getDisplayBrightness + +

    +

    +Returns a number for the display brightness. +
    + +getGPUTemperature + +

    +

    +Returns a number for the GPU temperature sensor. +
    + +getKeyboardBrightness + +

    +

    +Returns a number for the keyboard brightness. +
    + +getLeftLightSensor + +

    +

    +Returns a number for the left ambient light sensor. +
    + +getPCHTemperature + +

    +

    +Returns a number for Intel's Platform Controller Hub temperature sensor. +
    + +getPalmTemperature + +

    +

    +Returns a number for the Palm Rest Area temperature sensor. +
    + +getPowerTemperature + +

    +

    +Returns a number for the Power board temperature sensor. +
    + +getRAMTemperature + +

    +

    +Returns a number for the RAM temperature sensor. +
    + +getRightLightSensor + +

    +

    +Returns a number for the right ambient light sensor. +
    + +setDisplayBrightness(aNumber) + +

    +

    +Sets the display brightness. Returns self. +
    + +setKeyboardBrightness(aNumber) + +

    +

    +Sets the keyboard brightness. Returns self. +
    + +smsVector(aVector) + +

    +

    +Sets aVector to the current x, y and z accelerometer values. + Returns true on success and false on failure. +
    +
    +




    + + diff --git a/io-master/docs/reference/Apple/AppleSensors/index.html b/io-master/docs/reference/Apple/AppleSensors/index.html new file mode 100755 index 0000000..a048cb4 --- /dev/null +++ b/io-master/docs/reference/Apple/AppleSensors/index.html @@ -0,0 +1,48 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Apple/index.html b/io-master/docs/reference/Apple/index.html new file mode 100755 index 0000000..bee1e43 --- /dev/null +++ b/io-master/docs/reference/Apple/index.html @@ -0,0 +1,44 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Audio/LibSndFile/LibSndFile/index.html b/io-master/docs/reference/Audio/LibSndFile/LibSndFile/index.html new file mode 100755 index 0000000..7576029 --- /dev/null +++ b/io-master/docs/reference/Audio/LibSndFile/LibSndFile/index.html @@ -0,0 +1,157 @@ + + + + + LibSndFile + + + + + +
    +

    Io Reference

    +


    +


    +Audio +  /   +LibSndFile +  /   +LibSndFile +


    +


    + + + + + + + + + + + + + +
    An object for encoding and decoding audio files (principally WAV and AIFF) using the +Libsndfile library. +
     
     
     
    + +
    +

    + +channels + +

    +

    +Returns channels read from the audio file. +
    + +close + +

    +

    +Closes the file if it is open. + Returns self. +
    + +format + +

    +

    +Returns format read from the audio file. +
    + +formatNames + +

    +

    +Returns a list of strings with the names of the supported codecs. +
    + +openForReading + +

    +

    +Opens the file at the path specified in the path slot and sets the following slots: +
    +frames
    +sampleRate
    +channels
    +format
    +seekable
    +
    +Returns self. +
    + +openForWriting + +

    +

    +Opens the file at the path specified in the path slot for writing. The following slots should be set first to specify the output format: +
    +sampleRate
    +channels
    +format
    +
    +Returns self. +
    + +outputBuffer + +

    +

    +Returns the output buffer. +
    + +path + +

    +

    +Returns path to audio file. +
    + +read(numberOfFrames) + +

    +

    +Read a given number of frames (sample pairs). + Returns self. +
    + +sampleRate + +

    +

    +Returns sample rate read from the audio file. +
    + +setFormat(aSeq) + +

    +

    +Sets the format used for writing. Use the formatNames method to get a list of supported format names. Returns self. +
    + +setPath(aPath) + +

    +

    +Sets path to audio file. +
    + +write(aSeq) + +

    +

    +Writes aSeq using the format specified by the slots: +
    +sampleRate
    +channels
    +format
    +
    +Returns the number of frames written. +
    +
    +




    + + diff --git a/io-master/docs/reference/Audio/LibSndFile/Sound/index.html b/io-master/docs/reference/Audio/LibSndFile/Sound/index.html new file mode 100755 index 0000000..900c627 --- /dev/null +++ b/io-master/docs/reference/Audio/LibSndFile/Sound/index.html @@ -0,0 +1,85 @@ + + + + + Sound + + + + + +
    +

    Io Reference

    +


    +


    +Audio +  /   +LibSndFile +  /   +Sound +


    +


    + + + + + + + + + + + + + +
    Encapsulates a audio file. Usefull for reading an audio file using LibSndFile. +
     
     
     
    + +
    +

    + +buffer + +

    +

    +Returns the buffer used to read the audio file. +
    + +format + +

    +

    +Returns format read from the audio file. +
    + +load + +

    +

    +Returns Loads the file data into the buffer in interleaved stereo 32bit float format and sets the sampleRate, channels and format slots. Returns self. +
    + +path + +

    +

    +Returns path to audio file. +
    + +sampleRate + +

    +

    +Returns number of channels read from the audio file. +
    + +setPath(aPath) + +

    +

    +Sets path to audio file. +
    +
    +




    + + diff --git a/io-master/docs/reference/Audio/LibSndFile/index.html b/io-master/docs/reference/Audio/LibSndFile/index.html new file mode 100755 index 0000000..86c75d6 --- /dev/null +++ b/io-master/docs/reference/Audio/LibSndFile/index.html @@ -0,0 +1,54 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Audio/Ogg/OggPacket/index.html b/io-master/docs/reference/Audio/Ogg/OggPacket/index.html new file mode 100755 index 0000000..1464049 --- /dev/null +++ b/io-master/docs/reference/Audio/Ogg/OggPacket/index.html @@ -0,0 +1,42 @@ + + + + + OggPacket + + + + + +
    +

    Io Reference

    +


    +


    +Audio +  /   +Ogg +  /   +OggPacket +


    +


    + + + + + + + + + + + + + +
    A wrapper around the libogg ogg_packet object. No methods - used internally. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Audio/Ogg/OggPage/index.html b/io-master/docs/reference/Audio/Ogg/OggPage/index.html new file mode 100755 index 0000000..54cafec --- /dev/null +++ b/io-master/docs/reference/Audio/Ogg/OggPage/index.html @@ -0,0 +1,108 @@ + + + + + OggPage + + + + + +
    +

    Io Reference

    +


    +


    +Audio +  /   +Ogg +  /   +OggPage +


    +


    + + + + + + + + + + + + + +
    A wrapper around the libogg ogg_page object. +
     
     
     
    + +
    +

    + +bos + +

    +

    +Indicates if the current page is the beginning of the stream. +
    + +continued + +

    +

    +Indicates if the current page contains a continued + packet from the last page. +
    + +eos + +

    +

    +Indicates if the current page is the end of the stream. +
    + +granulepos + +

    +

    +Returns the precise playback location of this page. +
    + +packets + +

    +

    +Returns the number of packets in the page. +
    + +pageno + +

    +

    +Returns the sequential page number for this page. +
    + +serialno + +

    +

    +Returns the unique serial number of the logical bitstream + associated with this page. +
    + +setChecksum + +

    +

    +Computes and sets the checksum for this page. +
    + +version + +

    +

    +Returns the ogg_page version that this page uses. +
    +
    +




    + + diff --git a/io-master/docs/reference/Audio/Ogg/OggStreamState/index.html b/io-master/docs/reference/Audio/Ogg/OggStreamState/index.html new file mode 100755 index 0000000..56fede3 --- /dev/null +++ b/io-master/docs/reference/Audio/Ogg/OggStreamState/index.html @@ -0,0 +1,93 @@ + + + + + OggStreamState + + + + + +
    +

    Io Reference

    +


    +


    +Audio +  /   +Ogg +  /   +OggStreamState +


    +


    + + + + + + + + + + + + + +
    A wrapper around the libogg ogg_stream_state object. +
     
     
     
    + +
    +

    + +clear + +

    +

    +Clears the storage within the Ogg stream. +
    + +eos + +

    +

    +Indicates whether we are at the end of the stream. +
    + +packetout(packet) + +

    +

    +Outputs a packet to the codec-specific decoding engine. +
    + +packetpeek(packet) + +

    +

    +Provides access to the next packet in the bitstream + without advancing decoding. +
    + +pagein(page) + +

    +

    +Submits a complete page to the stream layer. +
    + +reset + +

    +

    +Resets the stream status to its initial position. +
    + +setSerialNumber + +

    +

    +Sets the serial number for this stream. +
    +
    +




    + + diff --git a/io-master/docs/reference/Audio/Ogg/OggSyncState/index.html b/io-master/docs/reference/Audio/Ogg/OggSyncState/index.html new file mode 100755 index 0000000..c38dc02 --- /dev/null +++ b/io-master/docs/reference/Audio/Ogg/OggSyncState/index.html @@ -0,0 +1,79 @@ + + + + + OggSyncState + + + + + +
    +

    Io Reference

    +


    +


    +Audio +  /   +Ogg +  /   +OggSyncState +


    +


    + + + + + + + + + + + + + +
    A wrapper around the libogg ogg_sync_state object. +
     
     
     
    + +
    +

    + +clear + +

    +

    +Free's any internal storage and resets to the initial state. +
    + +pageout(page) + +

    +

    +Outputs a page from the synchronisation layer. +
    + +pageseek(page) + +

    +

    +Finds the borders of pages and resynchronises the stream. +
    + +reset + +

    +

    +Resets the synchronization status to initial values. +
    + +write(seq) + +

    +

    +Copies the data from the sequence into the synchronisation + layer. +
    +
    +




    + + diff --git a/io-master/docs/reference/Audio/Ogg/index.html b/io-master/docs/reference/Audio/Ogg/index.html new file mode 100755 index 0000000..e0bde49 --- /dev/null +++ b/io-master/docs/reference/Audio/Ogg/index.html @@ -0,0 +1,56 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Audio/PortAudio/AudioDevice/index.html b/io-master/docs/reference/Audio/PortAudio/AudioDevice/index.html new file mode 100755 index 0000000..1693f95 --- /dev/null +++ b/io-master/docs/reference/Audio/PortAudio/AudioDevice/index.html @@ -0,0 +1,121 @@ + + + + + AudioDevice + + + + + +
    +

    Io Reference

    +


    +


    +Audio +  /   +PortAudio +  /   +AudioDevice +


    +


    + + + + + + + + + + + + + +
    The AudioDevice object can used to write audio data as if directly to the audio buffer. +
     
     
     
    + +
    +

    + +asyncRead + +

    +

    +Returns the audio read buffer. +
    + +asyncWrite(aBuffer) + +

    +

    +Writes aBuffer to the audio output buffer and returns immediately. +
    + +close + +

    +

    +Close the audio stream. +
    + +error + +

    +

    +Returns an error string if an error has occurred, Nil otherwise. +
    + +isActive + +

    +

    +Returns self if the receiver is active, Nil otherwise. +
    + +needsData + +

    +

    +Returns true if the receiver can read more data. +
    + +open + +

    +

    +Open an audio output stream. +
    + +openForReadingAndWriting + +

    +

    +Open audio output and input streams. +
    + +streamTime + +

    +

    +Returns the audio stream time as a number. +
    + +write(aSeq) + +

    +

    +Writes aSeq to the inputBuffer and yields until the + receiver is ready for more input data. Returns self. +
    + +writeBufferIsEmpty + +

    +

    +Returns the true if the audio buffer is empty, false otherwise. +
    +
    +




    + + diff --git a/io-master/docs/reference/Audio/PortAudio/AudioMixer/index.html b/io-master/docs/reference/Audio/PortAudio/AudioMixer/index.html new file mode 100755 index 0000000..8742ba4 --- /dev/null +++ b/io-master/docs/reference/Audio/PortAudio/AudioMixer/index.html @@ -0,0 +1,101 @@ + + + + + AudioMixer + + + + + +
    +

    Io Reference

    +


    +


    +Audio +  /   +PortAudio +  /   +AudioMixer +


    +


    + + + + + + + + + + + + + +
    A minimal audio mixer. +
     
     
     
    + +
    +

    + +appendSource(aSource) + +

    +

    +Adds aSource to sources list. Returns self. +
    + +isRunning + +

    +

    +Returns true if the mixer is running, false otherwise.. +
    + +process(sampleCount) + +

    +

    +Internal method used for processing a chunk of the input sources. Returns self. +
    + +processedSamples + +

    +

    +Returns the number of processed samples. +
    + +removeSource(aSource) + +

    +

    +Removes aSource to sources list. Returns self. +
    + +start + +

    +

    +Start the mixer loop processing 1/64th of a second chunks + by calling process(22050) in a loop. + Will not return until stop is called. Returns self. +
    + +stop + +

    +

    +Stops the mixer if it is running. +
    + +streamDestination + +

    +

    +The output stream object. +
    +
    +




    + + diff --git a/io-master/docs/reference/Audio/PortAudio/index.html b/io-master/docs/reference/Audio/PortAudio/index.html new file mode 100755 index 0000000..96f7af9 --- /dev/null +++ b/io-master/docs/reference/Audio/PortAudio/index.html @@ -0,0 +1,54 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Audio/SampleRateConverter/SampleRateConverter/index.html b/io-master/docs/reference/Audio/SampleRateConverter/SampleRateConverter/index.html new file mode 100755 index 0000000..dec414f --- /dev/null +++ b/io-master/docs/reference/Audio/SampleRateConverter/SampleRateConverter/index.html @@ -0,0 +1,90 @@ + + + + + SampleRateConverter + + + + + +
    +

    Io Reference

    +


    +


    +Audio +  /   +SampleRateConverter +  /   +SampleRateConverter +


    +


    + + + + + + + + + + + + + +
    A binding for libsamplerate + useful for up or downconverting the sample rate of a raw audio stream. + Streams are assumed to be in 32bit float interleaved stereo. +
     
     
     
    + +
    +

    + +inputBuffer + +

    +

    +Returns the input buffer. +
    + +outputBuffer + +

    +

    +Returns the output buffer. +
    + +process + +

    +

    +Process the input buffer to perform the conversion. + Returns self. +
    + +setEndOFInput(aBool) + +

    +

    +Sets the end of input flag. + Returns self. +
    + +setOutputToInputRatio(aNumber) + +

    +

    +Returns the output to input ration for the conversion. +
    + +start + +

    +

    +Stops processing. + Returns self. +
    +
    +




    + + diff --git a/io-master/docs/reference/Audio/SampleRateConverter/index.html b/io-master/docs/reference/Audio/SampleRateConverter/index.html new file mode 100755 index 0000000..451142b --- /dev/null +++ b/io-master/docs/reference/Audio/SampleRateConverter/index.html @@ -0,0 +1,53 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Audio/SoundTouch/SoundTouch/index.html b/io-master/docs/reference/Audio/SoundTouch/SoundTouch/index.html new file mode 100755 index 0000000..d3aae52 --- /dev/null +++ b/io-master/docs/reference/Audio/SoundTouch/SoundTouch/index.html @@ -0,0 +1,108 @@ + + + + + SoundTouch + + + + + +
    +

    Io Reference

    +


    +


    +Audio +  /   +SoundTouch +  /   +SoundTouch +


    +


    + + + + + + + + + + + + + +
    Used to change the tempo and/or pitch of an audio stream. + Input and output are in 32 bit floats in 2 channels at a rate + of 44100 samples per second. +
     
     
     
    + +
    +

    + +inputBuffer + +

    +

    +Returns the input buffer. +
    + +outputBuffer + +

    +

    +Returns the output buffer. +
    + +process + +

    +

    +Processes a chunk of the inputBuffer and appends the results to the outputBuffer. +
    + +setChannels(aNumber) + +

    +

    +Sets the number of input channels. +
    + +setPitchSemitones(aNumber) + +

    +

    +Sets the output increase in pitch semitones. +
    + +setSampleRate(aNumber) + +

    +

    +Sets the input sample rate in Hz. +
    + +setTempo(aNumber) + +

    +

    +Sets the tempo. +
    + +setTempoChange(aNumber) + +

    +

    +Sets the tempo change amount. +
    + +start + +

    +

    +Cleans up SoundTouch. +
    +
    +




    + + diff --git a/io-master/docs/reference/Audio/SoundTouch/index.html b/io-master/docs/reference/Audio/SoundTouch/index.html new file mode 100755 index 0000000..cc98eb6 --- /dev/null +++ b/io-master/docs/reference/Audio/SoundTouch/index.html @@ -0,0 +1,53 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Audio/TagLib/TagLib/index.html b/io-master/docs/reference/Audio/TagLib/TagLib/index.html new file mode 100755 index 0000000..438e1fe --- /dev/null +++ b/io-master/docs/reference/Audio/TagLib/TagLib/index.html @@ -0,0 +1,103 @@ + + + + + TagLib + + + + + +
    +

    Io Reference

    +


    +


    +Audio +  /   +TagLib +  /   +TagLib +


    +


    + + + + + + + + + + + + + +
    Used to set meta data tags on the following audio formats: +
    +ape
    +flac
    +mp3
    +mpc
    +mpeg
    +ogg
    +
    +Supports reading and writing the following attributes: +
    title
    +artist
    +album
    +year
    +track
    +genre 
    +
    +And reading the attributes: +
    +bitRate
    +sampleRate
    +channels
    +length
    +
    + +Example use (load and modify a track genre): + +
    +t := TagLib clone setPath("foo.mp3") load
    +writeln("genre = ", t genre)
    +t setGenre("ambient")
    +t save
    +
    +
     
     
     
    + +
    +

    + +load + +

    +

    +Loads tag data from the file specified in the path slot. Returns self. +
    + +path + +

    +

    +Returns the path to the file. +
    + +save + +

    +

    +Saves the tag settings and returns self. +
    + +setPath(aSeq) + +

    +

    +Sets the path to the file. +
    +
    +




    + + diff --git a/io-master/docs/reference/Audio/TagLib/index.html b/io-master/docs/reference/Audio/TagLib/index.html new file mode 100755 index 0000000..4738833 --- /dev/null +++ b/io-master/docs/reference/Audio/TagLib/index.html @@ -0,0 +1,53 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Audio/index.html b/io-master/docs/reference/Audio/index.html new file mode 100755 index 0000000..de05842 --- /dev/null +++ b/io-master/docs/reference/Audio/index.html @@ -0,0 +1,49 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Bridges/CFFI/CFFI/index.html b/io-master/docs/reference/Bridges/CFFI/CFFI/index.html new file mode 100755 index 0000000..473b343 --- /dev/null +++ b/io-master/docs/reference/Bridges/CFFI/CFFI/index.html @@ -0,0 +1,37 @@ + + + + + CFFI + + + + + +
    +

    Io Reference

    +


    +


    +Bridges +  /   +CFFI +  /   +CFFI +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Bridges/CFFI/CFFIPointer/index.html b/io-master/docs/reference/Bridges/CFFI/CFFIPointer/index.html new file mode 100755 index 0000000..00f6910 --- /dev/null +++ b/io-master/docs/reference/Bridges/CFFI/CFFIPointer/index.html @@ -0,0 +1,42 @@ + + + + + CFFIPointer + + + + + +
    +

    Io Reference

    +


    +


    +Bridges +  /   +CFFI +  /   +CFFIPointer +


    +


    + + + + + + + + + + + + + +
    An Io interface to C +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Bridges/CFFI/index.html b/io-master/docs/reference/Bridges/CFFI/index.html new file mode 100755 index 0000000..51f5311 --- /dev/null +++ b/io-master/docs/reference/Bridges/CFFI/index.html @@ -0,0 +1,51 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Bridges/ObjcBridge/ObjcBridge/index.html b/io-master/docs/reference/Bridges/ObjcBridge/ObjcBridge/index.html new file mode 100755 index 0000000..6e67801 --- /dev/null +++ b/io-master/docs/reference/Bridges/ObjcBridge/ObjcBridge/index.html @@ -0,0 +1,66 @@ + + + + + ObjcBridge + + + + + +
    +

    Io Reference

    +


    +


    +Bridges +  /   +ObjcBridge +  /   +ObjcBridge +


    +


    + + + + + + + + + +
     
     
     
    + +
    +

    + +autoLookupClassNamesOn + +

    +

    +Removes the ObjC forward method from the Lobby. Returns self. +
    + +classNamed(aSeq) + +

    +

    +Returns a proxy to the ObjC class with the specified name or nil if no match is found. +
    + +debug + +

    +

    +On Turns debugging off. Returns self +
    + +main + +

    +

    +Calls NSApplicationMain(). +
    +
    +




    + + diff --git a/io-master/docs/reference/Bridges/ObjcBridge/index.html b/io-master/docs/reference/Bridges/ObjcBridge/index.html new file mode 100755 index 0000000..c1c13ef --- /dev/null +++ b/io-master/docs/reference/Bridges/ObjcBridge/index.html @@ -0,0 +1,50 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Bridges/Python/Python/index.html b/io-master/docs/reference/Bridges/Python/Python/index.html new file mode 100755 index 0000000..1ee3399 --- /dev/null +++ b/io-master/docs/reference/Bridges/Python/Python/index.html @@ -0,0 +1,42 @@ + + + + + Python + + + + + +
    +

    Io Reference

    +


    +


    +Bridges +  /   +Python +  /   +Python +


    +


    + + + + + + + + + + + + + +
    This object provides access the world of python. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Bridges/Python/index.html b/io-master/docs/reference/Bridges/Python/index.html new file mode 100755 index 0000000..84b69c0 --- /dev/null +++ b/io-master/docs/reference/Bridges/Python/index.html @@ -0,0 +1,50 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Bridges/index.html b/io-master/docs/reference/Bridges/index.html new file mode 100755 index 0000000..eb33c89 --- /dev/null +++ b/io-master/docs/reference/Bridges/index.html @@ -0,0 +1,46 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Compilers/Loki/Linker/index.html b/io-master/docs/reference/Compilers/Loki/Linker/index.html new file mode 100755 index 0000000..c1a3e72 --- /dev/null +++ b/io-master/docs/reference/Compilers/Loki/Linker/index.html @@ -0,0 +1,65 @@ + + + + + Linker + + + + + +
    +

    Io Reference

    +


    +


    +Compilers +  /   +Loki +  /   +Linker +


    +


    + + + + + + + + + + + + + +
    An object that enables low level introspection into a running Io VM. +
     
     
     
    + +
    +

    + +bytesToHexSeq(aSeq) + +

    +

    +Returns a Sequence containing a hex representation of aSeq. +
    + +hexSeqToBytes(aSeq) + +

    +

    +Returns a Sequence containing a binary representation of the hex data in aSeq. +
    + +makeCFunction(aSeq, slotName, object) + +

    +

    +Creates a CFunction which users the beginning address of the data in aSeq as its function pointer and +adds the CFunction to the given object on slot slotName. +
    +
    +




    + + diff --git a/io-master/docs/reference/Compilers/Loki/index.html b/io-master/docs/reference/Compilers/Loki/index.html new file mode 100755 index 0000000..3275c0d --- /dev/null +++ b/io-master/docs/reference/Compilers/Loki/index.html @@ -0,0 +1,48 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Compilers/index.html b/io-master/docs/reference/Compilers/index.html new file mode 100755 index 0000000..c9f00b4 --- /dev/null +++ b/io-master/docs/reference/Compilers/index.html @@ -0,0 +1,44 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Compression/LZO/LZO/index.html b/io-master/docs/reference/Compression/LZO/LZO/index.html new file mode 100755 index 0000000..ed235e6 --- /dev/null +++ b/io-master/docs/reference/Compression/LZO/LZO/index.html @@ -0,0 +1,65 @@ + + + + + LZO + + + + + +
    +

    Io Reference

    +


    +


    +Compression +  /   +LZO +  /   +LZO +


    +


    + + + + + + + + + + + + + +
    The LZO object can be used to compress and uncompress data using the + Lempel-Ziv-Oberhumer (LZO) +lossless data compression algorithm. +

    +Example use; +

    +compressedData := LZO compress(uncompressedData)
    +uncompressedData := LZO uncompress(compressedData)
    +
    +
     
     
     
    + +
    +

    + +compress(aSeq) + +

    +

    +Returns a compressed version of aSeq. +
    + +uncompress(aSeq) + +

    +

    +Returns a uncompressed version of aSeq. +
    +
    +




    + + diff --git a/io-master/docs/reference/Compression/LZO/LZODecoder/index.html b/io-master/docs/reference/Compression/LZO/LZODecoder/index.html new file mode 100755 index 0000000..c143903 --- /dev/null +++ b/io-master/docs/reference/Compression/LZO/LZODecoder/index.html @@ -0,0 +1,78 @@ + + + + + LZODecoder + + + + + +
    +

    Io Reference

    +


    +


    +Compression +  /   +LZO +  /   +LZODecoder +


    +


    + + + + + + + + + + + + + +
    The LZO object can be used to uncompress data using the + Lempel-Ziv-Oberhumer (LZO) +lossless data compression algorithm. +

    +Example use; +

    	
    +z = LZODecoder clone
    +z beginProcessing
    +z inputBuffer appendSeq("this is a message")
    +z process
    +z endProcess
    +result := z outputBuffer 
    +
    +
     
     
     
    + +
    +

    + +beginProcessing + +

    +

    +Initializes the algorithm. +
    + +endProcessing + +

    +

    +Finish processing remaining bytes of inputBuffer. +
    + +process + +

    +

    +Process the inputBuffer and appends the result to the outputBuffer. + The processed inputBuffer is emptied except for the spare bytes at + the end which don't fit into a cipher block. +
    +
    +




    + + diff --git a/io-master/docs/reference/Compression/LZO/LZOEncoder/index.html b/io-master/docs/reference/Compression/LZO/LZOEncoder/index.html new file mode 100755 index 0000000..99de753 --- /dev/null +++ b/io-master/docs/reference/Compression/LZO/LZOEncoder/index.html @@ -0,0 +1,78 @@ + + + + + LZOEncoder + + + + + +
    +

    Io Reference

    +


    +


    +Compression +  /   +LZO +  /   +LZOEncoder +


    +


    + + + + + + + + + + + + + +
    The LZOEncoder object can be used to compress data using the + Lempel-Ziv-Oberhumer (LZO) +lossless data compression algorithm. +

    +Example use; +

    	
    +z = LZOEncoder clone
    +z beginProcessing
    +z inputBuffer appendSeq("this is a message")
    +z process
    +z endProcess
    +result := z outputBuffer 
    +
    +
     
     
     
    + +
    +

    + +beginProcessing + +

    +

    +Initializes the algorithm. +
    + +endProcessing + +

    +

    +Finish processing remaining bytes of inputBuffer. +
    + +process + +

    +

    +Process the inputBuffer and appends the result to the outputBuffer. + The processed inputBuffer is emptied except for the spare bytes at + the end which don't fit into a cipher block. +
    +
    +




    + + diff --git a/io-master/docs/reference/Compression/LZO/index.html b/io-master/docs/reference/Compression/LZO/index.html new file mode 100755 index 0000000..98ed46f --- /dev/null +++ b/io-master/docs/reference/Compression/LZO/index.html @@ -0,0 +1,51 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Compression/Zlib/Zlib/index.html b/io-master/docs/reference/Compression/Zlib/Zlib/index.html new file mode 100755 index 0000000..a6de931 --- /dev/null +++ b/io-master/docs/reference/Compression/Zlib/Zlib/index.html @@ -0,0 +1,65 @@ + + + + + Zlib + + + + + +
    +

    Io Reference

    +


    +


    +Compression +  /   +Zlib +  /   +Zlib +


    +


    + + + + + + + + + + + + + +
    The Zlib object can be used to compress and uncompress data using the +zlib +lossless data compression algorithm. +

    +Example use; +

    +compressedData := Zlib compress(uncompressedData)
    +uncompressedData := Zlib uncompress(compressedData)
    +
    +
     
     
     
    + +
    +

    + +compress(aSeq) + +

    +

    +Returns a compressed version of aSeq. +
    + +uncompress(aSeq) + +

    +

    +Returns a uncompressed version of aSeq. +
    +
    +




    + + diff --git a/io-master/docs/reference/Compression/Zlib/ZlibDecoder/index.html b/io-master/docs/reference/Compression/Zlib/ZlibDecoder/index.html new file mode 100755 index 0000000..b287eac --- /dev/null +++ b/io-master/docs/reference/Compression/Zlib/ZlibDecoder/index.html @@ -0,0 +1,88 @@ + + + + + ZlibDecoder + + + + + +
    +

    Io Reference

    +


    +


    +Compression +  /   +Zlib +  /   +ZlibDecoder +


    +


    + + + + + + + + + + + + + +
    For Zlib uncompression. +Example use; +
    	
    +z = ZlibDecoder clone
    +z beginProcessing
    +z inputBuffer appendSeq(inputData)
    +z process
    +z endProcess
    +result := z outputBuffer 
    +
    +
     
     
     
    + +
    +

    + +beginProcessing + +

    +

    +Initializes the algorithm. +
    + +endProcessing + +

    +

    +Finish processing remaining bytes of inputBuffer. +
    + +inputBuffer + +

    +

    +The input buffer for decoding. +
    + +outputBuffer + +

    +

    +The output buffer for decoding. +
    + +process + +

    +

    +Process the inputBuffer and appends the result to the outputBuffer. + The processed inputBuffer is empties except for the spare bytes at the end which don't fit into a cipher block. +
    +
    +




    + + diff --git a/io-master/docs/reference/Compression/Zlib/ZlibEncoder/index.html b/io-master/docs/reference/Compression/Zlib/ZlibEncoder/index.html new file mode 100755 index 0000000..8e6c581 --- /dev/null +++ b/io-master/docs/reference/Compression/Zlib/ZlibEncoder/index.html @@ -0,0 +1,90 @@ + + + + + ZlibEncoder + + + + + +
    +

    Io Reference

    +


    +


    +Compression +  /   +Zlib +  /   +ZlibEncoder +


    +


    + + + + + + + + + + + + + +
    For Zlib compression. +Example use: +

    +

    	
    +z = ZlibEncoder clone
    +z beginProcessing
    +z inputBuffer appendSeq("this is a message")
    +z process
    +z endProcess
    +result := z outputBuffer
    +
    +
     
     
     
    + +
    +

    + +beginProcessing + +

    +

    +Initializes the algorithm. +
    + +endProcessing + +

    +

    +Finish processing remaining bytes of inputBuffer. +
    + +inputBuffer + +

    +

    +The input buffer for decoding. +
    + +outputBuffer + +

    +

    +The output buffer for decoding. +
    + +process + +

    +

    +Process the inputBuffer and appends the result to the outputBuffer. + The processed inputBuffer is empties except for the spare bytes at + the end which don't fit into a cipher block. +
    +
    +




    + + diff --git a/io-master/docs/reference/Compression/Zlib/index.html b/io-master/docs/reference/Compression/Zlib/index.html new file mode 100755 index 0000000..63c9f24 --- /dev/null +++ b/io-master/docs/reference/Compression/Zlib/index.html @@ -0,0 +1,51 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Compression/index.html b/io-master/docs/reference/Compression/index.html new file mode 100755 index 0000000..80f2294 --- /dev/null +++ b/io-master/docs/reference/Compression/index.html @@ -0,0 +1,45 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Concurrency/Thread/Thread/index.html b/io-master/docs/reference/Concurrency/Thread/Thread/index.html new file mode 100755 index 0000000..2c9bfd9 --- /dev/null +++ b/io-master/docs/reference/Concurrency/Thread/Thread/index.html @@ -0,0 +1,68 @@ + + + + + Thread + + + + + +
    +

    Io Reference

    +


    +


    +Concurrency +  /   +Thread +  /   +Thread +


    +


    + + + + + + + + + + + + + +
    For native threads. +Example use; +
    	
    +Thread createThread("1+1") // evals 1+1 in a new thread and an independent Io VM
    +
    +
     
     
     
    + +
    +

    + +createThread(aSequence) + +

    +

    +Creates a new IoState and evals aSequence in it using a new OS thread. Returns self immediately. +
    + +endCurrentThread + +

    +

    +Ends the currently running OS thread. +
    + +threadCount + +

    +

    +Returns the number of OS threads currently running in the process. +
    +
    +




    + + diff --git a/io-master/docs/reference/Concurrency/Thread/index.html b/io-master/docs/reference/Concurrency/Thread/index.html new file mode 100755 index 0000000..89fa83d --- /dev/null +++ b/io-master/docs/reference/Concurrency/Thread/index.html @@ -0,0 +1,48 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Concurrency/index.html b/io-master/docs/reference/Concurrency/index.html new file mode 100755 index 0000000..7327843 --- /dev/null +++ b/io-master/docs/reference/Concurrency/index.html @@ -0,0 +1,44 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Core/Core/Block/index.html b/io-master/docs/reference/Core/Core/Block/index.html new file mode 100755 index 0000000..6f82d4a --- /dev/null +++ b/io-master/docs/reference/Core/Core/Block/index.html @@ -0,0 +1,196 @@ + + + + + Block + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Block +


    +


    + + + + + + + + + + + + + +
    Blocks are anonymous functions (messages with their own locals object). +They are typically used to represent object methods. +
     
     
     
    + +
    +

    + +Formatter + +

    +

    +Helper object for the asString method. +
    + +argumentNames + +

    +

    +Returns a List of strings containing the argument names of the receiver. +
    + +asSimpleString + +

    +

    +Returns a short description of the receiver. +
    + +asString + +

    +

    +Returns a full description of the receiver with decompiled code. +
    + +call(arg0, arg1, ...) + +

    +

    +Activates the receiver with the provided arguments. +
    + +callWithArgList(aList) + +

    +

    +Activates the block with the given argument list. +
    + +code + +

    +

    +Returns a string containing the decompiled code of the receiver. +
    + +justSerialized(stream) + +

    +

    +Writes the receiver's code into the stream. +
    + +message + +

    +

    +Returns the root message of the receiver. +
    + +passStops + +

    +

    +Returns whether or not the receiver passes return/continue/break to caller. +
    + +performOn(anObject, optionalLocals, optionalMessage, optionalSlotContext) + +

    +

    +Activates the receiver in the target context of anObject. + Returns the result. +
    + +print + +

    +

    +Prints an Io source code representation of the block/method. +
    + +println + +

    +

    +Same as print. +
    + +profilerTime + +

    +

    +Returns clock() time spent in compiler in seconds. +
    + +scope + +

    +

    +Returns the scope used when the block is activated or + Nil if the target of the message is the scope. +
    + +setArgumentNames(aListOfStrings) + +

    +

    +Sets the receiver's argument names to those specified in + aListOfStrings. Returns self. +
    + +setCode(aString) + +

    +

    +Sets the receiver's message to a compiled version of aString. Returns self. +
    + +setMessage(aMessage) + +

    +

    +Sets the root message of the receiver to aMessage. +
    + +setPassStops(aBool) + +

    +

    +Sets whether the receiver passes return/continue/break to caller. +
    + +setProfilerOn(aBool) + +

    +

    +If aBool is true, the global block profiler is enabled, if false it is disabled. Returns self. +
    + +setScope(anObjectOrNil) + +

    +

    +If argument is an object, when the block is activated, + it will set the proto and self slots of its locals to the specified + object. If Nil, it will set them to the target of the message. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/CFunction/index.html b/io-master/docs/reference/Core/Core/CFunction/index.html new file mode 100755 index 0000000..45359ae --- /dev/null +++ b/io-master/docs/reference/Core/Core/CFunction/index.html @@ -0,0 +1,104 @@ + + + + + CFunction + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +CFunction +


    +


    + + + + + + + + + + + + + +
    A container for a pointer to a C function binding. +CFunction's can only be defined from the C side and act +like blocks in that when placed in a slot, are called when the +slot is activated. The for, if, while and clone methods of the Lobby +are examples of CFunctions. CFunctions are useful for implementing +methods that require the speed of C or binding to a C library. +
     
     
     
    + +
    +

    + +==(anObject) + +

    +

    +Returns self if the argument is a CFunction with the same internal C function pointer. +
    + +asSimpleString + +

    +

    +Returns the CFunction name. +
    + +asString + +

    +

    +Same as asSimpleString. +
    + +id + +

    +

    +Returns a number containing a unique id for the receiver's internal C function. +
    + +name + +

    +

    +Returns the CFunction name in the form CFunction_Pointer. +
    + +performOn(target, blockLocals, optionalMessage, optionalContext) + +

    +

    +Activates the CFunctions with the supplied settings. +
    + +typeName + +

    +

    +Returns the owning type of the CFunction or nil if the CFunction can be called on any object. +
    + +uniqueName + +

    +

    +Returns the name given to the CFunction. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Call/index.html b/io-master/docs/reference/Core/Core/Call/index.html new file mode 100755 index 0000000..d87d7cb --- /dev/null +++ b/io-master/docs/reference/Core/Core/Call/index.html @@ -0,0 +1,175 @@ + + + + + Call + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Call +


    +


    + + + + + + + + + + + + + +
    Call stores slots related to activation. +
     
     
     
    + +
    +

    + +activated + +

    +

    +Returns the activated value. +
    + +argAt(argNumber) + +

    +

    +Returns the message's argNumber arg. Shorthand for same as call message argAt(argNumber). +
    + +argCount + +

    +

    +Returns the number of arguments for the call. Shortcut for "call message argCount". +
    + +coroutine + +

    +

    +Returns the coroutine in which the message was sent. +
    + +delegateTo(target, altSender) + +

    +

    +Sends the call's message to target (and relays it's stop status). + The sender is set to altSender, if it is supplied. + Returns the result of the message. +
    + +delegateToMethod(target, methodName) + +

    +

    +Sends the call's message to target via the method specified by methodName. + Returns the result of the message. +
    + +description + +

    +

    +Returns a description of the receiver as a String. +
    + +evalArgAt(argNumber) + +

    +

    +Evaluates the specified argument of the Call's message in the context of its sender. +
    + +evalArgs + +

    +

    +Returns a list containing the call message arguments evaluated in the context of the sender. +
    + +hasArgs + +

    +

    +Returns true if the call was passed arguments. +
    + +message + +

    +

    +Returns the message value. +
    + +relayStopStatus(arg) + +

    +

    +Sets sender's stop status (Normal, Return, + Break, Continue etc.) and returns evaluated argument. +
    + +resetStopStatus(arg) + +

    +

    +Sets stop status to Normal. + See also Call setStopStatus. +
    + +sender + +

    +

    +Returns the sender value. +
    + +setStopStatus(aStatusObject) + +

    +

    +Sets the stop status on the call. +
    + +slotContext + +

    +

    +Returns the slotContext value. +
    + +stopStatus + +

    +

    +Returns the stop status on the call. (description of stopStatus will + be added once we decide whether or not to keep it) +
    + +target + +

    +

    +Returns the target value. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Collector/index.html b/io-master/docs/reference/Core/Core/Collector/index.html new file mode 100755 index 0000000..1240c1d --- /dev/null +++ b/io-master/docs/reference/Core/Core/Collector/index.html @@ -0,0 +1,165 @@ + + + + + Collector + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Collector +


    +


    + + + + + + + + + + + + + +
    A singleton containing methods related to Io's garbage collector. +Io currently uses a incremental, non-moving, generational +collector based on the tri-color (black/gray/white) +algorithm with a write-barrier. +

    +Every N number of object allocs, the collector will walk +some of the objects marked as gray, marking their connected +white objects as gray and turning themselves black. +Every M allocs, it will pause for a sweep where it makes sure +all grays are marked black and io_frees all whites. +

    +If the sweepsPerGeneration is set to zero, it will immediately mark +all blacks as white again and mark the root objects as gray. Otherwise, +it will wait until the sweepsPerGeneration count is reached to do this. +By adjusting the allocsPerSweep and sweepsPerGeneration appropriately, the +collector can be tuned efficiently for various usage cases. + +Generally, the more objects in your heap, the larger you'll want this number. +

     
     
     
    + +
    +

    + +allObjects + +

    +

    +Returns a List containing all objects known to the collector. +
    + +allocatedStep + +

    +

    +Return the allocation step value as a Number. +
    + +cleanAllObjects + +

    +

    +Sets all objects as clean. Returns self. +
    + +collect + +

    +

    +Runs garbage collector. Returns the number of items collected. +
    + +dirtyObjects + +

    +

    +Returns a List containing all dirty objects known to the collector. +
    + +marksPerAlloc + +

    +

    +Return the number of allocations per collector mark pass. +
    + +maxAllocatedBytes + +

    +

    +Returns the maximum number of bytes allocated by the collector. +
    + +objectWithUniqueId(aNumber) + +

    +

    +Returns an object whose uniqueId is aNumber or nil if no match is found. + Warning: This lookup currently scans all objects, so it is not efficient, + though it should handle thousands of lookups per second. +
    + +resetMaxAllocatedBytes + +

    +

    +Resets maximum number of bytes allocated by the collector. Returns self. +
    + +setAllocatedStep(aNumber) + +

    +

    +Sets the allocatedStep (can have a fractional component, + but must be larger than 1). A collector sweep is forced when the + number of allocated objects exceeds the allocatedSweepLevel. + After a sweep, the allocatedSweepLevel is set to the allocated + object count times the allocatedStep. Returns self. +
    + +setDebug(aBool) + +

    +

    +Turns on/off printing of collector debugging messages. Returns self. +
    + +setMarksPerAlloc(aNumber) + +

    +

    +Sets the number of incremental collector marks per object + allocation (can be fractional). Returns self. +
    + +showStats + +

    +

    +Prints the collector's stats to standard output. +
    + +timeUsed + +

    +

    +Return the time used so far by the collector in seconds. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Compiler/index.html b/io-master/docs/reference/Core/Core/Compiler/index.html new file mode 100755 index 0000000..3ccd945 --- /dev/null +++ b/io-master/docs/reference/Core/Core/Compiler/index.html @@ -0,0 +1,71 @@ + + + + + Compiler + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Compiler +


    +


    + + + + + + + + + + + + + +
    Contains methods related to the compiling code. +
     
     
     
    + +
    +

    + +messageForString(aString, optionalLabelString) + +

    +

    +Returns the compiled message object for aString. +
    + +messageForString2(aString) + +

    +

    +Returns the compiled message object for aString. (Runs raw string against lexer directly.) +
    + +messageForTokens(aList) + +

    +

    +Returns the compiled message object for the given token list. +
    + +tokensForString(aString) + +

    +

    +Returns a list of token objects lexed from the input string. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Coroutine/index.html b/io-master/docs/reference/Core/Core/Coroutine/index.html new file mode 100755 index 0000000..7ef53c7 --- /dev/null +++ b/io-master/docs/reference/Core/Core/Coroutine/index.html @@ -0,0 +1,353 @@ + + + + + Coroutine + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Coroutine +


    +


    + + + + + + + + + + + + + +
    Coroutine is an primitive for Io's lightweight cooperative C-stack based threads. +
     
     
     
    + +
    +

    + +backTraceString + +

    +

    +Returns a formatted callStack output along with exception info (if any). In case of CGI script, wraps output with <code> tag. +
    + +callStack + +

    +

    +Returns a list of Call objects. +
    + +currentCoroutine + +

    +

    +Returns currently running coroutine in Io state. +
    + +debugWriteln + +

    +

    +See Object debugWriteln. +
    + +exception + +

    +

    +Returns the current exception or nil if there is none. +
    + +freeStack + +

    +

    +Frees all the internal data from the receiver's stack. Returns self. +
    + +ignoredCoroutineMethodNames + +

    +

    +List of methods to ignore when building a callStack. +
    + +implementation + +

    +

    +Returns coroutine implementation type: "fibers", "ucontext" or "setjmp" +
    + +inException + +

    +

    +Set to true when processing an exception in the coroutine. +
    + +ioStack + +

    +

    +Returns List of values on this coroutine's stack. +
    + +isCurrent + +

    +

    +Returns true if the receiver is currently running coroutine. +
    + +isYielding + +

    +

    +Returns true if the receiver is yielding (not paused or running). +
    + +label + +

    +

    +A label slot useful for debugging purposes. +
    + +main + +

    +

    +[Seems to be obsolete!] Executes runMessage, resumes parent coroutine. +
    + +parentCoroutine + +

    +

    +Returns the parent coroutine this one was chained from or nil if it wasn't chained. When a Coroutine ends, it will attempt to resume its parent. +
    + +pause + +

    +

    +Removes current coroutine from the yieldingCoros queue and + yields to another coro. System exit is executed if no coros left. +
    + You can resume a coroutine using either resume or resumeLater message. +
    + +pauseCurrentAndResumeSelf + +

    +

    +Pauses current coroutine and yields to a receiver. +
    + +raiseException + +

    +

    +Sets exception in the receiver and resumes parent coroutine. +
    + +result + +

    +

    +The result set when the coroutine ends. +
    + +resume + +

    +

    +Yields to the receiver. Runs the receiver if it is not running yet. + Returns self. +
    + +resumeLater + +

    +

    +Promotes receiver to the top of the yieldingCoros queue, but not yielding to it. + When current coroutine yields, receiver will resume. +
    + +resumeParentCoroutine + +

    +

    +Pauses current coroutine and resumes parent. +
    + +run + +

    +

    +Runs receiver and returns self. +
    + +runLocals + +

    +

    +The locals object in whose context the coroutine will send its run message. +
    + +runMessage + +

    +

    +The message to send to the runTarget when the coroutine starts. +
    + +runTarget + +

    +

    +The object which the coroutine will send a message to when it starts. +
    + +setException + +

    +

    + +
    + +setInException(aBool) + +

    +

    +Set the inException status. Returns self. +
    + +setLabel(aLabel) + +

    +

    +Sets the comment label for the Coro. Return self. +
    + +setMessageDebugging(aBoolean) + +

    +

    +Turns on message level debugging for this coro. When on, this + coro will send a vmWillSendMessage message to the Debugger object before + each message send and pause itself. See the Debugger object documentation + for more information. +
    + +setParentCoroutine(aCoro) + +

    +

    +Sets the parent coroutine. Returns self. +
    + +setResult + +

    +

    + +
    + +setRunLocals + +

    +

    + +
    + +setRunMessage + +

    +

    + +
    + +setRunTarget(anObject) + +

    +

    + +
    + +setStackSize(aNumber) + +

    +

    +Sets the stack size in bytes to allocate for new Coros. Returns self. +
    + +showStack + +

    +

    +Writes backTraceString to STDOUT. +
    + +showYielding + +

    +

    +Prints a list of yielding coroutines to STDOUT. +
    + +stackSize + +

    +

    +Stack size allocated for each new coroutine. Coroutines will automatically chain themselves as need if more stack space is required. +
    + +typeId + +

    +

    +Returns _ string. +
    + +yield + +

    +

    +Yields to another coroutine in the yieldingCoros queue. + Does nothing if yieldingCoros is empty. +
    + +yieldCurrentAndResumeSelf + +

    +

    +Yields to a receiver. +
    + +yieldingCoros + +

    +

    +Reference to Scheduler yieldingCoros. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Date/index.html b/io-master/docs/reference/Core/Core/Date/index.html new file mode 100755 index 0000000..616d804 --- /dev/null +++ b/io-master/docs/reference/Core/Core/Date/index.html @@ -0,0 +1,397 @@ + + + + + Date + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Date +


    +


    + + + + + + + + + +
     
     
     
    + +
    +

    + ++(aDuration) + +

    +

    +Return a new Date with the receiver's value plus an amount + of time specified by aDuration object to the receiver. +
    + ++=(aDuration) + +

    +

    +Add aDuration to the receiver. Returns self. +
    + +-(aDurationOrDate) + +

    +

    +Return a new Date with the receiver's value minus an amount of time specified by aDuration to the receiver. Returns self. +
    + +-=(aDuration) + +

    +

    +Subtract aDuration from the receiver. Returns self. +
    + +asAtomDate + +

    +

    +Returns the date formatted as a valid atom date (rfc4287) in the system's timezone. +
    + +asNumber + +

    +

    +Returns the date as seconds since 1970 UTC. +
    + +asSerialization + +

    +

    +Returns a serialization (sequence) of the date that allows for perfect reconstruction of the timestamp. +
    + +asString(optionalFormatString) + +

    +

    +Returns a string representation of the receiver using the +receivers format. If the optionalFormatString argument is present, the +receiver's format is set to it first. Formatting is according to ANSI C +date formatting rules. +

    +

    	
    +%a abbreviated weekday name (Sun, Mon, etc.)
    +%A full weekday name (Sunday, Monday, etc.)
    +%b abbreviated month name (Jan, Feb, etc.)
    +%B full month name (January, February, etc.)
    +%c full date and time string
    +%d day of the month as two-digit decimal integer (01-31)
    +%H hour as two-digit 24-hour clock decimal integer (00-23)
    +%I hour as two-digit 12-hour clock decimal integer (01-12)
    +%m month as a two-digit decimal integer (01-12)
    +%M minute as a two-digit decimal integer (00-59)
    +%p either "AM" or "PM"
    +%S second as a two-digit decimal integer (00-59)
    +%U number of week in the year as two-digit decimal integer (00-52)
    +with Sunday considered as first day of the week
    +%w weekday as one-digit decimal integer (0-6) with Sunday as 0
    +%W number of week in the year as two-digit decimal integer (00-52)
    +with Monday considered as first day of the week
    +%x full date string (no time); in the C locale, this is equivalent
    +to "%m/%d/%y".
    +%y year without century as two-digit decimal number (00-99)
    +%Y year with century as four-digit decimal number
    +%Z time zone name (e.g. EST);
    +null string if no time zone can be obtained
    +%% stands for '%' character in output string.
    +
    +
    + +asUTC + +

    +

    +Changes the timezone of this date to utc +
    + +clock + +

    +

    +Returns a number containing the number of seconds + of processor time since the beginning of the program or -1 if unavailable. +
    + +convertToLocal + +

    +

    +Converts self date from a UTC date to the equivalent local date +
    + +convertToUTC + +

    +

    +Converts self from a local date to the equivalent UTC date +
    + +convertToZone(offset, isDST) + +

    +

    +Converts self to an equivalent data in a zone with offset (minutes west) and DST (true, false). +
    + +copy(aDate) + +

    +

    +Sets the receiver to be the same date as aDate. Returns self. +
    + +cpuSecondsToRun(expression) + +

    +

    +Evaluates message and returns a Number whose value + is the cpu seconds taken to do the evaluation. +
    + +day + +

    +

    +Returns a number containing the day of the month of the receiver. +
    + +format + +

    +

    +Returns the format string for the receiver. The default is "%Y-%m-%d %H:%M:%S %Z". +
    + +fromNumber(aNumber) + +

    +

    +Sets the receiver to be aNumber seconds since 1970. +
    + +fromSerialization + +

    +

    +Sets the date based on the serialization sequence. Return self. +
    + +fromString(aString, formatString) + +

    +

    +Sets the receiver to the date specified by aString as parsed according to the given formatString. See the Date asString method for formatting rules. Returns self. +
    + +gmtOffset + +

    +

    +Returns the system's timezone string. E.g., +1300 or -0500. +
    + +gmtOffsetSeconds + +

    +

    +Returns the system's seconds east of UTC. +
    + +hour + +

    +

    +Returns a number containing the hour of the day(0-23) of the receiver. +
    + +isDST + +

    +

    +Returns true if the Date is set to use DST. Posix only. +
    + +isDaylightSavingsTime + +

    +

    +Returns self if Daylight Saving Time is in effect for the receiver, otherwise returns Nil. +
    + +isPast + +

    +

    +Returns true if the receiver is a date in the past. +
    + +isToday + +

    +

    +Returns true if the receiver's date is today's date. +
    + +isValidTime(hour, min, sec) + +

    +

    +Returns self if the specified time is valid, otherwise returns Nil. + A negative value will count back; i.e., a value of -5 for the hour, + will count back 5 hours to return a value of 19. No adjustment is + done for values above 24. +
    + +minute + +

    +

    +Returns a number containing the minute of the hour(0-59) of the receiver. +
    + +month + +

    +

    +Returns a number containing the month(1-12) of the year of the receiver. +
    + +now + +

    +

    +Sets the receiver to the current time. Returns self. +
    + +print + +

    +

    +Prints the receiver. Returns self. +
    + +second + +

    +

    +Returns a number containing the seconds of the minute(0-59) of the receiver. This number may contain fractions of seconds. +
    + +secondsSince(aDate) + +

    +

    +Returns a number of seconds of between aDate and the receiver. +
    + +secondsSinceNow(aDate) + +

    +

    +Returns the number of seconds since aDate. +
    + +secondsToRun(expression) + +

    +

    +Evaluates message and returns a Number whose value is the number of seconds taken to do the evaluation +
    + +setDay(aNumber) + +

    +

    +Sets the day of the receiver. Returns self. +
    + +setGmtOffset + +

    +

    +Set the number of minutes west of GMT for this Date's zone +
    + +setHour(aNumber) + +

    +

    +Sets the hour of the receiver. Returns self. +
    + +setMinute(aNumber) + +

    +

    +Sets the minute of the receiver. Returns self. +
    + +setMonth(aNumber) + +

    +

    +Sets the month(1-12) of the receiver. Returns self. +
    + +setSecond(aNumber) + +

    +

    +Sets the second of the receiver. Returns self. +
    + +setYear(aNumber) + +

    +

    +Sets the year of the receiver. +
    + +today + +

    +

    +Set the receiver to the current date, no time information + is included. See `now' for the current date and time. +
    + +year + +

    +

    +Returns a number containing the year of the receiver. +
    + +zone + +

    +

    +Returns a string containing the system's time zone code. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Debugger/index.html b/io-master/docs/reference/Core/Core/Debugger/index.html new file mode 100755 index 0000000..ad1cac7 --- /dev/null +++ b/io-master/docs/reference/Core/Core/Debugger/index.html @@ -0,0 +1,79 @@ + + + + + Debugger + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Debugger +


    +


    + + + + + + + + + + + + + +
    Contains methods related to the IoVM debugger. +
     
     
     
    + +
    +

    + +debuggerCoroutine + +

    +

    +Returns the coroutine used for the debugger. +
    + +description + +

    +

    +To start debugging a coroutine, call + + Coroutine currentCoroutine setMessageDebugging(true) + + Then each message sent within that coroutine will cause the Debugger + vmWillSendMessage slot to be activated and the Debugger slots: + messageCoroutine, messageSelf, messageLocals, and message will be set with the + values related to the current message send. You can override vmWillSendMessage to + implement your own debugging mechanisms. +
    + +start + +

    +

    +Starts the debugger. +
    + +vmWillSendMessage + +

    +

    +Override this method to implement your own debugging mechanisms. Default behavior is to print every message sent. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Directory/index.html b/io-master/docs/reference/Core/Core/Directory/index.html new file mode 100755 index 0000000..ed62b6d --- /dev/null +++ b/io-master/docs/reference/Core/Core/Directory/index.html @@ -0,0 +1,313 @@ + + + + + Directory + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Directory +


    +


    + + + + + + + + + + + + + +
    The Directory object supports accessing filesystem directories. A note on paths; +if a path begins with a "/" it's the root, +if it beings with a "./" it's the launch path, +if not specified, "./" is assumed.""") +
     
     
     
    + +
    +

    + +accessibleAncestors + +

    +

    +Returns a list of accessible ancestor directories. +
    + + +accessibleParents + +

    +

    +Deprecated. Replaced by accessibleAncestors. + +
    + +ancestorDirectories + +

    +

    +Returns a list of ancestor directories. +
    + +at(aString) + +

    +

    +Returns a File or Directory object matching the name specified + by aString or Nil if no such file or directory exists. +
    + +create + +

    +

    +Create the directory if it doesn't exist. + Returns self on success (or if the directory already exists), nil on failure. +
    + + +createFileNamed(name) + +

    +

    +Deprecated. Returns a new file object in the directory with the specified name. + +
    + +createIfAbsent + +

    +

    +Creates the directory (and any missing ancestor directories) if they don't exist. Returns self. +
    + +createSubdirectory(name) + +

    +

    +Create a subdirectory with the specified name. +
    + +currentWorkingDirectory + +

    +

    +Returns the current working directory path. +
    + +directories + +

    +

    +Returns a list of subdirectories in the receiver. +
    + +directoryNamed(aName) + +

    +

    +Returns a Directory object for the specified file name whether or not it exists. +
    + +exists(optionalPath) + +

    +

    +Returns true if the Directory path exists, and false otherwise. + If optionalPath string is provided, it tests the existence of that path instead. +
    + +fileNamed(aName) + +

    +

    +Returns a File object for the specified file name whether it exists or not. +
    + +fileNames + +

    +

    +Returns a list of strings for the names of the files (no subdirectories) in the directory. +
    + +files + +

    +

    +Returns a list of File objects for the files in the Directory (no directories). +
    + +filesWithExtension(aString) + +

    +

    +Returns a list of File objects for the files in the Directory (no directories) + with the specified file extension. +
    + + +folderNamed(aName) + +

    +

    +Deprecated. Replaced by directoryNamed(). + +
    + + +folderNamedCreateIfAbsent(name) + +

    +

    +Deprecated. Returns a new Directory object in the directory with the specified name. + +
    + + +folders + +

    +

    +Deprecated. Replaced by directories(). + +
    + +isAccessible + +

    +

    +Returns true if the directory can be accessed, false otherwise. +
    + +items + +

    +

    +Returns a list object containing File and Directory objects + for the files and directories of the receiver's path. +
    + +localItems + +

    +

    +All subitems excluding '.' and '..'. +
    + +moveTo(aPath) + +

    +

    +Moves the directory to the specified path. +
    + +name + +

    +

    +Returns the receiver's last path component. +
    + +parentDirectory + +

    +

    +Returns the parent directory object or nil if there is no parent directory. +
    + + +parents + +

    +

    +Deprecated. Replaced by ancestorDirectories. + +
    + +path + +

    +

    +Returns the directory path. The default path is '.'. +
    + +recursiveFilesOfTypes(suffixes) + +

    +

    +Returns a list containing all files in the directory or any subdirectory that + has any of the specified suffixes. +
    + +remove + +

    +

    +Removes the directory. +
    + +setCurrentWorkingDirectory(pathString) + +

    +

    +Sets the current working directory path. + Returns true on success or false on error. +
    + +setPath(aString) + +

    +

    +Sets the directory path. Returns self. +
    + +size + +

    +

    +Returns a Number containing the number of file and directory + objects at the receiver's path. +
    + +walk + +

    +

    +Recursively walks the current directory, and executes a given callback on + each item (either File or Directory) found, excluding "." and "..". +
    +Io> Directory walk(println)
    +A0_List.io
    +A1_OperatorTable.io
    +...
    +Io> Directory walk(f, if(f name startsWithSeq("Directory"), f println))
    +Directory.io
    +
    +
    + +with(aPath) + +

    +

    +Returns a new instance with the provided path. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/DynLib/index.html b/io-master/docs/reference/Core/Core/DynLib/index.html new file mode 100755 index 0000000..c9b8dc9 --- /dev/null +++ b/io-master/docs/reference/Core/Core/DynLib/index.html @@ -0,0 +1,129 @@ + + + + + DynLib + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +DynLib +


    +


    + + + + + + + + + + + + + +
    A DLL Loader by Kentaro A. Kurahone. +
     
     
     
    + +
    +

    + +call(functionName, <arg1>, <arg2>, ...) + +

    +

    +Call's the dll function of the specified name with the arguments provided. + Returns a Number with the result value. +
    + +callPluginInit(functionName) + +

    +

    +Call's the dll function of the specified name. + Returns the result as a Number or raises an exception on error. +
    + +close + +

    +

    +Closes the library. Returns self. +
    + +freeFuncName + +

    +

    +Returns the io_free function name. +
    + +initFuncName + +

    +

    +Returns the initialization function name. +
    + +isOpen + +

    +

    +Returns true if the library is open, or false otherwise. +
    + +open + +

    +

    +Opens the dynamic library and returns self or raises a DynLoad.open Error if there is an error. +
    + +path + +

    +

    +Returns the path to the dynamic library. +
    + +setFreeFuncName(aString) + +

    +

    +Sets the io_free function name. Returns self. +
    + +setInitFuncName(aString) + +

    +

    +Sets the initialization function name for the dynamic library. Returns self. +
    + +setPath(aString) + +

    +

    +Sets the path to the dynamic library. Returns self. +
    + +voidCall(functionName, <arg1>, <arg2>, ...) + +

    +

    +Same as call but for functions with no return value. Returns nil. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Error/index.html b/io-master/docs/reference/Core/Core/Error/index.html new file mode 100755 index 0000000..c17d706 --- /dev/null +++ b/io-master/docs/reference/Core/Core/Error/index.html @@ -0,0 +1,81 @@ + + + + + Error + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Error +


    +


    + + + + + + + + + + + + + +
    An object that contains error information and flow control based on errors. +
     
     
     
    + +
    +

    + +ifError(code) + +

    +

    +Evaluates code in the context of sender. Returns self. +
    + Another form is Error ifError(error, code). + Note: error slot is set in the context of sender, Locals object is not created! +
    + +isError + +

    +

    +Returns true. +
    + +raiseIfError + +

    +

    +Raises exception. +
    + +returnIfError + +

    +

    +Returns self from the context of sender. +
    + +with(message) + +

    +

    +Returns new error with message slot set. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Exception/index.html b/io-master/docs/reference/Core/Core/Exception/index.html new file mode 100755 index 0000000..c3e013c --- /dev/null +++ b/io-master/docs/reference/Core/Core/Exception/index.html @@ -0,0 +1,148 @@ + + + + + Exception + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Exception +


    +


    + + + + + + + + + + + + + +
    The Exception proto is used for raising exceptions and instances are used to hold rexception related info. + +

    Raise

    + +An exception can be raised by calling raise() on an exception proto. +Exception raise("generic foo exception") + +

    Try and Catch

    + +To catch an exception, the try() method of the Object proto is used. try() will catch any exceptions that occur within it and return the caught exception or nil if no exception is caught. + +

    +e := try()
    +
    + +To catch a particular exception, the Exception catch() method can be used. Example: + +
    +e := try(
    +    // ...
    +)
    +
    +e catch(Exception,
    +    writeln(e coroutine backtraceString)
    +)
    +
    + +The first argument to catch indicates which types of exceptions will be caught. catch() returns the exception if it doesn't match and nil if it does. + +

    Pass

    + +To re-raise an exception caught by try(), use the pass method. This is useful to pass the exception up to the next outer exception handler, usually after all catches failed to match the type of the current exception: +

    +e := try(
    +    // ...
    +)
    +
    +e catch(Error,
    +    // ...
    +) catch(Exception,
    +    // ...
    +) pass
    +
    + +

    Custom Exceptions

    + +Custom exception types can be implemented by simply cloning an existing Exception type: +

    +MyErrorType := Error clone
    +
    +
     
     
     
    + +
    +

    + +catch(exceptionProto) + +

    +

    +Catch an exception with the specified exception prototype. +
    + +caughtMessage + +

    +

    +Returns the message object associated with the exception. +
    + +error + +

    +

    +Returns the coroutine that the exception occurred in. +
    + +nestedException + +

    +

    +Returns the nestedException if there is one. +
    + +originalCall + +

    +

    +Returns the call object associated with the exception. +
    + +pass + +

    +

    +Pass the exception up the stack. +
    + +raise(error, optionalNestedException) + +

    +

    +Raise an exception with the specified error message. +
    + +showStack + +

    +

    +Print the exception and related stack. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/File/index.html b/io-master/docs/reference/Core/Core/File/index.html new file mode 100755 index 0000000..0ee9e4e --- /dev/null +++ b/io-master/docs/reference/Core/Core/File/index.html @@ -0,0 +1,610 @@ + + + + + File + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +File +


    +


    + + + + + + + + + + + + + +
    Encapsulates file i/o. Here's an example of opening a file, +and reversing its lines: +
    	
    +file := File clone openForUpdating("/tmp/test")
    +lines := file readLines reverse
    +file rewind
    +lines foreach(line, file write(line, "\n"))
    +file close
    +
    +
     
     
     
    + +
    +

    + +appendToContents(aSeq) + +

    +

    +Appends to the contents of the file with aSeq. Returns self. +
    + +asBuffer + +

    +

    +Opens the receiver in read only mode, reads the whole + contents of the file into a buffer object, closes the file and returns the buffer. +
    + +at(aNumber) + +

    +

    +Returns a Number containing the byte at the specified + byte index or Nil if the index is out of bounds. +
    + +atPut(positionNumber, byteNumber) + +

    +

    +Writes the byte value of byteNumber to the file position + positionNumber. Returns self. +
    + +baseName + +

    +

    +Returns File's name without an extension (returned Sequence consists of all characters up to final period ["."] character). +
    + +close + +

    +

    +Closes the receiver if open, otherwise does nothing. Returns self. + + When the file was opened via popen, sets either exitStatus or + termSignal to the exit status on normal exit, or the signal causing + abnormal termination. +
    + + +containingDirectory + +

    +

    +Deprecated. See parentDirectory. + +
    + +contents + +

    +

    +Returns contents of the file as a mutable Sequence of bytes. +
    + +copyToPath(destinationPath) + +

    +

    +Copies the file to the specified path. +
    + +copyToPathWithoutYielding(destinationPath) + +

    +

    +Copies the file to the specified path without yielding. +
    + +create + +

    +

    +Creates an empty file at the file's path. Returns self on success, nil on failure. +
    + +descriptor + +

    +

    +Returns the file's descriptor as a number. +
    + +exists(optionalPath) + +

    +

    +Returns true if the file path exists, and false otherwise. + If optionalPath string is provided, it tests the existance of that path instead. +
    + +exitStatus + +

    +

    +System's close status (after file close). +
    + +flush + +

    +

    +Forces any buffered data to be written to disk. Returns self. +
    + +foreach(optionalIndex, value, message) + +

    +

    +For each byte, set index to the index of the byte +and value to the number containing the byte value and execute aMessage. +Example usage: +

    +

    	
    +aFile foreach(i, v, writeln("byte at ", i, " is ", v))
    +aFile foreach(v, writeln("byte ", v))
    +
    +
    + +foreachLine(optionalLineNumber, line, message) + +

    +

    +For each line, set index to the line number of the line +and line and execute aMessage. +Example usage: +
    	
    +aFile foreachLine(i, v, writeln("Line ", i, ": ", v))
    +aFile foreach(v, writeln("Line: ", v))
    +
    +
    + +groupId + +

    +

    +Returns a Number containing the group id associated with the file's path. +
    + +isAtEnd + +

    +

    +Returns true if the file is at its end. Otherwise returns false. +
    + +isDirectory + +

    +

    +Returns true if the receiver's path points to a directory, false otherwise. +
    + +isLink + +

    +

    +Returns true if the receiver's path points to a link, false otherwise. +
    + +isOpen + +

    +

    +Returns self if the file is open. Otherwise returns Nil. +
    + +isPipe + +

    +

    +Returns true if the receiver is a pipe, false otherwise. +
    + +isRegularFile + +

    +

    +Returns true if the receiver's file descriptor is a regular file, false otherwise. +
    + +isSocket + +

    +

    +Returns true if the receiver's file descriptor is a Socket, false otherwise. +
    + +isUserExecutable + +

    +

    +Returns true if the receiver is user group executable, false otherwise. +
    + +lastAccessDate + +

    +

    +Returns a Date object containing the last date and + time the file was accessed. +
    + +lastDataChangeDate + +

    +

    +Returns a Date object containing the last date and + time the file's contents were changed. +
    + +lastInfoChangeDate + +

    +

    +Returns a Date object containing the last date and + time the file's meta info was changed. +
    + +mode + +

    +

    +Returns the open mode of the file(either read, update or append). +
    + +moveTo(pathString) + +

    +

    +Moves the file specified by the receiver's path to the + new path pathString. Raises a File doesNotExist exception if the + file does not exist or a File nameConflict exception if the file + nameString already exists. +
    + +name + +

    +

    +Returns the last path component of the file path. +
    + +open(optionalPathString) + +

    +

    +Opens the file. Creates one if it does not exist. + If the optionalPathString argument is provided, the path is set to it before + opening. Returns self or raises an File exception on error. +
    + +openForAppending(optionalPathString) + +

    +

    +Sets the file mode to append (writing to the end of the file) + and calls open(optionalPathString). +
    + +openForReading(optionalPathString) + +

    +

    +Sets the file mode to read (reading only) and calls open(optionalPathString). +
    + +openForUpdating(optionalPathString) + +

    +

    +Sets the file mode to update (reading and writing) and calls + open(optionalPathString). This will not delete the file if it already exists. + Use the remove method first if you need to delete an existing file before opening a new one. +
    + +parentDirectory + +

    +

    +Returns a File for the directory that is the parent directory of this object's path. +
    + +path + +

    +

    +Returns the file path of the receiver. +
    + +popen + +

    +

    +Open the file as a pipe. Return self. + + Closing a popen'ed file sets exitStatus or termSignal + to reflect the status or cause of the child processes' termination. +
    + +position + +

    +

    +Returns the current file pointer byte position as a Number. +
    + +positionAtEnd + +

    +

    +Sets the file position pointer to the end of the file. +
    + +protectionMode + +

    +

    +Returns a Number containing the protection mode + associated with the file's path. +
    + +readBufferOfLength(aNumber) + +

    +

    +Reads a Buffer of the specified length and returns it. + Returns Nil if the end of the file has been reached. +
    + +readLine + +

    +

    +Reads the next line of the file and returns it as a + string without the return character. Returns Nil if the + end of the file has been reached. +
    + +readLines + +

    +

    +Returns list containing all lines in the file. +
    + +readStringOfLength(aNumber) + +

    +

    +Reads a String of the specified length and returns it. + Returns Nil if the end of the file has been reached. +
    + +readToBufferLength(aBuffer, aNumber) + +

    +

    +Reads at most aNumber number of items and appends them to aBuffer. + Returns number of items read. +
    + +readToEnd(chunkSize) + +

    +

    +Reads chunkSize bytes (4096 by default) at a time until end of file is reached. Returns a sequence containing the bytes read from the file. +
    + +remove + +

    +

    +Removes the file specified by the receiver's path. + Raises an error if the file exists but is not removed. Returns self. +
    + +reopen(otherFile, mode) + +

    +

    +Reopens otherFile and redirects its stream to this file's path using mode. + If mode is omitted, it is copied from otherFile. + Returns self or raises a File exception on error. +
    + +rewind + +

    +

    +Sets the file position pointer to the beginning of the file. +
    + +setContents(aSeq) + +

    +

    +Replaces the contents for the file with aSeq. Returns self. +
    + +setPath(aString) + +

    +

    +Sets the file path of the receiver to pathString. + The default path is an empty string. Returns self. +
    + +setPosition(aNumber) + +

    +

    +Sets the file position pointer to the byte specified by aNumber. Returns self. +
    + +setStreamDestination(aBuffer) + +

    +

    +Set the buffer to be used for future stream operations. +
    + +size + +

    +

    +Returns the file size in bytes. +
    + +standardError + +

    +

    +Returns a new File whose stream is set to the standard error stream. +
    + +standardInput + +

    +

    +Returns a new File whose stream is set to the standard input stream. +
    + +standardOutput + +

    +

    +Returns a new File whose stream is set to the standard output stream. +
    + +startStreaming + +

    +

    +Begin streamed read to stream destination set by setStreamDestination(aBuffer). +
    + +stat + +

    +

    +Updates the receiver's meta info cache. +
    + +statSize + +

    +

    +Returns the file's size in bytes as a Number. +
    + +streamDestination + +

    +

    +The buffer object to be used for future stream operations. +
    + +streamReadSize + +

    +

    +Size of stream buffer used for streaming operations +
    + +streamTo(aBuffer) + +

    +

    +Perform streamed reading to given buffer. The buffer will be appended with chunks of size streamReadSize until EOF. The final chunk may be less than streamReadSize. +
    + +streamToWithoutYielding(aBuffer) + +

    +

    +Perform streamed reading to given buffer without yielding between reads. +
    + +temporaryFile + +

    +

    +Returns a new File object with an open temporary file. The file is + automatically deleted when the returned File object is closed or garbage collected. +
    + +termSignal + +

    +

    +Pipe's terminating signal (after file close opened via popen). +
    + +thisSourceFile + +

    +

    +Returns a File representing the system file in which this Io code exists. +
    + +truncateToSize(numberOfBytes) + +

    +

    +Truncates the file's size to the numberOfBytes. Returns self. +
    + +userId + +

    +

    +Returns a Number containing the user id associated with the file's path. +
    + +with(aPath) + +

    +

    +Returns a new instance with the provided path. +
    + +write(aSequence1, aSequence2, ...) + +

    +

    +Writes the arguments to the receiver file. Returns self. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/List/index.html b/io-master/docs/reference/Core/Core/List/index.html new file mode 100755 index 0000000..5ff76bb --- /dev/null +++ b/io-master/docs/reference/Core/Core/List/index.html @@ -0,0 +1,637 @@ + + + + + List + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +List +


    +


    + + + + + + + + + + + + + +
    A mutable array of values. The first index is 0. +
     
     
     
    + +
    +

    + +anyOne + +

    +

    +Returns a random element of the receiver or nil if the receiver is empty. +
    + +append(anObject1, anObject2, ...) + +

    +

    +Appends the arguments to the end of the list. Returns self. +
    + +appendIfAbsent(anObject) + +

    +

    +Adds each value not already contained by the receiver. Returns self. +
    + +appendSeq(aList1, aList2, ...) + +

    +

    +Add the items in the lists to the receiver. Returns self. +
    + +asClutterVertex + +

    +

    +Converts [[List]] to [[ClutterVertex]]. +
    + +asEncodedList + +

    +

    +Returns a Sequence with an encoding of the list. + Nil, Number and Symbol objects are copied into the encoding, for other object + types, referenceIdForObject(item) will be called to request a reference id for + the object. + + Also see: List fromEncodedList. +
    + +asJson + +

    +

    +Returns JSON encoded representation of a List. +
    + +asMap + +

    +

    +The reverse of Map asList: converts a list of lists (key-value pairs) into + a Map. The first item of each pair list must be a sequence. The second item + is the value. +
    + +asMessage + +

    +

    +Converts each element in the list to unnamed messages with their cached result + set to the value of the element (without activating).Returns an unnamed message + whose arguments map 1:1 with the elements (after being converted to messages themselves). +
    + +at(index) + +

    +

    +Returns the value at index. Returns Nil if the index is out of bounds. +
    + +atInsert(index, anObject) + +

    +

    +Inserts anObject at the index specified by index. + Adds anObject if the index equals the current count of the receiver. + Raises an exception if the index is out of bounds. Returns self. +
    + +atPut(index, anObject) + +

    +

    +Replaces the existing value at index with anObject. + Raises an exception if the index is out of bounds. Returns self. +
    + +average + +

    +

    +Returns the average of the items. +
    + +capacity + +

    +

    +Returns the number of potential elements the receiver can hold before it needs to grow. +
    + +contains(anObject) + +

    +

    +Returns true if the receiver contains anObject, otherwise returns false. +
    + +containsAll(list) + +

    +

    +Returns true the target contains all of the items in the argument list. +
    + +containsAny(list) + +

    +

    +Returns true the target contains any of the items in the argument list. +
    + +containsIdenticalTo(anObject) + +

    +

    +Returns true if the receiver contains a value identical to anObject, otherwise returns false. +
    + +copy(v) + +

    +

    +Replaces self with v list items. Returns self. +
    + +cursor + +

    +

    +Returns a ListCursor for the receiver. +
    + +detect(optionalIndex, value, message) + +

    +

    +Returns the first value for which the message evaluates to a non-nil. Example: +
    list(1, 2, 3, 4) detect(i, v, v > 2)
    +==> 3
    +list(1, 2, 3, 4) detect(v, v > 2)
    +==> 3
    +
    + +difference(list) + +

    +

    +Returns a new list containing items from the target list which aren't in the argument list. +
    + +empty + +

    +

    +Removes all items from the receiver. +
    + +first(optionalSize) + +

    +

    +Returns the first item or Nil if the list is empty. + If optionalSize is provided, that number of the first items in the list are returned. +
    + +flatten + +

    +

    +Creates a new list, with all contained lists flattened into the new list. For example: + +list(1,2,list(3,4,list(5))) flatten +==> list(1, 2, 3, 4, 5) + +
    + +foreach(optionalIndex, value, message) + +

    +

    +Loops over the list values setting the specified index and +value slots and executing the message. Returns the result of the last +execution of the message. Example: +

    +

    +list(1, 2, 3) foreach(i, v, writeln(i, " = ", v))
    +list(1, 2, 3) foreach(v, writeln(v))
    +
    + +fromEncodedList(aSeq) + +

    +

    +Returns a List with the decoded Nils, Symbols and Numbers from the input raw array. + For each object reference encounters, objectForReferenceId(id) will be called to + allow the reference to be resolved. + + Also see: List asEncodedList. +
    + +groupBy + +

    +

    +Group items in a List by common expression value and return them aggregated in a Map. + Note: asJson is used because Map doesn't have asString method implemented. +
    +Io> list("a", "b", "cd") groupBy(size) asJson
    +==> {"2":["cd"],"1":["a","b"]}
    +Io> list("a", "b", "cd") groupBy(v, v containsSeq("c")) asJson
    +==> {"false":["a","b"],"true":["cd"]}
    +Io> list("a", "b", "cd") groupBy(i, v, i == 1) asJson
    +==> {"false":["a","cd"],"true":["b"]}
    +
    +
    + +indexOf(anObject) + +

    +

    +Returns the index of the first occurrence of anObject + in the receiver. Returns Nil if the receiver doesn't contain anObject. +
    + +insertAfter(item, afterItem) + +

    +

    +Inserts item after first occurrence of afterItem and returns self. If afterItem + is not found, item is appended to the end of the list. +
    + +insertAt(item, index) + +

    +

    +Inserts item at the specified index. Raises an exception if the index is + out of bounds. Returns self. +
    + +insertBefore(item, beforeItem) + +

    +

    +Inserts item before first occurrence of beforeItem or to the end of the list if + beforeItem is not found. Returns self. +
    + +intersect(list) + +

    +

    +Returns a new list containing the common values from the target and argument lists. +
    + +itemCopy + +

    +

    +Returns a new list containing the items from the receiver. +
    + +join(optionalSeparator) + +

    +

    +Returns a Sequence of the concatenated items with + optionalSeparator between each item or simply the concatenation of the items if no optionalSeparator is supplied. +
    + +justSerialized(stream) + +

    +

    +Writes the receiver's code into the stream. +
    + +last(optionalSize) + +

    +

    +Returns the last item or Nil if the list is empty. + If optionalSize is provided, that number of the last items in the list are returned. +
    + +map + +

    +

    +Same as mapInPlace, but returns results in a new List. +
    + +mapInPlace(optionalIndex, value, message) + +

    +

    +Replaces each item in the receiver with the result of applying a given message + to that item. Example: +
    list(1, 5, 7, 2) mapInPlace(i, v, i + v)
    +==> list(1, 6, 9, 5)
    +list(1, 5, 7, 2) mapInPlace(v, v + 3)
    + ==> list(4, 8, 10, 5)
    +
    + +pop + +

    +

    +Returns the last item in the list and removes it + from the receiver. Returns nil if the receiver is empty. +
    + +preallocateToSize(aNumber) + +

    +

    +Preallocates array memory to hold aNumber number of items. +
    + +prepend(anObject1, anObject2, ...) + +

    +

    +Inserts the values at the beginning of the list. Returns self. +
    + +push(anObject1, anObject2, ...) + +

    +

    +Same as add(anObject1, anObject2, ...). +
    + +reduce + +

    +

    +Also known as foldl or inject. Combines values in target starting on the left. + If no initial value is passed the head of the list is used.
    +
    +Io> list(1, 2, 3) reduce(+)
    +==> 6
    +Io> list(1, 2, 3) reduce(xs, x, xs + x)
    +==> 6
    +Io> list(1, 2, 3) reduce(+, -6) # Passing the initial value.
    +==> 0
    +Io> list(1, 2, 3) reduce(xs, x, xs + x, -6)
    +==> 0
    +
    +
    + +remove(anObject, ...) + +

    +

    +Removes all occurrences of the arguments from the receiver. Returns self. +
    + +removeAt(index) + +

    +

    +Removes the item at the specified index and returns the value removed. + Raises an exception if the index is out of bounds. +
    + +removeFirst + +

    +

    +Returns the first item and removes it from the list. nil is returned if the list is empty. +
    + +removeLast + +

    +

    +Returns the last item and removes it from the list. nil is returned if the list is empty. +
    + +removeSeq + +

    +

    +Removes each of the items from the current list which are contained in the sequence passed in. +
    + +rest + +

    +

    +Returns a copy of the list but with the first element removed. +
    + +reverse + +

    +

    +Reverses the ordering of all the items of the receiver. Returns copy of receiver. +
    + +reverseForeach(index, value, message) + +

    +

    +Same as foreach, but in reverse order. +
    + +reverseInPlace + +

    +

    +Reverses the ordering of all the items in the receiver. Returns self. +
    + +reverseReduce + +

    +

    +Also known as foldr or inject. Combines values in target starting on the right. + If no initial value is paseed the head of the list is used. See List reverse for examples. +
    + +second + +

    +

    +Returns third element (same as at(2)) +
    + +select + +

    +

    +Same as selectInPlace, but result is a new List. +
    + +selectInPlace(optionalIndex, value, message) + +

    +

    +Like foreach, but the values for which the result of message is either nil + or false are removed from the List. Example: +
    list(1, 5, 7, 2) selectInPlace(i, v, v > 3)
    +==> 5, 7
    +list(1, 5, 7, 2) selectInPlace(v, v > 3)
    + ==> 5, 7
    +
    + +setSize(newSize) + +

    +

    +Sets the size of the receiver by either removing excess items or adding nils as needed. +
    + +shuffle + +

    +

    +Randomizes the ordering of all the items of the receiver. Returns copy of receiver. +
    + +shuffleInPlace + +

    +

    +Randomizes the order of the elements in the receiver. Returns self. +
    + +size + +

    +

    +Returns the number of items in the receiver. +
    + +slice(startIndex, endIndex, step) + +

    +

    +Returns a new string containing the subset of the receiver + from the startIndex to the endIndex. The endIndex argument + is optional. If not given, it is assumed to be the end of the string. + Step argument is also optional and defaults to 1, if not given. + However, since Io supports positional arguments only, you need to + explicitly specify endIndex, if you need a custom step. +
    + +sliceInPlace(startIndex, endIndex, step) + +

    +

    +Returns the receiver containing the subset of the + receiver from the startIndex to the endIndex. The endIndex argument + is optional. If not given, it is assumed to be the end of the string. + Step argument is also optional and defaults to 1. +
    + +sort + +

    +

    +Returns a new list containing the sorted items from the receiver. +
    + +sortBy(aBlock) + +

    +

    +Returns a new list containing the items from the receiver, sorted using aBlock as compare function. Example: +list(1, 3, 2, 4, 0) sortBy(block(a, b, a > b)) +==> list(4, 3, 2, 1, 0) +
    + +sortInPlace(optionalExpression) + +

    +

    +Sorts the list using the compare method on the items. Returns self. + If an optionalExpression is provided, the sort is done on the result of the evaluation + of the optionalExpression on each value. +
    + +sortInPlaceBy(aBlock) + +

    +

    +Sort the list using aBlock as the compare function. Returns self. +
    + +sum + +

    +

    +Returns the sum of the items. +
    + +swapIndices(index1, index2) + +

    +

    +Exchanges the object at index1 with the object at index2. + Raises an exception if either index is out of bounds. Returns self. +
    + +union(list) + +

    +

    +Returns a new list containing items from the target and items which are only in the argument list. +
    + +unique + +

    +

    +Returns a new list containing all the values in the target, but no duplicates. +
    + +uniqueCount + +

    +

    +Returns a list of list(value, count) for each unique value in self. +
    + +with(anObject, ...) + +

    +

    +Returns a new List containing the arguments. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Map/index.html b/io-master/docs/reference/Core/Core/Map/index.html new file mode 100755 index 0000000..1c2c793 --- /dev/null +++ b/io-master/docs/reference/Core/Core/Map/index.html @@ -0,0 +1,237 @@ + + + + + Map + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Map +


    +


    + + + + + + + + + + + + + +
    A key/value dictionary appropriate for holding large key/value collections. +
     
     
     
    + +
    +

    + +asFormEncodedBody + +

    +

    +Returns a urlencoded query string representation of this map +
    + +asJson + +

    +

    +Converts a Map to a string that represents contents in JSON-compilant form +
    + +asList + +

    +

    +Converts a Map to a list of lists. Each element in the returned list will be a list of two elements: the key, and the value. +
    + +asObject + +

    +

    +Create a new Object whose slotDescriptionMap will be equal to self +
    + +asQueryString + +

    +

    +Returns a urlencoded query string representation of this map +
    + +at(keyString, optionalDefaultValue) + +

    +

    +Returns the value for the key keyString. Returns nil if the key is absent. +
    + +atIfAbsentPut(keyString, aValue) + +

    +

    +If a value is present at the specified key, the value is returned. + Otherwise, inserts/sets aValue and returns aValue. +
    + +atPut(keyString, aValue) + +

    +

    +Inserts/sets aValue with the key keyString. Returns self. +
    + +detect(optionalIndex, optionalValue, message) + +

    +

    +Returns a random value for which message evals to non-nil. +
    + +empty + +

    +

    +Removes all keys from the receiver. Returns self. +
    + +foreach(optionalKey, value, message) + +

    +

    +For each key value pair, sets the locals key to +the key and value to the value and executes message. +Example: +
    	aMap foreach(k, v, writeln(k, " = ", v))
    +aMap foreach(v, write(v))
    + +Example use with a block: + +
    	myBlock = block(k, v, write(k, " = ", v, "\n"))
    +aMap foreach(k, v, myBlock(k, v))
    +
    + +hasKey(keyString) + +

    +

    +Returns true if the key is present or false otherwise. +
    + +hasValue(aValue) + +

    +

    +Returns true if the value is one of the Map's values or false otherwise. +
    + +isEmpty + +

    +

    +Returns true if this map doesn't contain any pairs. +
    + +isNotEmpty + +

    +

    +Returns true if this map contains at least one pair. +
    + +justSerialized(stream) + +

    +

    +Writes the receiver's code into the stream. +
    + +keys + +

    +

    +Returns a List of the receivers keys. +
    + +map(key, value, message) + +

    +

    +Create a List of results of message applied to self's items in a random + order. +
    + +merge(anotherMap) + +

    +

    +Returns a new map created by merging the pairs from anotherMap into this map +
    + +mergeInPlace(anotherMap) + +

    +

    +Merges the pairs from anotherMap into this map +
    + +removeAt(keyString) + +

    +

    +Removes the specified keyString if present. Returns self. +
    + +reverseMap + +

    +

    +Creates a new Map using values as keys and keys as values +
    + +select(optionalIndex, optionalValue, message) + +

    +

    +Creates a new Map with keys,values of self for which message evaluated + to non-nil. +
    + +size + +

    +

    +Returns the number of key/value pairs in the receiver. +
    + +values + +

    +

    +Returns a List of the receivers values. +
    + +with(key1, value1, key2, value2, ...) + +

    +

    +Returns a new map containing the given keys and values +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Message/index.html b/io-master/docs/reference/Core/Core/Message/index.html new file mode 100755 index 0000000..0e02c52 --- /dev/null +++ b/io-master/docs/reference/Core/Core/Message/index.html @@ -0,0 +1,389 @@ + + + + + Message + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Message +


    +


    + + + + + + + + + + + + + +
    A Message object encapsulates the action of a message send. +Blocks are composed of a Message and its children. +

    +Terminology +

    +Example:
    +  Io> msg := message(A B(C D); E F)
    +  ==> A B(C D); E F
    +  
    +In the above example:
    +  msg name            =>  A
    +  msg next            =>  B(C D); E F
    +  msg next arguments  =>  list(C D)
    +  msg next next name  =>  ;
    +  msg next next next  =>  E F
    +
    +Important: Modifying the message tree of a block currently in use may cause +a crash if a garbage collection cycle occurs. If the implementation were +changed to retain every called message, this could be avoided. +But the cost to performance seems to outweigh the need to cover this case for now. +
     
     
     
    + +
    +

    + +appendArg(aMessage) + +

    +

    +Adds aMessage to the argument list of receiver. Examples: +
    	
    +Io> message(a) appendArg(message(b))
    +==> a(b)
    +
    +Io> message(a(1,2)) appendArg(message(3))
    +==> a(1, 2, 3)
    +
    +
    + +appendCachedArg(aValue) + +

    +

    +Adds aValue to the argument list of receiver as a cachedResult. +
    + +argAt(indexNumber) + +

    +

    +Returns Message object for the specified argument or Nil if none exists. +
    + +argCount + +

    +

    +Returns the number of arguments this message has. A faster way to do, msg arguments size. Examples, +
    	
    +Io> message(a(1,2,3)) argCount
    +==> 3
    +
    +Io> message(a) argCount
    +==> 0
    +
    +
    + +argsEvaluatedIn(anObject) + +

    +

    +Returns a List containing the argument messages evaluated in the + context of anObject. +
    + +arguments + +

    +

    +Returns a list of the message objects that act as the + receiver's arguments. Modifying this list will not alter the actual + list of arguments. Use the arguments_() method to do that. +
    + +asMessageWithEvaluatedArgs(optionalContext) + +

    +

    +Returns a copy of receiver with arguments evaluated in the context of sender if + optionalContext is nil. +
    + +asSimpleString + +

    +

    +Returns one-line string representation up to 40 characters long. +
    + +asStackEntry + +

    +

    +Returns a string containing message name, file and line. +
    + +asString + +

    +

    +Same as code(). +
    + +cachedResult + +

    +

    +Returns the cached result of the Message or Nil if there is none. +
    + +characterNumber + +

    +

    +Returns the message character number. The character number is typically + the beginning character index in the source text from which the message was read. +
    + +clone + +

    +

    +Returns a Message that is a deep copy of the receiver. +
    + +code + +

    +

    +Returns a String containing a decompiled code representation of the receiver. +
    + +codeOfLength(n) + +

    +

    +Same as Message code, but returns first n characters only. +
    + +description + +

    +

    +Returns a string containing a short description of the method. +
    + +doInContext(anObject, locals) + +

    +

    +Evaluates the receiver in the context of anObject. Optional locals + object is used as message sender. anObject is used as sender otherwise. +
    + +evaluatedArgs + +

    +

    +Returns a List containing the argument messages evaluated in the context. +
    + +fluxPath + +

    +

    +The directory where the .io files for the Flux views are located. This directory is added to the Importer searchPaths. +
    + +fluxSource + +

    +

    +The directory of Flux where Flux.io is located. This directory is added to the Importer searchPaths. +
    + +fromString(aString) + +

    +

    +Returns a new Message object for the compiled(but not executed) + result of aString. +
    + +hasCachedResult + +

    +

    +Returns true if there is a cached result. Nil is a valid cached result. +
    + +isEndOfLine + +

    +

    +Returns true if the message marks the end of the line. A ';' message. +
    + +label + +

    +

    +Returns the message label. The label is typically set to the + name of the file from which the source code for the message was read. +
    + +last + +

    +

    +Returns the last message in the chain. +
    + +lastBeforeEndOfLine + +

    +

    +Returns the last message in the chain before the EndOfLine or nil. +
    + +lineNumber + +

    +

    +Returns the line number of the message. The character number + is typically the line number in the source text from which the message was read. +
    + +name + +

    +

    +Returns the name of the receiver. +
    + +next + +

    +

    +Returns the next message in the message chain or nil if there is no next message. +
    + +nextIgnoreEndOfLines + +

    +

    +Returns the next message in the message chain which is not an + EndOfLine or nil if there is no next message. +
    + +previous + +

    +

    +Returns the previous message in the message chain or Nil if there is no previous message. +
    + +removeCachedResult + +

    +

    +Removes the cached result of the Message. +
    + +setArguments(aListOfMessages) + +

    +

    +Sets the arguments of the receiver to deep copies of + those contained in aListOfMessages. Returns self. +
    + +setCachedArgs(listOfValues) + +

    +

    +Appends evaluated arguments to a message. Returns self. +
    + +setCachedResult(anObject) + +

    +

    +Sets the cached result of the message. Returns self. +
    + +setCharacterNumber(aNumber) + +

    +

    +Sets the character number of the message. Returns self. +
    + +setLabel(aString) + +

    +

    +Sets the label of the message and its children. Returns self. +
    + +setLineNumber(aNumber) + +

    +

    +Sets the line number of the message. Returns self. +
    + +setName(aString) + +

    +

    +Sets the name of the receiver. Returns self. +
    + +setNext(aMessageOrNil) + +

    +

    +Sets the next message in the message chain to a deep copy of + aMessage or it removes the next message if aMessage is nil. +
    + +setPrevious(aMessageOrNil) + +

    +

    +Sets the previous message in the message chain to a deep copy of + aMessage or it removes the previous message if aMessage is Nil. +
    + +union(other) Creates a union of the receiver and the other parameter. + +

    +

    +Returns a new message object with the receivers message as the first argument of the returned message, + and the other parameter's arguments as each successive argument to the new message. +
    +
    +  Io> message(a) union(message(b))
    +  ==> [unnamed](a, b)
    +  
    +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Number/index.html b/io-master/docs/reference/Core/Core/Number/index.html new file mode 100755 index 0000000..73b29d8 --- /dev/null +++ b/io-master/docs/reference/Core/Core/Number/index.html @@ -0,0 +1,785 @@ + + + + + Number + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Number +


    +


    + + + + + + + + + + + + + +
    A container for a double (a 64bit floating point number on most platforms). +
     
     
     
    + +
    +

    + +%(aNumber) + +

    +

    +Returns the receiver modulus aNumber. +
    + +&(aNumber) + +

    +

    +Returns a new number with the bitwise AND of the receiver and aNumber. +
    + +*(aNumber) + +

    +

    +Returns a new number that is the product of the receiver and aNumber. +
    + +**(aNumber) + +

    +

    +Same as pow(aNumber). +
    + ++(aNumber) + +

    +

    +Returns a new number that is the sum of the receiver and aNumber. +
    + +-(aNumber) + +

    +

    +Returns a new number that is the difference of the receiver and aNumber. +
    + +/(aNumber) + +

    +

    +Returns a new number with the value of the receiver divided by aNumber. +
    + +<<(aNumber) + +

    +

    +Shifts the bits of the receiver left by the number of places specified by aNumber. +
    + +>>(aNumber) + +

    +

    +Shifts the bits of the receiver right by the number of places specified by aNumber. +
    + +^(aNumber) + +

    +

    +Returns the bitwise xor with the receiver (both numbers are converted to longs for the operation). +
    + +abs + +

    +

    +Returns a number with the absolute value of the receiver. +
    + +acos + +

    +

    +Returns a number with the arc cosine of the receiver. +
    + +asBinary + +

    +

    +Returns the number as binary digits inside a string. 42 asBinary -> "101010" +
    + +asBuffer(optionalNumberOfBytes) + +

    +

    +Returns a Buffer containing a the number of bytes specified by + optionalNumberOfBytes (up to the size of a double on the platform) of the receiver. + If no optionalNumberOfBytes is specified, it is assumed to be the number of bytes + in a double on the host platform. +
    + +asCharacter + +

    +

    +Returns a String containing a single character whose + value is the value of the first byte of the receiver. + Returns nil if the number has no valid UCS mapping. +
    + +asHex + +

    +

    +Returns the number as hex digits inside a string. 97 asHex -> "61" +
    + +asLowercase + +

    +

    +Returns a new Number containing a lower case version of the receiver. +
    + +asNumber + +

    +

    +Returns self. +
    + +asOctal + +

    +

    +Returns the number as octal digits inside a string. 436 asOctal -> "664" +
    + +asString(optionalIntegerDigits, optionalFactionDigits) + +

    +

    +Returns a string representation of the receiver. For example: +
    +1234.5678 asString(0, 2)
    +
    +would return: +
    +1234.57
    +
    +
    + +asUint32Buffer + +

    +

    +Returns a Sequence containing a 4 byte representation of the uint32 value of the receiver. +
    + +asUppercase + +

    +

    +Returns a new Number containing a upper case version of the receiver. +
    + +asin + +

    +

    +Returns a number with the arc sine of the receiver. +
    + +at(bitIndexNumber) + +

    +

    +Returns a new Number containing 1 if the receiver cast to a long + has its bit set to 1 at bitIndexNumber. Otherwise returns 0. +
    + +atan + +

    +

    +Returns a number with the arc tangent of the receiver. +
    + +atan2(aNumber) + +

    +

    +Returns a number with the arc tangent of y/x where y is the receiver and x is aNumber. +
    + +between(aNumber1, aNumber2) + +

    +

    +Returns true if the receiver's value is between or + equal to aNumber1 and aNumber2, otherwise returns false. +
    + +bitwiseAnd(aNumber) + +

    +

    +Returns a new number with the bitwise AND of the receiver and aNumber. +
    + +bitwiseComplement + +

    +

    +Returns a new number with the bitwise complement of the + receiver. (The 0 bits become 1s and the 1 bits become 0s. ) +
    + +bitwiseOr(aNumber) + +

    +

    +Returns a new number with the bitwise AND of the receiver and aNumber. +
    + +bitwiseXor(aNumber) + +

    +

    +Returns a new number with the bitwise XOR of the receiver and aNumber. +
    + +ceil + +

    +

    +Returns a number with the receiver's value rounded up to + the nearest integer if its fractional component is greater than 0. +
    + +clip(aNumber1, aNumber2) + +

    +

    +Returns self if the receiver is between aNumber1 and aNumber2. + Returns aNumber1 if it is less than aNumber1. Returns aNumber2 if it is greater than aNumber2. +
    + +combinations(size) + +

    +

    +Returns the combinations where the receiver is the number of different objects and size is the number to be arranged. +
    + +constants + +

    +

    +Object containing number constants e, inf, nan and pi. +
    + +cos + +

    +

    +Returns the cosine of the receiver. +
    + +cubed + +

    +

    +Returns the cube of the receiver. +
    + +doubleMin + +

    +

    +Returns the minimum double precision float value. +
    + +e + +

    +

    +Returns the constant e. +
    + +em + +

    +

    +Calls [[ClutterUnits withEm]]. +
    + +emForFont(fontname) + +

    +

    +Calls [[ClutterUnits emForFont]]. +
    + +exp + +

    +

    +Returns e to the power of the receiver. +
    + +factorial + +

    +

    +Returns the factorial of the receiver. +
    + +floatMax + +

    +

    +Returns the maximum double precision float value. +
    + +floatMin + +

    +

    +Returns the minimum float value. +
    + +floor + +

    +

    +Returns a number with the receiver's value rounded + down to the nearest integer if its fractional component is not 0. +
    + +inf + +

    +

    +Returns a not-a-number constant. +
    + +integerMax + +

    +

    +Returns the maximum integer value. +
    + +integerMin + +

    +

    +Returns the minimum integer value. +
    + +isAlphaNumeric + +

    +

    +Returns true if + receiver is an alphanumeric character value + , false otherwise. +
    + +isControlCharacter + +

    +

    +Returns true if + receiver is a control character value + , false otherwise. +
    + +isDigit + +

    +

    +Returns true if + receiver is a numeric digit value + , false otherwise. +
    + +isEven + +

    +

    +Returns true if + integer form of the receiver is even + , false otherwise. +
    + +isGraph + +

    +

    +Returns true if + the receiver is a printing character value except space + , false otherwise. +
    + +isHexDigit + +

    +

    +Returns true if + the receiver is a hexadecimal character value + , false otherwise. +
    + +isInASequenceSet + +

    +

    +Return true if receiver is in one of the Sequence sequenceSets, otherwise false. +
    + +isLetter + +

    +

    +Returns true if + receiver is a letter character value + , false otherwise. +
    + +isLowercase + +

    +

    +Returns true if + the receiver is a lowercase character value + , false otherwise. +
    + +isNan + +

    +

    +Returns true if the receiver is not a number. Otherwise returns false. +
    + +isOdd + +

    +

    +Returns true if + integer form of the receiver is odd + , false otherwise. +
    + +isPrint + +

    +

    +Returns true if + the receiver is a printing character value, including space + , false otherwise. +
    + +isPunctuation + +

    +

    +Returns true if + the receiver is a punctuation character value + , false otherwise. +
    + +isSpace + +

    +

    +Returns true if + the receiver is a space, formfeed, newline carriage return, tab or vertical tab character value + , false otherwise. +
    + +isUppercase + +

    +

    +Returns true if + the receiver is a uppercase character value + , false otherwise. +
    + +justSerialized(stream) + +

    +

    +Writes the receiver's code into the stream. +
    + +log + +

    +

    +Returns the logarithm of the receiver. The base + is taken as the value of the first argument or the constant e if + the first argument is omitted. +
    + +log10 + +

    +

    +Returns the base 10 logarithm of the receiver. +
    + +log2 + +

    +

    +Returns the base 2 logarithm of the receiver. +
    + +longMax + +

    +

    +Returns the maximum long value. +
    + +longMin + +

    +

    +Returns the minimum long value. +
    + +max(aNumber) + +

    +

    +Returns the greater of the receiver and aNumber. +
    + +min(aNumber) + +

    +

    +Returns the lesser of the receiver and aNumber. +
    + +minMax(low, high) + +

    +

    +Returns a number between or equal to low and high. If the receiver is equal to or between low and high, the receiver is returned. If the receiver is less than low, low is returned. If the receiver is greater than high, high is returned. +
    + +mm + +

    +

    +Calls [[ClutterUnits withMm]]. +
    + +mod(aNumber) + +

    +

    +Returns the receiver modulus aNumber. +
    + +nan + +

    +

    +Returns a infinity constant. +
    + +negate + +

    +

    +Returns new number that is negated version of the receiver. +
    + +permutations(size) + +

    +

    +Returns the permutations where the receiver is the number of different objects and size is the number to be arranged. +
    + +pi + +

    +

    +Returns the constant pi. +
    + +pow(aNumber) + +

    +

    +Returns the value of the receiver to the aNumber power. +
    + +print + +

    +

    +Prints the number. +
    + +pt + +

    +

    +Calls [[ClutterUnits withPt]]. +
    + +px + +

    +

    +Calls [[ClutterUnits withPx]]. +
    + +repeat(optionalIndex, expression) + +

    +

    +Evaluates message a number of times that corresponds to the receivers + integer value. This is significantly faster than a for() or while() loop. +
    + +round + +

    +

    +Returns a number with the receiver's value rounded up to + the nearest integer if its fraction component is >= .5 or rounded up to the nearest integer otherwise. +
    + +roundDown + +

    +

    +Returns a number with the receiver's value rounded down to + the nearest integer if its fraction component is <= .5 or rounded up the the nearest integer otherwise. +
    + +shortMax + +

    +

    +Returns the maximum short value. +
    + +shortMin + +

    +

    +Returns the minimum short value. +
    + +sin + +

    +

    +Returns the sine of the receiver. +
    + +sqrt + +

    +

    +Returns the square root of the receiver. +
    + +squared + +

    +

    +Returns the square of the receiver. +
    + +tan + +

    +

    +Returns the tangent of the receiver. +
    + +toBase(base) + +

    +

    +Returns the number in another base. 42 toBase(2) -> "101010" +
    + +toBaseWholeBytes(base) + +

    +

    +Returns the number in another base printing out entire bytes. 42 toBaseWholeBytes(2) -> "00101010" +
    + +toggle + +

    +

    +Returns 1 if the receiver is 0. Returns 0 otherwise. +
    + +unsignedIntMax + +

    +

    +Returns the maximum unsigned int value. +
    + +unsignedLongMax + +

    +

    +Returns the maximum unsigned long value. +
    + +unsignedShortMax + +

    +

    +Returns the minimum unsigned int value. +
    + +|(aNumber) + +

    +

    +Returns a new number with the bitwise OR of the receiver and aNumber. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Object/index.html b/io-master/docs/reference/Core/Core/Object/index.html new file mode 100755 index 0000000..e4ce779 --- /dev/null +++ b/io-master/docs/reference/Core/Core/Object/index.html @@ -0,0 +1,1341 @@ + + + + + Object + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Object +


    +


    + + + + + + + + + + + + + +
    An Object is a key/value dictionary with string keys and values of any type. +The prototype Object contains a clone slot that is a CFunction that creates new objects. +When cloned, an Object will call its init slot (with no arguments). +
     
     
     
    + +
    +

    + +!=(aValue) + +

    +

    +Returns true the receiver is not equal to aValue, false otherwise. +
    + +(expression) + +

    +

    +The '' method evaluates the argument and returns the result. +
    + +-(aNumber) + +

    +

    +Returns the negative version of aNumber. + Raises an exception if argument is not a number. +
    + +..(arg) + +

    +

    +.. is an alias for: method(arg, self asString append(arg asString)) +
    + +<(expression) + +

    +

    +Evaluates argument and returns self if self is less or Nil if not. +
    + +<=(expression) + +

    +

    +Evaluates argument and returns self if self is less + than or equal to it, or Nil if not. +
    + +==(aValue) + +

    +

    +Returns true if receiver and aValue are equal, false otherwise. +
    + +>(expression) + +

    +

    +Evaluates argument and returns self if self is greater than it, or Nil if not. +
    + +>=(expression) + +

    +

    +Evaluates argument and returns self if self is greater + than or equal to it, or Nil if not. +
    + +?(aMessage) + +

    +

    +description: Sends the message aMessage to the receiver if it can respond to it. Example: +
    +	MyObject test // performs test
    +	MyObject ?test // performs test if MyObject has a slot named test
    +	
    + The search for the slot only follows the receivers proto chain. +
    + +@ + +

    +

    +Sends asynchronous message to an object, returns a FutureProxy. +
    + Caller coroutine is paused when proxy is accessed (i.e. message is sent) + till result is ready. Proxy will become an actual result when it is ready. +
    + See IoGuide for more information. +
    + Usage: obj @someMethod(a, b, c) +
    + +@@ + +

    +

    +Same as Object @, but returns nil instead of FutureProxy. +
    + Might be useful in a command line or as a last expression in a block/method when + you don't want to return a future. +
    + +NullCharacter + +

    +

    +A sequence with a single zero byte. +
    + +actorProcessQueue + +

    +

    +Processes each message in a queue, yielding between each message. +
    + +actorRun + +

    +

    +Starts actor mode if not started already. Basically, sets actorProcessQueue for later execution. +
    + +addTrait + +

    +

    +Takes another object, whose slots will be copied into the receiver. Optionally takes a second argument, a Map object containing string -> string pairs, holding conflicting slot names and names to rename them to. I.e., if you have two objects A and B, both have a slot named foo, you issue A addTrait(B, Map clone atPut("foo", "newFoo")) the value of B foo will be placed in A newFoo. +
    + +ancestorWithSlot(slotName) + +

    +

    +Returns the first ancestor of the receiver that contains + a slot of the specified name or Nil if none is found. +
    + +ancestors + +

    +

    +Returns a list of all of the receiver's ancestors as found by recursively following the protos links. +
    + +and(arg) + +

    +

    +Evaluates argument and returns the result. +
    + +appendProto(anObject) + +

    +

    +Appends anObject to the receiver's proto list. Returns self. +
    + +apropos + +

    +

    +Prints out Protos Core slot descriptions. +
    + +argIsActivationRecord + +

    +

    +Note: seems to be an obsolete method. +
    + +argIsCall(arg) + +

    +

    +Returns true if arg is an activation context (i.e. Call object) +
    + Note: this is used internally in one place only (Coroutine callStack). + Refactoring should be considered. +
    + +asSimpleString + +

    +

    +Returns _ string. +
    + +asString + +

    +

    +Same as slotSummary. +
    + +become(anotherObject) + +

    +

    +Replaces receiver with anotherObject and returns self. + Useful for implementing transparent proxies. See also FutureProxy and Object @. +
    + Note: primitives cannot become new values. +
    + +block(args..., body) + +

    +

    +Creates a block and binds it to the sender context (i.e. lexical context). + In other words, block locals' proto is sender's locals. + args is a list of formal arguments (can be empty).
    + body is evaluated in the context of Locals object.
    + See also Object method. +
    +
    +	Io> block(x, x*2) scope == thisContext
    +  ==> true
    +	
    +
    + +break(optionalReturnValue) + +

    +

    +Break the current loop, if any. +
    + +checkMemory() + +

    +

    +Accesses memory in the IoObjectData struct that should be accessible. Should cause a memory access + exception if memory is corrupt. +
    + +clone + +

    +

    +Returns a clone of the receiver. +
    + +cloneWithoutInit + +

    +

    +Returns a clone of the receiver but does not call init. +
    + +compact + +

    +

    +Compact the memory for the object if possible. Returns self. +
    + +compactState + +

    +

    +Attempt to compact the memory of the IoState if possible. +
    + +compare(anObject) + +

    +

    +Returns a number containing the comparison value of the target with anObject. +
    + +contextWithSlot(slotName) + +

    +

    +Returns the first context (starting with the receiver and following the lookup path) + that contains a slot of the specified name or Nil if none is found. +
    + +continue + +

    +

    +Skip the rest of the current loop iteration and start on + the next, if any. +
    + +coroDo(code) + +

    +

    +Creates a new coro to be run in a context of sender and yields to it. + Returns a coro. +
    + +coroDoLater(code) + +

    +

    +Returns a new coro to be run in a context of sender. + New coro is moved to the top of the yieldingCoros queue to be executed + when current coro yields. +
    + Note: run target is self (i.e. receiver), not call sender as in coroDo. +
    + +coroFor(code) + +

    +

    +Returns a new coro to be run in a context of sender. +
    + +coroWith(code) + +

    +

    +Returns a new coro to be run in a context of receiver. +
    + +currentCoro + +

    +

    +Returns the currently running coroutine. +
    + +debugOff + +

    +

    +Sets debugWriteln to nil. Returns self. +
    + +debugOn + +

    +

    +Sets debugWriteln to writeln. Returns self. +
    + +debugWriteln + +

    +

    +Method for writing debug messages (nil/writeln by default) +
    + +deprecatedWarning(optionalNewName) + +

    +

    +Prints a warning message that the current method is deprecated. + If optionalNewName is supplied, the warning will suggest using that instead. + Returns self. +
    + +do(expression) + +

    +

    +Evaluates the message in the context of the receiver. Returns self. +
    + +doFile(pathString) + +

    +

    +Evaluates the File in the context of the receiver. Returns the result. + pathString is relative to the current working directory. +
    + +doMessage(aMessage, optionalContext) + +

    +

    +Evaluates the message object in the context of the receiver. + Returns the result. optionalContext can be used to specific the locals + context in which the message is evaluated. +
    + +doRelativeFile(pathString) + +

    +

    +Evaluates the File in the context of the receiver. Returns the result. + pathString is relative to the file calling doRelativeFile. (Duplicate of relativeDoFile) +
    + +doString(aString) + +

    +

    +Evaluates the string in the context of the receiver. Returns the result. +
    + +doURL(urlString) + +

    +

    +Fetches the URL and evals it in the context of the receiver. +
    + +evalArg(expression) + +

    +

    +The '' method evaluates the argument and returns the result. +
    + +evalArgAndReturnNil(expression) + +

    +

    +Evaluates the argument and returns nil. +
    + +evalArgAndReturnSelf(expression) + +

    +

    +Evaluates the argument and returns the target. +
    + +for(<counter>, <start>, <end>, <do message>) + +

    +

    +A for-loop control structure. See the io Programming Guide for a full description. +
    + +foreach([name,] value, message) + +

    +

    +For each slot, set name to the slot's +name and value to the slot's value and execute message. Examples: +

    +

    +myObject foreach(n, v,
    +	writeln("slot ", n, " = ", v type)
    +)
    +
    +myObject foreach(v,
    +	writeln("slot type ", v type)
    +)
    +
    +
    + +foreachSlot(slotName, slotValue, code) + +

    +

    +Iterates over all the slots in a receiver. Provides slotValue (non-activated) + along with slotName. Code is executed in context of sender. slotName and slotValue + become visible in the receiver (no Locals created! Maybe, it is not the best decision). +
    +
    +  Io> thisContext foreachSlot(n, v, n println)
    +  Lobby
    +  Protos
    +  exit
    +  forward
    +  n
    +  v
    +  ==> false
    +  
    +
    + +forward + +

    +

    +Called when the receiver is sent a message it doesn't recognize. +Default implementation raises an "Object doesNotRespond" exception. +Subclasses can override this method to implement proxies or special error handling. +

    +Example: +

    +

    +myProxy forward = method(
    +	messageName := thisMessage name
    +	arguments := thisMessage arguments
    +	myObject doMessage(thisMessage)
    +)
    +
    +
    + +getLocalSlot(slotNameString) + +

    +

    +Returns the value of the slot named slotNameString + (not looking in the object's protos) or nil if no such slot is found. +
    + +getSlot(slotNameString) + +

    +

    +Returns the value of the slot named slotNameString + (following the lookup path) or nil if no such slot is found. +
    + +handleActorException(exception) + +

    +

    +Callback for handling exceptions during asynchronous message processing. +
    + Default value: method(e, e showStack) +
    + +hasLocalSlot(slotNameString) + +

    +

    +Returns true if the slot exists in the receiver or false otherwise. +
    + +hasProto(anObject) + +

    +

    +Returns true if anObject is found in the proto path of the target, false otherwise. +
    + +hasSlot(name) + +

    +

    +Returns true if slot is found somewhere in the inheritance chain + (including receiver itself). +
    + +if(<condition>, <trueMessage>, <optionalFalseMessage>) + +

    +

    +Evaluates trueMessage if condition evaluates to a non-Nil. + Otherwise evaluates optionalFalseMessage if it is present. + Returns the result of the evaluated message or Nil if none was evaluated. +
    + +ifDebug(code) + +

    +

    +Executes code if debugWriteln is not nil. +
    + +ifError + +

    +

    +Does nothing, returns self. +
    + +ifNil(arg) + +

    +

    +Does nothing, returns self. +
    + +ifNilEval(arg) + +

    +

    +Does nothing, returns self. +
    + +ifNonNil(arg) + +

    +

    +Evaluates argument and returns self. +
    + +ifNonNilEval(arg) + +

    +

    +Evaluates argument and returns the result. +
    + +in(aList) + +

    +

    +Same as: aList contains(self) +
    + +inlineMethod + +

    +

    +Creates a method which is executed directly in a receiver (no Locals object is created). +
    +
    +  Io> m := inlineMethod(x := x*2)
    +  Io> x := 1
    +  ==> 1
    +  Io> m
    +  ==> 2
    +  Io> m
    +  ==> 4
    +  Io> m
    +  ==> 8
    +  
    +
    + +isActivatable + +

    +

    +Returns true if the receiver is activatable, false otherwise. +
    + +isError + +

    +

    +Returns false if not an error. +
    + +isIdenticalTo(aValue) + +

    +

    +Returns true if the receiver is identical to aValue, false otherwise. +
    + +isKindOf(anObject) + +

    +

    +Returns true if anObject is in the receiver's ancestors. +
    + +isLaunchScript + +

    +

    +Returns true if the current file was run on the command line. Io's version of Python's __file__ == "__main__" +
    + +isNil + +

    +

    +Returns false. +
    + +isTrue + +

    +

    +Returns true. +
    + +justSerialized(stream) + +

    +

    +Writes serialized representation to a SerializationStream. Returns stream contents. + [This is unintended side effect! Returned value may change in the future.] +
    + +launchFile(pathString) + +

    +

    +Eval file at pathString as if from the command line in its folder. +
    + +lazySlot(code) + +

    +

    +Defines a slot with a lazy initialization code. + Code is run only once: the first time slot is accessed. + Returned value is stored in a regular slot. +
    +
    +  Io> x := lazySlot("Evaluated!" println; 17)
    +  Io> x
    +  Evaluated!
    +  ==> 17
    +  Io> x
    +  ==> 17
    +  Io> x
    +  ==> 17
    +  
    +
    + Another form is lazySlot(name, code): +
    +
    +  Io> lazySlot("x", "Evaluated!" println; 17)
    +  Io> x
    +  Evaluated!
    +  ==> 17
    +  Io> x
    +  ==> 17
    +  Io> x
    +  ==> 17
    +  
    +
    + +lexicalDo(expression) + +

    +

    +Evaluates the message in the context of the receiver. + The lexical context is added as a proto of the receiver while the argument is evaluated. + Returns self. +
    + +list(...) + +

    +

    +Returns a List containing the arguments. +
    + +localsForward + +

    +

    +CFunction used by Locals prototype for forwarding. +
    + +localsUpdateSlot(slotNameString, valueObject) + +

    +

    +Local's version of updateSlot mthod. +
    + +loop(expression) + +

    +

    +Keeps evaluating message until a break. +
    + +markClean + +

    +

    +Cleans object's slots. +
    + +memorySize + +

    +

    +Return the amount of memory used by the object. +
    + +memorySizeOfState + +

    +

    +Returns the number of bytes in the IoState + (this may not include memory allocated by C libraries). +
    + +message(expression) + +

    +

    +Return the message object for the argument or Nil if there is no argument. + Note: returned object is a mutable singleton. Use "message(foo) clone" if + you wish to modify it. +
    + +method(args..., body) + +

    +

    +Creates a method. + args is a list of formal arguments (can be empty).
    + body is evaluated in the context of Locals object.
    + Locals' proto is a message receiver (i.e. self). +
    + Slot with a method is activatable. Use getSlot(name) to retrieve + method object without activating it (i.e. calling). +
    + See also Object block. +
    + +newSlot(slotName, aValue) + +

    +

    +Creates a getter and setter for the slot with the name slotName + and sets its default value to aValue. Returns self. For example, + newSlot("foo", 1) would create slot named foo with the value 1 as well as a setter method setFoo(). +
    + +not + +

    +

    +Returns nil. +
    + +or(arg) + +

    +

    +Returns true. +
    + +ownsSlots + +

    +

    +A debug method. +
    + +pSlots + +

    +

    +PDB extension to set a list of slots to persist with PDB. +Creates the specified slots using newSlot and sets them to nil. +
    + +pause + +

    +

    +Removes current coroutine from the yieldingCoros queue and + yields to another coro. Exits if no coros left. +
    + See Coroutine documentation for more details. +
    + +perform(methodName, <arg1>, <arg2>, ...) + +

    +

    +Performs the method corresponding to methodName with the arguments supplied. +
    + +performWithArgList(methodName, argList) + +

    +

    +Performs the method corresponding to methodName with the arguments in the argList. +
    + +persist + +

    +

    +Force immediate persistence of this object with PDB. +
    + +persistData + +

    +

    +Force immediate persistence of this object's serialized form (using asSerialization) +into PDB, if possible. +
    + +persistMetaData + +

    +

    +Force immediate persistence of this object's type data into PDB +
    + +persistSlots + +

    +

    +Force immediate persistence of this object's dirty slots into PDB. +
    + +ppid + +

    +

    +This PDB extension returns a unique identifier for this object and registers it +for persistence with PDB. +
    + +prependProto(anObject) + +

    +

    +Prepends anObject to the receiver's proto list. Returns self. +
    + +print + +

    +

    +Prints a string representation of the object. Returns Nil. +
    + +println + +

    +

    +Same as print, but also prints a new line. Returns self. +
    + +proto + +

    +

    +Same as; method(self protos first) +
    + +protos + +

    +

    +Returns a copy of the receiver's protos list. +
    + +raiseIfError + +

    +

    +Does nothing, returns self. +
    + +relativeDoFile(pathString) + +

    +

    +Evaluates the File in the context of the receiver. Returns the result. + pathString is relative to the file calling doRelativeFile. (Duplicate of doRelativeFile) +
    + +removeAllProtos + +

    +

    +Removes all of the receiver's protos. Returns self. +
    + +removeAllSlots + +

    +

    +Removes all of the receiver's slots. Returns self. +
    + +removeProto(anObject) + +

    +

    +Removes anObject from the receiver's proto list if it + is present. Returns self. +
    + +removeSlot(slotNameString) + +

    +

    +Removes the specified slot (only) in the receiver if it exists. Returns self. +
    + +resend + +

    +

    +Send the message used to activate the current method to the Object's proto. + For example: +
    +  Dog := Mammal clone do(
    +    init := method(
    +  	  resend
    +    )
    +  )
    +  
    + Calling Dog init will send an init method to Mammal, but using the Dog's context. +
    + +return(anObject) + +

    +

    +Return anObject from the current execution block. +
    + +returnIfError + +

    +

    +Does nothing, returns self. +
    + +returnIfNonNil + +

    +

    +Returns the receiver from the current execution block if it is non nil. + Otherwise returns the receiver locally. +
    + +self + +

    +

    +Returns self. +
    + +serialized + +

    +

    +Returns a serialized representation of the receiver. +
    +
    +  Io> Object clone do(x:=1) serialized
    +  ==> Object clone do(
    +  	x := 1
    +  )
    +  
    +
    + +serializedSlots(stream) + +

    +

    +Writes all slots to a stream. +
    + +serializedSlotsWithNames(names, stream) + +

    +

    +Writes selected slots to a stream. +
    + +setIsActivatable(aValue) + +

    +

    +When called with a non-Nil aValue, sets the object + to call its activate slot when accessed as a value. Turns this behavior + off if aValue is Nil. Only works on Objects which are not Activatable + Primitives (such as CFunction or Block). Returns self. +
    + +setPpid + +

    +

    +PDB extension to set the value returned by ppid. +
    + +setProto(anObject) + +

    +

    +Sets the first proto of the receiver to anObject, replacing the + current one, if any. Returns self. +
    + +setProtos(aList) + +

    +

    +Replaces the receiver's protos with a copy of aList. Returns self. +
    + +setSlot(slotNameString, valueObject) + +

    +

    +Sets the slot slotNameString in the receiver to + hold valueObject. Returns valueObject. +
    + +setSlotWithType(slotNameString, valueObject) + +

    +

    +Sets the slot slotNameString in the receiver to + hold valueObject and sets the type slot of valueObject + to be slotNameString. Returns valueObject. +
    + +shallowCopy + +

    +

    +Returns a shallow copy of the receiver. +
    + +shouldPersistByDefault + +

    +

    +PDB boolean flag indicating whether this object should be considered for persistence +when persistence has not been specifically requested by calling ppid() or PDB addObjectToPersist. +Always false by default for Object. +
    + +slotDescriptionMap + +

    +

    +Returns raw map of slot names and short values' descriptions. + See also Object slotSummary. +
    + +slotNames + +

    +

    +Returns a list of strings containing the names of the + slots in the receiver (but not in its lookup path). +
    + +slotSummary + +

    +

    +Returns a formatted slotDescriptionMap. +
    +
    +  Io> slotSummary
    +  ==>  Object_0x30c590:
    +    Lobby            = Object_0x30c590
    +    Protos           = Object_0x30c880
    +    exit             = method(...)
    +    forward          = method(...)
    +  
    +
    + +slotValues + +

    +

    +Returns a list of the values held in the slots of the receiver. +
    + +stopStatus + +

    +

    +Returns the internal IoState->stopStatus. +
    + +super(aMessage) + +

    +

    +Sends the message aMessage to the receiver's proto with the context of self. Example: +
    +	self test(1, 2)   // performs test(1, 2) on self
    +	super(test(1, 2)) // performs test(1, 2) on self proto but with the context of self
    +	
    +
    + +switch(<key1>, <expression1>, <key2>, <expression2>, ...) + +

    +

    +Execute an expression depending on the value of the caller. (This is an equivalent to C switch/case) + + hour := Date hour switch( + 12, "midday", + 0, "midnight", + 17, "teatime", + Date hour asString + ) + +
    + +thisContext + +

    +

    +Synonym to self. +
    + +thisLocalContext + +

    +

    +Returns current locals. +
    + +thisMessage + +

    +

    +Returns the calling message (i.e. thisMessage itself, huh). +
    + +try(code) + +

    +

    +Executes particular code in a new coroutine. + Returns exception or nil if no exception is caught. +
    + See also documentation for Exception catch and pass. +
    + +type + +

    +

    +Returns a string containing the name of the type of Object (Number, String, etc). +
    + +uniqueHexId + +

    +

    +Returns uniqueId in a hexadecimal form (with a "0x" prefix) +
    +  Io> Object uniqueId
    +  ==> 3146784
    +  Io> Object uniqueHexId
    +  ==> 0x300420
    +  
    +
    + +uniqueId + +

    +

    +Returns a Number containing a unique id for the receiver. +
    + +unpersist + +

    +

    +PDB extension to populate this object with the data associated with this object's ppid from PDB. +
    + +updateSlot(slotNameString, valueObject) + +

    +

    +Same as setSlot(), but raises an error if the slot does not + already exist in the receiver's slot lookup path. +
    + +wait(s) + +

    +

    +Pauses current coroutine for at least s seconds. +
    + Note: current coroutine may wait much longer than designated number of seconds + depending on circumstances. +
    + +while(<condition>, expression) + +

    +

    +Keeps evaluating message until condition return Nil. + Returns the result of the last message evaluated or Nil if none were evaluated. +
    + +write(<any number of arguments>) + +

    +

    +Sends a print message to the evaluated result of each argument. Returns Nil. +
    + +writeln(<any number of arguments>) + +

    +

    +Same as write() but also writes a return character at the end. Returns Nil. +
    + +yield + +

    +

    +Yields to another coroutine. Does nothing if yieldingCoros queue is empty. +
    + See Coroutine documentation for more details. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Profiler/index.html b/io-master/docs/reference/Core/Core/Profiler/index.html new file mode 100755 index 0000000..b21594a --- /dev/null +++ b/io-master/docs/reference/Core/Core/Profiler/index.html @@ -0,0 +1,57 @@ + + + + + Profiler + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Profiler +


    +


    + + + + + + + + + + + + + +
    Basic support for profiling Io code execution. +
     
     
     
    + +
    +

    + +reset + +

    +

    +Resets the profilerTime on all Block objects in the system. +
    + +timedObjects + +

    +

    +Returns a list of objects found in the system that have profile times. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Sandbox/index.html b/io-master/docs/reference/Core/Core/Sandbox/index.html new file mode 100755 index 0000000..209ed10 --- /dev/null +++ b/io-master/docs/reference/Core/Core/Sandbox/index.html @@ -0,0 +1,85 @@ + + + + + Sandbox + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Sandbox +


    +


    + + + + + + + + + + + + + +
    Sandbox can be used to run separate instances of Io within the same process. +
     
     
     
    + +
    +

    + +doSandboxString(aString) + +

    +

    +Evaluate aString inside the Sandbox. +
    + +messageCount + +

    +

    +Returns a number containing the messageCount limit of the Sandbox. +
    + +printCallback(string) + +

    +

    +default implementation is; method(string, string print) +
    + +setMessageCount(anInteger) + +

    +

    +Sets the messageCount limit of the receiver. +
    + +setTimeLimit(aDouble) + +

    +

    +Sets the time limit of the Sandbox. +
    + +timeLimit + +

    +

    +Returns a number containing the time limit of calls made to the Sandbox. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Scheduler/index.html b/io-master/docs/reference/Core/Core/Scheduler/index.html new file mode 100755 index 0000000..e492e86 --- /dev/null +++ b/io-master/docs/reference/Core/Core/Scheduler/index.html @@ -0,0 +1,78 @@ + + + + + Scheduler + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Scheduler +


    +


    + + + + + + + + + + + + + +
    Io's coroutine scheduler. +
     
     
     
    + +
    +

    + +currentCoroutine + +

    +

    +Returns the currently running coroutine. +
    + +setTimers(aListOfTimers) + +

    +

    +Sets the list of active timers. +
    + +setYieldingCoros(aListOfCoros) + +

    +

    +Sets the list of yielding Coroutine objects. +
    + +timers + +

    +

    +The List of active timers. +
    + +yieldingCoros + +

    +

    +The List of yielding Coroutine objects. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/Sequence/index.html b/io-master/docs/reference/Core/Core/Sequence/index.html new file mode 100755 index 0000000..479daf1 --- /dev/null +++ b/io-master/docs/reference/Core/Core/Sequence/index.html @@ -0,0 +1,1748 @@ + + + + + Sequence + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +Sequence +


    +


    + + + + + + + + + + + + + +
    A Sequence is a container for a list of data elements. Typically these elements are each 1 byte in size. A Sequence can be either mutable or immutable. When immutable, only the read-only methods can be used. +

    +Terminology +

      +
    • Buffer: A mutable Sequence of single byte elements, typically in a binary encoding +
    • Symbol or String: A unique immutable Sequence, typically in a character encoding +
    +
     
     
     
    + +
    +

    + +*(aSeq) + +

    +

    +Multiplies the values of aSeq to the corresponding values of the receiver + returning a new vector with the result. + Only works on Sequences whose item type is numeric. +
    + +**(aSeq) + +

    +

    +Raises the values of the receiver in the corresponding values of aSeq + returning a new vector with the result. + Only works on Sequences whose item type is numeric. +
    + +**=(aSeq) + +

    +

    +Raises the values of the receiver in the corresponding values of aSeq. + Only works on Sequences whose item type is numeric. Returns self. +
    + +*=(aSeq) + +

    +

    +Multiplies the values of aSeq to the corresponding values of the receiver. + Only works on Sequences whose item type is numeric. Returns self. +
    + ++(aSeq) + +

    +

    +Vector addition - adds the values of aSeq to the corresponding values of the receiver + returning a new vector with the result. + Only works on Sequences whose item type is numeric. +
    + ++=(aSeq) + +

    +

    +Vector addition - adds the values of aSeq to those of the receiver. + Only works on Sequences whose item type is numeric. Returns self. +
    + +-(aSeq) + +

    +

    +Vector subtraction - Subtracts the values of aSeq from the corresponding values of the receiver + returning a new vector with the result. + Only works on Sequences whose item type is numeric. +
    + +-=(aSeq) + +

    +

    +Vector subtraction - subtracts the values of aSeq to those of the receiver. + Only works on Sequences whose item type is numeric. Returns self. +
    + +..(aSequence) + +

    +

    +Returns a copy of the receiver with aSequence appended to it. +
    + +/(aSeq) + +

    +

    +Divides the values of the receiver by the corresponding values of aSeq + returning a new vector with the result. + Only works on Sequences whose item type is numeric. +
    + +/=(aSeq) + +

    +

    +Divides the values of aSeq to the corresponding values of the receiver. + Only works on Sequences whose item type is numeric. Returns self. +
    + +Max + +

    +

    +Returns the maximum value in the sequence. +
    + +Min + +

    +

    +Returns the minimum value in the sequence. +
    + +abs + +

    +

    +Sets each value of the Sequence to its absolute value. +Returns self. +
    + +acos + +

    +

    +Sets each value of the Sequence to the trigonometric arcsine of its value. +Returns self. +
    + +afterSeq(aSequence) + +

    +

    +Returns the slice of the receiver (as a Symbol) after aSequence or + nil if aSequence is not found. If aSequence is empty, the receiver + (or a copy of the receiver if it is mutable) is returned. +
    + +alignCenter(width, [padding]) "" + +

    +

    +Example: + + Io> "abc" alignCenter(10, "-") + ==> ---abc---- + Io> "abc" alignCenter(10, "-=") + ==> -=-abc-=-= + +
    + +alignLeft(width, [padding]) + +

    +

    +Example: +

    + + Io> "abc" alignLeft(10, "+") + ==> abc+++++++ + Io> "abc" alignLeft(10, "-=") + ==> abc-=-=-=- + +

    + +alignLeftInPlace(width, [padding]) + +

    +

    +Same as align left but operation is performed on the receiver. +
    + +alignRight(width, [padding]) + +

    +

    +Example: +

    + + Io> "abc" alignRight(10, "-") + ==> -------abc + Io> "abc" alignRight(10, "-=") + ==> -=-=-=-abc + +

    + +allMatchesOfRegex(aRegexOrString) + +

    +

    +Returns a List containing all matches of the given regex found in the receiver. +
    + +append(aNumber) + +

    +

    +Appends aNumber (cast to a byte) to the receiver. Returns self. +
    + +appendPathSeq(aSeq) + +

    +

    +Appends argument to the receiver such that there is one + and only one path separator between the two. Returns self. +
    + +appendSeq(object1, object2, ...) + +

    +

    +Calls asString on the arguments and appends the string to the receiver. Returns self. +
    + +asBase64(optionalCharactersPerLine) + +

    +

    +Returns an immutable, base64 encoded (according to RFC 1421) version of self. + optionalCharactersPerLine describes the number of characters between line breaks and defaults to 0. +
    + +asBinaryNumber + +

    +

    +Returns a Number containing the first 8 bytes of the + receiver without casting them to a double. Endian is same as machine. +
    + +asBinarySignedInteger + +

    +

    +Returns a Number with the bytes of the receiver interpreted as a binary signed integer. Endian is same as machine. +
    + +asBinaryUnsignedInteger + +

    +

    +Returns a Number with the bytes of the receiver interpreted as a binary unsigned integer. Endian is same as machine. +
    + +asCapitalized + +

    +

    +Returns a copy of the receiver with the first charater made uppercase. +
    + +asClutterColor + +

    +

    +Calls [[ClutterColor with]] with self as an argument. +
    + +asClutterUnit + +

    +

    +Calls [[ClutterUnit withString]]. +
    + +asFile + +

    +

    +Returns a new File object with the receiver as its path. +
    + +asFixedSizeType + +

    +

    +Returns a new sequence with the receiver encoded in the + minimal fixed width text encoding that its characters can fit + into (either, ascii, utf8, utf16 or utf32). +
    + +asHTML + +

    +

    +SGML extension to interpret the Sequence as HTML and return an SGML object using SGMLParser elementForString +
    + +asHex + +

    +

    +Returns a hex string for the receiving sequence, e.g., \"abc\" asHex -> \"616263\".") +
    + +asIoPath + +

    +

    +Returns a Io style path for an OS style path. +
    + +asJid + +

    +

    +Converts Sequence to JID object.
    "cow@moo.com/Scandinavia" asJid
    +
    + +asJson + +

    +

    +Converts to form that could be interpreted as json if it already contains json, e.g. {"aaa":"bbb"} --> "{\"aaa\":\"bbb\"}" +
    + +asList + +

    +

    +Returns the receiver converted to a List containing all elements of the Sequence. +
    + +asLowercase + +

    +

    +Returns a symbol containing the reveiver made lowercase. +
    + +asMessage(optionalLabel) + +

    +

    +Returns the compiled message object for the string. +
    + +asMutable + +

    +

    +Returns a mutable copy of the receiver. +
    + +asNumber + +

    +

    +Returns the receiver converted to a number. + Initial whitespace is ignored. +
    + +asOSPath + +

    +

    +Returns a OS style path for an Io style path. +
    + +asRegex + +

    +

    +Returns a new Regex created from the receiver. +
    + +asSGML + +

    +

    +SGML extension to interpret the Sequence as SGML and return an SGML object using SGMLParser elementForString +
    + +asStruct(memberList) + +

    +

    +For a sequence that contains the data for a raw memory data structure (as used in C), +this method can be used to extract its members into an Object. The memberList argument +specifies the layout of the datastructure. Its form is: +

    +list(memberType1, memberName1, memberType2, memberName2, ...) +

    +Member types include: +

    +int8, int16, int32, int64
    +uint8, uint16, uint32, uint64
    +float32, float64 
    +
    +Example: +
    +pointObject := structPointSeq asStruct(list("float32", "x", "float32", "y"))
    +
    +The output pointObject would contain x and y slots with Number objects. +
    + +asSymbol + +

    +

    +Returns a immutable Sequence (aka Symbol) version of the receiver. +
    + +asUCS2 + +

    +

    +Returns a new copy of the receiver converted to UCS2 (fixed character width UTF16) encoding. +
    + +asUCS4 + +

    +

    +Returns a new copy of the receiver converted to UCS4 (fixed character width UTF32) encoding. +
    + +asURL + +

    +

    +Returns a new URL object instance with the receiver as its url string. +
    + +asUTF8 + +

    +

    +Returns a new copy of the receiver converted to utf8 encoding. +
    + +asUppercase + +

    +

    +Returns a symbol containing the reveiver made uppercase. +
    + +asUrl + +

    +

    +Shortcut for HCUrl with(aUrlSeq) +
    + +asXML + +

    +

    +SGML extension to interpret the Sequence as XML and return an SGML object using SGMLParser elementForString +
    + +asin + +

    +

    +Sets each value of the Sequence to the trigonometric arcsine of its value. +Returns self. +
    + +at(aNumber) + +

    +

    +Returns a value at the index specified by aNumber. + Returns nil if the index is out of bounds. +
    + +atInsertSeq(indexNumber, object) + +

    +

    +Calls asString on object and inserts the string at position indexNumber. Returns self. +
    + +atPut(aNumberIndex, aNumber) + +

    +

    +Sets the value at the index specified by aNumberIndex to aNumber. Returns self. +
    + +atan + +

    +

    +Sets each value of the Sequence to the trigonometric arctangent of its value. +Returns self. +
    + +beforeSeq(aSequence) + +

    +

    +Returns the slice of the receiver (as a Symbol) before + aSequence or self if aSequence is not found. +
    + +beginsWithSeq(aSequence) + +

    +

    +Returns true if the receiver begins with aSequence, false otherwise. +
    + +betweenSeq(aSequence, anotherSequence) + +

    +

    +Returns a new Sequence containing the bytes between the + occurrence of aSequence and anotherSequence in the receiver. + If aSequence is empty, this method is equivalent to beforeSeq(anotherSequence). + If anotherSequence is nil, this method is equivalent to afterSeq(aSequence). + nil is returned if no match is found. +
    + +bitAt(bitIndex) + +

    +

    +Returns a Number containing the bit at the bit index value. +
    + +bitCount + +

    +

    +Returns the number of bits in the sequence. +
    + +bitwiseAnd(aSequence) + +

    +

    +Updates the receiver to be the result of a bitwiseAnd with aSequence. Returns self. +
    + +bitwiseNot(aSequence) + +

    +

    +Updates the receiver to be the result of a bitwiseNot with aSequence. Returns self. +
    + +bitwiseOr(aSequence) + +

    +

    +Updates the receiver to be the result of a bitwiseOr with aSequence. Returns self. +
    + +bitwiseXor(aSequence) + +

    +

    +Updates the receiver to be the result of a bitwiseXor with aSequence. Returns self. +
    + +byteAt(byteIndex) + +

    +

    +Returns a Number containing the byte at the byte index value. +
    + +capitalize + +

    +

    +First charater of the receiver is made uppercase. +
    + +ceil + +

    +

    +Round each value to smallest integral value not less than x. +Returns self. +
    + +clear + +

    +

    +Set all values in the sequence to 0. Returns self. +
    + +clipAfterSeq(aSequence) + +

    +

    +Removes the contents of the receiver after the end of + the first occurrence of aSequence. Returns true if anything was + removed, or false otherwise. +
    + +clipAfterStartOfSeq(aSequence) + +

    +

    +Removes the contents of the receiver after the beginning of + the first occurrence of aSequence. Returns true if anything was + removed, or false otherwise. +
    + +clipBeforeEndOfSeq(aSequence) + +

    +

    +Removes the contents of the receiver before the end of + the first occurrence of aSequence. Returns true if anything was + removed, or false otherwise. +
    + +clipBeforeSeq(aSequence) + +

    +

    +Clips receiver before aSequence. +
    + +cloneAppendPath(aSequence) + +

    +

    +Appends argument to a copy the receiver such that there is one + and only one path separator between the two and returns the result. +
    + +contains(aNumber) + +

    +

    +Returns true if the receiver contains an element equal in value to aNumber, false otherwise. +
    + +containsAnyCaseSeq(aSequence) + +

    +

    +Returns true if the receiver contains the aSequence + regardless of casing, false otherwise. +
    + +containsSeq(aSequence) + +

    +

    +Returns true if the receiver contains the substring + aSequence, false otherwise. +
    + +convertToItemType(aTypeName) + +

    +

    +Converts the underlying machine type for the elements, expanding or contracting + the size of the Sequence as needed. + Valid names are uint8, uint16, uint32, uint64, int8, int16, int32, + int64, float32, and float64. Note that 64 bit types are only available + on platforms that support such types. Returns self. +
    + +copy(aSequence) + +

    +

    +Replaces the bytes of the receiver with a copy of those in aSequence. Returns self. +
    + +cos + +

    +

    +Sets each value of the Sequence to the trigonometric cosine of its value. +Returns self. +
    + +cosh + +

    +

    +Sets each value of the Sequence to the hyperbolic cosine of its value. +Returns self. +
    + +distanceTo(aSeq) + +

    +

    +Returns a number with the square root of the sum of the square + of the differences of the items between the sequences. +
    + +dotProduct(aSeq) + +

    +

    +Returns a new Sequence containing the dot product of the receiver with aSeq. +
    + +duplicateIndexes + +

    +

    +Duplicates all indexes in the receiver. +For example, list(1,2,3) duplicateIndexes == list(1,1,2,2,3,3). Returns self. +
    + +empty + +

    +

    +Sets all bytes in the receiver to 0x0 and sets + its length to 0. Returns self. +
    + +encoding + +

    +

    +Returns the encoding of the elements. +
    + +endsWithSeq(aSequence) + +

    +

    +Returns true if the receiver ends with aSequence, false otherwise. +
    + +escape + +

    +

    +Escape characters in the receiver are replaced with escape codes. + For example a string containing a single return character would contain the + following 2 characters after being escaped: "\n". Returns self. +
    + +escapeRegexChars + +

    +

    +Returns a clone of the receiver with all special regular expression characters + ("^", "$", etc) backslashed. Useful if you have a string that contains such characters, + but want it to be treated as a literal string. +
    + +exclusiveSlice(inclusiveStartIndex, exclusiveEndIndex) + +

    +

    +Returns a new string containing the subset of the + receiver from the inclusiveStartIndex to the exclusiveEndIndex. The exclusiveEndIndex argument + is optional. If not given, it is assumed to be one beyond the end of the string. +
    + +exp + +

    +

    +Sets each value of the Sequence to e**value. +Returns self. +
    + +fileName + +

    +

    +Returns the last path component sans the path extension. +
    + +findNthSeq(aSequence, n) + +

    +

    +Returns a number with the nth occurrence of aSequence. +
    + +findRegex(aRegexOrString, [startIndex]) + +

    +

    +Returns the first match of the given regex in the receiver, after the given start index. + If you don't specify a start index, the search will start at the beginning of the receiver. + The method returns nil if no match is found. +
    + +findSeq(aSequence, optionalStartIndex) + +

    +

    +Returns a number with the first occurrence of aSequence in + the receiver after the startIndex. If no startIndex is specified, + the search starts at index 0. + nil is returned if no occurrences are found. +
    + +findSeqs(listOfSequences, optionalStartIndex) + +

    +

    +Returns an object with two slots - an \"index\" slot which contains + the first occurrence of any of the sequences in listOfSequences found + in the receiver after the startIndex, and a \"match\" slot, which + contains a reference to the matching sequence from listOfSequences. + If no startIndex is specified, the search starts at index 0. + nil is returned if no occurrences are found. +
    + +floor + +

    +

    +Round each value to largest integral value not greater than x. +Returns self. +
    + +foreach(optionalIndex, value, message) + +

    +

    +For each element, set index to the index of the +element and value to the element value and execute message. +Example: +
    	
    +aSequence foreach(i, v, writeln("value at index ", i, " is ", v))
    +aSequence foreach(v, writeln("value ", v))
    +
    +
    + +fromBase(aNumber) + +

    +

    +Returns a number with a base 10 representation of the receiver + converted from the specified base. Only base 2 through 32 are currently supported. +
    + +fromBase64 + +

    +

    +Returns an immutable, base64 decoded (according to RFC 1421) version of self. +
    + +greaterThan(aSeq) + +

    +

    +Returns true if the receiver is greater than aSeq, false otherwise. +
    + +greaterThanOrEqualTo(aSeq) + +

    +

    +Returns true if the receiver is greater than or equal to aSeq, false otherwise. +
    + +hasMatchOfRegex(aRegexOrString) + +

    +

    +Returns true if the string contains one or more matches of the given regex. +
    + +hash + +

    +

    +Returns a Number containing a hash of the Sequence. +
    + +inclusiveSlice(inclusiveStartIndex, inclusiveEndIndex) + +

    +

    +Returns a new string containing the subset of the + receiver from the inclusiveStartIndex to the inclusiveEndIndex. The inclusiveEndIndex argument + is optional. If not given, it is assumed to be the end of the string. +
    + +interpolate(ctx) + +

    +

    +Returns immutable copy of self with interpolateInPlace(ctx) passed to the copy. +
    + +interpolateInPlace(optionalContext) + +

    +

    +Replaces all #{expression} with expression evaluated in the optionalContext. + If optionalContext not given, the current context is used. Returns self. +
    + +isEmpty + +

    +

    +Returns true if the size of the receiver is 0, false otherwise. +
    + +isEqualAnyCase(aSequence) + +

    +

    +Returns true if aSequence is equal to the receiver + ignoring case differences, false otherwise. +
    + +isLowercase + +

    +

    +Returns self if all the characters in the string are lower case. +
    + +isMutable + +

    +

    +Returns true if the receiver is a mutable Sequence or false otherwise. +
    + +isSymbol + +

    +

    +Returns true if the receiver is a + immutable Sequence (aka, a Symbol) or false otherwise. +
    + +isUppercase + +

    +

    +Returns self if all the characters in the string are upper case. +
    + +isZero + +

    +

    +Returns true if all elements are 0, false otherwise. +
    + +itemCopy + +

    +

    +Returns a new sequence containing the items from the receiver. +
    + +itemSize + +

    +

    +Returns number of bytes in each element. +
    + +itemType + +

    +

    +Returns machine type of elements. +
    + +justSerialized(stream) + +

    +

    +Writes the receiver's code into the stream. +
    + +lastPathComponent + +

    +

    +Returns a string containing the receiver clipped up + to the last path separator. +
    + +lessThan(aSeq) + +

    +

    +Returns true if the receiver is less than aSeq, false otherwise. +
    + +lessThanOrEqualTo(aSeq) + +

    +

    +Returns true if the receiver is less than or equal to aSeq, false otherwise. +
    + +linePrint + +

    +

    +Prints the Sequence and a newline character. +
    + +log + +

    +

    +Sets each value of the Sequence to the natural log of its value. +Returns self. +
    + +log10 + +

    +

    +Sets each value of the Sequence to the base 10 log of its value. +Returns self. +
    + +logicalAnd(aSequence) + +

    +

    +Updates the receiver's values to be the result of a logical OR operations with the values of aSequence. Returns self. +
    + +logicalOr(aSequence) + +

    +

    +Updates the receiver's values to be the result of a logical OR operations with the values of aSequence. Returns self. +
    + +lowercase + +

    +

    +Makes all the uppercase characters in the receiver lowercase. Returns self. +
    + +lstrip(aSequence) + +

    +

    +Strips the characters in aSequence +stripped from the beginning of the receiver. Example: +

    +

    	
    +"Keep the tail" lstrip(" eKp")
    +==> "the tail"
    +
    +
    + +makeFirstCharacterLowercase + +

    +

    +Receiver must be mutable (see also asMutable). Returns receiver. +
    +
    +  Io> "ABC" asMutable makeFirstCharacterLowercase
    +  ==> aBC
    +  
    +
    + +makeFirstCharacterUppercase + +

    +

    +Receiver must be mutable (see also asMutable). Returns receiver. +
    +
    +  Io> "abc" asMutable makeFirstCharacterUppercase
    +  ==> Abc
    +  
    +
    + +matchesOfRegex(aRegexOrString) + +

    +

    +Returns a RegexMatches object that enumerates all matches of the given regex in the receiver. +
    + +matchesRegex(aRegexOrString) + +

    +

    +Returns true if the receiver matches the given regex, false if not. +
    + +max + +

    +

    +Returns the maximum value of the Sequence. +
    + +mean + +

    +

    +Returns the arithmetic mean of the sequence. +
    + +meanSquare + +

    +

    +Returns the arithmetic mean of the sequence's values after they have been squared. +
    + +min + +

    +

    +Returns the minimum value of the Sequence. +
    + +negate + +

    +

    +Negates the values of the receiver. +Returns self. +
    + +normalize + +

    +

    +Divides each value of the Sequence by the max value of the sequence. +Returns self. +
    + +occurrencesOfSeq(aSeq) + +

    +

    +Returns count of aSeq in the receiver. +
    + +pack(format, value1, ...) + +

    +

    +Returns a new Sequence with the values packed in. + + Codes: + + *: (one at the beginning of the format string) declare format string as BigEndian + B: unsigned byte + b: byte + C: unsigned char + c: char + H: unsigned short + h: short + I: unsigned int + i: int + L: unsigned long + l: long + f: float + F: double + s: string + + A '*' at the begging of the format string indicates native types are to be treated as Big Endiand. + + A number preceding a code declares an array of that type. + + In the case of 's', the preceding number indicates the size of the string to be packed. + If the string passed is shorter than size, 0 padding will be used to fill to size. If the + string passed is longer than size, only size chars will be packed. + + The difference between b/B and c/C is in the values passed to pack. For b/B pack expects a number. + For c/C pack expects a one-char-string (this is the same as '1s' or 's') + + Examples: + + s := Sequence pack("IC5s", 100, "a", "hello") + s := Sequence pack("5c", "h", "e", "l", "l", "o") + s := Sequence pack("I", 0x01020304) + s := Sequence pack("*I", 0x01020304) +
    + +pathComponent + +

    +

    +Returns a slice of the receiver before the last path separator as a symbol. +
    + +pathExtension + +

    +

    +Returns a string containing the receiver clipped up to the last period. +
    + +percentDecoded + +

    +

    +Returns percent decoded version of receiver. +
    + +percentEncoded + +

    +

    +Returns percent encoded version of receiver. +
    + +preallocateToSize(aNumber) + +

    +

    +If needed, resize the memory alloced for the receivers + byte array to be large enough to fit the number of bytes specified by + aNumber. This is useful for pio_reallocating the memory so it doesn't + keep getting allocated as the Sequence is appended to. This operation + will not change the Sequence's length or contents. Returns self. +
    + +prependSeq(object1, object2, ...) + +

    +

    +Prepends given objects asString in reverse order to the receiver. Returns self.") +
    + +print + +

    +

    +Prints contents of a sequence. +
    + +product + +

    +

    +Returns the product of all the sequence's values multipled together. +
    + +rangeFill + +

    +

    +Sets the values of the Sequence to their index values. +Returns self. +
    + +removeAt(index) + +

    +

    +Removes the item at index. Returns self. +
    + +removeEvenIndexes + +

    +

    +Removes even indexes in the receiver. +For example, list(1,2,3) removeEvenIndexes == list(1, 3). Returns self. +
    + +removeLast + +

    +

    +Removes the last element from the receiver. Returns self. +
    + +removeOddIndexes + +

    +

    +Removes odd indexes in the receiver. +For example, list(1,2,3) removeOddIndexes == list(2). Returns self. +
    + +removePrefix(aSequence) + +

    +

    +If the receiver begins with aSequence, it is removed. Returns self. +
    + +removeSeq(aSequence) + +

    +

    +Removes occurrences of aSequence from the receiver. +
    + +removeSlice(startIndex, endIndex) + +

    +

    +Removes the items from startIndex to endIndex. + Returns self. +
    + +removeSuffix(aSequence) + +

    +

    +If the receiver end with aSequence, it is removed. Returns self. +
    + +repeated(n) + +

    +

    +Returns a new sequence containing the receiver repeated n number of times. +
    + +replaceFirstSeq(aSequence, anotherSequence, optionalStartIndex) + +

    +

    +Returns a new Sequence with the first occurrence of aSequence + replaced with anotherSequence in the receiver. If optionalStartIndex is + provided, the search for aSequence begins at that index. Returns self. +
    + +replaceMap(aMap) + +

    +

    +In the receiver, the keys of aMap replaced with its values. Returns self. +
    + +replaceSeq(aSequence, anotherSequence) + +

    +

    +Returns a new Sequence with all occurrences of aSequence + replaced with anotherSequence in the receiver. Returns self. +
    + +reverse + +

    +

    +Reverses the ordering of all the items of the receiver. Returns copy of receiver. +
    + +reverseFindSeq(aSequence, startIndex) + +

    +

    +Returns a number with the first occurrence of aSequence in + the receiver before the startIndex. The startIndex argument is optional. + By default reverseFind starts at the end of the string. Nil is + returned if no occurrences are found. +
    + +reverseInPlace + +

    +

    +Reverses the bytes in the receiver, in-place. +
    + +rstrip(aSequence) + +

    +

    +Strips the characters in +aSequence stripped from the end of the receiver. Example: +
    	
    +"Cut the tail off" rstrip(" afilot")
    +==> "Cut the"
    +
    +
    + +set(aNumber1, aNumber2, ...) + +

    +

    +Sets the values of the receiver to the sequences of numbers in the arguments. + Unset values will remain unchanged. + Returns self. +
    + +setEncoding(encodingName) + +

    +

    +Sets the encoding flag of the receiver (only the encoding flag, + itemSize and itemType will change, no conversion is done between UTF + encodings - you can use convertToUTF8, etc methods for conversions). + Valid encodings are number, utf8, utf16, and utf32. Returns self. +
    + +setItemType(aTypeName) + +

    +

    +Sets the underlying machine type for the elements. + Valid names are uint8, uint16, uint32, uint64, int8, int16, int32, + int64, float32, and float64. Note that 64 bit types are only available + on platforms that support such types. Returns self. +
    + +setItemsToDouble(aNumber) + +

    +

    +Sets all items in the Sequence to the double floating point value of aNumber. +
    + +setItemsToLong(aNumber) + +

    +

    +Sets all items in the Sequence to the long integer value of aNumber. +
    + +setSize(aNumber) + +

    +

    +Sets the length in bytes of the receiver to aNumber. Return self. +
    + +sin + +

    +

    +Sets each value of the Sequence to the trigonometric sine of its value. +Returns self. +
    + +sinh + +

    +

    +Sets each value of the Sequence to the hyperbolic sine of its value. +Returns self. +
    + +size + +

    +

    +Returns the length in number of items (which may or may not +be the number of bytes, depending on the item type) of the receiver. For example: +

    +

    	
    +"abc" size == 3
    +
    +
    + +sizeInBytes + +

    +

    +Returns the length in bytes of the receiver. +
    + + +slice + +

    +

    +Deprecated method. Use exSlice instead. + +
    + +slicesBetween(startSeq, endSeq) + +

    +

    +Returns a list of slices delimited + by startSeq and endSeq. +
    +
    +  Io> "" slicesBetween("<", ">")
    +  ==> list("a", "b", "/b", "/a")
    +  
    +
    + +sort + +

    +

    +Sorts the characters/numbers in the array. Returns self. +
    + +split Returns a list containing the sub-sequences of the receiver divided by the given arguments. + +

    +

    +If no arguments are given the sequence is split on white space. +
    + +split(optionalArg1, optionalArg2, ...) + +

    +

    +Returns a list containing the sub-sequences of the receiver divided by the given arguments. +If no arguments are given the sequence is split on white space. +Examples: +
    	
    +"a b c d" split == list("a", "b", "c", "d")
    +"a*b*c*d" split("*") == list("a", "b", "c", "d")
    +"a*b|c,d" split("*", "|", ",") == list("a", "b", "c", "d")
    +"a   b  c d" split == list("a", "", "", "", "b", "", "", "c", "", "d")
    +
    +
    + +splitAt(indexNumber) + +

    +

    +Returns a list containing the two parts of the receiver as split at the given index. +
    + +splitAtRegex(aRegexOrString) + +

    +

    +Splits the receiver into pieces using the given regex as the delimiter and + returns the pieces as a list of strings. +
    + +splitNoEmpties(optionalArg1, optionalArg2, ...) + +

    +

    +Returns a list containing the non-empty sub-sequences of the receiver divided by the given arguments. + If no arguments are given the sequence is split on white space. + Examples: + + "a b c d" splitNoEmpties => list("a", "b", "c", "d") + "a***b**c*d" splitNoEmpties("*") => list("a", "b", "c", "d") + "a***b||c,d" splitNoEmpties("*", "|", ",") => list("a", "b", "c", "d") + +
    + +sqrt + +

    +

    +Sets each value of the Sequence to the square root of its value. +Returns self. +
    + +square + +

    +

    +Sets each value of the Sequence to the square of its value. +Returns self. +
    + +strip(optionalSequence) + +

    +

    +Trims the whitespace (or optionalSequence) off both ends: +

    +

    	
    +"   Trim this string   \r\n" strip
    +==> "Trim this string"
    +
    +
    + +sum + +

    +

    +Returns the sum of the Sequence. +
    + +tan + +

    +

    +Sets each value of the Sequence to the trigonometric tangent of its value. +Returns self. +
    + +tanh + +

    +

    +Sets each value of the Sequence to the hyperbolic tangent of its value. +Returns self. +
    + +toBase(aNumber) + +

    +

    +Returns a Sequence containing the receiver (which is + assumed to be a base 10 number) converted to the specified base. + Only base 8 and 16 are currently supported. +
    + +translate(fromChars, toChars) + +

    +

    +In the receiver, the characters in fromChars are replaced with those in the same positions in toChars. Returns self. +
    + +unescape + +

    +

    +Escape codes replaced with escape characters. Returns self. +
    + +unpack(optionalStartPosition, format) + +

    +

    +Unpacks self into a list using the format passed in. See Sequence pack. + + Returns a List. + + Examples: + + s := Sequence pack("IC5s", 100, "a", "hello") + l := s unpack("IC5s") + + s := Sequence pack("5c", "h", "e", "l", "l", "o") + l := s unpack("5c") + + s := Sequence pack("I", 0x01020304) + l := s unpack("I") + + s := Sequence pack("*I", 0x01020304) + l := s unpack("*I") + + l := "hello" unpack("5c") +
    + +uppercase + +

    +

    +Makes all characters of the receiver uppercase. +
    + +urlDecoded + +

    +

    +Returns url decoded version of receiver. +
    + +urlEncoded + +

    +

    +Returns url encoded version of receiver. +
    + +whiteSpaceStrings + +

    +

    +Returns a List of strings. Each string contains a different + whitespace character. +
    + +with(aSequence, ...) + +

    +

    +Returns a new Sequence which is the concatenation of the arguments. + The returned sequence will have the same mutability status as the receiver. +
    + +withStruct(memberList) + +

    +

    +This method is useful for producing a Sequence containing a raw datastructure with +the specified types and values. The memberList format is: +

    +list(memberType1, memberName1, memberType2, memberName2, ...) +

    +Member types include: +

    +int8, int16, int32, int64
    +uint8, uint16, uint32, uint64
    +float32, float64 
    +
    +Example: +
    +pointStructSeq := Sequence withStruct(list("float32", 1.2, "float32", 3.5))
    +
    +The output pointStructSeq would contain 2 raw 32 bit floats. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/System/index.html b/io-master/docs/reference/Core/Core/System/index.html new file mode 100755 index 0000000..840679f --- /dev/null +++ b/io-master/docs/reference/Core/Core/System/index.html @@ -0,0 +1,256 @@ + + + + + System + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +System +


    +


    + + + + + + + + + + + + + +
    Contains methods related to the IoVM. +
     
     
     
    + +
    +

    + +activeCpus + +

    +

    +Returns the number of active CPUs. +
    + +args + +

    +

    +Returns the list of command line argument strings the program was run with. +
    + +daemon(dontChroot, dontRedirectOutputStreams) + +

    +

    +Become a daemon process. If dontChroot is false, the process will change its directory to /. If dontRedirectOutputStreams is false, stdout and stderr are redirected to /dev/null. +
    + +distribution + +

    +

    +Returns the Io distribution name as a string. +
    + +errorNumber + +

    +

    +Returns the C errno string. +
    + +exit(optionalReturnCodeNumber) + +

    +

    +Shutdown the IoState (io_free all objects) and return +control to the calling program (if any). +
    + +getEnvironmentVariable(nameString) + +

    +

    +Returns a string with the value of the environment + variable whose name is specified by nameString. +
    + +getOptions(args) + +

    +

    +This primitive is used to get command line options similar to Cs getopt(). + It returns a map in containing the left side of the argument, with the + value of the right side. (The key will not contain + the beginning dashes (--). +

    + Example: +

    +	options := System getOptions(args)
    +	options foreach(k, v,
    +	  if(v type == List type,
    +		v foreach(i, j, writeln(\"Got unnamed argument with value: \" .. j))
    +		continue
    +	  )
    +	  writeln(\"Got option: \" .. k .. \" with value: \" .. v)
    +	)
    +	
    +
    + +installPrefix + +

    +

    +Returns the root path where io was installed. The default is /usr/local. +
    + +ioPath + +

    +

    +Returns the path of io installation. The default is $INSTALL_PREFIX/lib/io. +
    + +iospecVersion + +

    +

    +The version of IoSpec our IoVM is compatible with +
    + +iovmName + +

    +

    +The name of our IoVM as used by IoSpec +
    + +launchPath + +

    +

    +Returns a pathComponent of the launch file. +
    + +launchScript + +

    +

    +Returns the path of the io file run on the command line. Returns nil if no file was run. +
    + +maxRecycledObjects + +

    +

    +Returns the max number of recycled objects used. +
    + +platform + +

    +

    +Returns a string description of the platform. +
    + +platformVersion + +

    +

    +Returns the version id of the OS. +
    + +recycledObjectCount + +

    +

    +Returns the current number of objects being held for recycling. +
    + +runCommand + +

    +

    +Calls system and redirects stdout/err to tmp files. Returns object with exitStatus, stdout and stderr slots. +
    + +setEnvironmentVariable(keyString, valueString) + +

    +

    +Sets the environment variable keyString to the value valueString. +
    + +setLobby(anObject) + +

    +

    +Sets the root object of the garbage collector. +
    + +setMaxRecycledObjects(aNumber) + +

    +

    +Sets the max number of recycled objects used. +
    + +sleep(secondsNumber) + +

    +

    +Performs a *blocking* sleep call for specified number of seconds. +
    + +symbols + +

    +

    +Returns a List containing all Symbols currently in the system. +
    + +system(aString) + +

    +

    +Makes a system call and returns a Number for the return value. +
    + +thisProcessPid() + +

    +

    +Return the process id (pid) for this Io process. +
    + +userInterruptHandler + +

    +

    +Called when control-c is hit. Override to add custom behavior. Returns self. +
    + +version + +

    +

    +Returns a version number for Io. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/WeakLink/index.html b/io-master/docs/reference/Core/Core/WeakLink/index.html new file mode 100755 index 0000000..25bbd7a --- /dev/null +++ b/io-master/docs/reference/Core/Core/WeakLink/index.html @@ -0,0 +1,62 @@ + + + + + WeakLink + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Core +  /   +WeakLink +


    +


    + + + + + + + + + + + + + +
    A WeakLink is a primitive that can hold a reference to + an object without preventing the garbage collector from + collecting it. The link reference is set with the setLink() method. + After the garbage collector collects an object, it informs any + (uncollected) WeakLink objects whose link value pointed to that + object by calling their "collectedLink" method. +
     
     
     
    + +
    +

    + +link + +

    +

    +Returns the link pointer or Nil if none is set. +
    + +setLink(aValue) + +

    +

    +Sets the link pointer. Returns self. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Core/index.html b/io-master/docs/reference/Core/Core/index.html new file mode 100755 index 0000000..fa8f630 --- /dev/null +++ b/io-master/docs/reference/Core/Core/index.html @@ -0,0 +1,74 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Core/Flux/index.html b/io-master/docs/reference/Core/Flux/index.html new file mode 100755 index 0000000..752e578 --- /dev/null +++ b/io-master/docs/reference/Core/Flux/index.html @@ -0,0 +1,51 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Core/NotificationCenter/Notification/index.html b/io-master/docs/reference/Core/NotificationCenter/Notification/index.html new file mode 100755 index 0000000..c5b298e --- /dev/null +++ b/io-master/docs/reference/Core/NotificationCenter/Notification/index.html @@ -0,0 +1,73 @@ + + + + + Notification + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +NotificationCenter +  /   +Notification +


    +


    + + + + + + + + + +
     
     
     
    + +
    +

    + +name + +

    +

    +Returns the name of the notification. +
    + +post + +

    +

    +Posts the notification to the NotificationCenter. +
    + +sender + +

    +

    +Returns the sender of the notification. +
    + +setName(anObject) + +

    +

    +Sets the name of the Notification. Returns self. +
    + +setSender(anObject) + +

    +

    +Sets the sender of the Notification. Returns self. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/NotificationCenter/NotificationCenter/index.html b/io-master/docs/reference/Core/NotificationCenter/NotificationCenter/index.html new file mode 100755 index 0000000..2bea05b --- /dev/null +++ b/io-master/docs/reference/Core/NotificationCenter/NotificationCenter/index.html @@ -0,0 +1,83 @@ + + + + + NotificationCenter + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +NotificationCenter +  /   +NotificationCenter +


    +


    + + + + + + + + + + + + + +
    +An NotificationCenter similar to the one found in Apple's FoundationKit. +

    +Example use: +

    +// in listener
    +listener := NotificationListener clone setTarget(self) setName("FeedDownloadedFile") start
    +
    +// in sender
    +Notification clone setSender(self) setName("FeedDownloadedFile") post
    +
    +// note: notifications can also be reused, and any extra data can be added in it's slots
    +
    +// to stop listening
    +listener stop
    +
    +
     
     
     
    + +
    +

    + +addListener(aNotificationListener) + +

    +

    +Removes aNotificationListener from listeners list. Returns self. +
    + +listeners + +

    +

    +Returns list of NotificationListeners. +
    + +postNotification(aNotification) + +

    +

    +Sends aNotification to be handled by listeners. Returns self. +Implementation: +
    +listeners foreach(handleNotification(n))
    +
    +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/NotificationCenter/NotificationListener/index.html b/io-master/docs/reference/Core/NotificationCenter/NotificationListener/index.html new file mode 100755 index 0000000..0deda92 --- /dev/null +++ b/io-master/docs/reference/Core/NotificationCenter/NotificationListener/index.html @@ -0,0 +1,113 @@ + + + + + NotificationListener + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +NotificationCenter +  /   +NotificationListener +


    +


    + + + + + + + + + +
     
     
     
    + +
    +

    + +action + +

    +

    +Returns the name of the message that is sent to the target when a matching notification is found. +
    + +handleNotification(aNotification) + +

    +

    +Checks to see if aNotification matches the listener criteria and if so, sends it to the target. Implementation: +
    +if((name == nil or name == n name) and(sender == nil or sender == n sender),
    +	target perform(action, n)
    +)
    +
    +
    + +name + +

    +

    +Returns the message name that the listener wants to receive messages for. +
    + +sender + +

    +

    +Returns the sender that the listener wants to receive messages from. +
    + +setAction(messageName) + +

    +

    +Sets the name of the message that is sent to the target when a matching notification is found. Returns self. +
    + +setName(aSeq) + +

    +

    +Sets the message name that the listener wants to receive messages for. Returns self. +
    + +setSender(anObject) + +

    +

    +Sets the sender that the listener wants to receive messages from. Returns self. +
    + +setTarget(anObject) + +

    +

    +Sets the target that the receiver sends matching messages to. Returns self. +
    + +start + +

    +

    +Removes the receiver to the NotificationCenter set of listeners. Returns self. +
    + +target + +

    +

    +Returns the target that the receiver sends matching messages to. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/NotificationCenter/index.html b/io-master/docs/reference/Core/NotificationCenter/index.html new file mode 100755 index 0000000..5f50937 --- /dev/null +++ b/io-master/docs/reference/Core/NotificationCenter/index.html @@ -0,0 +1,53 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Core/Range/Range/index.html b/io-master/docs/reference/Core/Range/Range/index.html new file mode 100755 index 0000000..019bb89 --- /dev/null +++ b/io-master/docs/reference/Core/Range/Range/index.html @@ -0,0 +1,237 @@ + + + + + Range + + + + + +
    +

    Io Reference

    +


    +


    +Core +  /   +Range +  /   +Range +


    +


    + + + + + + + + + + + + + +
    Simple datastructure representing the items at and between two specific points. +
     
     
     
    + +
    +

    + +asList + +

    +

    +Returns a list containing all the items within and including the ranges starting and ending points. +
    + +at(position) + +

    +

    +Rewinds the range, skips forward until we're at the supplied position then returns the value at that position. Raises an exception if the position is out of bounds. +
    + +contains + +

    +

    +Returns a boolean value if the range contains the argument. +
    + +first + +

    +

    +Moves the current cursor to the beginning of the range, and returns it. +
    + +foreach(optionalIndex, value, message) + +

    +

    +Iterates over each item beginning with the starting point, and finishing at + the ending point inclusive. This method can operate several ways; these include: + (1) Takes one argument, the message tree to be executed during each iteration; (2) + Takes two arguments, the first argument is the name of the current value being + iterated over, and the second is the message tree to be executed during each + iteration; (3) Takes three arguments: the first is the current index within the + range, the second is the name of the current value being iterated over, and the + third is the message tree to be executed during each iteration. + For example: +
    +// First method (operating on numbers)
    +1 to(10) foreach("iterating" print) // prints "iterating" 10 times
    +// Second method (operating on numbers)
    +1 to(10) foreach(v, v print) // prints each value
    +// Third method (operating on numbers)
    +1 to(10) foreach(i, v, writeln(i .. ": " .. v)) // prints "index: value"
    +
    +
    + +index + +

    +

    +Returns the current index number starting from zero and extending +outward up to the maximum number of items in the range. +
    + +indexOf(aValue) + +

    +

    +Calculates each value, checking to see if it matches the aValue parameter. If so, return the position within the range. NOTE: This method rewinds the range before searching. If you need to revert back to your original position, make a duplicate of the range, and use indexOf on it instead. +
    + +last + +

    +

    +Moves the current cursor to the end of the range, and returns it. +
    + +levenshtein(other) + +

    +

    +Returns the levenshtein distance to other. +
    + +map(optionalIndex, value, message) + +

    +

    +Returns a new list which contains the result of the 'body' for every element + stepped over in the range, from the starting point to the ending point inclusive. + This method can operate several ways; these include: + (1) Takes one argument, the message tree to be executed during each iteration; (2) + Takes two arguments, the first argument is the name of the current value being + iterated over, and the second is the message tree to be executed during each + iteration; (3) Takes three arguments: the first is the current index within the + range, the second is the name of the current value being iterated over, and the + third is the message tree to be executed during each iteration. + For example: +
    +# First method (operating on numbers)
    +1 to(10) map(*2) # multiply each value by two
    +# Second method (operating on numbers)
    +1 to(10) map(v, "#{v}" interpolate) # returns string representation of each value as list
    +# Third method (operating on numbers)
    +1 to(10) map(i, v, i*v) #  multiply each value by index
    +
    +
    + +next + +

    +

    +Sets the current item in the range to the next item in the range, + and returns a boolean value indicating whether it is not at the end of the range. +
    + +nextInSequence(skipVal) + +

    +

    +Returns the next item in the sequence. The optional skipVal parameter allows you to skip ahead skipVal places. +
    + +previous + +

    +

    +Sets the current item in the range to the previous item in the range, + and returns a boolean value indicating whether it is not at the beginning of the range. +
    + +rewind + +

    +

    +Sets the current item and the index to the values the receiver started out with. +
    + +select + +

    +

    +Operates the same as 'List select' +
    + +setRange(start, end, increment) + +

    +

    +Has several modes of operation. First, if only two parameters are specified, + the increment value is set to 1 by default, while the first parameter represents + the point to start from, and the second parameter represents the point to end at. + If the second parameter is smaller than the first, the range will operate backwards. + If the third parameter is specified, a custom iteration value will be used instead of 1. +
    + +slice(start, end, [by]) + +

    +

    +Returns a list containing the values from the Range starting at the start parameter, ending at the end parameter, and optionally incremented by the by parameter. +
    + +to + +

    +

    +Convenience constructor that returns a cursor object representing the range of numbers from the receiver to the 'endingPoint' parameter. Increments over each item in that range by 1. +
    + +to(endpoint) + +

    +

    +Convenience constructor that returns a range of sequences from the receiver to the endpoint argument. Increments over each item in that range by 1. +
    + +toBy(endingPoint, incrementValue) + +

    +

    +Convenience constructor that returns a cursor object representing the range of numbers from the receiver to the 'endingPoint' parameter. Increments over each item in that range by the 'incrementValue' parameter. +
    + +toBy(endpoint, increment) + +

    +

    +Convenience constructor that returns a range of sequences from the receiver to the endpoint argument. Increments over each item in that range by the value of the increment parameter. The increment parameter must be positive. +
    + +value + +

    +

    +Returns the value of the current item in the range. +
    +
    +




    + + diff --git a/io-master/docs/reference/Core/Range/index.html b/io-master/docs/reference/Core/Range/index.html new file mode 100755 index 0000000..f5e46bd --- /dev/null +++ b/io-master/docs/reference/Core/Range/index.html @@ -0,0 +1,51 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Core/index.html b/io-master/docs/reference/Core/index.html new file mode 100755 index 0000000..e39eaf0 --- /dev/null +++ b/io-master/docs/reference/Core/index.html @@ -0,0 +1,47 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Databases/DBI/DBI/index.html b/io-master/docs/reference/Databases/DBI/DBI/index.html new file mode 100755 index 0000000..9728d05 --- /dev/null +++ b/io-master/docs/reference/Databases/DBI/DBI/index.html @@ -0,0 +1,89 @@ + + + + + DBI + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +DBI +  /   +DBI +


    +


    + + + + + + + + + + + + + +
    An object for wrapping libdbi to allow Io access to +a multitude of database systems transparently. +
     
     
     
    + +
    +

    + +drivers + +

    +

    +Get a list of drivers and its associated information: + +
      +
    1. name
    2. +
    3. description
    4. +
    5. filename
    6. +
    7. version
    8. +
    9. date compiled
    10. +
    11. maintainer
    12. +
    13. url
    14. +
    +
    + +init + +

    +

    +Initialize the DBI environment with the default driver path. +
    + +initWithDriversPath + +

    +

    +Initialize the DBI environment with the specified libdbi driver path. +
    + +version + +

    +

    +Return string version of libdbi being used. +
    + +with(driverName) + +

    +

    +Get a new connection with the given driver. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/DBI/DBIConn/index.html b/io-master/docs/reference/Databases/DBI/DBIConn/index.html new file mode 100755 index 0000000..d0d228d --- /dev/null +++ b/io-master/docs/reference/Databases/DBI/DBIConn/index.html @@ -0,0 +1,154 @@ + + + + + DBIConn + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +DBI +  /   +DBIConn +


    +


    + + + + + + + + + + + + + +
    An object that represents a DBI Connection. +
     
     
     
    + +
    +

    + +close + +

    +

    +Close the connection to the database. +
    + +connect + +

    +

    +Connect to the database server. +
    + +driver + +

    +

    +Return database driver name. +
    + +execute(sql_query) + +

    +

    +Perform a database query that expects no results. + Returns the number of rows affected. +
    + +option(key) + +

    +

    +Retrieve an option value for the connection. +
    + +optionClear(key) + +

    +

    +Clear a specific option associated with the connection. +
    + +optionPut(key,value) + +

    +

    +Add an option key, value pair to the connection. +
    + +options + +

    +

    +Retrieve an option list of the connection. +
    + +optionsClear + +

    +

    +Clear all options associated with the connection +
    + +ping + +

    +

    +Ping the database to see if it's alive. + Will return true if it is, otherwise false. +
    + +query(sql_query) + +

    +

    +Perform a database query returning a DBIResult object. +
    + +queryOne([object], sql) + +

    +

    +Perform a query and return the first + result. + + If [object] is supplied, the object is populated with the contents of the + result, the result is marked done and the object is returned. +
    + +quote(value) + +

    +

    +Quote a string value according to the database server's specifications. +
    + +sequenceLast([name]) + +

    +

    +Return the last inserted sequence value. +
    + +sequenceNext([name]) + +

    +

    +Return the next sequence that will be used during an INSERT query. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/DBI/DBIRecord/index.html b/io-master/docs/reference/Databases/DBI/DBIRecord/index.html new file mode 100755 index 0000000..b4db1e1 --- /dev/null +++ b/io-master/docs/reference/Databases/DBI/DBIRecord/index.html @@ -0,0 +1,84 @@ + + + + + DBIRecord + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +DBI +  /   +DBIRecord +


    +


    + + + + + + + + + + + + + +
    A DBI Record. When utilizing `foreach' or `populate' methods +of a DBIResult object, you can pass an optional Object cloned from DBIRecord. +This object will be populated with the row contents making it possible to +write objects that represent your SQL results. A simple example would be: + +
    +Person := DBIRecord clone do (fullName := method(firstName.." "..lastName))
    +q := conn query("SELECT id, firstName, lastName FROM people")
    +q foreach(Person, p, writeln("Name = ", p fullName))
    +
    + +As you can see, fullName was not in the SQL query, however, a dynamic method +in your Person class. + +DBIRecord in and of itself provides no real functionality. It simply acts +as an Object and stores the values from the SQL query into a Map. You can +access the field information: + +
    +o := r populate(Person)
    +o firstName            // would retrieve the firstName value of the SQL query
    +o setFirstName("John") // would update the object's firstName value to be John
    +
    + +Do not confuse the above example as updating the actual database. The call +to setFirstName only updates the objects representation of firstName. +
     
     
     
    + +
    +

    + + +forward + +

    +

    +Private method that implements getting and setting values. + +
    + +with(aMap) + +

    +

    +Returns a new DBIRecord instance for the given value map. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/DBI/DBIResult/index.html b/io-master/docs/reference/Databases/DBI/DBIResult/index.html new file mode 100755 index 0000000..d967f3c --- /dev/null +++ b/io-master/docs/reference/Databases/DBI/DBIResult/index.html @@ -0,0 +1,153 @@ + + + + + DBIResult + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +DBI +  /   +DBIResult +


    +


    + + + + + + + + + + + + + +
    A DBI Result created by a call to DBIConn query. +
     
     
     
    + +
    +

    + +at(index_or_name) + +

    +

    +Returns the contents of the given field. + The parameter can be a field index or a field name. +
    + +done + +

    +

    +Close and free the result. This must be called on +each result. Failure to do so will cause memory leaks and open queries with +the database server. +
    + +fields + +

    +

    +Returns a list of field names in the result. +
    + +first + +

    +

    +Move the cursor to the first record. +
    + +foreach([Object], value, message) + +

    +

    +Loops over the records in the result starting at either the first result +(if the cursor has never been moved) or its current location if moved. i.e. + +
    +r := conn query("SELECT * FROM people")
    +r foreach(r, r at(1))
    +
    + +The above would start at the first row, however, you can move around in the +result set and then foreach would pickup where you left off, for instance, say +you wanted to skip the first three rows: + +
    +r := conn query("SELECT * FROM people")
    +r seek(4)
    +r foreach(r, r at (1))
    +
    + +The above would start at the record #4, not at the beginning. + +The optional Object parameter would cause a decendent of DBIRecord to be +populate instead of the index being set. This allows for advanced +functionality. Please see `DBIRecord' for further information and an example. +
    + +last + +

    +

    +Move the cursor to the last record. +
    + +next + +

    +

    +Move the cursor to the next record. +
    + +populate(object) + +

    +

    +Populates a decendent of DBIRecord with the current record's contents. + See `DBIRecord' for further explanation and an example. +
    + +position + +

    +

    +Return the current row's position (or index). +
    + +previous + +

    +

    +Move the cursor to the previous record. +
    + +seek(row_number) + +

    +

    +Move the cursor to the nth record. +
    + +size + +

    +

    +Returns the number of rows available. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/DBI/index.html b/io-master/docs/reference/Databases/DBI/index.html new file mode 100755 index 0000000..cec99fb --- /dev/null +++ b/io-master/docs/reference/Databases/DBI/index.html @@ -0,0 +1,62 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Databases/Memcached/Memcached/index.html b/io-master/docs/reference/Databases/Memcached/Memcached/index.html new file mode 100755 index 0000000..a8cebb6 --- /dev/null +++ b/io-master/docs/reference/Databases/Memcached/Memcached/index.html @@ -0,0 +1,214 @@ + + + + + Memcached + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +Memcached +  /   +Memcached +


    +


    + + + + + + + + + + + + + +
    memcached is a high-performance, +distributed memory object caching system, generic in nature, +but intended for use in speeding up dynamic web applications +by alleviating database load. Memcached is an Io client library for memcached, +based on C libmemcached. +
     
     
     
    + +
    +

    + +add(key, value[, expiration]) + +

    +

    +Asks memcached to store the value identified by the key, +but only if the server *doesn't* already hold data for this key. +Returns true on success, false in case of a collision. +Otherwise raises an exception. +
    + +addServer(address) + +

    +

    +Adds a memcached server. address is a "host:port" string, e.g., "127.0.0.1:11211" +Returns self. +
    + +append(key, value) + +

    +

    +Asks memcached to add this value to an existing key after existing value. +Returns true on success, otherwise raises an exception. +value should be a Sequence. +Supported by memcached 1.2.4+ +
    + +at(key, optionalDefaultValue) + +

    +

    +Asks memcached to retrieve data corresponding to the key. + Returns nil if the data is not there (or if the data *is* nil). +
    + +atIfAbsentPut(key, value[, expiration]) + +

    +

    +If a value is present at the specified key, its value is returned. + Otherwise, inserts the new value and returns it. +
    + +atPut(key, value[, expiration]) + +

    +

    +Asks memcached to store the value identified by the key. + Same as Memcached set, but returns self. +
    + +decr([offset]) + +

    +

    +Asks memcached to decrement data for some item in place. The data for the item is +treated as decimal representation of a 64-bit unsigned integer. If the +current data value does not conform to such a representation, the +commands behave as if the value were 0. +Default offset is 1. +Returns the new value. +
    + +delete(key[, time]) + +

    +

    +Asks memcached to delete an item with the given key. +time is the amount of time in seconds (or Unix time until which) +the client wishes the server to refuse "add" and "replace" commands +with this key. +Returns true on success, false if there is no item with the given key. +Otherwise raises an exception. +
    + +flushAll([expiration]) + +

    +

    +Asks memcached to invalidate all existing items immediately (by default) +or after the expiration specified. +Always returns true. +
    + +get(key) + +

    +

    +Asks memcached to retrieve data corresponding to the key. +Raises "NOT FOUND" if the data is not there. +
    + +getMulti(keys) + +

    +

    +Asks memcached to retrieve data corresponding to the list of keys. +Returns a Map with the results. +If some of the keys appearing in a retrieval request are not sent back +by the server in the item list this means that the server does not +hold items with such keys +
    + +incr([offset]) + +

    +

    +Asks memcached to increment data for some item in place. The data for the item is +treated as decimal representation of a 64-bit unsigned integer. If the +current data value does not conform to such a representation, the +commands behave as if the value were 0. +Default offset is 1. +Returns the new value. +
    + +prepend(key, value) + +

    +

    +Asks memcached to add this value to an existing key before existing value. +Returns true on success, otherwise raises an exception. +value should be a Sequence. +Supported by memcached 1.2.4+ +
    + +removeAt(key) + +

    +

    +Asks memcached to remove value with a given key. Returns self. +
    + +replace(key, value[, expiration]) + +

    +

    +Asks memcached to store the value identified by the key, +but only if the server *does* already hold data for this key. +Returns true on success, false if there is already data for this key. +Otherwise raises an exception. +
    + +set(key, value[, expiration]) + +

    +

    +Asks memcached to store the value identified by the key. +Returns true on success, otherwise raises an exception. +
    + +stats + +

    +

    +Returns a Map with servers' statistics. Keys are server addresses, +values are maps with actual stats. +
    + +with(servers) + +

    +

    +Returns a new instance of Memcached. + Accepts a Sequence or a List of server addresses. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/Memcached/index.html b/io-master/docs/reference/Databases/Memcached/index.html new file mode 100755 index 0000000..5c9aa71 --- /dev/null +++ b/io-master/docs/reference/Databases/Memcached/index.html @@ -0,0 +1,59 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Databases/MySQL/MySQL/index.html b/io-master/docs/reference/Databases/MySQL/MySQL/index.html new file mode 100755 index 0000000..53bd2b1 --- /dev/null +++ b/io-master/docs/reference/Databases/MySQL/MySQL/index.html @@ -0,0 +1,101 @@ + + + + + MySQL + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +MySQL +  /   +MySQL +


    +


    + + + + + + + + + + + + + +
    MySQL is a fast, multi-threaded, +multi-user SQL database server. IoMySQL is a MySQL binding for Io, +by Min-hee Hong. + +
    
    +my := MySQL establish("localhost", "user", "password", "database")
    +
    +# Get rows by Map
    +my queryThenMap("SELECT * FROM rel") foreach(at("col") println)
    +# Get rows by List
    +my query("SELECT * FROM rel") foreach(at(0) println)
    +
    +my close
    +
    +
     
     
     
    + +
    +

    + +close + +

    +

    +Closes a previously opened connection. +
    + +connect(host, user, password, database, port, unixSocket, useSSL) + +

    +

    +Connect to a MySQL database. +
    + +connected + +

    +

    +Returns true if connected to the database, false otherwise. +
    + +establish + +

    +

    +Establish a connection to a MySQL database. +
    + +lastInsertRowId + +

    +

    +Returns the value generated for an AUTO_INCREMENT column by the previous INSERT or UPDATE statement. +
    + +query(aQueryString) + +

    +

    +Perform a SQL query and return a list of results. +
    +	db query("SELECT * FROM accounts") foreach(println)
    +	
    +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/MySQL/index.html b/io-master/docs/reference/Databases/MySQL/index.html new file mode 100755 index 0000000..0dfe257 --- /dev/null +++ b/io-master/docs/reference/Databases/MySQL/index.html @@ -0,0 +1,59 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Databases/Obsidian/Obsidian/index.html b/io-master/docs/reference/Databases/Obsidian/Obsidian/index.html new file mode 100755 index 0000000..a5dfc56 --- /dev/null +++ b/io-master/docs/reference/Databases/Obsidian/Obsidian/index.html @@ -0,0 +1,64 @@ + + + + + Obsidian + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +Obsidian +  /   +Obsidian +


    +


    + + + + + + + + + + + + + +
    A double key/value database with cursors on first key. Basis for PDB. +
     
     
     
    + +
    +

    + +close + +

    +

    +Closes the persistence database file. +
    + +delete + +

    +

    +Removes the persistence database file set via setPath. +
    + +onAt + +

    +

    +Return the value associated with slotName of stored object whose ppid is objId. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/Obsidian/ObsidianClient/index.html b/io-master/docs/reference/Databases/Obsidian/ObsidianClient/index.html new file mode 100755 index 0000000..35cad54 --- /dev/null +++ b/io-master/docs/reference/Databases/Obsidian/ObsidianClient/index.html @@ -0,0 +1,37 @@ + + + + + ObsidianClient + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +Obsidian +  /   +ObsidianClient +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Databases/Obsidian/ObsidianServer/index.html b/io-master/docs/reference/Databases/Obsidian/ObsidianServer/index.html new file mode 100755 index 0000000..9e32fac --- /dev/null +++ b/io-master/docs/reference/Databases/Obsidian/ObsidianServer/index.html @@ -0,0 +1,78 @@ + + + + + ObsidianServer + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +Obsidian +  /   +ObsidianServer +


    +


    + + + + + + + + + + + + + +
    +A network interface for Obsidian. + +

    Starting a Server

    + +
    +oServer := ObsidianServer clone
    +oServer localObject setName("foo") open
    +oServer start
    +
    + +

    Example Client Code

    + +
    +client := MDOConnection clone setHost("127.0.0.1") setPort(8000) connect
    +client onAtPut("1", "aKey", "aSlot")
    +client onAtPut("1", "cKey", "cSlot")
    +client onAtPut("1", "bKey", "bSlot")
    +client first("1", 5) println
    +a := client onAt("1", "aKey")
    +writeln("a = ", a)
    +b := client onAt("1", "bKey")
    +writeln("b = ", b)
    +client close
    +
    + +The messages accepted by the Obsidian server include: + +
    +onAtPut(id, key, value)
    +onAt(id, key)
    +onRemoveAt(id, key)
    +onFirst(id, count)
    +onLast(id, count)
    +onAfter(id, key, count)
    +onBefore(id, key, count)
    +
    +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Databases/Obsidian/PDB/index.html b/io-master/docs/reference/Databases/Obsidian/PDB/index.html new file mode 100755 index 0000000..a7bd1b3 --- /dev/null +++ b/io-master/docs/reference/Databases/Obsidian/PDB/index.html @@ -0,0 +1,176 @@ + + + + + PDB + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +Obsidian +  /   +PDB +


    +


    + + + + + + + + + + + + + +
    An arbitrary graph database with support for on-disk garbage collection. Example use: + +

    Setup

    + +
    +PDB open
    +PDB root atPut("users", PMap clone)
    +PDB sync
    +PDB close
    +
    + +PMap is a Map/Dictionary whose keys are lazily loaded from the database. +PDB root is the root PMap in the database and the root object used for PDB's garbage collector. +PDB sync needs to be called to write any changes to the database. + +

    Defining a Persistent Object

    + +
    +User := Object clone pSlots(name, email)
    +
    + +The pSlots(), declares which slots on the object should be persisted. +The List, Date, Sequence and Number primitives already know how to persist themselves. + +

    Inserting a Persistent Object

    + +
    +PDB open 
    +user := User clone setName("steve") setEmail("steve@foo.com")
    +PDB root users atPut("steve", user)
    +PDB sync
    +PDB close
    +
    + +

    Accessing a Persistent Object

    + +
    +user := PDB root users at("steve")
    +writeln("user name = ", user name, " email = ", user email)
    +
    + +

    Updating a Persistent Object

    + +
    +user setEmail("steve@newDomain.com")
    +PDB sync 
    +
    + +PDB sync will scan all persistent objects in the vm and save any with changes to their persistent slots. +If the object was already in the database, only its updated slots will be written. + +

    Removing an entry in a PMap

    + +
    +PDB root users removeAt("steve")
    +
    + +

    Removing a persistent object

    + +This is never done explicitly, instead calling: + +
    +PDB collectGarbage
    +
    + +Will remove all objects unreachable by the reference graph from the root PMap. + +

    +Notes: Currently, PDB is a singleton. +

     
     
     
    + +
    +

    + +addObjectToPersist + +

    +

    +Register an object to be persisted in the next PDB sync. +
    + +close + +

    +

    +Close the persistence database. +
    + +collectGarbage + +

    +

    +Remove from PDB all objects not accessible via the root object. +
    + +newId + +

    +

    +Generate a new PDB id number for use as a persistent object's ppid. +
    + +objectAtPpid + +

    +

    +Return the object associated in the database with a ppid. +
    + +reopen + +

    +

    +Sync, close and reopen the PDB store. +
    + +root + +

    +

    +Return the root PMap object used to store and retrieve persistent objects and their slots. +
    + +show + +

    +

    +Print to standard output a listing of all objects and IDs stored in PDB. +
    + +sync + +

    +

    +Immediately persist data for all objects marked dirty by Collector whose +shouldPersistByDefault is true, or that have specifically requested to be +persisted since the last sync via addObjectToPersist. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/Obsidian/PMap/index.html b/io-master/docs/reference/Databases/Obsidian/PMap/index.html new file mode 100755 index 0000000..c02a591 --- /dev/null +++ b/io-master/docs/reference/Databases/Obsidian/PMap/index.html @@ -0,0 +1,128 @@ + + + + + PMap + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +Obsidian +  /   +PMap +


    +


    + + + + + + + + + + + + + +
    PMap stores persistent data in a Map-like fashion and lazily loads +available slots from the PDB backing store. Values stored or loaded are cached +into local object slots. +
     
     
     
    + +
    +

    + +at(slotName) + +

    +

    +Tries to obtain a value for slot slotName from a local slot of that name, +or tries to load it from the PDB if the local slot does not exist. When all else fails, returns nil. +

    +If slotName begins with an underscore ("_"), returns the id of the slot from PDB instead of the value. +

    + +atPut(slotName, value) + +

    +

    +Records value in the slot named slotName. +
    + +createIfAbsent + +

    +

    +Creates a slot with a new PMap clone if not already present. +
    + +init + +

    +

    +Initialize a new PMap and automatically add it as a persistent object to PDB. +
    + +objectsForKeys + +

    +

    +Returns a list of values for each key in the list given. Keys beginning with an +underscore ("_") are returned verbatim. +
    + +persist + +

    +

    +Commits the PMap's slots to PDB. +
    + +persistSlots + +

    +

    +Cleans up dirty slots by committing them to PDB. +
    + +removeAt + +

    +

    +Marks a value for removal. +
    + +removeSlot + +

    +

    +Marks a value for removal. +
    + +shouldPersistByDefault + +

    +

    +PDB boolean flag indicating whether this object should be considered for persistence +when persistence has not been specifically requested by calling ppid() or PDB addObjectToPersist. +Always true by default for PMap. +
    + +slotCount + +

    +

    +Returns the number of slots committed to PDB. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/Obsidian/PObject/index.html b/io-master/docs/reference/Databases/Obsidian/PObject/index.html new file mode 100755 index 0000000..8f3f7f0 --- /dev/null +++ b/io-master/docs/reference/Databases/Obsidian/PObject/index.html @@ -0,0 +1,37 @@ + + + + + PObject + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +Obsidian +  /   +PObject +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Databases/Obsidian/index.html b/io-master/docs/reference/Databases/Obsidian/index.html new file mode 100755 index 0000000..5074eb8 --- /dev/null +++ b/io-master/docs/reference/Databases/Obsidian/index.html @@ -0,0 +1,64 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Databases/Postgres/Postgres/index.html b/io-master/docs/reference/Databases/Postgres/Postgres/index.html new file mode 100755 index 0000000..d2e37dd --- /dev/null +++ b/io-master/docs/reference/Databases/Postgres/Postgres/index.html @@ -0,0 +1,37 @@ + + + + + Postgres + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +Postgres +  /   +Postgres +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Databases/Postgres/index.html b/io-master/docs/reference/Databases/Postgres/index.html new file mode 100755 index 0000000..1891f0f --- /dev/null +++ b/io-master/docs/reference/Databases/Postgres/index.html @@ -0,0 +1,59 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Databases/QDBM/QDBM/index.html b/io-master/docs/reference/Databases/QDBM/QDBM/index.html new file mode 100755 index 0000000..aa9e253 --- /dev/null +++ b/io-master/docs/reference/Databases/QDBM/QDBM/index.html @@ -0,0 +1,206 @@ + + + + + QDBM + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +QDBM +  /   +QDBM +


    +


    + + + + + + + + + + + + + +
    An ordered key/value database that supports transactions and arbitrary kay and value sizes. +
     
     
     
    + +
    +

    + +abort + +

    +

    +Abort transaction. Returns self +
    + +at(keySymbol) + +

    +

    +Returns a Sequence for the value at the given key or nil if there is no such key. +
    + +atPut(keySymbol, valueSequence) + +

    +

    +Sets the value of valueSequence with the key keySymbol. Returns self. +
    + +atRemove(keySymbol) + +

    +

    +Removes the specified key. Returns self +
    + +begin + +

    +

    +Begin transaction. Returns self +
    + +close + +

    +

    +Closes the database. +
    + +commit + +

    +

    +Commit transaction. Returns self +
    + +cursorFirst + +

    +

    +Move cursor to first record. Returns self +
    + +cursorJumpBackward(key) + +

    +

    +Move cursor to previous record around key. Returns self +
    + +cursorJumpForward(key) + +

    +

    +Move cursor to next record around key. Returns self +
    + +cursorKey + +

    +

    +Returns current cursor key or nil. +
    + +cursorLast + +

    +

    +Move cursor to last record. Returns self +
    + +cursorNext + +

    +

    +Move cursor to next record. Returns true if there is another key, + or false if there is no next record. +
    + +cursorPrevious + +

    +

    +Move cursor to previous record. Returns true if there is another key, + or false if there is no previous record. +
    + +cursorPut(value) + +

    +

    +Sets the value at the current cursor postion. Returns self. +
    + +cursorRemove + +

    +

    +Removes the current cursor postion. Returns self. +
    + +cursorValue + +

    +

    +Returns current cursor value or nil. +
    + +name + +

    +

    +Returns the name of the database. +
    + +open(path) + +

    +

    +Opens the database. +
    + +optimize + +

    +

    +Optimizes the database. Returns self +
    + +size + +

    +

    +Returns number of records in database. Returns self +
    + +sizeAt(keySymbol) + +

    +

    +Returns the size of the value at the given key or nil if there is no such key. +
    + +sync + +

    +

    +Syncs the database. Returns self +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/QDBM/index.html b/io-master/docs/reference/Databases/QDBM/index.html new file mode 100755 index 0000000..00653cc --- /dev/null +++ b/io-master/docs/reference/Databases/QDBM/index.html @@ -0,0 +1,59 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Databases/SQLite/SQLite/index.html b/io-master/docs/reference/Databases/SQLite/SQLite/index.html new file mode 100755 index 0000000..b5cf977 --- /dev/null +++ b/io-master/docs/reference/Databases/SQLite/SQLite/index.html @@ -0,0 +1,196 @@ + + + + + SQLite + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +SQLite +  /   +SQLite +


    +


    + + + + + + + + + + + + + +
    SQLite provides a embedded simple and fast (2x faster than PostgreSQL or MySQL) SQL database. See http://www.hwaci.com/sw/sqlite/ for details. It's SQL command set is described at http://www.hwaci.com/sw/sqlite/lang.html. SQLite was written by Dr. Richard Hipp who offers consulting services for custom modifications and support of SQLite. Example: +
    	
    +db := SQLite clone
    +db setPath("myDatabase.sqlite")
    +db open
    +db exec("CREATE TABLE Dbm (key, value)")
    +db exec("CREATE INDEX DbmIndex ON Dbm (key)")
    +db exec("INSERT INTO Dbm ('key', 'value') VALUES ('a', '123')")
    +db exec("INSERT INTO Dbm ('key', 'value') VALUES ('a', 'efg')")
    +rows := db exec("SELECT key, value FROM Dbm WHERE key='a'")
    +db exec("DELETE FROM Dbm WHERE key='a'")
    +rows := db exec("SELECT key, value FROM Dbm WHERE key='a'")
    +db close
    +
    +
     
     
     
    + +
    +

    + +changes + +

    +

    +Returns the number of rows that were changed by the most + recent SQL statement. Or Nil if the database is closed. +
    + +close + +

    +

    +Closes the database if it is open. Returns self. + If the database is open when the open is garbage collected, + it will be automatically closed. +
    + +columnNamesOfTable(tableName) + +

    +

    +Returns a list containing the names of all columns in the specified table. +
    + +debugOff + +

    +

    +Turns off debugging. +
    + +debugOn + +

    +

    +Turns on debugging. +
    + +error + +

    +

    +Results a string containing the current error. + If there is no error, Nil is returned. +
    + +escapeString(aString) + +

    +

    +Returns a translated version of aString by making two + copies of every single-quote (') character. This has the effect + of escaping the end-of-string meaning of single-quote within a string literal. +
    + +exec(aString) + +

    +

    +Opens the database if it is not already open and executes + aString as an sql command. Results a List of Map objects or Nil if + there was an error. Each map holds the contents of a row. + The key/value pairs of the maps being column name/column value + pairs for a row. ") +
    + +isOpen + +

    +

    +Returns true if the database is open, false otherwise. +
    + +lastInsertRowId + +

    +

    +Returns the number with the row id of the last row inserted. +
    + +open(optionalPathString) + +

    +

    +Opens the database.Returns self on success or nil upon failure. + If the databse is locked, "yield" will be called until it is + accessable or timeoutSeconds has expired. +
    + +path + +

    +

    +Returns the path to the database file. +
    + +setPath(aSeq) + +

    +

    +Sets the path to the database file. Returns self. +
    + +setTimeoutSeconds(aNumber) + +

    +

    +Sets the open timeout to aNumber. If aNumber is 0, an open + call will never timeout. Returns self. +
    + +tableNames + +

    +

    +Returns a list containing the names of all tables in the database. +
    + +timeoutSeconds + +

    +

    +Returns the number of seconds to wait before timing out an open call. + If the number is 0, an open call will never timeout. +
    + +version + +

    +

    +Results a string the version of SQLite being used. +
    + +viewNames + +

    +

    +Returns a list containing the names of all views in the database. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/SQLite/index.html b/io-master/docs/reference/Databases/SQLite/index.html new file mode 100755 index 0000000..7b87a43 --- /dev/null +++ b/io-master/docs/reference/Databases/SQLite/index.html @@ -0,0 +1,59 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Databases/SQLite3/SQLite3/index.html b/io-master/docs/reference/Databases/SQLite3/SQLite3/index.html new file mode 100755 index 0000000..b542e1f --- /dev/null +++ b/io-master/docs/reference/Databases/SQLite3/SQLite3/index.html @@ -0,0 +1,205 @@ + + + + + SQLite3 + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +SQLite3 +  /   +SQLite3 +


    +


    + + + + + + + + + + + + + +
    SQLite provides a embedded simple and fast + (2x faster than PostgreSQL or MySQL) SQL database. + See http://www.hwaci.com/sw/sqlite/ for details. + It's SQL command set is described + at http://www.hwaci.com/sw/sqlite/lang.html. + SQLite was written by Dr. Richard Hipp who offers consulting + services for custom modifications and support of SQLite. Example: +

    +

    	
    +db := SQLite clone
    +db setPath("myDatabase.sqlite")
    +db open
    +db exec("CREATE TABLE Dbm (key, value)")
    +db exec("CREATE INDEX DbmIndex ON Dbm (key)")
    +db exec("INSERT INTO Dbm ('key', 'value') VALUES ('a', '123')")
    +db exec("INSERT INTO Dbm ('key', 'value') VALUES ('a', 'efg')")
    +rows := db exec("SELECT key, value FROM Dbm WHERE key='a'")
    +db exec("DELETE FROM Dbm WHERE key='a'")
    +rows := db exec("SELECT key, value FROM Dbm WHERE key='a'")
    +db close
    +
    +
     
     
     
    + +
    +

    + +changes + +

    +

    +Returns the number of rows that were changed by the most + recent SQL statement. Or Nil if the database is closed. +
    + +close + +

    +

    +Closes the database if it is open. Returns self. If the database is open when the open is garbage collected, it will be automatically closed. +
    + +columnNamesOfTable(tableName) + +

    +

    +Returns a list containing the names of all columns in the specified table. +
    + +debugOff + +

    +

    +Turns off debugging. +
    + +debugOn + +

    +

    +Turns on debugging. +
    + +error + +

    +

    +Results a string containing the current error. If there is no error, Nil is returned. +
    + +escapeString(aString) + +

    +

    +Returns a translated version of aString by making two copies of + every single-quote (') character. This has the effect of escaping the + end-of-string meaning of single-quote within a string literal. +
    + +exec(aString) + +

    +

    +Opens the database if it is not already open and executes + aString as an sql command. Results a List of Map objects or Nil if + there was an error. Each map holds the contents of a row. + The key/value pairs of the maps being column name/column value + pairs for a row. +
    + +isOpen + +

    +

    +Returns true if the database is open, false otherwise. +
    + +lastInsertRowId + +

    +

    +Returns the number with the row id of the last row inserted. +
    + +open(optionalPathString) + +

    +

    +Opens the database. If there is an optionalPathString argument, + the path is set to it's value before opening the database. If path is "" or ":memory:" + a database will be created in-memory, otherwise the file specified by path is opened. + Returns self or Nil upon failure. + + If the databse is locked, "yield" will be called until it is accessable or + timeoutSeconds has expired. "" +
    + +path + +

    +

    +Returns the path to the database file. +
    + +setPath + +

    +

    +Sets the path to the database file. Returns self. +
    + +setTimeoutSeconds(aNumber) + +

    +

    +Sets the open timeout to aNumber. If aNumber is 0, an open + call will never timeout. Returns self. +
    + +tableNames + +

    +

    +Returns a list containing the names of all tables in the database. +
    + +timeoutSeconds + +

    +

    +Returns the number of seconds to wait before timing out an + open call. If the number is 0, an open call will never timeout. +
    + +version + +

    +

    +Results a string the version of SQLite being used. +
    + +viewNames + +

    +

    +Returns a list containing the names of all + views in the database. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/SQLite3/index.html b/io-master/docs/reference/Databases/SQLite3/index.html new file mode 100755 index 0000000..88ff516 --- /dev/null +++ b/io-master/docs/reference/Databases/SQLite3/index.html @@ -0,0 +1,59 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Databases/SkipDB/SkipDB/index.html b/io-master/docs/reference/Databases/SkipDB/SkipDB/index.html new file mode 100755 index 0000000..6c4df3f --- /dev/null +++ b/io-master/docs/reference/Databases/SkipDB/SkipDB/index.html @@ -0,0 +1,85 @@ + + + + + SkipDB + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +SkipDB +  /   +SkipDB +


    +


    + + + + + + + + + + + + + +
    An ordered key/value database implemented using a skiplist data structure. +
     
     
     
    + +
    +

    + +at(keySymbol) + +

    +

    +Returns a Sequence for the value at the given key or nil if there is no such key. +
    + +atPut(keySymbol, valueSequence) + +

    +

    +Sets the value of valueSequence with the key keySymbol. Returns self. +
    + +atRemove(keySymbol) + +

    +

    +Removes the specified key. Returns self +
    + +cursor + +

    +

    +Returns a new cursor to enumerate the receiver. +
    + +headerPid + +

    +

    +Returns the headerPid number. +
    + +size + +

    +

    +Returns the number of keys in the receiver. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/SkipDB/SkipDBCursor/index.html b/io-master/docs/reference/Databases/SkipDB/SkipDBCursor/index.html new file mode 100755 index 0000000..2e472f8 --- /dev/null +++ b/io-master/docs/reference/Databases/SkipDB/SkipDBCursor/index.html @@ -0,0 +1,92 @@ + + + + + SkipDBCursor + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +SkipDB +  /   +SkipDBCursor +


    +


    + + + + + + + + + + + + + +
    An iterator object for a SkipDB. +
     
     
     
    + +
    +

    + +first + +

    +

    +Move cursor to first item. Returns self. +
    + +goto(aKey) + +

    +

    +Move cursor to the specified key or nearest preceeding key. Returns self +
    + +key + +

    +

    +Returns the current cursor key, or nil if the cursor is out of range. +
    + +last + +

    +

    +Move cursor to last item. Returns self. +
    + +next + +

    +

    +Move cursor to next item. Returns self. +
    + +previous + +

    +

    +Move cursor to previous item. Returns self. +
    + +value + +

    +

    +Returns the current cursor key, or nil if the cursor is out of range. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/SkipDB/SkipDBM/index.html b/io-master/docs/reference/Databases/SkipDB/SkipDBM/index.html new file mode 100755 index 0000000..9a36493 --- /dev/null +++ b/io-master/docs/reference/Databases/SkipDB/SkipDBM/index.html @@ -0,0 +1,114 @@ + + + + + SkipDBM + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +SkipDB +  /   +SkipDBM +


    +


    + + + + + + + + + + + + + +
    SkipDB is a skip-list based key-value database. SkipDBM manages any number of skipdbs within the same file. +The root skipdb can be accessed using the root method. +
     
     
     
    + +
    +

    + +at(pidNumber) + +

    +

    +Returns the SkipDB at the specified persistent ID or nil if it is not found. +
    + +beginTransaction + +

    +

    +Begin a transaction. Returns self. +
    + +close + +

    +

    +Closes the dbm. +
    + +commitTransaction + +

    +

    +Commit a transaction. Returns self. +
    + +compact + +

    +

    +Compacts the database. Returns self. +
    + +delete + +

    +

    +Deletes the db. Returns self. +
    + +open + +

    +

    +Opens the dbm. Returns self. +
    + +path + +

    +

    +Returns the path to the dbm. Returns self. +
    + +root + +

    +

    +Returns the root SkipDB. +
    + +setPath(aString) + +

    +

    +Sets the path to the dbm folder. Returns self. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/SkipDB/index.html b/io-master/docs/reference/Databases/SkipDB/index.html new file mode 100755 index 0000000..3788c97 --- /dev/null +++ b/io-master/docs/reference/Databases/SkipDB/index.html @@ -0,0 +1,61 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Databases/SqlDatabase/SqlDatabase/index.html b/io-master/docs/reference/Databases/SqlDatabase/SqlDatabase/index.html new file mode 100755 index 0000000..49663bb --- /dev/null +++ b/io-master/docs/reference/Databases/SqlDatabase/SqlDatabase/index.html @@ -0,0 +1,37 @@ + + + + + SqlDatabase + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +SqlDatabase +  /   +SqlDatabase +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Databases/SqlDatabase/index.html b/io-master/docs/reference/Databases/SqlDatabase/index.html new file mode 100755 index 0000000..cc8dc0c --- /dev/null +++ b/io-master/docs/reference/Databases/SqlDatabase/index.html @@ -0,0 +1,59 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Databases/TagDB/TagDB/index.html b/io-master/docs/reference/Databases/TagDB/TagDB/index.html new file mode 100755 index 0000000..1493bf8 --- /dev/null +++ b/io-master/docs/reference/Databases/TagDB/TagDB/index.html @@ -0,0 +1,158 @@ + + + + + TagDB + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +TagDB +  /   +TagDB +


    +


    + + + + + + + + + + + + + +
    Binding for tagdb - a tagging database usefull for flickr-like tag searches. +

    +Example use: +

    +tdb := TagDB clone
    +
    +tdb setPath("test")
    +tdb open
    +
    +writeln("size = ", tdb size)
    +tdb atKeyPutTags("f430 for sale", list("red", "ferrari"))
    +tdb atKeyPutTags("lotus esprit", list("lotus", "esprit"))
    +writeln("size = ", tdb size)
    +keys := tdb keysForTags(list("lotus"))
    +writeln("keys = ", tdb symbolForId(keys at(0)))
    +tdb close
    +tdb delete
    +
    +
     
     
     
    + +
    +

    + +allUniqueTagIds + +

    +

    +Returns a list of all unique tag ids. +
    + +atKeyPutTags(key, tagNameList) + +

    +

    +Sets the tags for key to those in tagNameList. Returns self. +
    + +close + +

    +

    +Close the tagdb. Returns self. +
    + +delete + +

    +

    +Deletes all keys in the database. +
    + +idForSymbol(aSeq) + +

    +

    +Returns the TagDB id Number for the symbol specified by aSeq. +
    + +keyAtIndex(indexNumber) + +

    +

    +Returns the key at the specified index of nil if the index is out of range. +
    + +keysForTags(aTagNameList) + +

    +

    +Returns list of keys whose tags contain all of the tags in aTagNameList. +
    + +open + +

    +

    +Open the tagdb. Returns self. +
    + +removeKey(aKey) + +

    +

    +Removes the specified key if it is present. Returns self. +
    + +setPath(aPath) + +

    +

    +Sets the path to the tag database. Returns self. +
    + +size + +

    +

    +Returns number of keys in the database. +
    + +symbolForId(aNumber) + +

    +

    +Returns the TagDB symbol for aNumber. +
    + +tagsAtKey(key) + +

    +

    +Returns the tags for the specified key. +
    + +uniqueTagNames + +

    +

    +Returns a list of all unique tag names. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/TagDB/index.html b/io-master/docs/reference/Databases/TagDB/index.html new file mode 100755 index 0000000..0b35ceb --- /dev/null +++ b/io-master/docs/reference/Databases/TagDB/index.html @@ -0,0 +1,59 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Databases/TokyoCabinet/TokyoCabinet/index.html b/io-master/docs/reference/Databases/TokyoCabinet/TokyoCabinet/index.html new file mode 100755 index 0000000..045f511 --- /dev/null +++ b/io-master/docs/reference/Databases/TokyoCabinet/TokyoCabinet/index.html @@ -0,0 +1,191 @@ + + + + + TokyoCabinet + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +TokyoCabinet +  /   +TokyoCabinet +


    +


    + + + + + + + + + + + + + +
    An ordered key/value database that supports transactions and arbitrary key and value sizes. +
     
     
     
    + +
    +

    + +abort + +

    +

    +Abort transaction. Returns self +
    + +at(keySymbol) + +

    +

    +Returns a Sequence for the value at the given key or nil if there is no such key. +
    + +atApple(keySymbol, valueSequence) + +

    +

    +Appends valueSequence to the current value at keySymbol. Returns self. +
    + +atPut(keySymbol, valueSequence) + +

    +

    +Sets the value of valueSequence with the key keySymbol. Returns self. +
    + +atRemove(keySymbol) + +

    +

    +Removes the specified key. Returns self +
    + +begin + +

    +

    +Begin transaction. Returns self +
    + +close + +

    +

    +Closes the database. +
    + +commit + +

    +

    +Commit transaction. Returns self +
    + +compareType + +

    +

    +Returns the compare type function name used. +
    + +cursor + +

    +

    +Returns a new cursor object. +
    + +open(path) + +

    +

    +Opens the database. +
    + +optimize + +

    +

    +Optimizes the database. Returns self +
    + +path + +

    +

    +Returns the path of the database file. +
    + +prefixCursor + +

    +

    +Returns a new prefix cursor object. +
    + +setCompareType(name) + +

    +

    +Sets the compare type function used to compare keys in the database. Valid compare types include: + "lexical", "decimal", "int32", "int64" and "path". Returns self. +
    + +setPath(aPath) + +

    +

    +Sets the path of the database file. Returns self. +
    + +size + +

    +

    +Returns number of records in the database. Returns self +
    + +sizeAt(keySymbol) + +

    +

    +Returns the size of the value at the given key or nil if there is no such key. +
    + +sync + +

    +

    +Syncs the database. Returns self +
    + +transactionalAtPut(key, value) + +

    +

    +Transactionally insert the given key and value. Returns self. +
    + +transactionalRemoveAt(key) + +

    +

    +Transactionally remove the given key. Returns self. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/TokyoCabinet/TokyoCabinetCursor/index.html b/io-master/docs/reference/Databases/TokyoCabinet/TokyoCabinetCursor/index.html new file mode 100755 index 0000000..b656b3a --- /dev/null +++ b/io-master/docs/reference/Databases/TokyoCabinet/TokyoCabinetCursor/index.html @@ -0,0 +1,115 @@ + + + + + TokyoCabinetCursor + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +TokyoCabinet +  /   +TokyoCabinetCursor +


    +


    + + + + + + + + + + + + + +
    A database cursor. +
     
     
     
    + +
    +

    + +close + +

    +

    +Closes the database. +
    + +first + +

    +

    +Move cursor to first record. Returns self +
    + +jump(key) + +

    +

    +Move cursor to record before key. Returns self +
    + +key + +

    +

    +Returns current cursor key or nil. +
    + +last + +

    +

    +Move cursor to last record. Returns self +
    + +next + +

    +

    +Move cursor to next record. Returns true if there is another key, + or false if there is no next record. +
    + +previous + +

    +

    +Move cursor to previous record. Returns true if there is another key, + or false if there is no previous record. +
    + +put(value) + +

    +

    +Sets the value at the current cursor postion. Returns self. +
    + +remove + +

    +

    +Removes the current cursor postion. Returns self. +
    + +value + +

    +

    +Returns current cursor value or nil. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/TokyoCabinet/TokyoCabinetPrefixCursor/index.html b/io-master/docs/reference/Databases/TokyoCabinet/TokyoCabinetPrefixCursor/index.html new file mode 100755 index 0000000..6bd9767 --- /dev/null +++ b/io-master/docs/reference/Databases/TokyoCabinet/TokyoCabinetPrefixCursor/index.html @@ -0,0 +1,115 @@ + + + + + TokyoCabinetPrefixCursor + + + + + +
    +

    Io Reference

    +


    +


    +Databases +  /   +TokyoCabinet +  /   +TokyoCabinetPrefixCursor +


    +


    + + + + + + + + + + + + + +
    A database cursor. +
     
     
     
    + +
    +

    + +close + +

    +

    +Closes the database. +
    + +first + +

    +

    +Move cursor to first record. Returns self +
    + +jump(key) + +

    +

    +Move cursor to record before key. Returns self +
    + +key + +

    +

    +Returns current cursor key or nil. +
    + +last + +

    +

    +Move cursor to last record. Returns self +
    + +next + +

    +

    +Move cursor to next record. Returns true if there is another key, + or false if there is no next record. +
    + +previous + +

    +

    +Move cursor to previous record. Returns true if there is another key, + or false if there is no previous record. +
    + +put(value) + +

    +

    +Sets the value at the current cursor postion. Returns self. +
    + +remove + +

    +

    +Removes the current cursor postion. Returns self. +
    + +value + +

    +

    +Returns current cursor value or nil. +
    +
    +




    + + diff --git a/io-master/docs/reference/Databases/TokyoCabinet/index.html b/io-master/docs/reference/Databases/TokyoCabinet/index.html new file mode 100755 index 0000000..c743f95 --- /dev/null +++ b/io-master/docs/reference/Databases/TokyoCabinet/index.html @@ -0,0 +1,61 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Databases/index.html b/io-master/docs/reference/Databases/index.html new file mode 100755 index 0000000..137accd --- /dev/null +++ b/io-master/docs/reference/Databases/index.html @@ -0,0 +1,55 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Digests/MD5/MD5/index.html b/io-master/docs/reference/Digests/MD5/MD5/index.html new file mode 100755 index 0000000..5a754e6 --- /dev/null +++ b/io-master/docs/reference/Digests/MD5/MD5/index.html @@ -0,0 +1,71 @@ + + + + + MD5 + + + + + +
    +

    Io Reference

    +


    +


    +Digests +  /   +MD5 +  /   +MD5 +


    +


    + + + + + + + + + + + + + +
    An object for calculating MD5 hashes. Each hash calculation should instantiate its own MD5 instance. +

    +Example: +

    +digest := MD5 clone
    +digest appendSeq("this is a message")
    +out := digest md5String
    +
    +
     
     
     
    + +
    +

    + +appendSeq(aSequence) + +

    +

    +Appends aSequence to the hash calculation. Returns self. +
    + +md5 + +

    +

    +Completes the MD5 calculation and returns the hash as a Buffer. Once this method is called, append() should not be called again on the receiver or it will raise an exception. +
    + +md5String + +

    +

    +Returns a string containing a hexadecimal representation of the md5 hash. +
    +
    +




    + + diff --git a/io-master/docs/reference/Digests/MD5/index.html b/io-master/docs/reference/Digests/MD5/index.html new file mode 100755 index 0000000..ada5ab4 --- /dev/null +++ b/io-master/docs/reference/Digests/MD5/index.html @@ -0,0 +1,51 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Digests/Oauth/Oauth/index.html b/io-master/docs/reference/Digests/Oauth/Oauth/index.html new file mode 100755 index 0000000..adddf84 --- /dev/null +++ b/io-master/docs/reference/Digests/Oauth/Oauth/index.html @@ -0,0 +1,148 @@ + + + + + Oauth + + + + + +
    +

    Io Reference

    +


    +


    +Digests +  /   +Oauth +  /   +Oauth +


    +


    + + + + + + + + + + + + + +
    An object for calculating Oauth hashes. Each hash calculation should instantiate its own Oauth instance. +

    +Example: +

    +digest := Oauth clone
    +digest appendSeq("this is a message")
    +out := digest OauthString
    +
    +
     
     
     
    + +
    +

    + +accessKey + +

    +

    +Returns accessKey. +
    + +accessSecret + +

    +

    +Returns accessSecret. +
    + +consumerKey + +

    +

    +Returns consumerKey. +
    + +consumerSecret + +

    +

    +Returns consumerSecret. +
    + +getAccessKeyAndSecretFromUrl(aSequence) + +

    +

    +getAccessKeyAndSecretFromUrl Returns self. +
    + +getOauthTokenAndSecretFromUrl(aSequence) + +

    +

    +getOauthTokenAndSecretFromUrl Returns self. +
    + +oauthSecret + +

    +

    +Returns oauthSecret. +
    + +oauthToken + +

    +

    +Returns oauthToken. +
    + +requestUrl(aUrlString, postContent) + +

    +

    +Request the given URL. If postContent is not provided, a GET request is sent. Returns self. +
    + +setAccessKey(aSequence) + +

    +

    +Sets the access key. Returns self. +
    + +setAccessSecret(aSequence) + +

    +

    +Sets the access secret. Returns self. +
    + +setConsumerKey(aSequence) + +

    +

    +Sets the consumer key. Returns self. +
    + +setOauthSecret(aSequence) + +

    +

    +Sets the consumer key. Returns self. +
    + +setOauthToken(aSequence) + +

    +

    +Sets the oauth key. Returns self. +
    +
    +




    + + diff --git a/io-master/docs/reference/Digests/Oauth/index.html b/io-master/docs/reference/Digests/Oauth/index.html new file mode 100755 index 0000000..94844ea --- /dev/null +++ b/io-master/docs/reference/Digests/Oauth/index.html @@ -0,0 +1,51 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Digests/SHA1/SHA1/index.html b/io-master/docs/reference/Digests/SHA1/SHA1/index.html new file mode 100755 index 0000000..1c0bcca --- /dev/null +++ b/io-master/docs/reference/Digests/SHA1/SHA1/index.html @@ -0,0 +1,81 @@ + + + + + SHA1 + + + + + +
    +

    Io Reference

    +


    +


    +Digests +  /   +SHA1 +  /   +SHA1 +


    +


    + + + + + + + + + + + + + +
    An object for calculating SHA1 hashes. Each hash calculation +should instantiate its own SHA1 instance. + +

    +Example: +

    +digest := SHA1 clone
    +digest appendSeq("this is a message")
    +out := digest sha1String
    +
    +
     
     
     
    + +
    +

    + +appendSeq(aSequence) + +

    +

    +Appends aSequence to the hash calculation. Returns self. +
    + +hmac(key, data) + +

    +

    +Returns a hmac signature sequence or nil on error. +
    + +sha1 + +

    +

    +Completes the SHA1 calculation and returns the hash as a Buffer. + Once this method is called, append() should not be called again on the receiver or it will raise an exception. +
    + +sha1String + +

    +

    +Returns a string containing a hexadecimal representation of the sha1 hash. +
    +
    +




    + + diff --git a/io-master/docs/reference/Digests/SHA1/index.html b/io-master/docs/reference/Digests/SHA1/index.html new file mode 100755 index 0000000..d9f7e69 --- /dev/null +++ b/io-master/docs/reference/Digests/SHA1/index.html @@ -0,0 +1,51 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Digests/UUID/UUID/index.html b/io-master/docs/reference/Digests/UUID/UUID/index.html new file mode 100755 index 0000000..5a30210 --- /dev/null +++ b/io-master/docs/reference/Digests/UUID/UUID/index.html @@ -0,0 +1,71 @@ + + + + + UUID + + + + + +
    +

    Io Reference

    +


    +


    +Digests +  /   +UUID +  /   +UUID +


    +


    + + + + + + + + + + + + + +
    Generates Universally Unique Identifiers (UUID/GUID). +
     
     
     
    + +
    +

    + +urn + +

    +

    +Returns the uuid with "urn:uuid:" prepended to it. +
    + +uuid + +

    +

    +Returns a new uuid in string format. +
    + +uuidRandom + +

    +

    +Returns a new random uuid (type 4) in string format. +
    + +uuidTime + +

    +

    +Returns a new time and mac uuid (type 1) in string format. +
    +
    +




    + + diff --git a/io-master/docs/reference/Digests/UUID/index.html b/io-master/docs/reference/Digests/UUID/index.html new file mode 100755 index 0000000..5163e33 --- /dev/null +++ b/io-master/docs/reference/Digests/UUID/index.html @@ -0,0 +1,51 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Digests/index.html b/io-master/docs/reference/Digests/index.html new file mode 100755 index 0000000..c712b8b --- /dev/null +++ b/io-master/docs/reference/Digests/index.html @@ -0,0 +1,47 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Encryption/Blowfish/Blowfish/index.html b/io-master/docs/reference/Encryption/Blowfish/Blowfish/index.html new file mode 100755 index 0000000..1e715be --- /dev/null +++ b/io-master/docs/reference/Encryption/Blowfish/Blowfish/index.html @@ -0,0 +1,136 @@ + + + + + Blowfish + + + + + +
    +

    Io Reference

    +


    +


    +Encryption +  /   +Blowfish +  /   +Blowfish +


    +


    + + + + + + + + + + + + + +
    The Blowfish object can be used to do encryption and decryption using +the Blowfish keyed, symmetric block cipher. +

    +Example encryption and description; + +

    	
    +key := "secret"
    +data := "this is a message"
    +
    +encryptedData := Blowfish clone setKey(key) encrypt(data)
    +decryptedData := Blowfish clone setKey(key) decrypt(encryptedData)
    +
    + +Or using the stream API: +
    	
    +key := "secret"
    +data := "this is a message"
    +
    +cipher = Blowfish clone
    +cipher setIsEncrypting(true)
    +cipher setKey(key)
    +cipher beginProcessing
    +cipher inputBuffer appendSeq(data)
    +cipher process
    +cipher endProcess
    +encryptedData := cipher outputBuffer
    +
    +cipher = Blowfish clone
    +cipher setIsEncrypting(false)
    +cipher setKey(key)
    +cipher beginProcessing
    +cipher inputBuffer appendSeq(encryptedData)
    +cipher process
    +cipher endProcess
    +decryptedData := cipher outputBuffer
    +
    +
     
     
     
    + +
    +

    + +beginProcessing + +

    +

    +Sets the key from the key slot and initializes the cipher. +
    + +decrypt(aSequence) + +

    +

    +Returns an decrypted version of aSequence. +
    + +encrypt(aSequence) + +

    +

    +Returns an encrypted version of aSequence. +
    + +endProcessing + +

    +

    +Finish processing remaining bytes of inputBuffer. +
    + +inputBuffer + +

    +

    +Returns the input buffer. +
    + +outputBuffer + +

    +

    +Returns the output buffer. +
    + +process + +

    +

    +Process the inputBuffer and appends the result to the outputBuffer. + The processed inputBuffer is emptied except for the spare + bytes at the end which don't fit into a cipher block. +
    + +setIsEncrypting(aBool) + +

    +

    +If aBool is true, encrypting mode is on, otherwise, decrypting mode is on. +
    +
    +




    + + diff --git a/io-master/docs/reference/Encryption/Blowfish/index.html b/io-master/docs/reference/Encryption/Blowfish/index.html new file mode 100755 index 0000000..49c5f0b --- /dev/null +++ b/io-master/docs/reference/Encryption/Blowfish/index.html @@ -0,0 +1,48 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Encryption/index.html b/io-master/docs/reference/Encryption/index.html new file mode 100755 index 0000000..0a33e5d --- /dev/null +++ b/io-master/docs/reference/Encryption/index.html @@ -0,0 +1,44 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Filesystem/AsyncRequest/AsyncRequest/index.html b/io-master/docs/reference/Filesystem/AsyncRequest/AsyncRequest/index.html new file mode 100755 index 0000000..3757bf2 --- /dev/null +++ b/io-master/docs/reference/Filesystem/AsyncRequest/AsyncRequest/index.html @@ -0,0 +1,126 @@ + + + + + AsyncRequest + + + + + +
    +

    Io Reference

    +


    +


    +Filesystem +  /   +AsyncRequest +  /   +AsyncRequest +


    +


    + + + + + + + + + + + + + +
    Used for doing asynchronous file i/o. When this addon is loaded, it will override +the File proto's readToBufferLength, readBufferOfLength and write methods to +automatically use AsyncRequests. +

    +Note: This addon is only needed for async file requests - all socket ops are already +asynchronous in Io. +

     
     
     
    + +
    +

    + +cancel + +

    +

    +Cancels the request. Returns nil on error or self otherwise. +
    + +copyBufferto(aSeq) + +

    +

    +Copies the request buffer's data to aSeq. + Returns nil on error or self otherwise. +
    + +descriptor + +

    +

    +Returns the descriptor for the request. +
    + +error + +

    +

    +Returns sequence containing the last error or nil otherwise. +
    + +isDone + +

    +

    +Returns true if the request is done, false otherwise. +
    + +numberOfBytes + +

    +

    +Returns the number of bytes associated with the request. +
    + +position + +

    +

    +Returns a Number for the position of the descriptor. +
    + +read(aSeq, numberOfBytes) + +

    +

    +Submits an async read request. Returns nil on error, self otherwise. +
    + +setDescriptor(aDescriptorNumber) + +

    +

    +Sets the descriptor for the receiver. Returns self. +
    + +sync + +

    +

    +Waits for the request to complete. Returns nil on error or self otherwise. +
    + +write(fileOffset, aSeq, bufferOffset, numberOfBytesToWrite) + +

    +

    +Submits an async write request. Returns nil on error, self otherwise. +
    +
    +




    + + diff --git a/io-master/docs/reference/Filesystem/AsyncRequest/index.html b/io-master/docs/reference/Filesystem/AsyncRequest/index.html new file mode 100755 index 0000000..64c80ac --- /dev/null +++ b/io-master/docs/reference/Filesystem/AsyncRequest/index.html @@ -0,0 +1,48 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Filesystem/index.html b/io-master/docs/reference/Filesystem/index.html new file mode 100755 index 0000000..4aae69d --- /dev/null +++ b/io-master/docs/reference/Filesystem/index.html @@ -0,0 +1,44 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Graphics/Box/index.html b/io-master/docs/reference/Graphics/Box/index.html new file mode 100755 index 0000000..0daa4c4 --- /dev/null +++ b/io-master/docs/reference/Graphics/Box/index.html @@ -0,0 +1,53 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Graphics/Cairo/Cairo/index.html b/io-master/docs/reference/Graphics/Cairo/Cairo/index.html new file mode 100755 index 0000000..61e966d --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/Cairo/index.html @@ -0,0 +1,42 @@ + + + + + Cairo + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +Cairo +


    +


    + + + + + + + + + + + + + +
    Cairo is a 2D graphics library. http://cairographics.org/ +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoContext/index.html b/io-master/docs/reference/Graphics/Cairo/CairoContext/index.html new file mode 100755 index 0000000..c8b77ad --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoContext/index.html @@ -0,0 +1,37 @@ + + + + + CairoContext + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoContext +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoExtents/index.html b/io-master/docs/reference/Graphics/Cairo/CairoExtents/index.html new file mode 100755 index 0000000..ce5200b --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoExtents/index.html @@ -0,0 +1,37 @@ + + + + + CairoExtents + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoExtents +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoFontExtents/index.html b/io-master/docs/reference/Graphics/Cairo/CairoFontExtents/index.html new file mode 100755 index 0000000..538e712 --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoFontExtents/index.html @@ -0,0 +1,37 @@ + + + + + CairoFontExtents + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoFontExtents +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoFontFace/index.html b/io-master/docs/reference/Graphics/Cairo/CairoFontFace/index.html new file mode 100755 index 0000000..c9ccc47 --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoFontFace/index.html @@ -0,0 +1,37 @@ + + + + + CairoFontFace + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoFontFace +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoFontOptions/index.html b/io-master/docs/reference/Graphics/Cairo/CairoFontOptions/index.html new file mode 100755 index 0000000..a0f5cda --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoFontOptions/index.html @@ -0,0 +1,37 @@ + + + + + CairoFontOptions + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoFontOptions +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoGlyph/index.html b/io-master/docs/reference/Graphics/Cairo/CairoGlyph/index.html new file mode 100755 index 0000000..892f420 --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoGlyph/index.html @@ -0,0 +1,37 @@ + + + + + CairoGlyph + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoGlyph +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoGradient/index.html b/io-master/docs/reference/Graphics/Cairo/CairoGradient/index.html new file mode 100755 index 0000000..8e38bc4 --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoGradient/index.html @@ -0,0 +1,37 @@ + + + + + CairoGradient + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoGradient +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoImageSurface/index.html b/io-master/docs/reference/Graphics/Cairo/CairoImageSurface/index.html new file mode 100755 index 0000000..5635846 --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoImageSurface/index.html @@ -0,0 +1,37 @@ + + + + + CairoImageSurface + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoImageSurface +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoLinearGradient/index.html b/io-master/docs/reference/Graphics/Cairo/CairoLinearGradient/index.html new file mode 100755 index 0000000..e2756c9 --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoLinearGradient/index.html @@ -0,0 +1,37 @@ + + + + + CairoLinearGradient + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoLinearGradient +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoMatrix/index.html b/io-master/docs/reference/Graphics/Cairo/CairoMatrix/index.html new file mode 100755 index 0000000..128ee3d --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoMatrix/index.html @@ -0,0 +1,37 @@ + + + + + CairoMatrix + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoMatrix +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoPath/index.html b/io-master/docs/reference/Graphics/Cairo/CairoPath/index.html new file mode 100755 index 0000000..9c86afe --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoPath/index.html @@ -0,0 +1,37 @@ + + + + + CairoPath + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoPath +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoPathElement/index.html b/io-master/docs/reference/Graphics/Cairo/CairoPathElement/index.html new file mode 100755 index 0000000..99962b7 --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoPathElement/index.html @@ -0,0 +1,37 @@ + + + + + CairoPathElement + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoPathElement +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoPattern/index.html b/io-master/docs/reference/Graphics/Cairo/CairoPattern/index.html new file mode 100755 index 0000000..b837218 --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoPattern/index.html @@ -0,0 +1,37 @@ + + + + + CairoPattern + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoPattern +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoRadialGradient/index.html b/io-master/docs/reference/Graphics/Cairo/CairoRadialGradient/index.html new file mode 100755 index 0000000..c577bf3 --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoRadialGradient/index.html @@ -0,0 +1,37 @@ + + + + + CairoRadialGradient + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoRadialGradient +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoRectangle/index.html b/io-master/docs/reference/Graphics/Cairo/CairoRectangle/index.html new file mode 100755 index 0000000..390f423 --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoRectangle/index.html @@ -0,0 +1,37 @@ + + + + + CairoRectangle + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoRectangle +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoScaledFont/index.html b/io-master/docs/reference/Graphics/Cairo/CairoScaledFont/index.html new file mode 100755 index 0000000..82d83c4 --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoScaledFont/index.html @@ -0,0 +1,37 @@ + + + + + CairoScaledFont + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoScaledFont +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoSolidPattern/index.html b/io-master/docs/reference/Graphics/Cairo/CairoSolidPattern/index.html new file mode 100755 index 0000000..cd5ec88 --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoSolidPattern/index.html @@ -0,0 +1,37 @@ + + + + + CairoSolidPattern + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoSolidPattern +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoSurface/index.html b/io-master/docs/reference/Graphics/Cairo/CairoSurface/index.html new file mode 100755 index 0000000..7bb3026 --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoSurface/index.html @@ -0,0 +1,37 @@ + + + + + CairoSurface + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoSurface +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoSurfacePattern/index.html b/io-master/docs/reference/Graphics/Cairo/CairoSurfacePattern/index.html new file mode 100755 index 0000000..8dc9f4e --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoSurfacePattern/index.html @@ -0,0 +1,37 @@ + + + + + CairoSurfacePattern + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoSurfacePattern +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/CairoTextExtents/index.html b/io-master/docs/reference/Graphics/Cairo/CairoTextExtents/index.html new file mode 100755 index 0000000..668a1fe --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/CairoTextExtents/index.html @@ -0,0 +1,37 @@ + + + + + CairoTextExtents + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Cairo +  /   +CairoTextExtents +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Cairo/index.html b/io-master/docs/reference/Graphics/Cairo/index.html new file mode 100755 index 0000000..32099d8 --- /dev/null +++ b/io-master/docs/reference/Graphics/Cairo/index.html @@ -0,0 +1,73 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Graphics/Font/Font/index.html b/io-master/docs/reference/Graphics/Font/Font/index.html new file mode 100755 index 0000000..44a0d38 --- /dev/null +++ b/io-master/docs/reference/Graphics/Font/Font/index.html @@ -0,0 +1,148 @@ + + + + + Font + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Font +  /   +Font +


    +


    + + + + + + + + + + + + + +
    The Font object can be used to load and render TypeTrype fonts. Example use; +
    	
    +// within a GLUT display callback...
    +
    +timesFont = Font clone open(\"times.ttf\")
    +if (timesFont error, write(\"Error loading font: \", timesFont error, \"\n\"); return)
    +timesFont setPointSize(16)
    +glColor(0,0,0,1)
    +timesFont draw(\"This is a test.\")
    +
    + +Rendering fonts using OpenGL textures +

    +Smaller fonts (those having a point size around 30 or smaller, depending on the font) will automatically be cached in and rendered from a texture. This technique is very fast and should support rendering speeds as fast (or faster than) those of typical desktop font rendering systems. Larger font sizes(due to texture memory constraints) will be rendered to a pixelmap when displayed. Thanks to Mike Austin for implementing the font texturing system. +

     
     
     
    + +
    +

    + +drawString(aString, optionalStartIndex, optionalEndIndex) + +

    +

    +Draws aString using the optional start and end indexes, if supplied. Returns self. +

    +Note; Fonts are drawn as RGBA pixel maps. These blending options are recommended: +

    	
    +glEnable(GL_BLEND)
    +glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
    +
    +
    + +error + +

    +

    +Returns the current error string or nil if there is no error. +
    + +isTextured + +

    +

    +Returns true if the font is being cached in and rendered from a texture, false otherwise. +
    + +open(optionalPath) + +

    +

    +Opens the font. Sets path using optionalPath if supplied. Returns self. +
    + +path + +

    +

    +Returns the Font path. +
    + +pixelHeight + +

    +

    +Returns the height of the font measured in pixels. +
    + +pixelSize + +

    +

    +Returns the font's pixelSize. +
    + +setPath(aString) + +

    +

    +Sets the Font path. Returns self. +
    + +setPixelSize(aNumber) + +

    +

    +Sets the size of the font in pixels. Returns self. +
    + +stringIndexAtWidth(aString, startIndex, width) + +

    +

    +Returns the max index of the character in String (starting at startIndex) + that fits within width. +
    + +widthOfCharacter(aNumber) + +

    +

    +Returns the width of the character specified by aNumber in the receiver's font. +
    + +widthOfString(aString) + +

    +

    +Returns a Number with the width that aString would render + to with the receiver's current settings. +
    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Font/index.html b/io-master/docs/reference/Graphics/Font/index.html new file mode 100755 index 0000000..d7cbda2 --- /dev/null +++ b/io-master/docs/reference/Graphics/Font/index.html @@ -0,0 +1,53 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Graphics/GLFW/GLFW/index.html b/io-master/docs/reference/Graphics/GLFW/GLFW/index.html new file mode 100755 index 0000000..c7af529 --- /dev/null +++ b/io-master/docs/reference/Graphics/GLFW/GLFW/index.html @@ -0,0 +1,37 @@ + + + + + GLFW + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +GLFW +  /   +GLFW +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/GLFW/index.html b/io-master/docs/reference/Graphics/GLFW/index.html new file mode 100755 index 0000000..6b1979b --- /dev/null +++ b/io-master/docs/reference/Graphics/GLFW/index.html @@ -0,0 +1,53 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Graphics/Image/Image/index.html b/io-master/docs/reference/Graphics/Image/Image/index.html new file mode 100755 index 0000000..05864a2 --- /dev/null +++ b/io-master/docs/reference/Graphics/Image/Image/index.html @@ -0,0 +1,420 @@ + + + + + Image + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +Image +  /   +Image +


    +


    + + + + + + + + + + + + + +
    The Image object can read and draw images and provide the image +data as a buffer. Example use: +
    	
    +image = Image clone open("curly.png")
    +image draw
    +image scaleTo(image width / 2, image height / 2)
    +image save("curly.tiff")
    +
    +When loading an attempt will be made to convert the image into whichever +of the following formats it is closest to: L8, LA8, RGB8, RGBA8. +

    +Currently supported formats include PNG(which supports alpha), JPG and TIFF. +

     
     
     
    + +
    +

    + +addAlpha + +

    +

    +Adds an opaque alpha component if the image is in RGB format and does not already contain one. Returns self. +
    + +averageColor + +

    +

    +Returns the average RGB color of all pixels in the image. +
    + +baselineHeight + +

    +

    +Returns the pixel height (relative to the bottom of the image) which first contains a non-white pixel or -1 if + no baseline is found. +
    + +bitPlain(component, bit) + +

    +

    +Replaces contents with black-and-white image where white appears if and only if specified component contained 1 on the specified bit plain. + Returns self. +
    + +bounds(cutoff) + +

    +

    +Returns an object continaing the bounds of the image. Cutoff is max bound color value for any color component. + If it is negative, it is the min bound color value. +
    + +componentCount + +

    +

    +Returns the number of color components in the receiver as a Number. +
    + +componentPlain(component) + +

    +

    +Removes other components except specified from the image. + Returns self. +
    + +crop(x, y, width, height) + +

    +

    +Crops the image to the specified values. Returns self. + Raises an exception on error. +
    + +data + +

    +

    +Returns a Buffer primitive containing the image data (loading it first if needed). + Manipulating this data will affect what is drawn when the receiver's draw method is called. +
    + +decodingHeightHint + +

    +

    +Returns the decoding height hint. +
    + +decodingWidthHint + +

    +

    +Returns the decoding width hint. +
    + +encodingQuality + +

    +

    +Returns the encodingQuality setting. +
    + +equalizeHistogram(mode) + +

    +

    +Performs histogram equalization. Mode denotes quality factor and processing speed. Mode should be in range [0..3]. + Returns self. +
    + +error + +

    +

    +Returns a String containing the current error or nil if there is no error. +
    + +filterGauss(sigma) + +

    +

    +Returns new image as a result of applying filter. Implements Gauss smoothing filtering with parameter sigma. +
    + +filterKirsch(a) + +

    +

    +Returns new image as a result of applying Kirsch filter. + The argument denotes direction: 0, 1, 2, ... -> 0, pi / 4, pi / 2, ... +
    + +filterLinear(filterSizeX, filterSizeY, filter) + +

    +

    +Returns new image as a result of applying filter. +
    + +filterMax(filterSizeX, filterSizeY) + +

    +

    +Returns new image as a result of applying filter. +
    + +filterMedian(filterSizeX, filterSizeY) + +

    +

    +Returns new image as a result of applying filter. +
    + +filterMin(filterSizeX, filterSizeY) + +

    +

    +Returns new image as a result of applying filter. +
    + +filterNonlinearGradients + +

    +

    +Returns new image as a result of applying filter. Calculates abs(f'x) + abs(f'y). +
    + +filterSobel(a) + +

    +

    +Returns new image as a result of applying Sobel filter. + The argument denotes direction: 0, 1, 2, ... -> 0, pi / 4, pi / 2, ... +
    + +filterUniformAverage(filterSizeX, filterSizeY) + +

    +

    +Returns new image as a result of applying filter. Implements low pass filtering. +
    + +filterUnsharpMask(a) + +

    +

    +Returns new image as a result of applying filter. Implements unsharp mask filtering. + The result is sharpened image. + The parameter value may by any but it makes sense if it is > 0. +
    + +filterWeightedMedian(filterSizeX, filterSizeY, filter) + +

    +

    +Returns new image as a result of applying filter. +
    + +flipX + +

    +

    +Flips the image on the horizonal plane (left/right mirror). Returns self. +
    + +flipY + +

    +

    +Flips the image on the vertical plane (top/bottom mirror). Returns self. +
    + +height + +

    +

    +Returns the image hieght. +
    + +histogram + +

    +

    +Returns array with histogram values interleaved by channels. +
    + +isL8 + +

    +

    +Returns true if the receiver is in L8 (8bit Luminance) format, false otherwise. +
    + +isLA8 + +

    +

    +Returns true if the receiver is in LA8 (8bit Luminance-Alpha) format, false otherwise. +
    + +isRGB8 + +

    +

    +Returns true if the receiver is in RGB8 format, false otherwise. +
    + +isRGBA8 + +

    +

    +Returns true if the receiver is in RGBA8 format, false otherwise. +
    + +linearContrast + +

    +

    +Performs contrast linarization. Per-pixel per-channel transformation that extends intensity to its full range. + Returns self. +
    + +makeGrayscale + +

    +

    +Converts color model to Luminance or Luminance-Alpha 8bit (grayscale). Returns self. +
    + +makeL8 + +

    +

    +Converts color model to Luminance 8bit (grayscale). Returns self. +
    + +makeRGBA8 + +

    +

    +Converts color model to RGBA 8bit. Returns self. +
    + +open(optionalPathString) + +

    +

    +Sets the path to optionalPathString if provided and opens the image file. + Returns self on success, Nil on failure. +
    + +path + +

    +

    +Returns the image path. +
    + +removeAlpha + +

    +

    +Removes the alpha component if the image contains one. Returns self. +
    + +resizedTo(newWidth, newHeight) + +

    +

    +Scales the image up to newWidth x newHeight. Returns the newly scaled image. +
    + +resizedTo(width, height) + +

    +

    +Returns a new image of the receiver resized to the given width and height. + Raises an exception on error. +
    + +save(optionalPathString) + +

    +

    +Sets the path to optionalPathString if provided and saves the image + in the format specified by the path extension. Returns self on success, nil on failure. +
    + +setDataWidthHeightComponentCount(aSequence, width, height, componentCount) + +

    +

    +Sets the image data and its parameters. Returns self. +
    + +setDecodingHeightHint(width) + +

    +

    +Sets the decoding height hint. Returns self. +
    + +setDecodingWidthHint(width) + +

    +

    +Sets the decoding width hint. Returns self. +
    + +setEncodingQuality(aNumber) + +

    +

    +Sets the image encoding quality (range is 0.0 - 1.0, 1.0 with being the highest). +
    + +setPath(aString) + +

    +

    +Sets the image path. Returns self. +
    + +thresholdByGradient + +

    +

    +Performs thresholding. Threshold value is finded using Otsu's method. + Returns self. +
    + +width + +

    +

    +Returns the image width. +
    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/Image/index.html b/io-master/docs/reference/Graphics/Image/index.html new file mode 100755 index 0000000..06af737 --- /dev/null +++ b/io-master/docs/reference/Graphics/Image/index.html @@ -0,0 +1,53 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Graphics/OpenGL/Box/index.html b/io-master/docs/reference/Graphics/OpenGL/Box/index.html new file mode 100755 index 0000000..4305355 --- /dev/null +++ b/io-master/docs/reference/Graphics/OpenGL/Box/index.html @@ -0,0 +1,134 @@ + + + + + Box + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +OpenGL +  /   +Box +


    +


    + + + + + + + + + + + + + +
    A primitive for fast operations on rectangles. +
     
     
     
    + +
    +

    + +Union(aBox) + +

    +

    +Returns a new box containing the 2d union of the receiver and aBox. +
    + +containsPoint(aPoint) + +

    +

    +Returns true if aPoint is within the receiver's bounds, false otherwise. +
    + +copy(aBox) + +

    +

    +Copies the values of aBox to the receiver. +
    + +depth + +

    +

    +Same as; size z +
    + +height + +

    +

    +Same as; size y +
    + +intersectsBox(aBox) + +

    +

    +Returns true if aBox is within the receiver's bounds, false otherwise. +
    + +origin + +

    +

    +Returns the point object for the origin of the box. +
    + +print + +

    +

    +Prints a string representation of the receiver to the standard output. +
    + +set(origin, size) + +

    +

    +Copies the values in origin and size to set the box's origin and size. +
    + +setOrigin(aPoint) + +

    +

    +Copies the values in aPoint to the box's origin point. +
    + +setSize(aPoint) + +

    +

    +Copies the values in aPoint to the box's size point. +
    + +size + +

    +

    +Returns the point object for the size of the box. +
    + +width + +

    +

    +Same as; size x +
    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/OpenGL/GLApp/index.html b/io-master/docs/reference/Graphics/OpenGL/GLApp/index.html new file mode 100755 index 0000000..1949ce0 --- /dev/null +++ b/io-master/docs/reference/Graphics/OpenGL/GLApp/index.html @@ -0,0 +1,37 @@ + + + + + GLApp + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +OpenGL +  /   +GLApp +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/OpenGL/GLScissor/index.html b/io-master/docs/reference/Graphics/OpenGL/GLScissor/index.html new file mode 100755 index 0000000..9fbc7da --- /dev/null +++ b/io-master/docs/reference/Graphics/OpenGL/GLScissor/index.html @@ -0,0 +1,37 @@ + + + + + GLScissor + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +OpenGL +  /   +GLScissor +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/OpenGL/GLU/index.html b/io-master/docs/reference/Graphics/OpenGL/GLU/index.html new file mode 100755 index 0000000..2a0a71d --- /dev/null +++ b/io-master/docs/reference/Graphics/OpenGL/GLU/index.html @@ -0,0 +1,46 @@ + + + + + GLU + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +OpenGL +  /   +GLU +


    +


    + + + + + + + + + +
     
     
     
    + +
    +

    + +gluScaleImage(formatIn, widthIn, heightIn, typeIn, dataSeqIn, widthOut, heightOut, typeOut, dataSeqOut) + +

    +

    +Scales the image data in dataSeqIn and outputs the result to dataSeqOut. + Returns error code as a Number. +
    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/OpenGL/GLUQuadric/index.html b/io-master/docs/reference/Graphics/OpenGL/GLUQuadric/index.html new file mode 100755 index 0000000..0bb14dd --- /dev/null +++ b/io-master/docs/reference/Graphics/OpenGL/GLUQuadric/index.html @@ -0,0 +1,37 @@ + + + + + GLUQuadric + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +OpenGL +  /   +GLUQuadric +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/OpenGL/GLUT/index.html b/io-master/docs/reference/Graphics/OpenGL/GLUT/index.html new file mode 100755 index 0000000..364bcd9 --- /dev/null +++ b/io-master/docs/reference/Graphics/OpenGL/GLUT/index.html @@ -0,0 +1,37 @@ + + + + + GLUT + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +OpenGL +  /   +GLUT +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/OpenGL/OpenGL/index.html b/io-master/docs/reference/Graphics/OpenGL/OpenGL/index.html new file mode 100755 index 0000000..c1ee420 --- /dev/null +++ b/io-master/docs/reference/Graphics/OpenGL/OpenGL/index.html @@ -0,0 +1,37 @@ + + + + + OpenGL + + + + + +
    +

    Io Reference

    +


    +


    +Graphics +  /   +OpenGL +  /   +OpenGL +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Graphics/OpenGL/index.html b/io-master/docs/reference/Graphics/OpenGL/index.html new file mode 100755 index 0000000..dfeba37 --- /dev/null +++ b/io-master/docs/reference/Graphics/OpenGL/index.html @@ -0,0 +1,59 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Graphics/index.html b/io-master/docs/reference/Graphics/index.html new file mode 100755 index 0000000..f03561d --- /dev/null +++ b/io-master/docs/reference/Graphics/index.html @@ -0,0 +1,49 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Math/BigNum/BigNum/index.html b/io-master/docs/reference/Math/BigNum/BigNum/index.html new file mode 100755 index 0000000..91969a6 --- /dev/null +++ b/io-master/docs/reference/Math/BigNum/BigNum/index.html @@ -0,0 +1,282 @@ + + + + + BigNum + + + + + +
    +

    Io Reference

    +


    +


    +Math +  /   +BigNum +  /   +BigNum +


    +


    + + + + + + + + + + + + + +
    A wrapper for GNU MP Bignum (arbitrary precision math) library. +Warning: GMP uses the restrictive GNU license which can be a problem if you are hard linking it into a distributed application. +
     
     
     
    + +
    +

    + +%(aNum) + +

    +

    +Modulus op (same as mod()). Returns result. +
    + +&(aNum) + +

    +

    +AND op. Returns result. +
    + +*(aNum) + +

    +

    +Multiply op. Returns result. +
    + +**(aNum) + +

    +

    +Power op. Returns result. +
    + ++(aNum) + +

    +

    +Add op. Returns result. +
    + +-(aNum) + +

    +

    +Subtract op. Returns result. +
    + +/(aNum) + +

    +

    +Divide op. Returns result. +
    + +<<(aNum) + +

    +

    +Shift left (towards higher bits) op. Returns result. +
    + +>>(aNum) + +

    +

    +Shift right (towards lower bits) op. Returns result. +
    + +^(aNum) + +

    +

    +XOR op. Returns result. +
    + +abs + +

    +

    +Absolute op. Returns result. +
    + +asNumber + +

    +

    +Returns an Io Number for the receiving BigNum. +
    + +asSimpleString + +

    +

    +Returns simple string representation of the receiver. +
    + +asString + +

    +

    +Returns a string representation of the receiver. +
    + +gcd(aNum) + +

    +

    +Greatest common denominator op. Returns result. +
    + +hamdist(aNum) + +

    +

    +Returns hamming distance between receiver and aNum. +
    + +invert(aNum) + +

    +

    +? +
    + +jacobi(aNum) + +

    +

    +? +
    + +kronecker + +

    +

    +? +
    + +lcm(aNum) + +

    +

    +Least common denominator op. Returns result. +
    + +legendre(aNum) + +

    +

    +? +
    + +mod(aNum) + +

    +

    +Modulus op (same as %). Returns result. +
    + +neg + +

    +

    +Returns negative version of receiver. +
    + +nextprime + +

    +

    +Returns next prime larger than the receiver. +
    + +popcount + +

    +

    +? +
    + +pow(aNum) + +

    +

    +Returns power of receiver to aNum. +
    + +powm(aNum) + +

    +

    +? +
    + +root(aNum) + +

    +

    +Returns the aNum root of the receiver. +
    + +scan0(aNum) + +

    +

    +? +
    + +scan1(aNum) + +

    +

    +? +
    + +sqrt + +

    +

    +Returns square root of the receiver. +
    + +tstbit(aNum) + +

    +

    +? +
    + +with(aNumber) + +

    +

    +Returns a BigNum version of the Io number aNumber. +
    + +|(aNum) + +

    +

    +OR op. Returns result. +
    +
    +




    + + diff --git a/io-master/docs/reference/Math/BigNum/index.html b/io-master/docs/reference/Math/BigNum/index.html new file mode 100755 index 0000000..2684f69 --- /dev/null +++ b/io-master/docs/reference/Math/BigNum/index.html @@ -0,0 +1,51 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Math/ContinuedFraction/ContinuedFraction/index.html b/io-master/docs/reference/Math/ContinuedFraction/ContinuedFraction/index.html new file mode 100755 index 0000000..cec6749 --- /dev/null +++ b/io-master/docs/reference/Math/ContinuedFraction/ContinuedFraction/index.html @@ -0,0 +1,42 @@ + + + + + ContinuedFraction + + + + + +
    +

    Io Reference

    +


    +


    +Math +  /   +ContinuedFraction +  /   +ContinuedFraction +


    +


    + + + + + + + + + + + + + +
    ? +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Math/ContinuedFraction/index.html b/io-master/docs/reference/Math/ContinuedFraction/index.html new file mode 100755 index 0000000..958c6d5 --- /dev/null +++ b/io-master/docs/reference/Math/ContinuedFraction/index.html @@ -0,0 +1,51 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Math/Random/Random/index.html b/io-master/docs/reference/Math/Random/Random/index.html new file mode 100755 index 0000000..5b3dae0 --- /dev/null +++ b/io-master/docs/reference/Math/Random/Random/index.html @@ -0,0 +1,89 @@ + + + + + Random + + + + + +
    +

    Io Reference

    +


    +


    +Math +  /   +Random +  /   +Random +


    +


    + + + + + + + + + + + + + +
    A high quality and reasonably fast random number generator based on +Makoto Matsumoto, Takuji Nishimura, and Eric Landry's implementation +of the Mersenne Twister algorithm. The default seed is a xor of +the ANSI C time() and clock() return values. +
     
     
     
    + +
    +

    + +bytes(count) + +

    +

    +Returns a Sequence of size count containing random bytes. +
    + +flip + +

    +

    +Returns a random bit as a true or false object. +
    + +gaussian(optionalMean, optionalStandardDeviation) + +

    +

    +Returns a pseudo random number between 0 and 1 with a gaussian distribution. +
    + +setSeed(aNumber) + +

    +

    +Sets the random number generator seed to the unsigned int version of aNumber. +
    + +value(optionalArg1, optionalArg2) + +

    +

    +If called with: +
      +
    • no arguments, it returns a floating point + random Number between 0 and 1. +
    • one argument, it returns a floating point random + Number between 0 and optionalArg1. +
    • two arguments, it returns a floating point random + Number between optionalArg1 and optionalArg2. +
    +
    +
    +




    + + diff --git a/io-master/docs/reference/Math/Random/index.html b/io-master/docs/reference/Math/Random/index.html new file mode 100755 index 0000000..7b4f7f8 --- /dev/null +++ b/io-master/docs/reference/Math/Random/index.html @@ -0,0 +1,51 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Math/Rational/Rational/index.html b/io-master/docs/reference/Math/Rational/Rational/index.html new file mode 100755 index 0000000..d92d737 --- /dev/null +++ b/io-master/docs/reference/Math/Rational/Rational/index.html @@ -0,0 +1,199 @@ + + + + + Rational + + + + + +
    +

    Io Reference

    +


    +


    +Math +  /   +Rational +  /   +Rational +


    +


    + + + + + + + + + +
     
     
     
    + +
    +

    + +!=(other) + +

    +

    +Compares two numbers against one another. Returns true if they are equal (represent the same number), false otherwise. +
    + +%(aNum) + +

    +

    +Returns the receiver modulus aNum +
    + +*(aNum) + +

    +

    +Returns the value of the receiver multiplied by aNum. +
    + ++(aNum) + +

    +

    +Returns the value of the receiver added to aNum. +
    + +-(aNum) + +

    +

    +Returns the value of the receiver subtracted from aNum. +
    + +/(aNum) + +

    +

    +Returns the value of the receiver divided by aNum. +
    + +==(other) + +

    +

    +Compares two numbers against one another. Returns true if they are equal (represent the same number), false otherwise. +
    + +abs + +

    +

    +Returns a Rational number with the absolute value of the receiver. +
    + +asNumber + +

    +

    +Converts the Rational number to a floating point number. +
    + +asRational + +

    +

    +Converts the number to a Rational number. CAVEAT: Numbers in Io are floating point entities, which means since they are imprecise, this conversion may yield values not expected.") +
    + +asString + +

    +

    +Returns a text string representing the Rational number. +
    + +compare(other) + +

    +

    +Compares two numbers against one another. Returns a positive, zero or negative value based on whether the receiver is larger, equal or less than the argument. +
    + +denominator + +

    +

    +Returns the denominator. +
    + +divmod(aNum) + +

    +

    +Returns a list containing the integer value and the receiver modulus aNum. +
    + +gcd(aNum) + +

    +

    +Calculates the greatest common denominator between the receiver and the argument. +
    + +negate + +

    +

    +Negates the Rational number. +
    + +numerator + +

    +

    +Returns the numerator. +
    + +pow(aNum) + +

    +

    +Returns the value of the receiver to the power of aNum. +
    + +reduce + +

    +

    +Reduces the numerator and denominator to their lowest terms. +
    + +serialized + +

    +

    +Returns a bit of code which can be used to serialize the Rational number. +
    + +setDenominator(aNumber) + +

    +

    +Sets the denominator. Returns self. +
    + +setNumerator(aNumber) + +

    +

    +Sets the numerator. Returns self. +
    + +with(aNumerator, aDenominator) + +

    +

    +Convenience constructor. Returns a new Rational number whose numerator and denominator are represented by the arguments aNumerator and aDenominator respectively.") +
    +
    +




    + + diff --git a/io-master/docs/reference/Math/Rational/index.html b/io-master/docs/reference/Math/Rational/index.html new file mode 100755 index 0000000..e289e66 --- /dev/null +++ b/io-master/docs/reference/Math/Rational/index.html @@ -0,0 +1,51 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Math/index.html b/io-master/docs/reference/Math/index.html new file mode 100755 index 0000000..71450f8 --- /dev/null +++ b/io-master/docs/reference/Math/index.html @@ -0,0 +1,47 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Networking/Beanstalk/Beanstalk/index.html b/io-master/docs/reference/Networking/Beanstalk/Beanstalk/index.html new file mode 100755 index 0000000..139f355 --- /dev/null +++ b/io-master/docs/reference/Networking/Beanstalk/Beanstalk/index.html @@ -0,0 +1,118 @@ + + + + + Beanstalk + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Beanstalk +  /   +Beanstalk +


    +


    + + + + + + + + + + + + + +
    beanstalkd is a fast, distributed, in-memory workqueue service. See http://xph.us/software/beanstalkd/ +
    An example from http://xph.us/software/beanstalkd/: +
    First, have one process put a job into the queue: +
    +producer := Beanstalk clone connect("127.0.0.1:11300")
    +producer put("hello")
    +
    + +Then start another process to take jobs out of the queue and run them: +
    +worker := Beanstalk clone connect("127.0.0.1:11300")
    +loop(
    +	job := worker reserve
    +	job body println # prints "hello"
    +	job delete
    +)
    +
    +See Beanstalk.io code and protocol description (http://github.com/kr/beanstalkd/tree/master/doc/protocol.txt) for details. +Both are short and easy to read. + +
    Stat commands depend on YAML. +
     
     
     
    + +
    +

    + +bury(id, pri) + +

    +

    +Puts a job into the "buried" state +
    + +connect(address) + +

    +

    +Connects to a beanstalk server. address is a "host:port" string, e.g., "127.0.0.1:11300" +
    + +delete(id) + +

    +

    +Removes a job with a given id from the server, entirely +
    + +put(body, pri, delay, ttr) + +

    +

    +Inserts a job into the queue. +
    pri - priority, an integer < 2**32. Jobs with smaller priority values will be + scheduled before jobs with larger priorities. The most urgent priority is 0; + the least urgent priority is 4294967295. +
    delay - an integer number of seconds to wait before putting the job in + the ready queue. The job will be in the "delayed" state during this time. +
    ttr - time to run, an integer number of seconds to allow a worker to run this job. +
    + +release(id) + +

    +

    +Puts a reserved job back into the ready queue +
    + +reserve(timeout) + +

    +

    +Returns and reserves a job (waits until one becomes available if necessary) +
    + +touch(id) + +

    +

    +Allows a worker to request more time to work on a job. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Beanstalk/index.html b/io-master/docs/reference/Networking/Beanstalk/index.html new file mode 100755 index 0000000..49143ba --- /dev/null +++ b/io-master/docs/reference/Networking/Beanstalk/index.html @@ -0,0 +1,58 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Networking/CGI/CGI/index.html b/io-master/docs/reference/Networking/CGI/CGI/index.html new file mode 100755 index 0000000..df23845 --- /dev/null +++ b/io-master/docs/reference/Networking/CGI/CGI/index.html @@ -0,0 +1,261 @@ + + + + + CGI + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +CGI +  /   +CGI +


    +


    + + + + + + + + + + + + + +
    CGI supports accessing CGI parameters passed in environment variables or standard input by a web servers like Apache. Example use: +
    +#!./ioServer
    +
    +cgi = CGI clone
    +
    +redirect = cgi getParameters at("redirurl")
    +if (redirect and redirect != "",
    +	redirect clipAfterStartOfSeq("\r")
    +	redirect clipAfterStartOfSeq("\n")
    +	cgi redirect(redirect)
    +	System exit(0)
    + )
    +
    +cgi header("Content-type", "text/html")
    +
    +cgi write("<html><head><title>test</title><body>")
    +cgi write("GET Parameters:")
    +cgi getParameters foreach(k, v,
    +	cgi write(k .. " = " .. v .. ","))
    +)
    +
    +cgi write("POST Parameters:")
    +cgi postParameters foreach(k, v,
    +	cgi write(k .. " = " .. v .. ","))
    +)
    +
    +cgi write("COOKIES:")
    +cgi cookies foreach(k, v,
    +	cgi write(k .. " = " .. v .. ",")
    +)
    +
    +
     
     
     
    + +
    +

    + +contentLength + +

    +

    +CONTENT_LENGTH from web server - Size of POST Data +
    + +contentType + +

    +

    +CONTENT_TYPE from web server +
    + +cookies + +

    +

    +Returns a Map of cookies provided by the client +
    + +decodeUrlParam(aString) + +

    +

    +Returns a URL decoded version of aString. +
    + +encodeUrlParam(aString) + +

    +

    +Returns a URL encoded version of aString. +
    + +getParameters + +

    +

    +Parses the QUERY_STRING environment variable and returns a Map containing key/value query value pairs. For testing, a QUERY_STRING can be passed to standard in, one line will be read +
    + +header(name, value, sendMultiple) + +

    +

    +Add a header to the output, may only be called before write() is called. + One of each header will be sent unless sendMultiple is true +
    + +httpHeader(name) + +

    +

    +Fetch a header supplied by the client, such as 'referer' +
    + +isInWebScript + +

    +

    +Checks to see if this is being called within a CGI request or from the command-line (testing). Simply checks for System getEnvironmentVariable("GATEWAY_INTERFACE") +
    + +maxPostSize + +

    +

    +Maximum size in bytes, to process from user submitted data. Data greater than this will result in a nil postData slot +
    + +maxPostSizeExceeded + +

    +

    +Returns true if the POST data exceeds a set maxPostSize +
    + +pathInfo + +

    +

    +PATH_INFO from web server +
    + +pathTranslated + +

    +

    +PATH_TRANSLATED from web server +
    + +postData + +

    +

    +The raw post data sent to the script. Only set if getEnvironmentVariable("REQUEST_METHOD") asLowercase == "post". +
    + +postParameters + +

    +

    +Parses the POST data, multipart and urlencoded. Returns a map of submitted variables. +For uploaded files, an Object is returned with these slots: +
    +fileName
    +content (raw content of file as Sequence)
    +contentType
    +contentEncoding
    +size (in characters/bytes)
    +asString (pretty string of name, type, size)
    +
    +
    + +queryString + +

    +

    +QUERY_STRING from web server +
    + +redirect(url) + +

    +

    +Send a location: and redirect the user. May only be called before write() is called. It is left to the caller to stop any further processing. +
    + +remoteAddress + +

    +

    +REMOTE_ADDR from web server - User's IP +
    + +remoteHost + +

    +

    +REMOTE_HOST from web server - User's host (often blank) +
    + +requestMethod + +

    +

    +GET, POST, PUT, etc +
    + +requestParameter(name) + +

    +

    +Lazy developer's helper funtion. Retrieves a value from GET or POST, POST first +
    + +scriptName + +

    +

    +SCRIPT_NAME from web server +
    + +setCookie(name, value, expiresDate, domain, path, secureBool) + +

    +

    +Sets a cookie, keep in mind this will not be available in cookies() until they next visit to the site. + Parameters other than name and value are optional. +
    + +status(statusCode) + +

    +

    +Numeric status code to send to the client. + Normally, the server will figure this out on its own, but this allows handling 404s and such. +
    + +write(string, [string...]) + +

    +

    +Send content for the body of the response +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/CGI/index.html b/io-master/docs/reference/Networking/CGI/index.html new file mode 100755 index 0000000..f2296db --- /dev/null +++ b/io-master/docs/reference/Networking/CGI/index.html @@ -0,0 +1,58 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Networking/DistributedObjects/DOConnection/index.html b/io-master/docs/reference/Networking/DistributedObjects/DOConnection/index.html new file mode 100755 index 0000000..3b6861d --- /dev/null +++ b/io-master/docs/reference/Networking/DistributedObjects/DOConnection/index.html @@ -0,0 +1,125 @@ + + + + + DOConnection + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +DistributedObjects +  /   +DOConnection +


    +


    + + + + + + + + + + + + + +
    The DOConnection object is useful for communicating with remote servers in a way that makes it look just like the sending of local messages. Proxies are automatically created on either side for passed objects, with the exception of strings and numbers, which are passed by value. Example: +
    +con := DOConnection clone setHost("127.0.0.1") setPort(8456) connect
    +result := con serverObject test(1)
    +writeln(result)
    +r := result at(0)
    +writeln(r)
    +r := result at(1)
    +writeln(r)
    +
    + +Implementation Notes: +

    + +The format of the Distributed Objects message is a list of NullCharacter +terminated strings in one of these two formats: +

    +Send message format: + +

    +s NullCharacter targetId NullCharacter messageName NullCharacter argCount NullCharacter argType NullCharacter argValue NullCharacter (next arg type and value, etc)
    +
    + +Reply message format: + +
    +r NullCharacter argType NullCharacter argvalue NullCharacter
    +
    + +If the argument is not a String, Number or nil then: +If it is local to the sender, the type is RemoteObject. +If it is a proxy to a remote object, the type is LocalObject. + +This isn't optimized yet. +
     
     
     
    + +
    +

    + +close + +

    +

    +Close the connection, if it is open. Returns self. +
    + +connect + +

    +

    +Connect to the remote DOServer. Returns self or an Error, if one occurs. +
    + +host + +

    +

    +Returns the host ip. +
    + +port + +

    +

    +Returns the port. +
    + +serverObject + +

    +

    +A handle to the remote DOServer's root object. Returns result from server or an Error, if one occurs. +
    + +setHost(ipString) + +

    +

    +Sets the host ip to connect to. Returns self or an Error, if one occurs. +
    + +setPort(portNumber) + +

    +

    +Sets the port number to connect to. Returns self. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/DistributedObjects/DOProxy/index.html b/io-master/docs/reference/Networking/DistributedObjects/DOProxy/index.html new file mode 100755 index 0000000..1301f4a --- /dev/null +++ b/io-master/docs/reference/Networking/DistributedObjects/DOProxy/index.html @@ -0,0 +1,37 @@ + + + + + DOProxy + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +DistributedObjects +  /   +DOProxy +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/DistributedObjects/DOServer/index.html b/io-master/docs/reference/Networking/DistributedObjects/DOServer/index.html new file mode 100755 index 0000000..4c1b63a --- /dev/null +++ b/io-master/docs/reference/Networking/DistributedObjects/DOServer/index.html @@ -0,0 +1,62 @@ + + + + + DOServer + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +DistributedObjects +  /   +DOServer +


    +


    + + + + + + + + + + + + + +
    An experimental distributed objects server. Example; +
    +Test := Object clone
    +Test test := method(v, 
    +	write("got test '", v, "'\n")
    +	return List clone append(1)
    +)
    +
    +doServer := DOServer clone
    +doServer setRootObject(Test clone)
    +doServer setPort(8456)
    +doServer start
    +
    +
     
     
     
    + +
    +

    + +setRootObject(anObject) + +

    +

    +Sets the root object which incoming messages will be sent to. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/DistributedObjects/MDOConnection/index.html b/io-master/docs/reference/Networking/DistributedObjects/MDOConnection/index.html new file mode 100755 index 0000000..99e948a --- /dev/null +++ b/io-master/docs/reference/Networking/DistributedObjects/MDOConnection/index.html @@ -0,0 +1,53 @@ + + + + + MDOConnection + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +DistributedObjects +  /   +MDOConnection +


    +


    + + + + + + + + + + + + + +
    A Minimal Distributed Objects connection. Example; +
    +dateServerCon := MDOConnection clone setHost("127.0.0.1") setPort(8123) connect
    +writeln("date from date server: ", Date fromNumber(dateServerCon currentDate))
    +dateServerCon close
    +
    + +See the docs for MDOServer for the DateServer code. +

    +A MDOConnection will pause calling coroutines until the response is received. +Mutliple requests can be sent before a single request returns if they are sent +from separate coroutines. +

     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/DistributedObjects/MDOServer/index.html b/io-master/docs/reference/Networking/DistributedObjects/MDOServer/index.html new file mode 100755 index 0000000..3cdef2b --- /dev/null +++ b/io-master/docs/reference/Networking/DistributedObjects/MDOServer/index.html @@ -0,0 +1,53 @@ + + + + + MDOServer + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +DistributedObjects +  /   +MDOServer +


    +


    + + + + + + + + + + + + + +
    A Minimal Distributed Objects server. Example; +
    +DateServer := Object clone do(
    +	acceptedMessageNames := list("currentDate")
    +	currentDate := method(Date clone asNumber)
    +)
    +
    +mdoServer := MDOServer clone 
    +mdoServer setHost("127.0.0.1")  setPort(8123) 
    +mdoServer setLocalObject(DateServer clone)
    +mdoServer start
    +
    +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/DistributedObjects/index.html b/io-master/docs/reference/Networking/DistributedObjects/index.html new file mode 100755 index 0000000..63b92eb --- /dev/null +++ b/io-master/docs/reference/Networking/DistributedObjects/index.html @@ -0,0 +1,62 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Networking/GoogleSearch/GooglePage/index.html b/io-master/docs/reference/Networking/GoogleSearch/GooglePage/index.html new file mode 100755 index 0000000..4a402da --- /dev/null +++ b/io-master/docs/reference/Networking/GoogleSearch/GooglePage/index.html @@ -0,0 +1,78 @@ + + + + + GooglePage + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +GoogleSearch +  /   +GooglePage +


    +


    + + + + + + + + + + + + + +
    Object representing one page of search results. +
     
     
     
    + +
    +

    + +find + +

    +

    +Runs the search. +
    + +links + +

    +

    +Returns the list of link results. +
    + +pageNumber + +

    +

    +Returns the current page number of results. +
    + +searchTerm + +

    +

    +Returns the search term. +
    + +setSearchTerm(aSeq) + +

    +

    +Sets the search term. Returns self. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/GoogleSearch/GoogleSearch/index.html b/io-master/docs/reference/Networking/GoogleSearch/GoogleSearch/index.html new file mode 100755 index 0000000..e30a631 --- /dev/null +++ b/io-master/docs/reference/Networking/GoogleSearch/GoogleSearch/index.html @@ -0,0 +1,76 @@ + + + + + GoogleSearch + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +GoogleSearch +  /   +GoogleSearch +


    +


    + + + + + + + + + + + + + +
    Object for performing web searches via Google. +Example: +
    +GoogleSearch clone setSearchTerm("iolanguage") find links foreach(println)
    +while(Coroutine yieldingCoros size > 1, yield)
    +
    +
     
     
     
    + +
    +

    + +find + +

    +

    +Runs the search. +
    + +links + +

    +

    +Returns the list of link results. +
    + +maxPages + +

    +

    +Returns the max number of pages to fetch results from. +
    + +setMaxPages(aNumber) + +

    +

    +Sets the max number of pages to fetch results from. Returns self. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/GoogleSearch/index.html b/io-master/docs/reference/Networking/GoogleSearch/index.html new file mode 100755 index 0000000..379ceea --- /dev/null +++ b/io-master/docs/reference/Networking/GoogleSearch/index.html @@ -0,0 +1,59 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Networking/HttpClient/HCConnection/index.html b/io-master/docs/reference/Networking/HttpClient/HCConnection/index.html new file mode 100755 index 0000000..b70fc68 --- /dev/null +++ b/io-master/docs/reference/Networking/HttpClient/HCConnection/index.html @@ -0,0 +1,64 @@ + + + + + HCConnection + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +HttpClient +  /   +HCConnection +


    +


    + + + + + + + + + + + + + +
    Sends an HCRequest using the HTTP protcol and stores the response in an HCResponse +
     
     
     
    + +
    +

    + +request + +

    +

    +An HCRequest describing the HTTP request to be sent +
    + +response + +

    +

    +An HCResponse describing the response received from the remote host +
    + +sendRequest + +

    +

    +Send the request and set the response +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/HttpClient/HCRequest/index.html b/io-master/docs/reference/Networking/HttpClient/HCRequest/index.html new file mode 100755 index 0000000..1541fa4 --- /dev/null +++ b/io-master/docs/reference/Networking/HttpClient/HCRequest/index.html @@ -0,0 +1,106 @@ + + + + + HCRequest + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +HttpClient +  /   +HCRequest +


    +


    + + + + + + + + + + + + + +
    State describing an HTTP request to be sent by an HCConnection +
     
     
     
    + +
    +

    + +connection + +

    +

    +Clone HCConnect and set its state based on this HCRequest +
    + +hasHeader(name) + +

    +

    +Returns true if this request has a header with name +
    + +headerAt(name) + +

    +

    +Returns the value for header with name +
    + +host + +

    +

    +The host to send this request to +
    + +httpMethod + +

    +

    +The HTTP method to be sent +
    + +port + +

    +

    +The port connect to when sending this request +
    + +resource + +

    +

    +The resource to request +
    + +setHeader(name, value) + +

    +

    +Sets header with name to value +
    + +with(aUrl) + +

    +

    +Clones HCResponse and sets its state based on aUrl (HCUrl) +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/HttpClient/HCResponse/index.html b/io-master/docs/reference/Networking/HttpClient/HCResponse/index.html new file mode 100755 index 0000000..9ecd606 --- /dev/null +++ b/io-master/docs/reference/Networking/HttpClient/HCResponse/index.html @@ -0,0 +1,71 @@ + + + + + HCResponse + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +HttpClient +  /   +HCResponse +


    +


    + + + + + + + + + + + + + +
    Stores the result of sending an HCRequest using an HCConnection +
     
     
     
    + +
    +

    + +headerAt(name) + +

    +

    +First header value associated with name +
    + +headersAt(name) + +

    +

    +Header values associated with name +
    + +statusCode + +

    +

    +Numeric status code. ex: 200 +
    + +statusDescription + +

    +

    +Descriptive status code ex: OK +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/HttpClient/HCResponseParser/index.html b/io-master/docs/reference/Networking/HttpClient/HCResponseParser/index.html new file mode 100755 index 0000000..a379d3c --- /dev/null +++ b/io-master/docs/reference/Networking/HttpClient/HCResponseParser/index.html @@ -0,0 +1,42 @@ + + + + + HCResponseParser + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +HttpClient +  /   +HCResponseParser +


    +


    + + + + + + + + + + + + + +
    Handles parsing response received during an HCConnection +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/HttpClient/HCUrl/index.html b/io-master/docs/reference/Networking/HttpClient/HCUrl/index.html new file mode 100755 index 0000000..ab7cf82 --- /dev/null +++ b/io-master/docs/reference/Networking/HttpClient/HCUrl/index.html @@ -0,0 +1,73 @@ + + + + + HCUrl + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +HttpClient +  /   +HCUrl +


    +


    + + + + + + + + + +
     
     
     
    + +
    +

    + +get + +

    +

    +Creates an HCConnection based on this url, sends a request and returns the content of the response +
    + +getResponse + +

    +

    +Creates an HCConnection based on this url, sends a request and returns the response +
    + +port + +

    +

    +Returns url's port +
    + +url + +

    +

    +Returns url's host +
    + +with(urlSeq) + +

    +

    +Returns a clone of HCUrl with its state set by parsing urlSeq +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/HttpClient/index.html b/io-master/docs/reference/Networking/HttpClient/index.html new file mode 100755 index 0000000..d04dd47 --- /dev/null +++ b/io-master/docs/reference/Networking/HttpClient/index.html @@ -0,0 +1,62 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Networking/Loudmouth/JID/index.html b/io-master/docs/reference/Networking/Loudmouth/JID/index.html new file mode 100755 index 0000000..27fa104 --- /dev/null +++ b/io-master/docs/reference/Networking/Loudmouth/JID/index.html @@ -0,0 +1,84 @@ + + + + + JID + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Loudmouth +  /   +JID +


    +


    + + + + + + + + + + + + + +
    Object for representing JIDs. +
    
    +j := JID with("cow@moo.com/Alpes")
    +j username == "cow"
    +j host == "moo.com"
    +j resource == "Alpes"
    +j asString == "cow@moo.com/Alpes"
    +
     
     
     
    + +
    +

    + +asString + +

    +

    +Converts JID to string with all available parts included. +
    + +host + +

    +

    +Extracts host's address from JID. +
    + +resource + +

    +

    +Returns defined resource. +
    + +username + +

    +

    +Extracts username from JID. +
    + +with(jid) + +

    +

    +Extracts all parts of a provided Sequence and returns new JID clone. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Loudmouth/Loudmouth/index.html b/io-master/docs/reference/Networking/Loudmouth/Loudmouth/index.html new file mode 100755 index 0000000..9ccd887 --- /dev/null +++ b/io-master/docs/reference/Networking/Loudmouth/Loudmouth/index.html @@ -0,0 +1,235 @@ + + + + + Loudmouth + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Loudmouth +  /   +Loudmouth +


    +


    + + + + + + + + + + + + + +
    Loudmouth is an async XMPP library written in C. + +Example usage: +
    +acc := Loudmouth with("user@server.com", "super password") do(
    +  handleConnect = method(
    +    "Connected!" println)
    +
    +  handleMessage = method(msg
    +    "#{msg from} > #{msg plainBody}" println
    +    body :=  msg plainBody
    +
    +    if(body indexOf("#") == 0,
    +      body = doString(body) asString)
    +
    +    # This way you can manipulate
    +    # XML nodes with SGML addon
    +    XmppChatMessage create\
    +      setPlainBody(body)\
    +      setTo(msg from)\
    +      sendVia(self)
    +
    +    # or simply send the message (must be a Sequence)
    +    # (this is obviously faster)
    +    #self send(msg from, body))
    +)
    +
    +acc connect
    +# Any Io code after this line won't be executed
    +# (unless called as Loudmouth callback or run in separate thread)
    +Loudmouth startMainLoop
    +
    +
    +
     
     
     
    + +
    +

    + +connect + +

    +

    +Connects to the server. Returns self. +
    + +disconnect + +

    +

    +Disconnects from server and returns true if it succeeds. +
    + +handleAuthenticated + +

    +

    +Slot called upon successful authentication. +
    + +handleAuthenticationFailure + +

    +

    +Slot called if username/password combination is wrong. +
    + +handleConnect + +

    +

    +Slot called once connection is established. +
    + +handleConnectFailure + +

    +

    +Slot called when server is not reachable. +
    + +handleDisconnect + +

    +

    +Slot called upon closing the connection with the server. +
    + +handleMessage(xmppMessage) + +

    +

    +Slot called when a message arrives via XMPP stream. xmppMessage is a LoudmouthMessage object. +
    + +handleSslFailure + +

    +

    +Slot called if SSL-related problems arrive. Method should return true if it wishes to make a connection without SSL, false otherwise. +
    + +isConnected + +

    +

    + +
    + +isSslSupported + +

    +

    + +
    + +registerAccount(server, username, password) + +

    +

    +Registers a new account at XMPP server. Returns true or false. +
    + +send(toJid, message) + +

    +

    +Sends a message (Sequence) to provided JID (Sequence). Returns true or false. +
    + +sendRaw(body) + +

    +

    +Sends raw text over XMPP stream. Returns true if no errors occur. +
    + +setPresence(presence[, statusMessage]) + +

    +

    +Sets availability/presence and status message. +
    + +setStatusMessage(statusMessage) + +

    +

    +Sets status message. +
    + +startMainLoop + +

    +

    +Starts GMainLoop. Should be called after a connection is established with the server. +
    + +status + +

    +

    +Returns status connection. Possible return values are: +
      +
    • Loudmouth types CLOSED
    • +
    • Loudmouth types OPENING
    • +
    • Loudmouth types OPEN
    • +
    • Loudmouth types AUTHENTICATING
    • +
    • Loudmouth types AUTHENTICATED
    • +
    +
    + +stopMainLoop + +

    +

    + +
    + +types + +

    +

    +

    Object containing status codes and message types.

    +
    
    +  Loudmouth with("username@server.com", "password") do(
    +    handleConnect = method(
    +      self setPresence(Loudmouth types AVAILABLE), "Drinking lemonade...")
    +  )
    +  
    +
    + +with(jid, password) + +

    +

    +Creates a new Loudmouth clone with server details provided in jid. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Loudmouth/LoudmouthMessage/index.html b/io-master/docs/reference/Networking/Loudmouth/LoudmouthMessage/index.html new file mode 100755 index 0000000..5f8d3e2 --- /dev/null +++ b/io-master/docs/reference/Networking/Loudmouth/LoudmouthMessage/index.html @@ -0,0 +1,120 @@ + + + + + LoudmouthMessage + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Loudmouth +  /   +LoudmouthMessage +


    +


    + + + + + + + + + + + + + +
    LoudmouthMessage provides [[SGML]] interface with few convience methods for manipulation of XMPP messages. +
     
     
     
    + +
    +

    + +asString + +

    +

    +Converts XML to Sequence. +
    + +body + +

    +

    +Returns value message's body node. If both XHTML and plain versions are available, XHTML version will be returned. +
    + +from + +

    +

    +Returns sender's JID. +
    + +plainBody + +

    +

    +Returns value of message's body node with XHTML markup. +
    + +sendVia(loudmouthConnection) + +

    +

    +Converts message to sequence and sends it via the provided [[Loudmouth]] object. It updates from property and returns true if message is sent. +
    + +setFrom(jid) + +

    +

    +Sets sender's JID. Returns self. +
    + +setTo(jid) + +

    +

    +Sets message receiver to defined JID. JID can be both an [[Sequence]] or a [[JID]] object. Returns self. +
    + +setXmppType(type) + +

    +

    +Sets value of type attribute. +
    + +to + +

    +

    +Returns [[JID]] of receiver. +
    + +with(source) + +

    +

    +Creates new [[LoudmouthMessage]] based on source, which should be valid XML ([[Sequence]]). +
    + +xmppType + +

    +

    +Returns value of type attribute of message node. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Loudmouth/XmppChatMessage/index.html b/io-master/docs/reference/Networking/Loudmouth/XmppChatMessage/index.html new file mode 100755 index 0000000..15744b9 --- /dev/null +++ b/io-master/docs/reference/Networking/Loudmouth/XmppChatMessage/index.html @@ -0,0 +1,50 @@ + + + + + XmppChatMessage + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Loudmouth +  /   +XmppChatMessage +


    +


    + + + + + + + + + + + + + +
    A convience object for creating XMPP messages with chat type. +
     
     
     
    + +
    +

    + +create + +

    +

    +Creates a new [[LoudmouthMessage]] of chat type and random id value. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Loudmouth/index.html b/io-master/docs/reference/Networking/Loudmouth/index.html new file mode 100755 index 0000000..b9576d6 --- /dev/null +++ b/io-master/docs/reference/Networking/Loudmouth/index.html @@ -0,0 +1,61 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Networking/NetworkAdapter/NetworkAdapter/index.html b/io-master/docs/reference/Networking/NetworkAdapter/NetworkAdapter/index.html new file mode 100755 index 0000000..cbe4e6f --- /dev/null +++ b/io-master/docs/reference/Networking/NetworkAdapter/NetworkAdapter/index.html @@ -0,0 +1,50 @@ + + + + + NetworkAdapter + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +NetworkAdapter +  /   +NetworkAdapter +


    +


    + + + + + + + + + + + + + +
    Interface to network adapter functionality. +
     
     
     
    + +
    +

    + +macAddress + +

    +

    +Returns the MAC address for the primary network adapter in a Hex string. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/NetworkAdapter/index.html b/io-master/docs/reference/Networking/NetworkAdapter/index.html new file mode 100755 index 0000000..1413041 --- /dev/null +++ b/io-master/docs/reference/Networking/NetworkAdapter/index.html @@ -0,0 +1,58 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Networking/SecureSocket/Certificate/index.html b/io-master/docs/reference/Networking/SecureSocket/Certificate/index.html new file mode 100755 index 0000000..57e9d75 --- /dev/null +++ b/io-master/docs/reference/Networking/SecureSocket/Certificate/index.html @@ -0,0 +1,99 @@ + + + + + Certificate + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +SecureSocket +  /   +Certificate +


    +


    + + + + + + + + + + + + + +
    Read-only interface to SSL X509 certificates. +
     
     
     
    + +
    +

    + +attributes + +

    +

    +Returns the attributes. +
    + +extensions + +

    +

    +Returns the extensions. +
    + +issuerName + +

    +

    +Returns the issuerName. +
    + +notAfter + +

    +

    +Returns the notAfter value. +
    + +notBefore + +

    +

    +Returns the notBefore value. +
    + +serialNumber + +

    +

    +Returns the serialNumber. +
    + +subjectName + +

    +

    +Returns the subjectName. +
    + +version + +

    +

    +Returns the version. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/SecureSocket/SecureClient/index.html b/io-master/docs/reference/Networking/SecureSocket/SecureClient/index.html new file mode 100755 index 0000000..4484116 --- /dev/null +++ b/io-master/docs/reference/Networking/SecureSocket/SecureClient/index.html @@ -0,0 +1,94 @@ + + + + + SecureClient + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +SecureSocket +  /   +SecureClient +


    +


    + + + + + + + + + + + + + +
    Interface to secure network communication. +A SecureClient is a wrapper on an OpenSSL SSL_CTX object +and supports both TLSv1 and DTLSv1. +
     
     
     
    + +
    +

    + +connectionToServer + +

    +

    +Returns connectionToServer. +
    + +setCAFile(aPath) + +

    +

    +Sets the CA file. Returns self. +
    + +setCRLFile(aPath) + +

    +

    +Sets the CRL file. Returns self. +
    + +setCertFile(aPath) + +

    +

    +Sets the Certificate file. Returns self. +
    + +setKeyFile(aPath) + +

    +

    +Sets the key file. Returns self. +
    + +useDTLS + +

    +

    +Returns useDTLS value. +
    + +useTLS + +

    +

    +Returns useTLS value. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/SecureSocket/SecureServer/index.html b/io-master/docs/reference/Networking/SecureSocket/SecureServer/index.html new file mode 100755 index 0000000..2db37cc --- /dev/null +++ b/io-master/docs/reference/Networking/SecureSocket/SecureServer/index.html @@ -0,0 +1,162 @@ + + + + + SecureServer + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +SecureSocket +  /   +SecureServer +


    +


    + + + + + + + + + + + + + +
    Interface to secure network communication. +A SecureServer is a wrapper on an OpenSSL SSL_CTX object +and supports both TLSv1 and DTLSv1. +Example: + +
    +//...
    +
    +
     
     
     
    + +
    +

    + +dispatchUdp + +

    +

    +Returns dispatchUdp value. +
    + +dtlsWrap + +

    +

    +Returns dtlsWrap value. +
    + +port + +

    +

    +Returns the port on which the server will listen for connections. +
    + +setCAFile(path) + +

    +

    +Sets the CA file. Returns self. +
    + +setCRLFile(path) + +

    +

    +Sets the CRL file. Returns self. +
    + +setCertFile(path) + +

    +

    +Sets the certificate file. Returns self. +
    + +setHost(hostName) + +

    +

    +Sets the hostName. Returns self. +
    + +setKeyFile(path) + +

    +

    +Sets the key file. Returns self. +
    + +setPort(aNumber) + +

    +

    +Sets the port on which the server will listen for connections. Returns self. +
    + +setRequiresClientCertificate(aBool) + +

    +

    +Sets the requires client certificate attribute. Returns self. +
    + +stop + +

    +

    +Stops the server if it is running. Returns self. +
    + +supportsDTLS + +

    +

    +Returns true if server supports DTLS, false otherwise. +
    + +tlsWrap + +

    +

    +Returns tlsWrap value. +
    + +udpRecvIP + +

    +

    +Returns udpRecvIP value. +
    + +useDTLS + +

    +

    +Returns useDTLS value. +
    + +useTLS + +

    +

    +Returns useTLS value. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/SecureSocket/SecureSocket/index.html b/io-master/docs/reference/Networking/SecureSocket/SecureSocket/index.html new file mode 100755 index 0000000..942cce1 --- /dev/null +++ b/io-master/docs/reference/Networking/SecureSocket/SecureSocket/index.html @@ -0,0 +1,227 @@ + + + + + SecureSocket + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +SecureSocket +  /   +SecureSocket +


    +


    + + + + + + + + + +
     
     
     
    + +
    +

    + +ValidationFail + +

    +

    +Returns ValidationFail attribute as a number. +
    + +ValidationOkay + +

    +

    +Returns ValidationOkay attribute as a number. +
    + +asyncAccept + +

    +

    +Accept a connection asynchronously. +
    + +asyncConnectBIO + +

    +

    +Performs asyncConnectBIO. +
    + +asyncConnectSSL + +

    +

    +Performs asyncConnectSSL. +
    + +asyncStreamRead + +

    +

    +Read available data and return it. +
    + +asyncUdpRead + +

    +

    +? +
    + +asyncUdpServerRead + +

    +

    +? +
    + +asyncWrite(aSeq) + +

    +

    +Writes aSeq to the socket. Returns self. +
    + +descriptorId + +

    +

    +Returns descriptorId. +
    + +getSocketReadLowWaterMark + +

    +

    +Returns ReadLowWaterMark attribute. +
    + +getSocketWriteLowWaterMark + +

    +

    +Returns WriteLowWaterMark attribute. +
    + +isConnected + +

    +

    +Returns true if socket is connected, false otherwise. +
    + +isDatagram + +

    +

    +Returns isDatagram attribute. +
    + +isOpen + +

    +

    +Returns true if socket is open, false otherwise. +
    + +rawCertificate + +

    +

    +Returns rawCertificate. +
    + +rawPeerCertificate + +

    +

    +Returns rawPeerCertificate. +
    + +rawValidate + +

    +

    +Performs rawValidate. +
    + +rbioReady + +

    +

    +Returns rbioReady attribute. +
    + +setSocketReadBufferSize(numberOfBytes) + +

    +

    +Sets read buffer size. Returns self. +
    + +setSocketReadLowWaterMark(numberOfBytes) + +

    +

    +Sets read low water mark. Returns self. +
    + +setSocketWriteBufferSize(numberOfBytes) + +

    +

    +Sets write buffer size. Returns self. +
    + +setSocketWriteLowWaterMark(numberOfBytes) + +

    +

    +Sets write low water mark. Returns self. +
    + +shutdown + +

    +

    +close the socket connection. Returns self. +
    + +supportsDTLS + +

    +

    +Returns true if server supports DTLS, false otherwise. +
    + +wantsRead + +

    +

    +Returns wantsRead attribute. +
    + +wantsWrite + +

    +

    +Returns IoSecureSocket_wantsWrite attribute. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/SecureSocket/index.html b/io-master/docs/reference/Networking/SecureSocket/index.html new file mode 100755 index 0000000..fcad9d0 --- /dev/null +++ b/io-master/docs/reference/Networking/SecureSocket/index.html @@ -0,0 +1,61 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Networking/Socket/DNS/index.html b/io-master/docs/reference/Networking/Socket/DNS/index.html new file mode 100755 index 0000000..73d176b --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/DNS/index.html @@ -0,0 +1,65 @@ + + + + + DNS + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +DNS +


    +


    + + + + + + + + + + + + + +
    Utility methods related to Domain Name Service lookups. +
     
     
     
    + +
    +

    + +dnsQueryPacketForHostName(hostNameSeq) + +

    +

    +Assembles a DNS query packet for the given host name and returns it in a Sequence. +
    + +hostNameAndIPforDNSResponsePacket(dnsResponsePacketSeq) + +

    +

    +Dissasembles the given dnsResponsePacketSeq and returns a list object containing +the hostName and IP or an error string on error. +
    + +localNameServersIPs + +

    +

    +Returns a list of local name server IPs as a list of Sequences. Works on OSX, Unix, Windows. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/DNSQuery/index.html b/io-master/docs/reference/Networking/Socket/DNSQuery/index.html new file mode 100755 index 0000000..98c00c7 --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/DNSQuery/index.html @@ -0,0 +1,88 @@ + + + + + DNSQuery + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +DNSQuery +


    +


    + + + + + + + + + + + + + +
    An object representing an individual DNS query. +
     
     
     
    + +
    +

    + + +addCoro(aCoro) + +

    +

    +Private method that adds a coro to coros. + +
    + +coros + +

    +

    +List of coroutines paused waiting for this query. + These coros will be resumed when the query completes. +
    + +hostName + +

    +

    +The host name which the query will request an IP for. +
    + +resumeCoros + +

    +

    +Resumes all the paused coros. Should this use resumeLater instead? +
    + +setHostName(aSeq) + +

    +

    +Sets the host name for the query. +
    + +waitOn + +

    +

    +Pauses the calling coroutine until the query is completed. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/DNSServer/index.html b/io-master/docs/reference/Networking/Socket/DNSServer/index.html new file mode 100755 index 0000000..ed1f244 --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/DNSServer/index.html @@ -0,0 +1,65 @@ + + + + + DNSServer + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +DNSServer +


    +


    + + + + + + + + + + + + + +
    An object representing a DNSServer which DNS requests can be sent to. +
     
     
     
    + +
    +

    + +host + +

    +

    +The host name (usually an IP) for the DNSServer. +
    + +ipForHostName(hostName, timeout) + +

    +

    +Sends a request to the DNS server, waits for a response and returns it. Will try 3 times if there are timeouts. + Returns the IP (as a Sequence) if successful, raises an exception otherwise. +
    + +setHost(aSeq) + +

    +

    +Sets the host name for the DNSServer. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/EvConnection/index.html b/io-master/docs/reference/Networking/Socket/EvConnection/index.html new file mode 100755 index 0000000..734195a --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/EvConnection/index.html @@ -0,0 +1,42 @@ + + + + + EvConnection + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +EvConnection +


    +


    + + + + + + + + + + + + + +
    Networking Event. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/EvRequest/index.html b/io-master/docs/reference/Networking/Socket/EvRequest/index.html new file mode 100755 index 0000000..3e07721 --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/EvRequest/index.html @@ -0,0 +1,42 @@ + + + + + EvRequest + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +EvRequest +


    +


    + + + + + + + + + + + + + +
    Networking Event. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/Event/index.html b/io-master/docs/reference/Networking/Socket/Event/index.html new file mode 100755 index 0000000..9f82b40 --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/Event/index.html @@ -0,0 +1,64 @@ + + + + + Event + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +Event +


    +


    + + + + + + + + + + + + + +
    Networking Event. +
     
     
     
    + +
    +

    + +category + +

    +

    +Networking +
    + +handleEvent(timeout) + +

    +

    + +
    + +waitOnOrExcept(timeout) + +

    +

    +Same as waitOn() but an exception is raised if a timeout occurs. Returns self. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/EventManager/index.html b/io-master/docs/reference/Networking/Socket/EventManager/index.html new file mode 100755 index 0000000..53a96ee --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/EventManager/index.html @@ -0,0 +1,53 @@ + + + + + EventManager + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +EventManager +


    +


    + + + + + + + + + + + + + +
    Object for libevent (kqueue/epoll/poll/select) library. + Usefull for getting notifications for descriptor (a socket or file) events. + Events include read (the descriptor has unread data or timeout) and write (the descriptor wrote some data or timeout). + Also, timer and signal events are supported. +
     
     
     
    + +
    +

    + +run + +

    +

    +Runs the EventManger loop. Does not return. Private - should only be called by resumeIfNeeded. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/Host/index.html b/io-master/docs/reference/Networking/Socket/Host/index.html new file mode 100755 index 0000000..337b058 --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/Host/index.html @@ -0,0 +1,60 @@ + + + + + Host + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +Host +


    +


    + + + + + + + + + +
     
     
     
    + +
    +

    + +address + +

    +

    +Returns the IP address. A DNS lookup is done in the background if the + address is not already known. Returns an error on lookup failure. +
    + +name + +

    +

    +Returns name. +
    + +setName(aString) + +

    +

    +Set's the host name. Return self. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/IPAddress/index.html b/io-master/docs/reference/Networking/Socket/IPAddress/index.html new file mode 100755 index 0000000..c5882aa --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/IPAddress/index.html @@ -0,0 +1,51 @@ + + + + + IPAddress + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +IPAddress +


    +


    + + + + + + + + + + + + + +
    Object representation of an Internet Protocol Address. +
     
     
     
    + +
    +

    + +setHostName(hostName) + +

    +

    +Translates hostName to an IP using asynchronous DNS and + sets the host attribute. Returns self. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/ReadEvent/index.html b/io-master/docs/reference/Networking/Socket/ReadEvent/index.html new file mode 100755 index 0000000..e44b5ed --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/ReadEvent/index.html @@ -0,0 +1,42 @@ + + + + + ReadEvent + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +ReadEvent +


    +


    + + + + + + + + + + + + + +
    Object for read events. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/Server/index.html b/io-master/docs/reference/Networking/Socket/Server/index.html new file mode 100755 index 0000000..619f6b5 --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/Server/index.html @@ -0,0 +1,121 @@ + + + + + Server + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +Server +


    +


    + + + + + + + + + + + + + +
    The Server object provides a simple interface for running a server. +You just need to set the port and define a handleSocket method. Here's an example of an echo server: + +
    +Echo := Object clone
    +Echo handleSocketFromServer := method(aSocket, aServer,
    +  write("[Got echo connection from ", aSocket host, "]\n")
    +  while(aSocket isOpen,
    +   if(aSocket read, aSocket write(aSocket readBuffer asString))
    +   aSocket readBuffer empty
    +  )
    +  write("[Closed ", aSocket host, "]\n")
    +)
    +
    +write("[Starting echo server on port 8456]\n")
    +server := Server clone setPort(8456)
    +server handleSocket := method(aSocket,
    +  Echo clone @handleSocketFromServer(aSocket, self)
    +)
    +server start
    +
    + +Notes

    + +Io's use of lightweight threading and select for dealing with sockets makes for +servers that are much more efficient (both memory and cpu wise) than those written +with kernel threads and socket polling. +

     
     
     
    + +
    +

    + +handleSocket(aSocket) + +

    +

    +This method is called when the server accepts a new socket. The new socket is passed as the argument. + Override this method in your own server subclass. The default implementation raises an exception. +
    + +port + +

    +

    +Returns the port on which the server will listen for connections. +
    + +setHost(hostName) + +

    +

    +Sets the hostName. Returns self. +
    + +setPath(path) + +

    +

    +Sets the path (for Unix Domain sockets) on which the server will listen for connections. Returns self. +
    + +setPort(aNumber) + +

    +

    +Sets the port on which the server will listen for connections. Returns self. +
    + +start + +

    +

    +Starts the server. This method will not return until server is stopped, + so you may want to send the start message as an asynchronous message. + Returns self or an Error, if one occurs. +
    + +stop + +

    +

    +Stops the server if it is running. Returns self. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/SignalEvent/index.html b/io-master/docs/reference/Networking/Socket/SignalEvent/index.html new file mode 100755 index 0000000..071a3a2 --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/SignalEvent/index.html @@ -0,0 +1,42 @@ + + + + + SignalEvent + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +SignalEvent +


    +


    + + + + + + + + + + + + + +
    Object for signal events. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/Socket/index.html b/io-master/docs/reference/Networking/Socket/Socket/index.html new file mode 100755 index 0000000..5608633 --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/Socket/index.html @@ -0,0 +1,547 @@ + + + + + Socket + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +Socket +


    +


    + + + + + + + + + + + + + +
    Interface to network communication. +Sockets will auto yield to other coroutines while waiting on a request. +All blocking operations use the timeout settings of the socket. +Reads are appended to the socket's read buffer which can +be accessed using the readBuffer method. + +Example: + +
    	
    +socket := Socket clone setHost("www.yahoo.com") setPort(80) connect
    +if(socket error) then( write(socket error, "\n"); exit)
    +
    +socket write("GET /\n\n")
    +
    +while(socket read, Nop)
    +if(socket error) then(write(socket error, "\n"); exit)
    +
    +write("read ", socket readBuffer length, " bytes\n")
    +
    +
     
     
     
    + +
    +

    + +acceptTimeout + +

    +

    +Returns the length of time in seconds for accept timeouts on the socket. +
    + +address + +

    +

    +Returns the address (IPAddress or UnixPath) object for the socket. +
    + +appendToWriteBuffer(aSequence) + +

    +

    +Appends aSequence to the write buffer if it is non-nil. Returns self. +
    + +asyncAccept(addressObject) + +

    +

    +Immediately returns a socket for a connection if one is available or nil otherwise. Returns an Error object on error. +
    + +asyncBind + +

    +

    +Binds the socket and returns self immediately or an Error object on error. +
    + +asyncConnect(addressObject) + +

    +

    +Connects to the given Address and returns self or an Error object on error. +
    + +asyncListen + +

    +

    +Listens to the socket and returns self immediately or an Error object on error. +
    + +asyncStreamOpen + +

    +

    +Submits an async request to open the socket in stream mode and returns self immediately or an Error object on error. +
    + +asyncStreamRead(aSeq, readSize) + +

    +

    +Reads up to readSize number of bytes into aSeq if data is available. + Returns self immediately if successful. Returns an error object on Error. Returns nil if the socket is disconnected. +
    + +asyncStreamWrite(aSeq, start, writeSize) + +

    +

    +Writes the slice of aSeq from start to start + writeSize to the socket. + Returns self immediately if successful, otherwise closes the socket. + Returns an error object on Error. + Returns nil if the socket is disconnected. +
    + +asyncUdpOpen + +

    +

    +Submits an async request to open the socket in UDP mode and returns self immediately or an Error object on error. +
    + +asyncUdpRead(ipAddress, aSeq, readSize) + +

    +

    +Reads up to readSize number of bytes from ipAddress into aSeq if data is available. + Returns self immediately if successful. Returns an error object on Error. Returns nil if the socket is disconnected. +
    + +asyncUdpWrite(ipAddress, aSeq, startIndex, readSize) + +

    +

    +Writes readsize bytes from aSeq starting at startIndex to ipAddress. + Returns self immediately if successful. Returns an error object on Error. Returns nil if the socket is disconnected. +
    + +bytesPerRead + +

    +

    +Returns number of bytes to read per read call. +
    + +bytesPerWrite + +

    +

    +Returns number of bytes to write per write call. +
    + +close + +

    +

    +Closes the socket and returns self. Returns nil on error. +
    + +connect + +

    +

    +Connects to the socket's host. Returns self on success or an Error object on error. +
    + +connectTimeout + +

    +

    +Returns the length of time in seconds for connect timeouts on the socket. +
    + +descriptorId + +

    +

    +Returns the socket's file descriptor id as a Number. +
    + +errorDescription + +

    +

    +Returns a description of the last error on the socket as a string. +
    + +errorNumber + +

    +

    +Returns the socket error number for the last error. +
    + +fromFd(descriptorId, addressFamily) + +

    +

    +Creates a new Socket with the low-level file descriptor (fd) set to descriptorId and it's address family (AF_INET or AF_UNIX) set to addressFamily. +
    + +getSocketReadLowWaterMark + +

    +

    +Returns the read low water mark for the socket on success or nil on error. +
    + +getSocketWriteLowWaterMark + +

    +

    +Returns the write low water mark for the socket on success or nil on error. +
    + +host + +

    +

    +Returns the host for the socket. +
    + +isOpen + +

    +

    +Returns true if the socket is open, false otherwise. +
    + +isStream + +

    +

    +Returns true if the socket is a stream, false otherwise. +
    + +isValid + +

    +

    +Returns true if the socket is in valid state, closes the socket and returns false otherwise. +
    + +path + +

    +

    +Returns the U for the socket. +
    + +port + +

    +

    +Returns the port number for the socket. +
    + +readBytes(numBytes) + +

    +

    +Reads the socket until its readBuffer is numBytes long, then returns a Sequence + containing the first numBytes of readBuffer's contents and clips that section from the readBuffer. +
    + +readListMessage + +

    +

    +A shortcut for List fromEncodedList(socket readMessage). +
    + +readMessage + +

    +

    +Empties the readBuffer and reads a 4 byte uint32 in network byte order. + This number is the number of bytes in the message payload which are + then read into the socket's readBuffer. The readBuffer is returned. +
    + +readTimeout + +

    +

    +Returns the length of time in seconds for read timeouts on the socket. +
    + +readUntilSeq(aSequence) + +

    +

    +Reads the socket until its readBuffer contains aSequence, then returns a Sequence + containing the readBuffer's contents up to (but not including) aSequence and clips that section from the readBuffer. +
    + +serverOpen + +

    +

    +Opens the socket as a stream, binds it to its address and calls asyncListen to prepare the socket to accept connections. + Returns self on success or an Error object on error. +
    + +serverWaitForConnection + +

    +

    +Waits for a connection or timeout. When a connection is received, this method returns the connection socket. + An Error object is returned on timeour or error. +
    + +setAcceptTimeout(seconds) + +

    +

    +Sets the length of time in seconds for accept timeouts on the socket. Returns self. +
    + +setAddress(addressObject) + +

    +

    +Sets the address (IPAddress or UnixPath) for the socket. Returns self. For IP sockets the setHost() method should generally be used to set the host instead of this method. For Unix Domain sockets use the setPath() method. +
    + +setBytesPerRead(numberOfBytes) + +

    +

    +Sets number of bytes to read per read call. Returns self. +
    + +setBytesPerWrite(numberOfBytes) + +

    +

    +Sets number of bytes to write per write call. Returns self. +
    + +setConnectTimeout(seconds) + +

    +

    +Sets the length of time in seconds for connect timeouts on the socket. Returns self. +
    + +setHost(hostName) + +

    +

    +Translates hostName to an IP using asynchronous DNS and sets +the host attribute. Returns self. +
    + +setHost(hostNameOrIpString) + +

    +

    +Sets the host for the socket. Returns self on success, an Error object otherwise. +
    + +setNoDelay + +

    +

    +Sets the socket to be no-delay. Returns self on success or nil on error. +
    + +setPath(unixDomainPath) + +

    +

    +Sets the Unix Domain socket path for the socket. Returns self. +
    + +setPort(portNumber) + +

    +

    +Sets the port number for the socket, returns self. +
    + +setReadTimeout(seconds) + +

    +

    +Sets the length of time in seconds for read timeouts on the socket. Returns self. +
    + +setSocketReadBufferSize(numberOfBytes) + +

    +

    +Sets the read buffer size for the socket. Returns self on success or nil on error. +
    + +setSocketReadLowWaterMark(numberOfBytes) + +

    +

    +Sets the read low water mark for the socket. Returns self on success or nil on error. +
    + +setSocketWriteBufferSize(numberOfBytes) + +

    +

    +Sets the write buffer size for the socket. Returns self on success or nil on error. +
    + +setSocketWriteLowWaterMark(numberOfBytes) + +

    +

    +Sets the write low water mark for the socket. Returns self on success or nil on error. +
    + +setWriteTimeout(seconds) + +

    +

    +Sets the length of time in seconds for write timeouts on the socket. Returns self. +
    + +streamOpen + +

    +

    +Opens the socket in stream mode. Returns self. +
    + +streamRead(numberOfBytes) + +

    +

    +Reads numberOfBytes from the socket into the socket's readBuffer. + Returns self when all bytes are read or an Error object on error. +
    + +streamReadNextChunk(optionalProgressBlock) + +

    +

    +Waits for incoming data on the socket and when found, reads any available data and returns self. + Returns self on success or an Error object on error or timeout. +
    + +streamReadWhileOpen + +

    +

    +Reads the stream into the socket's readBuffer until it closes. + Returns self on success or an Error object on error. +
    + +streamWrite(buffer, optionalProgressBlock) + +

    +

    +Writes buffer to the socket. + If optionalProgressBlock is supplied, it is periodically called with the number of bytes written as an argument. + Returns self on success or an Error object on error. +
    + +udpOpen + +

    +

    +Opens the socket in UDP (connectionless) mode. Returns self. +
    + +udpRead(address, numBytes) + +

    +

    +Waits for and reads numBytes of udp data from the specified address (IPAddress or UnixPath) into the socket's readBuffer. + Returns self on success or an Error object on error. +
    + +udpReadNextChunk(address) + +

    +

    +Waits to receive UDP data from the specified address (IPAddress or UnixPath). + As soon as any data is available, it reads all of it into the socket's readBuffer. + Returns self on success or an Error object on error. +
    + +udpWrite + +

    +

    +Same as asyncUdpWrite. +
    + +writeFromBuffer(optionalProgressBlock) + +

    +

    +Writes the contents of the socket's writeBuffer to the socket. + If optionalProgressBlock is supplied, it is periodically called with the number of bytes written as an argument. + Returns self on success or an Error object on error. +
    + +writeListMessage(aList) + +

    +

    +A shortcut for writeMessage(aList asEncodedList). +
    + +writeMessage(aSeq) + +

    +

    +Writes a 4 byte uint32 in network byte order containing the size of aSeq. + Then writes the bytes in aSeq and returns self. +
    + +writeTimeout + +

    +

    +Returns the length of time in seconds for write timeouts on the socket. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/TimerEvent/index.html b/io-master/docs/reference/Networking/Socket/TimerEvent/index.html new file mode 100755 index 0000000..1ff9ffa --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/TimerEvent/index.html @@ -0,0 +1,42 @@ + + + + + TimerEvent + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +TimerEvent +


    +


    + + + + + + + + + + + + + +
    Object for timer events. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/URL/index.html b/io-master/docs/reference/Networking/Socket/URL/index.html new file mode 100755 index 0000000..0a97635 --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/URL/index.html @@ -0,0 +1,221 @@ + + + + + URL + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +URL +


    +


    + + + + + + + + + +
     
     
     
    + +
    +

    + + +clear + +

    +

    +Private method to clear the URL's parsed attributes. + +
    + +escapeString(aString) + +

    +

    +Returns a new String that is aString with the appropriate characters replaced by their URL escape codes. +
    + +fetch + +

    +

    +Fetches the url and returns the result as a Sequence. Returns an Error, if one occurs. +
    + + +fetchHttp(optionalProgressBlock) + +

    +

    +Private method that fetches an http url. + +
    + +fetchRaw + +

    +

    +Fetch and return the entire response. Note: This may have problems for some request times. +
    + +fetchToFile(aFile) + +

    +

    +Fetch the url and save the result to the specified File object. + Saving is done as the data is read, which helps minimize memory usage. + Returns self on success or nil on error. +
    + +fetchWithProgress(progressBlock) + +

    +

    +Same as fetch, but with each read, progressBlock is called with the readBuffer + and the content size as parameters. +
    + + +headerBreaks + +

    +

    +Private method to connect to the host and write the header. + +
    + +openOnDesktop + +

    +

    +Opens the URL in the local default browser. Supports OSX, Windows and (perhaps) other Unixes. +
    + + +parse + +

    +

    +Private method to parse the url. + +
    + +post(parameters, headers) + +

    +

    +Sends an HTTP post message. If parameters is a Map, its key/value pairs are + send as the post parameters. If parameters is a Sequence or String, it is sent directly. + Any headers in the headers map are sent with the request. + Returns a sequence containing the response on success or an Error, if one occurs. +
    + + +processHttpResponse(optionalProgressBlock) + +

    +

    +Private method that processes http response. + +
    + +referer + +

    +

    +Returns the referer String or nil if not set. +
    + +requestHeader + +

    +

    +Returns a Sequence containing the request header that will be sent. +
    + +setReferer(aString) + +

    +

    +Sets the referer. Returns self. +
    + + +setRequest(requestString) + +

    +

    +Private method to set the url request. + +
    + + +setResponseHeaderString(headerString) + +

    +

    +Private method that parses the responseHeaders. + +
    + +setURL(urlString) + +

    +

    +Sets the url string and parses into the protocol, host, port path, and query slots. Returns self. +
    + +stopFetch + +

    +

    +Stops the fetch, if there is one. Returns self. +
    + + +test + +

    +

    +Private test method. + +
    + +unescapeString(aString) + +

    +

    +Returns a new String that is aString with the URL escape codes replaced by the appropriate characters. +
    + +url + +

    +

    +Returns url string. +
    + +with(urlString) + +

    +

    +Returns a new URL instance for the url in the urlString. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/WriteEvent/index.html b/io-master/docs/reference/Networking/Socket/WriteEvent/index.html new file mode 100755 index 0000000..3cee60f --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/WriteEvent/index.html @@ -0,0 +1,42 @@ + + + + + WriteEvent + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Socket +  /   +WriteEvent +


    +


    + + + + + + + + + + + + + +
    Object for write events. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Socket/index.html b/io-master/docs/reference/Networking/Socket/index.html new file mode 100755 index 0000000..4737b01 --- /dev/null +++ b/io-master/docs/reference/Networking/Socket/index.html @@ -0,0 +1,73 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Networking/Twitter/TwitterAccount/index.html b/io-master/docs/reference/Networking/Twitter/TwitterAccount/index.html new file mode 100755 index 0000000..c20655e --- /dev/null +++ b/io-master/docs/reference/Networking/Twitter/TwitterAccount/index.html @@ -0,0 +1,492 @@ + + + + + TwitterAccount + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Twitter +  /   +TwitterAccount +


    +


    + + + + + + + + + + + + + +
    Object representing a twitter account. +
     
     
     
    + +
    +

    + +accessTokenSecret + +

    +

    +Returns the OAuth token secret. +
    + +account + +

    +

    +Returns account associated with this profile. +
    + +backgroundColor + +

    +

    +Returns the backgroundColor set in the twitter profile. +
    + +backgroundImageFile + +

    +

    +Returns the backgroundImageFile set in the twitter profile. +
    + +consumerKey + +

    +

    +Returns the OAuth consumerKey. +
    + +consumerSecret + +

    +

    +Returns the OAuth consumerSecret. +
    + +deleteStatus(tweetId) + +

    +

    +Deletes the specified tweet and returns the results of the request. +
    + +description + +

    +

    +Returns the description set in the twitter profile. +
    + +follow(aScreenName) + +

    +

    +Follow the user with the specified screen name. Returns results of the request. +
    + +followId(userId) + +

    +

    +Follow the user with the specified id. Returns results of the request. +
    + +followersCursor + +

    +

    +Returns a new TwitterFollowersCursor instance for this account. +
    + +friendsCursor + +

    +

    +Returns a new TwitterFriendsCursor instance for this account. +
    + +hasFollower(aScreenName) + +

    +

    +Returns true if the account has the specified follower, false otherwise. +
    + +hasFriend(aScreenName) + +

    +

    +Returns true if the account has the specified friend, false otherwise. +
    + +hasProtectedUpdates + +

    +

    +Returns true if the account has protected updates, false otherwise. +
    + +homeTimeline + +

    +

    +Returns the home timeline tweets for this account +
    + +imageFile + +

    +

    +Returns the imageFile set in the twitter profile. +
    + +isLimited + +

    +

    +Returns true if the account's rate limit is exceeded, false otherwise. +
    + +isSuspended(aScreenName) + +

    +

    +Returns true if the specified screenName is a suspended account, false otherwise. +
    + +linkColor + +

    +

    +Returns the linkColor set in the twitter profile. +
    + +location + +

    +

    +Returns the geographical location set in the twitter profile. +
    + +mentions + +

    +

    +Returns mentions for this account. +
    + +name + +

    +

    +Returns the name associated with the profile. +
    + +password + +

    +

    +Returns the account password. +
    + +profile + +

    +

    +Returns the account Profile object. +
    + +publicTimeline + +

    +

    +Returns the public timeline tweets for this account +
    + +rateLimitExpiration + +

    +

    +Returns the account rateLimitExpiration. +
    + +rateLimitRemaining + +

    +

    +Returns the account rateLimitRemaining. +
    + +request + +

    +

    +Returns a new TwitterRequest object for this account. +
    + +requestOAuthAccess + +

    +

    +Sets the token and tokenSecret using CURL + Oauth oob. + consumerKey, consumerSecret, username and password must be set. Returns self +
    + +resultsFor(aRequest) + +

    +

    +Returns results for the request. +
    + +retweet(tweetId) + +

    +

    +Retweets the tweet with tweetId +
    + +screenName + +

    +

    +Returns the account screenName. +
    + +setAccessTokenSecret(aTokenSecret) + +

    +

    +Sets the OAuth token secret. Returns self. +
    + +setAccount(anAccount) + +

    +

    +Sets the account associated with this profile. Returns self. +
    + +setConsumerKey(aKey) + +

    +

    +Sets the OAuth consumerKey. Returns self. +
    + +setConsumerSecret(aKey) + +

    +

    +Sets the OAuth consumerSecret. Returns self. +
    + +setName(aSeq) + +

    +

    +Sets the name associated with the profile. Returns self. +
    + +setPassword(aSeq) + +

    +

    +Sets the account password. Returns self. +
    + +setProfile(aProfile) + +

    +

    +Sets the account profile. Returns self. +
    + +setRateLimitExpiration(aNumber) + +

    +

    +Sets the account rateLimitExpiration. Returns self. +
    + +setRateLimitRemaining(aNumber) + +

    +

    +Sets the account rateLimitRemaining. Returns self. +
    + +setScreenName(aSeq) + +

    +

    +Sets the account screenName. Returns self. +
    + +setToken(aToken) + +

    +

    +Sets the OAuth token. Returns self. +
    + +show + +

    +

    +Returns a Map containing attributes related to the Twitter user associated with this account +
    + +showUser(aScreenName) + +

    +

    +Returns a Map containing attributes related to the Twitter user associated with aScreenName +
    + +showUserWithId(anId) + +

    +

    +Returns a Map containing attributes related to the Twitter user associated with anId +
    + +sidebarBorderColor + +

    +

    +Returns the sidebarBorderColor set in the twitter profile. +
    + +sidebarFillColor + +

    +

    +Returns the sidebarFillColor set in the twitter profile. +
    + +textColor + +

    +

    +Returns the textColor set in the twitter profile. +
    + +tilesBackgroundImage + +

    +

    +Returns the tilesBackgroundImage set in the twitter profile. +
    + +token + +

    +

    +Returns the OAuth token. +
    + +twitterIdForScreenName(aScreenName) + +

    +

    +Returns twitter id for the specified screenName. +
    + +unfollow(aScreenName) + +

    +

    +Unfollow the user with the specified screen name. Returns self. +
    + +unfollowId(userId) + +

    +

    +Unfollow the user with the specified screen id. Returns self. +
    + +update + +

    +

    +Fetch the latest basic profile settings from twitter. +
    + +updateBackgroundImage + +

    +

    +Fetch the latest background image settings from twitter. +
    + +updateColors + +

    +

    +Fetch the latest profile color settings from twitter. +
    + +updateImage + +

    +

    +Fetch the latest image settings from twitter. +
    + +updateRateLimits + +

    +

    +Updates the rate limits. Returns self. +
    + +updateStatus(messageText, tweetId) + +

    +

    +Updates the status message and returns the results of the request. +
    + +url + +

    +

    +Returns the url to the twitter profile. +
    + +userExists(aScreenName) + +

    +

    +Returns true if the specified user exists, false otherwise. +
    + +userTimeline + +

    +

    +Returns the user timeline tweets for this account +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Twitter/TwitterAccountProfile/index.html b/io-master/docs/reference/Networking/Twitter/TwitterAccountProfile/index.html new file mode 100755 index 0000000..8700fb4 --- /dev/null +++ b/io-master/docs/reference/Networking/Twitter/TwitterAccountProfile/index.html @@ -0,0 +1,42 @@ + + + + + TwitterAccountProfile + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Twitter +  /   +TwitterAccountProfile +


    +


    + + + + + + + + + + + + + +
    Object representing a twitter account profile. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Twitter/TwitterException/index.html b/io-master/docs/reference/Networking/Twitter/TwitterException/index.html new file mode 100755 index 0000000..640e37c --- /dev/null +++ b/io-master/docs/reference/Networking/Twitter/TwitterException/index.html @@ -0,0 +1,164 @@ + + + + + TwitterException + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Twitter +  /   +TwitterException +


    +


    + + + + + + + + + +
     
     
     
    + +
    +

    + +isAlreadyFollowing + +

    +

    +Returns isAlreadyFollowing attribute. +
    + +isBadRequest + +

    +

    +Returns isBadRequest attribute. +
    + +isBlocked + +

    +

    +Returns isBlocked attribute. +
    + +isBlockedOrSuspendedOrProtected + +

    +

    +Returns isBlockedOrSuspendedOrProtected attribute. +
    + +isDown + +

    +

    +Returns isDown attribute. +
    + +isFollowLimit + +

    +

    +Returns isFollowLimit attribute. +
    + +isFollowedSelf + +

    +

    +Returns isFollowedSelf attribute. +
    + +isForbidden + +

    +

    +Returns isForbidden attribute. +
    + +isInternalError + +

    +

    +Returns isInternalError attribute. +
    + +isNotAuthorized + +

    +

    +Returns isNotAuthorized attribute. +
    + +isNotFound + +

    +

    +Returns isNotFound attribute. +
    + +isOverloaded + +

    +

    +Returns isOverloaded attribute. +
    + +isRateLimited + +

    +

    +Returns isRateLimited attribute. +
    + +isStatusDuplicate + +

    +

    +Returns isStatusDuplicate attribute. +
    + +isSuspended + +

    +

    +Returns isSuspended attribute. +
    + +isUnknown + +

    +

    +Returns isUnknown attribute. +
    + +userIsMissing + +

    +

    +Returns userIsMissing attribute. +
    + +wasntFriend + +

    +

    +Returns wasntFriend attribute. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Twitter/TwitterFollowersCursor/index.html b/io-master/docs/reference/Networking/Twitter/TwitterFollowersCursor/index.html new file mode 100755 index 0000000..5e841c1 --- /dev/null +++ b/io-master/docs/reference/Networking/Twitter/TwitterFollowersCursor/index.html @@ -0,0 +1,42 @@ + + + + + TwitterFollowersCursor + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Twitter +  /   +TwitterFollowersCursor +


    +


    + + + + + + + + + + + + + +
    Inherits from TwitterFriendsFollowersCursor. requestType is "asFollowerIds". +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Twitter/TwitterFriendsCursor/index.html b/io-master/docs/reference/Networking/Twitter/TwitterFriendsCursor/index.html new file mode 100755 index 0000000..3bdd2e4 --- /dev/null +++ b/io-master/docs/reference/Networking/Twitter/TwitterFriendsCursor/index.html @@ -0,0 +1,42 @@ + + + + + TwitterFriendsCursor + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Twitter +  /   +TwitterFriendsCursor +


    +


    + + + + + + + + + + + + + +
    Inherits from TwitterFriendsFollowersCursor. requestType is "asFriendIds". +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Twitter/TwitterRequest/index.html b/io-master/docs/reference/Networking/Twitter/TwitterRequest/index.html new file mode 100755 index 0000000..b71afc5 --- /dev/null +++ b/io-master/docs/reference/Networking/Twitter/TwitterRequest/index.html @@ -0,0 +1,92 @@ + + + + + TwitterRequest + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Twitter +  /   +TwitterRequest +


    +


    + + + + + + + + + + + + + +
    Represents a Twitter API request and contains its results. +
     
     
     
    + +
    +

    + +account + +

    +

    +Returns the account to pull the Oauth tokens from +
    + +delegate + +

    +

    +Delegate for request callbacks. +
    + +execute + +

    +

    +Sends the request. Returns the response object. +
    + +host + +

    +

    +"api.twitter.com" +
    + +httpMethod + +

    +

    +"get" +
    + +path + +

    +

    +Request path. +
    + +response + +

    +

    +This slot holds a TwitterResponse object for this request. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Twitter/TwitterResponse/index.html b/io-master/docs/reference/Networking/Twitter/TwitterResponse/index.html new file mode 100755 index 0000000..4b52a5e --- /dev/null +++ b/io-master/docs/reference/Networking/Twitter/TwitterResponse/index.html @@ -0,0 +1,66 @@ + + + + + TwitterResponse + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Twitter +  /   +TwitterResponse +


    +


    + + + + + + + + + +
     
     
     
    + +
    +

    + +body + +

    +

    +Returns request to which this is the response. +
    + +rateLimitExpiration + +

    +

    +Returns the rate limit expiration. +
    + +rateLimitRemaining + +

    +

    +Returns the rate limit remaining. +
    + +results + +

    +

    +Returns response results. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Twitter/TwitterSearch/index.html b/io-master/docs/reference/Networking/Twitter/TwitterSearch/index.html new file mode 100755 index 0000000..ff7d6de --- /dev/null +++ b/io-master/docs/reference/Networking/Twitter/TwitterSearch/index.html @@ -0,0 +1,87 @@ + + + + + TwitterSearch + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Twitter +  /   +TwitterSearch +


    +


    + + + + + + + + + +
     
     
     
    + +
    +

    + +cursor + +

    +

    +Returns the TwitterSearchCursor for the first page. +
    + +perPage + +

    +

    +Returns the results per page. +
    + +query + +

    +

    +Returns the search query. +
    + +results + +

    +

    +Returns the results for the current page. +
    + +setPerPage(aSeq) + +

    +

    +Sets the results per page. Returns self. +
    + +setQuery(aSeq) + +

    +

    +Sets the query. Returns self. +
    + +sinceUpdateId + +

    +

    +Returns the current page number of search results. +
    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Twitter/TwitterSearchCursor/index.html b/io-master/docs/reference/Networking/Twitter/TwitterSearchCursor/index.html new file mode 100755 index 0000000..474c85c --- /dev/null +++ b/io-master/docs/reference/Networking/Twitter/TwitterSearchCursor/index.html @@ -0,0 +1,37 @@ + + + + + TwitterSearchCursor + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Twitter +  /   +TwitterSearchCursor +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Twitter/index.html b/io-master/docs/reference/Networking/Twitter/index.html new file mode 100755 index 0000000..9ebe792 --- /dev/null +++ b/io-master/docs/reference/Networking/Twitter/index.html @@ -0,0 +1,66 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Networking/Volcano/VolcanoServer/index.html b/io-master/docs/reference/Networking/Volcano/VolcanoServer/index.html new file mode 100755 index 0000000..6152d26 --- /dev/null +++ b/io-master/docs/reference/Networking/Volcano/VolcanoServer/index.html @@ -0,0 +1,42 @@ + + + + + VolcanoServer + + + + + +
    +

    Io Reference

    +


    +


    +Networking +  /   +Volcano +  /   +VolcanoServer +


    +


    + + + + + + + + + + + + + +
    A simplified version of HttpServer +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Networking/Volcano/index.html b/io-master/docs/reference/Networking/Volcano/index.html new file mode 100755 index 0000000..6189875 --- /dev/null +++ b/io-master/docs/reference/Networking/Volcano/index.html @@ -0,0 +1,58 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Networking/index.html b/io-master/docs/reference/Networking/index.html new file mode 100755 index 0000000..1c65b8c --- /dev/null +++ b/io-master/docs/reference/Networking/index.html @@ -0,0 +1,54 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Parsers/Fnmatch/Fnmatch/index.html b/io-master/docs/reference/Parsers/Fnmatch/Fnmatch/index.html new file mode 100755 index 0000000..3c5e694 --- /dev/null +++ b/io-master/docs/reference/Parsers/Fnmatch/Fnmatch/index.html @@ -0,0 +1,170 @@ + + + + + Fnmatch + + + + + +
    +

    Io Reference

    +


    +


    +Parsers +  /   +Fnmatch +  /   +Fnmatch +


    +


    + + + + + + + + + + + + + +
    The fnmatch add on adds support for the unix fnmatch function. +(See fnmatch man page for details). +Note: not all options are supported on all platforms. +
     
     
     
    + +
    +

    + +caseFoldOff + +

    +

    +See caseFoldOn. +
    + +caseFoldOn + +

    +

    +Ignore case distinctions in both the pattern and the string. +
    + +hasMatch + +

    +

    +Returns true if a match is found, false otherwise. +
    + +leadingDirOff + +

    +

    +See leadingDirOn. +
    + +leadingDirOn + +

    +

    +Ignore rest after successful pattern matching. +
    + +matchFor(aString) + +

    +

    +Returns self if aString matches the pattern, otherwise returns nil. +
    + +noEscapeOff + +

    +

    +See noEscapeOn. +
    + +noEscapeOn + +

    +

    +If not set, a backslash character (\) in pattern followed by any other + character will match that second character in string. + In particular, "\\" will match a backslash in string. + If set, a backslash character will be treated as an ordinary character. +
    + +pathNameOff + +

    +

    +See pathNameOn. +
    + +pathNameOn + +

    +

    +If set, a slash (/) character in string will be explicitly matched + by a slash in pattern; it will not be matched by either the asterisk (*) + or question-mark (?) special characters, nor by a bracket ([]) expression. + If not set, the slash character is treated as an ordinary character. +
    + +pattern + +

    +

    +Returns the pattern string. +
    + +periodOff + +

    +

    +"See periodOn. +
    + +periodOn + +

    +

    +If set, a leading period in string will match a period in pattern; where the location of ``leading'' is indicated by the value of FNM_PATHNAME: +
      +
    • If FNM_PATHNAME is set, a period is ``leading'' if it is the first character in string or if it immediately follows a slash. + +
    • If FNM_PATHNAME is not set, a period is ``leading'' only if it is the first character of string. +
    +

    +If not set, no special restrictions are placed on matching a period. +

    + +setPattern(aString) + +

    +

    +Sets the pattern string. Returns self. +
    + +setString(aString) + +

    +

    +Sets the string to do matching on. +
    + +string + +

    +

    +The string to do matching on. +
    +
    +




    + + diff --git a/io-master/docs/reference/Parsers/Fnmatch/index.html b/io-master/docs/reference/Parsers/Fnmatch/index.html new file mode 100755 index 0000000..cc70e25 --- /dev/null +++ b/io-master/docs/reference/Parsers/Fnmatch/index.html @@ -0,0 +1,52 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Parsers/Libxml2/XmlReader/index.html b/io-master/docs/reference/Parsers/Libxml2/XmlReader/index.html new file mode 100755 index 0000000..ff6ceab --- /dev/null +++ b/io-master/docs/reference/Parsers/Libxml2/XmlReader/index.html @@ -0,0 +1,37 @@ + + + + + XmlReader + + + + + +
    +

    Io Reference

    +


    +


    +Parsers +  /   +Libxml2 +  /   +XmlReader +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Parsers/Libxml2/XmlWriter/index.html b/io-master/docs/reference/Parsers/Libxml2/XmlWriter/index.html new file mode 100755 index 0000000..69e4932 --- /dev/null +++ b/io-master/docs/reference/Parsers/Libxml2/XmlWriter/index.html @@ -0,0 +1,37 @@ + + + + + XmlWriter + + + + + +
    +

    Io Reference

    +


    +


    +Parsers +  /   +Libxml2 +  /   +XmlWriter +


    +


    + + + + + + + + + +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Parsers/Libxml2/index.html b/io-master/docs/reference/Parsers/Libxml2/index.html new file mode 100755 index 0000000..609d732 --- /dev/null +++ b/io-master/docs/reference/Parsers/Libxml2/index.html @@ -0,0 +1,53 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Parsers/Regex/Regex/index.html b/io-master/docs/reference/Parsers/Regex/Regex/index.html new file mode 100755 index 0000000..e9ab78b --- /dev/null +++ b/io-master/docs/reference/Parsers/Regex/Regex/index.html @@ -0,0 +1,267 @@ + + + + + Regex + + + + + +
    +

    Io Reference

    +


    +


    +Parsers +  /   +Regex +  /   +Regex +


    +


    + + + + + + + + + + + + + +

    The Regex addon adds support for Perl regular expressions +using the PCRE library by Philip Hazel.

    + +

    Example 1

    +
    	
    +Io> re := "is.*a" asRegex
    +Io> "This is a test. This is also a test." \
    +    matchesOfRegex(" is[^.]*a") replaceAllWith(" is not a")
    +==> "This is not a test. This is not a test.
    +
    + +

    Example 2

    +
    	
    +Io> "11aabb" matchesOfRegex("aa*")
    +==> list("a", "a")
    +
    +Io> re := "(wom)(bat)" asRegex
    +Io> "wombats are cuddly" matchesOfRegex(re) replaceAllWith("$2$1!")
    +==> batwom!s are cuddly
    +
    +
     
     
     
    + +
    +

    + +asRegex + +

    +

    +Returns self. +
    + +asString + +

    +

    +Returns a string containing a textual representation of the receiver. +
    + +captureCount + +

    +

    +Returns the number of captures defined by the pattern. +
    + +caseless + +

    +

    +Returns a case insensitive clone of the receiver, or self if the receiver itself is + case insensitive: + +
    	
    +	Io> "WORD" matchesRegex("[a-z]+")
    +	==> false
    +
    +	Io> "WORD" matchesRegex("[a-z]+" asRegex caseless)
    +	==> true
    +	
    +
    + +dotAll + +

    +

    +

    Returns a clone of the receiver with the dotall option turned on, + or self if the receiver itself has the option turned on.

    + +

    In dotall mode, "." matches any character, including newline. By default + it matches any character except newline.

    + +
    	
    +	Io> "A\nB" matchesOfRegex(".+") next string
    +	==> A
    +
    +	Io> "A\nB" matchesOfRegex(".+" asRegex dotAll) next string
    +	==> A\nB
    +	
    +
    + +extended + +

    +

    +

    Returns a clone of the receiver with the extended option turned on, + or self if the receiver itself has the option turned on.

    + +

    In extended mode, a Regex ignores any whitespace character in the pattern except + when escaped or inside a character class. This allows you to write clearer patterns + that may be broken up into several lines.

    + +

    Additionally, you can put comments in the pattern. A comment starts with a "#" + character and continues to the end of the line, unless the "#" is escaped or is + inside a character class.

    +
    + +isCaseless + +

    +

    +Returns true if the receiver is case insensitive, false if not. +
    + +isDotAll + +

    +

    +Returns true if the receiver is in dotall mode, false if not. +
    + +isExtended + +

    +

    +Returns true if the receiver is in extended mode, false if not. +
    + +isMultiline + +

    +

    +Returns true if the receiver is in multiline mode, false if not. +
    + +matchesIn(aString) + +

    +

    +Returns a RegexMatches object that enumerates the matches of the receiver + in the given string. +
    + +multiline + +

    +

    +

    Returns a clone of the receiver with the multiline option turned on, + or self if the receiver itself has the option turned on.

    + +

    In multiline mode, "^" matches at the beginning of the string and at + the beginning of each line; and "$" matches at the end of the string, + and at the end of each line. + By default "^" only matches at the beginning of the string, and "$" + only matches at the end of the string.

    + +
    	
    +	Io> "A\nB\nC" allMatchesForRegex("^.")
    +	==> list("A")
    +
    +	Io> "A\nB\nC" allMatchesForRegex("^." asRegex multiline)
    +	==> list("A", "B", "C")
    +	
    +
    + +nameTable + +

    +

    +Returns a list with the name of each capture. + The first element will always be nil, because it corresponds to the whole match. + The second element will contain the name of the first capture, or nil if the first + capture has no name. + And so on. +
    + +namedCaptures + +

    +

    +Returns a Map that contains the index of each named group. +
    + +names + +

    +

    +Returns a list of the name of each named capture. + If there are no named captures, the list will be empty. +
    + +notCaseless + +

    +

    +The reverse of caseless. +
    + +notDotAll + +

    +

    +The reverse of dotAll. +
    + +notExtended + +

    +

    +The reverse of extended. +
    + +notMultiline + +

    +

    +The reverse of multiline. +
    + +pattern + +

    +

    +Returns the pattern string that the receiver was created from. +
    + +version + +

    +

    +Returns a string with PCRE version information. +
    + +with(pattern) + +

    +

    +Returns a new Regex created from the given pattern string. +
    +
    +




    + + diff --git a/io-master/docs/reference/Parsers/Regex/RegexMatch/index.html b/io-master/docs/reference/Parsers/Regex/RegexMatch/index.html new file mode 100755 index 0000000..f24c7a6 --- /dev/null +++ b/io-master/docs/reference/Parsers/Regex/RegexMatch/index.html @@ -0,0 +1,265 @@ + + + + + RegexMatch + + + + + +
    +

    Io Reference

    +


    +


    +Parsers +  /   +Regex +  /   +RegexMatch +


    +


    + + + + + + + + + + + + + +
    Contains the result of a regular expression match operation. +It acts as a read-only list of captured strings. +The first item is the entire matched string. +Each item after that is a captured sub pattern (anything inbetween +parenthesis in the pattern). + +
    +Io> match := "37signals" findRegex("([0-9]+)([a-z]+)(!!)?")
    +==> RegexMatch: "37signals" 
    +
    +# Item 0 is the entire matched string:
    +Io> match at(0)
    +==> 37signals
    +
    +# Item 1 is the first capture ("[0-9]+"):
    +Io> match at(1)
    +==> 37
    +
    +# Item 2 is the second capture ("[a-z]+"):
    +Io> match at(2)
    +==> signals
    +
    +# The third sub pattern wasn't part of the match, so item 3 is nil:
    +Io> match at(3)
    +==> nil
    +
    +# You can access captures by name, if you name them:
    +Io> match := "37signals" findRegex("(?[0-9]+)(?[a-z]+)(!!)?")
    +==> RegexMatch: "37signals"
    +Io> match at("number")
    +==> 37
    +Io> match at("word")
    +==> signals
    +
    +
     
     
     
    + +
    +

    + +asString + +

    +

    +Returns a string containing a textual representation of the receiver. +
    + +at(indexOrName) + +

    +

    +Returns the capture with the given index or name. at(0) is the entire match. +
    + +captures + +

    +

    +Returns a list of captured strings. The first element is the whole match. +
    + +end + +

    +

    +Returns the index into the subject at which the match ends. +
    + +endOf(indexOrName) + +

    +

    +Returns the index into the subject at which the capture with the given index or name ends. +
    + +expandTo(templateString) + +

    +

    +Returns templateString with capture placeholders replaced with what they represent. + $0 is replaced with the whole match, $1 is replaced with the first + sub capture, etc. ${name} is replaced with the capture of that name. +
    + +foreach([index], capture, message) + +

    +

    +Loops through the captures, assigns each capture to capture, and evaluates message. + Returns a list with the result of each evaluation. +
    + +indexOf(name) + +

    +

    +Returns the index of the capture with the given name. +
    + +map([index], capture, message) + +

    +

    +Like foreach, but the result of each evaluation of message is returned in a list. +
    + +nameOf(index) + +

    +

    +Returns the name of the capture with the given index. +
    + +names + +

    +

    +Returns a list of the name of each named capture. + If there are no named captures, the list will be empty. +
    + +postfix + +

    +

    +Returns a slice of the subject string that contains all text after this match. + Equivalent to: +
    +	match subject slice(match end)
    +	
    +
    + +prefix + +

    +

    +Returns a slice of the subject string that contains all text before this match. + Equivalent to: +
    +	match subject slice(0, match start)
    +	
    +
    + +range + +

    +

    +Returns the range of the match in the subject. +
    + +rangeOf(indexOrName) + +

    +

    +Returns the range of the capture with the given index or name. +
    + +ranges + +

    +

    +Returns a list containing the range of each capture. +
    + +regex + +

    +

    +Returns the Regex that was used to find this match. +
    + +select([index], capture, message) + +

    +

    +Like foreach, but the values for which the result of evaluating message are non-nil are returned + in a list. +
    + +size + +

    +

    +Returns the number of captures. +
    + +sizeInChars + +

    +

    +Returns the length of the match, in characters. +
    + +slice(startIndex, [endIndex]) + +

    +

    +Returns a new list containing the subset of the receiver from the startIndex to the endIndex. + The endIndex argument is optional. If not given, it is assumed to be the end of the capture list. +
    + +start + +

    +

    +Returns the index into the subject at which the match starts. +
    + +startOf(indexOrName) + +

    +

    +Returns the index into the subject at which the capture with the given index or name starts. +
    + +string + +

    +

    +Returns the matched string. +
    + +subject + +

    +

    +Returns the string that this match was found in. +
    +
    +




    + + diff --git a/io-master/docs/reference/Parsers/Regex/RegexMatches/index.html b/io-master/docs/reference/Parsers/Regex/RegexMatches/index.html new file mode 100755 index 0000000..8c97639 --- /dev/null +++ b/io-master/docs/reference/Parsers/Regex/RegexMatches/index.html @@ -0,0 +1,210 @@ + + + + + RegexMatches + + + + + +
    +

    Io Reference

    +


    +


    +Parsers +  /   +Regex +  /   +RegexMatches +


    +


    + + + + + + + + + + + + + +
    A regular expression match iterator. +
     
     
     
    + +
    +

    + +all + +

    +

    +Returns a list containing all matches in the string. +
    + +allowEmptyMatches + +

    +

    +Tells the receiver to allow zero length matches. Empty matches are allowed by default. + Returns self. +
    + +allowsEmptyMatches + +

    +

    +Returns true if the receiver allows empty matches, false if not. +
    + +anchored + +

    +

    +Like next, but will only match at the current search position. +
    + +disallowEmptyMatches + +

    +

    +Tells the receiver not to allow zero length matches. Returns self. +
    + +endPosition + +

    +

    +Returns the index in the string where the receiver stops searching. +
    + +foreach(value, message) + +

    +

    +Loops through the matches, assigns each match to value, and evaluates message. + Returns the result of the last evaluation. +
    + +foreachInterval(value, matchMessage, nonMatchMessage) + +

    +

    +Like foreach, but takes an extra message that will be evaluated for the non-matching + text before each match, and the non-matching text after the last match. +
    + +last + +

    +

    +Returns the last match in the string. +
    + +map(value, message) + +

    +

    +Like foreach, but the result of each evaluation of message is returned + in a list. +
    + +next + +

    +

    +Returns the next match, or nil if there is none. +
    + +position + +

    +

    +Returns the search position as an index in the string. +
    + +regex + +

    +

    +Returns the Regex that the receiver uses for finding matching. +
    + +replace(name, message) + +

    +

    +Replaces each match in the string with the result of message and returns + the resulting string. +
    + +replaceAllWith(templateString) + +

    +

    +Same as: +
    +	replace(match, match expandTo(templateString))
    +	
    +
    + +setEndPosition(anIndex) + +

    +

    +Sets the index in the string where the receiver should stop searching. It will be as + if the string ends at that index. If index is nil, the end position will be set + to the end of string. + Returns self. + +
    +	Io> "funkadelic" matchesOfRegex("\\w+") setEndPosition(4) next string
    +	==> funk
    +
    +	Io> "funkadelic" matchesOfRegex("\\w+") setEndPosition(nil) next string
    +	==> funkadelic
    +	
    +
    + +setPosition(aRegexOrString) + +

    +

    +Sets the search position to the given index in the string. Returns self. +
    + +setRegex(aRegexOrString) + +

    +

    +Sets the regex to find matches in. Returns self. +
    + +setString(aString) + +

    +

    +Sets the string to find matches in. Returns self. +
    + +splitString + +

    +

    +Splits the string being matched against into pieces using the regex as the delimiter + and returns the piece as a list of strings. +
    + +string + +

    +

    +Returns the string that the receiver finds matches in. +
    +
    +




    + + diff --git a/io-master/docs/reference/Parsers/Regex/index.html b/io-master/docs/reference/Parsers/Regex/index.html new file mode 100755 index 0000000..b7d54f8 --- /dev/null +++ b/io-master/docs/reference/Parsers/Regex/index.html @@ -0,0 +1,54 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Parsers/SGML/SGMLElement/index.html b/io-master/docs/reference/Parsers/SGML/SGMLElement/index.html new file mode 100755 index 0000000..9dfd4bd --- /dev/null +++ b/io-master/docs/reference/Parsers/SGML/SGMLElement/index.html @@ -0,0 +1,73 @@ + + + + + SGMLElement + + + + + +
    +

    Io Reference

    +


    +


    +Parsers +  /   +SGML +  /   +SGMLElement +


    +


    + + + + + + + + + +
     
     
     
    + +
    +

    + +asString + +

    +

    +Returns a String representation of the tag and all of its subitems. +
    + +attributes + +

    +

    +Returns a Map containing the tag's attributes. +
    + +name + +

    +

    +Returns the tag name +
    + +setName(aString) + +

    +

    +Sets the tag name. Returns self. +
    + +subitems + +

    +

    +Returns a List containing the tag's subitems. +
    +
    +




    + + diff --git a/io-master/docs/reference/Parsers/SGML/SGMLParser/index.html b/io-master/docs/reference/Parsers/SGML/SGMLParser/index.html new file mode 100755 index 0000000..9115278 --- /dev/null +++ b/io-master/docs/reference/Parsers/SGML/SGMLParser/index.html @@ -0,0 +1,64 @@ + + + + + SGMLParser + + + + + +
    +

    Io Reference

    +


    +


    +Parsers +  /   +SGML +  /   +SGMLParser +


    +


    + + + + + + + + + + + + + +
    This object can be used to parse SGML / HTML / XML. +
     
     
     
    + +
    +

    + +parse(aSequence) + +

    +

    +Parses aSequence and calls the following methods on self; +
    	
    +startElement(name)
    +endElement(name)
    +newAttribute(key, value)
    +newText(text)
    +
    +for each of the items it finds. Returns self. +
    + +tagForString(aSequence) + +

    +

    +Parses aSequence and returns an SGMLTag object. +
    +
    +




    + + diff --git a/io-master/docs/reference/Parsers/SGML/index.html b/io-master/docs/reference/Parsers/SGML/index.html new file mode 100755 index 0000000..85cce90 --- /dev/null +++ b/io-master/docs/reference/Parsers/SGML/index.html @@ -0,0 +1,53 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Parsers/Yajl/YajlGenParser/index.html b/io-master/docs/reference/Parsers/Yajl/YajlGenParser/index.html new file mode 100755 index 0000000..c5f5e43 --- /dev/null +++ b/io-master/docs/reference/Parsers/Yajl/YajlGenParser/index.html @@ -0,0 +1,42 @@ + + + + + YajlGenParser + + + + + +
    +

    Io Reference

    +


    +


    +Parsers +  /   +Yajl +  /   +YajlGenParser +


    +


    + + + + + + + + + + + + + +
    This object can be used to parse YajlGen / HTML / XML. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Parsers/Yajl/YajlParser/index.html b/io-master/docs/reference/Parsers/Yajl/YajlParser/index.html new file mode 100755 index 0000000..1536695 --- /dev/null +++ b/io-master/docs/reference/Parsers/Yajl/YajlParser/index.html @@ -0,0 +1,42 @@ + + + + + YajlParser + + + + + +
    +

    Io Reference

    +


    +


    +Parsers +  /   +Yajl +  /   +YajlParser +


    +


    + + + + + + + + + + + + + +
    This object can be used to parse Yajl / HTML / XML. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Parsers/Yajl/index.html b/io-master/docs/reference/Parsers/Yajl/index.html new file mode 100755 index 0000000..1ab2b99 --- /dev/null +++ b/io-master/docs/reference/Parsers/Yajl/index.html @@ -0,0 +1,53 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Parsers/index.html b/io-master/docs/reference/Parsers/index.html new file mode 100755 index 0000000..12358e0 --- /dev/null +++ b/io-master/docs/reference/Parsers/index.html @@ -0,0 +1,48 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Physics/ODE/ODEBall/index.html b/io-master/docs/reference/Physics/ODE/ODEBall/index.html new file mode 100755 index 0000000..9f0083c --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/ODEBall/index.html @@ -0,0 +1,42 @@ + + + + + ODEBall + + + + + +
    +

    Io Reference

    +


    +


    +Physics +  /   +ODE +  /   +ODEBall +


    +


    + + + + + + + + + + + + + +
    ODEBall binding +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Physics/ODE/ODEBody/index.html b/io-master/docs/reference/Physics/ODE/ODEBody/index.html new file mode 100755 index 0000000..f0be8bb --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/ODEBody/index.html @@ -0,0 +1,42 @@ + + + + + ODEBody + + + + + +
    +

    Io Reference

    +


    +


    +Physics +  /   +ODE +  /   +ODEBody +


    +


    + + + + + + + + + + + + + +
    ODEBody binding +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Physics/ODE/ODEBox/index.html b/io-master/docs/reference/Physics/ODE/ODEBox/index.html new file mode 100755 index 0000000..d0e1a85 --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/ODEBox/index.html @@ -0,0 +1,42 @@ + + + + + ODEBox + + + + + +
    +

    Io Reference

    +


    +


    +Physics +  /   +ODE +  /   +ODEBox +


    +


    + + + + + + + + + + + + + +
    ODEBox binding +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Physics/ODE/ODEContact/index.html b/io-master/docs/reference/Physics/ODE/ODEContact/index.html new file mode 100755 index 0000000..79bc21d --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/ODEContact/index.html @@ -0,0 +1,42 @@ + + + + + ODEContact + + + + + +
    +

    Io Reference

    +


    +


    +Physics +  /   +ODE +  /   +ODEContact +


    +


    + + + + + + + + + + + + + +
    ODEContact binding +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Physics/ODE/ODEContactJoint/index.html b/io-master/docs/reference/Physics/ODE/ODEContactJoint/index.html new file mode 100755 index 0000000..cb0e635 --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/ODEContactJoint/index.html @@ -0,0 +1,42 @@ + + + + + ODEContactJoint + + + + + +
    +

    Io Reference

    +


    +


    +Physics +  /   +ODE +  /   +ODEContactJoint +


    +


    + + + + + + + + + + + + + +
    ODEContactJoint binding +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Physics/ODE/ODEFixed/index.html b/io-master/docs/reference/Physics/ODE/ODEFixed/index.html new file mode 100755 index 0000000..1402948 --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/ODEFixed/index.html @@ -0,0 +1,42 @@ + + + + + ODEFixed + + + + + +
    +

    Io Reference

    +


    +


    +Physics +  /   +ODE +  /   +ODEFixed +


    +


    + + + + + + + + + + + + + +
    ODEFixed binding +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Physics/ODE/ODEHinge/index.html b/io-master/docs/reference/Physics/ODE/ODEHinge/index.html new file mode 100755 index 0000000..fbab10f --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/ODEHinge/index.html @@ -0,0 +1,42 @@ + + + + + ODEHinge + + + + + +
    +

    Io Reference

    +


    +


    +Physics +  /   +ODE +  /   +ODEHinge +


    +


    + + + + + + + + + + + + + +
    ODEHinge binding +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Physics/ODE/ODEHinge2/index.html b/io-master/docs/reference/Physics/ODE/ODEHinge2/index.html new file mode 100755 index 0000000..4ec29b3 --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/ODEHinge2/index.html @@ -0,0 +1,42 @@ + + + + + ODEHinge2 + + + + + +
    +

    Io Reference

    +


    +


    +Physics +  /   +ODE +  /   +ODEHinge2 +


    +


    + + + + + + + + + + + + + +
    ODEJoint binding +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Physics/ODE/ODEJoint/index.html b/io-master/docs/reference/Physics/ODE/ODEJoint/index.html new file mode 100755 index 0000000..f7f08c3 --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/ODEJoint/index.html @@ -0,0 +1,42 @@ + + + + + ODEJoint + + + + + +
    +

    Io Reference

    +


    +


    +Physics +  /   +ODE +  /   +ODEJoint +


    +


    + + + + + + + + + + + + + +
    ODEJoint binding +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Physics/ODE/ODEJointGroup/index.html b/io-master/docs/reference/Physics/ODE/ODEJointGroup/index.html new file mode 100755 index 0000000..8052f81 --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/ODEJointGroup/index.html @@ -0,0 +1,42 @@ + + + + + ODEJointGroup + + + + + +
    +

    Io Reference

    +


    +


    +Physics +  /   +ODE +  /   +ODEJointGroup +


    +


    + + + + + + + + + + + + + +
    ODEJointGroup binding +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Physics/ODE/ODEMass/index.html b/io-master/docs/reference/Physics/ODE/ODEMass/index.html new file mode 100755 index 0000000..e182acf --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/ODEMass/index.html @@ -0,0 +1,42 @@ + + + + + ODEMass + + + + + +
    +

    Io Reference

    +


    +


    +Physics +  /   +ODE +  /   +ODEMass +


    +


    + + + + + + + + + + + + + +
    ODEMass binding +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Physics/ODE/ODEPlane/index.html b/io-master/docs/reference/Physics/ODE/ODEPlane/index.html new file mode 100755 index 0000000..1239905 --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/ODEPlane/index.html @@ -0,0 +1,42 @@ + + + + + ODEPlane + + + + + +
    +

    Io Reference

    +


    +


    +Physics +  /   +ODE +  /   +ODEPlane +


    +


    + + + + + + + + + + + + + +
    ODEPlane binding +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Physics/ODE/ODESimpleSpace/index.html b/io-master/docs/reference/Physics/ODE/ODESimpleSpace/index.html new file mode 100755 index 0000000..d2cc3a9 --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/ODESimpleSpace/index.html @@ -0,0 +1,42 @@ + + + + + ODESimpleSpace + + + + + +
    +

    Io Reference

    +


    +


    +Physics +  /   +ODE +  /   +ODESimpleSpace +


    +


    + + + + + + + + + + + + + +
    ODESimpleSpace binding +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Physics/ODE/ODEWorld/index.html b/io-master/docs/reference/Physics/ODE/ODEWorld/index.html new file mode 100755 index 0000000..199daa6 --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/ODEWorld/index.html @@ -0,0 +1,42 @@ + + + + + ODEWorld + + + + + +
    +

    Io Reference

    +


    +


    +Physics +  /   +ODE +  /   +ODEWorld +


    +


    + + + + + + + + + + + + + +
    ODEWorld binding +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Physics/ODE/index.html b/io-master/docs/reference/Physics/ODE/index.html new file mode 100755 index 0000000..f547b95 --- /dev/null +++ b/io-master/docs/reference/Physics/ODE/index.html @@ -0,0 +1,61 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Physics/index.html b/io-master/docs/reference/Physics/index.html new file mode 100755 index 0000000..59076e2 --- /dev/null +++ b/io-master/docs/reference/Physics/index.html @@ -0,0 +1,44 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Server/Curses/Curses/index.html b/io-master/docs/reference/Server/Curses/Curses/index.html new file mode 100755 index 0000000..277db76 --- /dev/null +++ b/io-master/docs/reference/Server/Curses/Curses/index.html @@ -0,0 +1,366 @@ + + + + + Curses + + + + + +
    +

    Io Reference

    +


    +


    +Server +  /   +Curses +  /   +Curses +


    +


    + + + + + + + + + + + + + +
    Curses allows writing and reading at arbitrary positions on the terminal. You have to call init to set the terminal to curses mode and end to end curses mode. The terminal is not updated until refresh is called. It is a bad idea to use the standard io's read and write methods when the terminal is in curses mode. The Curses primitive was written by Edwin Zacharias. +

    +Here's an example that prints Hello at column 5 and row 7; +

    +

    +Curses init
    +Curses move(5, 7) print(\"Hello\")
    +Curses refresh
    +Curses end
    +
    +
     
     
     
    + +
    +

    + +begin + +

    +

    +Sets the terminal to curses mode. + This should be called before any other curses methods. + Returns self. +
    + +cBreak(aString) + +

    +

    +Disables line buffering and erase/kill character-processing. + cBreak should be on for most purposes. Returns self. +
    + +clear + +

    +

    +Clears the terminal. Nicer than erase. Returns self. +
    + +clearToEndOfLine + +

    +

    +Clears the text from the cursor to the end of the line. Returns self. +
    + +delete(n) + +

    +

    +Deletes n characters at the current position. Text to the right is shifted left. + n is optional and defaults to 1. Returns self. +
    + +echo + +

    +

    +Echoes user input to terminal. Returns self. +
    + +end + +

    +

    +Ends curses mode. This should be called before standard io's read + and write methods are used. Returns self. +
    + +get(n) + +

    +

    +Returns n characters from the terminal. n is optional and defaults to 1. +
    + +getCh + +

    +

    +Reads a single-byte character from the terminal associated with the + current or specified window. Returns a Number containing the byte. +
    + +hasColors + +

    +

    +Returns true if the terminal supports color, false otherwise. +
    + +height + +

    +

    +Returns a Number containing the height of the current screen. +
    + +input(n) + +

    +

    +Returns user input up to a return, or a maximum of n characters. +
    + +insert(aString) + +

    +

    +Inserts the string at the current position on the terminal, + pushing existing text to the right. Returns self. +
    + +move(x, y) + +

    +

    +Moves the cursor to column x and row y on the terminal. + (0, 0) is at the top-left of the terminal. Returns self. + - Be careful if you are used to the C implementation of Curses + - as the coordinates are the other way around. Here they are like + - graphical XY coordinates, whereas in C Curses the rational is + - more like typing text. You go down on the line you want and then + - you move horizontally. +
    + +noCBreak + +

    +

    +Allows line buffering and erase/kill character-processing. + cBreak should be on for most purposes. Returns self. +
    + +noEcho + +

    +

    +Does not echo user input to terminal. Returns self. +
    + +nodelay(aBoolean) + +

    +

    +Enables or disables block during read. + If aNumber is zero, nodelay is set to be false, otherwise it is set to be true. +
    + +print(aString) + +

    +

    +Prints the string to the current position on the terminal, + overwriting existing text on the terminal. Returns self. +
    + +refresh + +

    +

    +Copies the current buffer to the screen. This must be called to make + changes to the screen. Returns self. +
    + +scroll(num) + +

    +

    +Scrolls up num lines. + num is optional and defaults to 1. Returns self. +
    + +scrollok(aBoolean) + +

    +

    +Enables / Disables automatic scrolling. Return self. +
    + +setBackgroundBlack + +

    +

    +Sets the background color to black. +
    + +setBackgroundBlue + +

    +

    +Sets the background color to blue. +
    + +setBackgroundCyan + +

    +

    +Sets the background color to cyan. +
    + +setBackgroundGreen + +

    +

    +Sets the background color to green. +
    + +setBackgroundMagenta + +

    +

    +Sets the background color to magenta. +
    + +setBackgroundRed + +

    +

    +Sets the background color to red. +
    + +setBackgroundWhite + +

    +

    +Sets the background color to white. +
    + +setBackgroundYellow + +

    +

    +Sets the background color to yellow. +
    + +setForegroundBlack + +

    +

    +Sets the foreground color to black. +
    + +setForegroundBlue + +

    +

    +Sets the foreground color to blue. +
    + +setForegroundCyan + +

    +

    +Sets the foreground color to cyan. +
    + +setForegroundGreen + +

    +

    +Sets the foreground color to green. +
    + +setForegroundMagenta + +

    +

    +Sets the foreground color to magenta. +
    + +setForegroundRed + +

    +

    +Sets the foreground color to red. +
    + +setForegroundWhite + +

    +

    +Sets the foreground color to white. +
    + +setForegroundYellow + +

    +

    +Sets the foreground color to yellow. +
    + +setScrollingRegion(top, bottom) + +

    +

    +Sets the scrolling region; top and bottom are the line numbers of the top + and button margin. Returns self. +
    + +width + +

    +

    +Returns a Number containing the width of the current screen. +
    + +writeCharacter(aCharacter) + +

    +

    +Prints the aCharacter to the current position on the terminal, + overwriting existing text on the terminal. Returns self. +
    + +x + +

    +

    +Returns the cursor x position. +
    + +y + +

    +

    +Returns the cursor y position. +
    +
    +




    + + diff --git a/io-master/docs/reference/Server/Curses/index.html b/io-master/docs/reference/Server/Curses/index.html new file mode 100755 index 0000000..b7e3c7f --- /dev/null +++ b/io-master/docs/reference/Server/Curses/index.html @@ -0,0 +1,54 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Server/EditLine/EditLine/index.html b/io-master/docs/reference/Server/EditLine/EditLine/index.html new file mode 100755 index 0000000..ae7f867 --- /dev/null +++ b/io-master/docs/reference/Server/EditLine/EditLine/index.html @@ -0,0 +1,42 @@ + + + + + EditLine + + + + + +
    +

    Io Reference

    +


    +


    +Server +  /   +EditLine +  /   +EditLine +


    +


    + + + + + + + + + + + + + +
    Binding to libedit (BSD version of readline). +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Server/EditLine/index.html b/io-master/docs/reference/Server/EditLine/index.html new file mode 100755 index 0000000..fbb5145 --- /dev/null +++ b/io-master/docs/reference/Server/EditLine/index.html @@ -0,0 +1,54 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Server/NullAddon/NullAddon/index.html b/io-master/docs/reference/Server/NullAddon/NullAddon/index.html new file mode 100755 index 0000000..7da39db --- /dev/null +++ b/io-master/docs/reference/Server/NullAddon/NullAddon/index.html @@ -0,0 +1,45 @@ + + + + + NullAddon + + + + + +
    +

    Io Reference

    +


    +


    +Server +  /   +NullAddon +  /   +NullAddon +


    +


    + + + + + + + + + + + + + +
    A do-nothing addon for Io, primarily intended to serve as +a skeleton for writing your own addons, without having to +rewrite all the boilerplate yourself. It implements only +one method, hello, which does the obvious job of greeting the world. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Server/NullAddon/index.html b/io-master/docs/reference/Server/NullAddon/index.html new file mode 100755 index 0000000..33a3983 --- /dev/null +++ b/io-master/docs/reference/Server/NullAddon/index.html @@ -0,0 +1,54 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Server/ReadLine/ReadLine/index.html b/io-master/docs/reference/Server/ReadLine/ReadLine/index.html new file mode 100755 index 0000000..355b49f --- /dev/null +++ b/io-master/docs/reference/Server/ReadLine/ReadLine/index.html @@ -0,0 +1,42 @@ + + + + + ReadLine + + + + + +
    +

    Io Reference

    +


    +


    +Server +  /   +ReadLine +  /   +ReadLine +


    +


    + + + + + + + + + + + + + +
    Binding to GNU readline. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Server/ReadLine/index.html b/io-master/docs/reference/Server/ReadLine/index.html new file mode 100755 index 0000000..171b747 --- /dev/null +++ b/io-master/docs/reference/Server/ReadLine/index.html @@ -0,0 +1,54 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Server/Syslog/Syslog/index.html b/io-master/docs/reference/Server/Syslog/Syslog/index.html new file mode 100755 index 0000000..3efb394 --- /dev/null +++ b/io-master/docs/reference/Server/Syslog/Syslog/index.html @@ -0,0 +1,230 @@ + + + + + Syslog + + + + + +
    +

    Io Reference

    +


    +


    +Server +  /   +Syslog +  /   +Syslog +


    +


    + + + + + + + + + + + + + +
    Provides access to a Unix system's system logger. +

    +

    +logger = Syslog clone do(
    +	identity("SyslogTest")
    +	facility(facilityMap at("LOG_USER"))
    +	options(List append(optionsMap at("LOG_PID"), optionsMap at("LOG_CONS")))
    +	priority(priorityMap at("LOG_INFO"))
    +	open(facility, options)
    +	mask(List append(maskMap at("LOG_PRIMASK")))
    +	log(priority, "*** Merely a test ***")
    +	close
    +)
    +
    + +

    +Note: This is partially tested. Please let me know of any problems you happen to stumble across, or if it could be better. --Jeremy Tregunna +

    +

     
     
     
    + +
    +

    + +close + +

    +

    +Closes a log that has previously been opened for writing. +
    + +facility(optionalFacility) + +

    +

    +Specifies the logging facility, which can be one of any of the values + found in the facilityMap map. If optionalFacility is omitted, returns + the currently set facility. +
    + +facilityMap + +

    +

    +Contains the following keys, which represent numbers that can be used when opening a log: +

    +

      +
    • LOG_KERN
    • +
    • LOG_USER
    • +
    • LOG_MAIL
    • +
    • LOG_DAEMON
    • +
    • LOG_AUTH
    • +
    • LOG_SYSLOG
    • +
    • LOG_LPR
    • +
    • LOG_NEWS
    • +
    • LOG_UUCP
    • +
    • LOG_CRON
    • +
    • LOG_AUTHPRIV
    • +
    • LOG_FTP
    • +
    • LOG_RESERVED0
    • +
    • LOG_RESERVED1
    • +
    • LOG_RESERVED2
    • +
    • LOG_RESERVED3
    • +
    • LOG_LOCAL0
    • +
    • LOG_LOCAL1
    • +
    • LOG_LOCAL2
    • +
    • LOG_LOCAL3
    • +
    • LOG_LOCAL4
    • +
    • LOG_LOCAL5
    • +
    • LOG_LOCAL6
    • +
    • LOG_LOCAL7
    • +
    +
    + +identity(optionalIdentity) + +

    +

    +If optionalIdentity is specified, provides an identity for all of the messages you will be sending to the syslog daemon. Returns the identity. +
    + +isOpen + +

    +

    +Returns self if the log is opened for writing. Otherwise, returns Nil. +
    + +log + +

    +

    +Writes the supplied data to the log. Requires 2 arguments: +

    +

      +
    • Logging Priority
    • +
    • Message to log
    • +
    +
    + +mask(optionalMask) + +

    +

    +If optionalMask is specified, optionalMask is a list which contains + any one or more values stored in the maskMap hash that will be OR'd + together, to provide the proper mask. Returns the logging mask (as a List). +
    + +maskMap + +

    +

    +Contains keys/value pairs which represent numbers that specify the + logging mask. These values may be any one (or more) of the following: +

    +

      +
    • LOG_PRIMASK
    • +
    • LOG_FACMASK
    • +
    +
    + +open(aPriority, someOptions, optionalIdentity) + +

    +

    +Opens the syslog for writing. optionalIdentity need not be entered + and will default to the name of the distribution of Io you are running + or if you have embedded Io into your application and set + Lobby distribution = "foo", it will be set to "foo". +
    + +options(optionalOptions) + +

    +

    +If optionalOptions is specified, it should represent a list of the logging + options you can find in the optionsMap slot. All the values in the supplied + aList will be OR'd together when you call the open or reopen slots. + Returns the list of options if optionalFacility is omitted. +
    + +optionsMap + +

    +

    +A map containing key/value pairs holding all available options. These include: +

    +

      +
    • LOG_PID
    • +
    • LOG_CONS
    • +
    • LOG_ODELAY
    • +
    • LOG_NDELAY
    • +
    • LOG_NOWAIT
    • +
    • LOG_PERROR
    • +
    +
    + +priority(optionalPriority) + +

    +

    +If optionalPriority is specified, sets the value, and returns it. + If no value is specified, will return the previously stored value if + one has been set previously. +
    + +priorityMap + +

    +

    +Contains key/value pairs for logging priorities for use when calling the log() method. These include: +

    +

      +
    • LOG_EMERG
    • +
    • LOG_ALERT
    • +
    • LOG_CRIT
    • +
    • LOG_ERR
    • +
    • LOG_WARNING
    • +
    • LOG_NOTICE
    • +
    • LOG_INFO
    • +
    • LOG_DEBUG
    • +
    +
    + +reopen(aFacility, someOptions, optionalIdentity) + +

    +

    +Reopens an already open log session. This is useful if you wish to + change the facility you are logging to, the options you are logging + with, or the identity of the session. Takes the same options as the open slot. +
    +
    +




    + + diff --git a/io-master/docs/reference/Server/Syslog/index.html b/io-master/docs/reference/Server/Syslog/index.html new file mode 100755 index 0000000..009f69b --- /dev/null +++ b/io-master/docs/reference/Server/Syslog/index.html @@ -0,0 +1,54 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Server/SystemCall/SystemCall/index.html b/io-master/docs/reference/Server/SystemCall/SystemCall/index.html new file mode 100755 index 0000000..6bb7166 --- /dev/null +++ b/io-master/docs/reference/Server/SystemCall/SystemCall/index.html @@ -0,0 +1,63 @@ + + + + + SystemCall + + + + + +
    +

    Io Reference

    +


    +


    +Server +  /   +SystemCall +  /   +SystemCall +


    +


    + + + + + + + + + + + + + +
    A binding for "callsystem - system() on steroids" + +
      +
    • asynchronous running of a child process +
    • setup of the environment +
    • substitution of environment variables +
    • connect all 3 standard streams to pipes, null devices, or files +
    • pathname handling +
    + +Example use; +
    	
    +sc = SystemCall clone
    +
    +
     
     
     
    + +
    +

    + +asyncRun(command, argList, envMap) + +

    +

    +Run the system call. +
    +
    +




    + + diff --git a/io-master/docs/reference/Server/SystemCall/index.html b/io-master/docs/reference/Server/SystemCall/index.html new file mode 100755 index 0000000..b37271c --- /dev/null +++ b/io-master/docs/reference/Server/SystemCall/index.html @@ -0,0 +1,54 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Server/User/User/index.html b/io-master/docs/reference/Server/User/User/index.html new file mode 100755 index 0000000..9a620ec --- /dev/null +++ b/io-master/docs/reference/Server/User/User/index.html @@ -0,0 +1,58 @@ + + + + + User + + + + + +
    +

    Io Reference

    +


    +


    +Server +  /   +User +  /   +User +


    +


    + + + + + + + + + + + + + +
    This object provides access to the local operating system's information + about the current user. +
     
     
     
    + +
    +

    + +homeDirectory + +

    +

    +Returns the current user's home directory as a Directory object. +
    + +name + +

    +

    +Returns the current user's name. +
    +
    +




    + + diff --git a/io-master/docs/reference/Server/User/index.html b/io-master/docs/reference/Server/User/index.html new file mode 100755 index 0000000..1831577 --- /dev/null +++ b/io-master/docs/reference/Server/User/index.html @@ -0,0 +1,54 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Server/index.html b/io-master/docs/reference/Server/index.html new file mode 100755 index 0000000..05d23cb --- /dev/null +++ b/io-master/docs/reference/Server/index.html @@ -0,0 +1,50 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/UserInterface/Clutter/Clutter/index.html b/io-master/docs/reference/UserInterface/Clutter/Clutter/index.html new file mode 100755 index 0000000..5561d9a --- /dev/null +++ b/io-master/docs/reference/UserInterface/Clutter/Clutter/index.html @@ -0,0 +1,325 @@ + + + + + Clutter + + + + + +
    +

    Io Reference

    +


    +


    +UserInterface +  /   +Clutter +  /   +Clutter +


    +


    + + + + + + + + + + + + + +

    +Clutter is a GObject based library for creating fast, visually rich, graphical user interfaces. +

    +Clutter works by manipulating a scene-graph of 2D surfaces, or 'actors', inside a 3D space. +

    +ClutterActor is the base class for such surfaces. All ClutterActors can be positioned, scaled and rotated in 3D space. In addition, other properties can be set, such as 2D clipping, children and opacity. Tranforms applied to a parent actor also apply to any children. Actors are also able to receive events. +

    +Subclasses of ClutterActor include ClutterStage, ClutterTexture, ClutterLabel, ClutterRectangle, ClutterEntry and ClutterGroup. ClutterActors are added to a parent, transformed and then made visible. +

    +ClutterStage is the top level ClutterActor - it's the representation of a window, or framebuffer. It is created automatically when Clutter is initialised. ClutterStage is a ClutterGroup, a class implementing the ClutterCointainer interface. +

    +ClutterTimelines provide the basis for Clutter's animation utilities. Multiple timelines can be synchronised using ClutterScore, and ClutterBehaviour and ClutterEffect allow for the creation of animation effects such as transitions. +

    +Clutter further contains a number of utilities, including; ClutterScript - for loading 'UI definition' files formatted in JSON, ClutterShader - a class for applying GPU shaders to actors, ClutterModel - a utility class for MVC list type implementations, and fixed point math utilities. +

    +For detailed docs, see clutter-project. +

    +
     
     
     
    + +
    +

    + +AXIS + +

    +

    +Contains all CLUTTER_AXIS_* constants. +
    + +DEVICE_TYPE + +

    +

    +Contains all CLUTTER_TYPE_* constants. +
    + +EVENT + +

    +

    +Contains all Clutter event type constants. +
    + +EVENT_FLAG + +

    +

    +Contains all CLUTTER_EVENT_FLAG_* constants. +
    + +GRAVITY + +

    +

    +Contains all CLUTTER_GRAVITY_* constants. +
    + +MASK + +

    +

    +Contains all CLUTTER_*_MASK constants. +
    + +SCROLL + +

    +

    +Contains all CLUTTER_SCROLL_* constants. +
    + +SHADER_ERROR + +

    +

    +Contains all CLUTTER_SHADER_ERROR_* constants. +
    + +STAGE_STATE + +

    +

    +Contains all CLUTTER_STAGE_STATE_* constants. +
    + +UNIT + +

    +

    +Contains all CLUTTER_UNIT_* constants. +
    + +clearGlyphCache + +

    +

    + +
    + +cogl + +

    +

    + +
    + +currentEventTime + +

    +

    + +
    + +disableMotionEvents + +

    +

    + +
    + +enableMotionEvents + +

    +

    + +
    + +flavour + +

    +

    + +
    + +fontHinting + +

    +

    +Returns true if CLUTTER_FONT_HINTING is set. +
    + +getActorByGid(gid) + +

    +

    + +
    + +getDefaultFrameRate + +

    +

    + +
    + +getKeyboardGrab + +

    +

    + +
    + +getPointerGrab + +

    +

    + +
    + +grabKeyboard(actor) + +

    +

    + +
    + +grabPointer(actor[, deviceId]) + +

    +

    + +
    + +initThreads + +

    +

    + +
    + +isFpsShown + +

    +

    + +
    + +keySymbolToUnicode(symbol) + +

    +

    + +
    + +main + +

    +

    +Calls clutter_main() which starts GMainLoop. +
    + +mainLevel + +

    +

    + +
    + +motionEventsEnabled + +

    +

    +Returns true if motion events are enabled. +
    + +quitMain + +

    +

    + +
    + +setDefaultFrameRate(frameRate) + +

    +

    + +
    + +setFontHinting(useFontHinting) + +

    +

    +If useFontHinting is false, CLUTTER_FONT_MIPMAPPING flag will be used. +
    + +setSharedInt(firstInt, ...) + +

    +

    + +
    + +threadEnter + +

    +

    + +
    + +threadLeave + +

    +

    + +
    + +ungrabKeyboard + +

    +

    + +
    + +ungrabPointer + +

    +

    + +
    + +version + +

    +

    + +
    +
    +




    + + diff --git a/io-master/docs/reference/UserInterface/Clutter/ClutterActor/index.html b/io-master/docs/reference/UserInterface/Clutter/ClutterActor/index.html new file mode 100755 index 0000000..a62c5dd --- /dev/null +++ b/io-master/docs/reference/UserInterface/Clutter/ClutterActor/index.html @@ -0,0 +1,513 @@ + + + + + ClutterActor + + + + + +
    +

    Io Reference

    +


    +


    +UserInterface +  /   +Clutter +  /   +ClutterActor +


    +


    + + + + + + + + + + + + + +
    For more detailed docs see Clutter documentation. +
     
     
     
    + +
    +

    + +allocate(clutterActorBox, absoluteOriginChanged) + +

    +

    + +
    + +allocateAvailableSize(x, y, width, height, originChanged) + +

    +

    + +
    + +allocateprefferedSize(originChanged) + +

    +

    +If originChanged is true, +CLUTTER_ABSOLUTE_ORIGIN_CHANGED flag will be used. +
    + +allocationBox + +

    +

    +Return new x. +
    + +allocationGeometry + +

    +

    +Returns an Object with slots x, y, width, height. +
    + +allocationVertices([ancestorActor]) + +

    +

    +Returns [[List]] with four x objects. +
    + +clip + +

    +

    +Returns an [[Object]] with slots xOff, yOff, width and height set. +
    + +destroy + +

    +

    + +
    + +event(clutterEvent, capture) + +

    +

    + +
    + +fixedPosition + +

    +

    + +
    + +geometry + +

    +

    +Returns an [[Object]] with slots x, y, width, height. +
    + +gid + +

    +

    + +
    + +hasClip + +

    +

    + +
    + +height + +

    +

    + +
    + +hide + +

    +

    + +
    + +hideAll + +

    +

    + +
    + +isMapped + +

    +

    + +
    + +isReactive + +

    +

    + +
    + +isRealized + +

    +

    + +
    + +isRotated + +

    +

    + +
    + +isVisible + +

    +

    + +
    + +lower + +

    +

    + +
    + +lowerToBottom + +

    +

    + +
    + +map + +

    +

    + +
    + +moveBy(dx, dy) + +

    +

    + +
    + +name + +

    +

    + +
    + +opacity + +

    +

    + +
    + +paint + +

    +

    + +
    + +parent + +

    +

    + +
    + +position + +

    +

    +Returns an [[Object]] with slots x and y set. +
    + +preferredHeight + +

    +

    +Returns an [[Object]] with slots minHeight and naturalHeight set. +
    + +preferredSize + +

    +

    +Returns an [[Object]] with slots minWidth, minHeight, naturalHeight and naturalWidth. +
    + +preferredWidth + +

    +

    +Returns an [[Object]] with slots minWidth and naturalWidth set. +
    + +queueRedraw + +

    +

    + +
    + +queueRelayout + +

    +

    + +
    + +raise + +

    +

    + +
    + +raiseToTop + +

    +

    + +
    + +realize + +

    +

    + +
    + +removeClip + +

    +

    + +
    + +reparent + +

    +

    + +
    + +rotation + +

    +

    +Returns an [[Object]] with slots x, y, z and angle set. +
    + +setClip(xOff, yOff, width, height) + +

    +

    + +
    + +setFixedPosition(state) + +

    +

    +state can be true or false. +
    + +setGeometry(x, y, width, height) + +

    +

    +Sets actor's geometry. +
    + +setHeight(height) + +

    +

    + +
    + +setName + +

    +

    + +
    + +setOpacity(opacity) + +

    +

    + +
    + +setParent(parentActor) + +

    +

    + +
    + +setPosition(x, y) + +

    +

    +Sets actor's position. +
    + +setRotation(axis, angle, x, y, z) + +

    +

    +Sets actor's rotation. Use Clutter AXIS X/Y/Z for first argument. +
    + +setSize(width, height) + +

    +

    +Sets actor's size. +
    + +setWidth(width) + +

    +

    + +
    + +setX(xCoord) + +

    +

    + +
    + +setY(yCoord) + +

    +

    + +
    + +setZRotationFromGravity(angle, gravity) + +

    +

    + +
    + +shouldPickPaint + +

    +

    + +
    + +show + +

    +

    + +
    + +showAll + +

    +

    + +
    + +size + +

    +

    +Returns an [[Object]] with slots width and height set. +
    + +stage + +

    +

    + +
    + +unmap + +

    +

    + +
    + +unparent + +

    +

    + +
    + +unrealize + +

    +

    + +
    + +width + +

    +

    + +
    + +x + +

    +

    + +
    + +y + +

    +

    + +
    + +zRotationGravity + +

    +

    +Returns an object from [[Clutter GRAVITY]]. +
    +
    +




    + + diff --git a/io-master/docs/reference/UserInterface/Clutter/ClutterActorBox/index.html b/io-master/docs/reference/UserInterface/Clutter/ClutterActorBox/index.html new file mode 100755 index 0000000..322b2c5 --- /dev/null +++ b/io-master/docs/reference/UserInterface/Clutter/ClutterActorBox/index.html @@ -0,0 +1,71 @@ + + + + + ClutterActorBox + + + + + +
    +

    Io Reference

    +


    +


    +UserInterface +  /   +Clutter +  /   +ClutterActorBox +


    +


    + + + + + + + + + + + + + +
    For more detailed docs see Clutter documentation. +
     
     
     
    + +
    +

    + +contains(x1, y1) + +

    +

    + +
    + +origin + +

    +

    + +
    + +size + +

    +

    + +
    + +with(x1, y1, x2, y2) + +

    +

    + +
    +
    +




    + + diff --git a/io-master/docs/reference/UserInterface/Clutter/ClutterColor/index.html b/io-master/docs/reference/UserInterface/Clutter/ClutterColor/index.html new file mode 100755 index 0000000..96d252f --- /dev/null +++ b/io-master/docs/reference/UserInterface/Clutter/ClutterColor/index.html @@ -0,0 +1,152 @@ + + + + + ClutterColor + + + + + +
    +

    Io Reference

    +


    +


    +UserInterface +  /   +Clutter +  /   +ClutterColor +


    +


    + + + + + + + + + + + + + +

    +For more detailed docs see Clutter documentation.

    +
    red := ClutterColor fromString("red")
    +blue := "#00f" asClutterColor
    +(red + blue) asString println
    +
     
     
     
    + +
    +

    + +!=(otherColor) + +

    +

    + +
    + ++(otherColor) + +

    +

    + +
    + +-(otherColor) + +

    +

    + +
    + +==(otherColor) + +

    +

    + +
    + +addInPlace(otherColor) + +

    +

    + +
    + +asString + +

    +

    + +
    + +darken + +

    +

    + +
    + +fromHLS(h, l, s) + +

    +

    + +
    + +fromPixel(pixel) + +

    +

    + +
    + +fromString(str) + +

    +

    + +
    + +lighten + +

    +

    + +
    + +shade(amount) + +

    +

    + +
    + +subtractInPlace(otherColor) + +

    +

    + +
    + +toHLS(h, l, s) + +

    +

    + +
    + +toPixel + +

    +

    + +
    +
    +




    + + diff --git a/io-master/docs/reference/UserInterface/Clutter/ClutterEvent/index.html b/io-master/docs/reference/UserInterface/Clutter/ClutterEvent/index.html new file mode 100755 index 0000000..fff2431 --- /dev/null +++ b/io-master/docs/reference/UserInterface/Clutter/ClutterEvent/index.html @@ -0,0 +1,176 @@ + + + + + ClutterEvent + + + + + +
    +

    Io Reference

    +


    +


    +UserInterface +  /   +Clutter +  /   +ClutterEvent +


    +


    + + + + + + + + + + + + + +
    For more detailed docs see Clutter documentation. +
     
     
     
    + +
    +

    + +button + +

    +

    + +
    + +clickCount + +

    +

    + +
    + +coords + +

    +

    +Returns an [[Object]] with slots x and y set. +
    + +device + +

    +

    + +
    + +eventType + +

    +

    +Returns a value from [[Clutter EVENT]]. +
    + +flags + +

    +

    + +
    + +hasPending + +

    +

    + +
    + +keyCode + +

    +

    + +
    + +keySymbol + +

    +

    + +
    + +keyUnicode + +

    +

    + +
    + +peek + +

    +

    + +
    + +put(event) + +

    +

    + +
    + +relatedActor + +

    +

    + +
    + +scrollDirection + +

    +

    + +
    + +source + +

    +

    + +
    + +state + +

    +

    +Returns a value from [[Clutter STATE]]. +
    + +time + +

    +

    +Returns a [[Date]] object. +
    + +x + +

    +

    + +
    + +y + +

    +

    + +
    +
    +




    + + diff --git a/io-master/docs/reference/UserInterface/Clutter/ClutterInputDevice/index.html b/io-master/docs/reference/UserInterface/Clutter/ClutterInputDevice/index.html new file mode 100755 index 0000000..549157e --- /dev/null +++ b/io-master/docs/reference/UserInterface/Clutter/ClutterInputDevice/index.html @@ -0,0 +1,57 @@ + + + + + ClutterInputDevice + + + + + +
    +

    Io Reference

    +


    +


    +UserInterface +  /   +Clutter +  /   +ClutterInputDevice +


    +


    + + + + + + + + + + + + + +
    For more detailed docs see Clutter documentation. +
     
     
     
    + +
    +

    + +deviceId + +

    +

    + +
    + +deviceType + +

    +

    + +
    +
    +




    + + diff --git a/io-master/docs/reference/UserInterface/Clutter/ClutterShader/index.html b/io-master/docs/reference/UserInterface/Clutter/ClutterShader/index.html new file mode 100755 index 0000000..eefa86a --- /dev/null +++ b/io-master/docs/reference/UserInterface/Clutter/ClutterShader/index.html @@ -0,0 +1,120 @@ + + + + + ClutterShader + + + + + +
    +

    Io Reference

    +


    +


    +UserInterface +  /   +Clutter +  /   +ClutterShader +


    +


    + + + + + + + + + + + + + +
    For more detailed docs see Clutter documentation. +
     
     
     
    + +
    +

    + +compile + +

    +

    + +
    + +disable + +

    +

    + +
    + +enable + +

    +

    + +
    + +fragmentSource + +

    +

    + +
    + +isCompiled + +

    +

    + +
    + +isEnabled + +

    +

    + +
    + +release + +

    +

    + +
    + +setFragmentSource(source) + +

    +

    + +
    + +setIsEnabled(state) + +

    +

    + +
    + +setVertexSource(source) + +

    +

    + +
    + +vertexSource + +

    +

    + +
    +
    +




    + + diff --git a/io-master/docs/reference/UserInterface/Clutter/ClutterStage/index.html b/io-master/docs/reference/UserInterface/Clutter/ClutterStage/index.html new file mode 100755 index 0000000..b3a42e1 --- /dev/null +++ b/io-master/docs/reference/UserInterface/Clutter/ClutterStage/index.html @@ -0,0 +1,78 @@ + + + + + ClutterStage + + + + + +
    +

    Io Reference

    +


    +


    +UserInterface +  /   +Clutter +  /   +ClutterStage +


    +


    + + + + + + + + + + + + + +
    For more detailed docs see Clutter documentation. +
     
     
     
    + +
    +

    + +color + +

    +

    + +
    + +default + +

    +

    + +
    + +setColor(color) + +

    +

    + +
    + +setTitle(title) + +

    +

    + +
    + +title + +

    +

    + +
    +
    +




    + + diff --git a/io-master/docs/reference/UserInterface/Clutter/ClutterUnits/index.html b/io-master/docs/reference/UserInterface/Clutter/ClutterUnits/index.html new file mode 100755 index 0000000..ce1d78c --- /dev/null +++ b/io-master/docs/reference/UserInterface/Clutter/ClutterUnits/index.html @@ -0,0 +1,136 @@ + + + + + ClutterUnits + + + + + +
    +

    Io Reference

    +


    +


    +UserInterface +  /   +Clutter +  /   +ClutterUnits +


    +


    + + + + + + + + + + + + + +

    For more detailed docs see Clutter documentation.

    +Example: +
    ClutterActor clone setWidth((10 px + 1 em) value)
    +
     
     
     
    + +
    +

    + ++(otherUnit) + +

    +

    +otherUnit can be either [[ClutterUnits]] or [[Number]]. +
    + +-(otherUnit) + +

    +

    + +
    + +==(otherUnit) + +

    +

    + +
    + +asString + +

    +

    + +
    + +compare(otherUnit) + +

    +

    +Returns 0 if units are equal, -1 if self is smaller, 1 if self is bigger than otherUnit. +
    + +unit + +

    +

    +Returns an value from [[Clutter UNIT]]. +
    + +value + +

    +

    + +
    + +withEm(valueInEm) + +

    +

    + +
    + +withEmForFont(valueInEm, fontName) + +

    +

    + +
    + +withMm(valueInMm) + +

    +

    + +
    + +withPt(valueInPt) + +

    +

    + +
    + +withPx(valueInPx) + +

    +

    + +
    + +withString(string) + +

    +

    + +
    +
    +




    + + diff --git a/io-master/docs/reference/UserInterface/Clutter/ClutterVertex/index.html b/io-master/docs/reference/UserInterface/Clutter/ClutterVertex/index.html new file mode 100755 index 0000000..5693188 --- /dev/null +++ b/io-master/docs/reference/UserInterface/Clutter/ClutterVertex/index.html @@ -0,0 +1,113 @@ + + + + + ClutterVertex + + + + + +
    +

    Io Reference

    +


    +


    +UserInterface +  /   +Clutter +  /   +ClutterVertex +


    +


    + + + + + + + + + + + + + +
    For more detailed docs see Clutter documentation. +
     
     
     
    + +
    +

    + +!=(otherVertex) + +

    +

    + +
    + +==(otherVertex) + +

    +

    + +
    + +asList + +

    +

    +Returns [[List]] with x, y, and z values. +
    + +setX(x) + +

    +

    + +
    + +setY(y) + +

    +

    + +
    + +setZ(z) + +

    +

    + +
    + +with(x, y, z) + +

    +

    + +
    + +x + +

    +

    + +
    + +y + +

    +

    + +
    + +z + +

    +

    + +
    +
    +




    + + diff --git a/io-master/docs/reference/UserInterface/Clutter/index.html b/io-master/docs/reference/UserInterface/Clutter/index.html new file mode 100755 index 0000000..3f23b71 --- /dev/null +++ b/io-master/docs/reference/UserInterface/Clutter/index.html @@ -0,0 +1,57 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/UserInterface/index.html b/io-master/docs/reference/UserInterface/index.html new file mode 100755 index 0000000..3b8cd4c --- /dev/null +++ b/io-master/docs/reference/UserInterface/index.html @@ -0,0 +1,44 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Video/AVCodec/AVCodec/index.html b/io-master/docs/reference/Video/AVCodec/AVCodec/index.html new file mode 100755 index 0000000..309697d --- /dev/null +++ b/io-master/docs/reference/Video/AVCodec/AVCodec/index.html @@ -0,0 +1,227 @@ + + + + + AVCodec + + + + + +
    +

    Io Reference

    +


    +


    +Video +  /   +AVCodec +  /   +AVCodec +


    +


    + + + + + + + + + + + + + +
    An object for encoding and decoding audio and video streams. + +

    +When an input stream containing audio data is opened, the following slots will be set: +

    +audioChannels
    +audioSampleRate
    +audioBitRate
    +audioDuration
    +audioFrameCount
    +
    + +When an input stream containing video data is opened, the following slots will be set: + +
    +framePeriod
    +videoDuration
    +videoFrameCount
    +
    +
     
     
     
    + +
    +

    + +audioInputBuffer + +

    +

    +Returns the input buffer. +
    + +audioOutputBuffer + +

    +

    +Returns the output buffer. +
    + +close + +

    +

    +Closes the input file if it's open. Returns self. +
    + +codecName + +

    +

    +Returns name of audio or video codec. +
    + +decode + +

    +

    +Decodes the next chunk of input data. + Output (if any) is placed in the outputBuffers. + Returns self. +
    + +decodeCodecNames + +

    +

    +Returns a list of strings with the names of the decode codecs. +
    + +didProcess + +

    +

    +Called after the receiver processes some more of the input buffer. +
    + +encodeCodecNames + +

    +

    +Returns a list of strings with the names of the encode codecs. +
    + +inputCoro + +

    +

    +Returns coroutine currently writing to the receiver. +
    + +internalCoro + +

    +

    +Returns coroutine used for the AVCodec to process data. +
    + +isAtEnd + +

    +

    +Returns true if the stream is at its end, false otherwise. +
    + +open + +

    +

    +Opens the input file. Return self on success or raises an exception on error. +
    + +path + +

    +

    +Returns path to file the receiver is reading from or writing to. +
    + +setCodecName(aSeq) + +

    +

    +Sets the codec name. Returns self. See: encodeCodecNames and decodeCodecNames +
    + + +setInputCoro(aCoro) + +

    +

    +Private method for setting inputCoro. Returns self. + +
    + + +setInternalCoro(aCoro) + +

    +

    +Private method for setting internalCoro. Returns self. + +
    + +setPath(aSeq) + +

    +

    +Sets the path to file the receiver is reading or writing to. Returns self. +
    + +setStreamDestination(anObject) + +

    +

    +Sets the streamDestination to anObject. The didProcess method will call: +
    +if(streamDestination, streamDestination write(outputBuffer))
    +outputBuffer empty
    +
    +
    + +streamDestination + +

    +

    +Returns the streamDestination. +
    + +videoCodecName + +

    +

    +Returns the name of the video codec. +
    + +willProcess + +

    +

    +Called before the receiver will process more of the input buffer. + If inputBuffer is empty, it pauses the receiver's coro. +
    + +write(aSequence) + +

    +

    +Appends aSequence to the input buffer and resumes the receiver's coroutine in order to process it. + The calling coroutine (inputCoroutine) will be scheduled to resume when didProcess is called. +
    +
    +




    + + diff --git a/io-master/docs/reference/Video/AVCodec/index.html b/io-master/docs/reference/Video/AVCodec/index.html new file mode 100755 index 0000000..b021c25 --- /dev/null +++ b/io-master/docs/reference/Video/AVCodec/index.html @@ -0,0 +1,50 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Video/Theora/TheoraComment/index.html b/io-master/docs/reference/Video/Theora/TheoraComment/index.html new file mode 100755 index 0000000..555a03f --- /dev/null +++ b/io-master/docs/reference/Video/Theora/TheoraComment/index.html @@ -0,0 +1,50 @@ + + + + + TheoraComment + + + + + +
    +

    Io Reference

    +


    +


    +Video +  /   +Theora +  /   +TheoraComment +


    +


    + + + + + + + + + + + + + +
    A wrapper around the libtheora th_comment object. +
     
     
     
    + +
    +

    + +count + +

    +

    +Returns the number of comments. +
    +
    +




    + + diff --git a/io-master/docs/reference/Video/Theora/TheoraDecodeContext/index.html b/io-master/docs/reference/Video/Theora/TheoraDecodeContext/index.html new file mode 100755 index 0000000..cba214e --- /dev/null +++ b/io-master/docs/reference/Video/Theora/TheoraDecodeContext/index.html @@ -0,0 +1,42 @@ + + + + + TheoraDecodeContext + + + + + +
    +

    Io Reference

    +


    +


    +Video +  /   +Theora +  /   +TheoraDecodeContext +


    +


    + + + + + + + + + + + + + +
    A wrapper around the libtheora th_dec_ctx object. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Video/Theora/TheoraInfo/index.html b/io-master/docs/reference/Video/Theora/TheoraInfo/index.html new file mode 100755 index 0000000..92b9e3a --- /dev/null +++ b/io-master/docs/reference/Video/Theora/TheoraInfo/index.html @@ -0,0 +1,64 @@ + + + + + TheoraInfo + + + + + +
    +

    Io Reference

    +


    +


    +Video +  /   +Theora +  /   +TheoraInfo +


    +


    + + + + + + + + + + + + + +
    A wrapper around the libtheora th_info object. +
     
     
     
    + +
    +

    + +frameHeight + +

    +

    +The encoded frame height. +
    + +frameRate + +

    +

    +The framerate of the video. +
    + +frameWidth + +

    +

    +The encoded frame width. +
    +
    +




    + + diff --git a/io-master/docs/reference/Video/Theora/TheoraSetupInfo/index.html b/io-master/docs/reference/Video/Theora/TheoraSetupInfo/index.html new file mode 100755 index 0000000..8958b85 --- /dev/null +++ b/io-master/docs/reference/Video/Theora/TheoraSetupInfo/index.html @@ -0,0 +1,42 @@ + + + + + TheoraSetupInfo + + + + + +
    +

    Io Reference

    +


    +


    +Video +  /   +Theora +  /   +TheoraSetupInfo +


    +


    + + + + + + + + + + + + + +
    A wrapper around the libtheora th_setup_info object. +
     
     
     
    + +

    +
    +




    + + diff --git a/io-master/docs/reference/Video/Theora/index.html b/io-master/docs/reference/Video/Theora/index.html new file mode 100755 index 0000000..966e4fb --- /dev/null +++ b/io-master/docs/reference/Video/Theora/index.html @@ -0,0 +1,53 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Video/Vorbis/VorbisBlock/index.html b/io-master/docs/reference/Video/Vorbis/VorbisBlock/index.html new file mode 100755 index 0000000..32682bb --- /dev/null +++ b/io-master/docs/reference/Video/Vorbis/VorbisBlock/index.html @@ -0,0 +1,59 @@ + + + + + VorbisBlock + + + + + +
    +

    Io Reference

    +


    +


    +Video +  /   +Vorbis +  /   +VorbisBlock +


    +


    + + + + + + + + + + + + + +
    A wrapper around the libvorbis vorbis_comment object. +
     
     
     
    + +
    +

    + +setup + +

    +

    +Initialize for decoding using the information obtained + from reading the Vorbis headers. +
    + +synthesis(packet) + +

    +

    +Decode the vorbis data from the packet, storing it in the + block. +
    +
    +




    + + diff --git a/io-master/docs/reference/Video/Vorbis/VorbisComment/index.html b/io-master/docs/reference/Video/Vorbis/VorbisComment/index.html new file mode 100755 index 0000000..ae8a6c0 --- /dev/null +++ b/io-master/docs/reference/Video/Vorbis/VorbisComment/index.html @@ -0,0 +1,50 @@ + + + + + VorbisComment + + + + + +
    +

    Io Reference

    +


    +


    +Video +  /   +Vorbis +  /   +VorbisComment +


    +


    + + + + + + + + + + + + + +
    A wrapper around the libvorbis vorbis_comment object. +
     
     
     
    + +
    +

    + +count + +

    +

    +Returns number of comments. +
    +
    +




    + + diff --git a/io-master/docs/reference/Video/Vorbis/VorbisDspState/index.html b/io-master/docs/reference/Video/Vorbis/VorbisDspState/index.html new file mode 100755 index 0000000..f536159 --- /dev/null +++ b/io-master/docs/reference/Video/Vorbis/VorbisDspState/index.html @@ -0,0 +1,72 @@ + + + + + VorbisDspState + + + + + +
    +

    Io Reference

    +


    +


    +Video +  /   +Vorbis +  /   +VorbisDspState +


    +


    + + + + + + + + + + + + + +
    A wrapper around the libvorbis vorbis_comment object. +
     
     
     
    + +
    +

    + +blockin(block) + +

    +

    +Decodes that data from the block, storing it in the dsp state. +
    + +headerin(info, comment, packet) + +

    +

    +Try to decode a vorbis header from the packet. +
    + +pcmout + +

    +

    +Returns array of audio data +
    + +setup(info) + +

    +

    +Initialize for decoding using the information obtained + from reading the Vorbis headers. +
    +
    +




    + + diff --git a/io-master/docs/reference/Video/Vorbis/VorbisInfo/index.html b/io-master/docs/reference/Video/Vorbis/VorbisInfo/index.html new file mode 100755 index 0000000..437f837 --- /dev/null +++ b/io-master/docs/reference/Video/Vorbis/VorbisInfo/index.html @@ -0,0 +1,64 @@ + + + + + VorbisInfo + + + + + +
    +

    Io Reference

    +


    +


    +Video +  /   +Vorbis +  /   +VorbisInfo +


    +


    + + + + + + + + + + + + + +
    A wrapper around the libvorbis vorbis_info object. +
     
     
     
    + +
    +

    + +channels + +

    +

    +Returns the number of channels in the vorbis data. +
    + +rate + +

    +

    +Returns the sample rate of the vorbis data. +
    + +version + +

    +

    +Returns the vorbis version required for this data. +
    +
    +




    + + diff --git a/io-master/docs/reference/Video/Vorbis/index.html b/io-master/docs/reference/Video/Vorbis/index.html new file mode 100755 index 0000000..c386a6f --- /dev/null +++ b/io-master/docs/reference/Video/Vorbis/index.html @@ -0,0 +1,53 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/Video/index.html b/io-master/docs/reference/Video/index.html new file mode 100755 index 0000000..5b636c7 --- /dev/null +++ b/io-master/docs/reference/Video/index.html @@ -0,0 +1,46 @@ + + + + + + Io Reference + + + + + +
    +

    Io Reference

    +




    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + diff --git a/io-master/docs/reference/docs.json b/io-master/docs/reference/docs.json new file mode 100755 index 0000000..6735873 --- /dev/null +++ b/io-master/docs/reference/docs.json @@ -0,0 +1 @@ +{"Graphics":{"Cairo":{"CairoFontOptions":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoGlyph":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoLinearGradient":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoGradient":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoContext":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoScaledFont":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoFontExtents":{"copyright":"Trevor Fancher, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoExtents":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoRectangle":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoSurface":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoFontFace":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoMatrix":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoPathElement":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoPath":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoSolidPattern":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoPattern":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"Cairo":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","description":"Cairo is a 2D graphics library. http:\/\/cairographics.org\/\n","slots":{}},"CairoTextExtents":{"copyright":"Trevor Fancher, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoImageSurface":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoRadialGradient":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}},"CairoSurfacePattern":{"copyright":"Daniel Rosengren, 2007\n","license":"BSD revised\n","category":"Graphics\n","module":"Cairo","slots":{}}},"GLFW":{"GLFW":{"copyright":"Joel de Vahl, 2006\n","license":"BSD revised\n","category":"Graphics\n","module":"GLFW","slots":{}}},"Image":{"Image":{"copyright":"Steve Dekorte, 2004\n","license":"BSD revised\n","category":"Graphics\n","module":"Image","description":"The Image object can read and draw images and provide the image \ndata as a buffer. Example use:\n
    \t\nimage = Image clone open(\"curly.png\")\nimage draw\nimage scaleTo(image width \/ 2, image height \/ 2)\nimage save(\"curly.tiff\")\n<\/pre>\t\nWhen loading an attempt will be made to convert the image into whichever \nof the following formats it is closest to: L8, LA8, RGB8, RGBA8.\n

    \nCurrently supported formats include PNG(which supports alpha), JPG and TIFF.\n","slots":{"filterKirsch(a)":"\tReturns new image as a result of applying Kirsch filter.\n\tThe argument denotes direction: 0, 1, 2, ... -> 0, pi \/ 4, pi \/ 2, ...\n","encodingQuality":"\tReturns the encodingQuality setting.\n","height":"\tReturns the image hieght.\n","filterUniformAverage(filterSizeX, filterSizeY)":"\tReturns new image as a result of applying filter. Implements low pass filtering.\n","makeGrayscale":"\tConverts color model to Luminance or Luminance-Alpha 8bit (grayscale). Returns self.\n","width":"\tReturns the image width.\n","averageColor":"\tReturns the average RGB color of all pixels in the image.\n","filterSobel(a)":"\tReturns new image as a result of applying Sobel filter.\n\tThe argument denotes direction: 0, 1, 2, ... -> 0, pi \/ 4, pi \/ 2, ...\n","setEncodingQuality(aNumber)":"\tSets the image encoding quality (range is 0.0 - 1.0, 1.0 with being the highest).\n","componentPlain(component)":"\tRemoves other components except specified from the image.\n\tReturns self.\n","crop(x, y, width, height)":"\tCrops the image to the specified values. Returns self.\n\tRaises an exception on error.\n","error":"\tReturns a String containing the current error or nil if there is no error.\n","filterGauss(sigma)":"\tReturns new image as a result of applying filter. Implements Gauss smoothing filtering with parameter sigma.\n","bounds(cutoff)":"\tReturns an object continaing the bounds of the image. Cutoff is max bound color value for any color component.\n\tIf it is negative, it is the min bound color value.\n","linearContrast":"\tPerforms contrast linarization. Per-pixel per-channel transformation that extends intensity to its full range.\n\tReturns self.\n","componentCount":"\tReturns the number of color components in the receiver as a Number.\n","save(optionalPathString)":"\tSets the path to optionalPathString if provided and saves the image \n\tin the format specified by the path extension. Returns self on success, nil on failure.\n","removeAlpha":"\tRemoves the alpha component if the image contains one. Returns self.\n","isLA8":"\tReturns true if the receiver is in LA8 (8bit Luminance-Alpha) format, false otherwise.\n","flipX":"\tFlips the image on the horizonal plane (left\/right mirror). Returns self.\n","isRGBA8":"\tReturns true if the receiver is in RGBA8 format, false otherwise.\n","histogram":"\tReturns array with histogram values interleaved by channels.\n","decodingHeightHint":"\tReturns the decoding height hint.\n","equalizeHistogram(mode)":"\tPerforms histogram equalization. Mode denotes quality factor and processing speed. Mode should be in range [0..3].\n\tReturns self.\n","makeL8":"\tConverts color model to Luminance 8bit (grayscale). Returns self.\n","makeRGBA8":"\tConverts color model to RGBA 8bit. Returns self.\n","resizedTo(width, height)":"\tReturns a new image of the receiver resized to the given width and height.\n\tRaises an exception on error.\n","filterLinear(filterSizeX, filterSizeY, filter)":"\tReturns new image as a result of applying filter.\n","path":"\tReturns the image path.\n","filterNonlinearGradients":"\tReturns new image as a result of applying filter. Calculates abs(f'x) + abs(f'y).\n","flipY":"\tFlips the image on the vertical plane (top\/bottom mirror). Returns self.\n","filterWeightedMedian(filterSizeX, filterSizeY, filter)":"\tReturns new image as a result of applying filter.\n","data":"\tReturns a Buffer primitive containing the image data (loading it first if needed). \n\tManipulating this data will affect what is drawn when the receiver's draw method is called.\n","baselineHeight":"\tReturns the pixel height (relative to the bottom of the image) which first contains a non-white pixel or -1 if\n\tno baseline is found.\n","filterMin(filterSizeX, filterSizeY)":"\tReturns new image as a result of applying filter.\n","decodingWidthHint":"\tReturns the decoding width hint.\n","bitPlain(component, bit)":"\tReplaces contents with black-and-white image where white appears if and only if specified component contained 1 on the specified bit plain.\n\tReturns self.\n","thresholdByGradient":"\tPerforms thresholding. Threshold value is finded using Otsu's method.\n\tReturns self.\n","isRGB8":"\tReturns true if the receiver is in RGB8 format, false otherwise.\n","setDataWidthHeightComponentCount(aSequence, width, height, componentCount)":"\tSets the image data and its parameters. Returns self.\n","isL8":"\tReturns true if the receiver is in L8 (8bit Luminance) format, false otherwise.\n","setDecodingWidthHint(width)":"\tSets the decoding width hint. Returns self.\n","filterMax(filterSizeX, filterSizeY)":"\tReturns new image as a result of applying filter.\n","setPath(aString)":"\tSets the image path. Returns self.\n","addAlpha":"\tAdds an opaque alpha component if the image is in RGB format and does not already contain one. Returns self.\n","setDecodingHeightHint(width)":"\tSets the decoding height hint. Returns self.\n","filterMedian(filterSizeX, filterSizeY)":"\tReturns new image as a result of applying filter.\n","filterUnsharpMask(a)":"\tReturns new image as a result of applying filter. Implements unsharp mask filtering. \n\tThe result is sharpened image.\n\tThe parameter value may by any but it makes sense if it is > 0.\n","open(optionalPathString)":"\tSets the path to optionalPathString if provided and opens the image file. \n\tReturns self on success, Nil on failure.\n","resizedTo(newWidth, newHeight)":" Scales the image up to newWidth x newHeight. Returns the newly scaled image.\n"}}},"Font":{"Font":{"copyright":"Steve Dekorte, 2004\n","license":"BSD revised\n","category":"Graphics\n","module":"Font","description":"The Font object can be used to load and render TypeTrype fonts. Example use;\n

    \t\n\/\/ within a GLUT display callback...\n\ntimesFont = Font clone open(\\\"times.ttf\\\")\nif (timesFont error, write(\\\"Error loading font: \\\", timesFont error, \\\"\\n\\\"); return)\ntimesFont setPointSize(16)\nglColor(0,0,0,1)\ntimesFont draw(\\\"This is a test.\\\")\n<\/pre>\t\n\nRendering fonts using OpenGL textures<\/b>\n

    \nSmaller fonts (those having a point size around 30 or smaller, depending on the font) will automatically be cached in and rendered from a texture. This technique is very fast and should support rendering speeds as fast (or faster than) those of typical desktop font rendering systems. Larger font sizes(due to texture memory constraints) will be rendered to a pixelmap when displayed. Thanks to Mike Austin for implementing the font texturing system.\n","slots":{"widthOfString(aString)":"\tReturns a Number with the width that aString would render \n\tto with the receiver's current settings.\n","stringIndexAtWidth(aString, startIndex, width)":"\tReturns the max index of the character in String (starting at startIndex) \n\tthat fits within width.\n","error":"\tReturns the current error string or nil if there is no error.\n","pixelSize":"\tReturns the font's pixelSize.\n","setPixelSize(aNumber)":"\tSets the size of the font in pixels. Returns self.\n","path":"\tReturns the Font path.\n","drawString(aString, optionalStartIndex, optionalEndIndex)":"\tDraws aString using the optional start and end indexes, if supplied. Returns self.\n

    \nNote; Fonts are drawn as RGBA pixel maps. These blending options are recommended:\n

    \t\nglEnable(GL_BLEND)\nglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)\n<\/pre>\n","setPath(aString)":"\tSets the Font path. Returns self.\n","isTextured":"\tReturns true if the font is being cached in and rendered from a texture, false otherwise.\n","pixelHeight":"\tReturns the height of the font measured in pixels.\n","open(optionalPath)":"\tOpens the font. Sets path using optionalPath if supplied. Returns self.\n","widthOfCharacter(aNumber)":"\tReturns the width of the character specified by aNumber in the receiver's font.\n"}}},"Box":{"Box":{"copyright":"Steve Dekorte 2002\n","license":"BSD revised\n","category":"Graphics\n","module":"OpenGL","description":"A primitive for fast operations on rectangles.\n","slots":{"containsPoint(aPoint)":"\tReturns true if aPoint is within the receiver's bounds, false otherwise.\n","setSize(aPoint)":"\tCopies the values in aPoint to the box's size point.\n","print":"\tPrints a string representation of the receiver to the standard output.\n","height":"\tSame as; size y\n","width":"\tSame as; size x\n","origin":"\tReturns the point object for the origin of the box.\n","set(origin, size)":"\tCopies the values in origin and size to set the box's origin and size.\n","setOrigin(aPoint)":"\tCopies the values in aPoint to the box's origin point.\n","intersectsBox(aBox)":"\tReturns true if aBox is within the receiver's bounds, false otherwise.\n","Union(aBox)":"\tReturns a new box containing the 2d union of the receiver and aBox.\n","copy(aBox)":"\tCopies the values of aBox to the receiver.\n","size":"\tReturns the point object for the size of the box.\n","depth":"\tSame as; size z\n"}}},"OpenGL":{"GLApp":{"category":"Graphics\n","module":"OpenGL","slots":{}},"GLUT":{"copyright":"Steve Dekorte 2002\n","license":"BSD revised\n","category":"Graphics\n","module":"OpenGL","slots":{}},"Box":{"copyright":"Steve Dekorte 2002\n","license":"BSD revised\n","category":"Graphics\n","module":"OpenGL","description":"A primitive for fast operations on rectangles.\n","slots":{"containsPoint(aPoint)":"\tReturns true if aPoint is within the receiver's bounds, false otherwise.\n","setSize(aPoint)":"\tCopies the values in aPoint to the box's size point.\n","print":"\tPrints a string representation of the receiver to the standard output.\n","height":"\tSame as; size y\n","width":"\tSame as; size x\n","origin":"\tReturns the point object for the origin of the box.\n","set(origin, size)":"\tCopies the values in origin and size to set the box's origin and size.\n","setOrigin(aPoint)":"\tCopies the values in aPoint to the box's origin point.\n","intersectsBox(aBox)":"\tReturns true if aBox is within the receiver's bounds, false otherwise.\n","Union(aBox)":"\tReturns a new box containing the 2d union of the receiver and aBox.\n","copy(aBox)":"\tCopies the values of aBox to the receiver.\n","size":"\tReturns the point object for the size of the box.\n","depth":"\tSame as; size z\n"}},"OpenGL":{"copyright":"Steve Dekorte 2002\n","license":"BSD revised\n","category":"Graphics\n","module":"OpenGL","slots":{}},"GLScissor":{"copyright":"Steve Dekorte 2002\n","license":"BSD revised\n","category":"Graphics\n","module":"OpenGL","slots":{}},"GLU":{"copyright":"Steve Dekorte 2002\n","license":"BSD revised\n","category":"Graphics\n","module":"OpenGL","slots":{"gluScaleImage(formatIn, widthIn, heightIn, typeIn, dataSeqIn, widthOut, heightOut, typeOut, dataSeqOut)":"\tScales the image data in dataSeqIn and outputs the result to dataSeqOut.\n\tReturns error code as a Number.\n"}},"GLUQuadric":{"copyright":"Steve Dekorte 2002\n","license":"BSD revised\n","category":"Graphics\n","module":"OpenGL","slots":{}}}},"Filesystem":{"AsyncRequest":{"AsyncRequest":{"copyright":"Steve Dekorte, 2004\n","license":"BSD revised\n","category":"Filesystem\n","module":"AsyncRequest","description":"Used for doing asynchronous file i\/o. When this addon is loaded, it will override\nthe File proto's readToBufferLength, readBufferOfLength and write methods to \nautomatically use AsyncRequests. \n

    \nNote: This addon is only needed for async file requests - all socket ops are already\nasynchronous in Io.\n","slots":{"isDone":"\tReturns true if the request is done, false otherwise.\n","setDescriptor(aDescriptorNumber)":"\tSets the descriptor for the receiver. Returns self.\n","descriptor":"\tReturns the descriptor for the request.\n","numberOfBytes":"\tReturns the number of bytes associated with the request.\n","copyBufferto(aSeq)":"\tCopies the request buffer's data to aSeq.\n\tReturns nil on error or self otherwise.\n","read(aSeq, numberOfBytes)":"\tSubmits an async read request. Returns nil on error, self otherwise.\n","error":"\tReturns sequence containing the last error or nil otherwise.\n","cancel":"\tCancels the request. Returns nil on error or self otherwise.\n","position":"\tReturns a Number for the position of the descriptor.\n","write(fileOffset, aSeq, bufferOffset, numberOfBytesToWrite)":"\tSubmits an async write request. Returns nil on error, self otherwise.\n","sync":"\tWaits for the request to complete. Returns nil on error or self otherwise.\n"}}}},"Databases":{"TagDB":{"TagDB":{"copyright":"Steve Dekorte, 2007\n","license":"BSD revised\n","category":"Databases\n","module":"TagDB","description":"Binding for tagdb<\/a> - a tagging database usefull for flickr-like tag searches.\n

    \nExample use:\n

    \ntdb := TagDB clone\n\ntdb setPath(\"test\")\ntdb open\n\nwriteln(\"size = \", tdb size)\ntdb atKeyPutTags(\"f430 for sale\", list(\"red\", \"ferrari\"))\ntdb atKeyPutTags(\"lotus esprit\", list(\"lotus\", \"esprit\"))\nwriteln(\"size = \", tdb size)\nkeys := tdb keysForTags(list(\"lotus\"))\nwriteln(\"keys = \", tdb symbolForId(keys at(0)))\ntdb close\ntdb delete\n<\/pre>\n","slots":{"allUniqueTagIds":"\tReturns a list of all unique tag ids.\n","uniqueTagNames":"Returns a list of all unique tag names.\n","keysForTags(aTagNameList)":"\tReturns list of keys whose tags contain all of the tags in aTagNameList.\n","close":"\tClose the tagdb. Returns self.\n","symbolForId(aNumber)":"\tReturns the TagDB symbol for aNumber.\n","atKeyPutTags(key, tagNameList)":"\tSets the tags for key to those in tagNameList. Returns self.\n","idForSymbol(aSeq)":"\tReturns the TagDB id Number for the symbol specified by aSeq.\n","setPath(aPath)":"\tSets the path to the tag database. Returns self.\n","removeKey(aKey)":"\tRemoves the specified key if it is present. Returns self.\n","tagsAtKey(key)":"\tReturns the tags for the specified key.\n","open":"\tOpen the tagdb. Returns self.\n","delete":"\tDeletes all keys in the database.\n","size":"\tReturns number of keys in the database.\n","keyAtIndex(indexNumber)":"\tReturns the key at the specified index of nil if the index is out of range.\n"}}},"DBI":{"DBI":{"copyright":"Jeremy Cowgar, 2006\n","license":"BSD revised\n","category":"Databases\n","module":"DBI","description":"An object for wrapping libdbi to allow Io access to\na multitude of database systems transparently.\n","slots":{"version":"Return string version of libdbi being used.\n","drivers":"\tGet a list of drivers and its associated information:\n\n\t
      \n\t\t
    1. name<\/li>\n\t\t
    2. description<\/li>\n\t\t
    3. filename<\/li>\n\t\t
    4. version<\/li>\n\t\t
    5. date compiled<\/li>\n\t\t
    6. maintainer<\/li>\n\t\t
    7. url<\/li>\n\t<\/ol>\n","init":"Initialize the DBI environment with the default driver path.\n","initWithDriversPath":"\tInitialize the DBI environment with the specified libdbi driver path.\n","with(driverName)":" Get a new connection with the given driver.\n"}},"DBIConn":{"copyright":"Jeremy Cowgar 2006\n","license":"BSD revised\n","category":"Databases\n","module":"DBI","description":"An object that represents a DBI Connection.\n","slots":{"option(key)":" Retrieve an option value for the connection.\n","optionClear(key)":" Clear a specific option associated with the connection.\n","close":"Close the connection to the database.\n","execute(sql_query)":"\tPerform a database query that expects no results. \n\tReturns the number of rows affected.\n","ping":"\tPing the database to see if it's alive. \n\tWill return true if it is, otherwise false.\n","sequenceNext([name])":"\tReturn the next sequence that will be used during an INSERT query.\n","queryOne([object], sql)":"\tPerform a query and return the first\n\tresult.\n\n\tIf [object] is supplied, the object is populated with the contents of the\n\tresult, the result is marked done and the object is returned.\n","query(sql_query)":"\tPerform a database query returning a DBIResult object.\n","sequenceLast([name])":"\tReturn the last inserted sequence value.\n","driver":"Return database driver name.\n","optionPut(key,value)":" Add an option key, value pair to the connection.\n","optionsClear":"Clear all options associated with the connection\n","quote(value)":"\tQuote a string value according to the database server's specifications.\n","options":"Retrieve an option list of the connection.\n","connect":"Connect to the database server.\n"}},"DBIRecord":{"copyrigth":"Jeremy Cowgar, 2006\n","license":"BSD revised\n","category":"Databases\n","module":"DBI","description":"A DBI Record. When utilizing `foreach' or `populate' methods\nof a DBIResult object, you can pass an optional Object cloned from DBIRecord.\nThis object will be populated with the row contents making it possible to\nwrite objects that represent your SQL results. A simple example would be:\n\n
      \nPerson := DBIRecord clone do (fullName := method(firstName..\" \"..lastName))\nq := conn query(\"SELECT id, firstName, lastName FROM people\")\nq foreach(Person, p, writeln(\"Name = \", p fullName))\n<\/pre>\n\nAs you can see, fullName was not in the SQL query, however, a dynamic method\nin your Person class.\n\nDBIRecord in and of itself provides no real functionality. It simply acts\nas an Object and stores the values from the SQL query into a Map. You can\naccess the field information:\n\n
      \no := r populate(Person)\no firstName            \/\/ would retrieve the firstName value of the SQL query\no setFirstName(\"John\") \/\/ would update the object's firstName value to be John\n<\/pre>\n\nDo not confuse the above example as updating the actual database. The call\nto setFirstName only<\/i> updates the objects representation of firstName.\n","slots":{"with(aMap)":" Returns a new DBIRecord instance for the given value map.\n","forward":"Private method that implements getting and setting values.\n"}},"DBIResult":{"copyright":"Jeremy Cowgar, 2006\n","license":"BSD revised\n","category":"Databases\n","module":"DBI","description":"A DBI Result created by a call to DBIConn query.\n","slots":{"at(index_or_name)":"\t Returns the contents of the given field. \n\t The parameter can be a field index or a field name.\n","last":"Move the cursor to the last record.\n","fields":"Returns a list of field names in the result.\n","next":"Move the cursor to the next record.\n","foreach([Object], value, message)":"Loops over the records in the result starting at either the first result \n(if the cursor has never been moved) or its current location if moved. i.e.\n\n
      \nr := conn query(\"SELECT * FROM people\")\nr foreach(r, r at(1))\n<\/pre>\n\nThe above would start at the first row, however, you can move around in the\nresult set and then foreach would pickup where you left off, for instance, say\nyou wanted to skip the first three rows:\n\n
      \nr := conn query(\"SELECT * FROM people\")\nr seek(4)\nr foreach(r, r at (1))\n<\/pre>\n\nThe above would start at the record #4, not at the beginning.\n\nThe optional Object parameter would cause a decendent of DBIRecord to be\npopulate instead of the index being set. This allows for advanced\nfunctionality. Please see `DBIRecord' for further information and an example.\n","position":"Return the current row's position (or index).\n","seek(row_number)":" Move the cursor to the nth record.\n","first":"Move the cursor to the first record.\n","populate(object)":"\tPopulates a decendent of DBIRecord with the current record's contents. \n\tSee `DBIRecord' for further explanation and an example.\n","previous":"Move the cursor to the previous record.\n","size":"Returns the number of rows available.\n","done":"\tClose and free the result. This must<\/b> be called on\neach result. Failure to do so will cause memory leaks and open queries with\nthe database server.\n"}}},"Obsidian":{"PObject":{"category":"Databases\n","module":"Obsidian","slots":{}},"Obsidian":{"credits":"In collaboration with Rich Collins\n","copyright":"Steve Dekorte 2008\n","license":"BSD revised\n","category":"Databases\n","module":"Obsidian","description":"A double key\/value database with cursors on first key. Basis for PDB.\n","slots":{"delete":"Removes the persistence database file set via setPath.\n","close":"Closes the persistence database file.\n","onAt":"Return the value associated with slotName of stored object whose ppid is objId.\n"}},"ObsidianClient":{"category":"Databases\n","module":"Obsidian","slots":{}},"ObsidianServer":{"copyright":"Steve Dekorte 2008\n","license":"BSD revised\n","category":"Databases\n","module":"Obsidian","description":"\nA network interface for Obsidian.\n\n

      Starting a Server<\/h4>\n\n
      \noServer := ObsidianServer clone\noServer localObject setName(\"foo\") open\noServer start\n<\/pre>\n\n

      Example Client Code<\/h4>\n\n
      \nclient := MDOConnection clone setHost(\"127.0.0.1\") setPort(8000) connect\nclient onAtPut(\"1\", \"aKey\", \"aSlot\")\nclient onAtPut(\"1\", \"cKey\", \"cSlot\")\nclient onAtPut(\"1\", \"bKey\", \"bSlot\")\nclient first(\"1\", 5) println\na := client onAt(\"1\", \"aKey\")\nwriteln(\"a = \", a)\nb := client onAt(\"1\", \"bKey\")\nwriteln(\"b = \", b)\nclient close\n<\/pre>\n\nThe messages accepted by the Obsidian server include:\n\n
      \nonAtPut(id, key, value)\nonAt(id, key)\nonRemoveAt(id, key)\nonFirst(id, count)\nonLast(id, count)\nonAfter(id, key, count)\nonBefore(id, key, count)\n<\/pre>\n","slots":{}},"PMap":{"category":"Databases\n","module":"Obsidian","description":"PMap stores persistent data in a Map-like fashion and lazily loads\navailable slots from the PDB backing store. Values stored or loaded are cached\ninto local object slots.\n","slots":{"removeSlot":"Marks a value for removal.\n","objectsForKeys":"Returns a list of values for each key in the list given. Keys beginning with an\nunderscore (\"_\") are returned verbatim.\n","at(slotName)":"Tries to obtain a value for slot slotName from a local slot of that name,\nor tries to load it from the PDB if the local slot does not exist. When all else fails, returns nil.\n

      \nIf slotName begins with an underscore (\"_\"), returns the id of the slot from PDB instead of the value.\n","init":"Initialize a new PMap and automatically add it as a persistent object to PDB.\n","persistSlots":"Cleans up dirty slots by committing them to PDB.\n","removeAt":"Marks a value for removal.\n","shouldPersistByDefault":"PDB boolean flag indicating whether this object should be considered for persistence\nwhen persistence has not been specifically requested by calling ppid() or PDB addObjectToPersist.\nAlways true by default for PMap.\n","atPut(slotName, value)":" Records value in the slot named slotName.\n","slotCount":"Returns the number of slots committed to PDB.\n","persist":"Commits the PMap's slots to PDB.\n","createIfAbsent":"Creates a slot with a new PMap clone if not already present.\n"}},"PDB":{"credits":"Steve Dekorte & Rich Collins\n","module":"Obsidian","slots":{"objectAtPpid":"Return the object associated in the database with a ppid.\n","sync":"Immediately persist data for all objects marked dirty by Collector whose \nshouldPersistByDefault is true, or that have specifically requested to be\npersisted since the last sync via addObjectToPersist.\n","addObjectToPersist":"Register an object to be persisted in the next PDB sync.\n","close":"Close the persistence database.\n","root":"Return the root PMap object used to store and retrieve persistent objects and their slots.\n","show":"Print to standard output a listing of all objects and IDs stored in PDB.\n","collectGarbage":"Remove from PDB all objects not accessible via the root object.\n","reopen":"Sync, close and reopen the PDB store.\n","newId":"Generate a new PDB id number for use as a persistent object's ppid.\n"},"copyright":"Steve Dekorte 2008\n","license":"BSD revised\n","category":"Databases\n","proto":"Obsidian\n","description":"An arbitrary graph database with support for on-disk garbage collection. Example use:\n\n

      Setup<\/h4>\n\n
      \nPDB open\nPDB root atPut(\"users\", PMap clone)\nPDB sync\nPDB close\n<\/pre>\n\nPMap is a Map\/Dictionary whose keys are lazily loaded from the database. \nPDB root is the root PMap in the database and the root object used for PDB's garbage collector. \nPDB sync needs to be called to write any changes to the database.\n\n

      Defining a Persistent Object<\/h4>\n\n
      \nUser := Object clone pSlots(name, email)\n<\/pre>\n\nThe pSlots(), declares which slots on the object should be persisted. \nThe List, Date, Sequence and Number primitives already know how to persist themselves.\n\n

      Inserting a Persistent Object<\/h4>\n\n
      \nPDB open \nuser := User clone setName(\"steve\") setEmail(\"steve@foo.com\")\nPDB root users atPut(\"steve\", user)\nPDB sync\nPDB close\n<\/pre>\n\n

      Accessing a Persistent Object<\/h4>\n\n
      \nuser := PDB root users at(\"steve\")\nwriteln(\"user name = \", user name, \" email = \", user email)\n<\/pre>\n\n

      Updating a Persistent Object<\/h4>\n\n
      \nuser setEmail(\"steve@newDomain.com\")\nPDB sync \n<\/pre>\n\nPDB sync will scan all persistent objects in the vm and save any with changes to their persistent slots. \nIf the object was already in the database, only its updated slots will be written.\n\n

      Removing an entry in a PMap<\/h4>\n\n
      \nPDB root users removeAt(\"steve\")\n<\/pre>\n\n

      Removing a persistent object<\/h4>\n\nThis is never done explicitly, instead calling:\n\n
      \nPDB collectGarbage\n<\/pre>\n\nWill remove all objects unreachable by the reference graph from the root PMap.\n\n

      \nNotes: Currently, PDB is a singleton.\n"}},"SqlDatabase":{"SqlDatabase":{"category":"Databases\n","module":"SqlDatabase","slots":{}}},"Memcached":{"Memcached":{"credits":"Aleksey Yeschenko, 2009\n","license":"BSD revised\n","Aleksey":"Yeschenko, 2009\n","category":"Databases\n","module":"Memcached","description":"memcached<\/a> is a high-performance,\ndistributed memory object caching system, generic in nature,\nbut intended for use in speeding up dynamic web applications\nby alleviating database load. Memcached is an Io client library for memcached,\nbased on C libmemcached<\/a>.\n","slots":{"flushAll([expiration])":"Asks memcached to invalidate all existing items immediately (by default)\nor after the expiration specified.\nAlways returns true.\n","set(key, value[, expiration])":"Asks memcached to store the value identified by the key.\nReturns true on success, otherwise raises an exception.\n","atIfAbsentPut(key, value[, expiration])":"\tIf a value is present at the specified key, its value is returned.\n\tOtherwise, inserts the new value and returns it.\n","delete(key[, time])":"Asks memcached to delete an item with the given key.\ntime is the amount of time in seconds (or Unix time until which)\nthe client wishes the server to refuse \"add\" and \"replace\" commands\nwith this key.\nReturns true on success, false if there is no item with the given key.\nOtherwise raises an exception.\n","get(key)":"Asks memcached to retrieve data corresponding to the key.\nRaises \"NOT FOUND\" if the data is not there.\n","atPut(key, value[, expiration])":"\tAsks memcached to store the value identified by the key.\n\tSame as Memcached set, but returns self.\n","removeAt(key)":"\tAsks memcached to remove value with a given key. Returns self.\n","decr([offset])":"Asks memcached to decrement data for some item in place. The data for the item is\ntreated as decimal representation of a 64-bit unsigned integer. If the\ncurrent data value does not conform to such a representation, the\ncommands behave as if the value were 0.\nDefault offset is 1.\nReturns the new value.\n","prepend(key, value)":"Asks memcached to add this value to an existing key before existing value.\nReturns true on success, otherwise raises an exception.\nvalue should be a Sequence.\nSupported by memcached 1.2.4+\n","incr([offset])":"Asks memcached to increment data for some item in place. The data for the item is\ntreated as decimal representation of a 64-bit unsigned integer. If the\ncurrent data value does not conform to such a representation, the\ncommands behave as if the value were 0.\nDefault offset is 1.\nReturns the new value.\n","getMulti(keys)":"Asks memcached to retrieve data corresponding to the list of keys.\nReturns a Map with the results.\nIf some of the keys appearing in a retrieval request are not sent back\nby the server in the item list this means that the server does not\nhold items with such keys\n","replace(key, value[, expiration])":"Asks memcached to store the value identified by the key,\nbut only if the server *does* already hold data for this key.\nReturns true on success, false if there is already data for this key.\nOtherwise raises an exception.\n","at(key, optionalDefaultValue)":"\tAsks memcached to retrieve data corresponding to the key.\n\tReturns nil if the data is not there (or if the data *is* nil).\n","append(key, value)":"Asks memcached to add this value to an existing key after existing value.\nReturns true on success, otherwise raises an exception.\nvalue should be a Sequence.\nSupported by memcached 1.2.4+\n","stats":"Returns a Map with servers' statistics. Keys are server addresses,\nvalues are maps with actual stats.\n","with(servers)":"\tReturns a new instance of Memcached.\n\tAccepts a Sequence or a List of server addresses.\n","add(key, value[, expiration])":"Asks memcached to store the value identified by the key,\nbut only if the server *doesn't* already hold data for this key.\nReturns true on success, false in case of a collision.\nOtherwise raises an exception.\n","addServer(address)":"Adds a memcached server. address is a \"host:port\" string, e.g., \"127.0.0.1:11211\"\nReturns self.\n"}}},"QDBM":{"QDBM":{"copyright":"Steve Dekorte 2002\n","license":"BSD revised\n","category":"Databases\n","module":"QDBM","description":"An ordered key\/value database that supports transactions and arbitrary kay and value sizes.\n","slots":{"close":"\tCloses the database.\n","cursorKey":"\tReturns current cursor key or nil.\n","cursorRemove":"\tRemoves the current cursor postion. Returns self.\n","open(path)":"\tOpens the database.\n","abort":"\tAbort transaction. Returns self\n","commit":"\tCommit transaction. Returns self\n","sync":"\tSyncs the database. Returns self\n","cursorJumpBackward(key)":"\tMove cursor to previous record around key. Returns self\n","cursorFirst":"\tMove cursor to first record. Returns self\n","cursorPut(value)":"\tSets the value at the current cursor postion. Returns self.\n","size":"\tReturns number of records in database. Returns self\n","sizeAt(keySymbol)":"\tReturns the size of the value at the given key or nil if there is no such key.\n","cursorJumpForward(key)":"\tMove cursor to next record around key. Returns self\n","optimize":"\tOptimizes the database. Returns self\n","cursorLast":"\tMove cursor to last record. Returns self\n","atPut(keySymbol, valueSequence)":"\tSets the value of valueSequence with the key keySymbol. Returns self.\n","name":"\tReturns the name of the database.\n","cursorValue":"\tReturns current cursor value or nil.\n","cursorPrevious":"\tMove cursor to previous record. Returns true if there is another key, \n\tor false if there is no previous record.\n","atRemove(keySymbol)":"\tRemoves the specified key. Returns self\n","begin":"\tBegin transaction. Returns self\n","cursorNext":"\tMove cursor to next record. Returns true if there is another key, \n\tor false if there is no next record.\n","at(keySymbol)":"\tReturns a Sequence for the value at the given key or nil if there is no such key.\n"}}},"SQLite":{"SQLite":{"copyright":"\tSteve Dekorte, 2004\n","license":"\tBSD revised\n","category":"\tDatabases\n","module":"SQLite","description":"SQLite provides a embedded simple and fast (2x faster than PostgreSQL or MySQL) SQL database. See http:\/\/www.hwaci.com\/sw\/sqlite\/ for details. It's SQL command set is described at http:\/\/www.hwaci.com\/sw\/sqlite\/lang.html. SQLite was written by Dr. Richard Hipp who offers consulting services for custom modifications and support of SQLite. Example:\n

      \t\ndb := SQLite clone\ndb setPath(\"myDatabase.sqlite\")\ndb open\ndb exec(\"CREATE TABLE Dbm (key, value)\")\ndb exec(\"CREATE INDEX DbmIndex ON Dbm (key)\")\ndb exec(\"INSERT INTO Dbm ('key', 'value') VALUES ('a', '123')\")\ndb exec(\"INSERT INTO Dbm ('key', 'value') VALUES ('a', 'efg')\")\nrows := db exec(\"SELECT key, value FROM Dbm WHERE key='a'\")\ndb exec(\"DELETE FROM Dbm WHERE key='a'\")\nrows := db exec(\"SELECT key, value FROM Dbm WHERE key='a'\")\ndb close\n<\/pre>\n","slots":{"columnNamesOfTable(tableName)":"\tReturns a list containing the names of all columns in the specified table.\n","error":"\tResults a string containing the current error. \n\tIf there is no error, Nil is returned.\n","escapeString(aString)":"\tReturns a translated version of aString by making two \n\tcopies of every single-quote (') character. This has the effect \n\tof escaping the end-of-string meaning of single-quote within a string literal.\n","close":"\tCloses the database if it is open. Returns self. \n\tIf the database is open when the open is garbage collected, \n\tit will be automatically closed.\n","path":"\tReturns the path to the database file.\n","setPath(aSeq)":"\tSets the path to the database file. Returns self.\n","debugOff":"\tTurns off debugging.\n","timeoutSeconds":"\tReturns the number of seconds to wait before timing out an open call. \n\tIf the number is 0, an open call will never timeout.\n","exec(aString)":"\tOpens the database if it is not already open and executes\n\taString as an sql command. Results a List of Map objects or Nil if\n\tthere was an error. Each map holds the contents of a row.\n\tThe key\/value pairs of the maps being column name\/column value\n\tpairs for a row. \")\n","changes":"\tReturns the number of rows that were changed by the most \n\trecent SQL statement. Or Nil if the database is closed.\n","viewNames":"\tReturns a list containing the names of all views in the database.\n","version":"\tResults a string the version of SQLite being used.\n","tableNames":"\tReturns a list containing the names of all tables in the database.\n","setTimeoutSeconds(aNumber)":"\tSets the open timeout to aNumber. If aNumber is 0, an open \n\tcall will never timeout. Returns self.\n","debugOn":"\tTurns on debugging.\n","open(optionalPathString)":"\tOpens the database.Returns self on success or nil upon failure.\n\tIf the databse is locked, \"yield\" will be called until it is \n\taccessable or timeoutSeconds has expired.\n","lastInsertRowId":"\tReturns the number with the row id of the last row inserted.\n","isOpen":"\tReturns true if the database is open, false otherwise.\n"}}},"SkipDB":{"SkipDBM":{"copyright":"Steve Dekorte 2002\n","license":"BSD revised\n","category":"Databases\n","module":"SkipDB","description":"SkipDB is a skip-list based key-value database. SkipDBM manages any number of skipdbs within the same file. \nThe root skipdb can be accessed using the root method.\n","slots":{"beginTransaction":"\tBegin a transaction. Returns self.\n","open":"\tOpens the dbm. Returns self.\n","commitTransaction":"\tCommit a transaction. Returns self.\n","root":"\tReturns the root SkipDB.\n","compact":"\tCompacts the database. Returns self.\n","delete":"\tDeletes the db. Returns self.\n","at(pidNumber)":"\tReturns the SkipDB at the specified persistent ID or nil if it is not found.\n","setPath(aString)":"\tSets the path to the dbm folder. Returns self.\n","close":"\tCloses the dbm.\n","path":"\tReturns the path to the dbm. Returns self.\n"}},"SkipDBCursor":{"copyright":"Steve Dekorte 2002\n","license":"BSD revised\n","category":"Databases\n","module":"SkipDB","description":"An iterator object for a SkipDB.\n","slots":{"last":"\tMove cursor to last item. Returns self.\n","key":"\tReturns the current cursor key, or nil if the cursor is out of range.\n","next":"\tMove cursor to next item. Returns self.\n","goto(aKey)":"\tMove cursor to the specified key or nearest preceeding key. Returns self\n","first":"\tMove cursor to first item. Returns self.\n","value":"\tReturns the current cursor key, or nil if the cursor is out of range.\n","previous":"\tMove cursor to previous item. Returns self.\n"}},"SkipDB":{"copyright":"Steve Dekorte 2002\n","license":"BSD revised\n","category":"Databases\n","module":"SkipDB","description":"An ordered key\/value database implemented using a skiplist data structure.\n","slots":{"cursor":"\tReturns a new cursor to enumerate the receiver.\n","atRemove(keySymbol)":"\tRemoves the specified key. Returns self\n","size":"\tReturns the number of keys in the receiver.\n","at(keySymbol)":"\tReturns a Sequence for the value at the given key or nil if there is no such key.\n","headerPid":"\tReturns the headerPid number.\n","atPut(keySymbol, valueSequence)":"\tSets the value of valueSequence with the key keySymbol. Returns self.\n"}}},"Postgres":{"Postgres":{"category":"Databases\n","module":"Postgres","slots":{}}},"MySQL":{"MySQL":{"copyright":"Min-hee Hong, 2007\n","license":"MIT License\n","category":"Databases\n","module":"MySQL","description":"MySQL<\/a> is a fast, multi-threaded,\nmulti-user SQL database server. IoMySQL is a MySQL binding for Io,\nby Min-hee Hong<\/a>.\n\n
      \nmy := MySQL establish("localhost", "user", "password", "database")\n\n# Get rows by Map\nmy queryThenMap("SELECT * FROM rel") foreach(at("col") println)\n# Get rows by List\nmy query("SELECT * FROM rel") foreach(at(0) println)\n\nmy close\n<\/code><\/pre>\n","slots":{"connected":"\tReturns true if connected to the database, false otherwise.\n","establish":"\tEstablish a connection to a MySQL database.\n","lastInsertRowId":"\tReturns the value generated for an AUTO_INCREMENT column by the previous INSERT or UPDATE statement.\n","connect(host, user, password, database, port, unixSocket, useSSL)":"\tConnect to a MySQL database.\n","close":"\tCloses a previously opened connection.\n","query(aQueryString)":"\tPerform a SQL query and return a list of results.\n\t
      \n\tdb query(\"SELECT * FROM accounts\") foreach(println)\n\t<\/pre>\n"}}},"TokyoCabinet":{"TokyoCabinetPrefixCursor":{"copyright":"Steve Dekorte 2002\n","license":"BSD revised\n","category":"Databases\n","module":"TokyoCabinet","description":"A database cursor.\n","slots":{"last":"\tMove cursor to last record. Returns self\n","next":"\tMove cursor to next record. Returns true if there is another key, \n\tor false if there is no next record.\n","close":"\tCloses the database.\n","put(value)":"\tSets the value at the current cursor postion. Returns self.\n","first":"\tMove cursor to first record. Returns self\n","jump(key)":"\tMove cursor to record before key. Returns self\n","remove":"\tRemoves the current cursor postion. Returns self.\n","key":"\tReturns current cursor key or nil.\n","value":"\tReturns current cursor value or nil.\n","previous":"\tMove cursor to previous record. Returns true if there is another key, \n\tor false if there is no previous record.\n"}},"TokyoCabinet":{"copyright":"Steve Dekorte 2002\n","license":"BSD revised\n","category":"Databases\n","module":"TokyoCabinet","description":"An ordered key\/value database that supports transactions and arbitrary key and value sizes.\n","slots":{"optimize":"\tOptimizes the database. Returns self\n","transactionalAtPut(key, value)":" Transactionally insert the given key and value. Returns self.\n","close":"\tCloses the database.\n","path":"Returns the path of the database file.\n","atPut(keySymbol, valueSequence)":"\tSets the value of valueSequence with the key keySymbol. Returns self.\n","sizeAt(keySymbol)":"\tReturns the size of the value at the given key or nil if there is no such key.\n","prefixCursor":"\tReturns a new prefix cursor object.\n","setPath(aPath)":" Sets the path of the database file. Returns self.\n","open(path)":"\tOpens the database.\n","transactionalRemoveAt(key)":" Transactionally remove the given key. Returns self.\n","abort":"\tAbort transaction. Returns self\n","cursor":"\tReturns a new cursor object.\n","commit":"\tCommit transaction. Returns self\n","sync":"\tSyncs the database. Returns self\n","compareType":"Returns the compare type function name used.\n","atRemove(keySymbol)":"\tRemoves the specified key. Returns self\n","setCompareType(name)":"\tSets the compare type function used to compare keys in the database. Valid compare types include:\n\t\"lexical\", \"decimal\", \"int32\", \"int64\" and \"path\". Returns self.\n","begin":"\tBegin transaction. Returns self\n","atApple(keySymbol, valueSequence)":"\tAppends valueSequence to the current value at keySymbol. Returns self.\n","size":"\tReturns number of records in the database. Returns self\n","at(keySymbol)":"\tReturns a Sequence for the value at the given key or nil if there is no such key.\n"}},"TokyoCabinetCursor":{"copyright":"Steve Dekorte 2002\n","license":"BSD revised\n","category":"Databases\n","module":"TokyoCabinet","description":"A database cursor.\n","slots":{"last":"\tMove cursor to last record. Returns self\n","next":"\tMove cursor to next record. Returns true if there is another key, \n\tor false if there is no next record.\n","close":"\tCloses the database.\n","put(value)":"\tSets the value at the current cursor postion. Returns self.\n","first":"\tMove cursor to first record. Returns self\n","jump(key)":"\tMove cursor to record before key. Returns self\n","remove":"\tRemoves the current cursor postion. Returns self.\n","key":"\tReturns current cursor key or nil.\n","value":"\tReturns current cursor value or nil.\n","previous":"\tMove cursor to previous record. Returns true if there is another key, \n\tor false if there is no previous record.\n"}}},"SQLite3":{"SQLite3":{"copyright":"Steve Dekorte, 2004\n","license":"BSD revised\n","category":"\tDatabases\n","module":"SQLite3","description":"\tSQLite provides a embedded simple and fast \n\t(2x faster than PostgreSQL or MySQL) SQL database. \n\tSee http:\/\/www.hwaci.com\/sw\/sqlite\/ for details. \n\tIt's SQL command set is described \n\tat http:\/\/www.hwaci.com\/sw\/sqlite\/lang.html. \n\tSQLite was written by Dr. Richard Hipp who offers consulting \n\tservices for custom modifications and support of SQLite. Example:\n\t

      \n

      \t\ndb := SQLite clone\ndb setPath(\"myDatabase.sqlite\")\ndb open\ndb exec(\"CREATE TABLE Dbm (key, value)\")\ndb exec(\"CREATE INDEX DbmIndex ON Dbm (key)\")\ndb exec(\"INSERT INTO Dbm ('key', 'value') VALUES ('a', '123')\")\ndb exec(\"INSERT INTO Dbm ('key', 'value') VALUES ('a', 'efg')\")\nrows := db exec(\"SELECT key, value FROM Dbm WHERE key='a'\")\ndb exec(\"DELETE FROM Dbm WHERE key='a'\")\nrows := db exec(\"SELECT key, value FROM Dbm WHERE key='a'\")\ndb close\n<\/pre>\n","slots":{"setTimeoutSeconds(aNumber)":"\tSets the open timeout to aNumber. If aNumber is 0, an open\n\tcall will never timeout. Returns self.\n","error":"\tResults a string containing the current error. If there is no error, Nil is returned.\n","escapeString(aString)":"\tReturns a translated version of aString by making two copies of \n\tevery single-quote (') character. This has the effect of escaping the \n\tend-of-string meaning of single-quote within a string literal.\n","close":"\tCloses the database if it is open. Returns self. If the database is open when the open is garbage collected, it will be automatically closed.\n","debugOn":"\tTurns on debugging.\n","timeoutSeconds":"\tReturns the number of seconds to wait before timing out an\n\topen call. If the number is 0, an open call will never timeout.\n","exec(aString)":"\tOpens the database if it is not already open and executes\n\taString as an sql command. Results a List of Map objects or Nil if\n\tthere was an error. Each map holds the contents of a row.\n\tThe key\/value pairs of the maps being column name\/column value\n\tpairs for a row.\n","path":"\tReturns the path to the database file.\n","version":"\tResults a string the version of SQLite being used.\n","changes":"\tReturns the number of rows that were changed by the most\n\trecent SQL statement. Or Nil if the database is closed.\n","tableNames":"\tReturns a list containing the names of all tables in the database.\n","debugOff":"\tTurns off debugging.\n","viewNames":"\tReturns a list containing the names of all\n\tviews in the database.\n","setPath":"\tSets the path to the database file. Returns self.\n","open(optionalPathString)":"\tOpens the database. If there is an optionalPathString argument,\n\tthe path is set to it's value before opening the database. If path is \"\" or \":memory:\"\n\ta database will be created in-memory, otherwise the file specified by path is opened.\n\tReturns self or Nil upon failure.\n\n\tIf the databse is locked, \"yield\" will be called until it is accessable or\n\ttimeoutSeconds has expired. \"\"\n","lastInsertRowId":"\tReturns the number with the row id of the last row inserted.\n","columnNamesOfTable(tableName)":"\tReturns a list containing the names of all columns in the specified table.\n","isOpen":"\tReturns true if the database is open, false otherwise.\n"}}}},"Bridges":{"CFFI":{"CFFI":{"copyright":"Trevor Fancher, 2006\n","license":"New BSD license\n","category":"Bridges\n","module":"CFFI","slots":{}},"CFFIPointer":{"copyright":"2006 Trevor Fancher. All rights reserved.\n","license":"BSD revised\n","category":"Bridges\n","module":"CFFI","description":"An Io interface to C\n","slots":{}}},"Python":{"Python":{"copyrigth":"Aslak Gronflaten, 2006\n","license":"BSD revised\n","module":"Python","category":"Bridges\n","credit":"Based on code by Steve Dekorte\n","description":"This object provides access the world of python.\n","slots":{}}},"ObjcBridge":{"ObjcBridge":{"copyright":"2003, Steve Dekorte\n","license":"Revised BSD\n","category":"Bridges\n","module":"ObjcBridge","slots":{"classNamed(aSeq)":" Returns a proxy to the ObjC class with the specified name or nil if no match is found.\n","main":"Calls NSApplicationMain().\n","debug":"On Turns debugging off. Returns self\n","autoLookupClassNamesOn":"Removes the ObjC forward method from the Lobby. Returns self.\n"}}}},"Server":{"User":{"User":{"credits":"Windows code by Mike Austin\n","copyright":"Steve Dekorte, 2004\n","license":"BSD revised\n","category":"Server\n","module":"User","description":"\tThis object provides access to the local operating system's information \n\tabout the current user.\n","slots":{"homeDirectory":"\tReturns the current user's home directory as a Directory object.\n","name":"\tReturns the current user's name.\n"}}},"Syslog":{"Syslog":{"copyright":"\tJeremy Tregunna, 2005\n","license":"\tRevised BSD Revised\n","category":"Server\n","module":"Syslog","description":"Provides access to a Unix system's system logger.\n

      \n

      \nlogger = Syslog clone do(\n\tidentity(\"SyslogTest\")\n\tfacility(facilityMap at(\"LOG_USER\"))\n\toptions(List append(optionsMap at(\"LOG_PID\"), optionsMap at(\"LOG_CONS\")))\n\tpriority(priorityMap at(\"LOG_INFO\"))\n\topen(facility, options)\n\tmask(List append(maskMap at(\"LOG_PRIMASK\")))\n\tlog(priority, \"*** Merely a test ***\")\n\tclose\n)\n<\/pre>\t\n\n

      \nNote: This is partially tested. Please let me know of any problems you happen to stumble across, or if it could be better. --Jeremy Tregunna\n

      \n","slots":{"reopen(aFacility, someOptions, optionalIdentity)":"\tReopens an already open log session. This is useful if you wish to \n\tchange the facility you are logging to, the options you are logging \n\twith, or the identity of the session. Takes the same options as the open slot.\n","options(optionalOptions)":"\tIf optionalOptions is specified, it should represent a list of the logging \n\toptions you can find in the optionsMap slot. All the values in the supplied \n\taList will be OR'd together when you call the open or reopen slots. \n\tReturns the list of options if optionalFacility is omitted.\n","identity(optionalIdentity)":"\tIf optionalIdentity is specified, provides an identity for all of the messages you will be sending to the syslog daemon. Returns the identity.\n","close":"\tCloses a log that has previously been opened for writing.\n","mask(optionalMask)":"\tIf optionalMask is specified, optionalMask is a list which contains \n\tany one or more values stored in the maskMap hash that will be OR'd \n\ttogether, to provide the proper mask. Returns the logging mask (as a List).\n","open(aPriority, someOptions, optionalIdentity)":"\tOpens the syslog for writing. optionalIdentity need not be entered \n\tand will default to the name of the distribution of Io you are running \n\tor if you have embedded Io into your application and set \n\tLobby distribution = \"foo\", it will be set to \"foo\".\n","maskMap":"\tContains keys\/value pairs which represent numbers that specify the \n\tlogging mask. These values may be any one (or more) of the following:\n\t

      \n\t