clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
dharrigan 2020-11-02T06:16:45.054400Z

Good Morning!

slipset 2020-11-02T06:19:28.054700Z

Morning!

plexus 2020-11-02T07:14:31.055Z

Good morning!

dominicm 2020-11-02T07:20:20.055200Z

Morning

pez 2020-11-02T07:30:37.057500Z

Good morning! I am sooo tired. Worked late with https://github.com/BetterThanTomorrow/calva/pull/838, and then was so up to speed I couldn't fall asleep until 3AM-ish. Generating test data doesn't work as well as counting sheep, obviously. 😃

💀 1
dominicm 2020-11-02T07:34:36.058600Z

How do you work after doing that? I'm always so tired when I do that.

pez 2020-11-02T07:38:50.061200Z

Usually not a problem for me. I accumulate sleep debt and then pay it in one long 16h+ sleep or so. While reading for my kids, for example. ”Dad? You are reading gibberish.” Haha.

2020-11-02T08:36:24.061600Z

Morning

maleghast 2020-11-02T09:38:10.062700Z

Morning All 🙂

synthomat 2020-11-02T09:39:25.062900Z

moin

borkdude 2020-11-02T09:48:44.063100Z

Hello Clojure friends, good morning

maleghast 2020-11-02T09:59:27.063300Z

👋

maleghast 2020-11-02T09:59:29.063500Z

🙂

raymcdermott 2020-11-02T10:01:46.063800Z

morning

2020-11-02T10:10:04.064Z

morning

agile_geek 2020-11-02T10:34:23.064200Z

Bore da :welsh_flag:

thomas 2020-11-02T10:39:38.064400Z

morning

orestis 2020-11-02T11:01:32.066800Z

Good morning from rainy Copenhagen

borkdude 2020-11-02T11:14:26.067200Z

Anyone familiar with emacs/elisp/flycheck?

simongray 2020-11-02T11:22:41.068100Z

Another good morning from Copenhagen here.

👋 1
jasonbell 2020-11-02T11:22:52.068300Z

Morning

borkdude 2020-11-02T11:25:58.072100Z

Never mind, I think I got it

simongray 2020-11-02T11:26:19.072500Z

So I just got a 25k line PR of around a hundred changed or added files - and no PR description. How do I teach my clueless coworker to stop doing this?

borkdude 2020-11-02T11:26:41.072900Z

Shock therapy?

😅 1
dharrigan 2020-11-02T11:26:43.073200Z

reject the PR?

simongray 2020-11-02T11:30:38.078700Z

I did, but I also want to teach him that's it's bad... He's a linguist trying to upgrade his skills so he doesn't really get it. We lack a shared language (kind of ironic).

simongray 2020-11-02T11:31:28.079200Z

I need some kind of github prs for dummies article

ordnungswidrig 2020-11-02T11:39:49.080Z

G̴̝̈́ủ̷̢͚͍̽͛̓̉̃̈́̉̈͜͝t̷̩̲͕̳̯͇͆̃̈́̆̀̃͝ë̶̡͓̠̺̙́͑n̴͕͉̖̗̼͙̹̫̺̔ͅ ̴̟̳̈́̑́̈̉́̚m̵̳̆̍̍͂̿̑̉̍͝ǒ̷̡̨̨̪̬̯̦r̵̨͉̖͚͊́͆̏̃͋͘͜͠ģ̶̬̫̖̤͓̦̦̬̓͗̀̍́̄̚͝ȩ̶̡͍͙̗̞͔̞́̃͋͂͆͌͗̄͒͜͠ñ̴̦̩͙͎̯͎̟̌̽͋̀̒̎͠!̸̹͛̋̾̽͂

ordnungswidrig 2020-11-02T11:40:30.080500Z

@simongray point him to the confluence page 🙂

borkdude 2020-11-02T11:40:56.081200Z

@simongray Don't accept PRs, only patches through JIRA, Clojure style :P

borkdude 2020-11-02T11:41:48.082600Z

with strict demands on formatting of whitespace of course

simongray 2020-11-02T11:42:32.083700Z

@ordnungswidrig I don't work at UFST anymore, which is great for my sanity in many ways 😄

