Does anyone else have the thought that maybe it’s time to just replace these 30+ year old ancient protocols? Seems like the entire networking stack is held together with string and duct tape and unnecessarily complicated.
A lot of the decisions made sense somewhat in the 80s and 90s, but seems ridiculous in this day and age lmao
I definitely would love to see a rework of the network stack at large but idk how you'd do it without an insane amount of cooperation among tech giants which seems sort of impossible
Seems like the entire networking stack is held together with string and duct tape and unnecessarily complicated.
The more you learn about network technology the more you realize how cobbled together it all is. Old, temporary fixes become permanent standards as new fixes are written on top of them. Apache, which was the most widely used web server for a long time, is literally named that because it was “a patchy” server. It’s amazing that any of it works at all. It’s even more amazing that it’s been developed to the point where people with no technical training can use it.
The open nature of IP is what allows such a varied conglomerate of devices to share information with each other, but it also allows for very haphazard connections. The first modems were just an abuse of the existing voice phone network. The internet is a functional example of building the airplane while you’re flying it. We try to revise the standards as we go, but we can’t shut the whole thing down and rebuild it from scratch. There are no green fields.
It has always been so. It must be so. It will continue to be so.
Same unfortunately goes for a big chunk of the law on a global scale… Constant progress, new possibilities and technologies, changes in general are really outpacing some dusted and constantly abused solutions. Every second goes by and any “somehow still holding” relic is under more pressure. As a species we can have some really great ideas but the long-term planning or future-proofing is still not our strongest suit.
I may be waaaay off here, but the internet as it exists is pretty much built on DNS, isn’t it? I mean, the whole idea of DARPANet back in the 60s and 70s was to build a robust, redundant, and self-healing network to survive nuclear armageddon, and except when humans f it up (intentional or otherwise), it generally does what it says on the tin.
Now, there’s arguments to beade about securing the protocol, but to rip and replace the routing protocols, I think you’d have to call it something other than the Internet.
The board’s job is to hire the CEO and demand good value for shareholders. The CEO’s job is to make the big decisions to achieve that goal quickly and then usually leave before their short term thinking falls apart. The manager’s job is to enforce whatever decisions the CEO makes, even if it is stupid or cruel. And the employee’s job is to suffer so that each layer above can look good to the layer above them.
Not to say there’s no good people in the system. My manager for most of my time there was actually a good manager who felt that his primary job was to deflect away the shit that rolled down from above so we could focus on our work, but then he got laid off along with half my coworkers.
I do miss writing software, but I really don’t miss working in the corporate world.
It is simpler to bang out a [int(num) for num in text.splitlines()[0].split(’ ')[1:]] in Python, but that just shows the happy path with no error handling, and does a bunch of allocations that the Rust version doesn’t. You can also get slightly fancier in the Rust version by collecting into a Result for more succinct error handling if you’d like.
EDIT: Here’s also a version using anyhow for error handling, and the aforementioned Result collecting:
Yeah I was trying to do something like reading the first line by getting an iterator and just looping through the other lines normally, since first line was kind of a special case but it got messy quick. I realized halfway that my collects were redundant but couldn’t really simplify it. Thanks
improvable, also wayland problem isn’t fundamental, is the slowness to merge new protocols, wlroots, for example, add protocols that aren’t approved in the wayland gitlab to make it work better, so… third option is wayland, with protocols waiting for approval(that can be updated later if the protocol changes idk)
also nvidia, but that can’t be fixed with a third option anyway
to be fair people need to read the gitlab discutions, the devs there aren’t approving protocol just because the sake of it, is really hard to make things work securely and on every plataform, also, there things that really don’t need a protocol to work, look at the QT handoff that fixes an issue that even on xorg wasn’t fixed, and without needing a new protocol
other than that, certaing things like the tearing could have being merged earlier lol
A while ago as an experiment I set up a new system and decided to see just how much I could get done without installing a graphical environment. Most of my work happens in Neovim and there are plenty of applications that will do things like play video directly to a framebuffer so it should be pretty straightforward right? Turns out not really. Neovim will run in a kernel VT, but it’ll be … messy. The kernel virtual terminal is only designed to be good enough to use to install a desktop manager or repair your configuration. It’s not meant to be used full time. It only supports 16 colors which breaks just about every color scheme out there. It also only supports specially converted pixel fonts, meaning your choices of font size are somewhat restricted, ligatures are a complete no go, you can pretty much forget about nerdfonts (unless you wanna do a lot of work) and the only way to change fonts or font sizes is to use the setfont command which only works if run directly in the terminal as opposed to inside e.g. tmux.
You can use fbterm if you want to use TTF fonts. It even works with nerdfonts, although the rendering is not quite right. It does support 256 colors, although the way it implements colors makes it a pain to use.
I just kinda used my phone for that. Like I said, not a good experience. Elinks and Links2 are marginally better than the trash fire that is Lynx, and I remember a while ago there was a project that would run Firefox in headless mode and cram its output into a terminal (wish I could remember what it was called), but you’re not really gonna get a browser in a terminal no matter what you do
Found it again after a bit of googling. It’s called Browsh. Haven’t played with it yet (will report back when I do) but from the demo on that github page it seems to work pretty well.
UPDATE: I’ve tried it out and hooooly craaaaaap this is good. If I didn’t know this was running in a terminal I would never have guessed. I would’ve just assumed it was a novelty browser meant to evoke that style. Smooth scrolling works astonishingly well as does video playback.
Lol, I’m already up and running. It’s pretty good, and I can actually use my mouse with it in bash. Protip, it seems very important to use the right window size. It’s good enough to do a lot of normal browsing, but openstreetmap understandably had broken controls. The only local issue is that I can’t see what I’m entering into the URL bar.
It’s also designed to run distributed, so you can use shitty bandwidth between a rendering machine and the display machine. I should try fitting it into a radio channel or phone connection or something, haha. I also wonder if it could be adapted to work with Tor Browser.
Any good terminal emulator has them. Personally I use Konsole, but I’d be remiss if I didn’t mention Neovide which supports them as well. It’s a bit like a terminal emulator that can only run Neovim and has some Neovim-specific settings and integration (e.g. change window opacity with a Vim command, animated scrolling, plus that funky little animated cursor effect you can see on the website), and as a bonus it supports Windows and MacOS if you’re a heathen
Like == but more strict. The == operator will do type conversion, so 0 == ‘’ will actually be true, as an example. Sometimes (honestly, most times) you may want to compare more strictly.
One neat feature is you can compare to both null and undefined at the same time, without other falsey values giving false positives. Although that’s not necessary as often now that we have nullish coalescing and optional chaining.
I just tested and Terser will convert v === null || v === undefined to null==v. Personally I would prefer to read the code that explicitly shows that it is checking for both and let my minifier/optimizer worry about generating compact code.
The short answer is that your language needs === when it fucked up the semantics of ==, but it’s also too popular and you can’t fix it without breaking half the web.
It’s also important if you’re checking hashes (at least, it was - if you’re using correct hashing algorithm that isn’t ancient, you will not have this problem).
Because if you take for example “0e462097431906509019562988736854” (which is md5(“240610708”), but also applicable to most other hashing algorithms that hash to a hex string), if(“0e462097431906509019562988736854” == 0) is true. So any other data that hashes to any variantion of “0e[1-9]+” will pass the check, for example:
I did use md5 as an example because the strings are pretty short, but it’s applicable to a whole lot of other hashes. And the problem is that if you use one of the strings that hash to a magic hash in a vulnerable site, it will pass the password check for any user who’s password also hashes to a magic hash. There’s not really a high chance of that happening, but there’s still a lot of hashes that do hash to it.
There’s a special place in hell for the inventor of semantically significant whitespace.
YAML itself is one of the circles of hell. You have to copy-paste YAML from web etc sources with dubious formatting for all eternity, and the editor doesn’t have YAML support. Also you can only use Python
I’m not sure which thought is scarier: that you don’t know what you’re signing up for, or that you do know and you enjoy fixing undecidable formatting fuckups manually
There’s a bonus third option: I started writing python professionally in 2007 and nowadays spend 75% of my “hands on keyboard” time working on kubernetes YAML and I am indeed having a good time.
I admit, I hastily misread the tail end of your comment as (e.g.) “A reason YAML is bad because you have to copy-paste from the web and that sucks”; not as you probably meant it “in this special hell, you must deal with copy-pasted nbsp and other trash”. So maybe I did not know exactly what I was signing up for ;)
I don’t deal with anything like that and not entirely sure how it happens to people enough that it is a common complaint. “undecidable formatting fuckups” are a non-issue in my life, I really don’t understand how people encounter such things. Maybe they need to fix their editor/IDE/tools? Skill issue? IDK.
As a tangent- I don’t care what language code is written in, it had better be indented properly (and linted, and follow the project’s codestyle, …). Our juniors learn pretty early that their change requests will be blocked on formatting alone by CI, and a human won’t even bother reviewing the substance of their change if they don’t follow convention. I don’t hear them ever complaining about any of these things, least of all semantic whitespace … and we have a rich culture of bitching about menial/pedantic things ;)
Indenting copy pasted yaml is always a pain in the butt. Any indentation you give is likely a valid yaml. Especially bad considering indentation has a significant meaning. You have to double check back and forth to ensure nothing bad has sneaked in.
With JSON there are no such discrepancies. It’s likely the editor has figured it out for you already. If it hasn’t it’s easy to prettify the JSON yourself.
Semantic whitespace problems can easily be literally impossible to solve automatically. One of the dumbest fucking ideas anybody ever came up with in computing and its inventor if anyone belongs in YAML Hell. As a fuckup it’s not quite as bad as null, but that ain’t exactly a high bar
Almost everything that runs on Windows was built for Windows. So it’s a true statement, but pointless. That’s like BF Goodrich advertising their tires as “built for cars”.
You’re right, clicked it away so many times over the years and never stopped to think what a silly statement that was. I feel like it was for a time when 10 was a new shiny ‘mysterious’ thing, that it might convince people into thinking it needed something special, but has just aged like milk.
Microsoft Edge is integrated with File Explorer in Windows 10 through a feature called “Pick up where you left off”. This feature allows users to resume their browsing session from Microsoft Edge directly within File Explorer.
That unlike teams, which they didn’t bother to build for windows and instead used a webapp, they actually bothered to use their own ui tools on their own operating system for a change? (But I guess they only did that so that teams could be a webapp, based on edge…)
sometimes i start my iterator with = -1. As I only +=1 it with a condition and I know that it will return true on the first cycle. I’ll chuck array[iterator] and need it to be 0 to start with ofc.
I just have no idea how to not do this, but it looks so bad, i need a i8 instead of a u8 at least because of this
I could tell you my recent cenario, but it wouldn’t get us anywhere. because I know that it’s avoidable, but it’d take for me to run a different logic for only first element of my array. which is doable, but it’d make the code like 5 extra lines longer, harder to read/follow. But I just simply choose to put -1 and boom it’s fixed, just works.
another solution would be (without context) is to add one more variable and one more check to my foreach, but that takes more memory and cpu, I usually choose the i = -1, it’s ugly but not as ugly as other solutions would be
Not really. Having heterogeneity among operating systems is better than pure homogeneity. Say, if everyone ran Linux, and some massive security flaw was discovered, we would all be screwed at the same time. However, if we ran different stuff, and some massive security hole was found for just one operating system, then only a small portion of the world is vulnerable at once. Besides, more operating systems can lead to more innovation, as long as there is good competition between them.
If the whole world focused and used just 1 OS for every system for a long enough time line, I think it would evolve fast enough to reach a point of perfection, where there are no security holes or flaws of any kind. I do believe that while programming has many ways of doing the same task, there is always an objectively best way to do it. Eventually the best way to do everything an OS needs to do would be found; it would be faster if there was only 1 OS to work with to reach that point.
I do believe that while programming has many ways of doing the same task, there is always an objectively best way to do it.
I’ve been writing code in one form or another for some 30 years now, and my observation so far has been the exact opposite: there are many problems in programming for which there is no one clearly superior solution, even in theory. Just like life in general, programming is full of trade-offs, compromises, and diminishing returns.
where there are no security holes or flaws of any kind
this in itself is straight up impossible to know or prove. when can you say your program has no vulnerabilities? ever hear of zerodays? finding the best way to do everything in software will never be found or stay constant either.
programmer_humor
Top
This magazine is from a federated server and may be incomplete. Browse more on the original instance.