Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bradrn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
52 ms
·
631.
▲
by
bradrn
5y ago
Not at all. There’s sensible implementations which aren’t like that. (You might as well say that (>>=) is just function application proceeded by ‘unwrap’.) My favourite example is cellular automata: if you have a data structure contai
632.
▲
by
bradrn
5y ago
> I get how Maybe types can be useful for parsing something or doing IO but once you get your Maybe value, wouldn't be the first action to unwrap it? If it is Nothing you can either provide a default value or just stop right there.
633.
▲
by
bradrn
5y ago
Personally I like the approach of Haskell: no overloading of any functions whatsoever (except in a restricted way through typeclasses), but you can define new operators yourself. That allows the certainty which comes with the absence of ove
634.
▲
by
bradrn
5y ago
It gets worse — technically speaking, your second ‘WebDataStatus’ is also a sum type! Admittedly most non-functional programmers would call it an enumeration, but nonetheless, a language without support for any sum types at all would also n
635.
▲
by
bradrn
5y ago
I’d say it sounds more like prosopagnosia.
636.
▲
by
bradrn
5y ago
I first heard of this idea from Terry Pratchett, who as well as explaining the problem gave a possible solution: > Shortly before the Patrician came to power there was a terrible plague of rats. The city council countered it by offering
637.
▲
by
bradrn
5y ago
If you’re willing to take input on stdin, you can rewrite it without >>=: main = interact number where number = lines . zipWith addNumber [0..] . unlines addNumber n l = show n ++ " " ++ l My p
638.
▲
by
bradrn
5y ago
Similar notation is standard in linguistics (and probably other fields too): https://en.wikipedia.org/wiki/Kinship_terminology#Abbreviati... . e.g. ‘Maternal grandmother's son's daughter’ would be MMSD.
639.
▲
by
bradrn
5y ago
> Some people say that they think something is wrong with object-oriented programming, but can any alternative that is so hard to explain be better? Personally, I think that OOP has the opposite program. Abstractions such as classes, enc
640.
▲
by
bradrn
5y ago
Sorry, nope. I didn’t bother proving correctness for such a small toy example. (Besides, I wouldn’t know how.)
641.
▲
by
bradrn
5y ago
> print out a haiku while numbering the lines. Little need for monads to do this: main = readFile "haiku.txt" >>= putStrLn . number where number = lines . zipWith addNumber [0..] . unlines addN
642.
▲
by
bradrn
5y ago
Completely agreed. The only way to learn about monads is to (a) see them being used in examples and (b) use them yourself — exactly like every other concept in programming. Just seeing an abstract explanation is not nearly enough.
643.
▲
by
bradrn
5y ago
> In seriousness, there's a lot that goes into appreciating a concept like a monad, especially if you want to combine the FP understanding with a rigorous mathematical understanding Unfortunately, I think this is what tends to scare
644.
▲
by
bradrn
5y ago
What evidence is this? I’d appreciate a source, given that I’ve never, ever, heard this theory before. Generally, theories about Korean connect it to either Japonic or Altaic, both of which are controversial; meanwhile theories about Dravid
645.
▲
by
bradrn
5y ago
These days the preferred model seems to be the wave model [ https://en.wikipedia.org/wiki/Wave_model ], which is exactly as you describe: changes diffuse out from a central area, and different places receive different ch
646.
▲
by
bradrn
5y ago
They mean completely different things: > depreciate . to reduce the purchasing value of (money) > deprecate . Computers. to cease supporting or recommending the use of (older elements, features, or versions of software) (Source: d
647.
▲
by
bradrn
5y ago
As an Australian, I should note that the reason positive cases were in the low hundreds — actually, low tens most of the time — was precisely because of the lockdowns. Once people stopped obeying the lockdowns, positive cases started risi
648.
▲
by
bradrn
5y ago
> Try having a calm and balanced discussion with an Australian about bicycle helmet laws for a wonderful example. As an Australian I’d be curious to know what the argument against them is? (Keeping in mind that most Australians don’t see
649.
▲
Abacus: Mystery of the Beat [Soroban Tutorial]
(totton.idirect.com)
1 points
by
bradrn
5y ago
|
0 comments
650.
▲
by
bradrn
5y ago
This basically sounds like Scott Alexander’s ‘thrive—survive’ distinction: https://slatestarcodex.com/2013/03/04/a-thrivesurvive-theory...
651.
▲
by
bradrn
5y ago
I enjoyed Measurement [0]. I was unsurprised when I eventually learnt that its author had previously written Lockhart’s Lament [1]. [0] https://www.hup.harvard.edu/catalog.php?content=reviews&isbn... [1] https:
652.
▲
by
bradrn
5y ago
Or possibly ‘nearby in our universe’.
653.
▲
by
bradrn
5y ago
What’s wrong with Dart? (Don’t know anything about the language, just curious.)
654.
▲
by
bradrn
5y ago
But English clicks are not phonemic consonants in the same way they are in Xhosa and Khoekhoe — that is, clicks are not part of words in English, whereas they are in those languages. (Even the language name Xhosa begins with a click.)
655.
▲
by
bradrn
5y ago
Yep, this is a really interesting question. I had a long discussion about this on another forum, and it turns out linguists really have no idea why clicks are restricted to African languages. The best we could come up with was that click so
656.
▲
by
bradrn
5y ago
You’re welcome! I first saw it on the Wikipedia page for Shona, which has several whistled consonants within its inventory.
657.
▲
by
bradrn
5y ago
> when you think of a word in English, even if you don't vocalize, some of your vocal cords become tense or move Oddly enough, I haven’t ever perceived this, but I can consciously trigger it, and I do think I understand what you m
658.
▲
by
bradrn
5y ago
> TS which can parametrize on meta-types and integers (C++98, Haskell afaik) Haskell also supports type-level strings and type errors, as well as arbitrary ADTs if defined with the -XDataKinds extension enabled. Not sure what you mean by
659.
▲
by
bradrn
5y ago
Apparently that sort of whistling is also used for communication, at least if Wikipedia is to be believed [0] (or if I could track down the source, which I don’t feel like doing just right now): > Sochiapam Chinantec has three different
660.
▲
by
bradrn
5y ago
Interesting! Spanish isn’t a tonal language, so how do you ‘translate’ the words into whistles? (And do you think you could do it without subtitles?) (I should note I haven’t actually managed to watch the video yet, because my audio seems t
More ›