Fork me on GitHub
#clojure-europe
<
2022-09-16
>
simongray07:09:33

good morning

reefersleep07:09:16

Good morning 🙂

thomas07:09:41

Morning and TGIF!!!

robert-stuttaford08:09:33

yeah i can do it locally; i want a view like this on github

reefersleep08:09:51

missed that 😄

reefersleep08:09:31

Dno if it can be done, but it sounds interesting. Looking forward to hear how!

mccraigmccraig08:09:41

the github PR "files changed" view is hierarchic these days, so can you not just browse/review the changes you care about ?

robert-stuttaford08:09:20

the commits are mixed into the trunk already, with other irrelevant commits interspersed

robert-stuttaford08:09:29

the folder distinction is how i want to elide them

robert-stuttaford08:09:09

i can browse to a folder, and i can click history, and that's great. now i want a diff of some of the commits i see in that history

pavlosmelissinos08:09:18

I don't think you can do that from the standard GitHub UI; however, . opens a VS code editor in-browser on the repository & branch that is currently checked out. You might be able to see the diff you want there (but I'm not using VS code, so I don't know if it has the same features as the desktop app and I can't find it right now in the web version).

mccraigmccraig08:09:32

dunno about GH support but, in the absence of that, you could use the local diff to put those changes onto a new branch, and review that as a regular PR ?

👍 1
pez08:09:35

Good morning!

lemontea08:09:27

good morning

lemontea08:09:36

random thought of the day: “No production deployment on Friday”… does that still holds in 2022?

reefersleep08:09:50

Why would it not? 😄

simongray08:09:36

The real power move is to always deploy on fridays

1
lemontea08:09:03

dunno… but the state of DevOps changed a lot in the last decades. With a good CI/CD pipeline + k8s + advanced deployment strategy deploying at ~10 times/day become feasible…

lemontea08:09:28

the mantra is something like “if it is painful, do it more until it no longer hurts”

lemontea08:09:07

(the 10 times/day figure is for large org though)

reefersleep08:09:08

I mean, if you’re deploying 10 times a day and not firefighting every night, I guess Friday would be no different

lemontea08:09:16

ya, that’s exactly what I’m referring to - progress in DevOps changes sth (prod. deploy) from risky to ordinary

lemontea08:09:46

still, having to firefight on Friday ruin any holiday mood

lemontea08:09:19

(you may decrease the risk, but it can’t go to 0, right?)

Ben Sless08:09:22

I don't like it. Cuts your deployment window down by 20%

reefersleep08:09:32

That sounds like a lot, 20%, but perhaps the quality of life that you gain is equally “a lot”

lemontea08:09:03

wait. technically, if your company adopted the 4-day work week (!) and Friday is “off”, then it will be trivially true, no?

Ben Sless08:09:48

That's optimizing quality of life over a short time horizon

reefersleep08:09:50

You’re just making Thursday the new Friday, in which you don’t want to deploy.

😂 1
☝️ 1
lemontea08:09:17

this… lol

Ben Sless08:09:00

I want the quality of life from beating the competition and retiring to a consultancy position drinking margaritas on the beach. Or something

lemontea08:09:05

that’s true, but I think one motivation for avoiding near weekend deploy is because weekend holiday is perceived as “scarce”

pez08:09:10

I guess you can keep Fridays free from deployments, while focusing on bringing down the post-deploy firefighting to a minimum, or to some threshold that you think is fine for Fridays, then include Fridays.

reefersleep08:09:39

Wait, my comment was only regarding the 4 day work week. I think it’s an OK idea to have Fridays free to do all kinds of other things than deploying. You can be productive without deploying.

lemontea08:09:47

but with increasing weekend holiday length the relative scarcity decreases, making the risk not hurting as much

Ben Sless08:09:51

But this approach is pernicious Maybe we should avoid deployment past 3pm?

Ben Sless08:09:09

Wouldn't want to ruin our evenings

Ben Sless08:09:31

It's a question of what you're optimizing for

reefersleep08:09:38

of course 🙂

reefersleep08:09:45

Errything’s a compromise.

lemontea08:09:32

also, the concept of “production deploy” seems tied to the web 2.0 paradigm. Maybe the game will change somewhere in the far future, I dunno :man-shrugging:

reefersleep08:09:57

Actually, I’ll make this “Today’s truism”: Every choice is a compromise.

slipset08:09:03

At Ardoq we deploy whenever. But. You have to be prepared to deal with the fall out of the deployments.

pez08:09:10

I'm not fond of compromises. I prefer accepting that everything is a system of trade-offs. Semantics maybe. 😃

