Skip to content

Instantly share code, notes, and snippets.

View dgfitch's full-sized avatar

Dan Fitch dgfitch

View GitHub Profile
-- So we have two problems with serialization.
-- ONE: The objects.collection looks like this:
{
1 = {
x = 30,
y = 50,
type = {
-- this is a reference to objects.node or objects.arc or whatever, a
[<TestFixture>]
type Tests() =
[<Test>]
member x.SimpleTest() =
let duh = Assert.AreEqual(1, 2)
()
<<after building fresh pkg-config, glib, pango, and gtk with
./configure --prefix=/home/svc_folio/local && gmake && gmake install>>
DTRACE="/usr/sbin/dtrace" DTRACEFLAGS="-32" AR="ar" /bin/bash ../../data/dtrace-prelink.sh \
--pic pedump-dtrace.o ../../data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
/bin/bash ../../libtool --quiet --tag=CC --mode=link gcc -g -O2 -fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-char-subscripts -Wno-cast-align -mcpu=v9 -o pedump pedump.o libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la ../../libgc/libmonogc.la -L/home/svc_folio/local/lib -lgthread-2.0 -lpthread -lthread -lrt -lglib-2.0 -lm pedump-dtrace.o -lrt -lsocket -lnsl -lxnet -lpthread -lm
ld: fatal: relocation error: R_SPARC_32: file ../../libgc/.libs/libmonogc.a(sparc_mach_dep.o): symbol <u
type Crap =
| Composite of Crap list
/// Name, a list of attributes, and it's sub-item[s]
| Element of string * Attribute list * Crap
| Content of string
and Attribute = string * string
let d =
[
Element ("header", [("Top Margin", "3in")], Content "WOO")
fun (f : 'a * Structure -> 'a * Structure) (state : 'a) (list : Structure list) ->
let g f (state,_) s = f (state, s)
let states, structures =
list
|> List.scan (g f) (state,Empty)
|> List.unzip
// got to be a better way to pop the end off a list
let final_state = states.[List.length states - 1]
final_state, structures
Xft.antialias: 1
Xft.hinting: true
Xft.hintstyle: full
Xft.dpi: 93
*VT100.translations: #override\
Meta <KeyPress> P: print() \n\
Meta <KeyPress> minus: smaller-vt-font() \n\
Meta <KeyPress> KP_Subtract: smaller-vt-font() \n\
Meta <KeyPress> plus: larger-vt-font() \n\
@dgfitch
dgfitch / rd
Created September 1, 2009 14:41
#!/usr/bin/ruby
$LOAD_PATH << "/home/dan/.ratpoison"
begin
require 'ratpoison'
frame = Ratpoison.current_frame
width = frame.width
height = frame.height
title = Ratpoison.current_window.title
# Simple helper library from generic bindings
module Ratpoison
RATPOISON="ratpoison"
def self.method_missing m, *args, &block
command m.to_s, *args
end
def self.command(command, *args)
#!/usr/bin/env ruby
# focus - convenient window switching in ratpoison
#
# Dan Fitch [email protected]
#
# based on select.sh - originally copyright 2003 <[email protected]>
#
# Example: focus cmus in a screen or start a new one containing it
#
let map2zero (f: float -> float -> 'a) (s1: float list) (s2: float list) =
let rec take xs ys result =
match xs, ys with
| [], [] -> result
| x::xs', [] -> (f x 0.0) :: take xs' [] result
| [], y::ys' -> (f 0.0 y) :: take [] ys' result
| x::xs', y::ys' -> (f x y) :: take xs' ys' result
take s1 s2 []