diff options
author | Ben Sima <ben@bsima.me> | 2019-03-27 09:25:12 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2019-03-27 09:25:35 -0700 |
commit | 77ff3088b9c8ff217c6ed6fb9093a5aabb2ea3ca (patch) | |
tree | 2ce318b75ed5b1d01827fca8a7a373f7888f0417 | |
parent | cfd213917c766c91f4c5fc7fdc91c2ca0ea13c26 (diff) |
working miso app
structure is in place, need to add styles and logic
-rw-r--r-- | aero/Ibb.hs | 39 | ||||
-rw-r--r-- | apex/Ibb.hs | 158 | ||||
-rw-r--r-- | lore/Alpha.hs | 18 | ||||
-rw-r--r-- | lore/Biz/Ibb.hs | 422 | ||||
-rw-r--r-- | lore/Biz/Ibb/Core.hs | 80 | ||||
-rw-r--r-- | lore/Biz/Ibb/Influencers.hs | 419 | ||||
-rw-r--r-- | lore/Biz/Ibb/Move.hs | 12 | ||||
-rw-r--r-- | pack/ibb.nix | 4 |
8 files changed, 602 insertions, 550 deletions
diff --git a/aero/Ibb.hs b/aero/Ibb.hs index e357317..8376060 100644 --- a/aero/Ibb.hs +++ b/aero/Ibb.hs @@ -1,45 +1,18 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} +-- | Front-end module Ibb where +import Biz.Ibb.Move import Miso -import Miso.String main :: IO () -main = startApp App {..} +main = miso $ \u -> App { model = Model u [], .. } where - initialAction = SayHelloWorld - model = 0 - update = updateModel - view = viewModel + initialAction = Nop + update = move + view = see events = defaultEvents subs = [] mountPoint = Nothing - -type Model = Int - --- | Sum type for application events -data Action - = AddOne - | SubtractOne - | NoOp - | SayHelloWorld - deriving (Show, Eq) - --- | Updates model, optionally introduces side effects -updateModel :: Action -> Model -> Effect Action Model -updateModel AddOne m = (m + 1) <# do - putStrLn "Hiya World" >> pure NoOp -updateModel SubtractOne m = noEff (m - 1) -updateModel NoOp m = noEff m -updateModel SayHelloWorld m = m <# do - putStrLn "Hiya World" >> pure NoOp - --- | Constructs a virtual DOM from a model -viewModel :: Model -> View Action -viewModel x = div_ [] - [ button_ [ onClick AddOne ] [ text "+" ] - , text (ms x) - , button_ [ onClick SubtractOne ] [ text "-" ] - ] diff --git a/apex/Ibb.hs b/apex/Ibb.hs index 21c1043..ad9af38 100644 --- a/apex/Ibb.hs +++ b/apex/Ibb.hs @@ -1,118 +1,74 @@ {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE DataKinds #-} {-# LANGUAGE QuasiQuotes #-} +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE TypeOperators #-} +-- | Server module Ibb where -import Biz.Ibb (Person(..), Book(..), allPeople) -import Control.Monad.IO.Class (liftIO) -import Data.ByteString.Lazy (ByteString) +import Alpha +import Biz.Ibb import Data.Maybe (fromMaybe) -import Data.Text.Lazy (Text) -import Data.Text.Lazy.Encoding (encodeUtf8) +import Data.Proxy +import qualified Lucid as L +import Lucid.Base +import Miso +import Network.HTTP.Types +import Network.Wai +import Network.Wai.Handler.Warp +import Network.Wai.Middleware.Gzip +import Network.Wai.Middleware.RequestLogger +import Servant import System.Environment (lookupEnv) -import System.Random (newStdGen) -import System.Random.Shuffle (shuffle') -import Text.Blaze (Markup) -import Text.Blaze.Html (Html) -import Text.Blaze.Html.Renderer.Text (renderHtml) -import Text.Hamlet (shamlet) -import Text.Lucius (lucius, renderCss) -import Web.Scotty (ActionM, ScottyM, scotty, get, html, raw, setHeader) - -render :: Html -> ActionM () -render = html . renderHtml - -css :: ByteString -> ActionM () -css src = setHeader "content-type" "text/css" >> raw src main :: IO () main = do - port <- read <$> fromMaybe "3000" <$> lookupEnv "PORT" :: IO Int - scotty port routes + say "running" + port <- read + <$> fromMaybe "3000" + <$> lookupEnv "PORT" :: IO Int + run port $ logStdout $ compress $ app + where + compress = gzip def { gzipFiles = GzipCompress } -routes :: ScottyM () -routes = do - get "/" $ do - r <- liftIO newStdGen - let peopleList = shuffle' allPeople (length allPeople) r - render (homepage peopleList) - get "/custom.css" $ css stylesheet +newtype HtmlPage a = HtmlPage a + deriving (Show, Eq) -displayPerson :: Person -> Markup -displayPerson person = [shamlet| -<div .card> - <img .card-img .img-fluid src=#{_pic person}> - <div .card-body> - <h4 .card-title> - #{_name person} - <h6> - <a target=_blank href="https://twitter.com/#{_twitter person}" class="fab fa-twitter"> - <a target=_blank href=#{_website person} class="fas fa-globe"> - <p .card-text> - #{_blurb person} - <ul> - $forall book <- (_books person) - <li> - <a target=_blank .text-dark href="https://www.amazon.com/dp/#{_amznref book}"> - #{_title book} -|] +instance L.ToHtml a => L.ToHtml (HtmlPage a) where + toHtmlRaw = L.toHtml + toHtml (HtmlPage x) = + L.doctypehtml_ $ do + L.head_ $ do + L.meta_ [L.charset_ "utf-8"] + jsRef "ibb.jsexe/all.js" + L.body_ (L.toHtml x) + where + jsRef href = L.with (L.script_ mempty) + [ makeAttribute "src" href + , makeAttribute "async" mempty + , makeAttribute "defer" mempty + ] -title, subtitle :: Text -title = "Influenced By Books" -subtitle = "Influential people and the books that made them." +type ServerRoutes = ToServerRoutes Routes HtmlPage Action -homepage :: [Person] -> Markup -homepage peopleList = [shamlet| -<!doctype html> -<head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> - <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" - rel="stylesheet" - integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" - crossorigin="anonymous"> - <link rel="stylesheet" - href="https://use.fontawesome.com/releases/v5.7.1/css/all.css" - integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" - crossorigin="anonymous"> - <link href="/custom.css" rel="stylesheet"> - <title>#{title} | #{subtitle} - <script> - (function(f, a, t, h, o, m){ - a[h]=a[h]||function(){ - (a[h].q=a[h].q||[]).push(arguments) - }; - o=f.createElement('script'), - m=f.getElementsByTagName('script')[0]; - o.async=1; o.src=t; o.id='fathom-script'; - m.parentNode.insertBefore(o,m) - })(document, window, '//stats.simatime.com/tracker.js', 'fathom'); - fathom('set', 'siteId', 'IJATN'); - fathom('trackPageview'); -<body> - <div .container.mt-5> - <div .jumbotron> - <h1 .display-4> - #{title} - <p .lead> - #{subtitle} +handle404 :: Application +handle404 _ respond = respond + $ responseLBS status404 [("Content-Type", "text/html")] + $ renderBS + $ toHtml + $ HtmlPage + $ notfound - <p .lead> - <a href="http://eepurl.com/ghBFjv"> - Get new book recommendations from the world's influencers in your email. +type Api = ServerRoutes :<|> Raw - <div .card-columns> - $forall person <- peopleList - #{displayPerson person} -|] +app :: Application +app = serve (Proxy @Api) + $ serverHandlers :<|> Tagged handle404 -stylesheet :: ByteString -stylesheet = encodeUtf8 . renderCss $ [lucius| -.jumbotron -{ background: #fff -; text-align: center -} -h1.display-4 -{ font-family: 'Times New Roman', times, serif -} -|] undefined +serverHandlers :: Server ServerRoutes +serverHandlers = homeHandler + where + send f u = + pure $ HtmlPage $ f Model { modelUri = u, people = [] } + homeHandler = send home goHome diff --git a/lore/Alpha.hs b/lore/Alpha.hs new file mode 100644 index 0000000..b126241 --- /dev/null +++ b/lore/Alpha.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE NoImplicitPrelude #-} +module Alpha ( + -- * General functions + (/@) + -- * Debugging tools + , say + ) where + +import Protolude +import Data.String + +-- | Debugging printf +say :: String -> IO () +say msg = putStrLn msg + +-- | Alias for map, fmap, <$> +(/@) :: Functor f => (a -> b) -> f a -> f b +(/@) = Protolude.fmap diff --git a/lore/Biz/Ibb.hs b/lore/Biz/Ibb.hs index d080468..dd99654 100644 --- a/lore/Biz/Ibb.hs +++ b/lore/Biz/Ibb.hs @@ -1,419 +1,9 @@ {-# LANGUAGE OverloadedStrings #-} -module Biz.Ibb where -import Data.Text.Lazy (Text) +-- | Main app logic +module Biz.Ibb ( + module X + ) where -data Person = Person - { _name :: Text - , _pic :: Text - , _twitter :: Text - , _website :: Text - , _books :: [Book] - , _blurb :: Text - } - -data Book = Book - { _title :: Text - , _author :: Text - , _amznref :: Text - } - -allPeople :: [Person] -allPeople = - [ Person { _name = "Joe Rogan" - , _pic = "https://pbs.twimg.com/profile_images/552307347851210752/vrXDcTFC_400x400.jpeg" - , _twitter = "joerogan" - , _blurb = "Stand up comic/mixed martial arts fanatic/psychedelic adventurer Host of The Joe Rogan Experience" - , _website = "http://joerogan.com" - , _books = [ Book {_title = "Food of the Gods" - , _author = "Terence McKenna" - , _amznref = "0553371304" - } - , Book { _title = "The War of Art" - , _author ="Steven Pressfield" - , _amznref ="B007A4SDCG" - } - ] - } - , Person { _name = "Beyoncé" - , _pic = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTxT84sF19lxdnSiblIXAp-Y4wAigpQn8sZ2GtAerIR_ApiiEJfFQ" - , _twitter = "Beyonce" - , _blurb = "American singer, songwriter, actress, record producer and dancer" - , _website = "http://beyonce.com" - , _books = [ Book { _title = "What Will It Take To Make A Woman President?" - , _author = "Marianne Schnall" - , _amznref = "B00E257Y7G"} - ] - } - , Person { _name = "Barrack Obama" - , _pic = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQeLzftR36p0hYI-EKNa5fm7CYDuN-vyz23_R48ocqa8X1nPr6C" - , _twitter = "BarackObama" - , _blurb = "Dad, husband, President, citizen. 44th POTUS" - , _website = "http://barackobama.com" - , _books = [ Book { _title = "An American Marriage" - , _author = "Tayari Jones" - , _amznref = "B01NCUXEFR"} - , Book { _title = "Americanah" - , _author = "Chimamanda Ngozi Adichie" - , _amznref = "B00A9ET4MC"} - ] - } - , Person { _name = "Warren Buffet" - , _pic = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQQbmnUykS6zqgzaf44tsq1RAsnHe6H7fapEoSqUwAoJGSFKbAPSw" - , _twitter = "WarrenBuffett" - , _blurb = "Chairman and CEO of Berkshire Hathaway" - , _website = "http://berkshirehathaway.com" - , _books = [ Book { _title = "The Intelligent Investor" - , _author = "Benjamin Graham" - , _amznref = "B000FC12C8"} - , Book { _title = "Security Analysis" - , _author = "Benjamin Graham" - , _amznref = "B0037JO5J8"} - ] - } - , Person { _name = "Bill Gates" - , _pic = "https://pbs.twimg.com/profile_images/988775660163252226/XpgonN0X_400x400.jpg" - , _twitter = "BillGates" - , _blurb = "Sharing things I'm learning through my foundation work and other interests. Founder of Microsoft and Bill & Melinda Gates Foundation" - , _website = "https://www.gatesnotes.com" - , _books = [ Book { _title = "Leonardo da Vinci" - , _author = "Walter Isaacson" - , _amznref = "1501139169" - } - , Book { _title = "Educated" - , _author = "Tara Wetsover" - , _amznref = "B072BLVM83" - } - ] - } - , Person { _name = "Stephen King" - , _pic = "https://pbs.twimg.com/profile_images/378800000836981162/b683f7509ec792c3e481ead332940cdc_400x400.jpeg" - , _twitter = "StephenKing" - , _blurb = "World renowned Author" - , _website = "https://stephenking.com/" - , _books = [ Book { _title = "Red Moon" - , _author = "Benjamin Percy" - , _amznref = "B008TU2592" - } - , Book { _title = "The Marauders" - , _author = "Tom Cooper" - , _amznref = "B00MKZBVTM" - } - ] - } - , Person { _name = "Tobi Lütke" - , _pic = "https://pbs.twimg.com/profile_images/551403375141457920/28EOlhnM_400x400.jpeg" - , _twitter = "tobi" - , _blurb = "Shopify CEO by day, Dad in the evening, hacker at night. - Rails Core alumni; Author of ActiveMerchant, Liquid. Comprehensivist" - , _website = "https://www.shopify.com" - , _books = [ Book { _title = "Influence" - , _author ="Robert B. Cialdini" - , _amznref = "006124189X" - } - , Book { _title = "High Output Management" - , _author ="Andrew S. Grove" - , _amznref = "B015VACHOK" - } - ] - } - , Person { _name = "Susan Cain" - , _pic = "https://pbs.twimg.com/profile_images/1474290079/SusanCain5smaller-1_400x400.jpg" - , _twitter = "susancain" - , _blurb = "Bestselling author, award-winning speaker, http://Quietrev.com curator. Lover of bittersweet music & bittersweet chocolate, in equal measure." - , _website = "https://www.quietrev.com" - , _books = [ Book { _title = "Bird by Bird" - , _author ="Anne Lamott" - , _amznref = "0385480016" - } - , Book { _title = "Waking Up" - , _author ="Sam Harris" - , _amznref = "1451636024" - } - ] - } - , Person { _name = "Oprah Winfrey" - , _pic = "https://pbs.twimg.com/profile_images/1013835283698049025/q5ZN4yv3_400x400.jpg" - , _twitter = "Oprah" - , _blurb = "Oprah Winfrey is an American media executive, actress, talk show host, television producer and philanthropis" - , _website = "http://www.oprah.com/index.html" - , _books = [ Book { _title = "A New Earth" - , _author ="Eckhart Tolle" - , _amznref = "B000PC0S5K" - } - , Book { _title = "The Poisonwood Bible" - , _author ="Barbara Kingsolver" - , _amznref = "B000QTE9WU" - } - ] - } - , Person { _name = "Patrick Collison" - , _pic = "https://pbs.twimg.com/profile_images/825622525342199809/_iAaSUQf_400x400.jpg" - , _twitter = "patrickc" - , _blurb = "Fallibilist, optimist. Stripe CEO" - , _website = "https://patrickcollison.com" - , _books = [ Book { _title = "How Judges Think" - , _author ="Richard A. Posner" - , _amznref = "0674048067" - } - , Book { _title = "Programmers at Work" - , _author ="Susan Lammers" - , _amznref = "1556152116" - } - ] - } - , Person { _name = "Luis Von Ahn" - , _pic = "https://pbs.twimg.com/profile_images/1020343581087678464/NIXD5MdC_400x400.jpg" - , _twitter = "LuisvonAhn" - , _blurb = "CEO & co-founder of duolingo. Invented reCAPTCHA. Computer science professor at Carnegie Mellon. Proud Guatemalan" - , _website = "https://www.duolingo.com/" - , _books = [ Book { _title = "Zero to One" - , _author ="Peter Thiel" - , _amznref = "B00J6YBOFQ" - } - , Book { _title = "The Hard Thing About Hard Things" - , _author ="Ben Horowitz" - , _amznref = "B00DQ845EA" - } - ] - } - , Person { _name = "Bryan Johnson" - , _pic = "https://pbs.twimg.com/profile_images/1055165076372475904/vNp60sSl_400x400.jpg" - , _twitter = "bryan_johnson" - , _blurb = "Founder of Kernel, OS Fund and Braintree. Trying to go where there is no destination" - , _website = "https://bryanjohnson.co" - , _books = [ Book { _title = "A Good Man" - , _author ="Mark Shriver" - , _amznref = "B007CLBH0M" - } - , Book { _title = "Shackleton" - , _author ="Nick Bertozzi" - , _amznref = "1596434511" - } - ] - } - , Person { _name = "Peter Thiel" - , _pic = "https://pbs.twimg.com/profile_images/1121220551/Peter_Thiel_400x400.jpg" - , _twitter = "peterthiel" - , _blurb = "Technology entrepreneur, investor, philanthropist." - , _website = "http://zerotoonebook.com" - , _books = [ Book { _title = "Deceit, Desire, and the Novel" - , _author ="René Girard" - , _amznref = "0801818303" - } - , Book { _title = "Violence and the Sacred" - , _author ="René Girard" - , _amznref = "0801822181" - } - ] - } - , Person { _name = "Tim Ferris" - , _pic = "https://pbs.twimg.com/profile_images/49918572/half-face-ice_400x400.jpg" - , _twitter = "tferriss" - , _blurb = "Author of 5 #1 NYT/WSJ bestsellers, investor (FB, Uber, Twitter, 50+ more: http://angel.co/tim ), host of The Tim Ferriss Show podcast (300M+ downloads)" - , _website = "http://tim.blog" - , _books = [ Book { _title = "10% Happier" - , _author ="Dan Harris" - , _amznref = "0062265431" - } - , Book { _title = "A Guide to the Good Life" - , _author ="William Irvine" - , _amznref = "B0040JHNQG" - } - ] - } - , Person { _name = "Allen Walton" - , _pic = "https://pbs.twimg.com/profile_images/1038905908678545409/yUbF9Ruc_400x400.jpg" - , _twitter = "allenthird" - , _blurb = "Created http://SpyGuy.com and blogs about stuff at http://AllenWalton.com . All things ecommerce, personal dev, and Simpsons." - , _website = "https://www.allenwalton.com" - , _books = [ Book { _title = "4 Hour Work Week" - , _author ="Tim Ferris" - , _amznref = "B002WE46UW" - } - , Book { _title = "Choose Yourself" - , _author ="James Altucher" - , _amznref = "B00CO8D3G4" - } - ] - } - , Person { _name = "Peter Mallouk" - , _pic = "https://pbs.twimg.com/profile_images/713172266968715264/KsyDYghf_400x400.jpg" - , _twitter = "PeterMallouk" - , _blurb = "President of Creative Planning. Author “5 Mistakes Every Investor Makes & How to Avoid Them”. Radically moderate." - , _website = "https://creativeplanning.com" - , _books = [ Book { _title = "Awareness" - , _author ="Anthony de Mello SJ" - , _amznref = "B005GFBP6W" - } - , Book { _title = "The Prophet" - , _author ="Kahlil Gibran" - , _amznref = "B07NDJ3LMW" - } - ] - } - , Person { _name = "Adam Robinson" - , _pic = "https://pbs.twimg.com/profile_images/822708907051077632/y5KyboMV_400x400.jpg" - , _twitter = "IAmAdamRobinson" - , _blurb = "Entrepreneur. Systems builder. Wizard. Shaman of global financial markets. Manifester. Didact. Do-gooder. Alchemist. Aphorist. Seeker. Embracer of possibility." - , _website = "http://robinsonglobalstrategies.com" - , _books = [ Book { _title = "Wishcraft" - , _author ="Barbara Sher" - , _amznref = "0345465180" - } - , Book { _title = "You Can Be a Stock Market Genius" - , _author ="Joel Greenblatt" - , _amznref = "0684832135" - } - ] - } - , Person { _name = "Andrew Weil" - , _pic = "https://pbs.twimg.com/profile_images/987461787422359553/mpoZAmPH_400x400.jpg" - , _twitter = "DrWeil" - , _blurb = "A world-renowned leader and pioneer in the field of integrative medicine, a healing oriented approach to health care which encompasses body, mind, and spirit." - , _website = "https://www.drweil.com" - , _books = [ Book { _title = "The Way Of Life According To Lao Tzu" - , _author = "Witter Byner" - , _amznref = "0399512985" - } - , Book { _title = "The Psychology of Romantic Love" - , _author ="Nathaniel Branden" - , _amznref = "B0012RMVJI" - } - ] - } - , Person { _name = "Hubert Joly" - , _pic = "https://scontent-ort2-2.xx.fbcdn.net/v/t1.0-1/c1.0.193.193a/38444401_2156120597936470_9028564067043770368_n.jpg?_nc_cat=104&_nc_ht=scontent-ort2-2.xx&oh=162142edb167f389a5b585a329e4993a&oe=5CE1D578" - , _twitter = "BBYCEO" - , _blurb = "CEO of Best Buy" - , _website = "https://www.bestbuy.com" - , _books = [ Book { _title = "Who Says Elephants Can't Dance" - , _author = "Louis. V. Gerstner" - , _amznref = "0060523808" - } - , Book { _title = "Onward" - , _author ="Howard Schultz" - , _amznref = "1609613821" - } - ] - } - , Person { _name = "Esther Perel" - , _pic = "https://pbs.twimg.com/profile_images/1091062675151319040/MzxCcgdU_400x400.jpg" - , _twitter = "EstherPerel" - , _blurb = "Exploring modern relationships. Author of MatingInCaptivity and TheStateOfAffairsBook. Podcast: WhereShouldWeBegin. Psychotherapist in NYC." - , _website = "https://www.estherperel.com" - , _books = [ Book { _title = "Crime And Punishment" - , _author = "Fyodor Dostoyevsky" - , _amznref = "B07NL94DFD" - } - , Book { _title = "If This Is a Man and The Truce" - , _author ="Primo Levi" - , _amznref = "0349100136" - } - ] - } - , Person { _name ="Neil deGrasse Tyson" - , _pic = "https://pbs.twimg.com/profile_images/74188698/NeilTysonOriginsA-Crop_400x400.jpg" - , _twitter = "neiltyson" - , _blurb = "Astrophysicistthe. Fifth head since 1935 of the world-renowned Hayden Planetarium in New York City and the first occupant of its Frederick P. Rose Directorship. Research associate of the Department of Astrophysics at the American Museum of Natural History." - , _website = "https://www.haydenplanetarium.org/tyson/" - , _books = [ Book { _title = "The Prince" - , _author = "Machiavelli" - , _amznref = "B07ND3CM16" - } - , Book { _title = "The Art of War" - , _author ="Sun Tzu" - , _amznref = "1545211957" - } - ] - } - , Person { _name = "Mark Cuban" - , _pic = "https://pbs.twimg.com/profile_images/1422637130/mccigartrophy_400x400.jpg" - , _twitter = "mcuban" - , _blurb = "Owner of Dallas Mavericks, Shark on ABC’s Shark Tank, chairman and CEO of AXS tv, and investor in an ever-growing portfolio of businesses" - , _website = "http://markcubancompanies.com/" - , _books = [ Book { _title = "The Fountainhead" - , _author = "Ayn Rend" - , _amznref = "0452273331" - } - , Book { _title = "The Gospel of Wealth " - , _author ="Andrew Carnegie" - , _amznref = "1409942171" - } - ] - } - , Person { _name = "Robert Herjavec" - , _pic = "https://pbs.twimg.com/profile_images/608643660876423170/DgxUW3eZ_400x400.jpg" - , _twitter = "robertherjavec" - , _blurb = "Dad, Husband, Founder & CEO of global cybersecurity firm HerjavecGroup, Shark on ABC’s Shark Tank, Former Dragon, Author" - , _website = "https://www.robertherjavec.com/" - , _books = [ Book { _title = "Why I Run" - , _author = "Mark Sutcliffe" - , _amznref = "B007OC9P3A" - } - , Book { _title = "Swim with the Sharks Without Being Eaten Alive" - , _author ="Harvey B. Mackay" - , _amznref = "006074281X" - } - ] - } - , Person { _name = "Caterina Fake" - , _pic = "https://pbs.twimg.com/profile_images/378800000509318185/d968d62d1bc39f2c82d3fa44db478525_400x400.jpeg" - , _twitter = "Caterina" - , _blurb = "Host, Should this Exist? Investor, Yes VC. Cofounder: Flickr, Hunch, Sesat School. Etsy. Sundance. Homeschooling, film, literature. Dogs." - , _website = "https://caterina.net" - , _books = [ Book { _title = "Growth of the Soil" - , _author = "Knut Hamsun" - , _amznref = "0343181967" - } - , Book { _title = "The Thousand Autumns of Jacob de Zoet" - , _author ="David Mitchell" - , _amznref = "0812976363" - } - ] - } - , Person { _name = "Daymond John" - , _pic = "https://pbs.twimg.com/profile_images/1048022980863954944/eZvGANn0_400x400.jpg" - , _twitter = "TheSharkDaymond" - , _blurb = "CEO of FUBU, Shark on ABC’s Shark Tank, Author." - , _website = "https://daymondjohn.com/" - , _books = [ Book { _title = "Think and Grow Rich" - , _author = "Napoleon Hill" - , _amznref = "1585424331" - } - , Book { _title = "How to Win Friends & Influence People" - , _author ="Dale Carnegie" - , _amznref = "0671027034" - } - ] - } - , Person { _name = "Kevin O'Leary" - , _pic = "https://pbs.twimg.com/profile_images/1067383195597889536/cP6tNEt0_400x400.jpg" - , _twitter = "kevinolearytv" - , _blurb = "Chairman O'Shares ETFs, 4 time Emmy Award winning Shark Tank's Mr. Wonderful, bestselling author, CNBC contributor, wine maker, guitar dude and photographer." - , _website = "http://askmrwonderful.eone.libsynpro.com/" - , _books = [ Book { _title = "Competitive Advantage" - , _author = "Michael Porter" - , _amznref = "0684841460" - } - , Book { _title = "Secrets of Closing the Sale" - , _author ="Zig Ziglar" - , _amznref = "0425081028" - } - ] - } - , Person { _name = "Alex Rodriguez" - , _pic = "https://pbs.twimg.com/profile_images/796405335388848128/LbvsjCA3_400x400.jpg" - , _twitter = "AROD" - , _blurb = "3-time MVP • 14-time All Star • World Series Champ • CEO of @_ARodCorp• @FoxSports Commentator/Analyst • Special Advisor to the Yankees, @ABCSharkTank and ESPN" - , _website = "http://www.arodcorp.com/" - , _books = [ Book { _title = "Blitzscaling" - , _author = "Reid Hoffman" - , _amznref = "1524761419" - } - , Book { _title = "Measure What Matters" - , _author ="John Doerr" - , _amznref = "0525536221" - } - ] - } - ] +import Biz.Ibb.Core as X +import Biz.Ibb.Influencers as X diff --git a/lore/Biz/Ibb/Core.hs b/lore/Biz/Ibb/Core.hs new file mode 100644 index 0000000..8fd0068 --- /dev/null +++ b/lore/Biz/Ibb/Core.hs @@ -0,0 +1,80 @@ +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -Wall #-} + +-- | Main app logic +module Biz.Ibb.Core where + +import Alpha +import Biz.Ibb.Influencers +import Data.Proxy +import Miso +import Miso.String +import Servant.API +import Servant.Links + +type Routes = Home + +type Home = View Action + +data Model = Model + { modelUri :: URI + , people :: [Person] + } deriving (Show, Eq) + +data Action + = Nop + | ChangeRoute URI + | HandleRoute URI + deriving (Show, Eq) + +home :: Model -> View Action +home m = see m + +handlers :: Model -> View Action +handlers = home + +notfound :: View Action +notfound = div_ [] [ text "404" ] + +goHome :: URI +goHome = linkURI $ safeLink + (Proxy :: Proxy Routes) + (Proxy :: Proxy Home) + +see :: Model -> View Action +see m = div_ [ class_ "container mt-5" ] + [ div_ [ class_ "jumbotron" ] + [ h1_ [ class_ "display-4" ] [ text "Influenced by books" ] + , p_ [ class_ "lead" ] [ text "Influential people and the books that made them." ] + , p_ [ class_ "lead" ] + [ a_ [ href_ "http://eepurl.com/ghBFjv" ] + [ text "Get new book recommendations from the world's influencers in your email." ] + ] + ] + , div_ [ class_ "card-columns" ] $ seePerson /@ people m + ] + +seePerson :: Person -> View Action +seePerson person = div_ [ class_ "card" ] + [ div_ [ class_ "card-img" ] + [ img_ [ class_ "card-img img-fluid", src_ $ ms $ _pic person ]] + , div_ [ class_ "card-body" ] + [ h4_ [ class_ "card-title" ] [ text $ ms $ _name person ] + , h6_ [] [ a_ [ class_ "fab fa-twitter" + , href_ $ "https://twitter.com/" <> (ms $ _twitter person) ] [] + , a_ [ class_ "fas fa-globe", href_ $ ms $ _website person ] [] + ] + , p_ [ class_ "card-text" ] + [ text $ ms $ _blurb person + , ul_ [] $ seeBook /@ _books person + ] + ] + ] + +seeBook :: Book -> View Action +seeBook book = li_ [] + [ a_ [ class_ "text-dark" + , href_ $ "https://www.amazon.com/dp/" <> (ms $ _amznref book) + ] + [ text $ ms $ _title book ] + ] diff --git a/lore/Biz/Ibb/Influencers.hs b/lore/Biz/Ibb/Influencers.hs new file mode 100644 index 0000000..beeaf41 --- /dev/null +++ b/lore/Biz/Ibb/Influencers.hs @@ -0,0 +1,419 @@ +{-# LANGUAGE OverloadedStrings #-} +module Biz.Ibb.Influencers where + +import Data.Text.Lazy (Text) + +data Person = Person + { _name :: Text + , _pic :: Text + , _twitter :: Text + , _website :: Text + , _books :: [Book] + , _blurb :: Text + } deriving (Show, Eq) + +data Book = Book + { _title :: Text + , _author :: Text + , _amznref :: Text + } deriving (Show, Eq) + +allPeople :: [Person] +allPeople = + [ Person { _name = "Joe Rogan" + , _pic = "https://pbs.twimg.com/profile_images/552307347851210752/vrXDcTFC_400x400.jpeg" + , _twitter = "joerogan" + , _blurb = "Stand up comic/mixed martial arts fanatic/psychedelic adventurer Host of The Joe Rogan Experience" + , _website = "http://joerogan.com" + , _books = [ Book {_title = "Food of the Gods" + , _author = "Terence McKenna" + , _amznref = "0553371304" + } + , Book { _title = "The War of Art" + , _author ="Steven Pressfield" + , _amznref ="B007A4SDCG" + } + ] + } + , Person { _name = "Beyoncé" + , _pic = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTxT84sF19lxdnSiblIXAp-Y4wAigpQn8sZ2GtAerIR_ApiiEJfFQ" + , _twitter = "Beyonce" + , _blurb = "American singer, songwriter, actress, record producer and dancer" + , _website = "http://beyonce.com" + , _books = [ Book { _title = "What Will It Take To Make A Woman President?" + , _author = "Marianne Schnall" + , _amznref = "B00E257Y7G"} + ] + } + , Person { _name = "Barrack Obama" + , _pic = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQeLzftR36p0hYI-EKNa5fm7CYDuN-vyz23_R48ocqa8X1nPr6C" + , _twitter = "BarackObama" + , _blurb = "Dad, husband, President, citizen. 44th POTUS" + , _website = "http://barackobama.com" + , _books = [ Book { _title = "An American Marriage" + , _author = "Tayari Jones" + , _amznref = "B01NCUXEFR"} + , Book { _title = "Americanah" + , _author = "Chimamanda Ngozi Adichie" + , _amznref = "B00A9ET4MC"} + ] + } + , Person { _name = "Warren Buffet" + , _pic = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQQbmnUykS6zqgzaf44tsq1RAsnHe6H7fapEoSqUwAoJGSFKbAPSw" + , _twitter = "WarrenBuffett" + , _blurb = "Chairman and CEO of Berkshire Hathaway" + , _website = "http://berkshirehathaway.com" + , _books = [ Book { _title = "The Intelligent Investor" + , _author = "Benjamin Graham" + , _amznref = "B000FC12C8"} + , Book { _title = "Security Analysis" + , _author = "Benjamin Graham" + , _amznref = "B0037JO5J8"} + ] + } + , Person { _name = "Bill Gates" + , _pic = "https://pbs.twimg.com/profile_images/988775660163252226/XpgonN0X_400x400.jpg" + , _twitter = "BillGates" + , _blurb = "Sharing things I'm learning through my foundation work and other interests. Founder of Microsoft and Bill & Melinda Gates Foundation" + , _website = "https://www.gatesnotes.com" + , _books = [ Book { _title = "Leonardo da Vinci" + , _author = "Walter Isaacson" + , _amznref = "1501139169" + } + , Book { _title = "Educated" + , _author = "Tara Wetsover" + , _amznref = "B072BLVM83" + } + ] + } + , Person { _name = "Stephen King" + , _pic = "https://pbs.twimg.com/profile_images/378800000836981162/b683f7509ec792c3e481ead332940cdc_400x400.jpeg" + , _twitter = "StephenKing" + , _blurb = "World renowned Author" + , _website = "https://stephenking.com/" + , _books = [ Book { _title = "Red Moon" + , _author = "Benjamin Percy" + , _amznref = "B008TU2592" + } + , Book { _title = "The Marauders" + , _author = "Tom Cooper" + , _amznref = "B00MKZBVTM" + } + ] + } + , Person { _name = "Tobi Lütke" + , _pic = "https://pbs.twimg.com/profile_images/551403375141457920/28EOlhnM_400x400.jpeg" + , _twitter = "tobi" + , _blurb = "Shopify CEO by day, Dad in the evening, hacker at night. - Rails Core alumni; Author of ActiveMerchant, Liquid. Comprehensivist" + , _website = "https://www.shopify.com" + , _books = [ Book { _title = "Influence" + , _author ="Robert B. Cialdini" + , _amznref = "006124189X" + } + , Book { _title = "High Output Management" + , _author ="Andrew S. Grove" + , _amznref = "B015VACHOK" + } + ] + } + , Person { _name = "Susan Cain" + , _pic = "https://pbs.twimg.com/profile_images/1474290079/SusanCain5smaller-1_400x400.jpg" + , _twitter = "susancain" + , _blurb = "Bestselling author, award-winning speaker, http://Quietrev.com curator. Lover of bittersweet music & bittersweet chocolate, in equal measure." + , _website = "https://www.quietrev.com" + , _books = [ Book { _title = "Bird by Bird" + , _author ="Anne Lamott" + , _amznref = "0385480016" + } + , Book { _title = "Waking Up" + , _author ="Sam Harris" + , _amznref = "1451636024" + } + ] + } + , Person { _name = "Oprah Winfrey" + , _pic = "https://pbs.twimg.com/profile_images/1013835283698049025/q5ZN4yv3_400x400.jpg" + , _twitter = "Oprah" + , _blurb = "Oprah Winfrey is an American media executive, actress, talk show host, television producer and philanthropis" + , _website = "http://www.oprah.com/index.html" + , _books = [ Book { _title = "A New Earth" + , _author ="Eckhart Tolle" + , _amznref = "B000PC0S5K" + } + , Book { _title = "The Poisonwood Bible" + , _author ="Barbara Kingsolver" + , _amznref = "B000QTE9WU" + } + ] + } + , Person { _name = "Patrick Collison" + , _pic = "https://pbs.twimg.com/profile_images/825622525342199809/_iAaSUQf_400x400.jpg" + , _twitter = "patrickc" + , _blurb = "Fallibilist, optimist. Stripe CEO" + , _website = "https://patrickcollison.com" + , _books = [ Book { _title = "How Judges Think" + , _author ="Richard A. Posner" + , _amznref = "0674048067" + } + , Book { _title = "Programmers at Work" + , _author ="Susan Lammers" + , _amznref = "1556152116" + } + ] + } + , Person { _name = "Luis Von Ahn" + , _pic = "https://pbs.twimg.com/profile_images/1020343581087678464/NIXD5MdC_400x400.jpg" + , _twitter = "LuisvonAhn" + , _blurb = "CEO & co-founder of duolingo. Invented reCAPTCHA. Computer science professor at Carnegie Mellon. Proud Guatemalan" + , _website = "https://www.duolingo.com/" + , _books = [ Book { _title = "Zero to One" + , _author ="Peter Thiel" + , _amznref = "B00J6YBOFQ" + } + , Book { _title = "The Hard Thing About Hard Things" + , _author ="Ben Horowitz" + , _amznref = "B00DQ845EA" + } + ] + } + , Person { _name = "Bryan Johnson" + , _pic = "https://pbs.twimg.com/profile_images/1055165076372475904/vNp60sSl_400x400.jpg" + , _twitter = "bryan_johnson" + , _blurb = "Founder of Kernel, OS Fund and Braintree. Trying to go where there is no destination" + , _website = "https://bryanjohnson.co" + , _books = [ Book { _title = "A Good Man" + , _author ="Mark Shriver" + , _amznref = "B007CLBH0M" + } + , Book { _title = "Shackleton" + , _author ="Nick Bertozzi" + , _amznref = "1596434511" + } + ] + } + , Person { _name = "Peter Thiel" + , _pic = "https://pbs.twimg.com/profile_images/1121220551/Peter_Thiel_400x400.jpg" + , _twitter = "peterthiel" + , _blurb = "Technology entrepreneur, investor, philanthropist." + , _website = "http://zerotoonebook.com" + , _books = [ Book { _title = "Deceit, Desire, and the Novel" + , _author ="René Girard" + , _amznref = "0801818303" + } + , Book { _title = "Violence and the Sacred" + , _author ="René Girard" + , _amznref = "0801822181" + } + ] + } + , Person { _name = "Tim Ferris" + , _pic = "https://pbs.twimg.com/profile_images/49918572/half-face-ice_400x400.jpg" + , _twitter = "tferriss" + , _blurb = "Author of 5 #1 NYT/WSJ bestsellers, investor (FB, Uber, Twitter, 50+ more: http://angel.co/tim ), host of The Tim Ferriss Show podcast (300M+ downloads)" + , _website = "http://tim.blog" + , _books = [ Book { _title = "10% Happier" + , _author ="Dan Harris" + , _amznref = "0062265431" + } + , Book { _title = "A Guide to the Good Life" + , _author ="William Irvine" + , _amznref = "B0040JHNQG" + } + ] + } + , Person { _name = "Allen Walton" + , _pic = "https://pbs.twimg.com/profile_images/1038905908678545409/yUbF9Ruc_400x400.jpg" + , _twitter = "allenthird" + , _blurb = "Created http://SpyGuy.com and blogs about stuff at http://AllenWalton.com . All things ecommerce, personal dev, and Simpsons." + , _website = "https://www.allenwalton.com" + , _books = [ Book { _title = "4 Hour Work Week" + , _author ="Tim Ferris" + , _amznref = "B002WE46UW" + } + , Book { _title = "Choose Yourself" + , _author ="James Altucher" + , _amznref = "B00CO8D3G4" + } + ] + } + , Person { _name = "Peter Mallouk" + , _pic = "https://pbs.twimg.com/profile_images/713172266968715264/KsyDYghf_400x400.jpg" + , _twitter = "PeterMallouk" + , _blurb = "President of Creative Planning. Author “5 Mistakes Every Investor Makes & How to Avoid Them”. Radically moderate." + , _website = "https://creativeplanning.com" + , _books = [ Book { _title = "Awareness" + , _author ="Anthony de Mello SJ" + , _amznref = "B005GFBP6W" + } + , Book { _title = "The Prophet" + , _author ="Kahlil Gibran" + , _amznref = "B07NDJ3LMW" + } + ] + } + , Person { _name = "Adam Robinson" + , _pic = "https://pbs.twimg.com/profile_images/822708907051077632/y5KyboMV_400x400.jpg" + , _twitter = "IAmAdamRobinson" + , _blurb = "Entrepreneur. Systems builder. Wizard. Shaman of global financial markets. Manifester. Didact. Do-gooder. Alchemist. Aphorist. Seeker. Embracer of possibility." + , _website = "http://robinsonglobalstrategies.com" + , _books = [ Book { _title = "Wishcraft" + , _author ="Barbara Sher" + , _amznref = "0345465180" + } + , Book { _title = "You Can Be a Stock Market Genius" + , _author ="Joel Greenblatt" + , _amznref = "0684832135" + } + ] + } + , Person { _name = "Andrew Weil" + , _pic = "https://pbs.twimg.com/profile_images/987461787422359553/mpoZAmPH_400x400.jpg" + , _twitter = "DrWeil" + , _blurb = "A world-renowned leader and pioneer in the field of integrative medicine, a healing oriented approach to health care which encompasses body, mind, and spirit." + , _website = "https://www.drweil.com" + , _books = [ Book { _title = "The Way Of Life According To Lao Tzu" + , _author = "Witter Byner" + , _amznref = "0399512985" + } + , Book { _title = "The Psychology of Romantic Love" + , _author ="Nathaniel Branden" + , _amznref = "B0012RMVJI" + } + ] + } + , Person { _name = "Hubert Joly" + , _pic = "https://scontent-ort2-2.xx.fbcdn.net/v/t1.0-1/c1.0.193.193a/38444401_2156120597936470_9028564067043770368_n.jpg?_nc_cat=104&_nc_ht=scontent-ort2-2.xx&oh=162142edb167f389a5b585a329e4993a&oe=5CE1D578" + , _twitter = "BBYCEO" + , _blurb = "CEO of Best Buy" + , _website = "https://www.bestbuy.com" + , _books = [ Book { _title = "Who Says Elephants Can't Dance" + , _author = "Louis. V. Gerstner" + , _amznref = "0060523808" + } + , Book { _title = "Onward" + , _author ="Howard Schultz" + , _amznref = "1609613821" + } + ] + } + , Person { _name = "Esther Perel" + , _pic = "https://pbs.twimg.com/profile_images/1091062675151319040/MzxCcgdU_400x400.jpg" + , _twitter = "EstherPerel" + , _blurb = "Exploring modern relationships. Author of MatingInCaptivity and TheStateOfAffairsBook. Podcast: WhereShouldWeBegin. Psychotherapist in NYC." + , _website = "https://www.estherperel.com" + , _books = [ Book { _title = "Crime And Punishment" + , _author = "Fyodor Dostoyevsky" + , _amznref = "B07NL94DFD" + } + , Book { _title = "If This Is a Man and The Truce" + , _author ="Primo Levi" + , _amznref = "0349100136" + } + ] + } + , Person { _name ="Neil deGrasse Tyson" + , _pic = "https://pbs.twimg.com/profile_images/74188698/NeilTysonOriginsA-Crop_400x400.jpg" + , _twitter = "neiltyson" + , _blurb = "Astrophysicistthe. Fifth head since 1935 of the world-renowned Hayden Planetarium in New York City and the first occupant of its Frederick P. Rose Directorship. Research associate of the Department of Astrophysics at the American Museum of Natural History." + , _website = "https://www.haydenplanetarium.org/tyson/" + , _books = [ Book { _title = "The Prince" + , _author = "Machiavelli" + , _amznref = "B07ND3CM16" + } + , Book { _title = "The Art of War" + , _author ="Sun Tzu" + , _amznref = "1545211957" + } + ] + } + , Person { _name = "Mark Cuban" + , _pic = "https://pbs.twimg.com/profile_images/1422637130/mccigartrophy_400x400.jpg" + , _twitter = "mcuban" + , _blurb = "Owner of Dallas Mavericks, Shark on ABC’s Shark Tank, chairman and CEO of AXS tv, and investor in an ever-growing portfolio of businesses" + , _website = "http://markcubancompanies.com/" + , _books = [ Book { _title = "The Fountainhead" + , _author = "Ayn Rend" + , _amznref = "0452273331" + } + , Book { _title = "The Gospel of Wealth " + , _author ="Andrew Carnegie" + , _amznref = "1409942171" + } + ] + } + , Person { _name = "Robert Herjavec" + , _pic = "https://pbs.twimg.com/profile_images/608643660876423170/DgxUW3eZ_400x400.jpg" + , _twitter = "robertherjavec" + , _blurb = "Dad, Husband, Founder & CEO of global cybersecurity firm HerjavecGroup, Shark on ABC’s Shark Tank, Former Dragon, Author" + , _website = "https://www.robertherjavec.com/" + , _books = [ Book { _title = "Why I Run" + , _author = "Mark Sutcliffe" + , _amznref = "B007OC9P3A" + } + , Book { _title = "Swim with the Sharks Without Being Eaten Alive" + , _author ="Harvey B. Mackay" + , _amznref = "006074281X" + } + ] + } + , Person { _name = "Caterina Fake" + , _pic = "https://pbs.twimg.com/profile_images/378800000509318185/d968d62d1bc39f2c82d3fa44db478525_400x400.jpeg" + , _twitter = "Caterina" + , _blurb = "Host, Should this Exist? Investor, Yes VC. Cofounder: Flickr, Hunch, Sesat School. Etsy. Sundance. Homeschooling, film, literature. Dogs." + , _website = "https://caterina.net" + , _books = [ Book { _title = "Growth of the Soil" + , _author = "Knut Hamsun" + , _amznref = "0343181967" + } + , Book { _title = "The Thousand Autumns of Jacob de Zoet" + , _author ="David Mitchell" + , _amznref = "0812976363" + } + ] + } + , Person { _name = "Daymond John" + , _pic = "https://pbs.twimg.com/profile_images/1048022980863954944/eZvGANn0_400x400.jpg" + , _twitter = "TheSharkDaymond" + , _blurb = "CEO of FUBU, Shark on ABC’s Shark Tank, Author." + , _website = "https://daymondjohn.com/" + , _books = [ Book { _title = "Think and Grow Rich" + , _author = "Napoleon Hill" + , _amznref = "1585424331" + } + , Book { _title = "How to Win Friends & Influence People" + , _author ="Dale Carnegie" + , _amznref = "0671027034" + } + ] + } + , Person { _name = "Kevin O'Leary" + , _pic = "https://pbs.twimg.com/profile_images/1067383195597889536/cP6tNEt0_400x400.jpg" + , _twitter = "kevinolearytv" + , _blurb = "Chairman O'Shares ETFs, 4 time Emmy Award winning Shark Tank's Mr. Wonderful, bestselling author, CNBC contributor, wine maker, guitar dude and photographer." + , _website = "http://askmrwonderful.eone.libsynpro.com/" + , _books = [ Book { _title = "Competitive Advantage" + , _author = "Michael Porter" + , _amznref = "0684841460" + } + , Book { _title = "Secrets of Closing the Sale" + , _author ="Zig Ziglar" + , _amznref = "0425081028" + } + ] + } + , Person { _name = "Alex Rodriguez" + , _pic = "https://pbs.twimg.com/profile_images/796405335388848128/LbvsjCA3_400x400.jpg" + , _twitter = "AROD" + , _blurb = "3-time MVP • 14-time All Star • World Series Champ • CEO of @_ARodCorp• @FoxSports Commentator/Analyst • Special Advisor to the Yankees, @ABCSharkTank and ESPN" + , _website = "http://www.arodcorp.com/" + , _books = [ Book { _title = "Blitzscaling" + , _author = "Reid Hoffman" + , _amznref = "1524761419" + } + , Book { _title = "Measure What Matters" + , _author ="John Doerr" + , _amznref = "0525536221" + } + ] + } + ] diff --git a/lore/Biz/Ibb/Move.hs b/lore/Biz/Ibb/Move.hs new file mode 100644 index 0000000..9ff9b34 --- /dev/null +++ b/lore/Biz/Ibb/Move.hs @@ -0,0 +1,12 @@ + +-- | App update logic +module Biz.Ibb.Move ( + module X + , move + ) where + +import Biz.Ibb.Core as X +import Miso + +move :: Action -> Model -> Effect Action Model +move Nop m = undefined diff --git a/pack/ibb.nix b/pack/ibb.nix index d91d119..159f403 100644 --- a/pack/ibb.nix +++ b/pack/ibb.nix @@ -2,14 +2,18 @@ with nixpkgs; let ghc = pkgs.haskell.packages.ghc844.ghcWithPackages (hp: with hp; [ + acid-state blaze-html blaze-markup bytestring hinotify miso MonadRandom + protolude random scotty + servant + servant-server shakespeare text ]); |