This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var util = require('./util') | |
, KeyValueStore = util.KeyValueStore | |
, aljebr = require('./aljebr') | |
; | |
function serializeExpression(expression) | |
{ | |
var eqNesting = 0; | |
function recurse(expression, parentOperator) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from urllib2 import Request, urlopen | |
class ServerList(): | |
listName = None | |
def __init__(self, data): | |
self.headers = { 'User-Agent': 'Mozilla/5.0' } | |
self.servers = data['servers'] | |
if self.listName is None: | |
raise NotImplementedError("ServerList must override listName") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/gsr | |
var prg = "./ioUrbanTerror.i386"; | |
//prg = "/usr/bin/env"; | |
const PTRSIZE = 8; | |
const ffi = require("gffi"); | |
const signal = require("signal"); | |
const {ByteArray,ByteString} = require("binary"); | |
const {include} = require("./include"); | |
const {Reader} = require("./readline"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* MakeHDReflect() reads Mincraft Coder Pack files (MCP) to build mappings | |
* between Notchian names (Java classes with obfuscated class, method, | |
* and field names, released to the public by Mojang) and "human" names | |
* (names chosen by reverse engineers.) | |
* | |
* It returns an object that allows you to inspect its procedure and also | |
* to begin writing "human" Javascript code! | |
* | |
* This function returns an object. Below is a description of each property | |
* you can expect to find in that object. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
donny@pacemates:~/gpsee/narwhal-old$ js test.js | |
policies: | |
Policy: | |
function Policy() { | |
this.identity = true; | |
this.requirepath = new SearchPath; | |
this.filejail = "/"; | |
} | |
instance: | |
identity: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
donny@teamspace:~/gpsee/src$ gsr -ddzz crash.js | |
JS exception #147 - uncaught exception: gpsee.module.ca.page.binary.ByteArray.setProperty.type: cannot apply this method to gpsee.module.ca.page.binary.ByteArray-type object | |
Failed loading program module 'crash.js': module initialization failed | |
donny@teamspace:~/gpsee/src$ ./embrace/gpsee-js/gpsee-js | |
js> const binary = require("binary") | |
js> binary.ByteArray.prototype.sort | |
function sort() { | |
[native code] | |
} | |
js> binary.ByteArray.prototype.sort = function(){return 'buzz off'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Implements ByteArray.toArray() */ | |
static JSBool ByteArray_toArray(JSContext *cx, uintN argc, jsval *vp) | |
{ | |
return gpsee_throw(cx, CLASS_ID "toArray.unimplemented: this method is not yet implemented!"); | |
} | |
/** Implements ByteArray.toString() */ | |
static JSBool ByteArray_toString(JSContext *cx, uintN argc, jsval *vp) | |
{ | |
return gpsee_throw(cx, CLASS_ID "toString.unimplemented: this method is not yet implemented!"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'#!/usr/bin/gsr -zzdd' | |
/* A pure Javascript reference implementation of ServerJS's binary ByteArray | |
* class for reference, implementation, and testing purposes. | |
* | |
* For more info see: https://wiki.mozilla.org/ServerJS/Binary/B | |
*/ | |
/* Do we have modules? */ | |
if (('function' == typeof require) && require("binary")) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/gsr -zzdd | |
const ByteString = require("binary").ByteString; | |
const Binary = require("binary").Binary; | |
/* Provide some scaffolding for individual tests */ | |
var testUtils = { | |
/* eq compares two or more values and expects that they will pass an equality test without type coercion (===) */ | |
'eq': function() { | |
if (arguments.length < 2) throw 'too few arguments to testUtils.eq()'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2169 if (!OBJ_DEFINE_PROPERTY(cx, obj, ATOM_TO_JSID(atom), | |
(gdb) print *((JSObject*)fun)->map->ops | |
$63 = {newObjectMap = 0xb7f140a6 <js_NewObjectMap>, | |
destroyObjectMap = 0xb7f14080 <js_DestroyObjectMap>, | |
lookupProperty = 0xb7f11364 <js_LookupProperty>, | |
defineProperty = 0xb7f1274c <js_DefineProperty>, | |
getProperty = 0xb7f110b2 <js_GetProperty>, | |
setProperty = 0xb7f1092a <js_SetProperty>, | |
getAttributes = 0xb7f115f8 <js_GetAttributes>, | |
setAttributes = 0xb7f127f8 <js_SetAttributes>, |