ordnungswidrig 2020-11-02T11:43:12.085600Z

I expected every project large enough that you can have a 25k LOC PR to have at least something like confluence 😛

mpenet 2020-11-02T11:43:14.085700Z

@borkdude https://github.com/clojure/clojure/commit/833c924239a818ff1a2563ae88af6dc266b35a61#diff-2d17bfe5c67f6466388d8efc8c7fbd98d2d7118f5e1f2677b915bedb2df01c61 and you end up in these situations, where a local change creeps up in master

mpenet 2020-11-02T11:43:43.086700Z

PRs are better gatekeepers than email I guess

borkdude 2020-11-02T11:43:44.086800Z

yeah, I saw that ;)

ordnungswidrig 2020-11-02T11:43:51.087Z

One important thing is to make people read to repository history, IMHO. That often opens their eyes on how much of a mess it can be.

borkdude 2020-11-02T11:44:33.088300Z

@mpenet btw I did some worrying and writing about http clients and servers, graalvm and babashka here: https://github.com/borkdude/babashka/issues/628. Looking forward to your Java 11 wrapper.

ordnungswidrig 2020-11-02T11:44:36.088500Z

• fix • try again • change fumble • Make foo actually to bar • Make fumble do bar • Merge master into this-branch • Fix test • Merge master into this-branch • Make it deployable

ordnungswidrig 2020-11-02T11:45:08.089400Z

I’m so fed up with these kinds of repositories ^^^^ 😉

mpenet 2020-11-02T11:45:19.089800Z

