Hi,
On 2 Nov., 07:41, Meikel Brandmeyer wrote:
> Hi,
>
> On 2 Nov., 03:25, Mike K wrote:
> The map destructuring in the defn is a special case of defn, not
> destructuring itself.
>
> (defn foo [& {:keys [a b]}] ...)
>
> is equivalent to
>
> (defn foo [& options#] (let [{:keys [a b]} (apply has
2010/10/31 Steven Arnold :
> Hello, I am trying to use the str-utils library with Clojure (or the
> str-utils2, I understand str-utils was deprecated). Neither of these
> work for me. I am on OS X 10.6.4 and have installed clojure-contrib
> via the MacPorts system. The clojure-contrib is in my c
Hi,
On 2 Nov., 03:25, Mike K wrote:
> (print-value-a [:b 7 :a 3])
> ; actually prints nil
You have to use apply. (apply print-value-a [:b 7 :a 3]).
Furthermore: how could (let [{a :a} [:b 7 :a 3]] [a]) possibly work?
Vectors are indexed by integers.
user=> (let [{a :a} [:b 7 :a 3]] [a])
[nil]
2010/11/1 tonyl :
> I was wondering since it uses the dispatch macro and AFAIK
> there is no api fn to create them like hash-maps to create maps,
> vector/vec for vectors, or list for lists.
There are parallels to 'hash-map' and 'sorted-map' in the api:
user=> (hash-set :a :b :c)
#{:a :c :b}
user
On Mon, 1 Nov 2010 19:25:59 -0700 (PDT)
Mike K wrote:
> This question is a bit abstruse, so please bear with me :-)
[elided]
> So this can't be how it works, but I don't know how else to interpret
> the documentation. Is this a special case meaning "if there are
> optional arguments AND they are
This Q came up on the Leiningen list but I wanted to share my answer
on the larger Clojure group to get feedback from a bigger pool...
On Mon, Nov 1, 2010 at 8:40 PM, Shantanu Kumar wrote:
> There are some resource files (e.g. dbconfig.properties) I need to
> include in code so that they are on t
> > I'm particularly interested in:
> > - new user groups or suggestions for the community page
Montreal Clojure group: http://www.bonjure.org/
Thank you kindly
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo
This question is a bit abstruse, so please bear with me :-)
Here is an example of a function with named arguments and default
values from the book "The Joy of Clojure". It uses optional arguments
(via &) and map destructuring.
(defn slope
[& {:keys [p1 p2] :or {p1 [0 0] p2 [1 1]}}]
(float (
Consider using some implementation of persistent data structures that
does not depend on Clojure.
Clojure's data structures modified for use outside of Clojure:
http://github.com/krukow/clj-ds
Persistent analogue of the Java Collections Framework:
http://code.google.com/p/pcollections/
On Fri, 2
On Oct 31, 9:32 am, Sergio Arbeo Rodríguez wrote:
> rinzelight 0.0.3 is out! In this release you'll find:
Awesome! I've been looking (but not very hard) for an image
processing library. I look forward to playing with it!
mch
--
You received this message because you are subscribed to the Goog
Thanks for these applications to look at. These look nice, but don't have
much use for STM.
Do you know of any applications that make a lot of use of Software
Transactional Memory?
Thanks,
Alex
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To pos
my short-time experience with implementing webapps on
a clojure-base is:
i feel like in the very early days of java-servlet-api and j2ee.
productivity way way way behind springframework or grails
i don't even want to think about doing something sophisticated
like security-integration.
and of co
i dont see a gen-class your snippet:
(ns mywebapp.firstservlet
(:use [ring.util.servlet :only (defservice)])
...
(:gen-class
:extends javax.servlet.http.HttpServlet))
(defservice app)
WEB-INF/web.xml:
firstservlet
mywebapp.firstservlet
firstservlet
/*
On Nov 1, 8:09 p
Ok, I've got a simple web application that works running on embedded
jetty using the ring jetty adapter. I would now like to deploy it in
an infrastructure that will restart it if it dies, the system reboots,
etc. I've already got tomcat doing most of that, so the obvious choice
is a WAR file. Trou
It was recorded, the videos are in the works. It'll be available at
some point.
On Nov 1, 6:59 am, urza urza wrote:
> I wish, the next conj is recorded and videos are shared, for those,
> who cannot be there.
>
> On Nov 1, 1:05 am, David Cabana wrote:
>
> > I recently filled out a survey asking
Good stuff. The ivy branch of cake has something similar but only
works at the dependency module level (not the namespace level).
http://github.com/lrenn/cake/wiki/Ivy
Luke
On Nov 1, 2:44 am, ka wrote:
> Few months back I started working on a project which already had 10k
> lines of Clojure co
I wish, the next conj is recorded and videos are shared, for those,
who cannot be there.
On Nov 1, 1:05 am, David Cabana wrote:
> I recently filled out a survey asking what I thought of various
> aspects of the Conj. The last question was a request for suggestions.
> Frankly, the Conj exceeded my
cool .. its neat .. but I have been using
(cake.utils.find-namespaces/find-namespaces-in-dir)
Yours is better since it would give us a visual representation of the
namespaces..
thanks,
Sunil.
On Mon, Nov 1, 2010 at 12:21 PM, ka wrote:
> Hi, not sure if this is useful for you - http://github.co
Hi,
your code is really hard to understand. Please let let to be your
friend! I extracted things a little bit and put everything in a let.
Since I have no clue about collission detection in physics engines I
derived the local names from the operations done "i"nc, "d"ec, etc.
More meaningful names
19 matches
Mail list logo