Fork me on GitHub
#clojure-uk
<
2019-02-06
>
thomas08:02:23

👍 for the new lyrics

mikepjb08:02:35

thanks and good morning @thomas

maleghast10:02:39

Morning... 🙂

3Jane10:02:57

I’ve just found out about this: https://fragilemanifesto.net/

👍 5
3Jane10:02:26

One of those where you laugh through knowing tears.

thomas10:02:20

Quick poll: Which JVM version are people using? (We still have Java 8 for instance)

thomas11:02:40

8 seems the popular choice...

dominicm11:02:41

edge nearly supports java 11 perfectly though.

dominicm11:02:12

So it's reaching a point where I might should start using it

mccraigmccraig11:02:58

what issues have you had (with java 11 compat) @dominicm?

dominicm11:02:26

which is on yada's side really

dominicm11:02:40

someone just reminded me to report it 🙂

mccraigmccraig11:02:01

oh, right @dominicm - so a more recent aleph is fine, but yada's dep is old ?

dominicm11:02:17

tell you what, as it's just crossed my mind

dominicm11:02:29

Has anyone ever heard of a notion like "development port registry"

Ben Hammond14:02:08

a bit like lsof -i tcp | grep LISTEN ?

dominicm11:02:30

the idea being that developers usually have a bunch of ports in use (e.g. running multiple projects) but all projects usually want to use port 3000, and 3449 for figwheel. It seems like a dev would love to be able to navigate to http://google.local/ rather than http://localhost:3003

dominicm11:02:02

I'm considering making port numbers random in edge, or perhaps updating a .edn file at the root with port claims so that projects don't fight each other.

dominicm11:02:11

but I'd much rather have google.local

3Jane11:02:31

So I was wondering if you can do this in the hosts file, but it turns out you can’t

3Jane11:02:50

found two references to something that looks remotely useful, SRV records, and also people fiddling with iptables --to-destination (which accepts ip:port)

3Jane11:02:15

I agree it would be useful 🙂

dominicm11:02:45

I wouldn't even mind something like "java process [Google] is using port 3030, save for next time?"

mccraigmccraig11:02:56

k8s/docker solutions do this, either by creating an overlay ip network or binding extra ip addresses to an existing interface and then iptables or similar to bridge... perhaps there are some tools from that space which can help?

3Jane11:02:29

Yeah but they (Docker containers) do it kinda differently, don’t they? You can have 10 containers all thinking they’re available on on 80, where in fact they’re available on localhost:2080, localhost:2090 (or whatever) and so on

dominicm11:02:42

They do that on their internal network don't they? Or also in userspace?

3Jane11:02:05

and then you still need to alias that somehow

mccraigmccraig11:02:16

depends @lady3janepl - that is one possibility, but EKS (AWS managed k8s) binds extra IPs from the VPC to the network interface and gives each pod it's own IP, so the container really does get port 80 on that IP

3Jane11:02:58

we’re talking for local dev though

alexlynham11:02:15

local dev they use the eth bridge don't they? Then it's all super high range ips

alexlynham11:02:22

might be wrong mind you

dominicm11:02:22

I suppose that you could utilize the 127 range.

mccraigmccraig11:02:27

right, but the same solution is quite workable - add extra IPs to your network interface

dominicm11:02:48

All 127 goes to loopback

dominicm11:02:20

But you still have to decide who gets what IP

dominicm11:02:34

so you need a process to delegate which IP goes where

dominicm11:02:43

I have an evil solution which would work for edge...

dominicm11:02:04

Edge could have a component which always runs on port 3000. If there's something already on 3000, it will connect to it. I guess it will need to check again every minute or so. The "master" will provide a portal to all registered applications. Application is pretty broad, and can be any url of interest, eg devcards. The master will be in charge of ports, but will write them to a known location so that new masters can start utilizing the file without interruption. The master will be in charge of syncing the hosts file.

dominicm12:02:46

This is the part where you all tell me this is a terrible idea and that I shouldn't do it...

Conor12:02:52

I'm just wondering what problem it's solving. Is this something that trips you up a lot? It sounds quite complicated

dominicm12:02:01

My colleagues get annoyed that they have port collisions when working on multiple projects simultaneously.

dominicm12:02:24

Eg, because Figwheel is configured exactly the same in all of them.

Conor12:02:28

I suppose it's the old 'argument from personal incredulity' thing, but I can't remember having that issue myself. Is this a technical solution to an organisational problem (i.e. just tell people to configure their ports differently)?

yogidevbear12:02:17

Morning 👋

dominicm12:02:52

@conor.p.farrell this might be because we have a lot of projects, and developers work on multiple of those projects. Yeah, we could create some document somewhere as a "port registry" and every project has to register the ports in use there. Seems like it's unlikely to happen though. People forget/don't realize, whatever.

dominicm12:02:27

then you have to change the port later, which means everyone who's "used" to the old url now has to switch to a new one.

thomas13:02:42

but on which port would the port registry be? :thinking_face:

alexlynham13:02:53

I think the solution is to give people laptops with a smaller amount of RAM so they have to close one project before opening the other troll

thomas13:02:56

640Kb should be enough for everyone...

3Jane13:02:14

^ quote always makes me think of the original Westworld

samoleary14:02:40

we had a similar issue with docker containers and assigning 'predictable' ports to them that would clash across projects, e.g something like elasticsearch could be mapped as 39200 -> 9200. a solution we arrived at was allowing docker-compose auto assign a port on the host to a defined port on the container and then a leiningen plugin that uses the docker-compose.yml to discover the auto assigned ports for those containers and sort of inject them into the system would be trickier for the likes of figwheel because we're not mapping to anything in a container, unless you could also let figwheel auto assign its port and once the repl starts up/the system starts, pop open a browser tab on that port from the repl?

samoleary14:02:56

hello as well! 👋

thomas14:02:05

@lady3janepl and allegedly Bill Gates never even said that... just a made up quote.

3Jane15:02:30

makes sense for him to deny it now :]

3Jane15:02:45

puts on a tinfoil hat

👍 5
Wes Hall14:02:15

re: JVM versions. We use Java 8, but are trying to get everything running on 11. That XML binding module thing that @dominicm mentions has been by far the biggest problem. First it was included, then it was optional now it has been removed entirely. Project Jigsaw has a lot to answer for.

thomas14:02:59

I always thought it was rather strange that Java 9 was the first ever release to break backwards compatibility. Seems like a way to ask for trouble.

thomas15:02:56

btw... I just looked at the state of clj survey results and almost 70% still uses Java 8.

thomas15:02:31

next is Java 11 with 31%

thomas16:02:35

This has to be the best quote of the day... if not the week...

😄 5
thomas16:02:16

and with that bombshell, I am going to leave you and go home...

3Jane16:02:26

oh, the other Donald

3Jane16:02:42

poor guy, he was the devil in Poland, now he’s the devil in EU

3Jane16:02:00

for some reason he just makes an attractive whipping boy

thomas17:02:53

yes, the other Donald.