34 Matching Annotations
  1. Nov 2022
    1. Changing the second line to: foo.txt text !diff would restore the default unset-ness for diff, while: foo.txt text diff will force diff to be set (both will presumably result in a diff, since Git has presumably not previously been detecting foo.txt as binary).

      comments for tag: undefined vs. null: Technically this is undefined (unset, !diff) vs. true (diff), but it's similar enough that don't need a separate tag just for that.

      annotation meta: may need new tag: undefined/unset vs. null/set

    1. Unspecified No pattern matches the path, and nothing says if the path has or does not have the attribute, the attribute for the path is said to be Unspecified.
    2. Unset The path has the attribute with special value "false"; this is specified by listing the name of the attribute prefixed with a dash - in the attribute list.
  2. Sep 2022
    1. Otherwise behaves according to the value of null_value_treatment which must be one of 'raise_exception', 'use_json_null', 'delete_key', or 'return_target'. The default is 'use_json_null'.
  3. Apr 2022
    1. 4.3.9 undefined value primitive value used when a variable has not been assigned a value 4.3.11 null value primitive value that represents the intentional absence of any object value
  4. Feb 2022
  5. Dec 2021
    1. How do I format files on save? See the following snippet: require("null-ls").setup({ -- you can reuse a shared lspconfig on_attach callback here on_attach = function(client) if client.resolved_capabilities.document_formatting then vim.cmd("autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()") end end, })

      [[null-lsで保存時に自動フォーマットする]]

    1. これは Prettier の設定例です。あらかじめグローバルにprettierをインストールしておく必要があります。 init.lua use { "jose-elias-alvarez/null-ls.nvim", requires = { "nvim-lua/plenary.nvim" } } local nullls = require "null-ls" nullls.config { sources = { nullls.builtins.formatting.prettier, }, } require("lspconfig")["null-ls"].setup {}
    2. neovim でフォーマッタを動かす方法はいろいろありますが、ここではnull-lsを紹介します。 これは様々なツールの出力を LSP の形式に変換して nvim-lsp に送るという仕組みになっています。似たようなツールにdiagnostic-languageserverやefm-langserverがありますが、null-lsはあくまで neovim のプラグインなので外部依存がないことが利点です。
  6. Nov 2021
  7. Sep 2021
  8. Aug 2021
  9. Jul 2021
    1. Prof Nichola Raihani on Twitter: “Submitted a paper reporting null results to a mid tier journal. Guess how it went. I literally don’t care at this point but I do feel bad for the first author (who I won’t name here). Https://t.co/sX5lTcEl29” / Twitter. (n.d.). Retrieved July 16, 2021, from https://twitter.com/nicholaraihani/status/1415308025179656194

  10. Jun 2021
  11. Mar 2021
    1. // WRONG ❌ - values.myField might be undefined! if (!values.myField.match(/myexpression/)) {
    2. If you are doing a regular expression check, your function should handle undefined as a potential value.
  12. Feb 2021
    1. There are times where it is useful to know whether a value was passed to run or the result of a filter default. In particular, it is useful when nil is an acceptable value.

      Yes! An illustration in ruby:

      main > h = {key_with_nil_value: nil}
      => {:key_with_nil_value=>nil}
      
      main > h[:key_with_nil_value]
      => nil
      
      main > h[:missing_key]  # this would be undefined in JavaScript (a useful distinction) rather than null, but in Ruby it's indistinguishable from the case where a nil value was actually explicitly _supplied_ by the caller/user
      => nil
      
      # so we have to check for "missingness" ("undefinedness"?) differently in Ruby
      
      main > h.key?(:key_with_nil_value)
      => true
      
      main > h.key?(:missing_key)
      => false
      

      This is one unfortunate side effect of Ruby having only nil and no built-in way to distinguish between null and undefined like in JavaScript.

  13. Sep 2020
  14. Aug 2020
    1. That's exactly why I use xargs -0 in conjunction with find -print0. The latter prints filenames with a NUL terminator and the former receives files that way. Why? Filenames in Unix can contain newline characters. But they cannot contain NUL characters.
  15. Mar 2020
    1. . However, the data did not support a meresimilarity effect: Our results were robust to controlling for partic-ipants’ own moral judgments, such that participants who made adeontological judgment (the majority) strongly preferred a deon-tological agent, whereas participants who made a consequentialistjudgment (the minority) showed no preference between the two

      But this is a lack of a result in the context of a critical underlying assumption. Yes, the results were 'robust', but could we really be statistically confident that this was not driving the outcome? How tight are the error bounds?

  16. Nov 2019
    1. Null Components should never have children - they'd never be rendered.
    2. Aligning closely with the <Injector_ > naming convention, Null Components are denoted with a prefix and postfix _ (e.g. <_NullComponent_ />).
    3. The idea is that the additional prefix _ of a Null Component symbolizes that it adds even less to the DOM than an Injector. I picture the name falling through to become just the _, like the unused argument convention in javascript functions: const handleEvent = (_, id) => { console.log(id) } .
  17. Oct 2019
  18. Aug 2019
  19. Jun 2018