Skip Navigation

Posts
16
Comments
396
Joined
3 yr. ago

  • A lot of what Linus complained about is 100% valid though

    Not necessarily. The program can be configured and they did not create a default configuration for all, to enforce a specific style. Linus can complain about the default settings, but that does not make sense if we look at all other tooling used in Linux. Are they using every application with default settings and then complain about it?

    No, there are settings adapted for the Kernel and their workflow. And they did not do that with rustfmt. While the critique about the issue itself is valid, its not valid to complain about it about the program. He should have complained about those responsible for the default configuration in Linux.

  • I handle comments for blocks of code like functions (besides nor arguments). Sometimes this commenting style opens my eyes to abstract it away or just to create a named function call in place. Depending on context and rest of the code off course. Comments should be high level for blocks. I try to avoid any commenting for single line. Sometimes line comments are signs to restructure or rename stuff.

    For if blocks, when needed (first try to avoid the need for comments) a summary at top is added. And only then if needed, in each sub-block (under if, or else if or else) parts comments could be added, for additional context. I probably break my rules more often than I should, but that's at least my goal.

  • I don't understand why.

  • Sure, it might be missing features. But the main point is that rustfmt is pretty standard in Rust and is easy to enable and integrate. So even if features YOU want to have are missing, there could be a default configuration of what is configurable. I would expect that from a big project like Linux. Linus should never be in the position he was, by Googling and finding these options. It should have been as a configuration enforced as standard for every contributor.

  • There are SSD and usb stick drives with a fake size programmed into it. There are scams who sell higher capacity, but delivering lower capacity. Looking in file browser (or other tools), it still looks like 1 TB. But as soon as you fill the real 64 GB, the rest of the data is written into the void = data loss. So from the looks like this drive was originally a fake drive. And whoever sells it to you probably knows it and tries to sell it correctly as a 64 GB (or maybe the original size is even different), after getting scammed maybe?

    Whatever the original story is, this drive looks fishy, acts fishy and is probably a fish. I don't know how much you spend on this, but I would not use it, throw it away. Please don't give or sell it to someone else, or keep it as an evidence. If possible, report the person who sold it to you.

  • I'm so ready for the upcoming benchmarks. Proton was using FSYNC (as I understand this is a workaround until NTSYNC was implemented) already, which means that NTSYNC will not make a huge difference here with most games. To be honest, I don't have deep understanding of this, that's why the benchmarks are important for me to get a "feeling" how the improvements will affect.

  • for a well-chosen microbenchmark

  • Vim.

  • I am surprised that there are not common Rust formatting rules enforced at config level. Every project can have rustfmt rules file, that overwrite defaults.

  • Can we not?

  • Well, there is a key difference of Ai compared to other technology: The ability to "think" and "decide" themselves. That's the point of the tech. The problem is, that people "think" that's true.

  • I actually think a new field of "real" programmers will emerge, in which they are specialized at looking for Ai problems. So companies using Ai and get rid of programmers, will start hiring programmers to get rid of Ai problems.

  • You can't be rich without poverty somewhere else

  • Billions of dollars are spent, unimaginable amount of power is used, ton of programmers are fired, million of millions code is copied without license and credit, nasty bugs and security issues are added due to trusting the ai system or being lazy. Was it worth it? Many programmers get disposable as they have to use ai. That means "all" programmers are the same and differ only in what model they use, at least that's the future if everyone is using ai from now on.

    Ai = productivity increases, quality decreases... oh wait, Ai = productivity seems to increase, quality does decrease

  • Combine both grep and tree commands:

     bash
        
    grep -rl "find" | tree --fromfile -F
    
      

    Edit: The rg example didn't work correclty. Not sure what I was testing. But looks like the grep variant works as intended. Please report if its not.

    Another Edit, because this is fun: A simple function for your .bashrc (functions are like alias, but allow more complex code, such as arguments):

     bash
        
    treegrep() {
        # grep:
        #   --recursive             like --directories=recurse
        #   --files-with-match      print only names of FILEs with selected lines
        # tree:
        #   --fromfile              Reads paths from files (.=stdin)
        #   -F                      Appends '/', '=', '*', '@', '|' or '>' as per ls -F.
        grep --recursive --files-with-match "${@}" |
            tree --fromfile -F
    }
    
      
  • Looking at the example code of Export Groups, I don't understand why a #[export] is needed, if there is already a #[export_group(...)] or #[export_subgroup(...)] . Its surely possible in Rust to automatically invoke #[export] if one of the group-macros are invoked, right?

  • Deleted

    Permanently Deleted

    Jump
  • BTRFS and EXT4 are suprior to Bcachefs anyway. And Vim is superior to Emacs too. I really don't lie.

  • I'm working on a commandline application in spirit of tools like grep and jq. It's to filter and edit RetroArch Playlist files in JSON format with file extension .lpl. The program is written in Rust and has many options and features that exceed the simple JSON parsing of jq in example.

    All of this is a learning process for me about the Rust language, JSON and RetroArch Playlist format and how the offline Ai tools and models on such low hardware stacks up in real world. I primarily used it to ask occasionally questions, such as what option name it would recommend, or what function description would be good, sometimes asked what it is thinking of a function implementation, or how to do a certain thing in Rust. I look at the code and its reasoning to understand it and if its an improvement. This was incredible helpful to me in learning more and even finding and eliminating bugs. Especially because I was 6 weeks offline and a few weeks after that period.

    I also used the Ai to write about 260 unit tests for functions. Off course I checked every single test, reworked it if necesseray. It helped me to find bugs, but also introduced nasty bugs. So using Ai is dangerous, especially beceause It solves problems you start trusting it more. This was an important lesson for me.

    I'm currently almost done and write the README and soon will be uploaded on Github and crates.io.