Skip to content

Instantly share code, notes, and snippets.

View wrmsr's full-sized avatar
💭
FOLLOWS YOU

wrmsr wrmsr

💭
FOLLOWS YOU
View GitHub Profile
package main
import (
"bufio"
"debug/macho"
"fmt"
"log"
"os"
"reflect"
"unsafe"
int main(int argc, const char * const *argv) {
int c = argc + 2 + 3;
printf("hi %d\n", c);
return 0;
}
line 1:17 reportAttemptingFullContext d=84 (parameterDeclaration), input='intargc,'
&{0x14000279860 0x140001fdf60}
*parser.CompilationUnitContext
*parser.TranslationUnitContext
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
GOROOT=/opt/homebrew/Cellar/go/1.19/libexec #gosetup
GOPATH=/Users/spinlock/go #gosetup
/opt/homebrew/Cellar/go/1.19/libexec/bin/go test -c -o /private/var/folders/0s/szmw_2x17m507jfhwyrkd65r0000gn/T/GoLand/___TestNdArray_in_github_com_wrmsr_bane_exp_util_ndarray_tests.test -gcflags all=-N -l github.com/wrmsr/bane/exp/util/ndarray/tests #gosetup
/opt/homebrew/Cellar/go/1.19/libexec/bin/go tool test2json -t /private/var/folders/0s/szmw_2x17m507jfhwyrkd65r0000gn/T/dlvLauncher.sh /Applications/GoLand 2022.2 EAP.app/Contents/plugins/go/lib/dlv/macarm/dlv --listen=127.0.0.1:56351 --headless=true --api-version=2 --check-go-version=false --only-same-user=false exec /private/var/folders/0s/szmw_2x17m507jfhwyrkd65r0000gn/T/GoLand/___TestNdArray_in_github_com_wrmsr_bane_exp_util_ndarray_tests.test -- -test.v -test.paniconexit0 -test.run ^\QTestNdArray\E$
=== RUN TestNdArray
[
[
[ 0, 1, 2 ],
[ 3, 4, 5 ],
[ 6, 7, 8 ]
import "testing"
//
type IntThing struct {
fn func(int) int
}
func (t *IntThing) Do(i int) int {
return t.fn(i)
//
type A struct{}
type B struct{}
type C struct {
a A
b B
}
//
package reflect
import (
"fmt"
"testing"
)
//
type Node struct{}
__text:00000000010898A0 ; =============== S U B R O U T I N E =======================================
__text:00000000010898A0
__text:00000000010898A0
__text:00000000010898A0 _main_MulRec2 proc near ; CODE XREF: __text:0000000001089931↓j
__text:00000000010898A0 ; _main_MulRec+43↓p
__text:00000000010898A0
__text:00000000010898A0 var_10 = qword ptr -10h
__text:00000000010898A0 var_8 = qword ptr -8
__text:00000000010898A0 arg_0 = qword ptr 8
__text:00000000010898A0 arg_8 = qword ptr 10h
package runtime
import "testing"
//go:noinline
func MulSlice2(s []int) []int {
r := make([]int, len(s))
for i, n := range s {
r[i] = n * 2
}
#!/bin/bash
MODELINE=`cvt $1 $2 | tail -n 1 | sed "s/Modeline//" | sed 's/"//g'`
MODENAME=`cvt $1 $2 | tail -n 1 | cut -d'"' -f 2`
`xrandr --newmode $MODELINE`
`xrandr --addmode Virtual-1 $MODENAME`
`xrandr --output Virtual-1 --mode $MODENAME`