Fork me on GitHub
#joker
<
2019-10-09
>
jcburley12:10:30

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.)

🎉 4
pyrmont12:10:08

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

😲 4
jcburley12:10:00

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

pyrmont12:10:41

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

👍 4
jcburley07:10:56

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

🎉 4
jcburley05:10:14

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).

jcburley16:10:20

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

pyrmont06:10:17

Not sure what I think about the assignment syntax.

jcburley12:10:56

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...).

jcburley12:10:13

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.

pyrmont15:10:39

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.

pyrmont15:10:06

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.

jcburley16:10:38

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

jcburley16:10:30

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

👍 4
jcburley17:10:00

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

jcburley17:10:11

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

jcburley17:10:46

(Might still want to add set! someday.)