Parser in a tweet:
import Control.Monad.State
import Control.Applicative
import Data.List
data T = T [T] deriving Show
ch c = mfilter (== c) $ StateT uncons
parens = T <$ ch '(' <*> many parens <* ch ')'
parse = runStateT
-- $> parse parens "(()())"
-- Just (T [T [],T []],"")
@dascryto@AraquelBloss@WhiteHouse@nytimes@ChrisVanHollen i dunno, i think following the constitution is kinda important. none of the things you say have been proven in a court of law. if you can send people to a concentration camp in a foreign country without even having a hearing first, you’re no longer a free country
@brokenwing2005@marek_zyskowski@ABC i mean, at latest parts of it is possible (as evidenced by this video). just because most of it is made up doesn’t mean that there aren’t some parts that were inspired by true events, but heavily exaggerated to make a better story
@sam_of_hosseini @traskjd@GergelyOrosz you’re no doubt already aware of this, but keep in mind that the very existence of AI text generation makes marketing through blog posts way more difficult, as people will be way more skeptical of anything they see. but yes, the “actually helps” part seems like a good antidote
@Wenitte1 people who enjoy mathematics do. i find it really nice to be able to mathematically reason about my code, which also helps increasing my confidence in its correctness, especially if i can encode some properties so the compiler can verify them
@ChShersh i think the reason many prefer OOP patterns is that they inherently describe their purpose and the problem they are meant to solve, while CT patterns just dryly describe the what and not the when or why.
the builder pattern tells us when and why to use it, while monoid doesn’t
@TaylorAllred8@ChShersh they literally have mathematically precise rigorous definitions. that’s the exact opposite of vague. i’d get off your complaint was that they were too abstract or too generic though
@effectfully@thomascortese_ it is _a_ valid definition. not saying it’s the only one. sure it depends on a lot of other parts of the theory, but it’s still a definition
@effectfully@ThePrimeagen premature abstraction is the root of all evil
well done abstraction is great, but more often than not it is more of an obfuscation layer that just makes it more difficult to figure out what is actually happening