Skip to content

Instantly share code, notes, and snippets.

Phil Eaton eatonphil

Block or report user

Report or block eatonphil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View emulator.js
const fs = require('fs');
function parse(program) {
const labels = {};
const instructions = [];
const lines = program.split('\n');
for (let i = 0; i < lines.length; i++) {
let line = lines[i].trim(); // Remove any trailing, leading whitespace
View rosbe configure.cmd crash
(../../drivers/bus/acpi/main.c:316) Unsupported IOCTL: 294040
(../../dll/ntdll/ldr/ldrutils.c:1311) LDR: LdrpMapDll Relocating Image Name LIBEAY32.dll (10000000-1014F000 -> 00230000)
(../../dll/ntdll/ldr/ldrutils.c:1350) Overlapping DLL: C:\Program Files\ROSBE\bin\SSLEAY32.dll
(../../dll/ntdll/ldr/ldrutils.c:1311) LDR: LdrpMapDll Relocating Image Name MSVCP120.dll (10000000-10071000 -> 00380000)
(../../dll/ntdll/ldr/ldrutils.c:1350) Overlapping DLL: C:\Program Files\ROSBE\bin\SSLEAY32.dll
(../../dll/ntdll/ldr/ldrutils.c:1311) LDR: LdrpMapDll Relocating Image Name MSVCR120.dll (10000000-100EE000 -> 00730000)
(../../dll/ntdll/ldr/ldrutils.c:1350) Overlapping DLL: C:\Program Files\ROSBE\bin\SSLEAY32.dll
(../../dll/ntdll/ldr/ldrutils.c:1311) LDR: LdrpMapDll Relocating Image Name LIBEAY32.dll (10000000-1014F000 -> 00230000)
(../../dll/ntdll/ldr/ldrutils.c:1350) Overlapping DLL: C:\Program Files\ROSBE\bin\SSLEAY32.dll
(../../dll/ntdll/ldr/ldrutils.c:1311) LDR: LdrpMapDll Relocating Image Name MSVCP120.dll (10000000
@eatonphil
eatonphil / naive.c
Created May 20, 2018
Cython compiled C output
View naive.c
/* Generated by Cython 0.28.2 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_28_2"
View expression-expected-but-fun-was-found.sml
> val h = fun a b = b;
poly: : error: Expression expected but fun was found
Static Errors
> fun a b = b;
val a = fn: 'a -> 'a
View my-let.scm
(define-syntax my-let*
(syntax-rules ()
((_ ((p v)) b ...)
(let ((p v)) b ...))
((_ ((p1 v1) (p2 v2) ...) b ...)
(let ((p1 v1))
(my-let* ((p2 v2) ...)
b ...)))))
View cl-docker.asd
(defsystem :cl-docker
:depends-on (:cl-ppcre)
:serial t
:components ((:file "package")
(:file "docker")))
View terraform-make-dev
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/20 21:01:24 Generated command/internal_plugin_list.go
backend/operation_type.go:3: running "stringer": exec: "stringer": executable file not found in $PATH
backend/local/hook_count_action.go:3: running "stringer": exec: "stringer": executable file not found in $PATH
command/hook_count_action.go:3: running "stringer": exec: "stringer": executable file not found in $PATH
config/resource_mode.go:3: running "stringer": exec: "stringer": executable file not found in $PATH
helper/schema/resource_data_get_source.go:3: running "stringer": exec: "stringer": executable file not found in $PATH
terraform/context_graph_type.go:3: running "stringer": exec: "stringer": executable file not found in $PATH
make: *** [generate] Error 1
View hash.rkt
`#hash(["issue" . ,handle-issue]
["message" . ,handle-message]
["notification" . ,handle-notification])
(make-immutable-hash ([cons "issue" handle-issue]
[cons "message" handle-message]
[cons "notification" handle-notification]))
@eatonphil
eatonphil / linode-datacenters.sml
Last active Sep 28, 2016
Getting Linode datacenters with Ponyo
View linode-datacenters.sml
(*
* Usage: ./a.out
*
* To build:
* Install Poly/ML and Ponyo. Build Ponyo using GNU make.
* You will need to have OpenSSL development headers.
* Build using ponyo-make: ponyo-make linode.sml. Run ./a.out.
*)
structure Datacenter =
struct
@eatonphil
eatonphil / Makefile
Last active Sep 21, 2016
HTTP requests over SSL in Poly/ML
View Makefile
.PHONY: all
all:
gcc -shared -fPIC -o ssl.so -lcrypto -lssl ssl.c
polyc ssl.sml
You can’t perform that action at this time.