core-typed

Typed Clojure, an optional type system for Clojure
2015-06-18T14:30:48.000103Z

sveri: doh

2015-06-18T14:31:12.000104Z

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

2015-06-18T14:31:28.000105Z

sveri: often annotations go before vars even exist.

sveri 2015-06-18T14:33:46.000106Z

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

txus 2015-06-18T15:24:11.000107Z

I found a tricky one

txus 2015-06-18T15:24:21.000108Z

well not tricky but weird

txus 2015-06-18T15:24:35.000109Z

when loading an entire ns, say, foo.bar

txus 2015-06-18T15:24:58.000110Z

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

txus 2015-06-18T15:25:09.000111Z

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

2015-06-18T15:25:39.000112Z

with 0.3.0-x?

txus 2015-06-18T15:26:01.000113Z

yep, 0.3.0-alpha5

txus 2015-06-18T15:26:04.000114Z

and looked at the code in master

txus 2015-06-18T15:26:07.000115Z

it makes sense

2015-06-18T15:26:15.000116Z

yea I believe it

txus 2015-06-18T15:26:28.000117Z

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

txus 2015-06-18T15:26:39.000118Z

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

2015-06-18T15:26:43.000119Z

is this happening in the wrapper for load?

txus 2015-06-18T15:26:58.000120Z

here:

txus 2015-06-18T15:26:59.000121Z

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

2015-06-18T15:27:18.000122Z

oh you're using check-ns

txus 2015-06-18T15:27:26.000123Z

yeah

2015-06-18T15:27:33.000124Z

ok yes

2015-06-18T15:27:47.000125Z

I'd assume always try the cljc one

txus 2015-06-18T15:27:57.000126Z

good call

txus 2015-06-18T15:28:04.000127Z

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

txus 2015-06-18T15:28:06.000128Z

it means it’s newer anyway

2015-06-18T15:29:19.000129Z

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

2015-06-18T15:29:36.000130Z

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

2015-06-18T15:29:41.000131Z

but it changed recently for cljc

txus 2015-06-18T15:32:32.000132Z

cool

txus 2015-06-18T15:32:39.000133Z

excited, maybe I can contribute my first patch! 😄

2015-06-18T15:33:49.000134Z

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

2015-06-18T15:34:40.000135Z

contributing

2015-06-18T15:35:00.000136Z

http://clojure.org/contributing

2015-06-18T15:36:31.000137Z

I believe new batches are added every friday

txus 2015-06-18T15:36:46.000138Z

oh sure

txus 2015-06-18T15:39:12.000139Z

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

txus 2015-06-18T15:39:21.000140Z

lol the field doesn’t seem writable

txus 2015-06-18T15:40:01.000141Z

oh computers

txus 2015-06-18T15:41:44.000142Z

aah no ok it works

txus 2015-06-18T15:43:15.000143Z

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

2015-06-18T15:43:53.000144Z

got a blog post in the works

2015-06-18T15:44:22.000145Z

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

txus 2015-06-18T15:46:30.000146Z

nice!

txus 2015-06-18T15:47:10.000147Z

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?

2015-06-18T15:47:17.000148Z

JIRA

2015-06-18T15:47:27.000149Z

those pull requests are for review purposes only

2015-06-18T15:47:44.000150Z

patches suck for collaborative reviews

txus 2015-06-18T15:48:00.000151Z

oh okay

txus 2015-06-18T15:48:01.000152Z

cool :simple_smile:

2015-06-18T18:15:45.000153Z

post on gradual typing for clojure http://frenchy64.github.io/2015/06/19/gradual-typing.html

martintrojer 2015-06-18T18:19:19.000154Z

@ambrosebs: great post, I found it illuminating

2015-06-18T18:19:33.000155Z

martintrojer: thanks

2015-06-18T18:20:15.000156Z

martintrojer: does the formatting work on your machine?

martintrojer 2015-06-18T18:20:23.000157Z

indeed, very nice

2015-06-18T18:20:26.000158Z

great

2015-06-18T18:20:29.000159Z

stole from the best

2015-06-18T18:50:36.000160Z

@ambrosebs: awesome post!

2015-06-18T18:52:21.000161Z

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

2015-06-18T18:53:09.000162Z

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

2015-06-18T19:16:07.000163Z

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

2015-06-18T19:16:45.000164Z

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

2015-06-18T19:17:11.000165Z

this turns out bad if new code comes along

2015-06-18T19:20:00.000166Z

thanks!

2015-06-18T19:20:09.000167Z

whoops wrong andrew :simple_smile:

2015-06-18T19:20:20.000168Z

I keep doing that on slack

2015-06-18T19:20:22.000169Z

hehehe np 😛

andrevdm 2015-06-18T19:20:35.000170Z

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

2015-06-18T19:20:58.000171Z

lol nice

sveri 2015-06-18T20:09:46.000172Z

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