Fork me on GitHub

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

🎉 4

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

😲 4

Thanks for mentioning! Here it is, corrected:


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

👍 4

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

🎉 4

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


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


Not sure what I think about the assignment syntax.


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


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.


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.


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.


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


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

👍 4

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


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


(Might still want to add set! someday.)