core-typed

Typed Clojure, an optional type system for Clojure
2020-02-24T01:08:25.085400Z

and fully automated maven release script to clojars. I'm in heaven. README even bumps versions https://github.com/typedclojure/typedclojure/commits/master

πŸ‘Œ 1
2020-02-24T08:32:37.085800Z

I'm looking forward to copy that flow πŸ™‚

πŸ‘ 1
2020-02-24T02:13:50.085500Z

thanks for the pointers!

πŸ‘ 1
whilo 2020-02-24T10:02:16.086900Z

regarding clj-kondo, i had also added datalog "type checking" to it, which was fairly straightforward: https://lambdaforge.io/2019/11/08/clj-kondo-datalog-support.html

whilo 2020-02-24T10:03:54.088500Z

there has been done a lot of work to plug it into all kinds of clojure tooling, which would be very valuable to have for core.typed as well, i think. one problem i had with core.typed was to get it to run in this linting mode, i tried a few times with eastwood.

whilo 2020-02-24T10:05:38.089300Z

i planned to collect some type system related information with @borkdude here, but have not yet found the time: https://github.com/borkdude/clj-kondo/wiki

whilo 2020-02-24T10:07:00.090800Z

@ambrosebs what is your opinion on linear types? rust seems to get a lot of attention at the moment and i see the value of automatically tracking external resources (not necessarily GC collected memory) with the type system

borkdude 2020-02-24T10:07:40.091100Z

recent addition to clj-kondo: return type inference:

$ clj-kondo --lint - <<< '(defn foo [] :foo) (inc (foo))'
<stdin>:1:25: error: Expected: number, received: keyword.
linting took 9ms, errors: 1, warnings: 0

πŸ‘ 3
2020-02-24T13:59:06.092500Z

@borkdude nice! what's the idea behind determining the return type? do you do it in advance or wait until you know the type of args?

borkdude 2020-02-24T15:08:42.093600Z

@ambrosebs clj-kondo will try to figure out the return type of a function while it's going through the AST. if that function is then used and the expected argument type does not match with what the function returns, clj-kondo will emit a warning

πŸ‘ 1
2020-02-28T09:30:29.099600Z

Are you planning to flow these types at all, or is that out of scope just now? e.g.

$ clj-kondo --lint - <<< '(defn foo [] :foo) (let [a (foo)] (inc a))'
linting took 10ms, errors: 0, warnings: 0

2020-02-28T09:30:51.099800Z

This is great btw; I had no idea kondo was doing this stuff yet… just upgraded!

borkdude 2020-02-28T09:32:26.100Z

That is supposed to work, but I'm not sure why it doesn't in this case. I'll make an issue for it.

borkdude 2020-02-28T09:34:01.100200Z

https://github.com/borkdude/clj-kondo/issues/776

πŸ‘ 1
borkdude 2020-02-28T11:48:47.100700Z

@rickmoynihan Fixed it. Are you running linux or mac?

borkdude 2020-02-28T11:48:58.100900Z

It was a minor glitch.

2020-02-28T12:20:47.101300Z

mac

2020-02-28T12:20:52.101500Z

wow that was quick

2020-02-28T12:21:00.101700Z

can I brew upgrade?

2020-02-28T12:21:37.101900Z

hmm looks like I can’t

borkdude 2020-02-28T12:22:02.102400Z

It’s not released yet.

2020-02-28T12:22:17.102700Z

ahh no worries πŸ™‚

borkdude 2020-02-28T15:27:02.103Z

Released.

2020-02-28T15:49:50.103200Z

Upgraded:

$ clj-kondo --lint - <<< '(defn foo [] :foo) (let [a (foo)] (inc a))'
<stdin>:1:40: error: Expected: number, received: keyword.
linting took 47ms, errors: 1, warnings: 0
:thumbsup:

2020-02-24T23:17:27.094300Z

typedclojure 1.0.7 is out, just some more coordinate changes https://github.com/typedclojure/typedclojure/blob/master/UPGRADING.md#from-typedclojure-103-to-typedclojure-107

2020-02-24T23:17:44.094800Z

1.0.4-1.0.6 don't exist