Live data from Hacker News

I Got Sick of Remembering Port Numbers

gregraiz.com

111–120 of 171 posts

Re: I Got Sick of Remembering Port Numbers

#111
post #77
post #7

Earlier quoted context omitted.

And then they might code up some sort of service lookup tool thingy to use on the train wreck that is the modern web. $ getent services gopher gopher 70/tcp

And if they want name resolution, maybe even names that reflect the scope of its location like .localhost or .internal

Various services have existed, such as portmap(8), though NFS and similar services have often suffered from the "too complicated to debug" problem where devops (then sysadmins) would try turning the system off and then back on again in the hopes of resolving the issue du jour. You might get lucky and determine that node number three (of many) was cursed and leave it switched off for the Season of Mammon, more commonly known as Christmas, and to retire it quietly, later. Hypothetically.

Generally host and port mapping gets shoved somewhere into the configuration management layer and hopefully does not become too complicated (or have too many security holes) as this could vary from "configuration files and a few scripts" to database and services layers that few can debug, especially not a sysadmin at 3 AM in the morning running on an hour of bad sleep. Hypothetically.

Re: I Got Sick of Remembering Port Numbers

#113
post #71
post #6

It's like someone should make a file... maybe in /etc ... and put short names for services in it... maybe it could be called /etc/services...

Top reply, and clearly based on the article's title rather than its content, as are the follow-ups. You're making this site worse. The article is short; go read it then come back and delete.

Sounds like more of a problem with the title than the person you're attempting to insult.

Re: I Got Sick of Remembering Port Numbers

#114
post #101
post #6

It's like someone should make a file... maybe in /etc ... and put short names for services in it... maybe it could be called /etc/services...

URLs already have default ports for service names as a feature. http:// means port 80 unless specified otherwise https:// means port 443 unless specified otherwise ftp:// means port 21 unless specified otherwise sftp:// means port 22 unless specified otherwise ... The practical solution for TFA is actually just an nginx server running on port 80 with proxy_pass location /blog/ { proxy_pass http://127.0.0.1:3000 ; } l…

How many little web servers work without issue when their root page is loaded from a path other than /?

Re: I Got Sick of Remembering Port Numbers

#116

I think this product demonstrates the atrophying of thought that results from too much LLM usage: design was obviously a long back-and-forth with a sycophantic LLM. I find out what all my local servers are by `cat /etc/hosts`, because I put them in there. They run using an entry in the nginx config. For short-lived stuff I don't even bother with that, I just use `whatever.localhost`. If there was no LLM, author would…

> I put them in there That seems to run orthogonal to this. The primary benefit I see here is not having to care at all what ports apps are actually starting on. Just run them, and access them by name. Same as a regular website on the internet where one doesn't care about the IP. > How much care would they have possibly put into reviewing Just enough to ensure that it works for them, which is what really matters. Oth…

> Just enough to ensure that it works for them, which is what really matters.

If that's what really mattered they wouldn't have posted an article they didn't write trying to get traction on a product they didn't create from a userbase that doesn't need it.

Re: I Got Sick of Remembering Port Numbers

#117
This is really amusing. Because absolutly eveyrone I know vibe-coded this thing. I think the first one was https://github.com/ralt/dns-to-port possibly mine is second (but it is very much a joke so I am not linking it) .. Vercel later did https://github.com/vercel-labs/portless and I would imagine quite a few others. Zeitgeist. Also this does probably mean its kinda useful.

And that none of us can get bothered to "Google" if a thing that does the same thing already exists. Currently vibing, on a train, a spaced repetition thing for my kid - because I needed a specific list of countries - and its faster to create the whole app rather than figure-out how to find one that would do this.

Re: I Got Sick of Remembering Port Numbers

#118

Earlier quoted context omitted.

All our bookkeeping is now in YAML. Watch the spaces on your way out the door.

And don’t forget to quote your port assignments and version strings.

Hacker News loves to make snarky comments about everything to do with K8s and YAML all the time, and yet in my experience the amount of times an issue was caused by actual YAML can be counted on one hand.

Way more often it’s developers who can’t figure out that their http library only supports 2 concurrent connections, or emit garbage/malformed log lines and then bitch that they can’t see their app logs because we dropped them, or can’t be fucked to do “kubectl describe” in their own developer namespace that they have full permission for.

If you truly experience issues with just using YAML then you need to skill up probably.

Re: I Got Sick of Remembering Port Numbers

#119
post #6

It's like someone should make a file... maybe in /etc ... and put short names for services in it... maybe it could be called /etc/services...

This is exact problem I see with all of those vibe coded software: In few years everything will be super fragmented, everyone will be using their own set of tools, or vibe coding them, themselves. Communication between teams or even between team members will become very hard because of those differences. 'What do you mean production is down? On my vibe coded dashboard everything is green!'

It’s the Lisp curse again.

“[X] is so powerful that problems which are technical issues in other programming languages are social issues in [X].

— https://www.winestockwebdesign.com/Essays/Lisp_Curse.html#ma...>

Re: I Got Sick of Remembering Port Numbers

#120
post #101

Earlier quoted context omitted.

URLs already have default ports for service names as a feature. http:// means port 80 unless specified otherwise https:// means port 443 unless specified otherwise ftp:// means port 21 unless specified otherwise sftp:// means port 22 unless specified otherwise ... The practical solution for TFA is actually just an nginx server running on port 80 with proxy_pass location /blog/ { proxy_pass http://127.0.0.1:3000 ; } l…

How many little web servers work without issue when their root page is loaded from a path other than /?

If that's your concern you can also do this

    server {
        listen 80;
        server_name "tensorboard.localhost";
        location / {
            proxy_pass http://127.0.0.1:6006;
        }
    }

    server {
        listen 80;
        server_name "blog.localhost";
        location / {
            proxy_pass http://127.0.0.1:3000;
        }
    }
HTTP 1.1 and later will have the browser supply the domain name that was used to access the site, and even though *.localhost all resolve to 127.0.0.1, nginx will pluck out the correct configuration and proxy_pass the correct one.
Post reply on HN