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
data BSTree a = Empty | Node (BSTree a) a (BSTree a) | |
deriving (Show, Eq) | |
insert :: (Ord a) => a -> BSTree a -> BSTree a | |
insert x Empty = Node Empty x Empty | |
insert x (Node l v r) | |
| x < v = Node (insert x l) v r | |
| v < x = Node l v (insert x r) | |
| otherwise = (Node l x r) |
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
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, GeneralizedNewtypeDeriving #-} | |
module Main where | |
import System.Environment (getArgs, getProgName) | |
import Data.Typeable | |
import Data.Binary | |
import Control.Concurrent (threadDelay) | |
import Control.Distributed.Process.Backend.SimpleLocalnet | |
import Control.Distributed.Process | |
import Control.Distributed.Process.Node hiding (newLocalNode) |
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
import Data.Maybe (isNothing, fromJust) | |
import Data.List (intercalate) | |
import Char (toUpper) | |
import System.IO (hFlush, stdout) | |
data Move = O | X | |
deriving (Eq, Show, Enum, Ord) | |
type Position = (Char, Int) | |
data BoardMove = BoardMove | |
{ bMove :: Maybe Move, bPos :: Position } |
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
(ns myprj.data.core | |
(:require myprj.data.conf :as conf] | |
[myprj.data.routes :as routes]) | |
(:use [ring.adapter.jetty :only [run-jetty]])) | |
(let [port (Integer/parseInt (get (System/getenv) "PORT" "8080"))] | |
(defonce ^:dynamic *server* (run-jetty #'routes/core | |
{:port port :join? false | |
:host (:domain conf/site)}))) |
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
/Users/alen/.xmonad/xmonad-i386-darwin: executeFile: does not exist (No such file or directory) | |
X Error of failed request: BadAccess (attempt to access private resource denied) | |
Major opcode of failed request: 2 (X_ChangeWindowAttributes) | |
Serial number of failed request: 7 | |
Current serial number in output stream: 8 |
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
ch24_prolog.lisp:119:1: | |
style-warning: | |
The variable REFS is defined but never used. | |
--> PROGN EVAL-WHEN | |
==> | |
(SB-IMPL::%DEFUN 'MATCH1 | |
(SB-INT:NAMED-LAMBDA MATCH1 | |
(REFS THEN ELSE) | |
(BLOCK MATCH1 | |
(DBIND (# . REST) |
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
;;; === common lib | |
(defmacro aif (test-form then-form &optional else-form) | |
`(let ((it ,test-form)) | |
(if it ,then-form ,else-form))) | |
(defmacro aif2 (test &optional then else) | |
(let ((win (gensym))) | |
`(multiple-value-bind (it ,win) ,test | |
(if (or it ,win) ,then ,else)))) |
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
Debugger entered--Lisp error: (end-of-file) | |
byte-code("\302\300\"\210\303 \304\"\210\300\305\"\207" [error process debug slime-net-close t "net-read error: %S"] 3) | |
slime-net-read-or-lose(#<process SLIME Lisp>) | |
slime-process-available-input(#<process SLIME Lisp>) | |
slime-net-filter(#<process SLIME Lisp> #("0006b7(:write-string \"\\\"goog.provide('alen_blog.validation.form');\\\\ngoog.require('cljs.core');\\\\ngoog.require('alen_blog.validation.preds');\\\\nalen_blog.validation.form.required = (function required(param){\\\\nreturn core.validate_val.call(null,param,cljs.core.seq,cljs.core.HashMap.fromArrays([param],[cljs.core.Vector.fromArray([\\\\\\\"this is a required field\\\\\\\"])]));\\\\n});\\\\nalen_blog.validation.form.len = (function() {\\\\nvar len = null;\\\\nvar len__7625 = (function (k,l){\\\\nreturn core.validate_val.call(null,k,alen_blog.validation.preds.length.call(null,l),cljs.core.HashMap.fromArrays([k],[cljs.core.Vector.fromArray([cljs.core.str.call(null,\\\\\\\"must be exactly \\\\\\\ |
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
;; ============================================================================= | |
;; Unicode | |
;; ============================================================================= | |
(message "Setting UTF-8 encoding") | |
(prefer-coding-system 'utf-8) | |
(set-default-coding-systems 'utf-8) | |
(set-terminal-coding-system 'utf-8) | |
(set-keyboard-coding-system 'utf-8) |
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
load-path is a variable defined in `C source code'. | |
Its value is | |
("/Users/alen/quicklisp/dists/quicklisp/software/slime-20110522-cvs/contrib" "/Users/alen/quicklisp/dists/quicklisp/software/slime-20110522-cvs/" "/Users/alen/Development/haskell/projects/haskellmode-emacs/" "/Users/alen/.emacs.d/elpa/clojure-mode-1.7.1/" "/Users/alen/.emacs.d/elpa/slime-repl-20100404/" "/Users/alen/.emacs.d/elpa/slime-20100404/" "/Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/haskell-mode/" "/Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/auctex" "/Users/alen/Library/Preferences/Aquamacs Emacs" "/Users/alen/Library/Preferences/Aquamacs Emacs/auto-save-list" "/Users/alen/Library/Preferences/Emacs" "/Library/Preferences/Aquamacs Emacs" "/Library/Preferences/Emacs" "/Users/alen/Library/Application Support/Aquamacs Emacs" "/Users/alen/Library/Application Support/Aquamacs Emacs/Temporary Files" "/Users/alen/Library/Application Support/Emacs" "/Library/Application Support/Aquamacs Emacs |