sveri: doh
sveri: I'm not sure of the best way to handle misspelt annotations.
sveri: often annotations go before vars even exist.
ambrosebs: well, technically, cursive gave me a hint, my eyes just got not used to recognize that pattern in this case (unused function version used function). in cursive a function becomes a used function too, when it gets a type annotation. Apart from that, this was the first time it happens, so I think there is no need for this to be caught by core.typed :simple_smile: It's more a nice to have from my point of view
I found a tricky one
well not tricky but weird
when loading an entire ns, say, foo.bar
core.typed looks up the current impl, say, clojurescript and tries to load “foo/bar.cljs"
but if your file is actually foo/bar.cljc they you’re out of luck
with 0.3.0-x?
yep, 0.3.0-alpha5
and looked at the code in master
it makes sense
yea I believe it
now it’d be easy to just see if the resource exists and if not try cljc in both cases (clojure and cljs)
but what happens if there are two files, one with clj and one with cljc? is that even a thing?
is this happening in the wrapper for load?
here:
[[clojure.core$ex_info invoke "core.clj" 4593] [clojure.core.typed.errors$int_error invoke "errors.clj" 39] [clojure.core.typed.errors$int_error invoke "errors.clj" 36] [clojure.core.typed.analyze_clj$ast_for_file invoke "analyze_clj.clj" 251] [clojure.core.typed.analyze_clj$ast_for_ns invoke "analyze_clj.clj" 288] [clojure.core.typed.collect_utils$collect_ns_STAR_ invoke "collect_utils.clj" 79] [clojure.core.typed.collect_phase$collect_ns invoke "collect_phase.clj" 64] [clojure.core.typed.check_ns_common$check_ns_info$fn__45278$fn__45279 invoke "check_ns_common.clj" 66] [clojure.core.typed.check_ns_common$check_ns_info$fn__45278 invoke "check_ns_common.clj" 58]
oh you're using check-ns
yeah
ok yes
I'd assume always try the cljc one
good call
if there is a cljc, it should prevail over the clj or cljs right?
it means it’s newer anyway
I think the clj/s should be treated as out of date
it should work like c.c/load does, which I forgot how
but it changed recently for cljc
cool
excited, maybe I can contribute my first patch! 😄
cool! you need to have your name on http://clojure.org/contributors first
contributing
I believe new batches are added every friday
oh sure
ah shit I can’t type my name into the contributor agreement e-document
lol the field doesn’t seem writable
oh computers
aah no ok it works
@ambrosebs: how’s the crowfunding campaign going? 😄
got a blog post in the works
it's going surprisingly well considering how little time I've given to publicity
nice!
I’m wondering — in CONTRIBUTING.md it says that everything goes through JIRA etc but I see 4 Pull Requests in the github repo — where should I submit mine?
JIRA
those pull requests are for review purposes only
patches suck for collaborative reviews
oh okay
cool :simple_smile:
post on gradual typing for clojure http://frenchy64.github.io/2015/06/19/gradual-typing.html
@ambrosebs: great post, I found it illuminating
martintrojer: thanks
martintrojer: does the formatting work on your machine?
indeed, very nice
great
stole from the best
@ambrosebs: awesome post!
@ambrosebs: in a nutshell, could I say that Optional Types care about "type check or not" within a language, whereas Gradual Typing is more related with the boundaries between type systems?
following your article I could imagine some gradual type system between C and FFI as an example
andrevdm: right, the real difference is the runtime validation.
andrevdm: optional types has all the type checking, but has no effect at runtime
this turns out bad if new code comes along
thanks!
whoops wrong andrew :simple_smile:
I keep doing that on slack
hehehe np 😛
indeed, but it got me to see the article so thanks @ambrosebs :simple_smile:
lol nice
@ambrosebs: interesting article, well written, thank you :simple_smile: