Fork me on GitHub
#clojure-europe
<
2022-06-23
>
slipset05:06:30

A bit proud this morning. Did my first (metric) century on my bike yesterday

💪 14
🦿 4
🎸 4
🚴 6
😱 1
robert-stuttaford05:06:51

freakin' wow dude, that's an epic ride!

❤️ 1
mccraigmccraig07:06:08

nice! 1,000m is a good amount of vertical too i went for a run in the same area last year, while visiting my son: https://www.strava.com/activities/5974278983 ... great to have that on your doorstep

simongray09:06:19

@U04V5VAUN What’s the app called?

Mno16:06:22

Good lord average speed of 26 too

slipset05:06:49

Neck, and upper back more f*cked than the legs.

RAMart06:06:05

👋 ☀️ 😎

reefersleep07:06:05

Good morning!

reefersleep07:06:17

We’ve had lots of issues with our IKEA stuff (and we still are; both of the chairs we recently ordered are faulty), but overall, I’m pretty happy that it exists! Most of our furniture is IKEA.

reefersleep07:06:38

Affordable and somewhat decent.

reefersleep07:06:51

This concludes today’s IKEA appreciation post.

pez08:06:59

Good morning! I tried Github Copilot for the first time today. I didn't expect it to work with ClojureScript, but it does!

Adam Helins08:06:15

Is it really interesting though?

Fahd El Mazouni08:06:06

@UCFG3SDFV I mean it doesn't work on clojure as well as it does on javascript (from my experience but it makes sense since we can safely assume there is a shit ton more training data for js) it does often produce buggy code though (when I tried using it on clojure or clojurescript I mostly felt like it was regurgitating snippets from my code base but sometimes I still accepted the suggestion to save some keystrokes)

Fahd El Mazouni08:06:44

@U0ETXRFEW did you use it by writing comments describing what you wanted it to generate ?

Adam Helins08:06:43

Doesn’t it result in providing more burden than relief? Besides thinking about your code, now you have to inspect suggestions.

Fahd El Mazouni08:06:55

yeah definitely, not worth it, maybe you're tired one day and you miss something insidious (and you didn't cover all cases in your tests) it also kind of takes over the classic autocomplete (maybe I misconfigured it, oh it was also kind of shitty to configure it ended up configuring the other thing it was conflicting with calva format on tab hehe)

Fahd El Mazouni08:06:39

10$ for a glorified snippet database is too much imo

Fahd El Mazouni08:06:54

for trivial things it can save you some keystrokes though

robert-stuttaford08:06:38

i can't imagine how such a tool is compatible with conscious, deliberate, intentional coding, where you are talking to the computer about the system you'll both be a part of. it's akin to having a clown with a box of random noise making and distracting things sit in on your therapy session. 🤡

Fahd El Mazouni09:06:17

Hehe it can inspire interesting conversation ( or code) it's always a struggle to figure out what to talk about with a therapist

reefersleep09:06:28

Clojure is pretty succinct already. I expect that “code completion” is great for languages that inherently have a lot of boilerplate? (Haven’t used Copilot, so this is not a dig)

Fahd El Mazouni09:06:55

Yeah for sure, in Clojure i manly use it to save on a few keystrokes and sometimes to choose which function i want to use

pez09:06:16

@U9W44J4RW I haven't tried with the comments yet, but that looks very interesting to me, since I often find myself banging out code before I have formed any clear idea about what the code should do. Maybe telling copilot about my intentions could help me articulate my ideas better, and just use the suggestions to validate. Well, I don't know, tbh, I was just surprised to find it suggesting anything at all for ClojureScript.

pez09:06:37

Doesn't cost me any money either, so that is not part of my trade-offs should I seriously start to consider using this thing. (Which I am not considering currently.)

pez09:06:46

Of course I also ran into the keybinding problem, @U9W44J4RW. I'll make Calva aware of these suggestions so the conflict should be history very soon.

Fahd El Mazouni09:06:43

That would be great @U0ETXRFEW, although I'm not sure the adoption rate for copilot in the Clojure community will be that high

Fahd El Mazouni09:06:46

There is also the auto closing of parens/brackets that messes up the sexprs because copilot don't care and it just closes em for you

pez09:06:52

Can you elaborate a bit on the brackets thing?

Fahd El Mazouni09:06:57

Basically if you accept a copilot suggestion while writing code deep in a sexpr (your closing stuff is already in the file) copilot still adds them, as if it's not aware of the text coming after where your cursor is, which wouldn't be very suprising imo

pez10:06:52

Ah, yes, could reproduce it immediately. Booo!

pez10:06:33

Having had this thing enabled a while, it is sure very like that clown that @U0509NKGK mentions. Or maybe like having Dilbert's pointy haired boss as your pair programming partner.

😠 1
😁 1
Fahd El Mazouni10:06:57

I was sometimes impressed by the quality of the suggestions on js code, but only on trivial things on the caliber of a fizz buzz