slipset08:09:59

Not meaning that you’re alone in fixing b0rken stuff, but rather that you keep an eye on the logs/monitoring etc. So if you’re happy doing so on Friday evening, feel free to deploy.

agile_geek08:09:02

As I work with many clients I'd say it depends but in general with a good CI/CD pipeline, automated alerting, containerisation and infrastructure as code I frequently deploy last thing on a Friday quite safely (for example, done this for last two clients)

slipset08:09:25

Conversely, if you can’t deal with the fallout during Monday, don’t deploy Monday morning.

reefersleep08:09:28

@U0ETXRFEW tomato tomato to me 🙂

pez08:09:13

To me compromise feels like someone is loosing. Trade-offs feel like I trading to get the best deal. Could be because I live in Sweden which means compromises is the default way of solving anything. 😃

lemontea08:09:25

btw, does company/client let consultant touch the production system, or it is advice/dev env. only?

agile_geek08:09:25

I work on Prod systems all the time in clients

reefersleep08:09:27

Huh, that interesting 🙂 I do agree that “trade-off” possibly has slightly more possible connotations than “compromise” in a Danish context. Or at least in the context of my brain.

reefersleep09:09:26

One is a slightly more green tomato.

😂 1
lemontea09:09:52

from an outsider/third culture view: “trade-off” is when you’re explicitly losing something to gain something else. It’s mostly individualistic. “compromise” is more like everyone have to lose something, but then everyone gain something in a collective, intangible manner (e.g. public goods). It is fundamentally a sociological phenomenon.

👍 1
pez09:09:46

@lemontea I guess that's very close to where I am coming from.

👍 1
lemontea09:09:14

also, I read somewhere on internet: “market economy: you know it is fair when everyone feel like the price is a bit unfair to them”

pez09:09:11

Hmmm, I think I disagree. 😃

lemontea09:09:28

that’s some rather subtle recursion (or two recursion?) right there…

😂 1
lemontea09:09:06

best not to think about those stuff on Friday XD

metal 1
lemontea09:09:21

how about a nice cup of coffee instead

Ben Sless08:09:04

Bad idea but sometimes I really want to: build a cloud hosting provider, CDN, DDoS mitigation and registrar. All built on Clojure ofc

maleghast08:09:09

Why is that a bad idea @ben.sless?

lemontea08:09:09

cloud hosting provider… huh… sometimes I have a hunch that despite a decade of progress and the abundance of IaaS and PaaS, somewhere there’s still a fundamentally unsolved, open problem lying in the public.

lemontea08:09:21

(especially PaaS)

lemontea08:09:58

(also: CDN is one of the few thing where “self-hosting” or “private cloud” doesn’t seem to cut it)

thomas09:09:58

I always thought there would be room for an AWS clone hosting exclusively in the EU (by an EU company). but that would be a tremendous amount of work of course (and next to impossible I think)

Ben Sless09:09:51

I wouldn't want to be beholden to EU laws and regulations actually

thomas09:09:12

true and for some companies it is important that their data is stored in the EU and not by a US company. your requirements are probably very different, ymmv

Ben Sless09:09:18

Absolutely, when you deal with compliance and customers' data. But there are a ton of clients who don't hold anyone's data and can be happy to operate in a different location It would also be nice to make self hosting easier for clients

Ben Sless09:09:12

Imagine a sort of remote management console in Clojure, where you can deploy your stuff and interact with the entire environment via the repl

borkdude09:09:15

isn't this what exoscale is?

thomas09:09:24

no idea...

borkdude09:09:33

dudes, exoscale... it's been built in clojure

👍 4
1
borkdude09:09:45

(and dudettes and anything in between ;))

🚀 1
🌈 1
lemontea09:09:05

ar, that’d explain why there is clojure tutorial on exoscale’s blog…

mpenet09:09:59

yeah, pretty much all orchestration and most products are built in clojure at exoscale

😮 1
🚀 1
mpenet09:09:54

there's also cdn, dbaas, nlb, managed kubernetes & co, so it's a viable alternative to the big ones (as long as we don't go into super exotic stuff)

thomas09:09:45

but not quite an AWS clone... they offer some services, but not full clone from AWS. ie. I can't deploy all my AWS stuff on Exoscale. But as said, that might be an impossible goal. as AWS could change when ever they want to.

mpenet09:09:19

there's no aws clone 🙂

plexus09:09:06

Java really doesn't want you to change env vars inside the running JVM, but with a little bit of persistence... this watches and hot-reloads .env

borkdude09:09:50

What is "this"?

plexus09:09:03

"this" is what you see in the screenshot 🙂

reefersleep09:09:37

That’s brilliant!

simple_smile 1
borkdude09:09:51

I implemented this once using Graal's C API. It is indeed very dirty and it also didn't work in all cases, but you may have covered those edge cases with these hacks ;)

