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 mutabots | |
"Reimplementation of transducers, in terms of processing functions instead | |
of reducing functions. | |
tl;dr: reducing-fn based transducers are a special case, influenced by reducers, | |
of processing-fn based transducers. | |
In Clojure 1.7.0-alpha2, transducers are expressed in terms of the existing | |
concept of reducing functions. | |
To sum it up, a transducer has currently the signature : |
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
; constraint inside componenents | |
{:type :composite | |
:children [ {:type :label | |
:id :project-label | |
:text "Project name:"} | |
{:type :text | |
:id :project-name | |
:text "" | |
:form-data {:left {:control :project-label}}} |
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 create-control [parent] | |
(let [c (composite parent | |
::project-name-group create-project-name-group | |
::create-in-group create-in-group | |
::lein-template-group create-lein-template-group) | |
$ (partial $ c)] | |
(config! ($ ::create-in-group) | |
:form-data {:top {:control ::project-name-group} | |
:left {:pct 0} | |
:right {:pct 100}}) |
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
nrepl exception while doing code completion: | |
Exception in thread "nREPL-worker-2" java.lang.IllegalArgumentException: No implementation of method: :send of protocol: #'clojure.tools.nrepl.transport/Transport found for class: clojure.tools.nrepl.middleware.pr_values$pr_values$fn$reify__1283 | |
at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:541) | |
at clojure.tools.nrepl.transport$eval7291$fn__7292$G__7280__7299.invoke(transport.clj:16) | |
at clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__7726$fn__7739.invoke(interruptible_eval.clj:75) | |
at clojure.main$repl$fn__6597.invoke(main.clj:279) | |
at clojure.main$repl.doInvoke(main.clj:277) | |
at clojure.lang.RestFn.invoke(RestFn.java:1096) | |
at clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__7726.invoke(interruptible_eval.clj:56) |
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 nrepl-events | |
(:require [ccw.core.launch :as l] | |
[clojure.java.io :as io] | |
[ccw.eclipse :as e])) | |
(defn spit-globally | |
"global ~/.nrepl file" | |
[{:keys [event-type port project]}] | |
(when (= :creation event-type) | |
(spit (io/file (java.lang.System/getProperty "user.home") ".nrepl") |
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
;; What do you prefer? | |
(def options {:option-1 SomeClass/OPTION_1}) | |
(defn foo [ option ] | |
(if (keyword? option) | |
(options option) | |
option)) | |
;; Or |
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 plugin-additions | |
(:require [clojure.java.io :as io] | |
[ccw.e4.dsl :refer :all] | |
[ccw.e4.model :as m] | |
[ccw.eclipse :as e] | |
[ccw.file :as f] | |
[ccw.core.user-plugins :as p])) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
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 lein-popup | |
(:require [ccw.e4.dsl :refer :all] | |
[ccw.leiningen.generic-launch :refer (generic-launch)])) | |
(defn launch [context] (generic-launch nil)) | |
(defcommand launch-lein-generic "Launch generic leiningen popup") | |
(defhandler launch-lein-generic launch) | |
(defkeybinding launch-lein-generic "Alt+L G") |
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 hello-world | |
(:require [ccw.eclipse :as e] | |
[ccw.e4.dsl :refer :all])) | |
(defn greet [context] | |
(e/info-dialog | |
"Hello world" "This popup provided to you from a user script")) | |
(defcommand greeter "Hello from CCW") | |
(defhandler greeter greet) |
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 lein-script-test | |
(:require [ccw.util.e4.dsl :refer :all] | |
[ccw.util.eclipse :as e] | |
[ccw.leiningen.generic-launch :as l])) | |
(defn greet [context] | |
(e/info-dialog "Hello world" "This popup provided to you from a user script")) | |
(defn launch [context] (l/generic-launch nil)) |
NewerOlder