Re: core.typed question (maybe a bug?)

2015-04-16 Thread Sven Richter
I added your explanation the the wiki of core.typed: https://github.com/clojure/core.typed/wiki/Intersection-vs.-Union I hope that is fine for you. Am Donnerstag, 16. April 2015 23:25:42 UTC+2 schrieb Ambrose Bonnaire-Sergeant: > > It might help thinking in terms of Java interfaces, Foo and B

Re: [ANN] Clojure 1.7.0-beta1 released

2015-04-16 Thread tcrayford
I've been running beta1 in production since about 1 day after it was announced. Everything's been smooth so far :D On Friday, 17 April 2015 06:51:53 UTC+12, Sean Corfield wrote: > > We deployed beta1 to production this morning. I’ll report back if we > encounter any problems (generally we’ve fou

Re: core.typed question (maybe a bug?)

2015-04-16 Thread Sven Richter
Now thats a really nice explanation of union versus intersection in termes of types. Thank you very much for that, Sven Am Donnerstag, 16. April 2015 23:25:42 UTC+2 schrieb Ambrose Bonnaire-Sergeant: > > It might help thinking in terms of Java interfaces, Foo and Bar. > > (definterface Foo >

Re: core.typed question (maybe a bug?)

2015-04-16 Thread Ambrose Bonnaire-Sergeant
It might help thinking in terms of Java interfaces, Foo and Bar. (definterface Foo (foo [])) (definterface Bar (bar [])) (I Foo Bar) is a value that extends both Foo and Bar. (deftype IImp [] Foo (foo [this]) Bar (bar [this])) (->IImp) is of type Foo, Bar, (I Foo Bar) and (U Foo Bar

Re: core.typed question (maybe a bug?)

2015-04-16 Thread Sven Richter
I meant when I change: (t/HVec [Keyword (t/U Keyword (t/HVec [Keyword Number])) t/Any t/Any *]) to (t/HVec [Keyword (t/I Keyword (t/HVec [Keyword Number])) t/Any t/Any *]) ^^

Re: core.typed question (maybe a bug?)

2015-04-16 Thread Ambrose Bonnaire-Sergeant
Oh, you changed it to (t/HVec [Keyword (t/I Keyword (t/HVec [Keyword Number])) t/Any t/Any *])? Unions are like `or`, intersections like `and`. This might work for checking the definition, as function bodies are checked with a set of assumptions about parameter types. However it should be impossi

Re: core.typed question (maybe a bug?)

2015-04-16 Thread Ambrose Bonnaire-Sergeant
I don't see an intersection, what do you mean? Thanks, Ambrose On Thu, Apr 16, 2015 at 4:43 PM, Sven Richter wrote: > Hi, > > I tried both destructuring and the nth form instead of second and first. > None of which worked. > > However, if I change the Union to Intersection in > > (t/HVec [Keywo

Re: core.typed question (maybe a bug?)

2015-04-16 Thread Sven Richter
Hi, I tried both destructuring and the nth form instead of second and first. None of which worked. However, if I change the Union to Intersection in (t/HVec [Keyword (t/U Keyword (t/HVec [Keyword Number])) t/Any t/Any *]) it works for the definition of the multimethod. Does that make sense? I

Re: core.typed question (maybe a bug?)

2015-04-16 Thread Ambrose Bonnaire-Sergeant
I don't think second's type is is smart enough. Try using nth or destructuring instead: (let [[f s] v] (if (vector? s) (first s) s)) or (if (vector? (nth v 1)) (first (nth v 1)) s) Thanks, Ambrose On Thu, Apr 16, 2015 at 3:39 PM, Sven Richter wrote: > Hi, > > I have this code: > > (defali

core.typed question (maybe a bug?)

2015-04-16 Thread Sven Richter
Hi, I have this code: (defalias html-label (t/HVec [Keyword (t/HMap :mandatory {:for String}) String])) (defalias html-form (t/HVec [Keyword (t/HMap :mandatory {:id String}) t/Any *])) (defalias html-form-group (t/HVec [html-label html-form])) (t/ann dt->hiccup [(HVec [Keyword (U Keyword (HVe

Re: [ANN] Clojure 1.7.0-beta1 released

2015-04-16 Thread Sean Corfield
We deployed beta1 to production this morning. I’ll report back if we encounter any problems (generally we’ve found Clojure pre-release builds to be very stable). We were previously running alpha5 in production. Sean On Apr 10, 2015, at 12:25 PM, Alex Miller wrote: > Clojure 1.7.0-beta1 is now

Re: reader conditional indentation (clojure-mode)

2015-04-16 Thread Sam Ritchie
Just bump your clojure version in project.clj and cider will work just fine. Dylan Butman April 16, 2015 at 9:18 AM Also, what would be necessary to get repl (cider, etc) working with cljc? On Thursday, April 16, 2015 at 10:41:28 AM UTC-4, Dylan Butman wrote: -- You r

Interested in building the Clojure module for Vert.x 3?

2015-04-16 Thread Toby Crawley
Vert.x v2[0] currently has Clojure support via a language module[1], but that module won't work with the upcoming Vert.x v3[2], since it is substantially different. I wrote the Clojure module for v2, but don't have time to build/maintain the module for v3. If you are a Clojure + Vert.x user and wan

Re: reader conditional indentation (clojure-mode)

2015-04-16 Thread Dylan Butman
Also, what would be necessary to get repl (cider, etc) working with cljc? On Thursday, April 16, 2015 at 10:41:28 AM UTC-4, Dylan Butman wrote: > > Does anyone know the required clojure-mode indentation configuration to > achieve indentation aligned with > http://dev.clojure.org/display/design/

reader conditional indentation (clojure-mode)

2015-04-16 Thread Dylan Butman
Does anyone know the required clojure-mode indentation configuration to achieve indentation aligned with http://dev.clojure.org/display/design/Reader+Conditionals ? Specifically, I'd like the next line following either #?(... or #?@(... to be indented at the same level as the #. -- You recei

Re: Composing Stuart Sierra's components

2015-04-16 Thread Dan Kee
Ah, that makes sense. Thanks for the thorough response! On Thursday, April 16, 2015 at 7:00:16 AM UTC-5, Stuart Sierra wrote: > > Hi Dan, > > The key to understanding what's happening here is to > remember that `component/start` combines both dependency > ordering *and* dependency injection. > >

[ANN] Expectations v2.1.1

2015-04-16 Thread Ivan Mikushin
Expectations v2.1.1 has just been released with support for Clojure/Script. Expectations is a Clojure(Script) testing framework where your tests are written in a very concise manner: (expect 4 (+ 2 2)) Check it out: http://jayfields.com/expectations/ https://github.com/jaycfields/expectatio

Re: Composing Stuart Sierra's components

2015-04-16 Thread Stuart Sierra
Hi Dan, The key to understanding what's happening here is to remember that `component/start` combines both dependency ordering *and* dependency injection. Your "super system" looks like this just after it is constructed: {:system {:foo {}, :bar {}}, :system2 {:baz {}, :qux {}}} When yo

ANN: Cordova-Om Leiningen template

2015-04-16 Thread Alan Shaw
I've created a Leiningen template for Om projects with support for building with Cordova (alias PhoneGap). Core.async and Sablono are included. The template generates a small Hello World app (from a gist by Keith Irwin) which can be built upon. Documenting my process and hoping it's of use to oth