Re: clojure.spec/keys question

2016-05-29 Thread Alistair Roche
Hi Gordon, I ran into this earlier too. It's because s/def is a macro and needs access to [::foo ::bar] at compile time, whereas 'ks' is only def'd at runtime. At least that's how I understand it! Cheers, On Monday, 30 May 2016 05:14:18 UTC+10, Gordon Stratton wrote: > > Hi all, > > clojure.

Re: instrumenting clojure.core

2016-06-12 Thread Alistair Roche
Hi Leon, I think you're looking for fspec , unless I'm misunderstanding something. I wrote up an example that might be helpful. @Ryan t

Re: instrumenting clojure.core

2016-06-13 Thread Alistair Roche
spec/generic testing to check > arity because you know the argument types. You can't test a generic higher > order fn for just arity like this because the generator won't know the > correct types to generate. > > > On Monday, June 13, 2016 at 4:00:30 AM UTC+2, Alistair Roc

Re: In clojure.spec, how to declare all valid keys in a map

2016-09-25 Thread Alistair Roche
Yeah, my team and I were initially surprised at the lack of a built-in option for this to s/keys, but TBH it's been an unusual use case so far, and Alex / Beau's solutions don't seem particularly onerous despite the repetition. I suppose if you're using it all over the place you could write a m

Re: In clojure.spec, how to declare all valid keys in a map

2016-09-25 Thread Alistair Roche
opt (map (comp keyword name) opt-un))) any?))) On Sunday, 25 September 2016 17:13:12 UTC+10, Alistair Roche wrote: > > Yeah, my team and I were initially surprised at the lack of a built-in > option for this to s/keys, but TBH it'

Re: [ANN] data-scope - tools for interactively inspecting and visualizing data

2016-09-25 Thread Alistair Roche
Wow, this is great, James, especially the extensive docs. What were you were you working on that prompted this solution? On Sunday, 25 September 2016 14:52:44 UTC+10, James Sofra wrote: > > Hi all, > > I have written a little library inspired by Spyscope (which I use a lot) > to provide tools f

Re: [ANN] data-scope - tools for interactively inspecting and visualizing data

2016-09-26 Thread Alistair Roche
Hey James, Any chance you'd demo it at clj-melb ? I'll film it and add a link to the repo if you want :) Cheers, On 26 September 2016 at 23:43, Alan Thompson wrote: > Looks cool. > Alan > > On Sun, Sep 25, 2016 at 1:00 AM, James Sofra > wrote: > >> Hey Alistai

Re: Clojure Games

2018-04-26 Thread Alistair Roche
FWIW, this series of blog posts from 2012 about making a roguelike in Clojure is what convinced me to start learning the language: http://stevelosh.com/blog/2012/07/caves-of-clojure-01/ On Thursday, 26 April 2018 03:14:23 UTC+8, puzzler wrote: > > I created this game for last year's Hour of Code

Re: [ANN] lein-nsorg - Leiningen plugin for keeping ns declarations organized

2018-04-26 Thread Alistair Roche
Awesome, thanks! Writing something like this has been on my to-do list for ages, I'm glad I don't have to now :) On Wednesday, 18 April 2018 04:19:38 UTC+8, Immo Heikkinen wrote: > > I have written a small Leiningen plugin to help keeping Clojure(Script) ns > declarations lexicographically sorte