- Sep 2024
-
github.com github.com
-
false is a perfectly non-nil object, and you're excluding it out of convenience!
-
- Jan 2024
-
andymaleh.blogspot.com andymaleh.blogspot.com
-
Glimmer DSL for Web intuitively supports both Unidirectional (One-Way) Data-Binding via the <= operator and Bidirectional (Two-Way) Data-Binding via the <=> operator,
-
- Dec 2022
-
www.w3schools.com www.w3schools.com
-
Shift Assignment Operators
can't understand
Tags
Annotators
URL
-
- Nov 2022
-
stackoverflow.com stackoverflow.com
-
That's an important remark. find /path/to/ -iname '*.gif' -o -iname '*.jpg' -print0 will only print the jpg files! You need brackets here: find /path/to/ \( -iname '*.gif' -o -iname '*.jpg' \) -print0
-
- Apr 2022
-
www.postgresql.org www.postgresql.org
-
This latter equivalence does not hold exactly when more than two tables appear, because JOIN binds more tightly than comma. For example FROM T1 CROSS JOIN T2 INNER JOIN T3 ON condition is not the same as FROM T1, T2 INNER JOIN T3 ON condition because the condition can reference T1 in the first case but not the second.
-
-
stackoverflow.com stackoverflow.com
-
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.
-
- Jan 2022
-
github.com github.com
-
Svelte currently consistently gives the reactive statement priority over your checked binding.
-
- Oct 2021
-
www.deeplearningbook.org www.deeplearningbook.org
-
Writing an expression in terms of the trace operator opens up opportunities tomanipulate the expression using many useful identities.
What does writing an expression using trace operator open up to?
-
the traceoperator is invariant to the transpose operator:
What is the trace operator invariant for?
-
- Jun 2021
- Feb 2021
-
dry-rb.org dry-rb.org
-
In other words, once you've used Maybe you cannot hit nil with a missing method. This is remarkable because even &. doesn't save you from omitting || "No state" at the end of the computation. Basically, that's what they call "Type Safety".
-
Another solution is using the Safe Navigation Operator &. introduced in Ruby 2.3 which is a bit better because this is a language feature rather than an opinionated runtime environment pollution
Tags
- don't modify objects you don’t own (monkey patching)
- optional chaining/safe navigation operator
- monad: Maybe
- remarkable
- type safety
- programming languages: features
- make it impossible to get wrong/incorrect
- opinionated
- polluting the global scope/environment
- good explanation
- good point
- reuse existing language constructs
Annotators
URL
-
-
css-tricks.com css-tricks.com
-
Because of the way the CSS “or” operator works, I wouldn’t be able to mix the retina conditions with other expressions since a (b or c) would be compiled into (a or b) c and not a b or a c.
-
- Jan 2021
-
github.com github.com
-
You should default to the most permissive option imo and there really is no reason to check anything until you really need to If it were left to me I'd just use optional chaining, as it also eliminates the need for no-ops
(lazy checking)
-
- Nov 2020
-
wresch.github.io wresch.github.io
-
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 eithera
orb
is false).I think they just mean, in this case:
bedmap && mv || fail
if
mv
fails, thenfail
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.
-
-
mywiki.wooledge.org mywiki.wooledge.org
-
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
-
-
stackoverflow.com stackoverflow.com
-
I just learned here that || and && have equal precedence in bash (different from C, Java, etc.)
-
-
imfeld.dev imfeld.dev
-
Directives like ng-if="info.report.revenue" sort of work in Angular if info.report is undefined, in that the ng-if becomes false. But the Svelte equivalent {#if info.report.revenue} throws an error. For now we're using lodash get in places where we need to and looking forward to Svelte support for optional chaining.
-
- Sep 2020
-
stackoverflow.com stackoverflow.com
-
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.
-
-
github.com github.com
-
handle?.destroy?.()
-
- Jul 2020
-
twitter.com twitter.com
-
I don't think this is a good overload of 'subtraction'1Olivier Lacan@olivierlacan·Jan 14, 2019Yup. I don’t either.
-
- May 2020
-
docs.gitlab.com docs.gitlab.com
-
To conjoin if, changes, and exists clauses with an AND, use them in the same rule.
-
-
en.wikipedia.org en.wikipedia.org
-
For convenience, conventions have been developed about the precedence of the logical operators, to avoid the need to write parentheses in some cases. These rules are similar to the order of operations in arithmetic. A common convention is:
-
-
en.wikipedia.org en.wikipedia.org
- Oct 2019
-
devblogs.microsoft.com devblogs.microsoft.com
-
Nullish Coalescing
-
TypeScript 3.7 implements one of the most highly-demanded ECMAScript features yet: optional chaining
-
- Sep 2019
-
tom-jaeschke.blogspot.com tom-jaeschke.blogspot.com
- Aug 2019
-
github.com github.com
-
Null Coalescing Operator
-
- Jan 2016
-
www.ecfr.gov www.ecfr.gov
-
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"
Tags
Annotators
URL
-
- Dec 2015
-
www.ecfr.gov www.ecfr.gov
-
The software must prevent the user
This, however, changes the discussion to make the user or operator, rather than a third party, unable to operate the router outside of the legal limits.
-
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.
-
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
Tags
Annotators
URL
-