The link to the SCA FAQ on the page at clojure.org/contributing now
returns a document not found page. Given that the Clojure CA is based
on the Sun Contributor Agreement and what Oracle has since done with
NotQuiteSoOpenSolaris, this would seem to be an important document to
have available
...@mired.org
The link to the SCA FAQ on the page at clojure.org/contributing now
returns a document not found page. Given that the Clojure CA is based
on the Sun Contributor Agreement and what Oracle has since done with
NotQuiteSoOpenSolaris, this would seem to be an important document to
have
On Tue, Dec 21, 2010 at 3:43 PM, Laurent PETIT laurent.pe...@gmail.com wrote:
Indeed, this has been a problem for me too. I also tried to get it via the
backdoors, e.g. via the Open JDK, Netbeans, etc., websites, but they did
respect the DRY principle correctly, and all I found was just links
, Mike Meyer mwm-keyword-googlegroups.
620...@mired.org wrote:
The link to the SCA FAQ on the page at clojure.org/contributing now
returns a document not found page. Given that the Clojure CA is based
on the Sun Contributor Agreement and what Oracle has since done with
NotQuiteSoOpenSolaris
Hi,
Am 21.12.2010 um 22:00 schrieb Laurent PETIT:
Now yes, and no, no more chances :-(
Seems the link is fixed? http://oss.oracle.com/oca-faq.pdf
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
On 4/29/2010 6:49 PM, Michael Gardner wrote:
+1. I can't imagine any use case for looking up a whole [key, value] pair in a
hash-map.
Agreed. The whole point of a map is to provide key-based lookup.
Iterating over all (key, value) pairs in the map makes sense,
not so much looking for one in
On Apr 30, 2010, at 14:33 , Rich Hickey wrote:
'contains?' and 'get' abstract over fast lookup. They are polymorphic on the
collection type and on the nature of the looked-up thing. For maps the
looked-up thing is a key, for sets: a value, for vectors, strings and arrays:
an index.
If contains? is a sensible name for that function, then surely
seq-contains? cannot be a sensible name for a function which checks
a totally different sort of containment?
Also, if it is possible to view seq-contains? as a sensible enough
name for a core library function with sequential
On Apr 29, 2010, at 4:21 AM, ataggart wrote:
I know it won't matter, but for posterity if nothing else...
Functions named contains-key? and contains-val? would make a lot more
sense to me than the current contains? and new seq-contains?. Anyone
looking at contains-val? should expect it to be
2010/4/30 Rich Hickey richhic...@gmail.com:
On Apr 29, 2010, at 4:21 AM, ataggart wrote:
I know it won't matter, but for posterity if nothing else...
Functions named contains-key? and contains-val? would make a lot more
sense to me than the current contains? and new seq-contains?. Anyone
On Apr 29, 2010, at 2:19 PM, MarkSwanson wrote:
On Apr 29, 4:21 am, ataggart alex.tagg...@gmail.com wrote:
I know it won't matter, but for posterity if nothing else...
Functions named contains-key? and contains-val? would make a lot more
sense to me than the current contains? and new
Hi,
On Thu, Apr 29, 2010 at 7:48 AM, Meikel Brandmeyer m...@kotka.de wrote:
On 29 Apr., 01:38, Mark Engelberg mark.engelb...@gmail.com wrote:
1. Don't include seq-contains? The behavior you want can usually be
achieved by using (some #{item} coll). Disadvantage - if you're
testing to
On Fri, Apr 30, 2010 at 4:33 AM, Rich Hickey richhic...@gmail.com wrote:
On Apr 29, 2010, at 4:21 AM, ataggart wrote:
Functions named contains-key? and contains-val? would make a lot more
sense to me than the current contains? and new seq-contains?. Anyone
looking at contains-val? should
On Fri, Apr 30, 2010 at 5:18 AM, Laurent PETIT laurent.pe...@gmail.com wrote:
While it sounds soo evident now that you say that explicitly ( the
contains? / get pair ), it may be good to reflect that in the docs of
the functions rather than just keep this knowledge here ?
Agreed. This
On Apr 30, 4:33 am, Rich Hickey richhic...@gmail.com wrote:
People don't consider sets, vectors, arrays or strings to have 'keys'.
But, like maps, they all support fast lookup of some sort.
But of course we do. I point to the doc for contains? and get:
Usage: (contains? coll key)
Returns
just a few paragraphs prior
acknowledged that people need?
Yes, let's do stop wasting time and energy.
Stuart says that this is FAQ #5, so let's just let it remain that.
And leave the docs as they are, so you can come back again and
thinking about keys and lookup and misleading expensive
On Apr 30, 2010, at 6:33 AM, Rich Hickey wrote:
Would contains-val? be fast for sets? As a user of sets, I consider them
collections of values, and I absolutely would reach for contains-val? in any
library that had it, for use with sets. If so, and I used contains-val?, and
I moved code
On Apr 29, 3:21 am, ataggart alex.tagg...@gmail.com wrote:
Functions named contains-key? and contains-val? would make a lot more
sense to me than the current contains? and new seq-contains?.
Amen. Even independent of any performance expectations.
--
You received this message because you are
Phil Hagelberg p...@hagelb.org writes:
Actually I do consider sets to have keys, since internally they are
implemented using maps, so the exact same semantics apply for their
lookup. They're just maps where the key and value are the same thing:
But that implementation is one of convenience,
Clojure embraces this laziness:
user= (get #{:foo :bar} :foo)
:foo
'get uses a key to return a value. A vector is not a map is not a
set, but all of them can have their values accessed in constant-time
using a key.
On Apr 30, 3:14 pm, Steven E. Harris s...@panix.com wrote:
Phil Hagelberg
On Wed, Apr 28, 2010 at 10:49 PM, Douglas Philips d...@mac.com wrote:
What is the purpose, goal, design-rationale of not making seq-contains? fast
on maps or sets?
I think Rich's point is that if seq-contains? is sometimes fast and
sometimes slow, then it makes it harder to reason about a
I know it won't matter, but for posterity if nothing else...
Functions named contains-key? and contains-val? would make a lot more
sense to me than the current contains? and new seq-contains?. Anyone
looking at contains-val? should expect it to be O(n). The only
effective difference would be
On Apr 29, 2010, at 1:57 AM, Meikel Brandmeyer wrote:
Hi,
On 29 Apr., 01:43, Stuart Halloway stuart.hallo...@gmail.com wrote:
I'll wait for Rich to maybe chime in on seq-contains?. Other than
seq-
contains? are people liking the new fns? Anybody having issues we
didn't anticipate?
I was
I like this proposal. I'd make contains? an alias for contains-key?
with a deprecation warning, and just forget about seq-contains? in
favor of contains-val?
On Thursday, April 29, 2010, ataggart alex.tagg...@gmail.com wrote:
I know it won't matter, but for posterity if nothing else...
2010/4/29 Mark J. Reed markjr...@gmail.com:
I like this proposal. I'd make contains? an alias for contains-key?
with a deprecation warning, and just forget about seq-contains? in
favor of contains-val?
This makes a lot of sense to me.
(and have, as suggested by ataggart, contains-key?
Thinking about this one.
I like this proposal. I'd make contains? an alias for contains-key?
with a deprecation warning, and just forget about seq-contains? in
favor of contains-val?
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this
On 2010 Apr 29, at 2:17 AM, Mark Engelberg wrote:
On Wed, Apr 28, 2010 at 10:49 PM, Douglas Philips wrote:
What is the purpose, goal, design-rationale of not making seq-
contains? fast
on maps or sets?
I think Rich's point is that if seq-contains? is sometimes fast and
sometimes slow, then
On 2010 Apr 29, at 4:21 AM, ataggart wrote:
Functions named contains-key? and contains-val? would make a lot more
sense to me than the current contains? and new seq-contains?. Anyone
looking at contains-val? should expect it to be O(n). The only
effective difference would be that the test
On 2010 Apr 29, at 7:52 AM, Laurent PETIT wrote:
2010/4/29 Mark J. Reed markjr...@gmail.com:
I like this proposal. I'd make contains? an alias for contains-key?
with a deprecation warning, and just forget about seq-contains? in
favor of contains-val?
This makes a lot of sense to me.
(and
On Apr 29, 2:17 am, Mark Engelberg mark.engelb...@gmail.com wrote:
On Wed, Apr 28, 2010 at 10:49 PM, Douglas Philips d...@mac.com wrote:
What is the purpose, goal, design-rationale of not making seq-contains? fast
on maps or sets?
I think Rich's point is that if seq-contains? is sometimes
(send contains-val? inc)
On Apr 29, 9:06 am, Douglas Philips d...@mac.com wrote:
On 2010 Apr 29, at 4:21 AM, ataggart wrote:
Functions named contains-key? and contains-val? would make a lot more
sense to me than the current contains? and new seq-contains?. Anyone
looking at contains-val?
On Apr 29, 2010, at 3:21 AM, ataggart wrote:
I know it won't matter, but for posterity if nothing else...
Functions named contains-key? and contains-val? would make a lot more
sense to me than the current contains? and new seq-contains?. Anyone
looking at contains-val? should expect it to
On Apr 29, 4:21 am, ataggart alex.tagg...@gmail.com wrote:
I know it won't matter, but for posterity if nothing else...
Functions named contains-key? and contains-val? would make a lot more
sense to me than the current contains? and new seq-contains?. Anyone
looking at contains-val? should
+1. I can't imagine any use case for looking up a whole [key, value] pair in
a hash-map.
Actually this is quite useful when you want to do something for each
value and need to know the key as well - for example copy some
key/value pairs to another map
Boris
--
You received this message
Iterating through the pairs is useful. Asking if a given [k, v] is
included is not - you can just ask if (= (assoc k) v) instead.
It'd be nice if (contains-val) returned the key(s) as its true result,
but probably not useful enough to warrant the complexity of dealing
with false keys, explicit
After review, several seq functions from clojure-contrib have been
promoted to clojure [1], [2], [3]. Hopefully the FAQ below will answer
the major questions you may have:
1. Is this a breaking change to Clojure?
No. Rich is super-careful to grow Clojure by expansion, not by
breaking
On 2010 Apr 28, at 4:31 PM, Stuart Halloway wrote:
After review, several seq functions from clojure-contrib have been
promoted to clojure [1], [2], [3]. Hopefully the FAQ below will
answer the major questions you may have:
Cool!
3. Why did some of the fn names change?
...Similarly
Hi,
On Wed, Apr 28, 2010 at 05:06:21PM -0400, Douglas Philips wrote:
Wait, what? Why should seq-contains? be slower than contains? Isn't
this exactly the kind of thing that protocols are supposed to be
solving? Your nice video showed that very thing, right?
If you have a map or a set looking
On 2010 Apr 28, at 5:14 PM, Meikel Brandmeyer wrote:
If you have a map or a set looking up a key is fast. So contains? is
fast (read O(1) resp. something like O(log32 N)). seq-contains? does
a linear search through a sequence. That is O(N). Protocols cannot
change this.
How is having an
Hi,
On Wed, Apr 28, 2010 at 05:26:46PM -0400, Douglas Philips wrote:
How is having an optimized version of seq-contains? for sets/maps
any different from what Stuart showed in his video, where reduce can
have a specialization that is faster on some types?
A faster reduce is still O(N). If
On 2010 Apr 28, at 5:32 PM, Meikel Brandmeyer wrote:
On Wed, Apr 28, 2010 at 05:26:46PM -0400, Douglas Philips wrote:
How is having an optimized version of seq-contains? for sets/maps
any different from what Stuart showed in his video, where reduce can
have a specialization that is faster on
Hi,
On Wed, Apr 28, 2010 at 05:39:37PM -0400, Douglas Philips wrote:
Stuart's comment was to not use seq-contains? on maps or sets.
There is no reason that it cannot be the same speed as contains? if
a set or map is passed in.
Ah, ok. I misunderstood what you were saying. But I think it
The seq in seq-contains? says I want a sequential search.
Protocols *could* make this do something different, but that would
violate the contract of this function.
Another way to put it: If you wrote a protocol to pick a fast
implementation based on type, then seq-contains? would be the fn
On 2010 Apr 28, at 6:10 PM, Stuart Halloway wrote:
The seq in seq-contains? says I want a sequential search.
Protocols *could* make this do something different, but that would
violate the contract of this function.
How would having it work faster if passed a set or map violate that?
Another way to put it: If you wrote a protocol to pick a fast
implementation based on type, then seq-contains? would be the fn
that the protocol would call if it couldn't find anything faster.
There have to be primitive things somewhere...
If so, then why isn't there a vector-first and a
On 2010 Apr 28, at 6:55 PM, Stuart Halloway wrote:
Specializations are available where there is a clear use case, e.g.
contains?, peek (instead of last), disj, etc.
...
Tying to concrete types is limiting. *Never* having special purpose
fns that know about performance characteristics is also
On 2010 Apr 28, at 6:06 PM, Meikel Brandmeyer wrote:
Ah, ok. I misunderstood what you were saying. But I think it doesn't
change the argumentation. If seq-contains? was fast on maps and sets,
people would abandon contains? because seq-contains? is always
right:
works on seqs, fast on maps and
On Wed, Apr 28, 2010 at 2:39 PM, Douglas Philips d...@mac.com wrote:
If some function I call uses seq-contains? (so that it can get all the
wonderful seq-ness abstractness clojure offers) I should have to know that
internal detail and not pass in a map or set? or worse, fail to get an
Wow, and I thought this was a sore subject before, when there was no
seq-contains? and its absence was always a Top 5 FAQ. :-)
I'll wait for Rich to maybe chime in on seq-contains?. Other than seq-
contains? are people liking the new fns? Anybody having issues we
didn't anticipate?
Stu
On Apr 28, 7:17 pm, Douglas Philips d...@mac.com wrote:
On 2010 Apr 28, at 6:55 PM, Stuart Halloway wrote:
Specializations are available where there is a clear use case, e.g.
contains?, peek (instead of last), disj, etc.
...
Tying to concrete types is limiting. *Never* having special
On 2010 Apr 28, at 7:38 PM, Mark Engelberg wrote:
But I think you're not fully appreciating the complexity of the
situation. This is not just about performance, but a question of two
different possible semantics for contains?, which is why it can't
*only* be addressed with a protocol.
...
Hi,
On 29 Apr., 01:38, Mark Engelberg mark.engelb...@gmail.com wrote:
1. Don't include seq-contains? The behavior you want can usually be
achieved by using (some #{item} coll). Disadvantage - if you're
testing to see if the collection contains nil, that won't work.
Not entirely correct.
On 2010 Apr 28, at 11:04 PM, Rich Hickey wrote:
It is an important aspect of Clojure that, in general, performance
guarantees are part of the semantics of functions. In particular,
functions are not supported on data structures where they are not
performant.
Understood. That isn't the
Hi,
On 29 Apr., 01:43, Stuart Halloway stuart.hallo...@gmail.com wrote:
I'll wait for Rich to maybe chime in on seq-contains?. Other than seq-
contains? are people liking the new fns? Anybody having issues we
didn't anticipate?
I was a little bit surprised about map-indexed and
This might make a good FAQ question:
On Dec 20, 11:25 am, chris cnuern...@gmail.com wrote:
I am unclear as to the difference between refer, import use, and require.
Hi Chris,
require: Load a Clojure library from a file on classpath. Use this
when you want to load a library, but leave
This would make an excellent FAQ question and answer!
On Sat, Dec 20, 2008 at 9:53 AM, Stuart Sierra
the.stuart.sie...@gmail.comwrote:
This might make a good FAQ question:
On Dec 20, 11:25 am, chris cnuern...@gmail.com wrote:
I am unclear as to the difference between refer, import use
the.stuart.sie...@gmail.com wrote:
This might make a good FAQ question:
On Dec 20, 11:25 am, chris cnuern...@gmail.com wrote:
I am unclear as to the difference between refer, import use, and require.
Hi Chris,
require: Load a Clojure library from a file on classpath. Use this
when you
On Dec 20, 12:44 pm, chris cnuern...@gmail.com wrote:
1. Is using defs the best way to go about this? They are global
variables; they model static state of the system, essentially.
Yes, global variables are probably best as Vars (which is what def
creates).
2. How do defs handle
Some thoughts on really stupid things that have tripped me up:
- How do I exit Clojure - srsly
C-c
- Whatsa JVM - does this mean Clojure is really just Java with parens?
- Whatsa Classpath?
this answer presents the *ALL* important opportunity to mention that
*nix uses `:' to separate paths
Not sure if the FAQ is the right place to put it, but I haven't seen
any mention of this gotcha which could really trip some people up:
http://w01fe.com/?p=32
Short version: hashing immutable Clojure collections that contain
mutable Java objects can lead to confusing results.
(Hi all, I'm new
On Dec 17, 6:28 pm, kkw kevin.k@gmail.com wrote:
What's the recommended way of getting Clojure up and running?
- Download the latest snapshot with SVN
- Create the Clojure.jar file with Ant
- Test by starting up the REPL with java -cp clojure.jar
clojure.lang.Repl
That's a good FAQ
the REPL with java -cp clojure.jar
clojure.lang.Repl
That's a good FAQ suggestion, Kev. With the latest release, it's even
shorter!
1. Download clojure_20081217.zip
2. Run java -jar clojure.jar
This begs (for me at least) the question:
At what point does a FAQ become a restatement
Suggestions for entries welcome here.
Rich
How about:
What language constructs/objects may be found in the function position
of an expression?
Ii like the fact that sets, maps and vectors are all 'functions of
their keys', and that keywords and symbols are functions of maps.
((([ + -
Suggestions for entries welcome here.
Rich
Here's another that was a gotcha for me for an hour or two...
Why after using map/reduce/for to change a java object does the object
remain unchanged?
(defn initv1 [myseq] (let [v (java.util.Vector.)] (for [x myseq]
(.addElement v x)) v))
On Dec 17, 11:34 am, Stuart Sierra the.stuart.sie...@gmail.com
wrote:
On Dec 17, 10:32 am, Rich Hickey richhic...@gmail.com wrote:
The Clojure FAQ will be here:
http://code.google.com/p/clojure/wiki/FAQ
Suggestions for entries welcome here.
Suggestions, based on common questions
On Wed, Dec 17, 2008 at 11:34 AM, Stuart Sierra
the.stuart.sie...@gmail.com wrote:
Suggestions, based on common questions in the group:
These are good, Stuart, thanks!
Except...
* Why doesn't #([%]) work?
Answer: Because it expands to (fn [x] ([x])). #() always assumes
that the thing
On Wed, Dec 17, 2008 at 10:32 AM, Rich Hickey richhic...@gmail.com wrote:
The Clojure FAQ will be here:
http://code.google.com/p/clojure/wiki/FAQ
Suggestions for entries welcome here.
I recently found out about Google Moderator
(http://moderator.appspot.com/), which might be a good fit
On Dec 17, 11:50 am, J. McConnell jdo...@gmail.com wrote:
On Wed, Dec 17, 2008 at 10:32 AM, Rich Hickey richhic...@gmail.com wrote:
The Clojure FAQ will be here:
http://code.google.com/p/clojure/wiki/FAQ
Suggestions for entries welcome here.
I recently found out about Google
The Clojure FAQ will be here:
http://code.google.com/p/clojure/wiki/FAQ
Suggestions for entries welcome here.
Rich
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send email
Hi,
Am 17.12.2008 um 17:34 schrieb Stuart Sierra:
* Is there an IDE for Clojure?
Answer: There are plug-ins for Eclipse http://code.google.com/p/
clojure-dev/ and NetBeans http://enclojure.net/. There's also
Emacs.
There is also Vim.
Sincerely
Meikel
smime.p7s
Description: S/MIME
On Dec 17, 10:32 am, Rich Hickey richhic...@gmail.com wrote:
The Clojure FAQ will be here:
http://code.google.com/p/clojure/wiki/FAQ
Suggestions for entries welcome here.
Suggestions, based on common questions in the group:
* Is there a repository for Clojure libraries?
Answer: Yes, see
Hello,
* Is there an IDE for Clojure?
Answer: There are plug-ins for Eclipse http://code.google.com/p/
clojure-dev/ and NetBeans http://enclojure.net/. There's also
Emacs.
Sincerely, clojure-dev (Eclipse plugin) is still currently in infancy.
I think it's not fair for the emacs version and
How about:
What's the recommended way of getting Clojure up and running?
- Download the latest snapshot with SVN
- Create the Clojure.jar file with Ant
- Test by starting up the REPL with java -cp clojure.jar
clojure.lang.Repl
Kev
On Dec 18, 9:24 am, lpetit laurent.pe...@gmail.com wrote:
Clojure needs a FAQ - a plain old school vanilla FAQ.
Clojure.org is useful;
The wiki is useful;
The gg Group is useful;
The /# clojure is useful;
(doc some-fn) is useful;
(show some-fn) is useful;
None of these are a FAQ.
None accomplish what a FAQ accomplishes.
Lots of people look for a FAQ
74 matches
Mail list logo