Skip to content

Instantly share code, notes, and snippets.

View orlandov's full-sized avatar

Orlando Vazquez orlandov

View GitHub Profile
test
---
NPC: Bart The Drunkard
AVATAR: gui/icons/npc.png
START: main_dialog
SECTIONS:
main_dialog:
- say: "Hey there, back up... no need to gang up on a poor guy!"
- responses:
-
#!/usr/bin/env node
process.mixin(GLOBAL, require('mjsunit'));
require.paths.push("lib");
var mongodb = require( 'mongodb' );
var sys = require( 'sys' );
var mongo = new mongodb.MongoDB();
jjj = JSON.stringify
--- a/lib/Template.js
+++ b/lib/Template.js
@@ -48,6 +48,11 @@
**/
if (!this.exports) this.exports = {};
+var uneval;
+if (typeof uneval === "undefined") {
+ uneval = JSON.stringify
+}
/*
I Have a C++ class Sqlite3Db that inherits from EventEmitter. It has a
private variable `db` of type (sqlite3*) which is the sqlite handle.
Is it okay to pass this handle to the function executing
in eio's threadpool?
*/
struct connect_request {
sqlite3 *db;
static int eio_AfterConnect(eio_req *req) {
printf("eio_AfterConnect; rc = %d\n", req->result);
ev_unref(EV_DEFAULT_UC);
}
static int eio_Connect(eio_req *req) {
// Note: this function is executed in the thread pool! CAREFUL
int *foo = (int*)(req->data);
printf("** %p\n", foo);
$2 = {
next = 0x0,
result = 0,
offs = 0,
size = 0,
ptr1 = 0x0,
ptr2 = 0x0,
nv1 = 0,
nv2 = 0,
type = 0,
==1170== Memcheck, a memory error detector.
==1170== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
==1170== Using LibVEX rev 1884, a library for dynamic binary translation.
==1170== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==1170== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation framework.
==1170== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==1170== For more details, rerun with: -v
==1170==
--1170-- WARNING: unhandled syscall: 329
--1170-- You may be able to write your own handler.
#0 0x0000000105801649 in ?? ()
#1 0x0000000105801352 in ?? ()
#2 0x000000010586c4f8 in ?? ()
#3 0x0000000105801352 in ?? ()
#4 0x00000001058830ba in ?? ()
#5 0x0000000105801352 in ?? ()
#6 0x000000010586ed4f in ?? ()
#7 0x000000010586f77f in ?? ()
#8 0x0000000105801352 in ?? ()
#9 0x0000000105881772 in ?? ()
line 730: unknown command: .str.split.
line 731: unknown command: .map.join.
line 732: unknown command: /usr/local/lib/node/libraries/sys.js:139"
Statistical profiling result from v8.log, (9844 ticks, 633 unaccounted, 0 excluded).
[Unknown]:
ticks total nonlib name
633 6.4%
[Shared libraries]: