internet access required?

2016-02-20 Thread andrea crotti
This might be a Cider issue more than Clojure but I'm not sure. Sometimes on train/plane I try to work on some Clojure project and I normally don't manage to start the REPL inside Emacs. The issue calling (cider-jack-in) is the following: Starting nREPL server via lein update-in :dependencie

Re: Generate all possible teams

2015-10-05 Thread andrea crotti
2015-10-05 19:33 GMT+01:00 Mark Engelberg : > You're not using the combinatorics library as efficiently as you could be. > Here's the best strategy for generating all the team combinations with the > same number of players: > > Case 1: Even number of players. > Let's call the first player "A". "A"

Re: Generate all possible teams

2015-10-05 Thread andrea crotti
Yes this could actually work thanks, I only need to iterate over all the possible permutations of the first partition and combine it, still certainly a lot less stuff to compute. 2015-10-05 12:08 GMT+01:00 Franklin M. Siler : > On Oct 5, 2015, at 0545, andrea crotti wrote: > >> Any

Re: Generate all possible teams

2015-10-05 Thread andrea crotti
, and sometimes there can be 5 vs 6 for example 2015-10-05 12:25 GMT+01:00 Mark Engelberg : > Are there an even number of players? > Are all players assigned to teams? > Are the two teams necessarily of equal sizes? > > On Mon, Oct 5, 2015 at 3:45 AM, andrea crotti > wrote: >

Re: Generate all possible teams

2015-10-05 Thread andrea crotti
rk quite well in theory.. 2015-10-05 13:30 GMT+01:00 Mark Engelberg : > Sample input data would also be useful, including some examples that are too > large for you to currently solve with your existing approach. > > On Mon, Oct 5, 2015 at 4:36 AM, 'Alan Forrester' v

Generate all possible teams

2015-10-05 Thread andrea crotti
Hi everyone, I was trying for fun to solve the following problem: given a list of football players with some defined skills, find out which team selection would be balanced. For example given just 4 players A, B, C, D there would be the following team selections: - (A, B) vs (C, D) - (A, C) vs

Re: Reviewers needed for new Clojure book!

2015-08-26 Thread andrea crotti
I reviewed the Python3 cookbook a while ago and would love to do the same for a Clojure book, thanks, Andrea 2015-08-26 7:03 GMT+01:00 Akhil Wali : > It's great to see so many volunteers for this project! > Like I mentioned earlier, I have notified Packt and they shall contact > anyone who is shor

Re: feedback on side project

2015-04-14 Thread andrea crotti
Yes thanks to everyone, I actually did read that guide it but after I implemented that function. And I really like this convention, but I just need to get used before I remember to add the rigth ? and !. Anyway another question about that, so suppose my ref is initialized as (defonce live-games (r

Re: feedback on side project

2015-04-13 Thread andrea crotti
sequences: > > (first (.toLowerCase (str char))) > > Hope this helps > > Sebastian > > On Friday, April 10, 2015 at 11:35:33 AM UTC+2, Andrea Crotti wrote: >> >> I created a small project just for learning more Clojure and wanted some >> feedback to improve it and l

Re: Lein repl and Cider repl

2015-04-05 Thread andrea crotti
e functions like "doc" as they have > much more powerful options at their disposal (e.g. `C-c C-d d` (cider-doc) > or the `C-c C-d g`). > > On 5 April 2015 at 11:41, andrea crotti wrote: >> >> Hi guys, one question about the Repl and Cider. >> >> When I

Lein repl and Cider repl

2015-04-05 Thread andrea crotti
Hi guys, one question about the Repl and Cider. When I start the Repl with "lein repl", I am in the namespace "x.y", and if I do "(doc swap!)" I see the documentation showing up. If instead I start the repl with Cider, it looks like I'm in the same namespace, however "(doc swap!)" doesn't work, b

Re: Some guidance on how to write good property tests with test.check?

2015-03-28 Thread andrea crotti
I think this is almost borderline to be too trivial to test, and definitively rewriting the same logic in the test is normally not a good idea.. I would just consider on some simple cases and on the the corner cases. For example: (is (false (valid-vector? {:vec []})) (is (true (valid-vector? {:ve

Re: lein discovery issues

2015-01-30 Thread andrea crotti
Noone on the topic? Any smarter ways to lookup and try out new stuff with lein otherwise? 2015-01-26 14:22 GMT+00:00 andrea crotti : > Hello everyone > > A couple of questions about Lein and how to find templates/libraries. > > I found out now that "lein search" allows

lein discovery issues

2015-01-26 Thread andrea crotti
Hello everyone A couple of questions about Lein and how to find templates/libraries. I found out now that "lein search" allows me to search for the last stable version of a library, however every time I run it it takes forever downloading the index: Downloading https://repo1.maven.org/maven2/.i

Re: TDD and lein

2015-01-09 Thread andrea crotti
sking--but still > worth knowing about: > > https://github.com/pjstadig/humane-test-output > > Cheers, > > DD > > On 2015/01/08 20:30, andrea crotti wrote: >> Hi guys, >> >> I'm starting to use Clojure a bit more seriously, I knew already Lisp a &g

Re: TDD and lein

2015-01-08 Thread andrea crotti
nd listens for changes. > > Take a look at lein-test-refresh for tdd: > > https://github.com/jakemcc/lein-test-refresh > > It detects when you change your code, incrementally compiles and re-runs the > tests. It runs your tests everytime you save a file :) > > kl. 12

TDD and lein

2015-01-08 Thread andrea crotti
Hi guys, I'm starting to use Clojure a bit more seriously, I knew already Lisp a bit and Haskell, in plus I've been using Emacs for a long time so luckily it's not as hard, and it's a lot of fun. I'm using Emacs + Cider for development and it works wonderfully, however I have a few problems/quest