6 ms·
My new favorite vim/tmux bug (2014)
- deleted 7y ago[deleted]
- 0xff00ffee 7y agoMy favorite HTTPS bug: Websites prove their identity via certificates. Firefox does not trust this site because it uses a certificate that is not valid for www.daniellesucher.com. Error code: MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT View Certificate --- Followed by: "Site not found"
- q3k 7y agoJust because it serves HTTPS on port :443 doesn't mean you should be using it. 'HTTPS Everywhere' style plugins are a broken concept.
- ivanbakel 7y agoIn what way are they a broken concept? What justification is there for serving HTTPS in a way users can't expect to consume?
- tych0 7y agoIf you don't serve the same content on :80 and :443. For example, you might be running a Tor relay node which would serve the node directory list on :443 to help people bypass firewalls, but also be using it as a useful and legitimate web server in order to prevent organizations from blocking it wholesale.
- Lex-2008 7y agoSomebody might prefer using http for public stuff (reading blog posts), https for private (editing them).
- q3k 7y ago> In what way are they a broken concept? Because it's blindly following an inadequate heuristic, and not gracefully degrading if it fails - instead, you get comments like these blaming the author. Even though the author never wanted you to use HTTPS in the first place. > What justification is there for serving HTTPS in a way users can't expect to consume? Plenty of technical reasons (eg. what the sibling comments mentioned), but most importantly: there's no Internet/Web standard that I'm aware of which would prohibit me from doing so.
- 0xff00ffee 7y agocool. i like fried cheese, too.
- q3k 7y agoBut the author was following convention: serving HTTP on traffic :80, and linking to that explicitly. It's you, the user, who for some reason decided to switch to a different protocol on a different port, and expected it to work even though there was no guarantee or indication that it would.
- asudosandwich 7y agoCould be a new hobby for the author. Like https://xkcd.com/148/ https://xkcd.com/148/
- zoonosis 7y agoHTTPS Everywhere works based on rules as to which sites support https. It does not blindly redirect every request to port 443.
- Spivak 7y agoThere isn't a HTTPS version of the site so you get dropped into the default vhost for their hosting provider, DreamHost. DreamHost could automatically issue LE certs for their customers but that's not how they do things and don't enable it without customer approval. It is impossible for DreamHost to not give you an error in this case. You connected directly to port 443 with a name that they don't have a certificate for. They could just close the connection but I don't think that would be an improvement on the situation.
- 0xff00ffee 7y agoEDIT: Ok then, looks like default port conventions don't really mean anything. Sorry I brought it up.
- jolmg 7y agoI have to say, I can't understand the author's glee while investigating the bug. To me, bugs are a source of irritation. Like the author, I also like to get to the bottom of them instead of resorting to reinstalling and resetting a wide area of stuff to make it go away, but I do it because the existence of the bug is irritating. This person seems to do it because investigating seems to be a source of joy for them. For me, investigating is a frustrating necessity to fix the bug.
- nwallin 7y agoIt depends on the codebase and the person I suppose. In my personal projects, I prefer greenfield programming, because I can write code embracing modern C++ features that ensure correctness by construction. At work I'm saddled with C#'s shitty ecosystem that doesn't play well with its shitty async stack, and generations of old C++ paradigms that precludes things like constexpr, const correctness, static_assert, we use COM smart pointers instead of shared_ptr, (with no weak_ptr equivalent) shitty naming conventions where variable names are only a repeat of the type, etc. My greenfield work code at work is basically guaranteed to be buggy. I ain't that smart yo. At work, I enjoy fixing bugs. I get to challenge the assumptions of Microsoft and the juggernauts of my corporation's OG Architects. And I get to win. I fight the man and I win. This afternoon I pointed out a bug in code written by a programmer who's been with the company for 20 years. He's the dev lead over a 70 person team. A weeks ago I fixed a bug in our software's core architecture which has been touched by many of the important people in our org. At home I wear sweat pants. At work I wear a cape. Fixing bugs is awesome.
- kelnos 7y agoDiff'rent strokes, I guess. For some people the detective work itself is incredibly rewarding, sometimes even more than finding the solution. It's good that these people exist!
- q3k 7y agoI'm more on the side of the author - I really enjoy hunting down and solving very difficult/odd/surprising bugs, at least every so often. It lets me exercise my generalist ('full stack') muscles, for instance going from a high-level application issue to reading/debugging kernel code.
- carapace 7y agoOn the one hand I love this on the other hand this is not the kind of crap we should be using for professional work. Yeah tmux and vim are not professional software. Let that sink in.
- ganzuul 7y agoIs working in Eclipse still as painful as it used to be?
- exdsq 7y agoAs someone who almost exclusively uses tmux and vim (as I spend my life in numerous terminals...), what would you recommend instead? Unless this is /s in which case it has gone straight over my head!
- carapace 7y agoNah, "I'm seriously you guys." Look, I use vim and tmux too. When they work, they work well, no doubt. It's when they break, like in TFA, that the trouble starts. Recall that the terminal is a glorified refried teleprinter with more archeological layers than the Grand Canyon and more fossils than a natural history museum. https://en.wikipedia.org/wiki/Teleprinter https://en.wikipedia.org/wiki/Teleprinter My point was that other professions advance the state of the art of their tools. We're still using vacuum tubes and steam. Those are cool but it's not cool that nothing better is being adopted. Using terminals in 2020 is like LARPing steampunk (at work with a straight face.) We get away with it because the newfangled crap (Eclipse, etc. Heck, I use VScode but half of what I do is still in the embedded terminal emulator!) is just not better. This can't be the best we can do, can it? And yet, where are the alternatives? Well... > what would you recommend instead? I can't recommend them because nothing highly superior has reached mass adoption. But they exist (in the sense that they exist or did exist or could exist) like Jef Raskin's Cat. https://en.wikipedia.org/wiki/Canon_Cat https://en.wikipedia.org/wiki/Canon_Cat (Canon killed the Cat. Heh. Wah.) Have you ever used the old Oberon OS? (Oberon emulator in browser: https://schierlm.github.io/OberonEmulator/emu.html?image=FullDiskImageWithSource&width=1024&height=576 https://schierlm.github.io/OberonEmulator/emu.html?image=Ful... ) Oberon OS (plus the "Gadgets" widget system) represents a fundamentally better UI metaphor than the terminal. Heck Smalltalk et. al. (E.g. Pharo) with their portable VMs and platform-agnostic pixel-identical GUIs are a better abstraction than UNIX+TTY, eh? https://pharo.org/ https://pharo.org/ (Maybe that "Dark" thingy will be cool: https://darklang.com/ https://darklang.com/ )
- zokier 7y agoAnd people wonder why I think terminal is pretty horrible environment for anything but purely line driven applications. Just the other day my coworker was asking my why on earth do I run gvim instead of vim in terminal; I feel now vindicated. Sure, I haven't hit this issue but I am all the time cognizant of the eldritch horrors that are the terminal emulation layers, which makes me prefer to avoid them. And having tmux sit in the middle doing another emulation layer does definitely not help the feeling. I just wish there were more almost ncurses like lightweight toolkits that would run natively in graphical environments, because to me they seem pretty rare.
- stefco_ 7y agoIt's not the smoothest, but at least it's fairly stable/consistent with good performance (vs. e.g. an electron GUI app). Once you get things dialed, you can keep your workflow going for years with minimal changes since nobody is trying to make money trying to sell you a new version of your workflow. I do a lot of work over SSH, too, so it's really nice to have my regular workflows largely port over to remote work.
- asveikau 7y agoThis "integration" between vim and tmux seems like a misfeature. It is poorly thought out and I'm not surprised it could exhibit such a bug. I don't want tmux sending input to vi based on an unrelated action. Just as I wouldn't expect it to know what program was in the foreground and make lots of assumptions about how it works.
- jolmg 7y agoWasn't it backwards? It's a vim plugin, so that vim knows it's running inside tmux. Honestly, I'm not sure which is worse, but I do agree that either integration would be misfeature.
- GrinningFool 7y ago> I don't want tmux sending input to vi based > on an unrelated action. Just as I wouldn't > expect it to know what program was in the > foreground and make lots of assumptions about > how it works Architecturally, I agree. I don't want those things either. It's messy. Practically, I find that I'm way more efficient with the messy integration enabled.
- saidajigumi 7y agoTo be honest, I hit my tl;dr threshold on the article, and skimmed only the high level. But speaking personally, I've used vim-tmux-navigator[1] and some related setup on the tmux side[2a][2b] for years, and it's really, really nice. CTRL-{H,J,K,L} navigates seamlessly between vim splits and tmux panes. It works flawlessly, and I wouldn't be without it. Put another way, there are a lot of tmux users who take advantage of it for its terminal pane management features on a local environment rather than the classic remote-session stability use case ala screen. In that light, some kinds of integration make a ton of sense. These days, it vaguely annoys me that I can't just navigate between OS (macOS, here) windows by keyboard just as seamlessly. I haven't quite gotten around to solving the problem with Hammerspoon[3] yet. [1]: https://github.com/christoomey/vim-tmux-navigator https://github.com/christoomey/vim-tmux-navigator [2a]: https://github.com/jwhitley/dotfiles/blob/master/.tmux.conf#L89 https://github.com/jwhitley/dotfiles/blob/master/.tmux.conf#... [2b]: https://github.com/jwhitley/tilde-local/blob/master/local/bin/tmux-nav-pane https://github.com/jwhitley/tilde-local/blob/master/local/bi... [3]: http://www.hammerspoon.org/ http://www.hammerspoon.org/
- joemi 7y agoIs this really actually a bug with either vim or tmux? It sounds like it's just a bug with a vim plugin involving tmux.
- loeg 7y agoThere are still issues using function keys like Home/End in neovim inside a screen session, it drives me nuts.