• 3 Posts
  • 125 Comments
Joined 5 years ago
cake
Cake day: May 31st, 2020

help-circle
  • Ephera@lemmy.mltoLinux@lemmy.worldHaving to search to do everything..
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    16 hours ago

    Man pages are displayed in less (which acts as the so-called “pager” here), so you can search man pages interactively like you search in less. And you do that by pressing /, then typing your search term and pressing Enter. Then you can jump between results with n and Shift+n. This is also how search works in vim, by the way.

    Perhaps another tip in this regard, to search in your command history with Bash (for re-running a command you’ve previously used), you can press Ctrl+R, then start typing your search term. Pressing Enter will run the displayed command. To skip to older search results, press Ctrl+R again. If you want to edit a command before running it, press or Ctrl+F instead of Enter.
    This UI is a bit fiddly in Bash, but worth figuring out.

    As for Fish, it’s great for new users, because:

    • it has a much more intuitive Ctrl+R UI, displaying all the search results interactively and not behaving weirdly in certain situations.
    • it automatically sifts through your command history as you type and suggests the most recent command which starts with the prefix you typed. You can fill in its suggestion with or Ctrl+F, or only use the next word from it via Alt+F. You can skip to older matches with , which is then a proper search like Ctrl+R in Bash, so not just prefix-matching. And yeah, overall just really useful, because it’ll both make it quicker to run frequently-used commands, and sometimes suggest a complex command which I didn’t even remember that I once ran.
    • its tab-completion shows short descriptions of what most (sub-)commands or arguments do.

    But:

    • don’t set it as your system-wide default shell or there’s some chance of shell scripts not executing correctly. What you should do instead, is to set it as the startup command to run in your terminal emulator.
    • the syntax of Fish is somewhat different to that of Bash, which can be confusing when you’re still learning the Bash syntax. It’s not the worst thing in the world, as it basically only affects scripting and more complex command chains.
      Scripting is not a problem, because you can throw a shebang into the first line to use Bash syntax (#!/bin/sh or #!/bin/bash). You should add a shebang to your scripts anyways.
      And running more complex commands isn’t too big of a deal either, because you can run bash in your terminal to launch Bash, then paste the command into there to run it, and then quit back to Fish with exit or Ctrl+D. Typically you’ll know to run bash, because Fish’s syntax highlighting turns red after you’ve pasted a complex command.




  • It feels more solid to have a complex program covered by tests, yes, but how can this be confirmed in an objective way? And if it can, for which kind of software is this valid? Are the same methodologies adequate for web programming as for industrial embedded devices or a text editor?

    Worth noting here that tests should primarily serve as a (self-checking) specification, i.e. documentation for what the code is supposed to do.
    The more competent your type checking is and the better the abstractions are, the less you need to rely on tests to find bugs in the initial version of the code. You might be able to write code, fix the compiler errors and then just have working code (assuming your assumptions match reality). You don’t strictly need tests for that.

    But you do need tests to document what the intended behaviour is and conversely which behaviours are merely accidental, so that you can still change the code after your initial working version.
    In particular, tests also check the intended behaviour of all the code parts you might not have realized you’ve changed, so that you don’t need to understand the entire codebase every time you want to make a small change.




  • Ephera@lemmy.mltoGames@lemmy.worldMarathon is delayed
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 days ago

    I could imagine that they didn’t want to do something called “Destiny 3”, because people would expect that to be better than Destiny 2, which is virtually impossible, if you’re gonna start over from scratch, with how many years of development have gone into Destiny 2 by now…



  • Yeah, the wording is confusing. A long time ago, there was no paid software, there was only software where you got the source code and other software where e.g. it was pre-installed on some hardware and the manufacturer didn’t want to give the source code.

    In that time, a whole movement started fighting for software freedom, so they called their software “free”.



  • It’s just the normal “Pager” widget, configured to show application icons.

    I find “minimap” more descriptive for what I’m doing, because I don’t minimize, nor stack windows, so if a window exists, it has a location.
    Which is also ultimately how I use this thing. Imagine a large desk where you need to jump between topics every so often. You’d put related sheets of paper next to each other and leave a bit of space between the groups. Sheets of paper are just application windows in my case (I will open one or more windows per task, I don’t mix tasks together based on application like people usually do). Well, and my desk also happens to be very long, so I can comfortably fit a minimap for it in my panel.

    And because I really like multitasking, I’ve actually got multiple desks, in different colors:

    For these, I use Plasma’s Activities. The different colors are done by having a transparent panel and then setting the wallpaper to different colors + telling Plasma to use the wallpaper for determining the accent color.

    In this screenshot, you can also beautifully see a workspace with 5 Kate windows, which is genuinely where I shoved a bunch of notes, for me to sort through them later. 🙃




  • I get to use Linux at $DAYJOB and I have a rather customized KDE setup (basically window tiling, 20-80 workspaces, a workspace minimap in the panel).
    Usually, I’m surrounded by other nerds, who’ll ask about it occasionally, but you know, they’ve heard of or used Linux before, they know that some crazy things can be done.

    Now, yesterday, I was in a call with the legal department. I started sharing my screen and explaining my relatively simple problem. And the guy took longer than I expected to respond, which made me quite self-conscious, whether he needs time to process my explanation …or rather what in the fresh hell I did to my computer to make it look like that. 🙃






  • I mean, it really isn’t hard to write an application, which won’t work on Windows or macOS. For example, I have a little utility, which adds a text file into a folder underneath ~/.local/ and opens it in my default text editor via xdg-open, so that I can easily jot something down. Both of things are currently implemented Linux-only.

    In this case, I could’ve pulled in two libraries to do those things with Windows/macOS support. But it’s also an incredibly simple application. If you build something more complex, there’s a good chance that no library exists and that you still need to make assumptions about the OS.

    Of course, a complex applications is likely to be useful enough, that someone wants to use them on Windows/macOS and then contributes support (and pinky-promises to the maintainer to regularly test on those platforms). That’s the other vehicle how lots of open-source applications do support a multitude of platforms.

    But yeah, it’s just not quite as much of a given as your comment makes it sound…