Fork me on GitHub
#beginners
<
2020-07-18
>
stopa02:07:45

Pretty magical clojure + gcp moment for the day — - sshed and opened prod repl...all over mobile!

🔥 3
jamesleonis02:07:32

It's so hard to overstate just how much Production REPLs feel like a legitimate superpower.

❤️ 3
seancorfield03:07:29

Yes, we run Socket REPLs in several of our production apps. Setting up an SSH tunnel over VPN and then connecting to the process from your editor -- and having the exact same workflow as when you're developing locally -- is, indeed, a superpower! 🙂

❤️ 6
seancorfield03:07:41

(I use Atom/Chlorine and Socket REPLs everywhere)

❤️ 3
sveri08:07:36

I get that this has a lot of advantages, but seriously, alone the thought of being able to mess up something via a connection to my production code by just accidentally pasting something to the repl that should stay in the dev env makes me shiver 😄

Umar Daraz12:07:30

hi fellow Clojurists I want to parse postgresql database url and trying the following code

(java.net.URI. "")
but it gives me
Error printing return value (MalformedURLException) at java.net.URL/<init> (URL.java:617).
unknown protocol: postgresql
How I can make it work?

ghadi13:07:58

clj
Clojure 1.10.1
user=> (java.net.URI/create "")
#object[java.net.URI 0x64b31700 ""]

ghadi13:07:24

@umardaraz4747 your editor (probably CIDER?) is trying to be helpful and throwing an exception while printing

ghadi13:07:39

note it says "Error printing return value"

ghadi13:07:54

not an exception while constructing the URI

ghadi13:07:53

you can turn off this feature in CIDER that slurps & prints URIs. (It's annoying)

💯 6
Umar Daraz17:07:19

@U050ECB92 bundle of thanks. Exactly problem was with cider.

Eric Ihli14:07:39

Why does this second form fail with a malformed fn exception? Can anyone point me to something to read to learn more about what eval does?

(eval `(+ 2 2))
  (eval `(defn foo [] (+ 2 2)))

Alex Miller (Clojure team)14:07:36

Because the ` will qualify foo

🙏 3
Eric Ihli14:07:21

Ah. Of course. Thanks!

Alex Miller (Clojure team)14:07:56

And defn spec takes an unqualified symbol as function name

Alex Miller (Clojure team)14:07:25

So either ‘ instead or ~’foo

💯 6