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 gdb | |
import sys | |
import re | |
import sys | |
import os.path | |
# the following is a hacked copy of pypy/tool/gdb_pypy.py |
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
-- follows this blog post: | |
-- http://www.andreas-dewes.de/en/2015/queens-of-the-data-age-abusing-common-table-expressions-to-solve-the-eight-queens-problem-in-sql/ | |
-- but takes under a second, instead of many minutes | |
-- | |
-- main idea: represent board as permutation of string '12345678', | |
-- where character at position i is a queen at position (i, s[i]) | |
-- then only check diagonal attacks | |
-- (this approach is the one traditionally taken in eg Prolog) | |
with recursive |
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
diff --git a/pycket/values.py b/pycket/values.py | |
index ef11567..a2ca9de 100755 | |
--- a/pycket/values.py | |
+++ b/pycket/values.py | |
@@ -42,12 +42,24 @@ class W_Object(object): | |
def eqv(self, other): | |
return self is other # default implementation | |
+from collections import defaultdict | |
+celltypes = defaultdict(int) |
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
[f464b432d7e] {jit-log-opt-loop | |
# Loop 0 ((let ([AppRand1_fresh_221 (+ conf 1)]) (vector-ref state AppRand1_fresh_221))) : loop with 100 ops | |
[p0, p1] | |
+83: label(p0, p1, descr=TargetToken(140248750869264)) | |
+83: guard_not_invalidated(descr=<Guard0x11bce20>) [p0, p1] | |
debug_merge_point(0, 0, '(+ conf 1)') | |
+83: guard_class(p0, 9625672, descr=<Guard0x11bd830>) [p0, p1] | |
+102: p3 = getfield_gc_pure(p0, descr=<FieldP pycket.small_list.ConsEnvSize2.inst__vals_1 32>) | |
+106: guard_class(p3, ConstClass(W_Fixnum), descr=<Guard0x11bd7c0>) [p0, p3, p1] | |
+118: i5 = getfield_gc_pure(p3, descr=<FieldS pycket.values.W_Fixnum.inst_value 8>) |