lemontea09:09:47

good thing to bring more area to be “dynamic” and hence workable with clojure’s REPL-driven style (e.g. your typical webapp may use env. variable for config)…

borkdude09:09:38

@U07FP7QJ0 Will you also support cd (changing the current working directory?) Both would be interesting for bb, people have been asking for this since they are used to this in python ;)

reefersleep09:09:18

Too bad I can’t just plug this into my work project. We’re too deeply entrenched in other stuff to just make a quick switch.

reefersleep09:09:54

Might be better to attack our particular problem; some particular creds time out, and the creds are a part of our set of env vars. I don’t feel that we really need reloadable env vars otherwise, though it’d always be a boon.

plexus09:09:00

jnr-posix is great, it's a project by the JRuby people because they had to emulate a lot of the stuff that CRuby does and that Java doesn't want you to do.

borkdude09:09:25

jnr-posix doesn't work with graal.

plexus09:09:02

that's too bad

borkdude09:09:45

I think with some effort based on your hacks it could be made to work

borkdude09:09:01

but those warnings scare me a little ;)

plexus09:09:17

the cleaner way, at least for regular JVM, is to implement a Java Agent that redefines ProcessEnvironment. That should also be more portable between JVMs.

borkdude09:09:49

Graal has something like this called Substitutions where you can redefine classes for the native image. Pretty much a last resort as well

lemontea10:09:37

and… something slightly more technical and hopefully “on-topic” (still a rant though): https://www.juxt.land/yada/manual/index.html

lemontea10:09:52

would really like to see this project succeed

lemontea10:09:18

though the doc looks like it’s in WIP status starting from about ch 7 onwards

lemontea10:09:42

(I first come across this project a few years ago… the doc doesn’t seem to have changed since then)

borkdude10:09:11

Yada is a great project, but they (JUXT) have decided to make yet another web framework which they are now focussing on while not working actively on this one. I think yada was great and could have succeeded if the attention was more focused. perhaps site, their new effort will be as successful though 🤞

😢 1
lemontea10:09:58

1. site is great and I really like its idea, but I think it is not the same thing as yada. My internal schema for the “state of the art” of clojure backend is sth like: classical but somewhat legacy -> luminus; semi-modern, API server oriented -> pedestal; fully modern and next-gen/future while remaining general purpose: yada

borkdude10:09:49

I don't disagree

lemontea10:09:03

site has a more narrow focus and is kind of a niche tool (doesn’t make it any less great though): it is more like an “auto-gen, generic API server”. The basic use case is when you’re doing your usual RESTful API server, and suddenly realize in the middle that your RESTful conformance is so much that there is actually almost no custom logic apart from standard CRUD

lemontea10:09:01

2. Don’t know how to express this gently. But a recurrent theme across generation seems to me to be that Clojure is great at quickly innovating in a pinch, but could improve on the long term maintenance, low key work kind of things…

lemontea10:09:34

that being said, for the specific case of juxt/yada, if I’m not mistaken it is a corporate sponsored project based on “mutual benefit”. So it is understandable if their internal priority/situation changed and yada is no longer all aligned with their interest

borkdude10:09:37

They still take PRs though

borkdude10:09:50

so I think they're open to contributions, of other people are interested enough in working on it

lemontea10:09:56

i see… speaking of which, pedestal is also showing its age… a) the official site doesn’t look that newbie friendly, and b) getting pedestal to production would still require significant amount of “foundational” work - glue codes, customising it for more realistic use case… it seems?

lemontea10:09:49

btw, sth I did in anger before: https://github.com/lemonteaa/abc

lemontea10:09:04

(with a pretentious name 😉 )

borkdude10:09:22

I think pedestal is officially supported by someone at Cognitect though

borkdude10:09:36

Clojure projects in general don't care a lot about marketing via flashy sites I think ;)

lemontea10:09:10

flashy sites not mandatory indeed. For many smaller clojure library, having all the docs concentrated on github repo’s README.md “works” and is indeed a source of joy to me

Ben Sless10:09:23

YAWF (yet another web framework)

lemontea10:09:24

but this pattern doesn’t seem to work as well for larger ones

lemontea10:09:02

I think the key is organization - the content/material itself is good enough

lemontea10:09:18

but discoverability can have an outsized impact

lemontea10:09:45

maybe it’s coz I have rather limited “working memory”

