Skip to main content
Best practices
3 votes
3 replies
94 views

Consider this function: (defn check-collision [game] (let [ball (:ball game)] (let [result (collision/ball-collision? ball (:paddle game))] (when (:collision? result) (resolve-...
user1785730's user avatar
  • 3,839
1 vote
1 answer
79 views

This is the code fragment of the error: (defn end-render [fb] (let [width (get-in fb [:dimen :width]) height (get-in fb [:dimen :height]) msfbo (:msfbo fb) fbo (:fbo fb)] ...
user1785730's user avatar
  • 3,839
3 votes
1 answer
125 views

At the risk of asking a question with an obvious solution: if I have a function in J that takes two arguments and returns two arguments and I want to accumulate the answer's second argument and to use ...
Shmuel Greenberger's user avatar
1 vote
0 answers
89 views

First of all thanks in advance for any help, this is the first time I'm setting up a system like this, so a few points are not clear and might be written in bad form (and that's why I'm here). ...
Alberto Zaccagni's user avatar
1 vote
1 answer
88 views

This code (GL33/glUniform2fv ^int (location shader "offsets") ^float [] offsets) produces this error: No matching method glUniform2fv found taking 3 args for class org.lwjgl.opengl.GL33 I'...
user1785730's user avatar
  • 3,839
3 votes
0 answers
129 views

I implemented a few lazy sort & merge functions that are used heavily in my ReBAC authorization library, EACL, to lazily "merge" & deduplicate ~1M datoms emitted from Datomic's d/...
Petrus Theron's user avatar
1 vote
1 answer
84 views

I'm just trying the Clojure LSP plugin in Intellij IDEA Community without knowing anything about Clojure or the plugin. My goal is to start learning Clojure. I installed the plugin and clojure-lsp via ...
user38725's user avatar
  • 965
1 vote
1 answer
46 views

One thing I like about metadata is that I can organise functions across namespaces. E.g.: (defn ^{:category 1} a-function [] (do-stuff)) (->> (ns-interns 'this.namespace) vals (map ...
Lars Melander's user avatar
0 votes
1 answer
57 views

Shadow-cljs has a resource loader that can include literal files into the Clojurescript code (ns app.my (:require [shadow.resource :as rc])) (rc/inline "file.txt") I need a macro that ...
user2649762's user avatar
0 votes
1 answer
89 views

In this function I get an exception: (defn ball-collision? [ball brick] (let [^org.joml.Vector3f ball-pos (:position ball) ^org.joml.Vector3f brick-pos (:position brick) ^org.joml....
user1785730's user avatar
  • 3,839
0 votes
0 answers
45 views

I am trying to make a sample web application on clojure that uses reitit and exposes its structure via swagger. To that end i have added code that handles request for "/swagger.json" as ...
Srv19's user avatar
  • 3,638
1 vote
2 answers
116 views

Consider this code snippet which calculates the delta time since the last frame: (defn game-loop [window game] (let [last-frame (atom (GLFW/glfwGetTime))] (while (not (GLFW/...
user1785730's user avatar
  • 3,839
1 vote
1 answer
97 views

Consider this map: (def my-map {:a-vec []}) Now I want to append some value to a-vec: (assoc my-map :a-vec (conj (:a-vec my-map) 17)) What I don't like about this is that I name both the map and the ...
user1785730's user avatar
  • 3,839
1 vote
0 answers
134 views

When enabling Cursive in Intellij 2024.03 it throws: Error reading C:\myprocect-path\project.clj class com.intellij.credentialStore.OneTimeString cannot be cast to class java.lang.String (com.intellij....
Krzysztof Tkacz's user avatar
0 votes
1 answer
110 views

This is the Java code: public static FloatBuffer createInterleavedVertexBuffer(AIMesh mesh) { FloatBuffer buffer = BufferUtils.createFloatBuffer(mesh.mNumVertices() * 8); for (int i = 0; i <...
user1785730's user avatar
  • 3,839

15 30 50 per page
1
2 3 4 5
1185