Fork me on GitHub
#clojure-europe
<
2020-12-22
>
synthomat06:12:57

good morning!

dharrigan07:12:35

Good Morning!

genRaiy07:12:56

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

hequ08:12:01

Good morning! 🙂

orestis08:12:48

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

>>>>>>> origin/master

😂 3
dominicm08:12:53

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

dominicm08:12:28

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

😂 6
thomas08:12:17

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

3
dominicm08:12:32

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

thomas09:12:58

that is very weird indeed.

simongray09:12:51

belated morning

thomas09:12:54

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

jasonbell09:12:26

Morning

👋 3
dominicm09:12:29

@thomas what kind of proxy?

thomas09:12:49

a Database proxy.

thomas09:12:14

they strongly suggest you use one.

thomas09:12:37

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

thomas09:12:53

yes, they do. Part of the RDS service.

dominicm09:12:43

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

thomas09:12:58

we are planning on using Lambda's

dominicm09:12:06

Ah, makes sense then

dominicm09:12:01

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.

thomas09:12:30

the idea is that the proxy holds all the DB connections

genRaiy09:12:46

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

genRaiy09:12:50

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

dominicm09:12:35

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

thomas09:12:12

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.

dominicm10:12:01

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

thomas10:12:33

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

dominicm10:12:42

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

dominicm10:12:49

Just sceptical

synthomat09:12:35

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

slipset10:12:21

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

slipset10:12:30

One line of text
~
~
~

slipset10:12:57

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

synthomat10:12:24

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

synthomat10:12:39

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”

dominicm10:12:12

Ray is just trolling us

dominicm10:12:35

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

dominicm10:12:06

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.

genRaiy10:12:08

Wow, not trolling

genRaiy10:12:14

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

genRaiy10:12:03

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

synthomat10:12:16

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

synthomat10:12:24

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

😂 3
genRaiy10:12:49

Just saying it’s a bad default for 2020

genRaiy10:12:26

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

genRaiy10:12:03

For example

synthomat10:12:05

not possible, tried it out 😞

synthomat10:12:16

I guess because emojis have more than one character

synthomat10:12:47

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

3
genRaiy10:12:24

Yeah it’s yet another sharp edge

dominicm10:12:22

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

genRaiy10:12:34

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

dominicm10:12:04

set fillchars=eob:\ does the trick anyway

genRaiy10:12:56

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.

dominicm10:12:06

I like ~ though, better default :)

💀 3
slipset10:12:39

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

dominicm11:12:57

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

orestis10:12:17

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

thomas13:12:48

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

orestis15:12:18

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

thomas16:12:28

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

orestis10:12:49

Or am I thinking about the Data API?

simongray11:12:09

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

slipset11:12:42

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

slipset11:12:46

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

slipset11:12:14

Since it’s accepting any groovy code.

slipset11:12:32

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

borkdude11:12:59

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

slipset11:12:40

call the gist somehting.clj

slipset11:12:54

Which you’ve done…

borkdude11:12:38

I'm using a shebang which confuses github apparently

synthomat12:12:14

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

synthomat12:12:21

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

borkdude12:12:01

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

dominicm14:12:32

@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.

dominicm14:12:20

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

3
dominicm17:12:14

@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.

slipset20:12:50

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

borkdude20:12:09

btw I found a solution for the highlighting problem

👍 6
dominicm21:12:30

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