Better HN
topnewbestaskshowjobs
Log inSign up

jfhamlin

12 karma · joined Mar 24, 2009 (17y ago) · 4 submissions

Submissions

comment 1y ago · link · parent

Fairly easily, yes! There’s a small package [0] just for that; it’s similar to the corresponding java package [1] for clojure.

0. https://pkg.go.dev/github.com/glojurelang/glojure/pkg/glj

1. http://clojure.github.io/clojure/javadoc/clojure/java/api/pa...

comment 1y ago · link · parent

Glojure author here! Your analysis is spot-on :). I'll definitely take a look at clojure.core-test. As components mature, I focus on improving compatibility by porting tests from Clojure [0], but they often require modifications to accommodate differences in the host language. As you noted, there are still several fundamental features missing — most notably some core data structures. That said, the implementation is robust enough to support another non-trivial hobby project [1].

A bit more detail on some of your observations:

> No JIT or AOT compilation (right now).

I do plan to implement AOT compilation eventually. JIT, however, is more complex. Go's "plugin" standard library [2] could serve as a mechanism, but its support is limited and not without issues [3].

> it looks like the analysis could be largely a port of tools.analyzer

Exactly! Another key implementation strategy has been the handling of clojure.core. Instead of reimplementing everything from scratch, the Clojure 1.11 core libraries are programmatically transformed to work with Go [4]. However, this approach has its downsides — many functions appear to be available but are non-functional because parts of their implementation haven't yet been adapted.

And by the way, impressive progress on Jank! I've been following it closely and really admire the work you're doing.

[0] https://github.com/clojure/clojure/tree/master/test/clojure/... [1] https://github.com/jfhamlin/muscrat [2] https://pkg.go.dev/plugin [3] https://github.com/golang/go/issues/19282 [4] https://github.com/glojurelang/glojure/tree/808165fdc7e65672...

comment 1y ago · link · parent

Sorry to hear it's not working for you . Please feel free to file an issue on the repo with any relevant details! While I only work on Glojure sporadically at the moment, I really value feedback like this, and I'll prioritize investigating critical issues like it.

comment 1y ago · link · parent

Glojure author here. Transpiling to Go is definitely something I've considered — and am still considering! My current focus is on use cases that prioritize interactivity, which makes the existing interpreter-based approach a better fit for now. That said, transpiling parts of the system (especially the core libraries) to Go is a strong possibility down the road, particularly as a way to improve startup performance. After that, it could be made available as a public feature.