Sonian is hiring for remote Clojure positions!

2015-03-19 Thread Dan Dillinger
of the other positions on our site, send an email to j...@sonian.net with your resumé. -- 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

Clojure Positions in NYC at ActionX

2013-11-05 Thread Edwin Watkeys
Hey guys, I'm the CTO of ActionX, where we've built much of our infrastructure in Clojure*. We're hiring. If you're in the NYC area and would like to work as part of an interestingly-eclectic group of programmers, please take a look at the position description below and get in touch if you're

Thread Macro For Inserting In Arbitrary Positions

2011-07-05 Thread Asim Jalis
Frequently I want to use the thread macros (- or -) except I need to thread the arguments into positions other than the first and the last. Or sometimes I have to go back and forth between first and last positions. Instead of alternating between - and - and creating nesting, I've been using

Re: Thread Macro For Inserting In Arbitrary Positions

2011-07-05 Thread Asim Jalis
Here is an example of using this: (-- hello world (.toUpperCase _) (.toLowerCase _) (.indexOf _ w)) On Tue, Jul 5, 2011 at 3:50 PM, Asim Jalis asimja...@gmail.com wrote: Frequently I want to use the thread macros (- or -) except I need to thread the arguments into positions other than

Re: Thread Macro For Inserting In Arbitrary Positions

2011-07-05 Thread Mark Rathwell
this: (-- hello world (.toUpperCase _) (.toLowerCase _) (.indexOf _ w)) On Tue, Jul 5, 2011 at 3:50 PM, Asim Jalis asimja...@gmail.com wrote: Frequently I want to use the thread macros (- or -) except I need to thread the arguments into positions other than the first and the last. Or sometimes I

Re: Thread Macro For Inserting In Arbitrary Positions

2011-07-05 Thread Sean Corfield
On Tue, Jul 5, 2011 at 4:14 PM, Asim Jalis asimja...@gmail.com wrote: Here is an example of using this: (-- hello world (.toUpperCase _) (.toLowerCase _) (.indexOf _ w)) BTW, that's not a very compelling example since you can already do: (- hello world! .toUpperCase .toLowerCase (.indexOf w))

Programming Clojure: Snake: update-positions: What does the do do here?

