Fork me on GitHub
#clojure-uk
<
2020-01-16
>
Samuel08:01:06

Morning all

guy10:01:13

morning!

Rachel Westmacott15:01:32

fwiw we moved away from aleph as a client (but are still using the server). iirc it didn't handle some edge cases as we expected

mccraigmccraig16:01:07

huh, what were those @peterwestmacott? i've not had any issues with the client, although we don't do any streaming with it or anything beyond simple requests

dominicm16:01:05

I've had it generate perfectly valid requests that particular servers rejected

dominicm16:01:54

I decided it was valid by eye. So may not have been. I think I gave up caring, but assumed it was case sensitivity or header ordering.

Rachel Westmacott16:01:57

I don't recall the specifics I'm afraid - it was a while ago. It may well have been to do with a bad interaction with a proxy.

zyxmn19:01:16

Hey fellas , is there a straight forward way to convert a string of this format 2020-01-16T18:28:00Z to a timestamp instance for postgres. Right now I am using the clj-time parse and formatter , but I have to remove the T from the original string since the parsing doesn't like that . Feels like i'm taking the long winded approach.

guy19:01:15

i might also be wrong

zyxmn22:01:24

Woo , that could be it !

dharrigan19:01:33

(defn timestamp->sql
  [timestamp]
  (sql/raw (str "timestamp with time zone '" timestamp "'")))

zyxmn23:01:25

This is miles better

dharrigan19:01:15

I use honeysql (and next jdbc) as my libs for sql work

guy19:01:51

i think clj-time lets u do a custom formatter so u dont need to do the z

dharrigan21:01:59

So, I can't for the life of me get this (Thread/setDefaultUncaughtExceptionHandler ..... to fire

guy21:01:50

i had to do it in the main method iirc

dharrigan21:01:07

I have an empty clj file, with that function in it, I eval it, then below it I do (/ 1 0), throws a dividebyzero error, but nothing gets shown in my uncaught exception handler (I have a little log statement)

dominicm22:01:29

Do it in a thread

dominicm22:01:43

The repl is catching it

dharrigan22:01:53

not in a repl

dharrigan22:01:26

I'll push up an example

seancorfield22:01:10

@dharrigan I'd expect clojure.main to be catching that, since that's how you're running your code.

seancorfield22:01:27

So it isn't "uncaught".