On Sun, Jul 10, 2011 at 1:31 AM, Mark Derricutt m...@talios.com wrote:
Hi all,
Does anyone know if theres a 1.3 compatible version of the
clojure.contrib.gen-html-docs library at all? There's nothing listed under
http://dev.clojure.org/display/design/Contrib+Projects and with the version
I
Is gensym used for anything in Clojure except for alpha-conversion in
macros?
--
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
Say I have this sorted map, using strings as keys:
x= (sorted-map ab 1 n 2)
{ab 1, n 2}
When I do a subseq
x= (subseq (sorted-map ab 1 n 2) aa)
([ab 1] [n 2])
I get back both entries.
Now if I do the same subseq on the same map, except that I turn all
strings into character collections, I
But then how would all the consultants make their money? ;)
Sent from my iPad
On 10 Jul 2011, at 04:56, Luc Prefontaine lprefonta...@softaddicts.ca wrote:
Hey, if it does not take a year and an army of nuclear scientists to
implement, it would already
be better :
On Sun, 10 Jul 2011
No, use it any time you need an arbitrary symbol.
On Sun, 10 Jul 2011 10:41:56 +0200
Kazimir Majorinc kazi...@chem.pmf.hr wrote:
Is gensym used for anything in Clojure except for alpha-conversion in
macros?
--
Luc P.
The rabid Muppet
--
You received this message
Well, it can't be the best, because it has a bug. Calling it with a
instead of aa gives me a NPE:
x= (subseq (sorted-map-by string-like-coll-comparator (vec ab) 1
(vec n) 2) (vec a))
NullPointerException clojure.lang.AFunction.compare (AFunction.java:
59)
The following comparator should do
I see
Guess I'm a bit too much used to programming javascript where a
function always carries its source around with it - a very very
convenient tool in very functional languages where functions are
passed along so often
anyway, gr8 thanks!
Oded
On Jul 7, 12:11 pm, Sunil S Nandihalli
Well, turns out string-like-coll-comparator has a bug:
x= (subseq (sorted-map-by string-like-coll-comparator (vec ab) 1
(vec n) 2) (vec a))
NullPointerException clojure.lang.AFunction.compare (AFunction.java:
59)
It can be fixed though:
(defn string-like-coll-comparator
[coll1 coll2]
(or
Hm, google groups did not show my first reply to myself for a while,
and I thought it had gotten lost in the way, so I sent another post,
which can be safely ignored, in case anyone wonders what the
difference between the first and the second reply is - there is none,
fundamentally.
On Jul 10,
Thanks for your response Devin.
I guess I had come to the same conclusion by the end of my email. But
I wonder if there is a more direct way of achieving the same thing
without using a macro that spits out a defrecord with in-line method
declarations? I had a quick look at the defrecord code and
On Jul 10, 7:15 am, Michael Gardner gardne...@gmail.com wrote:
I think Christian wanted to know *why* one should eliminate recur. I can't
think of a reason to avoid it myself, though I also don't recall hearing any
recommendations against using recur.
Just my two cents, but the main reason
I think the reason is that an interface means that the function must be
'inside' the class.
I.e you can call (.method object). Since it isn't possible to extend a java
class in that way, it isn't possible to use extend. In a defrecord body
however, a new class is defined, which means that it's
Hi Mark,
Please see to http://dev.clojure.org/display/design/Clojure+Contrib
To migrate an old clojure-contrib namespace, just ask on the clojure-dev
list.
-S
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
Whoops, I thought I was asking on the dev list, but autocompletion
sent it to the regular clojure list. Sorry about that. I'm resending
to the dev list.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
From Clojure api for max
(defn max
Returns the greatest of the nums.
{:added 1.0}
([x] x)
([x y] (if ( x y) x y))
([x y more]
(reduce max (max x y) more)))
Question 1: Why can y be introduced as a local binding without a let?
Question 2: What is the map {:added 1.0} doing?
For Question 1 this is an example of multiple interfaces. Got it.
On Jul 10, 5:42 pm, octopusgrabbus octopusgrab...@gmail.com wrote:
From Clojure api for max
(defn max
Returns the greatest of the nums.
{:added 1.0}
([x] x)
([x y] (if ( x y) x y))
([x y more]
(reduce max
2) Meta data, max was introduced in V1.0
On Sun, 10 Jul 2011 14:44:16 -0700 (PDT)
octopusgrabbus octopusgrab...@gmail.com wrote:
For Question 1 this is an example of multiple interfaces. Got it.
On Jul 10, 5:42 pm, octopusgrabbus octopusgrab...@gmail.com wrote:
From Clojure api for max
Did anyone started creating native compiler for Clojure language ?
--
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
There's no interfaces, that's the function definition.
define function max
(defn max
attach docstring
Returns the greatest of the nums.
attach metadata
{:added 1.0}
if max is called with one argument, use this function definition
([x] x)
if max is called with two arguments, use this function
If the function is called with one argument, what Clojure language
rule allows x to appear outside the vector brackets?
On Jul 10, 7:18 pm, Jonathan Fischer Friberg odysso...@gmail.com
wrote:
There's no interfaces, that's the function definition.
define function max
(defn max
attach
I have another question about max. Is there an advantage if this were
re-written with repl?
On Jul 10, 7:18 pm, Jonathan Fischer Friberg odysso...@gmail.com
wrote:
There's no interfaces, that's the function definition.
define function max
(defn max
attach docstring
Returns the greatest of
Rich Hickey's article in Wikipedia is up for deletion again. Does anyone
have links to solid articles about Hickey?
--
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
http://www.codequarterly.com/2011/rich-hickey/ ?
On Jul 10, 6:26 pm, Michal B mibu.cloj...@gmail.com wrote:
Rich Hickey's article in Wikipedia is up for deletion again. Does anyone
have links to solid articles about Hickey?
--
You received this message because you are subscribed to the Google
The JVM does compile to native code once it is executed a specific number of
times. That's what the JIT compiler does. You can control how many times a
piece of code executes before it gets compiled by changing this JVM
option -XX:CompileThreshold=number.
If you want to look at other JVM
Hi all
I've started a very simple compojure project to wet my feet with
Clojure. I've written a simple model changing function:
(defn approve! [id]
(sql/with-connection db
(sql/transaction
(sql/update-values :comments
[id = ? id]
On Sun, Jul 10, 2011 at 4:51 PM, octopusgrabbus
octopusgrab...@gmail.com wrote:
If the function is called with one argument, what Clojure language
rule allows x to appear outside the vector brackets?
([x] x)
The x outside of the vector brackets is the value being returned.
So if max is called
Lets try to clear the confusion a bit here:
(def max1 [x] x)
(def max2 [x y] (if ( x y) x y))
(def max3 ([x y more] (reduce max (max x y) more)))
The above a three different fns.
max1 has only the arg x.
max2 has only x and y
and max3 has x and y and maybe other arguments to select the maximum
http://www.linuxjournal.com/article/10708 and
http://channel9.msdn.com/Shows/Going+Deep/Expert-to-Expert-Rich-Hickey-and-Brian-Beckman-Inside-Clojure
in combination with http://lambda-the-ultimate.org/node/3630
I'm not entirely clear on all of wikipedia's notability guidelines but these
On Jul 9, 8:58 am, Christian Marks 9fv...@gmail.com wrote:
The clojure code below applies the constant space algorithm ... of C. J. Gower
... to the computation of the order of a permutation [Knuth, D. E.,
“Selected Papers on Analysis of
Algorithms,” CSLI Lecture Notes Number 102, CSLI
On Sun, Jul 10, 2011 at 5:42 PM, octopusgrabbus
octopusgrab...@gmail.com wrote:
From Clojure api for max
(defn max
Returns the greatest of the nums.
{:added 1.0}
([x] x)
([x y] (if ( x y) x y))
([x y more]
(reduce max (max x y) more)))
Question 1: Why can y be introduced as a
I don't (yet) have a PostgreSQL environment to test java.jdbc on but
I'm planning to do that soon. I've also talked to Aaron about how we
can set up DBs for automated testing on build.clojure.org so java.jdbc
can have real tests that I can run locally and which will also still
run on the build
So the Interface specification has to be available when the record is
defined... that makes sense. Thanks Jonathan.
On 10 July 2011 14:28, Jonathan Fischer Friberg odysso...@gmail.com wrote:
I think the reason is that an interface means that the function must be
'inside' the class.
I.e you can
32 matches
Mail list logo