This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-25
Channels
- # announcements (1)
- # beginners (6)
- # calva (23)
- # cider (43)
- # clj-kondo (2)
- # cljdoc (22)
- # cljsrn (4)
- # clojure (35)
- # clojure-dev (1)
- # clojure-france (1)
- # clojure-italy (16)
- # clojure-uk (10)
- # clojurescript (1)
- # data-science (1)
- # emacs (6)
- # fulcro (5)
- # graalvm (4)
- # jobs-discuss (28)
- # off-topic (29)
- # pedestal (11)
- # planck (31)
- # prelude (2)
- # reitit (2)
- # vim (1)
So here's a surprising thing I just found: (java.net.URI. "https://google.com") actually fetches the page
Also, it seems to throw up on localhost uris. Is there a good way to validate uris without fetching?
It can be disabled and should be by default. This is the feature to show images in the repl.
I was surprised to find that form metadata doesnโt contain :file
by default for quoted forms, only :line
and :column
- I thought it did.
Reading the source, it looks like this is because :file
metadata is added by the compiler, not the reader - is that correct? Is there any trickery I can use to get the file from quoted forms?
Actually, no, it looks like :file
is only added for vars in the compiler. I guess this is because the reader is reading from Reader, not necessarily a file.
Sounds right
[clojure deps question] in an Ubuntu env, I can run git clone [email protected]:my-workspace/my-project
and it runs fine using the SSH keys, but when this project is added as dependency for other project like my-project {:git/url "[email protected]:my-workspace/my-project" :sha "0123..."}
I get an error:
Cloning: [email protected]:my-workspace/my-project
Error building classpath. connector is not available:
com.jcraft.jsch.agentproxy.AgentProxyException: connector is not available
Am I missing a configuration somewhere? ๐@georgiana.mania Have you looked at the Git configuration
section of https://clojure.org/reference/deps_and_cli Perhaps that can help.
thanks @dorab! I just fixed it. it was an issue with ssh-agent on that machine.
hey everyone, is there an easy way to load edn files with env vars attached to specific lein tasks?
lein test
would load test-config.edn
while lein run
would load dev-config.edn
sounds like an "xy" problem tbh... are you using Component/Integrant in the first place? They make it straightforward to have per-env systems, with different configs
Using reitit, I have an html file in my resources/public that I wish to serve as my root "/". With the following code it serves it, but does so with a 302 redirect
to /index.html
. How can I just straight up serve without the redirect? Why is it redirecting at all?
(response/file-response (str (io/resource "public/index.html")))
^ (response is ring.util.response)
Thanks; that does the trick! Still not sure why the file-response was resulting in a redirect, though
Oops; actually, doesn't work, because it tries to download as an octet stream when I hit it with a browser
you could read the file as a string and respond with it in the body and content type set to text/html
Yeah, I figured that would be a last resort
Hmmmm.... I'll try that; I didn't know about it