Just added a PR for the spermy operator (~>).
Here's the response: Hi Christian, thanks for the Pull Request! But I think this is not appropriate rubygems/rubygems#124. :bow:
11–20 of 69 posts
Just added a PR for the spermy operator (~>).
Here's the response: Hi Christian, thanks for the Pull Request! But I think this is not appropriate rubygems/rubygems#124. :bow:
(For full disclosure, the lens library is infamous for this.)
'!!' -> "truthy?"
Truthy is something that isn't exactly a true boolean but will equate to true(thy) when evaluated with this type of comparison. Things like undefined, null, and empty string will not be truthy.
More info on what's truthy (for JavaScript at least) is here http://james.padolsey.com/javascript/truthy-falsey/
edit: typically, if you want to test for truthy, you'll just evaluate it like so
if (my_object) { //truthy }else{ //not truthy }
Does anyone know a time when you'd use !! instead of just the object in the evaluation? I'm not a Ruby dev, so I don't know specific cases for needing !!
Cigarette operator! This list is on fire.
'!!' -> "truthy?"
! -> "not truthy". So !! means "not 'not truthy'" which is truthy. Truthy is something that isn't exactly a true boolean but will equate to true(thy) when evaluated with this type of comparison. Things like undefined, null, and empty string will not be truthy. More info on what's truthy (for JavaScript at least) is here http://james.padolsey.com/javascript/truthy-falsey/ edit: typically, if you want to test for truth…
Wish I worked with a language with a === operator so I could say "threequals". Very clever and fitting.
Say what you will about us, but Ruby people get to have the most fun. hops on hipster hashrocket and tribbles off into the sunset
'!!' -> "truthy?"
http://search.cpan.org/dist/perlsecret/lib/perlsecret.pod#SY...
A select few operators (out of hundreds) for a single Haskell library: https://github.com/ekmett/lens/wiki/Operators (For full disclosure, the lens library is infamous for this.)
[0]: http://ekmett.github.io/lens/src/Control-Lens-Combinators.ht...