2010-08-05 Thread michele
ORIGINAL (defn update-positions [snake apple] (dosync (if (eats? @snake @apple) (do (ref-set apple (create-apple)) (alter snake move :grow)) (alter snake move))) nil) WITHOUT do (defn update-positions [snake apple] (dosync (if (eats? @snake @apple) ((ref

Re: Programming Clojure: Snake: update-positions: What does the do do here?

2010-08-05 Thread Meikel Brandmeyer
Hi, On Aug 5, 4:18 pm, michele michelemen...@gmail.com wrote: ORIGINAL (defn update-positions [snake apple]   (dosync     (if (eats? @snake @apple)       (do (ref-set apple (create-apple))         (alter snake move :grow))      (alter snake move))) nil) WITHOUT do (defn update

Re: Programming Clojure: Snake: update-positions: What does the do do here?

2010-08-05 Thread Peter Schuller
ORIGINAL (defn update-positions [snake apple]  (dosync    (if (eats? @snake @apple)      (do (ref-set apple (create-apple))        (alter snake move :grow))     (alter snake move))) nil) WITHOUT do (defn update-positions [snake apple]  (dosync    (if (eats? @snake @apple

Re: Programming Clojure: Snake: update-positions: What does the do do here?

2010-08-05 Thread Laurent PETIT
2010/8/5 michele michelemen...@gmail.com ORIGINAL (defn update-positions [snake apple] (dosync (if (eats? @snake @apple) (do (ref-set apple (create-apple)) (alter snake move :grow)) (alter snake move))) nil) WITHOUT do (defn update-positions [snake apple

Re: Programming Clojure: Snake: update-positions: What does the do do here?

2010-08-05 Thread Stuart Halloway
Adding to what Meikel said: A warning sign that the latter version is incorrect is the double open parens: ((ref-set ... Double open parens are fairly rare in Clojure code. Stu Hi, On Aug 5, 4:18 pm, michele michelemen...@gmail.com wrote: ORIGINAL (defn update-positions [snake apple

clojure positions available

2009-12-30 Thread Stuart Halloway
More specifically Developer positions with a major Clojure focus at our Durham, NC, USA office. Relevance is also doing a lot of Ruby, plus some C, Java, and a smattering of other things. Learn more about Relevance at http://howwework.thinkrelevance.com/. If you are interested tell us about

Re: positions

2009-11-22 Thread John Harrop
On Sun, Nov 22, 2009 at 7:54 AM, Emeka emekami...@gmail.com wrote: John, You should have added that you code came from Programming Clojure. It didn't. If it's the same as, or closely similar to, code from there, it's entirely coincidental. In Clojure there's usually several ways to do

Re: positions

2009-11-22 Thread nchubrich
Thanks Emeka, I took a look at it. I still say it would be nice to organize the sequence functions (somehow). -- 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

Re: positions

2009-11-20 Thread nchubrich
My 'requirements' were not so much for any particular need, but to try to think up a logical and complete API for dealing with multisets. I agree that there should be an actual collection type for multisets (implemented as an underlying map of values to frequencies I presume); but you might as

Re: positions

2009-11-20 Thread nchubrich
If you think about it, the tower of sequence types is like this: seq | gathered seq /\ multiset permutation \ / set The way to do the various options I pointed out is to mix types: the

Re: positions

2009-11-19 Thread nchubrich
Thanks Sean, I'll do the exercise. I don't know how I missed it in seq-utils. After months of programming Clojure, I realize how much I still have to learn. (Knowledge is power; knowledge of lack of knowledge is power to power.) Nick. -- You received this message because you are

Re: positions

2009-11-19 Thread John Harrop
the macro w/ the same name. Another choice is to use built-in functions, like this: (defn positions [pred coll] (map second (filter (comp pred first) (map vector coll (iterate inc 0) (defn indexed [coll] (map vector (iterate inc 0) coll)) (defn positions [pred coll] (for [[i e

Re: positions

2009-11-19 Thread nchubrich
While we're on the topic, where is something like (subtract [1 2 3 3 4 4 5 6] evens) - (1 3 3 5)? Doesn't seem to be in seq-utils or API. Seems like there should be a parallel multiset library for colls, to clojure.set. (I guess there could be two versions of subtract, one that removes \all, and

Re: positions

2009-11-19 Thread ajuc
On 20 Lis, 01:49, nchubrich nicholas.chubr...@gmail.com wrote: While we're on the topic, where is something like (subtract [1 2 3 3 4 4 5 6] evens) - (1 3 3 5)? Doesn't seem to be in seq-utils or API. Seems like there should be a parallel multiset library for colls, to clojure.set. (I guess

Re: positions

2009-11-19 Thread Alex Osborne
ajuc wrote: On 20 Lis, 01:49, nchubrich nicholas.chubr...@gmail.com wrote: While we're on the topic, where is something like (subtract [1 2 3 3 4 4 5 6] evens) - (1 3 3 5)? Doesn't seem to be in seq-utils or API. Seems like there should be a parallel multiset library for colls, to

Re: positions

2009-11-19 Thread nchubrich
Yeah, remove will work for one kind of 'multiset' operator I am thinking of. The others might as well preserve as much order as possible. For instance, (add [1 2 3 4] [1 2 3 4]) could have two interpretations; you just append, or you add like elements to positions of like elements, so you get [1

Re: positions

2009-11-19 Thread Sean Devlin
: Yeah, remove will work for one kind of 'multiset' operator I am thinking of.  The others might as well preserve as much order as possible.  For instance, (add [1 2 3 4] [1 2 3 4]) could have two interpretations; you just append, or you add like elements to positions of like elements, so you

Re: positions

2009-11-19 Thread John Harrop
On Thu, Nov 19, 2009 at 7:00 PM, Sean Devlin francoisdev...@gmail.comwrote: That's why there are two separate functions do do what you suggest user=(interleave [1 2 3 4] [1 2 3 4]) (1 1 2 2 3 3 4 4) user= (concat [1 2 3 4] [1 2 3 4]) (1 2 3 4 1 2 3 4) Poor choice of example. I think he

Re: positions

2009-11-19 Thread Alex Osborne
John Harrop wrote: On Thu, Nov 19, 2009 at 7:00 PM, Sean Devlin francoisdev...@gmail.com mailto:francoisdev...@gmail.com wrote: That's why there are two separate functions do do what you suggest user=(interleave [1 2 3 4] [1 2 3 4]) (1 1 2 2 3 3 4 4) user= (concat [1 2

Re: positions

2009-11-19 Thread John Harrop
On Thu, Nov 19, 2009 at 7:15 PM, Alex Osborne a...@meshy.org wrote: John Harrop wrote: On Thu, Nov 19, 2009 at 7:00 PM, Sean Devlin francoisdev...@gmail.com mailto:francoisdev...@gmail.com wrote: That's why there are two separate functions do do what you suggest

Re: positions

2009-11-19 Thread Alex Osborne
. What happens if same elements aren't grouped together in the first input coll it, it just arbitrarily picks one of their positions and moves them all together there? :-) If you're going to go to the trouble of making special multiset functions you may as well create a new multiset collection type

Re: positions

2009-11-19 Thread John Harrop
a pretty weird set of requirements. Usually a multiset/bag is unordered. What happens if same elements aren't grouped together in the first input coll it, it just arbitrarily picks one of their positions and moves them all together there? :-) If you're going to go to the trouble of making special

Re: positions

2009-11-19 Thread Alex Burka
to be preserved, though. Sort wouldn't do that. Hmmm.. that's a pretty weird set of requirements. Usually a multiset/bag is unordered. What happens if same elements aren't grouped together in the first input coll it, it just arbitrarily picks one of their positions and moves them all together