Hi,
Am 30.05.2009 um 02:37 schrieb Brian Carper:
Can anyone explain this?
user (def x {:foo :bar :foo :baz :foo :quux})
#'user/x
user x
{:foo :bar, :foo :baz, :foo :quux}
user (count (keys x))
3
user (map x (keys x))
(:bar :bar :bar)
If I remember correctly, map literals smaller
than a
I'm editing the Reader Macros section.
I hope I got this right:
For Lists, syntax-quote establishes a template of the corresponding
data structure. Within the template, unqualified forms behave as if
recursively syntax-quoted.
`(x1 x2 x3 ... xn)
is interpreted to mean
(clojure.core/seq
This slashdot story is kind of worrisome.
http://tech.slashdot.org/story/09/05/29/1711203/Java-Gets-New-Garbage-Collector-But-Only-If-You-Buy-Support?from=rss
Do you all think this is the beginning of a trend?
--~--~-~--~~~---~--~~
You received this message
On May 30, 2009, at 7:01 AM, Meikel Brandmeyer wrote:
If I remember correctly, map literals smaller
than a certain size are based on array-map.
For speed reasons, this does not check for
duplicate keys. If you increase the size of
your literal beyond the threshold (was it
something around
http://tech.slashdot.org/story/09/05/29/1711203/Java-Gets-New-Garbage-Collector-But-Only-If-You-Buy-Support?from=rss
Who cares? There are many classy JVM implementations from third
parties like IBM.
BG
--
Baishampayan Ghose b.gh...@ocricket.com
oCricket.com
http://oCricket.com
clojure.contrib.generic.functor.fmap will return a map with values
updated by a function. What if I wany *keys* updated by a function?
Does this exist yet? If not, what should I name it for inclusion in
contrib?
Stu
--~--~-~--~~~---~--~~
You received this
Baishampayan Ghose b.gh...@ocricket.com writes:
http://tech.slashdot.org/story/09/05/29/1711203/Java-Gets-New-Garbage-Collector-But-Only-If-You-Buy-Support?from=rss
Who cares? There are many classy JVM implementations from third
parties like IBM.
Well, at least them IBM one is proprietary.
I started from scratch and got the starter kit anew. Now on startup I get
the following warning in *Messages* (repeated on each startup):
--
Installing nxml
An error has occurred while loading `/Users/res/.emacs.d/init.el':
error: Package 'nxml' not available for installation
--
I would greatly appreciate instructions how to setup emacs to connect
to already running clojure.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
Fear not. G1 is in Open-JDK, so no one can forbid you use it anyway
you see fit.
The clause in EULA is simply a lawyer talk, to cover their asses if
someone uses experimental feature in production and looses his data or
crashes server.
--~--~-~--~~~---~--~~
You
From a practical position, anonymous functions of the #(+ 5 %) flavor
*are* partial application. The ubiquity of these anonymous functions
in clojure code is evidence that partial application is just as needed
in clojure as it is in haskell. #(+ 5 %) is not much more succinct
than (\x - x + 5).
On May 30, 2009, at 1:58 PM, eyeris wrote:
If clojure used partial application by
default, then we would see fewer anonymous functions in clojure code;
if haskell did not use partial application by default, we would see
more anonymous functions in haskell code.
You can't have both partial
On 30.05.2009, at 17:11, Stuart Halloway wrote:
clojure.contrib.generic.functor.fmap will return a map with values
updated by a function. What if I wany *keys* updated by a function?
Does this exist yet? If not, what should I name it for inclusion in
contrib?
Speaking strictly from an
Thanks Konrad.
I certainly do not want to add this to fmap. However, I think there
are lots of situations where mapping keys is well-defined. For
example, you have a tree of data from XML or JSON, and you want to
replace the keys (strings) with instances of their actual type.
I guess
Robert Stehwien rstehw...@gmail.com writes:
I started from scratch and got the starter kit anew. Now on startup I get the
following warning in *Messages* (repeated on each startup):
--
Installing nxml
An error has occurred while loading `/Users/res/.emacs.d/init.el':
error:
I'm not sure if this is an issue or not. I broke it down to a simple
case. When I pass a Java object into a map closure the object doesn't
seem to get updated:
(let [b (new StringBuffer)]
(map #(.. b (append (str % ))) '(blah blah blah)) b) ;=
#StringBuffer
expected ;= #StringBuffer blah
Dex,
Thanks for the info. It's nice to understand what's going on. I am
trying to dig into the source more to get a deeper understanding of
the language, but Clojure is my first exposure to Java, so that part
is slow going.
On May 28, 8:24 pm, Dex Wood slash2...@gmail.com wrote:
The change
On May 30, 1:19 pm, Daniel Lyons fus...@storytotell.org wrote:
You can't have both partial application and variable arity functions.
Uh, yeah you can. Haskell can have variadic functions, like
Text.Printf.printf, and with some explicit type signatures you can
still partially apply it.
import
Lazy evaluation strikes again! map doesn't actually do anything until
you force it eg with dorun. This is quite a common mistake! Does
anyone know how one would go able making a warning be printed when a
lazy seq is created and thrown away without any evaluation? I'd be
interested in implementing
Further to explain this behaviour:
(let [b (new StringBuffer)]
(map #(.. b (append (str % ))) '(blah blah blah)))
#StringBuffer blah blah blah )
If you are using the REPL the return result is the lazy-seq, and this
gets forced to display the result. However in your original code you
Yes, the reason the larger one works is because the parameters to *
just happen to overflow to values that let the result of * not go out
of bounds.
As for doing bounds checking during (int), I think that would be a net
loss. Generally speaking, casting to a primitive is intended to aid
I started from scratch and got the starter kit anew. Now on startup I
get the
following warning in *Messages* (repeated on each startup):
--
Installing nxml
An error has occurred while loading `/Users/res/.emacs.d/init.el':
error: Package 'nxml' not available for
On May 30, 2009, at 7:25 PM, kinghajj wrote:
On May 30, 1:19 pm, Daniel Lyons fus...@storytotell.org wrote:
You can't have both partial application and variable arity functions.
Uh, yeah you can. Haskell can have variadic functions, like
Text.Printf.printf, and with some explicit type
23 matches
Mail list logo