clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
synthomat 2020-12-22T06:47:57.159700Z

good morning!

slipset 2020-12-22T07:09:59.159900Z

Morning!

dharrigan 2020-12-22T07:24:35.160100Z

Good Morning!

raymcdermott 2020-12-22T07:38:56.160800Z

Morning and hello 👋:skin-tone-3: @hequ

hequ 2020-12-22T08:01:01.161100Z

Good morning! 🙂

thomas 2020-12-22T08:01:16.161300Z

mogge

orestis 2020-12-22T08:19:48.162100Z

Morning! I forgot a merge marker in an EDN file and it parsed correctly as a key value pair:

>>>>>>> origin/master

😂 1
dominicm 2020-12-22T08:23:34.162200Z

Yep!

dominicm 2020-12-22T08:23:53.162300Z

I once spent ages tracking a rogue ' in an edn file which was parsed as it's own symbol

dominicm 2020-12-22T08:24:28.162400Z

user=> (clojure.edn/read-string "{:foo '(bar)}")
Execution error at user/eval3 (REPL:1).
Map literal must contain an even number of forms
BUT IT DOES

😂 2
thomas 2020-12-22T08:37:17.164100Z

How much time do software engineers spend just looking at single character mistakes on a daily basis (cumulative )

1
dominicm 2020-12-22T08:46:32.164200Z

Even more confusing was when "{:foo '}" worked. Whole can of nope right there.

thomas 2020-12-22T09:04:58.164500Z

that is very weird indeed.

simongray 2020-12-22T09:20:51.164800Z

belated morning

thomas 2020-12-22T09:24:54.165400Z

Anyone here with AWS RDS experience? I am stuck on creating a proxy.

jasonbell 2020-12-22T09:27:26.165800Z

Morning

👋 1
2020-12-22T09:29:03.166100Z

morning

dominicm 2020-12-22T09:32:29.166400Z

@thomas what kind of proxy?

thomas 2020-12-22T09:32:49.166700Z

a Database proxy.

thomas 2020-12-22T09:33:14.167300Z

they strongly suggest you use one.

dominicm 2020-12-22T09:33:24.167900Z

Amazon do?

dominicm 2020-12-22T09:33:27.168Z

Really?

thomas 2020-12-22T09:33:37.168300Z

but when I try to create a Proxy I can't choose a DB to associate it with.

thomas 2020-12-22T09:33:53.168700Z

yes, they do. Part of the RDS service.

dominicm 2020-12-22T09:34:18.168900Z

https://aws.amazon.com/rds/proxy/ ah

dominicm 2020-12-22T09:34:43.169800Z

I don't think that applies to java too much, as we most of that baked into client libraries.

thomas 2020-12-22T09:35:58.170200Z

we are planning on using Lambda's

dominicm 2020-12-22T09:36:06.170500Z

Ah, makes sense then

dominicm 2020-12-22T09:37:01.171700Z

I wonder if that actually works. Is opening a real db connection that much more expensive than this fake one? I always assumed tcp handshakes were the delay.

thomas 2020-12-22T09:44:30.173600Z

the idea is that the proxy holds all the DB connections

raymcdermott 2020-12-22T09:45:46.174900Z

Single character problems. Try putting a ~ on a new line at the end of a file when you’re a vi user.

raymcdermott 2020-12-22T09:46:50.176400Z

I still have no idea why tildas are still a thing in vi .. anyone?

dominicm 2020-12-22T09:47:35.177200Z

@thomas sure. But is that faster than holding them locally and establishing a new connection to the proxy repeatedly?

synthomat 2020-12-22T09:49:35.177900Z

@raymcdermott huh you’re unable to type a tilde in vim?

thomas 2020-12-22T09:55:12.178300Z

the idea is that all the retrying logic isn't needed in every lambda. and the proxy can do some authentication for you as well.

slipset 2020-12-22T10:06:21.178800Z

@synthomat it’s the visual end-of-file marker.

slipset 2020-12-22T10:06:30.179200Z

One line of text
~
~
~

slipset 2020-12-22T10:06:57.179800Z

The tildes are vis way of showing it’s nothing here.

synthomat 2020-12-22T10:07:24.180300Z

i know, i know – didn’t get the question though 😅

dominicm 2020-12-22T10:09:01.180400Z

But client libraries already do the retry, so I don't need to worry about that?

synthomat 2020-12-22T10:11:39.181600Z

hm I’m wondering why ring has a session-wrapper that relies on storing the session key in cookies but doesn’t provide anything where the user can implement a custom “key-function”

dominicm 2020-12-22T10:12:12.181700Z

Ray is just trolling us

dominicm 2020-12-22T10:12:35.181800Z

If you :set number it doesn't work anyway :)

dominicm 2020-12-22T10:19:06.182200Z

Cypher sucks. Long live gremlins. I'm too lazy to dig in, but I really hope graph query language doesn't repeat the sql mistake and make string mashing the building tool. I'm now annoyed I have to do that with cypher.

raymcdermott 2020-12-22T10:19:08.182400Z

Wow, not trolling

raymcdermott 2020-12-22T10:21:14.185200Z

I know it’s the end of file marker but my point is that can easily be confused for a legal character in most programming languages. The fact that you can countermeasure it doesn’t make it good

raymcdermott 2020-12-22T10:23:03.187700Z

These days the editor could easily choose a more evident set of characters. I’m assuming that Unicode support is in there by now

