Skip to content

Instantly share code, notes, and snippets.

@Licenser
Forked from devn/irc-parser.clj
Created March 16, 2010 14:35
Show Gist options
  • Save Licenser/334024 to your computer and use it in GitHub Desktop.
Save Licenser/334024 to your computer and use it in GitHub Desktop.
(ns irc-parser
(:use clojure.contrib.duck-streams
clojure.contrib.str-utils
clojure.contrib.seq-utils))
(def dates (file-seq (java.io.File. "./clojure")))
(defn parse-irc-log
[logfile]
(line-seq (reader logfile)))
(def parsed (map parse-irc-log (rest dates)))
(defn find-lines
[text]
(flatten (pmap
(fn [d] (filter #(< 0 (.indexOf % text)) d))
parsed)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment