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
Index: binaries/data/mods/public/simulation/components/Foundation.js | |
=================================================================== | |
--- binaries/data/mods/public/simulation/components/Foundation.js (revision 16918) | |
+++ binaries/data/mods/public/simulation/components/Foundation.js (working copy) | |
@@ -33,6 +33,12 @@ | |
this.maxProgress = 0; | |
this.initialised = true; | |
+ | |
+ // Give our foundation a small amount of initial health, so that |
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
# http://askubuntu.com/questions/126737/make-gnome-terminal-show-the-command-running-as-title | |
# If this is an xterm set the title to user@host:dir | |
case "$TERM" in | |
xterm*|rxvt*) | |
prompt_prefix() | |
{ | |
if [ "$USER" != "jmcgirr" ] || [ "$HOSTNAME" != "jmcgirr-ld1" ]; then | |
echo -n "${USER}@${HOSTNAME}: " | |
else | |
echo -n |
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
package main | |
import ( | |
"os" | |
"io" | |
"fmt" | |
"rpc" | |
"rpc/jsonrpc" | |
) |
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
panic: | |
runtime.panic+0xa4 ~/go/src/pkg/runtime/proc.c:1060 | |
runtime.panic(0x80b2fb8, 0x967ac4a0) | |
gojs.value_to_javascript+0x4e ~/Src/gojs/_obj/base.cgo1.go:89 | |
gojs.value_to_javascript(0x967ac490, 0x80b32a8, 0x85a02a00, 0x0, 0x0, ...) | |
gojs.*Context·NewValue+0x67 ~/Src/gojs/_obj/base.cgo1.go:882 | |
gojs.*Context·NewValue(0x967ac490, 0x80b32a8, 0x85a02a00, 0x85a02a00, 0x1, ...) | |
gojs.*Context·EvaluateScript+0x155 ~/Src/gojs/_obj/base.cgo1.go:-24 | |
gojs.*Context·EvaluateScript(0x967ac490, 0x80d8be8, 0x3, 0x967ac498, 0x80dea4c, ...) |
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
// Given a slice of go-style Values, this function allocates a new array of c-style values and returns a pointer to the first element in the array, along with the length of the array. | |
func (ctx *Context) newCValueArray(val []*Value) (*C.JSValueRef, C.size_t) { | |
if len(val) == 0 { | |
return nil, 0 | |
} | |
arr := make([]C.JSValueRef, len(val)) | |
for i := 0; i < len(val); i++ { | |
arr[i] = val[i].ref | |
} | |
return &arr[0], C.size_t(len(arr)) |
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
func nativecallback_CallAsFunction_go(data_ptr unsafe.Pointer, ctx unsafe.Pointer, obj unsafe.Pointer, thisObject unsafe.Pointer, argumentCount uint, arguments unsafe.Pointer, exception *unsafe.Pointer) unsafe.Pointer { | |
defer func() { | |
if r := recover(); r != nil { | |
*exception = unsafe.Pointer(recover_to_javascript((*Context)(ctx), r)) | |
} | |
}() | |
data := (*object_data)(data_ptr) | |
ret := data.val.Interface().(GoFunctionCallback)( | |
(*Context)(ctx), (*Object)(obj), (*Object)(thisObject), (*[1 << 14]*Value)(arguments)[0:argumentCount]) |
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
func (ctx *Context) newGoValueArray(ptr unsafe.Pointer, size uint) ([]*Value) { | |
goarr := make([]*Value, size) | |
for i := uint(0); i < size; i++ { | |
goarr[i] = ctx.newValue(C.JSValueRef(ptr)) | |
ptr = unsafe.Pointer(4+uintptr(ptr)) | |
} | |
return goarr | |
} |
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
func (ctx *Context) newCValueArray(val []*Value) (*C.JSValueRef, C.size_t) { | |
if len(val) == 0 { | |
return nil, 0 | |
} | |
arr := make([]C.JSValueRef, len(val)) | |
for i := 0; i < len(val); i++ { | |
arr[i] = val[i].ref | |
} | |
return &arr[0], C.size_t(len(arr)) | |
} |
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
// native.go | |
// Have to add this function for native_test.go | |
func ptrToJSValueRef(ptr unsafe.Pointer) C.JSValueRef { | |
return C.JSValueRef(ptr) | |
} | |
// native_test.go | |
func PrettyPrintValArr(t *testing.T, values []*Value) { | |
for _, val := range values { | |
tlog(t, val) |
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
func (e *Exception) debugString() (str string) { | |
defer func() { | |
if r := recover(); r != nil { | |
stringer, ok := r.(Stringer) | |
if !ok { | |
str = "Panic of non-string type when attempting to create string representation." | |
return | |
} | |
str = stringer.String() | |
return |
OlderNewer