synthomat 2020-12-22T10:23:16.188Z

you can change it to a different character, for example π

synthomat 2020-12-22T10:23:24.188300Z

(nur sure if pi is better than a tilde, though)

😂 1
raymcdermott 2020-12-22T10:23:49.189Z

Just saying it’s a bad default for 2020

synthomat 2020-12-22T10:24:03.189200Z

hehe

raymcdermott 2020-12-22T10:25:26.189800Z

Should be ❇️❇️❇️❇️❇️

raymcdermott 2020-12-22T10:26:03.190300Z

For example

synthomat 2020-12-22T10:26:05.190400Z

not possible, tried it out 😞

synthomat 2020-12-22T10:26:16.190700Z

I guess because emojis have more than one character

synthomat 2020-12-22T10:26:47.191300Z

I should continue with my work rather than trying to change that character 😄

1
raymcdermott 2020-12-22T10:27:24.191900Z

Yeah it’s yet another sharp edge

dominicm 2020-12-22T10:28:22.193400Z

E474: Invalid argument: fillchars=eob:ray :( boo

raymcdermott 2020-12-22T10:28:34.193700Z

I used vi for decades and it’s still my fave in many contexts but just saying that there are problems

dominicm 2020-12-22T10:29:04.193800Z

set fillchars=eob:\ does the trick anyway

raymcdermott 2020-12-22T10:32:56.198100Z

Having a patch / fix really isn’t the answer cos 99% of users don’t have that - they have the defaults. Bringing it home, Clojure is a great example of why defaults matter.

dominicm 2020-12-22T10:38:06.198200Z

I like ~ though, better default :)

💀 1
thomas 2020-12-22T10:41:33.198300Z

it is what AWS recommend... just my 2c.

dominicm 2020-12-22T10:44:42.198500Z

Yeah, I know. But I just assume everyone is upselling me 😁

dominicm 2020-12-22T10:44:49.198700Z

Just sceptical

slipset 2020-12-22T10:51:39.199400Z

@dominicm gremlin is basically Groovy. Not the best choice IMO.

orestis 2020-12-22T10:57:17.199900Z

@thomas I think the RDS proxy is only for Aurora?

orestis 2020-12-22T10:57:49.200100Z

Or am I thinking about the Data API?

simongray 2020-12-22T11:29:09.201100Z

@slipset in what way is it basically Groovy? Is it implemented in Groovy?

dominicm 2020-12-22T11:31:57.201300Z

But it's defined as a data protocol, so it's language agnostic and has a nice dsl in every language!

slipset 2020-12-22T11:53:42.201800Z

g.V.has('name','hercules').out('father').out('father').name is an example query.

slipset 2020-12-22T11:54:46.202900Z

The implementation we’re using is implemented in/backed by Groovy which leads to all kinds of great surprises.

slipset 2020-12-22T11:55:14.203300Z

Since it’s accepting any groovy code.

slipset 2020-12-22T11:55:32.203700Z

So you can do g.V.map(my_own_fn)

borkdude 2020-12-22T11:56:59.204300Z

Does anyone know how I can force Clojure highlighting in a gist? https://gist.github.com/borkdude/e6f0b12f9352f3375e5f3277d2aba6c9

slipset 2020-12-22T11:57:40.204600Z

call the gist somehting.clj

slipset 2020-12-22T11:57:54.204800Z

Which you’ve done…

borkdude 2020-12-22T11:59:38.205300Z

I'm using a shebang which confuses github apparently

synthomat 2020-12-22T12:27:14.206200Z

it helps putting the shebang to the second line but it will of course break it.

synthomat 2020-12-22T12:30:21.207100Z

@borkdude ooor put #!/usr/bin/env bash# looks ugly but seems to work for both shebang and highlighting

borkdude 2020-12-22T12:46:01.207900Z

I've seen some inline-comment hint recently to set the language. I should have written it down

thomas 2020-12-22T13:58:48.208500Z

I can select both Mysql and PostgresSQL DB' as options.

dominicm 2020-12-22T14:44:32.208700Z

@slipset I think there's a clojure implementation kicking about. Anyway, that's way better than the neo4j cypher dsl:

(query g "social"
         (.render cypher-renderer (.build (.returning
                                            (Cypher/match (into-array [(.. (Cypher/node "person" []) (named "a"))]))
                                            (into-array ["a"])))))
I think I'm going to have to "honey" that up somehow.

dominicm 2020-12-22T14:45:20.208800Z

I'm planning to try and load clojure code into redisgraph and see about querying it.

1
orestis 2020-12-22T15:22:18.209Z

Yes, but RDS flavor or Aurora flavor? Or perhaps you need to change something in the security groups of those instances?

thomas 2020-12-22T16:21:28.209200Z

I tried both RDS and Aurora at the moment.... it turns out you need roles, secrets and what more... still working on it.

dominicm 2020-12-22T17:31:14.209400Z

@slipset things like https://github.com/clojurewerkz/ogre look nothing like groovy of course. So I think it's all down to the library you use as to what syntax you get.

slipset 2020-12-22T20:01:50.210500Z

Luckily we’ve exposed the non-data thing to our customers, so we’re locked in.

borkdude 2020-12-22T20:03:09.210800Z

btw I found a solution for the highlighting problem

👍 2
dominicm 2020-12-22T21:13:30.210900Z

@slipset you, uh, expose raw gremlin to your customers?