This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aleph (2)
- # aws-lambda (18)
- # beginners (79)
- # boot (3)
- # cider (25)
- # cljs-dev (274)
- # cljsjs (10)
- # clojars (25)
- # clojure (56)
- # clojure-austin (1)
- # clojure-brasil (4)
- # clojure-dev (33)
- # clojure-dusseldorf (6)
- # clojure-gamedev (3)
- # clojure-italy (17)
- # clojure-poland (3)
- # clojure-russia (7)
- # clojure-spec (54)
- # clojure-uk (46)
- # clojured (1)
- # clojurescript (25)
- # core-logic (2)
- # data-science (3)
- # datascript (6)
- # datomic (55)
- # defnpodcast (2)
- # docker (1)
- # duct (14)
- # figwheel (2)
- # fulcro (131)
- # graphql (3)
- # leiningen (1)
- # liberator (15)
- # luminus (5)
- # nrepl (1)
- # numerical-computing (1)
- # off-topic (45)
- # onyx (15)
- # re-frame (9)
- # reagent (3)
- # ring (1)
- # shadow-cljs (91)
- # spacemacs (8)
- # sql (23)
- # unrepl (71)
- # videos (2)
Hello everyone. I'm interested in building some RPC based server/clients to work on a digital crypto asset.... i'm wondering how i could do this with clojure (instead of using gRPC with golang)
Hi, is there any way to make an "api first" approach in Clojure? I am not finding any ring/compojure/compojure-api generator
filter keeps all the elements that are true; is there a builtin that runs through the list, generates two lists, one of the true, one of the false ?
Assume I want to build a high-traffic clojure rest service router which is to be deployed in the cloud and dynamically scaled with new nodes etc, any opinions on what webserver to use in a critical production scenario like this? tomcat? aleph? jetty? undertow? I realize this is opinion based, but I also realize this is the kind of thing you only figure out once you go down the wrong path...I'd like to learn from wrong paths already taken if possible...
I have used various servers in past lives for java based apps, but I figured there are special considerations (production repl? upsides with executable jar instead of servlet container etc) when deploying with clojure
ok, was starting to think I had no takers : ) Why aleph and I assume running with aleph would mean not running in say jetty/tomcat etc? (I'm new to web apps with clojure)
that's my preference because: - aleph is built on netty which is cool and fast async server - my boss has a lot of commits in it so I can get some knowledge from him without googling :smile: and yes, you don't need jetty/undertow
and there's awesome manifold library https://github.com/ztellman/manifold which aleph also uses
In that case, there are for example: https://github.com/weavejester/compojure-template https://github.com/metosin/compojure-api-template (and a bigger one:) https://github.com/luminus-framework/luminus-template
tomcat isn't your choice for light weight btw - it's nice if you want multiple jvm processes in one vm though
you can get a repl in production regardless of container by using the socket repl startup arg or using the nrepl library and starting an nrepl server in your -main
of course you shouldn't listen to any non local connections from that repl... - not secure at all
AWS Elastic Beanstalk provides a Tomcat platform (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html#concepts.platforms.java)
No, i mean having a swagger api specification generate the compojure routing endpoints, and schema
I have noticed that lein new does not play well with cloning a github repository. I did not see any issues about this on the leinengen github repo. Has there been any discussion about fixing this?
clojure.walk/postwalk, is there a way to distinguish map k/v pairs (which are given as 2-element PersistentVectors) and regular 2-element vectors?
The easy way to create a new git project is to create it on github and clone it. That will create .gitignore, LICENSE, and README.md, if you run lein new on that those files get walked on.
I create a project locally, work on it for a while, later if I want to publish to github I create an empty repo there and push to it
it has never occurred to me to actually check the "Initialize this repository with a README" box when creating a repo on github
yeah, I usually
lein new foo or copy the relevant bits from an existing project, then create an empty repo in github to push to
Ah, hadn't considered that. Is there a public repository for templates? I am thinking someone might have already built this.
$ lein new foo $ cd foo $ git init . $ git remote add origin [email protected]:$USER/foo.git $ git add . $ git commit $ git push -u origin master
there is an 'app' template built into lein that includes a README, LICENSE, and gitignore, if you weren't aware: https://github.com/technomancy/leiningen/tree/master/resources/leiningen/new/app
Anyone have experience using data.finger-tree in production? It seems like the repo could use some love so I wasn’t entirely sure about it’s stability.
@jody Many Clojure libraries are "complete" and/or "stable" so they often don't show much recent activity.
hey guys I had a one-off question I’m hoping someone could help me with: what’s the idiomatic way to lazily read lines in a file for later processing? after some experimentation i came up with
I know that
(let [rdr (io/reader (io/resource path))] (letfn [(read-next  (lazy-seq (if-let [line (.readLine rdr)] (cons line (read-next)) (do (.close rdr) nil))))] (read-next))))
with-openexists to help close the resource, but it doesn’t work if you’re trying to return from a function some lazy sequence (i.e. you’re not doing all the processing in the body of the
with-open). is there another way to handle this that I’m missing?
Unlike other languages, Clojure tends to encourage very narrow-focused libraries so they do one thing and do it well.
(that said, there certainly are abandoned libraries out there -- but even then, they tend to be fairly stable)
^ @jody coming from the node/js/npm ecosystem it scared me too initially, that a lot of clojure libs are “stale”. I now take it as a good thing, not a bad, that I can use a 4 year old library written against some older version of clojure and everything still works. Welcome to the awesomeness of people who actually care about backwards compatibility.
Hi everyone. I'm really struggling with this one and I'm hoping someone can help me out. I've got a lot of the pieces in place, but it's my final recursive step that I'm having a mental block with. I have a 2 dimensional vector, e.g.:
I have a function that gets me the vertical / horizontal adjacent "cells" which I've named
[[0 0 2 0 0] [0 2 2 0 0] [0 0 0 2 0] [2 0 2 0 0]]
get-adjacent-pointswhich accepts the X and Y points of the "cell" I'm navigating from. So if I specify
get-adjacent-points [0 0]), I will get
[[1 0][0 1]back. I've also got a function to check the value of a specific point which I've named
(get-point-value 0 0)will return
0, whereas calling
(get-point-value 2 0)will return
2(the third column value in the first row). I'm trying to figure out a way to combine these functions within another function (or more) where I can find all vertical/horizontal adjacent cells with the same value as my initial randomly selected cell and update those to a new value (in this example
1) and repeat the process finding related adjacent cells for those until I exhaust any adjacent cells with the same initial value. So using my initial 2D example above, if I started with
[0 0], it would see the top left "cell" is a zero value, update it to be
1, find it's adjacent cells, and if any of those are zero, change them to 1, etc, ending up with a final value of:
I've tried to be as descriptive as possible here. I hope the explanation makes sense. Thanks in advance for any help with this.
[[1 1 2 0 0] [1 2 2 0 0] [1 1 1 2 0] [2 1 2 0 0]]