Why (first [*' *]) instead of just *?

2016-08-05 Thread Shannon Severance
Lines 57--62 of https://github.com/clojure/math.numeric-tower/blob/master/src/main/clojure/clojure/math/numeric_tower.clj ;; so this code works with both 1.2.x and 1.3.0: (def ^{:private true} minus (first [-' -])) (def ^{:private true} mult (first [*' *])) (def ^{:private true} plus (first [+

Re: How do I upgrade nREPL?

2015-03-30 Thread Shannon Severance
I saw no difference in behavior, if I understood how to create the :dev profile: {:user {:plugins [[cider/cider-nrepl "0.9.0-SNAPSHOT"] [lein-pprint "1.1.2"]] :dependencies [[org.clojure/tools.nrepl "0.2.10"]]} :dev {:dependencies [[org.clojure/tools.nrepl "0.2.10"]]}}

Re: How do I upgrade nREPL?

2015-03-30 Thread Shannon Severance
Through some additional experimentation, I have found when I start Leiningen repl within a Leiningen project, the nrepl dependency from ~/.lien/profiles.clj is being used. nREPL 0.2.10 is started. This is true if I start via `lein repl` or `cider-jack-in`. The problem exists when starting free

How do I upgrade nREPL?

2015-03-29 Thread Shannon Severance
I would like to upgrade nREPL, but it appears I am still using version 0.2.6. My ~/.lein/profiles.clj: {:user {:plugins [[cider/cider-nrepl "0.9.0-SNAPSHOT"] [lein-pprint "1.1.2"]] :dependencies [[org.clojure/tools.nrepl "0.2.10"]]}} When I start lein repl britannia:

Re: Making cryptograms, my first Clojure function. Feedback welcome.

2013-06-18 Thread Shannon Severance
My wife informed me that cryptograms typically use the same substitutions for upper and lower case letters. If a becomes h, then A becomes H. Changes: 1. Revert to explicit strings for characters to shuffle, without using range and what not. 2. a-z mapping matches A-Z mapping 3. Com

Re: Making cryptograms, my first Clojure function. Feedback welcome.

2013-06-18 Thread Shannon Severance
on solving the puzzle. Stripping the context or shuffling them would make the problem harder. Too hard for intended audience. -- Shannon Severance On Thursday, June 13, 2013 11:49:34 AM UTC-7, Alan Thompson wrote: > > One thing that threw me at first was the double arg in the fu

Re: Making cryptograms, my first Clojure function. Feedback welcome.

2013-06-12 Thread Shannon Severance
Thank you all, I've learned something from each entry. My latest version, incorporating some of the changes suggested: (defn make-crypto [] (let [lower (map char (range (int \a) (inc (int \z upper (map char (range (int \A) (inc (int \Z digit (map char (range (int \0) (in

Re: Making cryptograms, my first Clojure function. Feedback welcome.

2013-06-11 Thread Shannon Severance
also uses all printable characters for the source > dictionary. > > https://gist.github.com/SegFaultAX/5754209 > > P.S. I accidentally posted this as a reply to an older question I happened > to have open. > > On Monday, June 10, 2013 6:16:03 PM UTC-7, Shannon Severance wro

Re: Making cryptograms, my first Clojure function. Feedback welcome.

2013-06-10 Thread Shannon Severance
lower upper digit) >(concat sl su sd)))] > (fn [s] > (apply str (map #(encrypt % %) s) > #'user/gen-crypto > user> ((gen-crypto) "abc")"ghm" > user> ((gen-crypto) "abc")"efz

Making cryptograms, my first Clojure function. Feedback welcome.

2013-06-10 Thread Shannon Severance
I'm new to Clojure, but with some lisp experience, I've dabbled in Scheme for a few years. Used Racket earlier this year for a couple of sectoins of a MOOC. And occasionally write Emacs lisp. The idea is to create cyptograms . These are word puzzles usi