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
Session Start: Sun Oct 31 11:52:15 2010 | |
Session Ident: #v8 | |
15[11:52:15] * Now talking in #v8 | |
03[11:52:15] * Topic is 'see #chromium, http://code.google.com/p/v8/' | |
03[11:52:15] * Set by mal on Tue Sep 02 12:03:02 | |
[11:54:41] <mraleph> justinvh: hi! i don't see SetInternalFieldCount being called in your code. that's seems broken to me :-) | |
07[11:54:43] <justinvh> Allright. mraleph -- Always a pleasure to talk :) | |
[11:55:51] <mraleph> justinvh: same here :-) | |
07[11:56:30] <justinvh> Anyhow, I wasn't storing anything internally to that object. I can see the check that goes bad happens to be with that index, but it happens when I am instantiating the context... | |
07[11:56:52] <justinvh> Literally: ObjectTemplate::New() and then creating a context. |
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
function files(where, opts) { | |
/*** | |
Generates a list of files from the output of `ls`. | |
Arguments: | |
where -- From where to list files (default '.') | |
opts -- Optional parameters that can be passed to `ls`. | |
***/ | |
where = where || "."; | |
opts = opts || []; |
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/env python | |
import os | |
import random | |
import time | |
import platform | |
snowflakes = {} | |
try: | |
# Windows Support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import inspect | |
import sys | |
import time | |
import contextlib | |
class AugmentedLogger(logging.getLoggerClass()): | |
"""A simple augmented logger that allows you to specify an arbitrary | |
stack-depth when logging relative to the caller function. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iterator> | |
#include <type_traits> | |
#include <iostream> | |
template <class Iter, class Tag> | |
using has_tag = | |
std::enable_if< | |
std::is_convertible< | |
typename std::iterator_traits<Iter>::iterator_category, | |
Tag>::value, |
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
template <class OutputIter, class = void> | |
class Foo; | |
template <class OutputIter> | |
class Foo<OutputIter, is_output_iterator<OutputIter>> { | |
/* some class with an output iterator */ | |
}; |
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
#include <string> | |
#include <vector> | |
#include <sstream> | |
#include <exception> | |
namespace std { | |
std::string to_string(const char* value) | |
{ | |
return std::string(value); | |
} |
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
/** | |
* Copyright 2013 Justin Bruce Van Horne <justinvh@gmail.com> | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
#include <vector> | |
#include <cstdint> | |
#include <iostream> | |
#include <llvm/IR/LLVMContext.h> | |
#include <llvm/IR/IRBuilder.h> | |
#include <llvm/IR/Module.h> | |
#include <llvm/ExecutionEngine/GenericValue.h> | |
#include <llvm/ExecutionEngine/Interpreter.h> | |
#include <llvm/ExecutionEngine/JIT.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
preamble = '#include <stdio.h>\nmain(){char a[5000]={0};char *p=a;%s;return 0;}' | |
cmds = {'>': '++p;', '<': '--p;', '+': '++*p;', '-': '--*p;', | |
'.': 'putchar(*p);', ',': '*p=getchar();', '[': 'while(*p){', ']': '}'} | |
print(preamble%(''.join(cmds.get(i, '') for i in sys.stdin.read()))) |
OlderNewer