An attempt to deal with this SO question
using golang.org/x/crypto/cryptobyte
.
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 <stdlib.h> | |
#include <stdio.h> | |
#include <locale.h> | |
#define WIN32_LEAN_AND_MEAN | |
#define _UNICODE | |
#include <windows.h> | |
int print_sys_error(DWORD last_error) | |
{ |
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
CC = /usr/bin/i686-w64-mingw32-gcc | |
GOOS = windows | |
GOARCH = 386 | |
CGO_ENABLED = 1 | |
export CC GOOS GOARCH CGO_ENABLED | |
.PHONY: all build run clean | |
all: run |
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
module sockint | |
go 1.15 |
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
package main | |
/* | |
#include <stdio.h> | |
struct real_client { | |
int x; | |
}; | |
typedef struct Client{ |
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
twosums$ go test -bench=. -run=none -benchmem . | |
goos: linux | |
goarch: amd64 | |
BenchmarkTwoSum1-8 14698284 149 ns/op 16 B/op 1 allocs/op | |
BenchmarkTwoSum2-8 7724497 138 ns/op 16 B/op 1 allocs/op | |
PASS | |
ok _/home/kostix/tmp/twosums 3.508s |
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
package main | |
/* | |
#include <stdlib.h> | |
typedef struct { | |
char *response; | |
} Resp; | |
*/ | |
import "C" |
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
#!/bin/sh | |
set -e -u | |
mpc=/usr/bin/mpc | |
if [ $# -lt 1 ]; then | |
"$mpc" "$@" | |
exit $? | |
fi |
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
package main | |
import ( | |
"errors" | |
"log" | |
"strings" | |
"syscall" | |
"unsafe" | |
) |
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
package main | |
import ( | |
"errors" | |
"fmt" | |
"log" | |
"syscall" | |
"unsafe" | |
) |
NewerOlder