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

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

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: 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 <mark.engelb...@gmail.com>: > 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

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 <m...@franksiler.com>: > On Oct 5, 2015, at 0545, andr

Re: Generate all possible teams

2015-10-05 Thread andrea crotti
Forrester' via Clojure > <clojure@googlegroups.com> wrote: >> >> On 5 Oct 2015, at 11:45, andrea crotti <andrea.crott...@gmail.com> wrote: >> >> > Hi everyone, >> > >> > I was trying for fun to solve the following problem: >>

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 green.transis...@gmail.com: It's great to see so many volunteers for this project! Like I mentioned earlier, I have notified Packt and they shall

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

Re: feedback on side project

2015-04-13 Thread andrea crotti
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 learn some more. The code is all here, and it's both a desktop app that can be run with lein run or a web API that can

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, but if I

Re: Lein repl and Cider repl

2015-04-05 Thread andrea crotti
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 andrea.crott...@gmail.com wrote: Hi guys, one question about the Repl and Cider. When I start the Repl with lein repl, I am in the namespace x.y

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?

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 andrea.crott...@gmail.com: Hello everyone A couple of questions about Lein and how to find templates/libraries. I found out now that lein search allows me

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

Re: TDD and lein

2015-01-09 Thread andrea crotti
asking--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 bit and Haskell, in plus I've been using Emacs for a long time so

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

Re: TDD and lein

2015-01-08 Thread andrea crotti
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:32:44 UTC+1 torsdag 8. januar 2015 skrev Andrea Crotti følgende: Hi guys, I'm