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
java -cp "d:/xPrograms/leiningen/1.2.0/leiningen-1.2.0-RC2-standalone.jar;src;classes" leiningen.core uberjar | |
Exception in thread "main" java.lang.Exception: Unable to resolve symbol: defproject in this context (project.clj:1) | |
at clojure.lang.Compiler.analyze(Compiler.java:5200) | |
at clojure.lang.Compiler.analyze(Compiler.java:5146) | |
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3031) | |
at clojure.lang.Compiler.analyzeSeq(Compiler.java:5366) | |
at clojure.lang.Compiler.analyze(Compiler.java:5185) | |
at clojure.lang.Compiler.analyze(Compiler.java:5146) | |
at clojure.lang.Compiler.eval(Compiler.java:5423) | |
at clojure.lang.Compiler.load(Compiler.java:5852) |
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 uberjar error: | |
lein uberjar | |
Cleaning up | |
Exception in thread "main" clojure.lang.LispReader$ReaderException: java.lang.Exception: Invalid token: d: | |
at clojure.lang.LispReader.read(LispReader.java:180) | |
at clojure.core$read.invoke(core.clj:2872) | |
at clojure.core$read.invoke(core.clj:2870) | |
at clojure.main$eval_opt.invoke(main.clj:233) | |
at clojure.main$initialize.invoke(main.clj:254) |
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
(def CONS | |
(fn [a b] | |
(fn [x] | |
(if (= x -1) | |
'CONS | |
(if (= x 0) | |
a | |
b))))) | |
(def FIRST |
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
;; emacsd-tile.el -- tiling windows for emacs | |
(defun swap-with (dir) | |
(interactive) | |
(let ((other-window (windmove-find-other-window dir))) | |
(when other-window | |
(let* ((this-window (selected-window)) | |
(this-buffer (window-buffer this-window)) | |
(other-buffer (window-buffer other-window)) | |
(this-start (window-start this-window)) |
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
(def file-info-extractors | |
{:filename #(.getName #^java.io.File %) | |
:path #(str (.toURI #^java.io.File %)) | |
:modified #(.lastModified #^java.io.File %)}) | |
(map #(reduce (fn [m [k e]] | |
(assoc m k (e %))) | |
{} | |
file-info-extractors) | |
(.listFiles (java.io.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
(defun get-window-by-class (class) | |
"Return a window with the given class." | |
(first (filter-windows #'(lambda (w) (equal (window-class w) class))))) | |
(defun gimme (cmdline class) | |
"If a window matching CLASS is found switch to it, else launch cmdline." | |
(if class | |
(let ((wnd (get-window-by-class class))) | |
(if wnd | |
(display-window wnd) |
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 clj-swing.core) | |
(import '(javax.swing JFrame JLabel JTextField JButton JComboBox JPanel Timer) | |
'(java.awt.event ActionListener) | |
'(java.awt GridBagLayout GridLayout GridBagConstraints)) | |
(require '[clojure.contrib.java-utils :as java]) | |
(defmacro combo-box [[& items] & actions] | |
`(doto (JComboBox.) |
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 state.clj) | |
(comment | |
(def f | |
(statefully | |
x <- (*read*) | |
(*write* 42) | |
y <- (*read*) | |
(*update* str " was frobnicated!") |
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
(set! *warn-on-reflection* true) | |
(import (org.mozilla.javascript Context NativeObject NativeArray)) | |
(defn js-eval [string] | |
(let [cx (Context/enter) | |
scope (.initStandardObjects cx)] | |
(.evaluateString cx scope string "<js-eval>" 1 nil))) | |
(defprotocol Clojurify (clojurify [obj])) |
NewerOlder