On Oct 19, 8:18 am, Rob Lachlan wrote:
> I see, thank you for linking to the ticket, Phil that really clarifies
> things. I suppose that I would tend more to Chas Emerick's view in
> his sept 28 comment (on the ticket), questioning whether there is a
> need to validate Keywords (and possibly symb
Nested For(s) produce lists of lists:
=>(for [x (range 5)]
(for [y (range 5)]
y))
((0 1 2 3 4) (0 1 2 3 4) (0 1 2 3 4) (0 1 2 3 4) (0 1 2 3 4))
I want to use for(s) in order to use the loop counters from the
bindings, but can I produce a list of values (flattened) with
On Tue 19/10/10 06:57 , Rising_Phorce josh.fe...@gmail.com sent:
> Nested For(s) produce lists of lists:
>
> =>(for [x (range 5)]
> (for [y (range 5)]
> y))
>
> ((0 1 2 3 4) (0 1 2 3 4) (0 1 2 3 4) (0 1 2 3 4) (0 1 2 3 4))
>
> I want to use for(s) in order to use the loop counters from the
> b
Alternatively you can do:
user> (def x 5)
user> (def y 7)
user> (take (* x y) (cycle (range x)))
(0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4)
user>
U
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, s
simply don't put a for inside a for:
(for [x (range 5)
y (range 5)]
y)
Hope this helps.
JM
On 19 oct, 06:57, Rising_Phorce wrote:
> Nested For(s) produce lists of lists:
>
> =>(for [x (range 5)]
> (for [y (range 5)]
> y))
>
> ((0 1 2 3 4) (0 1 2 3 4) (0 1 2
2010/10/19 Ulises
> Alternatively you can do:
>
> user> (def x 5)
> user> (def y 7)
> user> (take (* x y) (cycle (range x)))
> (0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4)
> user>
>
And don't forget that seqs produced by range, cycle, etc., are lazy
(elements produced
Hi,
On 19 Okt., 13:16, Laurent PETIT wrote:
> user=> (def c ["a" "b" "c" "d" "e" "f"])
> #'user/c
> user=> (map vector c (cycle (range x)))
> (["a" 0] ["b" 1] ["c" 2] ["d" 3] ["e" 4] ["f" 0])
And to promote some 1.2 goodness: map-indexed.
user=> (map-indexed #(vector %2 (rem %1 5)) "abcdefghij
We are taking several steps to improve contrib and the facilities used
to host Clojure development. The goal is to make it easier and more
desirable to work on the Clojure project, and encourage more libraries
to be developed within the project.
There are several impediments to people working in o
I get in after a 9 hour train ride around 4:40 + time from train station.
Would certainly be up for some non amtrak food once I arrive.
On Mon, Oct 18, 2010 at 12:32 PM, Andrew Gwozdziewycz wrote:
> Hey Conj goers,
>
> I'm scheduled to arrive around 6:30, and after I check in am planning
> to spe
Many thanks to Rich and everyone at Relevance and elsewhere that are
making this possible.
FYI, I'll be migrating the existing nREPL codebase from it's current
home (http://github.com/cemerick/nREPL) to the clojure organization
umbrella today or tomorrow. It's been a hectic week or two. :-)
- Ch
On Oct 18, 2010, at 11:32 AM, Andrew Gwozdziewycz wrote:
> Hey Conj goers,
>
> I'm scheduled to arrive around 6:30, and after I check in am planning
> to spend the rest of the night writing code. Anyone want to help
> commandeer a random lobby to join in on the fun?
I'll be at the hotel around t
How should we as users consume the libs under the new umbrella? Is it fair
to assume that most of these would be also uploaded by the creator into
clojars as new versions become available, thus using build tools like
mvn, gradle, lein,
etc to "pull them in" as we need them?
since I assume we are m
On Oct 19, 12:04 pm, Wilson MacGyver wrote:
> How should we as users consume the libs under the new umbrella? Is it fair
> to assume that most of these would be also uploaded by the creator into
> clojars as new versions become available, thus using build tools like
> mvn, gradle, lein,
> etc to
Please consider Ivy. It's what Gradle uses and does dependency
management better than Maven does.
http://ant.apache.org/ivy/
http://ant.apache.org/ivy/features.html
Thanks,
Luke
On Oct 19, 12:12 pm, Rich Hickey wrote:
> On Oct 19, 12:04 pm, Wilson MacGyver wrote:
>
> > How should we as users
I think what Rich meant is that, they will be available in a mvn repo.
you can pull from mvn repo using ivy, etc. I use gradle to pull both
the current clojure and clojure-contrib all the time.
On Tue, Oct 19, 2010 at 12:22 PM, Luke Renn wrote:
> Please consider Ivy. It's what Gradle uses and d
True, but if ivy.xml's aren't published, you can't use any of ivy's
features. It's just maven without the 20 jars.
Luke
On Oct 19, 12:26 pm, Wilson MacGyver wrote:
> I think what Rich meant is that, they will be available in a mvn repo.
>
> you can pull from mvn repo using ivy, etc. I use gradl
Hi all,
Can anyone help me with this? I have a program with multiple
files. The program uses various data references, which may be
accessed from different files. To facilitate this I usually put ref
variables in a separate file and then :use that file in all the
various modules that make up
defrecord defines a java class, not a clojure entity. instead of :use,
you need :import.
(ns stuff.core
(:import (stuff phone-data)))
On Oct 19, 1:02 pm, WoodHacker wrote:
> Hi all,
>
> Can anyone help me with this? I have a program with multiple
> files. The program uses various data refe
On Tue, Oct 19, 2010 at 5:22 PM, Alan wrote:
> defrecord defines a java class, not a clojure entity. instead of :use,
> you need :import.
>
> (ns stuff.core
> (:import (stuff phone-data)))
It's an even better practice to go ahead and create a factory fn for your
defrecord. Then consumers of yo
The greatest impediment for me is having to sign a contract to
participate in an open source project. I understand Rich Hickey and
most of you guys live in the litigious US and have to cover
yourselves, but I feel not right about this.
On Oct 19, 4:00 pm, Rich Hickey wrote:
> We are taking sever
On Tue, 19 Oct 2010 15:51:17 -0700 (PDT)
Mibu wrote:
> The greatest impediment for me is having to sign a contract to
> participate in an open source project. I understand Rich Hickey and
> most of you guys live in the litigious US and have to cover
> yourselves, but I feel not right about this.
On Oct 19, 7:01 pm, Mike Meyer wrote:
> On Tue, 19 Oct 2010 15:51:17 -0700 (PDT)
>
> Mibu wrote:
> > The greatest impediment for me is having to sign a contract to
> > participate in an open source project. I understand Rich Hickey and
> > most of you guys live in the litigious US and have to c
On Tue, Oct 19, 2010 at 4:26 PM, Rich Hickey wrote:
> http://contributing.openoffice.org/programming.html
This is probably not a good example; the copyright assignment policy
for OpenOffice has caused the active contributors to fork it into
LibreOffice, which does not have such a policy:
http://
On Tue, Oct 19, 2010 at 4:01 PM, Mike Meyer
wrote:
> On Tue, 19 Oct 2010 15:51:17 -0700 (PDT)
> Mibu wrote:
>> The greatest impediment for me is having to sign a contract to
>> participate in an open source project. I understand Rich Hickey and
>> most of you guys live in the litigious US and hav
On Oct 19, 7:38 pm, Phil Hagelberg wrote:
> On Tue, Oct 19, 2010 at 4:26 PM, Rich Hickey wrote:
> >http://contributing.openoffice.org/programming.html
>
> This is probably not a good example; the copyright assignment policy
> for OpenOffice has caused the active contributors to fork it into
> L
lastly i have been messing around with new languages just to try them
out. in trying out coljure (only functional language i have tried yet)
but i can compile anything longer than one line. im using Coljure Box
but im very confused as to how i am supposed to write code that dose
more than one thing
On Tue, 19 Oct 2010 16:26:24 -0700 (PDT)
Rich Hickey wrote:
>
>
> On Oct 19, 7:01 pm, Mike Meyer 620...@mired.org> wrote:
> > On Tue, 19 Oct 2010 15:51:17 -0700 (PDT)
> >
> > Mibu wrote:
> > > The greatest impediment for me is having to sign a contract to
> > > participate in an open source p
Just wondering what are the plans for clojure.java.*
It used to be in http://richhickey.github.com/clojure/
but now that we are using http://clojure.github.com/clojure
clojure.java.* is no longer listed.
-Brent
--
You received this message because you are subscribed to the Google
Groups "Cloju
On 19 October 2010 02:18, Sean Devlin wrote:
> Okay, I just finished a Python app for work. Using SQLAlchemy was a
> joy. Has anyone ported this yet?
>
I've never used SQLAlchemy. How does it compare with e.g. Django's ORM?
Regards,
Stuart
--
You received this message because you are subscr
I use Leiningen to compile and run my Clojure projects. I create a new
project with Leiningen, use Clojure Box to edit code and try out one
line at a time, then switch back to Leiningen for downloading
libraries or for compiling my own project into a library or program.
http://github.com/technoman
I have written a tutorial just for beginners, that will quickly get you
started on clojure.
This tutorial was written based on my own experience learning clojure. When
learning a new language I am impatient, and like to dive into thick of
things immediately. Hopefully this will do the same for oth
> Just wondering what are the plans for clojure.java.*
>
> It used to be inhttp://richhickey.github.com/clojure/
>
> but now that we are usinghttp://clojure.github.com/clojure
> clojure.java.* is no longer listed.
user=> (use 'clojure.java.io)
nil
Seems like it's there, just not documented.
--
On Tue, Oct 19, 2010 at 6:37 PM, Brent Millare wrote:
> Just wondering what are the plans for clojure.java.*
>
> It used to be in http://richhickey.github.com/clojure/
>
> but now that we are using http://clojure.github.com/clojure
> clojure.java.* is no longer listed.
Looks like a bunch of names
On Tue, Oct 19, 2010 at 5:55 PM, ishkabible wrote:
> lastly i have been messing around with new languages just to try them
> out.
Fantastic fun! I wish you the best of luck.
> in trying out coljure (only functional language i have tried yet)
> but i can compile anything longer than one line.
Ar
Hey,
I'm parsing a file with a chain of filter and map operations. To make
it a little more readable (to me), I put the steps in a let like this:
(defn parse-dictionary
[reader]
(let [lines(read-lines reader)
trimmed (map #(.trim %1) lines)
filtered (filter is-dictionary-
I should be at the hotel around 6pm. Code, coffee, drinks,
conversation all sound equally fine to me.
On Oct 18, 9:32 am, Andrew Gwozdziewycz wrote:
> Hey Conj goers,
>
> I'm scheduled to arrive around 6:30, and after I check in am planning
> to spend the rest of the night writing code. Anyone wa
On 20 October 2010 14:19, Dave Ray wrote:
> Hey,
>
> I'm parsing a file with a chain of filter and map operations. To make
> it a little more readable (to me), I put the steps in a let like this:
>
> (defn parse-dictionary
> [reader]
> (let [lines(read-lines reader)
>trimmed (map #
On Oct 19, 7:55 pm, Sean Corfield wrote:
> On Tue, Oct 19, 2010 at 4:01 PM, Mike Meyer
>
> wrote:
> > On Tue, 19 Oct 2010 15:51:17 -0700 (PDT)
> > Mibu wrote:
> >> The greatest impediment for me is having to sign a contract to
> >> participate in an open source project. I understand Rich Hickey
someone posted a 200,000 char test-string:
http://pastebin.com/raw.php?i=a8veAND3
(doesn't view properly in chrome, view-source and save)
and the previous code failed pretty hard..
so, new approach
- one pass has all the information on where each character occurs. so,
create a map with each char
Dave,
Yes, this is perfectly idiomatic and many people in Clojure (and also
Haskell, for example) use let to help document how they're building up
their computation.
Stuart's suggestion is also good and it's largely a matter of personal
preference which to use when.
Of course, as you use clojure
40 matches
Mail list logo