• 0 Posts
  • 43 Comments
Joined 1 年前
cake
Cake day: 2023年6月19日

help-circle

  • As the first AI-based mutation testing tool, Mutahunter surpasses traditional “dumb” AST-based methods. Our AI-driven approach provides a full contextual understanding of the entire codebase,

    This is where I call bullshit. The AST is a precise representation of the code which should be easier to analyse and modify instead of the raw text. If you only rely on processing the text I have a hard time believing your AI has a deep understanding of the contextual interdependencies of the different parts of the code.

    Edit: it kinda does use the AST if one of the preconditions is a treesitter grammar? Maybe the marketing wording is just very unfortunate?





  • Killing_Spark@feddit.detoProgrammer Humor@lemmy.mlgot him
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 个月前

    This point advocates against the use of mod with content in a file unless it is used for a testing module. A common pattern is to have the unit tests for a module inside the main module file. Tests in rust are just specially tagged functions. To avoid compilation costs in non-test builds and false unused code warnings you can put all test related code in a submodule and tag that module with #[cfg(test)]. That way the module will only be included and compiled if the crate is being compiled to run tests.

    The Star wars thing refers to scrolling long text files similar to the intro of the starwars movies where a long text is scrolled for the viewer.


  • mod name declares that the module should be compiled and reachable as a submodule of the current module. This assumes that you have a file or directory of the name in the right place. This is what you should do.

    You can also declare a module like this: mod name {...} where you just put the content in the block. The two are functionally equivalent, from the compilers perspective.








  • “im” is often used as an abbreviation of “in dem” which is the direct translation of “in the/this” but it is also used as an abbreviation of “in einem” which directly translates to “in a” and somtimes “im” is just translated as “in”

    Let’s take “Der Saft ist im Glas” as an example.

    If you are trying to say that it is in a specific glass that you could point to, you would use “in dem”. If you are just talking about the general method of storing juice you would either use “im” or to be more precise “in einem”. Using “in einem” tells you that it is in a glass but the actual glass isn’t really specified or relevant right now.

    “Der Saft ist in einem Glas” is basically the same as “Der Saft ist im Glas”. But it is very different from “Der Saft ist in dem Glas” which is also basically the same as “Der Saft ist im Glas”.

    To translate these:

    “Der Saft ist in einem Glas” => “The juice is in a glass”
    “Der Saft ist in dem Glas” => “The juice is in the/this glass”
    “Der Saft ist im Glas” => “The juice is in the/this glass” or “The juice is in a glass”

    As a bonus:

    “Das passiert im echten Leben” => “That’s happening in real life”

    Always fun to think about the weirdness of my mother tongue :)

    Edit: These abbreviations are mostly used when the context already makes it clear which it is going to mean. Otherwise they are just confusing.