Skip to content

Instantly share code, notes, and snippets.

View mwhudson's full-sized avatar

Michael Hudson-Doyle mwhudson

View GitHub Profile
=== modified file 'pydoctor/epydoc2stan.py'
--- pydoctor/epydoc2stan.py 2013-09-24 23:49:51 +0000
+++ pydoctor/epydoc2stan.py 2013-10-09 00:25:54 +0000
@@ -51,6 +51,7 @@
sub_name = '.'.join(sub_parts)
if sub_name == 'os.path' \
or os.path.exists(os.path.join(STDLIB_DIR, filename) + '.py') \
+ or os.path.exists(os.path.join(STDLIB_DIR, filename, '__init__.py')) \
or os.path.exists(os.path.join(STDLIB_DIR, 'lib-dynload', filename) + '.so') \
or sub_name in sys.builtin_module_names:
def html2stan(crap):
crap = "<div>" + crap + "</div>"
try:
crap = XMLString(crap).load()[0].children
except:
print "crap was", repr(crap)
raise
if crap and crap[-1] == u'\n':
del crap[-1]
return crap
@mwhudson
mwhudson / keybase.md
Created April 15, 2014 21:27
keybase.md

Keybase proof

I hereby claim:

  • I am mwhudson on github.
  • I am mwhudson (https://keybase.io/mwhudson) on keybase.
  • I have a public key whose fingerprint is 175D 6F1C 8460 9535 C423 B1F7 7934 CE3E 6EC0 EE48

To claim this, I am signing this object:

@mwhudson
mwhudson / sj
Last active August 29, 2015 14:02
sj
#!/bin/bash
usage () {
echo "usage: sj [options] JOB_FILE"
}
SHOW_ONLY=no
OPEN=no
while [ $# -gt 0 ]; do
case $1 in
### Keybase proof
I hereby claim:
* I am mwhudson on github.
* I am mwhudson (https://keybase.io/mwhudson) on keybase.
* I have a public key whose fingerprint is 37CB 9DC7 6812 E6FD B09E EADA 80E6 27A0 AB75 7E23
To claim this, I am signing this object:
import os, sys
state = 'before'
bytes = ''
goasm = []
for line in sys.stdin:
words = line.strip().split()
if state == 'before':
if words[0] == '0x0000':
mwhudson@narsil:shared-lib-stuff$ cat one.go
package p
func f() int {
return 1
}
mwhudson@narsil:shared-lib-stuff$ GOARCH=arm64 go tool 7g -S ./one.go | python mc.py
MOV $0,R9
mov x9, #0x0 // #0
"".main t=1 size=32 value=0 args=0x0 locals=0x0 leaf
0x0000 00000 (trivial.go:3) TEXT "".main(SB),$-8-0
0x0000 00000 (trivial.go:3) TEXT "".main(SB),$-8-000000 (trivial.go:3) MOVD 16(R30),R3
0x0004 00000 (trivial.go:3) TEXT "".main(SB),$-8-000000 (trivial.go:3) MOVD 16(R30),R300004 (trivial.go:3) CMPU R3,R1
0x0008 00000 (trivial.go:3) TEXT "".main(SB),$-8-000000 (trivial.go:3) MOVD 16(R30),R300004 (trivial.go:3) CMPU R3,R100008 (trivial.go:3) BLT ,00018(BRANCH)
0x000c 00000 (trivial.go:3) TEXT "".main(SB),$-8-000000 (trivial.go:3) MOVD 16(R30),R300004 (trivial.go:3) CMPU R3,R100008 (trivial.go:3) BLT ,00018(BRANCH)00012 (trivial.go:3) MOVD LR,R5
0x0010 00000 (trivial.go:3) TEXT "".main(SB),$-8-000000 (trivial.go:3) MOVD 16(R30),R300004 (trivial.go:3) CMPU R3,R100008 (trivial.go:3) BLT ,00018(BRANCH)00012 (trivial.go:3) MOVD LR,R500016 (trivial.go:3) BL ,runtime.morestack_noctxt+0(APC)
0x0014 00000 (trivial.go:3) TEXT ""
package mheap
type mspan struct {
field uintptr
array1 [10]uintptr
array2 [10]uintptr
}
func mHeap_Init(h *mspan, j int32) {
mSpanList_Init(&h.array1[j])
mwhudson@narsil:go$ git diff
diff --git a/src/cmd/go/build.go b/src/cmd/go/build.go
index 0cb7dbb..2d3ba41 100644
--- a/src/cmd/go/build.go
+++ b/src/cmd/go/build.go
@@ -1675,7 +1675,7 @@ func (gcToolchain) gc(b *builder, p *Package, archive, obj string, asmhdr bool,
// verifyAsm specifies whether to check the assemblers written in Go
// against the assemblers written in C. If set, asm will run both (say) 6a and new6a
// and fail if the two produce different output files.
-const verifyAsm = true