lemontea10:09:38

i.e. same material, but need to cross reference several pages, each one on a very specific subsection. VS all info I need collocated in one neat page

lemontea10:09:54

@ben.sless I actually tried to do a web search for a library named YAWF in response to your comment lol

borkdude11:09:31

Yet Another Documented Async-framework

lemontea11:09:03

I think what I really want to say is this: Clojure’s “library over framework” idea have merits, but in real life someone will need to do the glue code work. If that work is too large, it will become a material disadvantage compared to competing languages who are “battery included”

lemontea11:09:16

and no, it is not a matter of “ability”, but “cost”

Ben Sless11:09:37

Why can't we settle on one?

lemontea11:09:56

I don’t think there need to be only one though

lemontea11:09:06

what I have in mind is something more “loose”/“informal”

lemontea11:09:24

like base libraries + “templates”

lemontea11:09:39

so it’s just like luminus, but updated to reflect current trends

Ben Sless11:09:42

It's either that or we have standard APIs, a bit like what ring does, but for everything

Ben Sless11:09:48

those standards could be just files with specs and/or protocols, then everyone can implement

lemontea11:09:49

a problem I can foresee with “standards” is that it can become a contentious hot-zone

lemontea11:09:06

the marginal utility from 0 -> 1 is the most significant

lemontea11:09:55

so say if there’s at least 1 example with all battery included and kept up-to-date, it will already be in a much better shape

lemontea11:09:11

users who disagree with the particular arrangement in that templates are free to customize it or start from scratch

borkdude11:09:48

Here is an exploratory standards thing: https://github.com/clj-easy/tools.misc Note: this is not being worked on

lemontea11:09:19

ppl may have divergent or even conflicting/mutually exclusive use case that makes agreeing on one standard api… “difficult”

borkdude11:09:19

@lemontea Have you tried out kit?

lemontea11:09:21

no… from a quick glance it looks like luminus except updated in some part to be more modern, is that correct?

borkdude11:09:53

yes, it's luminus, but more dynamic, you can add features to it after you've generated your initial template

👍 1
🆗 1
borkdude09:09:16

@U050CTFRT Thanks for the write-up!

borkdude09:09:49

I think they're still using yada at my old job. They (former we) have been running it for years without issues. It's a bit of a shame that the momentum yada had is stalled, I recommended it to all my Clojure friends. But I get where you are coming from. Thanks for the great project.

lemontea10:09:35

(more specific: I am particularly interested in the 6 examples they listed in that doc. Filling out any one of them in an in-depth manner would totally make my day 😍)

borkdude10:09:37

@lemontea There is a #yada channel

lemontea10:09:37

ya aware of that… too shy though 🙈

borkdude10:09:23

they are extremely nice people, say hi from me ;)

lemontea10:09:44

“from me”? @@

borkdude10:09:06

whatever ;)

lemontea10:09:52

@U04V15CAJ just took a quick look… seems that channel have been long dead?

borkdude10:09:54

I think @U050CTFRT still monitors that channel, but if nobody speaks up, nothing will happen

👌 1
otfrom10:09:30

and Malcolm is lovely and friendly

👆 2
lemontea11:09:32

not sure what to say (I’ve mostly said all I know at the moment already)

lemontea11:09:37

but let me try I guess

lemontea11:09:42

wait a moment

lemontea11:09:48

(do some errands)

Ivar Refsdal11:09:07

We are still using Yada... 🙃

Ivar Refsdal11:09:22

Haven't gotten it to work with aleph 0.5.0 yet though

borkdude11:09:15

My former workplace is also still using yada (I think) and we haven't had many issues with it

borkdude11:09:16

We almost went with pedestal but chose yada because of docs and batteries

lemontea11:09:27

that’s good. One question: what about GraphQL?

lemontea11:09:45

in pedestal there’s lacinia which is rather well supported I think

1
borkdude11:09:32

At my previous job we implemented graphql-like but based on RDF / sparql. GraphQL was kind of limiting ;)

lemontea11:09:12

so it’s custom code?

borkdude11:09:14

I'm mostly bragging here since I didn't personally implement that

lemontea11:09:37

ya, I can imagine some kind of “pass-thru” to xtdb

borkdude11:09:48

but even with graphql stuff you will write a lot of "custom" code when writing the resolvers

lemontea11:09:52

though that’d be exactly “framework territory”

lemontea11:09:25

ya, depends on use case? e.g. If your web app is public facing/consumed by external third party, and third party insist on using GraphQL as they don’t know clojure

lread14:09:12

good: 'morning'

borkdude14:09:18

@lee Good morning!

👋 1