Skip to content

Instantly share code, notes, and snippets.

def get_package_lists(self):
"""Returns a pair consisting of all packages, followed by a dictionary
mapping each package name to "static" or "dynamic"."""
# Filter the packages into static and dynamic parts. If a package is
# dynamically loaded, all of its dependencies must also be dynamically
# loaded. We use a simple greedy algorithm.
root_names = self.static_plugins + self.dynamic_plugins
roots = dict([ name, self.get_package(name) for name in root_names ])
all_packages = self.get_dependencies(roots.values())
let deps = [
("a", []), ("b", []), ("c", [ "a", "b" ]), ("d", [ "b" ]), ("e", [ "d" ])
] in
let data = List.map (fun r -> r, new mock_package (fst r) (snd r)) deps in
let pkgs = Core_hashtbl.of_alist data in
let [ a, b, c, d, e ] = List.map snd data in
...
function hg-qfoldnext {
hg qfold `hg qnext`
}
function hg-qflatten {
hg qsave -c || exit 1
hg qpop
while [ `hg qnext` != $1 ]; do
hg-qfoldnext
done
hg-qfoldnext
(* square wave test *)
let freq = 44100 in
(* A, 440 Hz *)
let a440 =
let out = IO.output_string() in
let period = freq / 440 in
for i = 0 to period / 2 - 1 do IO.write_i16 out 32767 done;
for i = period / 2 to period - 1 do IO.write_i16 out (-32768) done;
Index: local/include/llvm/System/Assert.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ local/include/llvm/System/Assert.h 2010-06-11 11:22:52.000000000 -0700
@@ -0,0 +1,22 @@
+//===-- llvm/System/Assert.h - Assertions -----------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
Index: local/bindings/ocaml/llvm/llvm.ml
===================================================================
--- local.orig/bindings/ocaml/llvm/llvm.ml 2010-06-11 12:26:55.000000000 -0700
+++ local/bindings/ocaml/llvm/llvm.ml 2010-06-11 12:31:32.000000000 -0700
@@ -134,9 +134,10 @@
end
exception IoError of string
+exception Assertion of string
diff --git a/plugins/supported/standard_syntax.js b/plugins/supported/standard_syntax.js
--- a/plugins/supported/standard_syntax.js
+++ b/plugins/supported/standard_syntax.js
@@ -83,6 +83,9 @@
if (then.length > 1) {
newContext = then[1].split(":");
}
+ } else if (len === 0) {
+ throw new Error("StandardSyntax: Infinite loop detected: " +
+ "zero-length match that didn't change state");
hjkhjkhk
[ui]
username=Patrick Walton <pwalton@mozilla.com>
[diff]
git=1
[hooks]
commit.whitespace = hg export tip | (! grep -C 3 --color=always -n '^+.*[ ]$')
[extensions]
(* organizemusic.ml *)
let process ~dryrun:dryrun dest_top (dirpath, _, filenames) =
Array.iter begin fun filename ->
let fullpath = Os.Path.join dirpath filename in
let tagfile =
try
Some (Taglib.open_file fullpath)
with Not_found -> None
in