Fork me on GitHub
#core-typed
<
2015-06-18
>
ambrosebs14:06:12

sveri: I'm not sure of the best way to handle misspelt annotations.

ambrosebs14:06:28

sveri: often annotations go before vars even exist.

sveri14:06:46

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

txus15:06:11

I found a tricky one

txus15:06:21

well not tricky but weird

txus15:06:35

when loading an entire ns, say, foo.bar

txus15:06:58

core.typed looks up the current impl, say, clojurescript and tries to load “foo/bar.cljs"

txus15:06:09

but if your file is actually foo/bar.cljc they you’re out of luck

ambrosebs15:06:39

with 0.3.0-x?

txus15:06:01

yep, 0.3.0-alpha5

txus15:06:04

and looked at the code in master

txus15:06:07

it makes sense

ambrosebs15:06:15

yea I believe it

txus15:06:28

now it’d be easy to just see if the resource exists and if not try cljc in both cases (clojure and cljs)

txus15:06:39

but what happens if there are two files, one with clj and one with cljc? is that even a thing?

ambrosebs15:06:43

is this happening in the wrapper for load?

txus15:06:59

[[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]

ambrosebs15:06:18

oh you're using check-ns

ambrosebs15:06:47

I'd assume always try the cljc one

txus15:06:57

good call

txus15:06:04

if there is a cljc, it should prevail over the clj or cljs right?

txus15:06:06

it means it’s newer anyway

ambrosebs15:06:19

I think the clj/s should be treated as out of date

ambrosebs15:06:36

it should work like c.c/load does, which I forgot how

ambrosebs15:06:41

but it changed recently for cljc

txus15:06:39

excited, maybe I can contribute my first patch! 😄

ambrosebs15:06:49

cool! you need to have your name on http://clojure.org/contributors first

ambrosebs15:06:40

contributing

ambrosebs15:06:31

I believe new batches are added every friday

txus15:06:12

ah shit I can’t type my name into the contributor agreement e-document

txus15:06:21

lol the field doesn’t seem writable

txus15:06:01

oh computers

txus15:06:44

aah no ok it works

txus15:06:15

@ambrosebs: how’s the crowfunding campaign going? 😄

ambrosebs15:06:53

got a blog post in the works

ambrosebs15:06:22

it's going surprisingly well considering how little time I've given to publicity

txus15:06:10

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?

ambrosebs15:06:27

those pull requests are for review purposes only

ambrosebs15:06:44

patches suck for collaborative reviews

martintrojer18:06:19

@ambrosebs: great post, I found it illuminating

ambrosebs18:06:33

martintrojer: thanks

ambrosebs18:06:15

martintrojer: does the formatting work on your machine?

martintrojer18:06:23

indeed, very nice

ambrosebs18:06:29

stole from the best

andrewhr18:06:21

@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?

andrewhr18:06:09

following your article I could imagine some gradual type system between C and FFI as an example

ambrosebs19:06:07

andrevdm: right, the real difference is the runtime validation.

ambrosebs19:06:45

andrevdm: optional types has all the type checking, but has no effect at runtime

ambrosebs19:06:11

this turns out bad if new code comes along

ambrosebs19:06:09

whoops wrong andrew simple_smile

ambrosebs19:06:20

I keep doing that on slack

andrewhr19:06:22

hehehe np 😛

andrevdm19:06:35

indeed, but it got me to see the article so thanks @ambrosebs simple_smile

sveri20:06:46

@ambrosebs: interesting article, well written, thank you simple_smile