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
; Albert Cardona, 2012-09-08 | |
; http://albert.rierol.net/clojure-monads.html | |
(ns my.parse.bib5 | |
(:use [clojure.algo.monads :only [domonad with-monad state-t maybe-m fetch-state set-state m-seq m-plus m-result]]) | |
(:use [clojure.string :only [lower-case]]) | |
(:use [clojure.pprint :only [pprint]])) | |
(set! *warn-on-reflection* true) |
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 alephtest.core | |
(:require [lamina.core :as l]) | |
(:require [aleph.http :as a]) | |
(:require [ring.adapter.jetty :as jetty])) | |
;; https://github.com/ztellman/aleph | |
(def counter (atom 0)) | |
(defn say-hello [] | |
(let [n (swap! counter inc)] |
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
(defun mayoff:open-url-in-chrome (url) | |
"Open URL in Google Chrome. I use AppleScript to do several things: | |
1. I tell Chrome to come to the front. If Chrome wasn't launched, this will also launch it. | |
2. If Chrome has no windows open, I tell it to create one. | |
3. If Chrome has a tab showing URL, I tell it to reload the tab, make that tab the active tab in its window, and bring its window to the front. | |
4. If Chrome has no tab showing URL, I tell Chrome to make a new tab (in the front window) showing URL." | |
(when (symbolp url) | |
; User passed a symbol instead of a string. Use the symbol name. | |
(setq url (symbol-name url))) | |
(do-applescript (format " |
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
#!/bin/sh | |
# This program has two feature. | |
# | |
# 1. Create a disk image on RAM. | |
# 2. Mount that disk image. | |
# | |
# Usage: | |
# $0 <dir> <size> | |
# |
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
Lisp interpreter in 90 lines of C++ | |
I've enjoyed reading Peter Norvig's recent articles on Lisp. He implements a Scheme interpreter in 90 lines of Python in the first, and develops it further in the second. | |
Just for fun I wondered if I could write one in C++. My goals would be | |
1. A Lisp interpreter that would complete Peter's Lis.py test cases correctly... | |
2. ...in no more than 90 lines of C++. | |
Although I've been thinking about this for a few weeks, as I write this I have not written a line of the code. I'm pretty sure I will achieve 1, and 2 will be... a piece of cake! |
NewerOlder