clojure

2025-08-07T10:04:45.054189Z

Has anybody tried cheerpj? https://github.com/leaningtech/browsercraft

๐Ÿคฏ 1
Ovi Stoica 2025-08-07T10:34:26.486729Z

Wow! Iโ€™m a bit mindblown. So it takes a jar, makes it webassembly and then runs it?

Ovi Stoica 2025-08-07T10:35:54.470679Z

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

p-himik 2025-08-07T10:41:44.076049Z

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.

๐Ÿ‘ 1
2025-08-07T18:45:41.827879Z

Okay. If lwjgl is working and clojure then we could make a game engine web&desktop

souenzzo 2025-08-11T19:03:00.409589Z

GraalVM also support wasm targets (experimental too - no graphics//UI - AFAIK) https://www.graalvm.org/webassembly/docs/

Emma Griffin (OST) 2025-08-07T21:41:54.157099Z

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 value

borkdude 2025-08-07T21:43:03.370039Z

I think clj-kondo shows the string value of the deprecated key in the message, so you could also include it in the string perhaps

๐Ÿง  1
borkdude 2025-08-07T21:44:42.791069Z

(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-integer

dpsutton 2025-08-07T21:49:37.055079Z

thereโ€™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

๐Ÿ‘ 1
๐Ÿ‘๐Ÿป 1