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
(add-hook 'clojure-mode-hook 'tc/run-common-coding-hooks) | |
(add-hook 'clojure-mode-hook 'tc/run-lisp-coding-hooks) | |
(add-to-list 'auto-mode-alist '("\\.dtm$" . clojure-mode)) | |
(add-to-list 'auto-mode-alist '("\\.edn$" . clojure-mode)) | |
(add-to-list 'auto-mode-alist '("\\.cljs$" . clojure-mode)) | |
(setq clojure-defun-style-default-indent t) | |
(setq nrepl-popup-stacktraces nil) |
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
(defn ^:internal ^:no-doc delayed | |
"Creates an timeout-derefable delay around any function taking a timeout" | |
[f] | |
(let [val (atom ::unrealized) | |
realized? #(not= ::unrealized @val) | |
rcv (fn [timeout] (reset! val (f timeout)))] | |
(proxy [clojure.lang.Delay clojure.lang.IBlockingDeref] [nil] | |
(deref | |
([] | |
(if (realized?) @val (rcv 0))) |
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
commit 7d4a8f4724ea8f82709550d8a55798c87bfab802 (HEAD, refs/heads/clj-1299-no-nil) | |
Author: Toby Crawley <toby@tcrawley.org> | |
Date: Fri Nov 22 09:49:44 2013 -0500 | |
Prevent a conveyed binding frame from being removed by a popThreadBindings call [CLJ-1299] | |
This introduces a TOP frame that is used to mark the top of a | |
push/pop stack. It also removes unnecessary nil checks around dvals. | |
Modified src/jvm/clojure/lang/Var.java |
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
Changes: | |
Modified src/jvm/clojure/lang/Var.java | |
diff --git a/src/jvm/clojure/lang/Var.java b/src/jvm/clojure/lang/Var.java | |
index 7463337..2dee064 100644 | |
--- a/src/jvm/clojure/lang/Var.java | |
+++ b/src/jvm/clojure/lang/Var.java | |
@@ -63,8 +63,8 @@ static class Frame{ | |
} | |
protected Object clone() { |
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
import org.vertx.java.core.Handler; | |
import org.vertx.java.core.AsyncResult; | |
import org.vertx.java.core.AsyncResultHandler; | |
import org.vertx.java.core.datagram.DatagramPacket; | |
import org.vertx.java.core.datagram.DatagramSocket; | |
import org.vertx.java.core.datagram.InternetProtocolFamily; | |
import org.vertx.java.platform.Verticle; | |
import org.vertx.java.core.buffer.Buffer; | |
import java.util.concurrent.atomic.AtomicInteger; |
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
diff --git a/vertx-testsuite/src/test/java/vertx/tests/core/datagram/TestClient.java b/vertx-testsuite/src/test/java/vertx/tests/core/datagram/TestClient.java | |
index dcbac0c..953dc2d 100644 | |
--- a/vertx-testsuite/src/test/java/vertx/tests/core/datagram/TestClient.java | |
+++ b/vertx-testsuite/src/test/java/vertx/tests/core/datagram/TestClient.java | |
@@ -29,6 +29,7 @@ import org.vertx.java.testframework.TestUtils; | |
import java.net.*; | |
import java.util.Enumeration; | |
import java.util.concurrent.atomic.AtomicBoolean; | |
+import java.util.concurrent.atomic.AtomicInteger; | |
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 nrepl-port-from-file (file) | |
"Attempts to read port from a file named by FILE." | |
(let* ((dir (nrepl-project-directory-for (nrepl-current-dir))) | |
(f (expand-file-name file dir))) | |
(when (file-exists-p f) | |
(with-temp-buffer | |
(insert-file-contents f) | |
(buffer-string))))) | |
(defun nrepl-default-port () |
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
tcrawley soft nofile 16384 | |
tcrawley hard nofile 16384 | |
tcrawley soft nproc 4096 | |
tcrawley hard nproc 4096 |
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
(import '[java.nio.file Path Files FileSystem FileSystems StandardCopyOption FileVisitor FileVisitResult]) | |
(defn ->path [path] | |
(if (instance? Path path) | |
path | |
(.getPath (FileSystems/getDefault) path (into-array String [])))) | |
(defn copy [from to] | |
(Files/copy (->path from) (->path to) (into-array [StandardCopyOption/COPY_ATTRIBUTES]))) |
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
(defn make-isolated-conf [] | |
(let [conf-dir (io/file *home* "standalone/configuration")] | |
(spit (io/file conf-dir "standalone-isolated-test.xml") | |
(str/replace | |
(slurp (io/file conf-dir "standalone.xml")) | |
#"(?s)<subsystem xmlns=\"urn:jboss:domain:deployment-scanner:1\.1\">.*?</subsystem>" | |
"")))) |