This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-21
Channels
- # ai (1)
- # announcements (18)
- # aws (7)
- # babashka (54)
- # babashka-sci-dev (6)
- # beginners (22)
- # calva (57)
- # cider (3)
- # clj-http (1)
- # clojure (144)
- # clojure-austin (1)
- # clojure-dev (38)
- # clojure-europe (34)
- # clojure-gamedev (4)
- # clojure-norway (8)
- # clojure-uk (5)
- # clojurescript (12)
- # clr (20)
- # conjure (4)
- # data-science (1)
- # emacs (30)
- # events (1)
- # graphql (9)
- # helix (7)
- # hyperfiddle (22)
- # introduce-yourself (4)
- # jobs (1)
- # leiningen (7)
- # malli (3)
- # off-topic (26)
- # polylith (26)
- # portal (5)
- # random (14)
- # shadow-cljs (113)
- # tools-deps (6)
- # xtdb (9)
The King!
There are not too many games written in Clojure. so I (re)wrote one. Originally I've created it for some fantasy console (pico-8 here) http://itch.io jam (links in readme). Game is simple but may be demanding. Call to play:
clj -Sdeps '{:deps {io.github.Clojure2D/clojure2d-examples {:git/sha "de93d39e9ef43e269d14381f066c85de7207dab7"}}}' -X games.the-king.the-king/run-game
Controls: z/x and arrows
Source and more info: https://github.com/Clojure2D/clojure2d-examples/tree/master/src/games/the_king
Exciting! However, I get this when trying it:
Cloning:
Checking out: at e7d3fa73bab1bc3e27dba30f2b5b7b40b5622ef1
Downloading: sicmutils/sicmutils/0.22.0/sicmutils-0.22.0.pom from clojars
...
Downloading: org/bytedeco/openblas/0.3.10-1.5.4/openblas-0.3.10-1.5.4-windows-x86.jar from central
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
src/games/the_king/font/pico-8-mono-reversed.ttf (No such file or directory)
Fonts moved to the resources, sha updated, should work on every platform (I hope) now.
Very nice, I played a bit using ClojureCLR and MonoGame https://github.com/lucasteles/monogame-clojure-hotreload/tree/flappy-bird, very nice experience
Running the command failed for me with:
Syntax error (UnsupportedOperationException) compiling at (fastmath/kernel.clj:866:1).
Can't type hint a primitive local
Also, can you verify fastmath version you have on classpath, please? kernel.clj is less than 800 loc
this should answer both qs, hope it helps! https://gist.github.com/vemv/03feb87a603350512e5fa8a53b72a007
it also can help to run Eastwood with :boxed-math
and :performance
linters enabled (they're disabled by default) in a CI matrix (different jvms, clojures). Since it essentially runs the Clojure compiler, you should get the very same errors.
Here's a fresh example of all of that https://github.com/clojure-emacs/logjam/commit/b3e7d8943d98abd15c81c7371cbcac048a684c93
Great, I'll take a look at this tomorrow. Usually I compile everything but against current Clojure version. Tolerance for primitive hinting changed a couple of times as I observed.
@U45T93RA6 there is a problem indeed (tricky one) with the Clojure 1.10.3, 1.11.1 works, so until I fix it play the game on the latest Clojure 🙂 And eastwood
is really cool (I used it in the past but stopped for unknown reason)
Yeah... probably I'm running an old clojure
cli? But that shouldn't matter given this declaration https://github.com/Clojure2D/clojure2d-examples/blob/3f1564897d4cd62b232c94643555dfd068a39c31/deps.edn#L2
Eastwood often failed to run in a given project a few years ago. It's gotten an strengthening + misc features since