@borkdude I need to document it, and add more tests really. If I can I ll try to get it done this week (we're crunching on stg else right now)

borkdude 2020-11-02T11:45:51.090500Z

@ordnungswidrig That's usually how my repositories start (experimental). Once they mature I prepend every commit message with an issue number, so everything has a rationale

borkdude 2020-11-02T11:46:22.091100Z

@mpenet no worries!

ordnungswidrig 2020-11-02T11:46:32.091400Z

Yes! And squash things down a little before mergeing. The problem is that developers never are taught git but only github.

borkdude 2020-11-02T11:46:46.091900Z

github does a great job of squashing PRs btw

mpenet 2020-11-02T11:46:52.092100Z

pr squasing should be the default imho

1
borkdude 2020-11-02T11:47:12.092800Z

git merge --squash is also nice if you want to do it locally

mpenet 2020-11-02T11:47:12.092900Z

it's good to have a detailed track for reviews, but then later on nobody cares you changed a typo in a docstring

borkdude 2020-11-02T11:47:52.093500Z

yeah, for PRs I discourage using force-push. Nothing is more irritating than trying someones code locally and not being able to pull in changes

borkdude 2020-11-02T11:48:05.093800Z

and once they are done, I squash

borkdude 2020-11-02T11:48:57.094Z

as documented here: https://github.com/borkdude/clj-kondo/blob/master/doc/dev.md#pr

ordnungswidrig 2020-11-02T11:49:39.094700Z

I think for huge PRs like the one mentioned by Simon you want to do selective sqashing.

simongray 2020-11-02T11:51:32.095Z

Haha. The project is just me - and then this guy who really wants to contribute stuff to it. Much of the code in the PR is copy-pasted from existing files and also includes some datasets, so it's not like he wrote 25k lines of code himself.

borkdude 2020-11-02T11:51:54.095500Z

Btw, it's weirdly warm here for november. Can't help thinking this is because of climate change...

simongray 2020-11-02T11:52:12.096300Z

I also asked him to squash it, but he insists it can't be done :face_with_rolling_eyes:

ordnungswidrig 2020-11-02T11:54:46.096600Z

lol

ordnungswidrig 2020-11-02T11:54:50.096800Z

sure it can

ordnungswidrig 2020-11-02T11:54:55.097Z

help him

borkdude 2020-11-02T11:56:15.097800Z

git checkout -b pr-squashed
git merge pr-branch --squash
git commit -am "the squashed PR" 

ordnungswidrig 2020-11-02T11:59:22.098300Z

@simongray you can work together on a branch. Maybe show him what you mean.

simongray 2020-11-02T12:01:40.098400Z

yeah, I guess I will have to… I did already show him once before, though.

dominicm 2020-11-02T12:04:57.099100Z

Force pushing in response to feedback is great. Github's review system isn't good.

simongray 2020-11-02T12:05:33.099200Z

what’s going on there?

borkdude 2020-11-02T12:06:08.099500Z

accidentally pushed some local java file

javahippie 2020-11-02T12:06:37.099900Z

@simongray abolish Pull Requests altogether 😬

borkdude 2020-11-02T12:07:20.100600Z

@dominicm as always, it depends on how you collaborate. I generally find it annoying in OSS projects

simongray 2020-11-02T12:07:28.100700Z

ah… and they didn’t revert…?

borkdude 2020-11-02T12:07:55.100900Z

not yet I guess

simongray 2020-11-02T12:08:11.101100Z

the nuclear option

dominicm 2020-11-02T12:08:20.101300Z

I'm experimenting with http://sr.ht atm, I'm strongly considering switching to mailing lists. I presume I'll get the same # of contributions 😛

😆 2
dominicm 2020-11-02T12:08:35.101400Z

@javahippie openopensource

javahippie 2020-11-02T12:09:37.101500Z

Aaah had not seen this. Open Source is difficult withour PRs, that’s true

borkdude 2020-11-02T12:11:04.102Z

@dominicm I recently saw this thing: https://tara.ai/ Might be nice to try out

borkdude 2020-11-02T12:12:45.102300Z

Hmm, not open source it seems

orestis 2020-11-02T12:15:27.103700Z

@simongray Do the review side-by-side with him and think aloud? Or ask him to give you a tour… Writing reviewable PRs is all about thinking about how the other people will read the PR, so he needs to see how it looks like on the other end…

orestis 2020-11-02T12:16:51.105100Z

I’m guilty as charged with the “fix foo” type of commits but for some reason while I know about squash etc it’s hard to make everything work with github. I need to make a new branch, then squash things, then what? Link the old PR with this new branch? How do I link the “dev” branch with the “commit” branch so that people know where to look?

borkdude 2020-11-02T12:17:34.105500Z

btw, you can download a .patch file for a PR and review it locally using your favorite tools (emacs)

borkdude 2020-11-02T12:19:18.106Z

e.g. this is an open PR in clj-kondo. Just add .patch to the PR link and you'll get the patch: https://patch-diff.githubusercontent.com/raw/borkdude/clj-kondo/pull/879.patch

simongray 2020-11-02T12:36:24.106200Z

yeah. The issue is more that the PR comes totally out of the blue and he’s quite impatient, wanting to get it merged ASAP. I have tried to explain to him that it often took several days of back-and-forth at my old job to get a ~1000 line PR through the review process, so what am I supposed to do with a 25k line PR. He’s not a developer, though, he’s a linguist who knows just enough Python to be able to do some NLP so all he knows is copy-pasting bits of code around. I don’t have time to teach him to be a software developer.

simongray 2020-11-02T12:38:27.106400Z

I usually either squash ahead of the review or squash after the review, but before merging. Never need to make a new branch. I just force push to my feature branch and the PR is updated with the correct commits. Then I merge.

simongray 2020-11-02T12:40:26.106600Z

As long you follow the golden rule of rebasing that’s enough process IMO.

orestis 2020-11-02T13:34:03.106900Z

I thought force pushing is discouraged in git? I learned git before github and PR was a thing so I’m kind of out the loop these days 🙂

simongray 2020-11-02T13:40:39.108800Z

I accepted his PR because none of the files touch my own code, but asked him at the very least to squash his commits… he said “yessir”, but 5 minutes later all of the commits are in master 😡 no more lenience from me…

simongray 2020-11-02T13:42:06.108900Z

force pushing is fine if you know what you’re doing. You just shouldn’t be doing it EVER with any shared branches, i.e. master.

ordnungswidrig 2020-11-02T13:49:34.109200Z

aaah that’s hostile

ordnungswidrig 2020-11-02T13:50:00.109300Z

I force-with-lease push a lot.

simongray 2020-11-02T13:55:00.109600Z

I’ll be nice to him…

dominicm 2020-11-02T14:13:12.109700Z

Looks like task management, rather than change management?

borkdude 2020-11-02T14:14:52.109900Z

I forgot you're working for a company which probably has a better product in this realm ;)

dominicm 2020-11-02T14:15:11.110100Z

No, we don't do this kind of thing :p

dominicm 2020-11-02T14:15:21.110300Z

We use https://linear.app/

raymcdermott 2020-11-02T14:31:13.112700Z

since git is a haha social haha coding tool, can we get him on here and throw emoji tomatoes either at you or him?

raymcdermott 2020-11-02T14:32:07.113300Z

feels like this is probably the most direct way I can help 🙂

mpenet 2020-11-02T15:03:39.113400Z

Paired with Gerrit it would be quite decent

ordnungswidrig 2020-11-02T15:04:55.114300Z

Takling of social, I had created a weird tool to convert a sha256 into easy to recognize words:

$ git rev-parse HEAD | xargs java -jar sha-words.jar
observation-obedient-bedroom-sweet-electric
Get it at https://github.com/ordnungswidrig/sha-words

ordnungswidrig 2020-11-02T15:05:12.114700Z

I should actually port this to babashka

simongray 2020-11-02T15:06:43.114800Z

*dodges tomatoes*

🍅 1
pez 2020-11-02T15:57:24.116600Z

That’s awesome. I’ve been wanting to do something similar with uuid, and two-way.

borkdude 2020-11-02T15:59:14.117Z

@ordnungswidrig What do you mean port to babashka? It seems it already works with babashka :)

