hoplon

borkdude 2023-10-27T09:31:41.865119Z

In the Hoplon README there is a namespace required [hoplon.goog] but it's not used in the example. What is this namespacde for, does it cause necessary side effects when loaded perhaps?

2023-10-27T11:52:03.335569Z

Yeah, it is for side effects. It uses goog closure functions to change attributes instead of jQuery that is the default. Changing that to separate namespaces is one of the proposed ideas moving forward.

borkdude 2023-10-27T11:53:10.064569Z

I guess nowadays you could do completely without goog or jquery

2023-10-27T11:54:40.747319Z

And that is another one in the list 👍

borkdude 2023-10-27T11:56:28.839799Z

Also note that the goog libraries will be going into maintenance mode (see #cljs-dev)

2023-10-27T12:12:49.770269Z

Oh, thanks for bringing that to our attention, I was not aware.

borkdude 2023-10-27T10:42:19.952129Z

😎 Psst, wanna try some hoplon? https://babashka.org/sci.configs/?gist=e83da19df3d2739861334171779f79d5

2
❤️ 4
🎉 4
2023-10-27T12:33:26.643229Z

Wow! Thank you! This is amazing! @alandipert your wish was granted by @borkdude

borkdude 2023-10-27T13:09:30.288559Z

I think the cell? predicate can be made ~3x faster by using instance? instead of type:

cljs.user=> (deftype Cell [])
cljs.user/Cell
cljs.user=> (defn cell? [x] (= Cell (type x)))
#'cljs.user/cell?
cljs.user=> (time (let [x (->Cell)] (dotimes [i 1000000] (cell? x))))
"Elapsed time: 45.097167 msecs"
nil
cljs.user=> (time (let [x (->Cell)] (dotimes [i 10000000] (cell? x))))
"Elapsed time: 225.481834 msecs"
nil
cljs.user=> (defn cell? [x] (instance? Cell x))
#'cljs.user/cell?
cljs.user=> (time (let [x (->Cell)] (dotimes [i 10000000] (cell? x))))
"Elapsed time: 84.253875 msecs"
This predicate seems to be used quite extensively and on hot paths. If you agree, I can make a PR

🙏 1
2023-10-27T13:49:19.960349Z

Agreed! thanks2

borkdude 2023-10-27T13:57:36.143939Z

I (re-)installed boot but it crashes:

java.lang.UnsatisfiedLinkError: /Users/borkdude/Library/Caches/JNA/temp/jna13703279612089832314.tmp: dlopen(/Users/borkdude/Library/Caches/JNA/temp/jna13703279612089832314.tmp, 0x0001): tried: '/Users/borkdude/Library/Caches/JNA/temp/jna13703279612089832314.tmp' (fat file, but missing compatible architecture (have (i386,x86_64), need (arm64e)))
    clojure.lang.ExceptionInfo: /Users/borkdude/Library/Caches/JNA/temp/jna13703279612089832314.tmp: dlopen(/Users/borkdude/Library/Caches/JNA/temp/jna13703279612089832314.tmp, 0x0001): tried: '/Users/borkdude/Library/Caches/JNA/temp/jna13703279612089832314.tmp' (fat file, but missing compatible architecture (have (i386,x86_64), need (arm64e)))

borkdude 2023-10-27T13:59:16.279819Z

I'm just going to submit a PR and hope that CI will testify that it works

borkdude 2023-10-27T14:01:22.958129Z

https://github.com/hoplon/javelin/pull/44

borkdude 2023-10-27T14:03:04.534989Z

Perhaps a made a bit too many changes, which I personally don't like in a PR, but I couldn't resist ;)

2023-10-27T14:06:24.194489Z

Oh, I need to update javelin to stop using boot and setup the ci 😅

2023-10-27T22:09:41.378949Z

Hey Hoplon-ers... I should have dropped this in here long ago (maybe I did). But I made a thing in Hoplon more than four years ago. It's a tool for people who need SVG clocks for CNC work. https://clocktickgenerator.makertoolmaker.com Source code isn't posted anywhere. I don't have great analytics on it, but the videos have been viewed >5k times. Somewhere, out there, someone's making a clock with Hoplon...

🕒 2
😍 2