Skip to content

Instantly share code, notes, and snippets.

View qxjit's full-sized avatar

David Vollbracht qxjit

  • Flipstone Technology Partners, Inc
View GitHub Profile
Excepting deserializing game: System.ArgumentNullException: Argument cannot be null.
Parameter name: array
at Microsoft.FSharp.Collections.ArrayModule.Fold[EntityId,SetTree`1] (Microsoft.FSharp.Core.FSharpFunc`2 folder, Microsoft.FSharp.Collections.SetTree`1 state, CoinDB.EntityId[] array) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Collections.SetTreeModule.ofArray[EntityId] (IComparer`1 comparer, CoinDB.EntityId[] l) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Collections.FSharpSet`1[CoinDB.EntityId].OnDeserialized (StreamingContext context) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.SerializationCallbacks.Invoke (System.Collections.ArrayList list, System.Object target, StreamingContext context) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.SerializationCallbacks.RaiseOnDeserialized (System.Object target, StreamingContext contex) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.ObjectManager.RaiseOnDeserializedE
type A =
| A of int
| B of string
> List.choose (|A|_|) [ A 3; B "foo"];;
List.choose (|A|_|) [ A 3; B "foo"];;
-------------^^^^^
/vagrant/stdin(6,14): error FS0039: The value or constructor '|A|_|' is not defined
@qxjit
qxjit / scone_creep.idr
Created May 1, 2014 15:33
Scone Creep Delicious when Scope Creep is not?
data Creep = SomeCreep
data Scope a = SomeScope a
data Scone a = AScone a
data Taste a =
Disgusting
| Yucky
| Edible
| Yummy
| Delicious
@qxjit
qxjit / gist:2de9409c40c605c77182
Last active August 29, 2015 14:03
Cthulhu Voice Procedure Alphabet
Letter Word
A Azathoth
B B’gnu-Thun
C Cthulhu
D D’endrrah
E Ei'lor
F Fhtagn
G Gi-Hoveg
H Hastur
@qxjit
qxjit / comp.rb
Created June 27, 2014 21:05
Ruby proc & symbol composition
def comp(*gs)
id = -> x { x }
gs.inject(id) do |f,g|
-> x do
f.to_proc.call g.to_proc.call x
end
end
end
times_2 = -> x { x * 2 }
@qxjit
qxjit / multilineLet.fsx
Created October 1, 2014 18:27
multiline let which is a value, not a function
let f x =
let a =
let c = 2
let d = 3
c + d*x
a + a
printfn "%d" (f 1)
@qxjit
qxjit / calculator.html
Created April 16, 2015 00:43
NOBO Coders Meetup Calculator
<html>
<head>
<style type="text/css">
body {
width: 966px;
margin: auto;
background-color: gray;
}
.button-section {
@qxjit
qxjit / new_line_message_send.rb
Created November 20, 2010 13:03
Sending messages in ruby on new line without a trailing '.'
# This program prints out:
#
# Reversed: god
# God
#
# I originally found it in the documentation
# of BasicObject#tap in "Programming Ruby 1.9" by Dave Thomas
#
puts "dog"
@qxjit
qxjit / gist:760707
Created December 31, 2010 04:16
Test Gist for Boca Golf
def reverse(a) a.reverse; end
@qxjit
qxjit / Boca Golf 2011-01-19
Created January 20, 2011 01:43
qxjit's Golfed solution for sanitize
def sanitize(w,s)s.tr('/*-._\\','').sub(/#{w}/i,'*'*w.size)end