Has anybody tried cheerpj? https://github.com/leaningtech/browsercraft
Wow! Iโm a bit mindblown. So it takes a jar, makes it webassembly and then runs it?
Ok, so by doing a 1 min browse through docs, it creates a display like a java display and that little window inside the browser (I assume) behaves like a desktop. Itโs pretty neat
It's been discussed here on multiple occasions. I believe the #visual-tools guys even had a demo with a video recording somewhere on Zulip.
Okay. If lwjgl is working and clojure then we could make a game engine web&desktop
GraalVM also support wasm targets (experimental too - no graphics//UI - AFAIK) https://www.graalvm.org/webassembly/docs/
Is there a way to specify in metadata what a deprecated var was replaced with? For example, in something like this it'd be nice to have something like
^{:deprecated "0.10.0" :prefer small-integer}
(def ^{:added "0.10.0"} small-integer
"Generates a positive or negative integer bounded by the generator's
`size` parameter. Shrinks to zero."
(sized (fn [size] (choose (- size) size))))
;; The following five are deprecated due to being confusingly named,
;; and in some cases not being very useful.
(def ^{:deprecated "0.10.0"} int
"Deprecated - use gen/small-integer instead.
Generates a positive or negative integer bounded by the generator's
`size` parameter."
small-integer)
^ typically, like in this example, the docstring mentions the replacement, but with tools like clj-kondo that lint for deprecated vars, it'd be nice to be given a replacement var. Obviously the spec for metadata is open so I could just add :prefer wherever I want to use it but if the Clojure community doesn't standardize around it then it doesn't add much valueI think clj-kondo shows the string value of the deprecated key in the message, so you could also include it in the string perhaps
(def ^{:deprecated "0.10.0 - prefer small-integer"}
int
"Deprecated - use gen/small-integer instead.
Generates a positive or negative integer bounded by the generator's
`size` parameter."
small-integer)
/tmp/dude.clj:17:1: warning: #'user/int is deprecated since 0.10.0 - prefer small-integerthereโs also discouraged vars
:discouraged-var
{clojure.core/print {:message "Use metabase.util.log instead of clojure.core/print"}
clojure.core/println {:message "Use metabase.util.log instead of clojure.core/println"}
clojure.core/printf {:message "Use metabase.util.log instead of clojure.core/printf"}
clojure.core/prn {:message "Use metabase.util.log instead of clojure.core/prn"}
clojure.core/pr {:message "Use metabase.util.log instead of clojure.core/pr"} ...
https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md#discouraged-var