Tuesday, December 1, 2015

November 2015 1HaskellADay One-liners

  • November 3rd, 2015:
Why is 'a' the standard label for type-variables? If you don't care what the type is, shouldn't the type be 'eh'? #imponderables
  • November 3rd, 2015:
{-# LANGUAGE OverloadedStrings #-}import Network.HTTPtype URL = StringrespBodyAsText :: URL -> IO Stringdefine respBodyAsTextrespBodyAsText url = simpleHTTP (getRequest url) >>= getResponseBody
  • November 2nd, 2015: 
You have f :: a -> IO b, g :: b -> IO (), h :: b -> IO AnsYou wish to sequence f, g, h as j :: a -> IO AnsDefine j points-freeDimitri Sabadie @phaazon_ fmap snd . runKleisli (Kleisli g &&& Kleisli h) . f

November 2015 1HaskellADay Problems and Solutions

November 2015

  • November 30th, 2015: Pride and Prejudice on the command-line? No. Today's #haskell problem: read in a stream http://lpaste.net/7832470045098770432 The solution defines a new Kleisli arrow. http://lpaste.net/4713907846389956608 ... AND Jane Austen prefers the pronouns SHE and HER. So there's that.
  • November 27th, 2015: Simply getting the command-line arguments for #BlackFriday #haskell problem http://lpaste.net/131531689812819968 ...and then there's that bonus. OH NOES! 'Simple' solution, am I right? http://lpaste.net/1418503822422048768
  • November 26th, 2015: A little worker-pool in #haskell wishes you Happy Thanksgiving from the #USA or today's problem: Erlangesque-Haskellhttp://lpaste.net/2732286163095126016 And today, a #haskell solution says ('sez') "Go get'm Black Friday dealz, yo!" http://lpaste.net/7453476641931526144 (but: caveat emptor!)
  • November 25th, 2015: Today's #haskell problem has a Secret Decoder Ring! http://lpaste.net/317245813698854912 ... as long as you use the HaHaJK-type. BREAKING: SHA1-HASH DECODED using #haskell! http://lpaste.net/7305841715271696384 Reported here first show my bonnie lies over BOTH the ocean AND the sea!
  • November 24th, 2015: For today's #haskell problem we look at parsing URI ... not Andropov https://en.wikipedia.org/wiki/Yuri_Andropov ... not today. http://lpaste.net/3031598688741883904 Today's #haskell URI-parsing exercise makes Yuri (Andropov) SAD and MAD ... Don't worry, Yuri: URIs are just a FADhttp://lpaste.net/8338275656215298048
  • November 23rd, 2015: For today's #haskell problem we ride West on ol' Silver declaiming: "JSON! Ho!" http://lpaste.net/7278810874737852416 And the solution allows us to look at JSON and declaim: HA! http://lpaste.net/2880528191972179968
  • November 20th, 2015: Today's #haskell problem comes with honorable mentions and stuff! http://lpaste.net/7575693578471473152 ♫ My heart...beats...fasta!
     
    ... AAANNNNNDDDDD our solution, down to 4.6 seconds from 151 seconds. http://lpaste.net/2479927048856928256 Not a bad start!
  • November 19th, 2015: In today's #haskell problem we say: '@geophf your RID-analyzer is SO efficient!' http://lpaste.net/6802158616863309824 ... NOT! Update: today geophf cries Efficienc-me? No! Efficienc-you! http://lpaste.net/7547436765292789760
  • November 18th, 2015: Today JSON and the Argonauts sail off into the high seas of the RID to adventures beyond the Thunderdome! http://lpaste.net/7016479864345591808 No...wait.
  • November 17th, 2015: Today's #haskell problem generates a report with no title... o! the irony! http://lpaste.net/4139233297970495488 The solution shows Jane Austen getting her Aggro on ... even if just a little bit http://lpaste.net/8111201736003158016 
  • November 16th, 2015: New Regressive Imagery Dictionary/RID(-structure)? That means New-NEW JSON for today's #Haskell problem http://lpaste.net/40452467304955904 And there is the RID, in all its JSON-iferific glory! http://lpaste.net/262135232898007040
  • November 13th, 2015: Today's #haskell problem–Project RIDenberg–classifies a big-ole document with FULL! ON! RID! http://lpaste.net/2340251327956779008 (exclamation mandatory) Today's solution shows us that the RID is as fascinating as ... well: Mr. Wickham. http://lpaste.net/5788646192996941824 (There. I said it.)
  • November 11th, 2015: Today's #haskell problem goes the Full Monty... NO! WAIT! NOT 'MONTY'! WE GO FULL RID! (Regressive Imagery Dictionary) http://lpaste.net/2598821222603030528 ... annnnnndddd this #haskell solution gives us the full RID as a graph http://lpaste.net/3885537396636254208 
  • November 10th, 2015: For today's #haskell problem we look at parsing a (small) document and matching it to a (small) RID http://lpaste.net/237534433320632320 QWERTY-style! Our solution (also) answers that age-old nagging question: "What DOES the fox say?" http://lpaste.net/6858775962385907712 … No, really: I need to know this.
  • November 9th, 2015: LAST week we looked at cataloguing the RID/Regressive Imagery Dictionary. Today's #haskell problem completes that. http://lpaste.net/7116276040808267776 Not that every problem and every solution can be modeled as a Graph, but ... the solution-as-Graph is here: http://lpaste.net/2599543283914899456 *blush
  • November 6th, 2015: Today's #haskell problem looks at the RID as Friends and Relations http://lpaste.net/3230687675795111936 ... actually: it just looks at RID-as-relations Ooh! Pritty Bubblés for a solution to the RID-as-relations problem http://lpaste.net/3885537396636254208 
  • November 5th, 2015: Today's #haskell problem is to JSONify the RID because JSON, and because indentation as semantic-delimiters is weird http://lpaste.net/3601240609232257024 A solution shows PRIMARY-RID-JSON in 420 lines, as opposed to the raw text at over 1800 lines. Cool story, bro! http://lpaste.net/2808636942017626112
  • November 4th, 2015: For today's #Haskell problem please Graph that RID! YEAH! http://lpaste.net/7822865785260343296 I WANT YOUR SEX(y graph of the RID) poses a solution at http://lpaste.net/5625628956930605056
  • November 3rd, 2015: YESTERDAY we used a Python program to map a document to the RID in #Haskell TODAY we map part of the RID to #Haskellhttp://lpaste.net/4829042411923570688 A solution gives us a Pathway to BACON, http://lpaste.net/3419022958092353536 ... because priorities.
  • November 2nd, 2015: We look at EQ for today's #Haskell problem; not the Class Eq, but the Emotional Quotient of a document. Fun! http://lpaste.net/856570908666494976 runKleisli (from @phaazon_) and (>=>) to the rescue for the solution today http://lpaste.net/5618280040253882368