This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read a stream of newline-terminated paths from standard input and | |
# write the corresponding rsync include patterns to standard output. | |
# | |
# In the input, directory paths -- and ONLY directory paths -- must end | |
# with a slash. All paths are treated as literal strings. | |
# | |
# The pattern generation assumes that directories' contents are to be | |
# copied recursively. It also assumes that "rsync --recursive | |
# --delete-excluded" will use a final "*" pattern to exclude all | |
# non-included files. Thus, all ancestors require include patterns too, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
port -q info --index --line --version --revision --name 'p5-*' | awk ' | |
BEGIN { | |
blacklist["p5-app-ack"] = "" | |
blacklist["p5-catalyst-plugin-unicode-encoding"] = "" | |
blacklist["p5-class-mop"] = "" | |
blacklist["p5-email-mime-modifier"] = "" | |
blacklist["p5-graveyard"] = "" | |
blacklist["p5-test-tester"] = "" | |
blacklist["p5-test-use-ok"] = "" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on foldLeft given operator:op, initial:z, sequence:xs | |
(* | |
AppleScript handlers can't call handlers that are passed | |
as parameters because the enclosing script object | |
doesn't recognize the parameter name as a handler. Work | |
around this by doing the computation inside an embedded | |
script object. (See Neuberg, p. 150.) | |
*) | |
repeat until xs = {} | |
set z to op's f(z, item 1 of xs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import itertools | |
import subprocess | |
def main(): | |
fmt_pieces = ('', '.', '{:01d}', '{:01d}.', '{:02d}', '{:02d}.') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Save port to hold space. | |
/ has the variants/ { | |
s/ has .*$// | |
h | |
d | |
} | |
# Remove noise. | |
/conflicts with/d | |
/^[^:]*mariadb[^:]*:/b db_variant |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[20:36:38] <larryv> geekosaur: oy, all this is giving me a headache | |
[20:38:13] <geekosaur> yes | |
[20:45:29] <geekosaur> hopefully my latest reply clarifies the actual issue | |
[20:50:03] <geekosaur> (implied but not stated, btw: C++11 broke *everyone's* existing C++ runtime API/ABI) | |
[20:53:41] <larryv> haha | |
[20:53:58] <larryv> yes, it's much clearer now, thanks | |
[20:54:45] <geekosaur> also it is bnoth API and ABI because they need bit level compatibility for objects compiled with one C++ compiler to work with objects compiled by a different one; API alone is insufficient | |
[20:58:12] <larryv> is that mitigated if both standard libraries use the same low level support? | |
[20:58:30] <larryv> i.e., libstdc++ on OS X using libc++abi | |
[20:58:35] <larryv> or libc++ on Linux using libsupc++ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sortCodeTrees[T <: CodeTree](trees: List[T]): List[T] = { | |
val pivot = trees.length / 2 | |
if (pivot == 0) trees | |
else { | |
def merge(xs: List[T], ys: List[T]): List[T] = (xs, ys) match { | |
case (Nil, ys) => ys | |
case (xs, Nil) => xs | |
case (x :: xs1, y :: ys1) => | |
if (weight(x) < weight(y)) x :: merge(xs1, ys) | |
else y :: merge(xs, ys1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def times(chars: List[Char]): List[(Char, Int)] = { | |
def incr(pairs: List[(Char, Int)], C: Char): List[(Char, Int)] = | |
pairs match { | |
case Nil => List((C, 1)) | |
case (C, n) :: ps => (C, n+1) :: ps | |
case p :: ps => p :: incr(ps, C) | |
} | |
(chars foldLeft List[(Char, Int)]())(incr) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: Portfile | |
=================================================================== | |
--- Portfile (revision 116903) | |
+++ Portfile (working copy) | |
@@ -3,6 +3,7 @@ | |
PortSystem 1.0 | |
PortGroup python 1.0 | |
+PortGroup muniversal 1.0 | |