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

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

jamesleonis02:07:32

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

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! 🙂

seancorfield03:07:41

(I use Atom/Chlorine and Socket REPLs everywhere)

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 😄

umardaraz474712: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)

umardaraz474717:07:19

@ bundle of thanks. Exactly problem was with cider.

ericihli14: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)))

alexmiller14:07:36

Because the ` will qualify foo

ericihli14:07:21

Ah. Of course. Thanks!

alexmiller14:07:56

And defn spec takes an unqualified symbol as function name

alexmiller14:07:25

So either ‘ instead or ~’foo