This file contains 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
kevin@Erebor:~> sudo port install nethack | |
Password: | |
---> Fetching nethack | |
---> Attempting to fetch nethack-343-src.tgz from http://distfiles.macports.org/nethack | |
---> Verifying checksum(s) for nethack | |
---> Extracting nethack | |
---> Applying patches to nethack | |
---> Configuring nethack | |
---> Building nethack with target all | |
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_Users_kevin_Dev_macports_dports_games_nethack/work/nethack-3.4.3" && make all " returned error 2 |
This file contains 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
This is a test |
This file contains 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
type primality = Prime | Composite | Unknown | |
type sieve = primality array | |
exception Out_of_bounds | |
let make n = | |
if n < 2 then invalid_arg "Sieve.make" | |
else | |
let sieve = Array.make n Unknown in | |
sieve.(0) <- Composite; | |
sieve.(1) <- Composite; |
This file contains 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
{- | |
http://projecteuler.net/index.php?section=problems&id=80 | |
It is well known that if the square root of a natural number is | |
not an integer, then it is irrational. The decimal expansion of | |
such square roots is infinite without any repeating pattern at all. | |
The square root of two is 1.41421356237309504880..., and the digital | |
sum of the first one hundred decimal digits is 475. |
This file contains 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
Building target “Downloader” of project “Downloader” with configuration “Debug” — (8 errors) | |
cd "/Users/Sal/Desktop/iPhone Dev/Downloader" | |
setenv MACOSX_DEPLOYMENT_TARGET 10.5 | |
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" | |
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.sdk "-L/Users/Sal/Desktop/iPhone Dev/Downloader/build/Debug-iphonesimulator" "-F/Users/Sal/Desktop/iPhone Dev/Downloader/build/Debug-iphonesimulator" -filelist "/Users/Sal/Desktop/iPhone Dev/Downloader/build/Downloader.build/Debug-iphonesimulator/Downloader.build/Objects-normal/i386/Downloader.LinkFileList" -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework CoreGraphics -o "/Users/Sal/Desktop/iPhone Dev/Downloader/build/Debug-iphonesimulator/Downloader.app/Downloader" | |
Undefined symbols: | |
"_crc3 |
This file contains 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
#import <Foundation/Foundation.h> | |
@interface NSData (NSData_MD5) | |
- (NSString *)md5; | |
@end |
This file contains 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
module Main | |
where | |
import Data.List | |
import Text.Printf | |
import Control.Monad | |
import Control.Monad.MC | |
-- runGame returns True if Bob rolls a 6 on his second turn | |
-- Sue cannot roll a 6 or the premise of the problem is invalid. |
This file contains 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
import Text.Printf | |
import Control.Monad | |
import Control.Monad.MC | |
-- runGame returns True if Bob rolls a 6 on his second turn | |
-- Sue cannot roll a 6 or the premise of the problem is invalid. | |
-- Therefore don't even model her rolls. | |
runGame :: MC Bool | |
runGame = do |
This file contains 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
// Provide string-matching based on fnmatch.3 | |
package fnmatch | |
// There are a few issues that I believe to be bugs, but this implementation is | |
// based as closely as possible on BSD fnmatch. These bugs are present in the | |
// source of BSD fnmatch, and so are replicated here. The issues are as follows: | |
// | |
// * FNM_PERIOD is no longer observed after the first * in a pattern | |
// This only applies to matches done with FNM_PATHNAME as well | |
// * FNM_PERIOD doesn't apply to ranges. According to the documentation, |
OlderNewer