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
#include <stdio.h> | |
#include <math.h> | |
/* | |
** float q_rsqrt( float number ) | |
*/ | |
float Q_rsqrt( float number ) { | |
long i; | |
float x2, y; | |
const float threehalfs = 1.5F; | |
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
________ ________ ____ _ _ | |
| ____\ \ / / ____| / __ \ | (_) | |
| |__ \ \ / /| |__ ______| | | |_ __ | |_ _ __ ___ | |
| __| \ \/ / | __|______| | | | '_ \| | | '_ \ / _ \ | |
| |____ \ / | |____ | |__| | | | | | | | | | __/ | |
|______| \/ |______| \____/|_| |_|_|_|_| |_|\___| | |
_ _ | |
| | | | |
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
cmiller-laptop% clang rsqrt_test.c | |
cmiller-laptop% ./a.out | |
Q_rsqrt: 4 | |
Q_rsqrt result: 0.499154 Avg: 555 | |
fsqrt result: 0.500000 Avg: 552 (*) | |
Q_rsqrt: 4 | |
Q_rsqrt result: 0.499154 Avg: 639 (*) | |
fsqrt result: 0.500000 Avg: 655 | |
Q_rsqrt: 4 | |
Q_rsqrt result: 0.499154 Avg: 552 (*) |
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
The Righteous Hero List, a companion to the Evil Overlord List (http://www.eviloverlord.com/) | |
1. I will not make alliances with any of my arch nemesis. | |
2. If I must have a girlfriend/love-interest, she will be trained in martial arts so as to better defend | |
herself against the Evil Overlord, who will surely try to use her as leverage against me. | |
3. I will champion the death penalty for my arch nemesis. | |
4. I will never leave home without a lockpicking kit. |
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
#!ruby | |
require 'highline/import' | |
require 'date' | |
total_time = nil | |
begin_time = nil | |
end_time = nil |
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
# originally an IRB session on [email protected] | |
func= lambda {|hash,key| hash[key]=Hash.new(&func)} | |
# => #<Proc:0x000001010621b8@(irb):1 (lambda)> | |
h=Hash.new &func | |
# => {} | |
h[:foo] | |
# => {} | |
h[:foo][:bar][:baaz] = 'yay functional programming!' | |
# => "yay functional programming!" | |
h.keys |
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
// compile with: | |
// clang -framework Foundation test.m | |
// run with: | |
// ./a.out | |
#import <objc/runtime.h> | |
#import <Foundation/Foundation.h> | |
#include <stdio.h> | |
int main(int argc, char *argv[]) |
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
> gem list [email protected] | |
*** LOCAL GEMS *** | |
abstract (1.0.0) | |
actionmailer (3.0.9) | |
actionpack (3.0.9) | |
actionservice (0.3.0) | |
activemodel (3.0.9) | |
activerecord (3.0.9) |
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
// clang -o magic8ball -framework Foundation magic8ball.m | |
#import <Foundation/Foundation.h> | |
#include <stdio.h> | |
NSUInteger randomUnder(NSUInteger topPlusOne); | |
int main() | |
{ | |
srandomdev(); // rather important |
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
// | |
// NSArray+Chunky.h | |
// | |
// Created by Christopher Miller on 8/19/11. | |
// Copyright 2011 FSDEV. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
@interface NSArray (Chunky) |
OlderNewer