• 1 Post
  • 4 Comments
Joined 1Y ago
cake
Cake day: Jul 14, 2023

help-circle
rss

My isp gives me something a public ip like 200.191.57.xxx, but that ip changes and I can’t open any port. Then my isp’s router’s local network is 192.168.0.xxx, my TP link router connects there (to 192.168.0.3 i think). Then my TP link manages ips 192.168.1.xxx. My jelly server is at 192.168.1.10, my devices are at 192.168.1.5, 8, etc.

Everything is local, nothing goes outside


I will check qos, i think i saw it enabled or something, thanks


From my internal IP (192.168.1.xx), I don’t access it from the outside (can’t open ports on residential connection in my country :c )

All my devices are connected to my own router, then that router connects to my isp router, which then connects to the internet, so its very weird.

The only thing I configured was reserving an ip address for my server on my router, but I don’t think that should influence…


Are transfer speeds tied to internet speed?
When i connect to my jellyfin server to stream/download video/audio the speeds are tied to my internet speed. If my internet speed drops so does the transfer rate from my server. However it seems tied to my internet download speed (which varies from 0.5 to 80 mb/s), not the upload speed(which is usually 2 mb/s), and if i disconect my router from the internet I'm able to react the maximum allowed by my hardware. Is this normal? Or maybe something is wrong, or needs special configuration? If relevant, I connect to a tp link router, which connects to the router from my isp.
fedilink

How about “php enables me to code like a moron”, or even better, "php breaks common conventions and forces me to think about every little detail and special edge case, slowing me down if I don’t want to accidentally ‘code like a moron’ "

Nested ternary operators emerge because of the lack of if/switch expressions (which is C fault), so they are “useful” (they shouldn’t be). However, PHP is the only language that treats it as left associative. This has 2 problems:

  • You are forced to use parenthesis. Some (insane) people might do: (cond1) ? “A” : (cond2) ? “B” : “C” And it makes sense. Its ugly af, but it makes sense. But PHP now forces you to use more parethesis. It’s making you work more.
  • It breaks convention. If you come from any other language and use ternary operators, you will get unexpected results. After hours of banging your head against the wall, you realize the problem. And now you have to learn a new edge case in the language, and what to do to actually use the language.

“But you shouldn’t use ternary operators anyway! Use if/switch/polymorphic dispatch/goto/anything else”

True, but still, the feature is there, and its bad. The fact that there are other alternatives doesn’t make the PHP ternary operator worse than other languages’ ternary operator.

PHP works against you. That’s the problem. The ternary operator is not a good example, since there are alternatives. But look at something so simple, so mundane like strpos.

If strpos doesn’t find returns false. Every other language returns -1. And if you then use this value elsewhere, PHP will cast it to 0 for you. Boom, your program is broken, and you have to stare at the screen for hours, looking for the error.

“BuT yOU sHoUlD AlwAyS cHEcK tHe rETurN eRRor!”

And even if that’s true, if we all must check the return value, does PHP force you to do so? Like checked exceptions in Java? Or all the Option & Result in Rust? throws, throws, throws… unwrap, unwrap, unwrap… (Many) people hate those features

PHP works against you. And that’s why its bad.