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
| ;; Any type of error class, as CLJS uses js/Error | |
| (defn e! [fmt & args] | |
| (throw (AssertionError. (apply format fmt args)))) | |
| … | |
| ;; Exception message takes precedence over :validation-msg | |
| ["-i" "--input-directory DIR" | |
| :validate-fn #(cond (not (ok-path? %)) | |
| (e! "Input directory path %s is malformed" (pr-str %)) | |
| (let [f (File. %)] |
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
| (defn type-scaffold | |
| "https://gist.github.com/mpenet/2053633, originally by cgrand" | |
| [^Class cls] | |
| (let [ms (map (fn [^Method m] | |
| [(.getDeclaringClass m) | |
| (symbol (.getName m)) | |
| (map #(symbol (.getCanonicalName ^Class %)) (.getParameterTypes m))]) | |
| (.getMethods cls)) | |
| idecls (mapv (fn [[^Class cls ms]] | |
| (let [decls (map (fn [[_ s ps]] (str (list s (into ['this] ps)))) |
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 example | |
| (:require [clojure.java.io :as io]) | |
| (:import (java.io FileInputStream) | |
| (javax.mail Session) | |
| (javax.mail.internet MimeMessage))) | |
| ;; Good | |
| (defn ^MimeMessage message | |
| [file] | |
| (with-open [fis (FileInputStream. (io/file file))] |
This file has been truncated, but you can view the full file.
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
| TRACE t48211: (frak/pattern ["450000949b3c40004006dfd10a000157d83adbc4e24001bb6c99f46fe29ceecf801805a0e4af00000101080a001779d76ecff667170303005b000000000000001debaf9409cffc8aba1c3c8ac9f24f172947d0b87d549535babe748f4f5c374343e583b3552bd6f9efb572b4cf063a9eb5295cbdc2ee20250d610463eda9b53657d1f0773b154f2793bbf1697258a595266f1c9c" "450000629b3d40004006e0020a000157d83adbc4e24001bb6c99f4cfe29ceecf801805a0402800000101080a001779d76ecff6671703030029000000000000001edf7a82c2ae09a6f2eb4b41d1c91342e907fac5afc261d1106120d204e31cdf6727" "45000062553500003406720bd83adbc40a00015701bbe240e29ceecf6c99f4fd8018023b099900000101080a6ed00a63001779d7170303002900000000000000a47495da1b255c5bf707d3c22424579f368eff46366b0745d39a181c4dd38e322a98" "4500007d55480000340671ddd83adbc40a00015701bbe240e29ceefd6c99f4fd8010023be1b600000101080a6ed00a85001779d7170303004400000000000000a52e5db0ead2180dd1f5cee35466b0f5e84de0e5de3b9f9852ba20489c7b42bc29805a9fa513fdebdd8d8f9da33ba7d63f297140ca223ecfbb6aca5c07"]) |
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
| || (in /Users/guns/src/subtle) | |
| || rm -r subtle | |
| || rm -r subtlext.so | |
| || rm -r build/subtle/shared.o | |
| || rm -r build/subtle/array.o | |
| || rm -r build/subtle/client.o | |
| || rm -r build/subtle/display.o | |
| || rm -r build/subtle/event.o | |
| || rm -r build/subtle/ewmh.o | |
| || rm -r build/subtle/grab.o |
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
| (defn pascals-triangle [] | |
| "Return a lazy seq of rows of Pascal's triangle." | |
| (letfn [(next-row [row] | |
| (reduce (fn [v' v] (conj v' (apply +' (take 2 v)))) ; (take 2) returns [1] at the right edge | |
| [1] ; Left edge | |
| (take (count row) (iterate rest row))))] | |
| (iterate next-row [1]))) |
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 --version | |
| ruby 1.9.3p0 (2011-11-08 revision 33661) [x86_64-darwin11.2.0] | |
| $ RUBYOPT=-d bundle exec tork rails | |
| Exception `LoadError' at /opt/ruby/1.9/lib/ruby/site_ruby/1.9.1/rubygems.rb:1243 - cannot load such file -- rubygems/defaults/operating_system | |
| Exception `LoadError' at /opt/ruby/1.9/lib/ruby/site_ruby/1.9.1/rubygems.rb:1252 - cannot load such file -- rubygems/defaults/ruby | |
| Exception `NameError' at /opt/ruby/1.9/lib/ruby/gems/1.9.1/gems/psych-1.2.1/lib/psych/core_ext.rb:16 - method `to_yaml' not defined in Object | |
| Exception `NameError' at /opt/ruby/1.9/lib/ruby/gems/1.9.1/gems/psych-1.2.1/lib/psych/core_ext.rb:29 - method `yaml_as' not defined in Module | |
| Exception `NameError' at /opt/ruby/1.9/lib/ruby/gems/1.9.1/gems/psych-1.2.1/lib/psych/core_ext.rb:37 - method `y' not defined in Kernel | |
| Exception `NameError' at /opt/ruby/1.9/lib/ruby/gems/1.9.1/gems/psych-1.2.1/lib/psych/deprecated.rb:79 - undefined method `to_yaml_properties' for class `Object' |
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
| ;;; arithmetic.core {{{1 | |
| arithmetic.core/operators | |
| arithmetic.core/| | |
| arithmetic.core/÷ | |
| arithmetic.core/convert-unary [expr] | |
| arithmetic.core/division? [op] | |
| arithmetic.core/nameof [op] | |
| arithmetic.core/negation? [expr] | |
| arithmetic.core/negative? [expr] |
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
| --- lein-classpath.txt 2012-12-16 23:26:03.481915466 -0600 | |
| +++ jvm-classpath.txt 2012-12-16 23:26:03.481915466 -0600 | |
| @@ -1,4 +1,6 @@ | |
| +/home/guns/.lein/self-installs/leiningen-2.0.0-SNAPSHOT-standalone.jar | |
| /home/guns/.m2/repository/bultitude/bultitude/0.1.7/bultitude-0.1.7.jar | |
| +/home/guns/.m2/repository/cheshire/cheshire/3.1.0/cheshire-3.1.0.jar | |
| /home/guns/.m2/repository/cheshire/cheshire/4.0.0/cheshire-4.0.0.jar | |
| /home/guns/.m2/repository/classlojure/classlojure/0.6.6/classlojure-0.6.6.jar | |
| /home/guns/.m2/repository/clj-http/clj-http/0.4.2/clj-http-0.4.2.jar | |
| @@ -13,6 +15,8 @@ |
OlderNewer