- April 25th, 2018: For Wednesday's #haskell problem we prove, definitively, @fermatslibrary n^5 is n ... for very small n. For Wednesday's #haskell solution we learn that number theory is so cool!
- April 24th, 2018: For Tuesday's #haskell problem we look for a fix-point of simplifying HTML. Good thing it's not NP-hard! ... no ... wait. Tuesday's #haskell solution is the fix-point for HTML. Just like the fix-point for factorial. Structurally, maybe, but otherwise, kinda not.
- April 23rd, 2018: What happens when things go wrong? We start to look at debugging for Monday's #haskell problem. For Monday's #haskell solution: the error is not here; the error is in another castle.
- April 20th, 2018: Friday's #haskell problem is to decode HTML entities from titles of articles. Friday's #haskell solution: deHTMLification: get
- April 18th, 2018: Hey! Let's store the raw JSON as a fall-back should our ETL process fail for Wednesday's #haskell problem. Wednesday's #Haskell solution: storing raw JSON in a SQL data store BECAUSE WE CAN!
- April 17th, 2018: For Tuesday's #haskell problem we upload articles from a different publisher of a compressed JSON archive with a different format. We find adding a differently-structured set of articles to IxArt store is simple for Tuesday's #haskell solution.
- April 16th, 2018: For Monday's #haskell problem, we take articles-as-json from various sources and put them into a common SQL data store. For Monday's #haskell solution we upload articles from different publications to a common SQL data store, both compressed and uncompressed archives.
- April 13th, 2018: Friday's #haskell problem is to grab packets of articles from a REST endpoint for later processing. Friday's #haskell solution: Those are some rather large packets downloaded from the REST endpoint!
- April 12th, 2018: Thursday's #haskell problem: auditing and logs. Thursday's #haskell solution is to wrap packet extraction and insertion in an ETL process.
- April 11th, 2018: Wednesday's #haskell problem: when we download packets of articles, let's record that event. Wednesday's #haskell solution: we're inserting packets into our new database.
- April 10th, 2018: Tuesday's #haskell problem: 🎵 "Does anybody know what time it is?" 🎶 (bonus: name that tune) Tuesday's #haskell solution: "Hey, Mister! You got the time?"
- April 9th, 2018: Monday's #haskell problem is to extract article tags from JSON then store them in a PostgreSQL lookup table. Monday's #haskell solution: Inserting tags for articles into a PostgreSQL database is a breeze!
- April 6th, 2018: Friday's #haskell problem is to parse categories-as-JSON, strip it down to its essentials, and store in a PostgreSQL data table. Friday's #haskell solution uploaded categories to a PostgreSQL databse after 'removing the stupid.' That's a technical term.
- April 5th, 2018: Thursday's #haskell problem is revising the database connector now that we're managing multiple databasen. Thursday #haskell solution is making connections to SQL databases configurable. Whoa. Edgy, tweeps! I'm really pressing the bleeding edge of technological advancement here with configurations and database connections.
- April 4th, 2018: Wednesday's #haskell problem is storing authors in a PostgreSQL table. Wednesday's #haskell solution shows that transferring authors from articles to a SQL database is as easy as 1, 2, 3!
- April 3rd, 2018: Tuesday's #haskell exercise: AUTHOR! AUTHOR! Is there an author in the house? Tuesday's #haskell solution: extracting author information from very unstructured data.
- April 2nd, 2018: Monday's #haskell problem is to explore JSON to find the structure in the data. Monday's #haskell solution: oooh! Pritteh JSON! But what's this weirdness with the author-identifier?
Thursday, May 3, 2018
Friday, April 13, 2018
- February 8th, 2018: We have maybe :: b -> (a -> b) -> Maybe a -> b. But we don't have list? Or do we? Define list:
list :: b -> ([a] -> b) -> [a] -> b
list nullanswer flist lst = undefined
- BONUS: Both Maybe a and [a] are binary types, ... so is MonadPlus:
Maybe a = Nothing | Just a
List a = Cons a (List a) | Nil
MonadPlus m => mzero | m a `mplus` m a
Is there some generalization that maybe and list are functions of? What is that generalization?
- February 6th, 2018:
You have f :: a -> [b] -> [c]
But instead of just one a you have [a]
Define g :: [a] -> [b] -> [c]
in terms of f
- Daniel @leptonyu g as bs = foldl (\xs a -> f a bs ++ xs)  as
- ptdr_bot @m0rth0n g as bs = flip f bs =<< as
- Victoria C @ToriconPrime g as bs = concat $ fmap ($ bs) (fmap f as)
- matt @themattchan g = flip $ concatMap . flip f
- Nicoλas @BeRewt g = flip (flip (>>=) . flip f) Or: g as bs = as >>= flip f bs
- Sangeet Kar @sangeet_kar g = foldMap f
Monday, April 2, 2018
- March 14th, 2018: Wednesday #haskell problem I am thinking about sumaSumasCuadradosDivisores from the Haskell community via @Jose_A_Alonso
- March 12th, 2018: Monday's #haskell problem is Improving Tarski's logic language with curried functions.
- March 8th, 2018: For Thursday's #haskell problem, thanks to @wtfunctional, we'll play with Other People's Code! ... and Mandelbrot sets.
- March 6th, 2018: Tuesday's #haskell exercise asks the eternal question: "Are you my mom?"... and also looks at curried functions in a logic framework... which is nice. Last Tuesday's #haskell solution ended in pathos: I know 'momOf', but I cannot answer, 'are you my mom?' Can you not feel the sads?
- March 5th, 2018: Monday's #haskell problem is a little "Introduction to Logic" by Tarski to start our week of right. I went a little 'forall' in the #haskell solution today. Sorry. #notsorry
Thursday, March 1, 2018
Tuesday, February 6, 2018
Wednesday, January 31, 2018
- January 30th, 2018: For Tuesday's #haskell problem we look at triaging articles downloaded from a REST endpoint against our PostgreSQL database. Who knew putting things into three bins could be so much fun? Today's #haskell solution triages work for us.
- January 29th, 2018: Monday's #haskell problem is to fetch when the last set of articles were stored; two approaches. Monday's #haskell solution: two approaches to extract 'last entry' from the database, wanted; two approaches to extract 'last entry' from the database, GOT!
- January 26th, 2018: Friday's #haskell problem is to pull a week's worth of data from a REST endpoint when we don't know a priori how many calls we have to make. Friday's #haskell solution fetches then reads/parses blocks of articles from a REST endpoint.
- January 24th, 2018: Wednesday's #haskell problem is solving three more #Prolog-y list problems from P99: pack / encode / decode. It's great when #haskell has grouping / 'un'grouping functions in the library already.
- January 23rd, 2018: Tuesday's #haskell problem: groups and grouper ... I like grouper blackened, please! Solving today's #haskell problem with Qubits?!? Nah, not really, but that would be cool if we did!
- January 22nd, 2018: Monday's #haskell problem is a problem from P99: problem P21, list insertion. Monday's #haskell solution is inserting an element into a list, PROLOG-STYLE!
- January 18th, 2018: The whole enchilada! Today's #haskell problem ties it all together to make an ETL. Today's #haskell solution defines etl: Looping over calls to the REST endpoint then database insertions.
- January 17th, 2018: For today's #haskell problem we use PostgreSQL data store and Haskell to pick up where we left off on an application run. Today's #haskell solution: the audit log has what our program last did, so now we know what we'll work on next!
- January 16th, 2018: Where did yesterday's Haskell problem go? Here it is! Today's #haskell problem: read a packet from a REST endpoint. Today's #haskell solution accesses a REST endpoint with a set timeout and with the default timeout.
- January 15th, 2018: "Logging? Why do we have to log stuff?" Enterprise applications require audit trails. Today's #haskell problem provides one. What did your Haskell app do and when? Today's #haskell solution: an audit log.
- January 11th, 2018: Thursday's #haskell problem: pulling SQL lookup tables into Haskell. Thursday's #haskell solution: with the help of IxValues we extract lookup table values from SQL into Haskell Maps.
- January 10th, 2018: Wednesday's #haskell exercise is to store the packet information into the PostgreSQL database as a part of auditing the ETL process. Wednesday's #haskell solution stores the packets that wrap article sets then logs our results.
- January 9th, 2018: Tuesday's #haskell problem we are logging log messages to the log data table. YES! Tuesday's #haskell solution: logging in the style of log4j.
- January 8th, 2018: Monday's #haskell problem: once more into the breach, and thoughts on generalization – storing unique newspaper article sections in PostgreSQL. We store article section information, then we build a function that stores ANYTHING! ... and washes windows, TOO! *
- January 5th, 2018: Friday's #haskell problem takes a break from SQL Databases and Haskell and does something completely different: data schemes and Haskell. AHA! Friday's #haskell solution is a graph-view of the sections for a sample of 100 articles.
- January 4th, 2018: Thursday's #haskell problem looks at storing in PostgreSQL authors of periodic articles uniquely identified by uuid. Thursday #haskell solution uses etl function with generators to store parsed authors in PostgreSQL database.
- January 3rd, 2018: Wednesday's #haskell problem is in honor of Baron Munchausen and his fantastic adventures!
- January 2nd, 2018: WELCOME TO THE NEW YEAR, HASKELLERS!
Tuesday's #haskell problem leverages keywords-as-subjects and makes storing article keywords into PostgreSQL easier... we hope. Tuesday's #haskell solution Incorporates prior work with memoizing tables and subjects with results.
Friday, January 5, 2018
- December 29th, 2017:
given f :: Monad m => n -> a -> m (Maybe b)
define g :: Monad m => n -> a -> m (a, Maybe b)
using f and ... arrows? Kleisli category?
- Bazzargh @bazzargh (\n a->liftM ((,) a) (f n a)) ... according to pointfree.io, that's `liftM2 fmap (,) . f` but I can't pretend to get the transformation
- December 29th, 2017:
given f :: a -> b
define g :: [a] -> [Maybe c] -> [(b, c)]
>>> g [1,2,3] [Just 7, Nothing, Just 10]
when f = show
- matt @themattchan
g = catMaybes ... zipWith (fmap . (,) . f)
where (...) = (.).(.)
- garrison @GarrisonLJ g a b = map (f.id***fromJust) . filter (isJust . snd) $ zip a b
- TJ Takei @karoyakani g = (catMaybes .) . zipWith ((<$>) . (,) . f)
- December 29th, 2017: define f :: [(a,b)] -> ([a], [b])
- Андреев Кирилл @nonaem00 and matt @themattchan unzip
- Victoria C @ToriconPrime f = fmap fst &&& fmap snd
- (in a vacuum, a more general type signature would be inferred, but the compiler limits itself as instruct)