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
(extend-protocol mp/PExponent | |
Number | |
(element-pow [m exponent] | |
(Math/pow (.doubleValue m) (double exponent))) | |
Object | |
(element-pow [m exponent] | |
(let [x (double exponent)] | |
(mp/element-map m #(Math/pow (.doubleValue ^Number %) x))))) |
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
Olli@Olli-MBRr ~/clojure/letusgogo | |
$ lein trampoline cljsbuild repl-rhino | |
WARNING: no :cljsbuild entry found in project definition. | |
-------------------------------------------------------------------------------- | |
WARNING: your :cljsbuild configuration is in a deprecated format. It has been | |
automatically converted it to the new format, which will be printed below. | |
It is recommended that you update your :cljsbuild configuration ASAP. | |
-------------------------------------------------------------------------------- | |
:cljsbuild | |
{:builds []} |
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
(defproject letusgogo "0.1.0-SNAPSHOT" | |
:description "Project for testing and fetching new libraries" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.5.1"] | |
[com.cemerick/pomegranate "0.0.13"] | |
[lein-kibit "0.0.8"] | |
[clj-http "0.7.2"] | |
[tailrecursion/boot.core "1.2.3"] |
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
user> (require '[cljs.repl :as repl]) | |
FileNotFoundException Could not locate cljs/repl__init.class or cljs/repl.clj on classpath: clojure.lang.RT.load (RT.java:443) |
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 project-euler.problem-3) | |
;; The prime factors of 13195 are 5, 7, 13 and 29. | |
;; What is the largest prime factor of the number 600851475143 ? | |
(def n 600851475143) | |
(defn factors [n] | |
(let [half (long (/ n 2))] | |
(filter #(= (rem half %) 0) (range 1 (inc half))))) |
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
06:18 *** luxbock JOIN | |
06:18 *** TOPIC Clojure, the language http://clojure.org | | |
Currently at 1.5.1; top analysts expect this to be | |
followed by newer versions with still higher | |
numbers: | |
https://github.com/clojure/clojure/blob/master/changes.md | |
| discussion: | |
http://groups.google.com/group/clojure | Trying to | |
convince others to use Haskell is permitted between | |
0200 and 0500 UTC. (technomancy on Tue Jan 14 |
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-nfg-strategy-list | |
[strategies] | |
(->> strategies | |
(map (fn [strat] | |
(add-braces (str/join " " (doall (map add-doublequotes strat)))) | |
;; (->> strat | |
;; (map add-doublequotes) | |
;; (str/join " ") | |
;; add-braces) | |
)) |
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
(defmacro mget-at [m at] | |
`(mget ~m ~@at)) | |
(defn payoffs-at [game at] | |
(let [payoffs (:payoffs game)] | |
(map #(mget-at % at) payoffs))) | |
CompilerException java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol, compiling:(/private/var/folders/j2/zvt92c1s39d_0kdmhrhbgtkm0000gn/T/form-init602105178864433939.clj:3:11) |
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
(message "THE USER CONFIG FILE WAS LOADED") | |
;; Configure: Add org-mode-dir/lisp/ to Emacs load-path | |
(add-to-list 'load-path "~/.emacs.d/plugins/org-8.2.5c/lisp") | |
(require 'org) | |
(require 'ox-publish) | |
;; Incise uses the new org-mode Export Framework (introduced in 8.0) See more | |
;; information here: |
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
(setq org-publish-project-alist | |
'( | |
("incise-org" | |
:base-directory "~/Development/clojure/incise-org-parser/resources/org/" | |
:base-extension "org" | |
:publishing-directory "~/Development/clojure/incise-org-parser/public/" | |
:recursive t | |
:publishing-function org-html-publish-to-html | |
:headline-levels 2 | |
:auto-preamble t) |
OlderNewer