pez10:06:34

If it can produce a fizz buzz with minimal branching, I'd be a bit impressed. 😃

Fahd El Mazouni10:06:06

It actually did !

Fahd El Mazouni10:06:45

It even used a % 1 instead of a floor for a perfect square problem

reefersleep10:06:51

Is there an issue with floor?

reefersleep10:06:56

(I know js has many issues in general, and I’ve been wondering why you need Math.trunc)

reefersleep10:06:47

ah. There’s a (sensible) difference between e.g. Math.trunc(-0.123) and Math.floor(-0.123).

Fahd El Mazouni11:06:23

In this case you mostly want to know if there is fractional part after applying sqrt

javahippie20:06:14

We agreed today that Copilot is banned at our company. There are multiple examples of it spitting out 1:1 snippets from the training set which were not under a permissive license, and we cannot risk that…

raymcdermott08:06:00

Good morning

🙌 1
❤️ 2
Adam Helins09:06:55

Woaw, where is that?

raymcdermott09:06:37

Belgium - Loonbeek specifically, 5 mins from my house

raymcdermott08:06:15

Random canoe 🛶 in the water this morning

simongray09:06:24

Good morning, Europe!

simongray10:06:13

It’s strawberry season! Best snack ever.

4
🍓 3
raspberry_pi 2
🍒 1
🍌 1
simongray08:06:17

… did people just start voting on the best fruit/berry snack or what? 😂

orestis12:06:32

Strawberry season is over for weeks here :) now we're onto peaches and apricots. Soon proper melons and watermelons, and grapes after that!

simongray07:06:52

Sounds delicious!

mccraigmccraig10:06:45

anyone had any bad experiences embedding an nrepl in prod processes ? ( iirc y'all do this don't you @seancorfield ? )

robert-stuttaford11:06:21

we do this, but as it only listens on localhost, the only way to use it is via SSH tunnel. for our prod servers, we have a 'two person switch' where you can only connect ssh once approved by another tech person in a specific private slack channel, and it's for a predefined, fixed amount of time.

robert-stuttaford11:06:44

we use a bastion host for SSH and we use 2FA for SSH, etc etc

robert-stuttaford11:06:48

we've been doing this for 7 years-ish

borkdude11:06:26

I've been doing this in all major production systems I worked on and has saved the say a couple of times

robert-stuttaford11:06:54

it has saved us a crap ton of effort

robert-stuttaford11:06:51

being able to hot patch servers directly with critical every-minute-matters bugfixes, and being able to alter or query the db in ways not built into the app, and also being able to debug production issues directly

robert-stuttaford11:06:54

in our staging env, i use the remote repl to do lots of categories of dev work. git + build is the 'save my game at the end' step, rather than the way in which i get code into the env

robert-stuttaford11:06:07

where it falls down is cljs dev, naturally

Adam Helins11:06:28

Local NREPL + SSH is the magical formula indeed, then you mostly offload security concerns to SSH. You shouldn't expect to connect often but when you'll need to, it will be invaluable.

Ivar Refsdal12:06:07

For the record I've been working on TLS support for nREPL on (and mostly off) for a while. It's pretty much finished, but I would like to make some final touches + documentation. https://github.com/nrepl/nrepl/issues/266 We don't have SSH running locally on our containers. They do run inside a virtual network though, only accessible with 2FA over sshuttle over websocket.

Ivar Refsdal12:06:41

(No bad experiences with nREPL in production here btw.)

mccraigmccraig12:06:58

thanks everyone - got it all running smoothly like @UGJE0MM0W i've ended up binding nrepl to the container IP rather than localhost for now ('cos i'll need to add an ssh server to our k8s container base image to ssh directly into the container) ... will fix that later

🙌 1
vemv13:06:44

Sean C doesn't run nrepl. It's a https://clojure.org/reference/repl_and_main#_launching_a_socket_server iirc? My own pedantic recipe would be to run $repl (nrepl, srepl, prepl, w/e) in a separate process within the same machine, that should be spawnable on-demand. And try to treat it as read-only i.e. don't perform any writes or side-effects That's certainly not omni-capable but I wouldn't like to mess with in-flight requests. There's always https://www.programmingtalks.org/talk/debugging-with-the-scientific-method-stuart-halloway

👍 1
mccraigmccraig13:06:46

gotta be in the same process in this instance @U45T93RA6 - i don't want to change anything, but i'm testing hypotheses about a memory leak which has proven quite resistant to duplication outside of production

👀 1
seancorfield15:06:12

I'll add another voice in favor of running at least a Socket REPL in production, since it's just a matter of a JVM option at startup, listening on localhost, with a VPN and SSH tunnel needed to access it. We have all our code AOT compiled with direct linking so not much opportunity for changing code via the repl but it's great for debugging stuff, especially for database-related stuff in the context of the app.

👍 1
simongray08:06:17

… did people just start voting on the best fruit/berry snack or what? 😂