/r/Clojure
Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
/r/Clojure
Hi guys
I have plan to use clojure as a fullstack web development.
I have some experience in reagent and reframe.
now I'm seeking for something fullstack.
this is for small to medium size project like a normal crud application.
I need something which can delivery project as fast as I can.
Could you guys recommend me something awesome please ?
For me:
PS: clojure = list + function + java/jvm,does this equation hold?
(require '[clojure.spec.alpha :as s])
(defn my-dec
([x] (my-dec x 1))
([x y] (- x y)))
(s/def :int/pos (s/and int? pos?))
(s/fdef my-dec
:args (s/cat :x :int/pos :y :int/pos)
:ret :int/pos)
(my-dec -1) ; expected to assertionerror but not now
Please ask anything and we'll be able to help one another out.
Questions from all levels of experience are welcome, with new users highly encouraged to ask.
Ground Rules:
If you prefer IRC check out #clojure on libera. If you prefer Slack check out http://clojurians.net
If you didn't get an answer last time, or you'd like more info, feel free to ask again.
Advent of Code has started today.
Who is using Clojure to write the solutions? Share the links your repositories!
Please include any restrictions (remote/on-site, geographical, workpermit, citizenship) that may apply.
Does anyone know why, using prefix-tree routing in Pedestal:
These work
"/posts"
"/posts/:year/:month/:day/*rest-of" ;"/posts/2024/11/29/17:02/foo"
But this doesn't (when added to a routing table with the above)
"/posts/:year/index" ;nil route for "/posts/2024/index"
But somehow this works (when added to the two working routes above)
"/posts/:year" ;"/posts/2024" correctly routed
I naively believed number of path segments would somehow distinguish routes from one another in prefix tree routing. I can't think of how else "/posts/:year" is successfully distinuished from "/posts/:year/:month/:day/*rest-of"". But then why doesn't "/posts/:year/index" work?
(I read through the PR that led to Pedestal's prefix tree router and the README for the go router that inspired it, but I still am not grasping why the above outcomes occur. Most of the Pedestal docs, which have become pretty great overall, seem to focus on the performance aspects of the router rather than how it works in practice.)
✦ ❯ clojure-lsp --version
clojure-lsp 2024.11.08-17.49.29
clj-kondo 2024.09.28-SNAPSHOT
:LspInfo
LSP configs active in this buffer (bufnr: 17) ~
- Language client log: ~/.local/state/nvim/lsp.log
- Detected filetype: `clojure`
- 0 client(s) attached to this buffer
- Other clients that match the "clojure" filetype:
- Config: clojure_lsp
filetypes: clojure, edn
cmd: ~/.local/bin/clojure-lsp
version: `clojure-lsp 2024.11.08-17.49.29`
executable: true
autostart: true
root directory: Not found.
:LspLog
Nothing...
It have already existed a deps.edn file and .git folder, but still told me "root directory: Not found".
If I define macro like this;
(defmacro pp [expr]
`(println (str expr) "=>" ~expr))
then expect to print result (+ 1 2) => 3
when call it with this:
(pp (+ 1 2))
conform.nvim built-in suppport formatters:
Recently I was working on a backend service and I needed to integrate swagger UI with it. We use Pedestal for our routing. If anyone has any good way to do it.
Ktor run on jvm, so they should be compatible out of the box?
Please ask anything and we'll be able to help one another out.
Questions from all levels of experience are welcome, with new users highly encouraged to ask.
Ground Rules:
If you prefer IRC check out #clojure on libera. If you prefer Slack check out http://clojurians.net
If you didn't get an answer last time, or you'd like more info, feel free to ask again.
What is babashaka pod and do you use it in development or production?