Skip to content

Releases: jcburley/joker

Support Go 1.19

07 Jan 04:33
Compare
Choose a tag to compare
Support Go 1.19 Pre-release
Pre-release

Support Joker 1.1.0

07 Jan 04:32
Compare
Choose a tag to compare
Support Joker 1.1.0 Pre-release
Pre-release

Support Joker 1.0.1

10 Sep 23:28
Compare
Choose a tag to compare
Support Joker 1.0.1 Pre-release
Pre-release

Support Go 1.18beta1

02 Jan 06:52
Compare
Choose a tag to compare
Support Go 1.18beta1 Pre-release
Pre-release

There's no support for generics per se in this release; mostly just recognizing any as an alias for interface{}.

Full Changelog: gostd-v0.15...gostd-v0.16

Support Joker 0.18.0

29 Dec 14:21
Compare
Choose a tag to compare
Support Joker 0.18.0 Pre-release
Pre-release

Support methods defined on embedded types, rename 'refTo' to '*', etc.

12 Oct 05:07
Compare
Choose a tag to compare

Many methods, available to Go code via types embedded in interfaces and structs, are now also made available to Joker code. E.g. (.Close c) on a net.TCPConn connection c now works, even though TCPConn itself does not implement Close, because its struct embeds the (non-exported) net.conn type, which does implement Close. Note that gostd tries to avoid wrapping a method, available via an embed, that is explicitly implemented by the containing type. For example, text/template/parse.DotNode is a struct that embeds NodeType, for which the Type() method is defined; but, since DotNode implements its own Type(), that method, not NodeType's, is left as the wrapped type for e.g. (.Type d), where d is typeDotNode.

A value receiver for a reference (wrapped by a GoObject) can now be called without having to explicitly dereference the object. Some support for calling a pointer receiver for a value is now provided, but doesn't work in the straightforward case of a GoObject wrapping that value, as the Go runtime (specifically, the reflect package) does not always see such a value as capable of being addressable (reflect.CanAddr() fails).

Pointer types are named using *, instead of refTo, as * is a reasonably common character in Clojure symbols. However, as [ and ] are not valid (without escaping in some fashion), arrays/slices are still named using arrayOf, leading to some bodges such as arrayOf*Foo. It's unclear whether any elegant solution to this problem exists.

Preliminary support for func() types (taking no arguments and returning no value) is provided. However, it's purely experimental, and no attempt is made to ensure single-threading behavior with respect to other running Joker code. As the only test case currently defined invokes the function on a separate thread from the main thread passing the function, it's either happenstance, or the very limited use case of the Joker code that implements the function, that allows that test case to pass.

Substantial refactoring of gostd continues with this preliminary release, but much more is planned, some of which will likely be visible to Joker code calling the wrapped namespaces.

Implement set!; EOL GoVar's, ref, and some var functionality

28 Apr 19:33
Compare
Choose a tag to compare

The (set! ...) special form is implemented, and supersedes use of (var ...) on field references. E.g. instead of (var-set (var (.member instance)) value), use (set! (.member instance) value), which is much more Clojure-like.

The GoVar object no longer exists. Variables are now implemented as GoObjects that wrap references (pointers) to the respective variables, with automatic derefencing for ordinary usage. So, SomeVar yields a snapshot of the SomeVar variable; now, (set! SomeVar new-value) is used to change the value of the variable, and (set! (.SomeField SomeVar) new-value) to change the value of a specific field when SomeVar is a struct. ((deref SomeVar), aka @SomeVar, no longer work on global variables as previously described for earlier versions of this fork. Similarly, (var (...)) is no longer supported.)

The ref function (in joker.core) has been removed, as it was not similar enough to Clojure's ref. A replacement function (or possibly a special form) is being contemplated for a future release.

Values of type error are now wrapped in GoObjects instead of being converted into Strings. This allows receivers for those values to be invoked, and is consistent with preserving the native type when not precisely implemented by a Joker type (in this case, Error, an abstract type). When an error type is needed, the supplied expression may be String or GoObject[error].

Merge in the GoType->Type Change

19 Apr 05:34
Compare
Choose a tag to compare
Pre-release

This actually does what gostd-v0.12 claimed to do, which is good.

Support Joker 0.17.0, Replace `GoType` With `Type`

19 Apr 05:12
Compare
Choose a tag to compare

This release dispenses with one of the "special" Object types, GoType, instead creating Joker Type objects, which are now a bit heavier-weight (they support constructors and lists of methods and receivers, though none of the builtin Joker types do any of that yet) in order to support the features that GoType previously supported.

Mostly, this just makes understanding gostd a bit easier, as well as the code base somewhat simpler.

Support Clojure's "dot" (., .member, type., ..) special forms/macros

07 Apr 06:41
Compare
Choose a tag to compare

While (. instance field) returns the value of the field, instead of using (set! ...) to change it (as that's not yet supported), use (var ...) to return a GoVar for the field (the field's value itself is not retrieved). Then use (deref ...) on the resulting GoVar to obtain the value, or (var-set ...) to set it.