WTF Bites


  • Java Dev

    @cvi Most of the glue which automates the development environment is also in bash. The code for the command-line version of the status screen is actually more complicated, and the first version of the HTML status page (not by me) just filtered that through ansi2html.

    I could of course have used a different language, but it would have involved a lot of shell callouts, and would have been more work than copying the flow from the text version.



  • @Tsaukpaetra said in WTF Bites:

    Status: Mildly terrified.

    be3b71cc-3747-4c4f-be48-f417c12b7780-image.png

    We had a docent at university who did that, except with bash. He was already past retirement age, so while he was excellent mathematician, he was already quite old when programming came around, so he just learned six or so shell commands and built simple web forms with them, both for his seminars (he no longer had large classes) and for some other stuff he did.


  • BINNED

    IMG_9855.jpeg

    €44.99? :laugh-harder:

    IMG_9853.gif



  • @loopback0 said in WTF Bites:

    I’m a crepe, I’m a weirdo #radiohead #crepes #pancake

    https://youtu.be/0rmHSZ8X80E?t=58



  • Fuck Microsoft for having two very different products both ostensibly called "Visual Studio".

    If you're stuck in the Microsoftiverse, why would you ever want to use Code instead of the real one?

    And if you're not stuck inthe Microsoftiverse, why would you ever want to use Code instead of sticking to a civilized option like vim? 🍹

    Either way, I hate the fact that I have to explain to people that I'm talking about real Visual Studio and not the Code knock-off.



  • @cvi said in WTF Bites:

    Fuck Microsoft for having two very different products both ostensibly called "Visual Studio".

    If you're stuck in the Microsoftiverse, why would you ever want to use Code instead of the real one?

    And if you're not stuck inthe Microsoftiverse, why would you ever want to use Code instead of sticking to a civilized option like vim? 🍹

    Either way, I hate the fact that I have to explain to people that I'm talking about real Visual Studio and not the Code knock-off.

    I avoid this by straight up telling people I use Sublime and be done with it.


  • Discourse touched me in a no-no place

    @cvi said in WTF Bites:

    And if you're not stuck inthe Microsoftiverse, why would you ever want to use Code

    It works well, and it's free unlike Sublime.



  • @Arantor I use Sublime in conjunction with other tools, whether it be Eclipse, Visual Studio Code, Visual Studio Normal or Visual Studio Ze-ze-ze-ze-ze-zeeeero


  • Notification Spam Recipient

    @loopback0 said in WTF Bites:

    @cvi said in WTF Bites:

    And if you're not stuck inthe Microsoftiverse, why would you ever want to use Code

    It works well, and it's free unlike Sublime.

    I find it annoying AF and avoid at all cost.



  • @Arantor said in WTF Bites:

    I avoid this by straight up telling people I use Sublime and be done with it.

    Telling people that I mainly use vim usually makes them go away, so there's that.

    @loopback0 said in WTF Bites:

    It works well, and it's free unlike Sublime.

    Yeah, but so is vim.

    Inb4 "but that doesn't work well". (That's a case of PEBKAC.)



  • @Arantor said in WTF Bites:

    I avoid this by straight up telling people I use Sublime and be done with it.

    I tell people I write assembly language in Notepad.

    And they never talk to me again.



  • @Gern_Blaanston said in WTF Bites:

    I tell people I write assembly language in Notepad.
    And they never talk to me again.

    Ima gonna try that.



  • @loopback0 said in WTF Bites:

    It works well, and it's free unlike Sublime.

    In Microsoft's voice: you get what you pay for 🍹


  • Notification Spam Recipient

    @Gern_Blaanston said in WTF Bites:

    @Arantor said in WTF Bites:

    I avoid this by straight up telling people I use Sublime and be done with it.

    I tell people I write assembly language in Notepad.

    And they never talk to me again.

    You’re a god damn hero. :mlp_salute:


  • Discourse touched me in a no-no place

    @cvi said in WTF Bites:

    Yeah, but so is vim.

    Inb4 "but that doesn't work well". (That's a case of PEBKAC.)

    Vim works fine for what it is. I use Vim when it makes sense for me.

    But I don't have any desire to invest time into finding a load of extensions that gave it the functionality Sublime/VS Code etc have and even more time remembering all of the arcane commands and key combinations needed for me to be able to use it as easily.



  • @cvi said in WTF Bites:

    Fuck Microsoft for having two very different products both ostensibly called "Visual Studio".

    Typical Microsoft. They also had two products both ostensibly called “Skype”. And there are probably other examples.

    If you're stuck in the Microsoftiverse, why would you ever want to use Code instead of the real one?

    If you have a use for the cool new plugins like remote. Working on a VM somewhere in the cloud from your browser does have its uses.

    And if you're not stuck inthe Microsoftiverse, why would you ever want to use Code instead of sticking to a civilized option like vim? 🍹

    Code came with a really good feature: The Language Server Protocol. That made implementing language plugins much easier, because now instead of having to implement an API in whatever language the IDE was written, the compiler developers could implement the JSON-RPC in their own language.

    The protocol has been since implemented in other IDEs and ViM, but the plugins are still easier to install in Code, since that's where everybody tests them.

    Either way, I hate the fact that I have to explain to people that I'm talking about real Visual Studio and not the Code knock-off.

    Yeah, it's delta uniform mike bravo.



  • @Gern_Blaanston said in WTF Bites:

    @Arantor said in WTF Bites:

    I avoid this by straight up telling people I use Sublime and be done with it.

    I tell people I write assembly language in Notepad.

    And they never talk to me again.

    But in case you used Notepad++, would they?


  • BINNED

    @loopback0 said in WTF Bites:

    @cvi said in WTF Bites:

    Yeah, but so is vim.

    Inb4 "but that doesn't work well". (That's a case of PEBKAC.)

    Vim works fine for what it is. I use Vim when it makes sense for me.

    So do I.

    But I don't have any desire to invest time into finding a load of extensions that gave it the functionality Sublime/VS Code etc have and even more time remembering all of the arcane commands and key combinations needed for me to be able to use it as easily.

    I think it’s :q!. :rimshot:



  • @loopback0 said in WTF Bites:

    VS Code etc have and even more time remembering all of the arcane commands and key combinations needed for me to be able to use it as easily

    That's another cool thing about VS Code—it does not really have any! You press F1 and type in the name of the operation you want to invoke, with search/completion as you type. Yeah, some have shortcuts, and you can bind more if you want, but you can do well without them.


  • BINNED

    @Bulb said in WTF Bites:

    @loopback0 said in WTF Bites:

    VS Code etc have and even more time remembering all of the arcane commands and key combinations needed for me to be able to use it as easily

    That's another cool thing about VS Code—it does not really have any! You press F1 and type in the name of the operation you want to invoke, with search/completion as you type. Yeah, some have shortcuts, and you can bind more if you want, but you can do well without them.

    Another feature introduced by Sublime Text.

    Thinking about it:
    If Sublime had never existed, we’d have gotten neither VSC nor Atom, and thus not Electron either. So good software gave rise to an abundance of terrible software. :thonking:


  • ♿ (Parody)

    @cvi said in WTF Bites:

    Fuck Microsoft for having two very different products both ostensibly called "Visual Studio".

    If you're stuck in the Microsoftiverse, why would you ever want to use Code instead of the real one?

    And if you're not stuck inthe Microsoftiverse, why would you ever want to use Code instead of sticking to a civilized option like vim? 🍹

    Either way, I hate the fact that I have to explain to people that I'm talking about real Visual Studio and not the Code knock-off.

    I haven't really used the Real Thing in a while, though I did a bit, with my son. My impression from using it years ago (and again with his school project) is that it's super huge and slow. VS Code feels very light (even with the electron baggage, and it still starts up faster than the Real Deal). Though I will grant, I'm running it on Linux and I don't know if MS has managed to make it suck in their native habitat.

    The extensions seem pretty thorough and cover just about anything you'd want to do. Using the original makes you look like a programming Fudd, I guess. Or like you have more money than sense.



  • @BernieTheBernie said in WTF Bites:

    @Gern_Blaanston said in WTF Bites:

    @Arantor said in WTF Bites:

    I avoid this by straight up telling people I use Sublime and be done with it.

    I tell people I write assembly language in Notepad.

    And they never talk to me again.

    But in case you used Notepad++, would they?

    Now you're just talking crazy.



  • @boomzilla said in WTF Bites:

    if MS has managed to make it suck in their native habitat.

    I'm very confident in Microsoft's abilities for this :half-trolling:



  • @boomzilla said in WTF Bites:

    I haven't really used the Real Thing in a while, though I did a bit, with my son. My impression from using it years ago (and again with his school project) is that it's super huge and slow.

    … and ugly and broken, but worst of all, can only do C#, VB, mostly C++ and SQL and maybe Python and PowerShell.

    VS Code feels very light (even with the electron baggage, and it still starts up faster than the Real Deal). Though I will grant, I'm running it on Linux and I don't know if MS has managed to make it suck in their native habitat.

    It's decent on Windows too. I guess the reason actually is that Electron kinda forces everything to be asynchronous, which means the UI loads quick and the highlighters and language servers and shit starting in the background do not block it.

    What is slow is when you make the mistake of making your checkout in a Windows folder when using Linux devcontainers. Because mounting Windows folders into WSL2 is sloooooow as mooolassssses. But that's WSL2's fault, not Code's one.


  • Considered Harmful

    @Bulb said in WTF Bites:

    @cvi said in WTF Bites:

    Fuck Microsoft for having two very different products both ostensibly called "Visual Studio".

    Typical Microsoft. They also had two products both ostensibly called “Skype”. And there are probably other examples.

    They still have one that sometimes identifies as Skype when it thinks nobody's looking.


  • Notification Spam Recipient

    @LaoC said in WTF Bites:

    @Bulb said in WTF Bites:

    @cvi said in WTF Bites:

    Fuck Microsoft for having two very different products both ostensibly called "Visual Studio".

    Typical Microsoft. They also had two products both ostensibly called “Skype”. And there are probably other examples.

    They still have one that sometimes identifies as Skype when it thinks nobody's looking.

    Microsoft Office Communicator?



  • @Tsaukpaetra said in WTF Bites:

    @LaoC said in WTF Bites:

    @Bulb said in WTF Bites:

    @cvi said in WTF Bites:

    Fuck Microsoft for having two very different products both ostensibly called "Visual Studio".

    Typical Microsoft. They also had two products both ostensibly called “Skype”. And there are probably other examples.

    They still have one that sometimes identifies as Skype when it thinks nobody's looking.

    Microsoft Office Communicator?

    I think you mean Microsoft Skype Lync Communicator for Business.



  • @cvi said in WTF Bites:

    If you're stuck in the Microsoftiverse, why would you ever want to use Code instead of the real one?

    I use Visual Studio for native Windows applications and projects that use Visi plugins (some embedded system projects, for example) and Notepad++ or VS Code for web sites, scripts, and other, generally less complicated projects.

    (Not mentioned: projects that use other or multiple IDEs. Stupid Eclipse.)

    If nothing else, Visi is a pretty big program to launch to edit one file that isn't part of a Solution.

    And if you're not stuck in the Microsoftiverse, why would you ever want to use Code instead of sticking to a civilized option like vim? 🍹

    As someone used to graphical editors and tools I find VS Code much easier to use than vim (or emacs). I tried to switch to vim back in the days where (it was | its derivatives were) one of the few editors on multiple platforms, but I found learning it too annoying.

    Either way, I hate the fact that I have to explain to people that I'm talking about real Visual Studio and not the Code knock-off.

    I had similar issues with Actual Acrobat vs. Reader for years. I also had to convince people having problems with a file to download the PDF and open it in Acrobat or Reader; the browser plug-ins regularly screwed things up. (And their JavaScript-based replacements still do.)



  • @Parody said in WTF Bites:

    VS Code for web sites

    That was basically the reason why they created it. Because for the folks creating TypeScript it was easier to make something browser-based than write a plugin into the .нет mess that is Visual Studio.

    @Parody said in WTF Bites:

    Stupid Eclipse

    I've been off the project that builds its own IDE on the “Eclipse RCP”, and that is a Proper:wtf:

    @Parody said in WTF Bites:

    VS Code much easier to use than vim (or emacs).

    I still open ViM for a couple of things like ad-hoc diff or some more complex repeated edits using regexes or the . repeat command, but otherwise switched to Code. And started using its cool features like devcontainers.

    Devcontainers are really good when you need a bunch of unusual tools (as I often do for commanding the ☁) as you create a docker container with them, use it for development, and then use the same container on the build server so you always have the same tools there and don't spend hours upgrading the build agents.



  • @Bulb said in WTF Bites:

    Because mounting Windows folders into WSL2 is sloooooow as mooolassssses. But that's WSL2's fault, not Code's one.

    WSL is a :dumpster-fire: worthy of this thread. There are two versions:

    • WSL1 emulates the Linux kernel API on top of Windows. It's kind of how the micro-kernel architecture was intended to be used, and how the ancient Microsoft POSIX subsystem and Windows Services for UNIX used to work. But they never got around to emulating control groups and full extent of namespaces, so a lot of newer Linux software—most importantly container engines—wouldn't work on it. But it had the benefit that it could directly translate Linux filesystem calls to Windows ones, so it was reasonably efficient.
    • So WSL2 instead is an almost complete VM running standard Linux kernel. Which means it is fully compatible with any software, but it also means that it accesses the filesystem outside its virtual disk image as a network share. And that's horribly slow.

    There would have been a middle way—porting Linux to Windows the way it used to be ported to itself or is still ported to L4 microkernel (isn't that closely related to what Windows actually run on?). That would be full Linux, so have all features, but would allow accelerating anything as suitable without going through hardware emulation. But I suppose :kneeling_warthog: won when they already had the hardware emulation written for Hyper-V.


  • Considered Harmful

    @Bulb said in WTF Bites:

    it accesses the filesystem outside its virtual disk image as a network share. And that's horribly slow.

    :wtf_owl: How so? I believe I get almost native speeds using Shared Folders through Host-Only networking on VirtualBox.



  • @Applied-Mediocrity I think reading and writing itself isn't slow. What is slow is listing directories, getting file attributes and opening files. I.e. the kind of things an IDE and a version control system need to do a lot of.



  • Can confirm that using WSL2 with Docker where my codebase is on a Windows drive and is mounted into a Linux container through a volume in the Docker compose file is pathologically slow.

    To the point where the usual file_exists checks that Composer makes in autoloading are a measurable and non trivial part of the runtime.

    A single page load with Laravel can easily take 10 seconds as a result.

    (By comparison, if I have all the files inside the Linux container normally, everything runs at native or near enough it isn’t noticeable. My databases are all in containers this way.)

    Also Docker on WSL2 has a nasty habit of allocating memory via vmmem and being shitty about releasing it (on my machine it’s frequently more of a memory hog than any browser!)



  • @Arantor For me the most pathological case is trying to build the front-end (Angular). On the Windows volume, it would take whole night.

    Basically if you only need Linux containers, the best approach is probably to simply install docker—or maybe even better podman—inside WSL2. Colleague did just that when his setup broke anyway, and I'm contemplating that because of the memory and performance issues.

    It even just works with Code and devcontainers. When you check out into WSL2 and open that directory (\\wsl$\…) in Code, it first re-opens it in WSL, and if it contains a devcontainer definition, then runs docker there. And it even triggers the logic that aligns the UID inside the devcontainer with the one outside, so you can still access the files in plain WSL2 shell correctly.

    Just if trying to use podman, there are two differences that require making docker a wrapper script rather than plain link to podman:

    1. When setting up the container, Code calls some command possibly with no arguments and expects it to do nothing in that case, but podman considers the lack of arguments an error. I'll check what exactly it is when I'm back home if I don't forget.
    2. Code has a shim that modifies the container to use the same UID inside as outside, but podman runs in subusers and by default maps root to the invoking user, so it needs extra argument --userns=keep-id to map the same UID instead.


  • @Bulb fair, but I don’t like Code which is partly why I haven’t fixed this situation any better than it currently is: all the code is local and available to Sublime.

    Alternatively if I got my shit in order I could update some of my legacy crap to not require old versions of PHP which is the big saving grace with Docker, I can drop years-old PHP in it and it’s fine.


  • BINNED

    Spot the :wtf:.

    #!/usr/bin/env python2
    # -*- coding: utf-8 -*-
    from __future__ import print_function
    
    import argparse
    import os
    import sys
    
    #py3 = sys.version_info.major == 3
    py3 = sys.version_info[0] == 3
    
    if py3:
        def unicode(x):
            return x
    

    To be fair, I don't know how the file ended up like that. It doesn't even exist in the github repo, so maybe it was created by setup.py and/or I manually edited something that I don't remember.



  • @topspin It looks like the code has been written as dual 2-and-3 version, and then the shebang line was filled in by setup.py with the interpreter it was running under, because that's something setup.py does.. That said:

    1. That code is antediluvian. Python 2 has been out of support for 4 years and deprecated for 10 years before that.
    2. I'm fairly sure there are some Frankensystems where python2 is indeed a symlink to python3 so py3 might still end up being True.


  • NodeBB, what you on?

    IMG_0838.jpeg



  • @Arantor said in WTF Bites:

    I don’t like Code which is partly why I haven’t fixed this situation any better than it currently is: all the code is local and available to Sublime.

    • Some other editors also have ability to open the workspace remotely, e.g. IDEA (PhpStorm, WebStorm) can do so over SSH, which can be used with a container with a bit more setup than a devcontainer. But the similar plugin I could quickly find for Sublime text looks a bit too primitive for the purpose.
    • It would probably be more efficient to turn the situation around as accessing the files over network at \\wsl$\\… will likely hurt the editor a lot less than than accessing them over network on /mnt/c/… hurts the server.
    • Recent WSL (upgrade to the “store” version) supports X11 and Wayland out of the box, so running even the editor inside WSL might be an option.


  • @Bulb I have the SSH/SFTP plug-in for Sublime, it’s not awful but it’s far from ideal for this case.

    I will have a think about revamping my setup - it’s just that my setup, while awful, does do everything I need it to do, including the more esoteric container shit like Jekyll builds, PlantUML and suchlike while also housing my festering mouldy PHP.


  • Notification Spam Recipient

    @Arantor

    PlantUML

    No.


  • BINNED

    @Bulb said in WTF Bites:

    the shebang line was filled in by setup.py with the interpreter it was running under, because that's something setup.py does.

    That would explain things.

    1. That code is antediluvian. Python 2 has been out of support for 4 years and deprecated for 10 years before that.

    Sure, but RHEL 7 ‡ still ships with python pointing to Python 2 instead of Python 3, so that's how this happened. And how often do you uninstall and re-install things so that setup.py cleans things up? Never. It finally broke, so I finally touched it.

    ‡ Since this shit will finally EOL enter extended support this year, I'm currently testing the RHEL 9 box IT wants to migrate to. Which, finally, doesn't have python2 anymore and thus things broke. Single character fix.
    (Although it also ships with an almost up-to-date version of zsh, so I can get rid of this completely once I change login shells from bash to zsh everywhere. And the bash it ships with is from 2020 instead of 2011, which is still 4 years old, but whatever.)



  • @Bulb said in WTF Bites:

    Recent WSL (upgrade to the “store” version) supports X11 and Wayland out of the box

    I didn't know that, and that sounds good news. I have WSL2 and I once tried to run some graphical software and it was... sort of like a flashback to the times when installing Linux would end with a console and let you muddle through to get a X server running! I think I had to install some sort of Windows remote X server and find a way for WSL to talk to that "remote" server (on the same physical machine but of course the firewall did its best to block it). In the end it sort-of worked except that it was butt-ugly, for some reason.

    So yeah, if it now works out of the box, great! I'll just have to find how I can update, given that the system is mostly locked by IT except that I have local admin rights so I manually installed WSL (not through the store, AFAIR, I don't think I even have access to the store?). No idea how I can update. Also I guess the first step is "update to Windows 11" which definitely isn't going to happen until corporate IT suddenly drops it from above without notice.



  • @remi said in WTF Bites:

    Also I guess the first step is "update to Windows 11" which definitely isn't going to happen until corporate IT suddenly drops it from above without notice.

    No, per https://devblogs.microsoft.com/commandline/the-windows-subsystem-for-linux-in-the-microsoft-store-is-now-generally-available-on-windows-10-and-11/:

    Windows 10 users can now use Linux GUI apps! This was previously only available to Windows 11 users

    @remi said in WTF Bites:

    I'll just have to find how I can update, given that the system is mostly locked by IT except that I have local admin rights so I manually installed WSL (not through the store, AFAIR, I don't think I even have access to the store?).

    It should have been pushed as update, so wsl --update should bring you up to the store version, but the announcement above also mentions manual installation instructions in case that distribution server got blocked by your preventers of information services when they eviscerated store.

    When your WSL is up to date, it should work out of the box except you may need to tweak your X keyboard settings (but it might also be because I am using a relatively rarely used “Czech programmers” keyboard).



  • @Bulb that sounds... suspiciously too easy :frystare:

    Thanks though, I'll give it a try when I haven't got anything more pressing!


  • BINNED

    At the risk of this being :trolley-garage: adjacent territory.

    Bildschirmfoto 2024-02-20 um 21.31.26.png

    Have you heard of blind reviews? In what universe does providing information about this help being fair?
    Whatever, I'm just reviewing, not submitting, so who cares.



  • @Arantor said in WTF Bites:

    NodeBB, what you on?

    IMG_0838.jpeg

    When you write a numbered list starting with entry 2031, obviously the non-existent content of the list item is more important than the number. CLOSED WONTFIX ASDESIGNED


  • ♿ (Parody)

    @Arantor said in WTF Bites:

    NodeBB, what you on?

    IMG_0838.jpeg

    Looks like a personal problem:

    6c982931-9f2f-43a0-8116-4b3adc8d1287-image.png


  • Discourse touched me in a no-no place

    @topspin said in WTF Bites:

    Have you heard of blind reviews? In what universe does providing information about this help being fair?

    I've heard of reviewers deciding to de-anonymise themselves and join the team writing the paper as a co-author (with permission). Means someone else has to become a reviewer instead...



  • @boomzilla It's fine on desktop but on iPad it was definitely wonky. Maybe one of those :3px: problems.


Log in to reply