close
Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
108 views

I'm implementing an end-point using compojure.api.sweet: (defroutes http-routes (context "/shifts" [] (POST "/" [] :body [doc Shift] (create-shift doc)))) Shift ...
user31036423's user avatar
Tooling
0 votes
3 replies
66 views

I wrote a test that fails. Then I run command cider-test-ns-tests and got the expected error. Next step, I comment or remove that failing-test but when I do again run cider-test-ns-tests I still get ...
senior_pimiento's user avatar
1 vote
0 answers
82 views

I'm following this tutorial. In the chapter on continuous flows, the author whats to demonstrate that they can be sampled at any time and they are always ready. He presents this code: (def discrete-...
Eva's user avatar
  • 603
Advice
0 votes
3 replies
91 views

In clojure, the println function returns a nil: \>(println "a" a nil This makes it awkward to use print to access an intermediate value when print debugging: Say I have: (* (+ 5 10) (- ...
BnMcGn's user avatar
  • 1,470
Best practices
3 votes
3 replies
131 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,997
1 vote
1 answer
111 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,997
3 votes
1 answer
180 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
142 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
112 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,997
3 votes
0 answers
185 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
138 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
  • 984
1 vote
1 answer
62 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
90 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 ...
Eva's user avatar
  • 603
0 votes
1 answer
99 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,997
2 votes
2 answers
132 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,997

15 30 50 per page
1
2 3 4 5
1186