35 Matching Annotations
  1. Sep 2024
  2. Jan 2024
  3. Dec 2022
  4. Nov 2022
  5. Apr 2022
    1. Caution: + continues the statement but not the string. puts "foo"+"bar".upcase gives you fooBAR, whereas puts ("foo"+"bar").upcase gives you FOOBAR. (Whether or not there's a newline after the +.) But: if you use a backslash instead of the plus sign, it will always give you FOOBAR, because combining lines into one statement, and then combining successive strings into one string, happen before the string method gets called.
  6. Jan 2022
  7. Oct 2021
  8. Jun 2021
  9. Feb 2021
  10. Jan 2021
  11. Nov 2020
    1. Important caveat: in the combined expression, if the middle command has a non-zero exit status, then both the middle and the rightmost command end up getting executed.

      I don't think that is surprising, is it? Since && and || have the same order of precedence. So I think this is more of a clarification than a caveat.

      I think this is just because:

      a && b || c is equivalent to: (a && b) || c (so of course c gets evaluated if (a && b) is false (that if either a or b is false).

      I think they just mean, in this case:

      bedmap && mv || fail
      

      if mv fails, then fail still gets executed.

      Easier to see with a simpler example:

      ⟫ true && false || echo 'fail'
      fail
      
      ⟫ false && true || echo 'fail'
      fail
      

      Better example/explanation here: https://hyp.is/-foxmCVXEeuhnLM-le_R4w/mywiki.wooledge.org/BashPitfalls

      The caveat/mistake here is if you treat it / think that it is equivalent to if a then b else c. That is not the case if b has any chance of failing.

    1. What's not obvious here is how the quotes nest. A C programmer reading this would expect the first and second double-quotes to be grouped together; and then the third and fourth. But that's not the case in Bash. Bash treats the double-quotes inside the command substitution as one pair, and the double-quotes outside the substitution as another pair.

      subshell > quotes

  12. Sep 2020
    1. By default, npx will check whether <command> exists in $PATH, or in the local project binaries, and execute that. Calling npx <command> when <command> isn't already in your $PATH will automatically install a package with that name from the NPM registry for you, and invoke it. When it's done, the installed package won’t be anywhere in your globals, so you won’t have to worry about pollution in the long-term. You can prevent this behaviour by providing --no-install option.
  13. Jul 2020
  14. May 2020
  15. Oct 2019
  16. Sep 2019
  17. Aug 2019
  18. Jan 2016
    1. Since the operators of part 15 devices are required to cease operation should harmful interference occur to authorized users of the radio frequency spectrum,

      Mention of the operator's duty to prevent interference.

      Language is usually "operator", occasionally "owner or operator"

  19. Dec 2015
    1. The operator of the U-NII device, or if the equipment is professionally installed, the installer, is responsible for ensuring

      A typical example of FCC language assigning responsibility to the operator or their agent.

    2. The instruction manual furnished with the intentional radiator shall contain language in the installation instructions informing the operator and the installer of this responsibility.

      Language re mitigation that should be required of router vendors