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
; solving Ishmael problem from http://www.renesys.com/challenge_site/challenge/count_me_ishmael | |
; NOTE: The times below are inflated since the profiling code slows everything down | |
; Current profile | |
; seconds | consed | calls | sec/call | name | |
;-------------------------------------------------------------- | |
; 0.391 | 33,214,464 | 952,404 | 0.0000004 | IS-CVVC | |
; 0.214 | 30,027,776 | 664,719 | 0.0000003 | IS-CHAR-CONSTANANT | |
; 0.156 | 0 | 2,308,632 | 0.0000001 | IS-CHAR-VOWEL |
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
% solving Ishmael problem from http://www.renesys.com/challenge_site/challenge/count_me_ishmael | |
-module(ishmael). | |
-compile(export_all). | |
-define(FILENAME, "2701.txt"). | |
time(Func) -> | |
Start = now(), |
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(monad). | |
-export([ monad_context/2, putst/1, getst/0, lift/0, return/1 ]). | |
-export([ test/0 ]). | |
%%%%%%%%%%%%%%%%%%%%% Erlang Monad %%%%%%%%%%%%%%%%%%%%%% | |
%% Working on a simple monad implementation for Erlang %% | |
%% %% | |
%% Just for fun I tried whipping up a simple erlang %% | |
%% monad. It uses the process dictionary and I haven't %% | |
%% implemented lift and many children of a monad state %% |
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
(ns dungeonverse.core | |
(:use noir.core) | |
(:require [noir.server :as server])) | |
(def the-server (atom nil)) | |
(defpage "/welcome" [] | |
"Welcome to Noir!") | |
(defn start [] (reset! the-server (server/start 8080 [:base-url "stf.gameoire.com"]))) |
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
<link rel="import" href="../ace-element/ace-element.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |
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
var Bacon = require("./vendor/Bacon.min.js"); | |
var GameObject = function() { | |
this.bus = new Bacon.Bus(); | |
this.eventStreams = []; | |
this.eventHandlers = []; | |
this.data = {}; | |
} | |
GameObject.prototype.registerEventType = function(eventType) { |
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
/*---------------------------------- | |
* Kefir.Bus | |
*/ | |
var Bus = function() { | |
Kefir.Pool.call(this); | |
} | |
Bus.prototype = Object.create(Kefir.Pool.prototype); | |
Bus.prototype.constructor = Bus; | |
Bus.prototype.push = function(x) { |
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
# Switch prefix from C-b to C-b | |
set -g prefix C-a | |
unbind C-b | |
# Update delay time to be very short | |
set -s escape-time 1 | |
# Set the base-index to 1 instead of 0, so we can use prefix 1 to get to the first window | |
set -g base-index 1 | |
setw -g pane-base-index 1 |
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 Html exposing (..) | |
import Html.Attributes exposing (style) | |
import Html.Events exposing (onClick) | |
import Html.App | |
type alias Model = Int | |
type Msg = Increment | Decrement | |
update : Msg -> Model -> Model |
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 Html exposing (..) | |
import Html.App exposing (beginnerProgram, program) | |
import Html.Events exposing (onClick) | |
import Task | |
import Debug | |
type alias Model = Int | |
type Msg |
OlderNewer