779 karma · joined September 15, 2018
[0]: https://en.wikipedia.org/wiki/Diaconescu%27s_theorem#:~:text....
Even in the worst cases, at least with my i7 NUC and using fd instead of find, it's less than 500ms to load the entire list into fzf.
I personally find that fzf is better because I can see where I'm going to end up before I accept the operation.
Despite the fact that some of the languages listed here have undecidable type systems, it doesn't feel like many common-purpose languages have purposefully gone down the undecidable route to bring some really cool type-safety.
Very cool!
a < b
can be greedily interpreted as a comparison, despite the next character being a > a [ b
can be greedily interpreted as accessing a field in a map, despite the next character being a ]It may be easier to branch in one of those cases instead of the other.
Not at all familiar with the potential issues (if any) in go, but this is from experience in writing a few languages.
The `curl | bash` install pattern means that it can do _anything_.
Using a package manager I know that the install will be "typical", and easy to uninstall (that's the case with most of the package managers that I use anyways). Each package manager has a different pattern, sure, but at least it will be predictable.
I'm actually listening to a TEALS meeting right now! Funny to see it on HN.
<name of function> <value1> <value2> <value3> ...
The absence/presence of parenthesis and commas don't add anything of semantic value here, so that's not really what I'm referring to.
The problem is, is that the values often don't have any meaning attached to them, especially when they are literals. C++ codebases are pretty bad about this with boolean parameters, just having a random `true` at the end of the function call.
Variable names at the call-site are good hints, but we often pass the same variable to different functions, and the name doesn't exactly fit the meaning of each function. This is why I think requiring named parameters, at least by default, is better.
// This is obviously not too right
",".splitBy("1,2,3,4,5")
// This should be right, because it reads out more naturally
"1,2,3,4,5".splitBy(",")
It's funny that in Python split works this way but join doesn't. This is because in the case of split both arguments are strings, but for join one of the arguments is a Sequence, which is a general protocol rather than a class.The proposed solution by Keli is to be inspired by the Smalltalk-style message syntax:
'Hello world' replace: 'Hello' with: 'Bye'
I think, in general, requiring named arguments is a good thing. Swift does it, and in codebases with a decent amount of TLC, it looks great.Function calls are one of the weird places were the syntax of the language rarely helps you figure out what is going on, and for the most part is just a sequence of human-written names one after another, and in languages with custom operators it could be even terser.
In comparison, if-statements, loops, pattern matching, etc. were (hopefully) designed to be expressive. I think by requiring named arguments, function calls will also be much more readable, relying less on an active human effort to do so.
I am comfortable reading both math and programming textbooks, but every finance book I've picked up so far seems to quickly not make any sense to me at all.
It's almost equivalent to being able to write directly on a textbook, however you can export your marked up document as a PDF.
Would you be surprised if it just disappears in a year or two, like Vine, Orkut, Myspace, and other "giants" of their day did? I personally wouldn't because these things just come and go. I think it's really hard to make the claim that "it's here to stay".
Also there's nothing wrong with doing both?
[0]: https://annals.math.princeton.edu/wp-content/uploads/annals-...