David Nolen writes:
> Waiting for contrib authors to sort out their libraries seems
> unrelated as to whether 1.3 should or should not be released. That's
> like delaying Python 3 because libraries don't support it yet. It
> still wouldn't be released.
Except that Python 3 comes bundled with many
limux writes:
> The clojure has released the 1.2 version, while swank-clojure.el is
> used 1.1 yet, Is swank-clojure deprecated at all?
Well, to be more precise; yes, swank-clojure.el is now unnecessary. You
only need clojure-mode and slime. But see Phil's page for the details.
-Steve
--
You
limux writes:
> The clojure has released the 1.2 version, while swank-clojure.el is
> used 1.1 yet, Is swank-clojure deprecated at all?
Nope. Version 1.3 was just released. Take a look here for more info:
https://github.com/technomancy/swank-clojure
-Steve
--
You received this message becau
Chris Maier writes:
>> (if window-system (set-exec-path-from-shell-PATH))
>
> This was a huge help for me, but I had to replace the "-i" flag with
> "--login" in order to fully replicate my path that I see in Terminal.
> I have a few things set in /etc/paths.d (TeX, X11, and git,
> specifically),
javajosh writes:
> (conflicting advice snipped)
>
> If we can reach consensus on best (easiest, least error-prone) path to
> getting a working emacs clojure environment up on OSX I'll happily
> execute and even write up my experience.
I think there is consensus; the respondents to this thread se
javajosh writes:
>> failing to load in the error message and all, I'd try that.
> I would still like to see slime in action, however. I have two emacs
> installed, GNU and Aquamacs. macports is still not able to do anything
> - I'm actually rather concerned about it's health.
>
> $ emacs --version
Miki writes:
> user=> (time (remove nil? (repeat 100 nil)))
> "Elapsed time: 0.079312 msecs"
> ()
> user=> (time (filter identity (repeat 100 nil)))
> "Elapsed time: 0.070249 msecs"
> ()
>
> Seems like filter is a bit faster, however YMMV
You're not timing the execution, just the constru
David Nolen writes:
> On Mon, Oct 11, 2010 at 10:02 AM, Steve Purcell
> wrote:
>
> Well, taking a brief look over your code, it seems like the main
> difference is that scriptjure is macro-based, so all the code
> generation
> gets done at compile-ti
s into the javascript source
sexps.
-Steve
jim writes:
> I've heard of scriptjure but never used it or looked at it. My
> interests took me in another direction and I've never circled back. I
> would be interested to know how the differ.
>
> Thanks,
> Jim
>
&
jim writes:
> Due to popular demand*, I resuscitated my code to generate javascript
> from s-expressions. This was what I coded to learn about logic
> programming in Clojure.
>
> Github: http://github.com/jduey/js-gen
> Clojars: http://clojars.org/net.intensivesystems/js-gen
>
> *actually it was
Mark Engelberg writes:
> I've been using clojure with mongodb for a while now. I found that
> using a nosql database system was very freeing and pleasurable,
> compared to the python/sqlite combination I'd used before. However,
> I'm starting to bump up against some limitations:
> 1. On my 32-b
You can file the bug as a support ticket without a CA here:
http://www.assembla.com/spaces/clojure/support/tickets
-Steve
Daniel Janus writes:
> Hi,
>
> c.c.json/json-str seems to handle maps with keys containing quotes
> incorrectly:
>
>> (println (json-str {"\"" 1}))
> {""":1}
>
> ...while I
Christian Guimarães writes:
> Everybody here has a common interest. Clojure. And I think that all people
> here can contribute with relevant informations. So, why not follow the guys
> from this list.
>
> Interested? Add your twitter account bellow.
>
> Cheers.
>
> @csgui (Christian Guimaraes)
On 27 Aug 2010, at 19:40, santervo wrote:
> Also, if i hold AltGr down after typing "{" (AltGr-7) when pressing
> space button, i get this:
>
> user=> { :a "b" }
> java.lang.Exception: Unable to resolve symbol: :a in this context
> (NO_SOURCE_FILE:0)
Note from the spaces in the error message t
Odd. My patch works for me, and MHOOO's code simply applies a very similar
patch at runtime, so I'd guess that your swank code is getting loaded from a
location other than the one you patched.
I guess Phil's very busy, but if he can apply this patch, then the regular
swank-clojure 1.3.0-SNAPSHO
On 18 Aug 2010, at 13:51, MHOOO wrote:
> I'm experiencing the exact same problem. Haven't found a way to fix
> this yet.
I've fixed the problem in my fork of swank-clojure and requested that Phil pull
the commit into the master repo:
http://github.com/purcell/swank-clojure/commit/7172c275f
On 17 Aug 2010, at 21:21, Steve Molitor wrote:
> Sorry my message got truncated. Let's try again:
>
> Fuzzy completion (ac-source-slime-fuzzy) isn't working for me. It complains
> that the function slime-fuzzy-completions is not defined. I'm using slime.el
> version 2010404, which does not d
On 17 Aug 2010, at 13:00, Steve Purcell wrote:
> That seems to be a slime/swank problem, related to accessing the
> documentation for a symbol corresponding to a namespace. In a clojure-mode
> buffer, use M-: to execute the following expression:
>
> (slime-eval '(swank:
On 17 Aug 2010, at 09:38, Stefan Kamphausen wrote:
> Hi,
>
> just yesterday I took a first look at auto-complete together with your
> slime auto completion sources.
>
> I'm encountering some Exceptions, though,
>
> If I'm in a .clj-buffer and start typing
>
> (clojure.
>
> and then wait for
On 15 Aug 2010, at 10:13, Michał Marczyk wrote:
> On the other hand, I'm having mixed luck with fuzzy completion...
> slime-fuzzy-complete-symbol offers 'with-bindings and 'with-bindings*
> as completions for 'wi-bi, but so far I haven't been able to provoke
> ac + ac-slime to do the same (with (l
On 15 Aug 2010, at 10:43, sponge bob wrote:
>
> On 14 авг, 14:19, Steve Purcell wrote:
>>
>> A while ago I hooked Slime's completion and documentation features into the
>> popular Emacs auto-completion framework "auto-complete"
>> (http://www.em
On 15 Aug 2010, at 08:45, Michał Marczyk wrote:
> This is absolutely awesome! I notice it also works perfectly with
> Common Lisp... I'm in a state of blissful exaltation. :-)
Excellent - so if there are any quirks with this plugin, at least there'll be a
couple more users to help fix it up now
Hi all,
A while ago I hooked Slime's completion and documentation features into the
popular Emacs auto-completion framework "auto-complete"
(http://www.emacswiki.org/emacs/AutoComplete).
Since it may be of interest to others, I've released the completion plugin on
github: http://github.com/pur
On 13 Aug 2010, at 11:40, James Reeves wrote:
> I think it would be worth adding some charset setting middleware to
> Ring, though, and perhaps document this behaviour.
+1 -- character encoding is exactly the kind of thing one would want to set up
application-wide.
-Steve
--
You received thi
On 10 Aug 2010, at 19:19, Mike Meyer wrote:
> On Tue, 10 Aug 2010 09:57:02 -0700 (PDT)
> Alexis Rondeau wrote:
>> What I would like to do is to enable clojure-mode when I get my REPL
>> (connected either via swank-clojure-project or lein swank/M-x slime-
>> connect) but whenever I do M-x clojure-
On 8 Aug 2010, at 04:56, Michał Marczyk wrote:
> Yet another version:
>
> (defn take-while-acc [f pred coll]
> (map (fn [_ x] x)
> (take-while pred (reductions f coll))
> coll))
>
> Seems to work:
>
> user> (take-while-acc + #(< % 100) (range))
> (0 1 2 3 4 5 6 7 8 9 10 11 12 13)
On 7 Aug 2010, at 20:23, gary ng wrote:
> On Sat, Aug 7, 2010 at 8:14 AM, Steve Purcell wrote:
>> Oh, right, so maybe:
>> (last (take-while #(< (apply + %) 100) (reductions conj [] (iterate inc
>> 0
>> => [0 1 2 3 4 5 6 7 8 9 10 11 12 13]
>> -Steve
>
I would envision some accumulator passed to pred.
> This examples takes elements while their total sum is less than 100.
>
> 2010/8/7 Steve Purcell
> On 7 Aug 2010, at 11:15, bonega wrote:
>
> > Hi.
> >
> > Are there some function like this:
> >
> > (defn ta
On 7 Aug 2010, at 11:15, bonega wrote:
> Hi.
>
> Are there some function like this:
>
> (defn take-while2 [f pred coll] ...
>
> usage: (take-while2 + #(< % 100) (iterate inc 0))
> returns: (0 1 2 3 4 5 6 7 8 9 10 11 12 13)
I'm feeling a bit stupid because I can't see from the above example ho
On 30 Jul 2010, at 15:03, Base wrote:
> Hi All
>
> I have a vector in the following format:
>
> [
>["M" "3.4" "5.6"] ["L" "4.2" "6.6"] ["L" "4.9" "7.9"] ["L" "1.1"
> "2.4"]["L" "5.4" "4.5"]
> ]
>
> I would like to create a vector that contains the max values of each
> of the second and thir
On 26 Jul 2010, at 17:30, tguy wrote:
> When developing a web app, my preference would be to edit files using
> SLIME with lein swank like all of my other development. So, I should
> be able to start and stop the server from the repl and can reflect my
> changes in the browser simply by reloading
On 12 Jul 2010, at 16:13, aria42 wrote:
> Is there a way to set up a map so that there is a default function
> which depending on the key returns a value if one is not present in
> the map. I can obviously write this with a deftype and have it
> implement Associative, Seqable, etc. so it behaves l
On 27 Jun 2010, at 09:42, David Beckwith wrote:
> Approximately how much RAM is required to deploy a small Ring app on
> 64-bit Ubuntu?
That rather depends on the deployment method, app server, and whether it's
sharing a servlet container with other apps. By the time the JVM has loaded the
clo
On 14 Jun 2010, at 12:37, Steve Purcell wrote:
> On 14 Jun 2010, at 01:14, Todd wrote:
>
>> I'm attempting to write a simple histogram function:
>>
>>
>> (defn create-histogram [f]
>> (let
>> [words (read-lines f)
>>histo {}]
>&g
On 14 Jun 2010, at 01:14, Todd wrote:
> I'm attempting to write a simple histogram function:
>
>
> (defn create-histogram [f]
> (let
>[words (read-lines f)
> histo {}]
>(doall
> (map
>(fn [w] (assoc histo w (+1 (get histo w 0
>words))
>histo))
>
> (crea
On 12 Jun 2010, at 16:18, Russell Christopher wrote:
> You're right. Hope I haven't offended with the fail, I thought I had tested
> it - by iterating over a range and comparing it to Uncle Bob's but obviously
> I didn't do that right and then realized that factorization is likely not
> O(n) an
On 11 Jun 2010, at 20:35, Russell Christopher wrote:
> didn't need the assoc in my previous try
>
> (defn of [n]
> (letfn [(f [res k]
> (if (= 0 (rem (:n res) k))
>{:n (/ (:n res) k) :fs (conj (:fs res) k)}
>res))]
> (:fs (reduce f {:n n :fs
On 11 Jun 2010, at 08:59, Nathan Sorenson wrote:
> Is there a way to fold over multiple sequences, in the same way that
> 'map' can apply a multi-parameter function over several seqs? In other
> words, is there a function like this:
>
> (defn reduce*
> [f val & colls]
> (reduce (fn [a
On 10 Jun 2010, at 12:22, Dave Pawson wrote:
> http://richhickey.github.com/clojure-contrib/command-line-api.html
>
> Where might I find information on the 'cmdspec' mentioned please?
If you click on the "source" link there is a nice example at the bottom.
-Steve
--
You received this message
On 7 Jun 2010, at 12:43, Steve Purcell wrote:
> Empty seqs are logically true, so your "if" condition is always true.
Apologies; I'm talking rubbish:
user=> (if '() (println "truthy"))
truthy
nil
user=> (if (seq '()) (println "truthy"
On 6 Jun 2010, at 15:30, Jon Seltzer wrote:
> I'm still learning Clojure and doing so by reading everything on
> clojure.org. I ran across this example in the Functional Programming
> section:
>
> (defn my-zipmap [keys vals]
> (loop [my-map {}
> my-keys (seq keys)
> my-vals (seq
On 7 Jun 2010, at 04:28, Dave Pawson wrote:
> On 6 June 2010 13:35, Moritz Ulrich wrote:
>> Note the "Added in Clojure version 1.2" in the documentation of numerator ;-)
>
>
> Not until I'd blown up the text.
> Don't expect text that size to be read by everyone?
If the text is illegible to yo
On 28 May 2010, at 11:39, Philip Hudson wrote:
> I've been trying for the best part of a month to get
> SLIME/SWANK/Clojure/clojure-mode working in emacs 23.2 on Mac OS X 10.5
> without using ELPA, which unfortunately seems to break everything including
> itself in my setup.
>
If it helps, I
On 22 May 2010, at 20:38, Kasim wrote:
> Hi folks,
>
> I am just asking you guy's input to following:
>
> (defn- k-filter [el coll]
> (filter #(not (= el %)) coll))
>
> (defn combinations [n coll]
> (if (= n 0)
>nil
>(for [el coll nlis (combinations (- n 1) (k-filter el coll))]
>
Before anyone spends time investigating, this has been accepted as an issue:
https://www.assembla.com/spaces/clojure/support/tickets/353
My workaround for now is to use reify in place of deftype.
-Steve
On 20 May 2010, at 13:43, Steve Purcell wrote:
> I'm loving protocols, bu
I'm loving protocols, but I keep having to restart my JVM to avoid a puzzling
issue when changing protocol definitions.
Here's the simplest way to reproduce the problem:
Start with file protoproblem/proto.clj:
(ns protoproblem.proto)
(defprotocol Steps
(one [x])
(two [x]))
On 12 Apr 2010, at 13:46, Steve Purcell wrote:
> On 12 Apr 2010, at 09:39, Bytesource wrote:
>> For example, I tried to implement the "insertion sort" in Clojure but
>> could not figure out how to "swap" values and get the recursion
>> right.
>
>
On 12 Apr 2010, at 09:39, Bytesource wrote:
> Hi,
>
> I am new to Clojure and currently reading "Programming Clojure" (just
> finished the chapter on concurrency).
>
> I would like to know if there is a collection of common algorithms
> written in Clojure to get a better feel for the language an
On 10 Apr 2010, at 08:46, Yuto Hayamizu wrote:
> Hi, all
>
> I want some list functions in Haskell like mapAccumL in
> clojure.contrib, because some sequence operations are difficult with
> only functions in clojure.core and contrib.
>
> Think about writing a function 'accum-seq', which takes a
Which looks the same as clojure.contrib.seq/reductions to me...
-Steve
On 20 Mar 2010, at 13:54, Per Vognsen wrote:
> Learn to love scan: http://gist.github.com/338682
>
> -Per
>
> On Sat, Mar 20, 2010 at 12:13 PM, Douglas Philips wrote:
>> Hello all,
>> I'm new to clojure, but not lisp.
>
On 9 Mar 2010, at 23:22, Michał Marczyk wrote:
> In the way of early feedback -- that's looks super neat! I've got this
> instant feeling that this would be a great clojure.contrib.memoize.
+1
That would be wonderful.
--
You received this message because you are subscribed to the Google
Group
On 8 Mar 2010, at 13:59, Luka wrote:
> Other thing I would like to ask is how can I see what is different in
> 40 github clones of clojure.contrib without clicking on every clone?
Either:
1. Use the github network browser:
http://github.com/richhickey/clojure-contrib/network
(use left/ri
On 1 Mar 2010, at 12:26, Volkan YAZICI wrote:
> When I compile an expression via C-c C-c in SLIME -- assuming *warn-on-
> reflection* is turned on -- reflection related warnings don't appear
> neither in the REPL, nor in the inferior lisp buffer. Everytime, I
> have to paste the code the REPL manu
On 15 Feb 2010, at 13:58, Steve Purcell wrote:
> On 15 Feb 2010, at 13:50, Glen Rubin wrote:
>
>> Thank you so much This is really wonderful advice...saved me
>> months of learning. I have rewritten my code as follows:
>
>
> You'll want to use &qu
On 15 Feb 2010, at 13:50, Glen Rubin wrote:
> Thank you so much This is really wonderful advice...saved me
> months of learning. I have rewritten my code as follows:
You'll want to use "let" in place of all of those "def" declarations.
-Steve
--
You received this message because you are
On 14 Feb 2010, at 13:20, ka wrote:
> I'm trying to make a function which gives the n! permutations of a
> vector of n things. Here is my first attempt :
>
> (defn permute
> "Gives the n! permuations of the input vector of things"
> [v]
> (if (= 1 (count v)) (list [(v 0)])
>(loop [i 0 perm
On 14 Feb 2010, at 09:34, Steve Purcell wrote:
> In my master branch (freshly forked from Phil's repo) I've applied Richard's
> patch, plus the following recent branches from the swank-clojure network on
> github (http://github.com/technomancy/swank-clojure/network)
On 13 Feb 2010, at 23:22, Phil Hagelberg wrote:
> Even without CL experience, just
> gathering up the various patches into one branch and seeing what works
> and what doesn't would be very helpful too.
I'll bite:
http://github.com/purcell/swank-clojure
In my master branch (freshly forked fro
On 13 Feb 2010, at 19:03, Richard Newman wrote:
>> The above thread suggests defining *err* as a PrintWriter instead of
>> as a Writer. Has this been patched, and is it official? If so, I'll
>> patch clojure-swank to use PrintWriter. If not, I'll patch
>> clojure.contrib.sql to not use println.
On 8 Feb 2010, at 16:53, Boris Mizhen - 迷阵 wrote:
> Hello all,
>
> I am playing with the idea of a little library for dependency injection.
> The idea is to declare injectable values as metadata-to-function map.
> I started with a sketch of what the client code may look like.
>
> Please let me k
I think you'll have to use "exception#" instead of "exception", in order to
generate a local symbol. Otherwise, the quoting will try to resolve "exception"
in the current namespace.
Also, don't expand "~url" more than once -- what if the expression passed for
"url" has side effects? It would ge
On 23 Jan 2010, at 02:53, James Reeves wrote:
> On Jan 23, 2:29 am, David Cabana wrote:
>> What I'd like to get from 'tickets' is something like ( ["Alice"
>> ["foo"]] ["Bob" ["bar" "baz"]]), that is, output that ties incidents
>> to customers. So far it has eluded me.
>
> "xml->" just returns
I believe some people use HttpUnit for this purpose. It's a very full-featured
HTTP client. YMMV.
On 23 Jan 2010, at 01:25, Richard Newman wrote:
>> And as for Apache HttpComponents, it sounds like they don't grok the
>> notion that breaking backwards compatibility should only occur with a
>> m
For those who didn't click through, this is a really nifty code paste site that
will actually run your pasted code and display the output next to the paste.
Worth a look; it's a nice piece of work.
-Steve
On 15 Jan 2010, at 21:23, sphere research wrote:
> Hi,
>
> test Clojure on ideone.com
Gabi wrote:
> I think you should do "(binding [*print-dup* true] (pr-str value).."
> instead of just (pr-str value) in the encode-value function. (line 20
> in redis_memo.clj)
>
> On Jan 4, 2:55 pm, Steve Purcell wrote:
>> Read the code I posted in this t
Indeed, thanks - I realized that earlier today myself!
-Steve
On 5 Jan 2010, at 09:24, Gabi wrote:
> I think you should do "(binding [*print-dup* true] (pr-str value).."
> instead of just (pr-str value) in the encode-value function. (line 20
> in redis_memo.clj)
>
>
Read the code I posted in this thread and put up on github after you expressed
interest.
That's part of what it does, using the reader/printer representation.
Alternatives would include standard Java binary serialisation or 3rd party
libraries (Hessian/Burlap?).
-Steve
On 4 Jan 2010, at 12:1
uch interest. What if I stored a shared data
> structure in redis (only because its the fastest), using your memoize
> variant, and process (maybe even updated it) it in parallel from
> different Clojure nodes. Some kind of primitive map/reduce mechanism I
> think.
>
> On De
Indeed -- that works nicely. I tried going back to a completely non-ELPA-ized
setup, but it was too painful; the trick was installing technomancy's github
repo of slime *in addition* to the ELPA packages, which all depend on each
other.
-Steve
On 31 Dec 2009, at 16:44, william douglas wrote:
Well, it clearly works for Lau, but then he says in one of the screencasts that
he's using an old version of Slime; if you install technomancy's slime package
from ELPA, I believe you don't get all the slime extensions, which would easily
explain why the fuzzy completion doesn't work. I'm using
Not sure if it's any help, but here's a variant of memoize I wrote, which
stores arbitrary readable/printable objects to redis:
http://gist.github.com/266689
(If there's any interest, I'll wrap it up in a github project and push it to
clojars.)
Redis isn't a hierarchical store, so its array/se
Here's a good start:
http://www.google.com/search?hl=en&q=site:github.com+clojure
But the best plan is to start using clojure for real work, then contribute to
the open source tools you find yourself using.
-Steve
On 23 Dec 2009, at 02:27, Kasim wrote:
> I am just thinking if anyone can lis
I came across this problem too, and David's patch helps, to a certain extent.
Additionally, without David's patch, the "src" and "test" directories of the
current project don't get added to the classpath one sees from inside swank.
(All the jars upon which leiningen depends *are* in the classpat
On 7 Dec 2009, at 11:15, Lauri Pesonen wrote:
> 2009/12/4 Steve Purcell :
>>
>> Here's what I do (in Cocoa Emacs 23) to make 'option' work the same in Emacs
>> as in other OS X apps:
>>
>> (setq mac-command-modifier 'meta)
>> (set
On 4 Dec 2009, at 10:18, balln...@googlemail.com wrote:
> Emacs / clojure-mode:
> [...]
> Sorry but Emacs is unfamiliar to regular developers
>
> VimClojure:
> similar to clojure-mode setup ... separate downloads, builds,
> configs ...
> and then it does not work out of the box or you need to rea
On 4 Dec 2009, at 09:41, Lauri Pesonen wrote:
> How do you type ''#' in the Cocoa build of Emacs 23 (I'm on a UK
> keyboard and in OS X apps I type option-3 to get'#')? Aquamacs has a
> mode where option-3 is interpreted as '#' rather than a meta-3 which
> takes care of my problem, but I haven't f
e to start a repl. Now if you
> are at the end of a sexpr C-x C-e should send it to the REPL.
Getting slime installed and configured would be the next step after getting
clojure-mode installed.
-Steve
>
>
> On Dec 1, 7:19 am, Steve Purcell wrote:
> > Theinstallationpage
The installation page for ELPA tells you how to install ELPA itself and to show
a list of installable packages: http://tromey.com/elpa/install.html
That should work fine in Aquamacs.
When you've got as far as the package list, press 'i' next to the clojure
entry, then "x". These steps should ge
78 matches
Mail list logo