funcool

A channel for discussing and asking questions about Funcool libraries https://github.com/funcool/
rm 2016-05-31T07:22:45.000091Z

hi all. Can someone explain this:

(alet [a (ei/right 1) b (inc a)] a)
2
Why not 1 or #<Right 1> ?

rm 2016-05-31T07:31:35.000092Z

But

(alet [a (ei/right 1) b (ei/right 2)] a)
#<Right 1>

rm 2016-05-31T07:38:28.000093Z

I know

rm 2016-05-31T07:39:15.000094Z

because (inc a) is 2, not #<Right 2> and doesn't have context. I remember someone (probably niwinz) already explained this to me

niwinz 2016-05-31T07:39:53.000095Z

at this moment it seems like inconsistent

niwinz 2016-05-31T07:40:21.000096Z

and it seems like a bug 😞

niwinz 2016-05-31T07:41:13.000097Z

this additionally remember me that I should release a new version of cats ASAP

niwinz 2016-05-31T07:41:28.000098Z

because master comes with many bugfixes

niwinz 2016-05-31T07:42:33.000099Z

@rm the behavior differs because some different paths are taken for evaluate that

niwinz 2016-05-31T07:43:07.000100Z

if one expresion depends on other is evaluated differently if the both are just parallel paths

rm 2016-05-31T07:45:56.000102Z

@niwinz: thank you for explanation again, will wait for a new version. But actually it's very rare case that I use something like that, most of the time all results of functions are wrapped already

2016-05-31T08:08:52.000104Z

anyone here that is familiar with suricatta? i'm running into issues while trying to UPDATE ... SET key = NULL -- apparently, jooq tries to cast the null value to a varchar

2016-05-31T08:09:31.000105Z

so I was thinking that there perhaps was some clojure <-> java incompatibility that jooq uses to test for null ?

niwinz 2016-05-31T08:25:53.000106Z

I was found the same issue some days ago but I don't k now if I can solve it from suricatta part

2016-05-31T08:26:06.000107Z

i can help you with it, if you want

2016-05-31T08:26:19.000108Z

this is a real issue for me now, so it makes sense for me to spend some time debugging it

niwinz 2016-05-31T08:26:38.000109Z

any help is very welcome!

2016-05-31T08:26:56.000110Z

apparently (fmt/sql) returns SET foo = NULL, where (fmt/sqlvec) return SET foo = (CAST null AS CHARACTER VARYING)

niwinz 2016-05-31T08:27:13.000111Z

0.o

niwinz 2016-05-31T08:27:27.000112Z

seems like a dialect issue..?

2016-05-31T08:27:34.000113Z

yes, probably

2016-05-31T08:27:51.000114Z

the problem goes away when you get rid of the pgsql dialect

niwinz 2016-05-31T08:29:14.000115Z

hmm, if it works properly with default dialect, but when a connection is used with postgresql dialect it does not works

niwinz 2016-05-31T08:29:18.000116Z

it seems like a jOOQ bug

2016-05-31T08:29:25.000117Z

i agree with that

2016-05-31T08:29:58.000118Z

i wouldn't expect a bug like this to be in jOOQ, however

2016-05-31T08:30:06.000119Z

it's too major a bug

niwinz 2016-05-31T08:32:00.000120Z

user=&gt; (fmt/sqlvec (-&gt; (dsl/update :foo) (dsl/set :foo nil)))
["update foo set foo = ?" nil]
user=&gt; (fmt/sqlvec (-&gt; (dsl/update :foo) (dsl/set :foo nil)) {:dialect :postgresql})
["update foo set foo = cast(? as varchar)" nil]

niwinz 2016-05-31T08:32:32.000121Z

I going to write in the jOOQ mailing list

2016-05-31T08:32:53.000122Z

ok, awesome!

niwinz 2016-05-31T08:54:54.000123Z

done

niwinz 2016-05-31T08:56:46.000124Z

I'll notice you on any news on that 😉

2016-05-31T09:04:02.000126Z

awesome! i'll create an issue on the suricatta repo to keep track of this

niwinz 2016-05-31T09:04:49.000127Z

please!