I'm not sure if this helps but a quick glance at the github project you
linked to contains a pom file which uses the following maven coordinates:
com.amazon.alexa
alexa-skills-kit
1.1.1
You may want to try that in leiningen instead.
:dependencies [[org.clojure/clojure "1.6.0"]
I've recently been wondering about this. I'd say that I'm coming out of a
burnout period that I've been in for at least the last few months. Also,
reading things like hacker news gives me this feeling that I'm not doing
enough with my time -- which adds to the weight that I already feel on my
shoul
Awesome. Sounds very Nine Inch Nails like. Time for Trent Reznor to
get on some Clojure/Overtone ;-)
AJ
On Wed, Aug 15, 2012 at 6:50 AM, Sam Aaron wrote:
> Hey everyone,
>
> sorry, I couldn't resist posting this, but I'm getting real close to making
> decent music with Overtone now, and I jus
When I run the repl from leiningen (v2.0.0-preview6) I get the
Infinity exception. But when I run the repl straight from the
clojure.jar it works without error.
java -jar ~/.m2/repository/org/clojure/clojure/1.4.0/clojure-1.4.0.jar
AJ
On Tue, Jun 26, 2012 at 11:25 AM, Armando Blancas wrote:
>
Combine map with dorun and you get the same effect:
(dorun (map println logs))
http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/dorun
Allen
On Thu, Jun 7, 2012 at 11:32 PM, David Jacobs wrote:
> I would love to have a version of doseq that works like map (similar to
> "each
I think the current fix is to add this JS declaration before you
import your cljs generated js file. IIRC, this is only needed when
building without advanced optimizations.
var CLOSURE_NO_DEPS = true;
AJ
On Mon, May 14, 2012 at 9:21 AM, Murtaza Husain
wrote:
> Hi,
>
> I am using lein-cljs
The function passed to (defmulti) must take the same args as (defmethod).
Try this:
(defmulti halt
(fn [_ _]
(let [os (System/getProperty "os.name")]
(if (.startsWith os "Mac OS") :Linux (keyword os)
AJ
On Mon, May 7, 2012 at 4:53 PM, Jim - FooBar(); wrote:
> Following my earl
My example included a use of `map`. It is lazy and will work but you
have to be sure that you aren't using it in a way that would hold onto
the head of the sequence.
When experimenting in a repl it might not seem that it is lazy since
the repl will attempt to print the result of calling map when t
Do you have example code that is failing?
You should be able to use some of the items you listed as "problems".
Try something like this:
(->> (file-seq (io/file "/some/dir"))
(map println)
(dorun))
AJ
On Wed, May 2, 2012 at 12:26 AM, Sean Neilan wrote:
> I forgot to mention:
> (nth
This update should fix all reflection warnings.
Leiningen:
[com.mefesto/wabbitmq "0.2.1"]
Github:
https://github.com/mefesto/wabbitmq
Thanks,
Allen
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googleg
I received the following error when performing a `lein deps` for this
version [domina "1.0.0-beta4"]
Could not find artifact org.clojure:clojurescript:pom:0.0-1069 in
central (http://repo1.maven.org/maven2)
Could not find artifact org.clojure:clojurescript:pom:0.0-1069 in
clojars (http://clojars.o
WabbitMQ v0.2.0 has been pushed to clojars.
[com.mefesto/wabbitmq "0.2.0"]
This release contains the following updates:
* Updated RabbitMQ Java Client (v2.8.1)
* Updated Cheshire JSON library (v3.1.0)
* `consuming-seq` no longer depends on the deprecated QueueingConsumer class
Tested again
> So I've ended up writing the function with a conditional, like so. Is there
> a tidier way?
>
> (defn ls [x] (cond (list? x) (apply list x)
> (nil? x) '()
> :else (list x)))
If `x` is a list then is the call to `(apply list x)` necessary?
(defn ls [x]
(
You'd want to use one of the insert functions for that:
(defn add-user [user]
(sql/with-connection db
(sql/insert-record :books user)))
http://clojure.github.com/java.jdbc
Allen
On Fri, Jan 6, 2012 at 3:13 PM, jayvandal wrote:
> i am using leinningen and mysql example. I can select reco
On Wed, Nov 9, 2011 at 8:56 PM, Allen Johnson wrote:
> In your example yes, but you could make it atomic by placing the
> functionality in a function of it's own:
>
> ;; queue processing actions
> (defn process-item [queue]
> (println "Processed item:" (peek qu
In your example yes, but you could make it atomic by placing the
functionality in a function of it's own:
;; queue processing actions
(defn process-item [queue]
(println "Processed item:" (peek queue))
(pop queue))
;; usage
(let [queue (atom (into PersistentQueue/EMPTY [1 2 3]))]
(swap! que
Just wanted to add the Apache commons codec has a base64
encoder/decoder. With a quick test I was able to encode a ~100MB file
in 2.3sec. Example code below:
In leiningen: [commons-codec "1.4"]
(require '[clojure.java.io :as io])
(import '[org.apache.commons.codec.binary Base64OutputStream])
(de
In addition, there is org.clojure/data.csv which says it works with
Clojure 1.2 and 1.3.
https://github.com/clojure/data.csv
Allen
On Tue, Oct 4, 2011 at 2:42 PM, Laurent PETIT wrote:
> Self answer : either clojure-csv for full NIH clojure solution (
> http://github.com/davidsantiago/clojure-cs
> Yep, you're supposed to add everyone by hand and yes, it is totally unwieldy.
> That's the way it is right now.
> Circles are private and every user is supposed to make their own.
I'm definitely liking it so far. Although I do find myself avoiding
public posts to avoid spamming everyone in the C
> Please add link to your profile below.
https://plus.google.com/101461247790324463561/posts
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are
On Thu, Jul 7, 2011 at 4:27 PM, octopusgrabbus wrote:
> This code
>
> (defn ret-odd
> [seq-val]
> (if (not (nil? seq-val))
> (if (odd? seq-val)
> seq-val)))
>
> (def my-seq '(1 2 3 4 5 6 7 8 9))
>
> (map ret-odd my-seq)
>
> finds the odd numbers, but also returns nil. How do I find just
> Thanks Allen, it works, I did not know the loc can be treated like a hash.
'loc itself isn't a map even though zip/edit makes it seem that way.
Behind the scenes zip/edit calls (zip/node loc) which will return a
map, at least in the case of this xml example. zip/edit then applies
the function yo
> Does anyone know how to update xml element attribute value on the zipper
> data structure?
> I have something like
>
>
>
>
> (:require (clojure [xml :as xml] [zip :as zip])
> [clojure.contrib.zip-filter.xml :as zf])
> (let
> [src (-> "c:/my.xml" io/file xml/parse zip/xml-zip)
>
> lein-ring use it when it's present rather than generating one.
Much better idea :)
Allen
> Just a thought from the suffering equine department. :-)
>
> - Chas
>
> On May 23, 2011, at 8:48 PM, Allen Johnson wrote:
>
>> On a related note. About a month or two
his up and contact weavejester to see if it's something
worth incorporating.
https://github.com/mefesto/lein-ring/commit/3016142e1c7aadc77d273453e04f9196319406a2
Allen
On Mon, May 23, 2011 at 7:43 PM, Allen Johnson wrote:
> I'm also interested in this topic. It was discussed briefly o
I'm also interested in this topic. It was discussed briefly on the
clojure-web-dev mailing list a little while ago. What I've been doing
is something like this:
# lein ring project
myapp/
config/
production/WEB-INF/myapp.properties
development/WEB-INF/myapp.properties
test/WEB-INF/my
it's default behavior matches the core version, exposing it
> with the same name seems reasonable too since it won't break anyone's
> code (right?).
Won't break any of my stuff :)
Allen
> On Wed, May 4, 2011 at 4:06 PM, Phlex wrote:
>>
>>
>> On 3
ehavior matches the core version, exposing it
>> with the same name seems reasonable too since it won't break anyone's
>> code (right?).
>>
>> Sean
>>
>>
>>
>>
>>
>>
>>
>> On Wed, May 4, 2011 at 4:06 PM, Phlex wrote:
IMHO c.j.j/resultset-seq should perform something like the following:
;; i want my columns as strings exactly how they are in the db
(resultset-seq rs)
(resultset-seq rs identity)
;; i want my columns as lower-case keywords
(resultset-seq rs (comp keyword lower-case))
;; i want my columns as upp
Oops, didn't see this message from Stuart Sierra:
http://groups.google.com/group/clojure/browse_thread/thread/39adfb3ae7c4dab0
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that pos
> What's with http://clojure.org/ website? Is it expired?
I'm also having trouble accessing this. I receive a "Renew your domain
name now" page.
Allen
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googl
> Is there some way to convince Jetty (or tomcat, or ...) to run the
> init methods of a servlet before the first request comes in? Or maybe
> a pointer to the appropriate forum?
You can tell a servlet to init on startup with something like this in
your web.xml:
test-servlet
myapp.servlet
> I'm sure I've covered only a very small proportion of Clojure
> libraries out there, so if you'd like to suggest a project that's not
> on there, please do so in this thread, or in an email to me. I'll try
> and update the site as quickly as possible.
How about: Messaging > WabbitMQ
https://git
Here is my attempt using enlive:
(require '[net.cgrand.enlive-html :as html])
(import '[java.net URL]))
(def *url* "http://api.twitter.com/1/statuses/friends/barackobama.xml";)
(defn print-friends [url]
(let [data (html/xml-resource (URL. url))]
(doseq [user (html/select data [:user])]
Hey everyone. WabbitMQ is a simple Clojure wrapper for RabbitMQ's Java
client v2.2.0. This is my first release and as such I'm sure there are
plenty of mistakes and/or non-clojure-isms. Feedback welcome! :)
https://github.com/mefesto/wabbitmq
Allen
--
You received this message because you are s
> I can't see where the variables are boxed into objects. Both the loop
> and the let declare them as primitives if they are given primitives.
> Perhaps they are already objects before they reach the inc and dec
> function calls in the recur, but if so, it's a mystery to me why.
Yeah that is inter
Here is my attempt. I changed the divide to use unchecked-divide-int
and explicitly cast recur values to long.
http://clojure.pastebin.com/xs79ruw1
Allen
On Sat, Jan 1, 2011 at 5:47 PM, Albert Cardona wrote:
> Hi all,
>
> I'd apreciate help on figuring out why a loop gets number boxing
> warnin
ow I know .. :) thanks Allen.
> Sunil.
>
> On Fri, Dec 31, 2010 at 8:19 PM, Allen Johnson
> wrote:
>>
>> This worked for me on 1.3.0:
>>
>> (aset-int (make-array Integer/TYPE 3 4 5) 1 2 3 -1)
>>
>> Might have something to do with the enhanced primit
This worked for me on 1.3.0:
(aset-int (make-array Integer/TYPE 3 4 5) 1 2 3 -1)
Might have something to do with the enhanced primitive support which
causes array handling to be stricter than it was in 1.2? Just a guess.
Allen
On Fri, Dec 31, 2010 at 8:53 AM, Sunil S Nandihalli
wrote:
> Hello
JAX-WS 2.1 is pretty good and included in Java 6.
On Wed, Dec 29, 2010 at 11:55 AM, Sean Devlin wrote:
> Anyone know of a good soap client for Java?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojur
Perhaps it has something to do with the underscore in the namespace.
What if you try something like this in the repl:
(require 'project-name.foo)
(project-name.foo/my-fn)
Allen
On Wed, Dec 29, 2010 at 10:49 AM, Nicholas Wieland
wrote:
> Hi *,
> I'm a bit ashamed but considering that I'm a newb
+1
On Fri, Dec 3, 2010 at 10:25 PM, ka wrote:
> I'm also stuck with the same issues: 1. no option to get string keys
> 2. I don't understand, why do libs go through the trouble of
> downcasing ?
>
> Having said that I totally agree with the point Ryan makes: >> A
> greater feature of clojure is i
I think annotations support was added in 1.2. Could we add some
information to the Java Interop section regarding this?
https://groups.google.com/group/clojure/browse_thread/thread/d2128e1505c0c117?pli=1
Allen
On Sat, Oct 30, 2010 at 10:38 PM, Alex Miller wrote:
> Hi all,
>
> I'm doing a bit of
Oops,
s/create an instead/create an instance/
:)
On Mon, Aug 23, 2010 at 10:03 AM, Allen Johnson wrote:
>> (:1 Should the clojure source files intermingle with the java source files,
>> each according to it's relavance to the problem, or should there be a top
>> level
> (:1 Should the clojure source files intermingle with the java source files,
> each according to it's relavance to the problem, or should there be a top
> level separation between them?)
IMO, they should be separated. Since the project was started with Java
I'd continue treating it as the top-lev
+1 on Dalvik compiler :)
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this g
include the following jars in the classpath:
http://commons.apache.org/dbcp/downloads.html
http://commons.apache.org/pool/downloads.html
Allen
On Sat, Jul 10, 2010 at 12:55 PM, Allen Johnson wrote:
> To test with pooled DB connections I thought I'd mention Apache Commons
> dbcp. It
To test with pooled DB connections I thought I'd mention Apache Commons
dbcp. Its a generic connection pool library that could be used for any jdbc
connection.
I'd post a example clojure usage but I'm afk atm. The lib's BasicDataSource
is probably all you'd need.
Depends on Commons pool. Just pla
Opened ticket #360 for this.
https://www.assembla.com/spaces/clojure/support/tickets/360-nullpointerexception-on-disj
Thanks.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that pos
Hey everyone. I was playing around with the protocols/deftype stuff
and ran into a weird NullPointerException when calling the satisfies?
function. Seems to only happen with a java.lang.Object instance.
Clojure 1.2.0-master-SNAPSHOT
user=> (defprotocol Greeter (greet [this]))
Greeter
user=> (satis
Sorry about the duplicated paragraph. My laptop touch pad is a pain.
On Sun, Apr 25, 2010 at 4:17 PM, Allen Johnson wrote:
>> What seems to be happening is that when I build my 'gen-class' package, the
>> class is nailed down even though logging.clj itself is not ge
> What seems to be happening is that when I build my 'gen-class' package, the
> class is nailed down even though logging.clj itself is not gen-classed.
I'm not familiar with GAE but as a workaround can you include the
commons-logging.jar in your war file? Then configure commons-logging
to delegate
Oops, just saw the error in send-message as I replied. StatusMap
should (get recipient).
(defn send-message! [xmpp recipient body]
(let [status (.sendMessage xmpp (create-message recipient body))
result (.. status getStatusMap (get recipient))]
(= SendResponse$Status/SUCCESS result))
Here's my attempt. I don't think you can do much about the imperative
style when you are calling Java APIs unless someone was nice and wrote
a clojure wrapper. But I'm just a n00b.
---
(ns example.servlet.xmpp
(:use[clojure.contrib.logging])
(:import [xmpp.package.here XMPPServiceFactory M
`showDialog` is a static method. Maybe something like below would work?
(JColorChooser/showDialog parent "Choose Color" bisque)
Allen
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note
I'm just learning lisp but wouldn't a macro be overkill?
; manually add each item
(doseq [item items]
(.add obj item))
; or wrapped in a function
(defn add-all [obj items]
(doseq [item items]
(.add obj item)))
(add-all obj items)
If your java object had an addAll method that accepted a
~obj ~item
(my-doall obj add ["item1" "item2" "item3"])
Allen
On Tue, Dec 15, 2009 at 1:04 PM, Allen Johnson wrote:
> I'm just learning lisp but wouldn't a macro be overkill?
>
> ; manually add each item
> (doseq [item items]
>
57 matches
Mail list logo