$ bb -cp src -m sha-words.main b67d6eafeae1d5a424a609864fad10665453afa5
packing-yesterday-sugar-cup-awkward

borkdude 2020-11-02T16:00:20.117300Z

$ bb -cp src -m sha-words.main --uberjar sha-words.jar
$ bb sha-words.jar b67d6eafeae1d5a424a609864fad10665453afa5
packing-yesterday-sugar-cup-awkward

ordnungswidrig 2020-11-02T16:01:45.117800Z

nice! I thought I’d need to do someting about IO.

ordnungswidrig 2020-11-02T16:02:08.118200Z

@pez should work with uuids, too

ordnungswidrig 2020-11-02T16:02:15.118500Z

but two-way it a good idea!

ordnungswidrig 2020-11-02T16:02:25.118600Z

“acking-yesterday-sugar-cup-awkward”

ordnungswidrig 2020-11-02T16:02:34.118800Z

I like the weird stream of words it produces

borkdude 2020-11-02T16:06:42.119900Z

@ordnungswidrig uberscript:

$ bb -cp src -m sha-words.main --uberscript ~/Dropbox/bin/sha-words.clj

# prepend shebang
$ bb -e '(spit "/Users/borkdude/Dropbox/bin/sha-words.clj" (str "#!/usr/bin/env bb\n\n" (slurp "/Users/borkdude/Dropbox/bin/sha-words.clj")))'
$ chmod +x ~/Dropbox/bin/sha-words.clj

# yay, script now on path!
$ sha-words.clj b67d6eafeae1d5a424a609864fad10665453afa5
packing-yesterday-sugar-cup-awkward

ordnungswidrig 2020-11-02T16:10:32.120400Z

nice!

ordnungswidrig 2020-11-02T16:25:35.120600Z

@borkdude what am I doing wrong?

$ bb -cp src -m sha-words.main
clojure.lang.ExceptionInfo: Unable to resolve classname: BigInteger

borkdude 2020-11-02T16:26:03.121200Z

@ordnungswidrig bb --version

ordnungswidrig 2020-11-02T16:26:17.121400Z

babashka v0.0.86

borkdude 2020-11-02T16:26:24.121600Z

try upgrading

ordnungswidrig 2020-11-02T16:26:45.122Z

Oh, brew found a stale link in /usr/local/bin

ordnungswidrig 2020-11-02T16:28:02.122300Z

Thanks it workds now!

🎉 1
raymcdermott 2020-11-02T21:13:36.123100Z

direct hit 🙂

ordnungswidrig 2020-11-02T22:01:00.123600Z

And, boom, another project one must maintain 😛

😄 1