Skip to content

Instantly share code, notes, and snippets.

View tylerlrhodes's full-sized avatar
🍕

Tyler Rhodes tylerlrhodes

🍕
View GitHub Profile
@tylerlrhodes
tylerlrhodes / sicp1.5.scm
Last active June 16, 2018 20:26
normal vs applicative evaluation test in scheme
(define (p) (p))
(define (test x y)
(if (= x 0)
0
y))
(test 0 (p))
package main
import (
"github.com/aws/aws-lambda-go/lambda"
"github.com/aws/aws-lambda-go/events"
"errors"
"log"
)
var (
Push-Location
Remove-Item "public" -Recurse
hugo
set-location "public\"
Write-S3Object -BucketName tylerrhodes.net -Folder . -Recurse -KeyPrefix \ -CannedACLName public-read -ProfileName HugoProfile
package main
import "fmt"
// Increment Natural number y
func Increment(y uint) uint {
if y == 0 {
return 1
}
if y%2 == 1 {
@tylerlrhodes
tylerlrhodes / bitvector.go
Created March 24, 2017 15:58
Gist for delve debugger issue
package main
import (
"fmt"
)
// BitVector is a simple bit vector
// It's zero value represents the empty set
type BitVector struct {
bytes []uint64
@tylerlrhodes
tylerlrhodes / dlv error on mac
Created March 22, 2017 16:59
Step by step of error produced for delve issue
(dlv) breakpoints
Breakpoint unrecovered-panic at 0x1025cd0 for runtime.startpanic() /usr/local/Cellar/go/1.8/libexec/src/runtime/panic.go:568 (0)
(dlv) break main.UnsetBit
Breakpoint 1 set at 0x1088cf0 for main.(*BitVector).UnsetBit() ./bitvector.go:23
(dlv) continue
Bit 0 is set!> main.(*BitVector).UnsetBit() ./bitvector.go:23 (hits goroutine(1):1 total:1) (PC: 0x1088cf0)
18: }
19: bv.bytes[word] |= 1 << bit
20: }