joker

Discuss all things joker, the Clojure interpreter/linter on top of Go. https://github.com/candid82/joker
jcburley 2019-10-09T12:50:30.000800Z

gostd fork (at v0.12.9) now supports more types and receivers: https://github.com/jcburley/joker/; docs at: https://burleyarch.com/joker/docs/ (Plenty more work to do, but it's a noticeable improvement.)

🎉 1
jcburley 2019-10-23T07:04:56.013600Z

Just now uploaded a new version that supports more functions (those with certain cross-package/namespace dependencies).

🎉 1
jcburley 2019-10-24T05:47:14.014100Z

Fields in structs can now be access (as GoVar objects) via (Go obj :FieldName). Also, besides (deref govar) to get the underlying value of a GoVar, a rudimentary assignment (that works only for string types at the moment) is now available as in (Go govar := newval).

jcburley 2019-10-24T16:07:20.014300Z

Other types are now supported by (Go govar := newval).

pyrmont 2019-10-25T06:23:17.017200Z

Not sure what I think about the assignment syntax.

jcburley 2019-10-26T12:41:56.017600Z

The Go* functions are not really intended for use by applications and are probably temporary until and unless we figure out what would be more Clojure-like while respecting the semantic differences between Go and Clojure/JVM. E.g. this fork (if not canonical Joker) should at some point support (.field object) to get the value of a field in a (struct) object, just as it should support (type. vals...) as an abbreviation for (new type vals...).

jcburley 2019-10-26T12:43:13.017800Z

In particular, I couldn't find any existing Clojure form that provided the semantic equivalent of Go's obj.field = some-value, though reset! comes closest.

pyrmont 2019-10-26T14:55:16.019400Z

set! looks like it covers the analogous case in Clojure and ClojureScript. See http://clojure.github.io/clojure/branch-master/clojure.core-api.html#clojure.core/set! and http://cljs.github.io/api/cljs.core/setBANG

pyrmont 2019-10-26T15:15:39.021700Z

But having said that, I didn't appreciate that the Go* functions weren't really supposed to be for public use. It makes sense to introduce idiomatic forms later.

pyrmont 2019-10-26T15:18:06.024500Z

As for the fork, I was wondering if it would be helpful to have its own name. I find it really awkward to say out loud but 'Gojure' would make a lot of sense :P I'll note that there are two existing projects with this name on GitHub.

jcburley 2019-10-26T16:30:36.024700Z

Ha!

jcburley 2019-10-26T16:31:38.024900Z

I looked at set! and reset! earlier, but thought they weren't good fits at the time...can't recall why now, though.

jcburley 2019-10-26T16:37:30.025200Z

I'll go ahead and replace (Go var := val) with (set! var val).

👍 1
jcburley 2019-10-26T17:05:00.025600Z

Actually, Joker already has var-set, which seems closer.

jcburley 2019-10-26T17:44:11.025900Z

New version pushed, docs updated, thanks for the suggestion!

jcburley 2019-10-26T17:44:46.026100Z

(Might still want to add set! someday.)

pyrmont 2019-10-09T12:56:08.001800Z

Slack's URL parser is including the semicolon in the link.

😲 1
jcburley 2019-10-09T12:57:00.002Z

Thanks for mentioning! Here it is, corrected: https://github.com/jcburley/joker/

pyrmont 2019-10-09T12:58:41.002200Z

I love this project by the way. Really excited about the potential 🙂

👍 1
jcburley 2019-10-09T13:48:47.002700Z

Just updated the overview doc here: https://github.com/jcburley/joker/blob/gostd/GOSTD.md