Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,016 events total
2021-08-08 03:37:42 pe200012 joins (~pe200012@113.105.10.33)
2021-08-08 03:37:45 Skyfire joins (~pyon@user/pyon)
2021-08-08 03:37:47 <euouae> so instead of an isWon function, I could just guard on "Won" state
2021-08-08 03:38:16 <jle`> hm, storing "projectsion" of data i think may be a step in the wrong direction, unless it's for performance reasons
2021-08-08 03:38:34 <jle`> if you stored `lettersLeftUnguessed` as a set, then that's similar to your new/won sort of thing
2021-08-08 03:38:41 <jle`> because you can guard S.empty lettersLeftUngessed
2021-08-08 03:38:53 <jle`> it sort of follows the principal of avoiding boolean blindness, too
2021-08-08 03:39:33 <euouae> S.empty whatever doesn't translate to Lost/Won, it's not clear. I prefer the type description
2021-08-08 03:39:57 <euouae> Although the name you chose is descriptive for sure
2021-08-08 03:40:10 <jle`> right, you need S.empty plus a S.size on wrongGuesses
2021-08-08 03:41:06 × peterhil quits (~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi) (Ping timeout: 272 seconds)
2021-08-08 03:42:00 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) (Ping timeout: 250 seconds)
2021-08-08 03:42:22 <euouae> It's funny that I remember reading the docs of reactive-banana, but I don't remember /what for/...
2021-08-08 03:42:34 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 256 seconds)
2021-08-08 03:43:27 <jle`> i guess the principle here is to move as much business logic as possible into things evident in the structure of your data, instead of extra logic (like 'hiddenWord')
2021-08-08 03:43:45 <jle`> but honestly your implementation now is great
2021-08-08 03:44:53 <euouae> Thank you :D
2021-08-08 03:45:58 <euouae> I'm thinking the `pure game` stuff is not needed
2021-08-08 03:46:22 <euouae> eh maybe if someone wants the final state
2021-08-08 03:46:40 euouae goes back to studying
2021-08-08 03:48:27 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-08 03:49:15 Erutuon joins (~Erutuon@user/erutuon)
2021-08-08 03:50:22 <Cajun> are you going for a functionally pure implementation of hangman? ive seen a relatively terse form of hangman that is made of IO functions (from Programming in Haskell) https://paste.tomsmeding.com/fDlIxr1F
2021-08-08 03:52:32 × euouae quits (~euouae@user/euouae) (Quit: Ping timeout (120 seconds))
2021-08-08 03:55:01 <Cajun> though i do like the implementation, very clean in my books
2021-08-08 04:03:33 wei2912 joins (~wei2912@112.199.250.21)
2021-08-08 04:05:46 <jle`> hangman in particular is really great because there are so many ways to approach it. so it's something you can do multiple times during your haskell learning journey, and see how you do it differently every time :)
2021-08-08 04:05:54 <jle`> it's one of my favs
2021-08-08 04:06:42 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 250 seconds)
2021-08-08 04:08:43 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
2021-08-08 04:11:15 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
2021-08-08 04:11:58 lavaman joins (~lavaman@98.38.249.169)
2021-08-08 04:13:52 peterhil joins (~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi)
2021-08-08 04:16:22 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds)
2021-08-08 04:17:36 sm2n_ is now known as sm2n
2021-08-08 04:22:18 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2021-08-08 04:26:44 × curiousgay quits (~curiousga@77-120-186-48.kha.volia.net) (Ping timeout: 252 seconds)
2021-08-08 04:27:26 × shachaf quits (~shachaf@user/shachaf) (Quit: Reconnecting)
2021-08-08 04:27:33 shachaf joins (~shachaf@user/shachaf)
2021-08-08 04:39:34 <Cajun> didnt think of it that way, yeah i can see that. if i approached it several months ago i would just use IO everywhere, but i would probably do something like what euouae did if i were to go about it now :)
2021-08-08 04:48:42 × mousey quits (~skymouse@gateway/tor-sasl/mousey) (Ping timeout: 244 seconds)
2021-08-08 04:51:39 mousey joins (~skymouse@gateway/tor-sasl/mousey)
2021-08-08 04:52:28 × emliunix quits (~emliunix@103.138.75.119) (Remote host closed the connection)
2021-08-08 04:52:51 emliunix joins (~emliunix@2a09:bac0:23::815:bca)
2021-08-08 04:57:06 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 240 seconds)
2021-08-08 05:00:33 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Quit: gone to sleep. ZZZzzz…)
2021-08-08 05:14:48 curiousgay joins (~curiousga@77-120-186-48.kha.volia.net)
2021-08-08 05:16:10 <sm> hangman, cool. I'm going to make that next
2021-08-08 05:19:27 takuan joins (~takuan@178-116-218-225.access.telenet.be)
2021-08-08 05:19:28 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-08-08 05:20:04 MQ-17J joins (~MQ-17J@8.21.10.94)
2021-08-08 05:23:27 tjakway joins (~tjakway@154.21.212.27)
2021-08-08 05:38:04 endlesseditions joins (~endlessed@205.220.252.162)
2021-08-08 05:55:58 cheater joins (~Username@user/cheater)
2021-08-08 05:56:24 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 258 seconds)
2021-08-08 06:06:05 burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk)
2021-08-08 06:08:15 euouae joins (~euouae@user/euouae)
2021-08-08 06:10:54 × burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 276 seconds)
2021-08-08 06:12:51 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-08-08 06:12:58 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
2021-08-08 06:13:16 × favonia quits (~favonia@user/favonia) (Ping timeout: 258 seconds)
2021-08-08 06:15:00 × tjakway quits (~tjakway@154.21.212.27) (Quit: WeeChat 1.9.1)
2021-08-08 06:16:56 burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk)
2021-08-08 06:17:37 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 245 seconds)
2021-08-08 06:19:03 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-08 06:19:07 × endlesseditions quits (~endlessed@205.220.252.162) (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
2021-08-08 06:20:54 <sm> cool, I already did
2021-08-08 06:22:47 <sm> and damn, it's hard. Ebionitic ? what ?
2021-08-08 06:23:17 <sm> "refers to a Jewish Christian sect who were vegetarians, viewed poverty as holy, believed in ritual ablutions, and rejected animal sacrifices"
2021-08-08 06:24:34 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2021-08-08 06:25:35 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
2021-08-08 06:27:50 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 258 seconds)
2021-08-08 06:27:51 Lord_of_Life_ is now known as Lord_of_Life
2021-08-08 06:28:54 sander joins (~sander@user/sander)
2021-08-08 06:30:21 <euouae> a -> b -> c is the same as a -> (b -> c) right?
2021-08-08 06:32:31 <Cajun> i believe that (->) is right associative by default, so i believe so
2021-08-08 06:32:58 <Cajun> plus thats just currying in a nutshell
2021-08-08 06:33:11 <euouae> I am trying to understand the following: `(,) <$> (1+) <*> (2+) 0`
2021-08-08 06:33:53 <euouae> I missed a parenthesis, `((,) <$> (1+) <*> (2+)) 0`
2021-08-08 06:34:03 <euouae> But I can't even understand `(,) <$> (1+)`
2021-08-08 06:34:38 <euouae> Somehow I need to interpret the type of (1+) as F a, which I don't see
2021-08-08 06:34:43 <Cajun> `<$>` is really the infix of `fmap` but i read to read it as `pure <*>` because that is more in the applicative style\
2021-08-08 06:36:01 epolanski joins (uid312403@id-312403.brockwell.irccloud.com)
2021-08-08 06:36:46 <Cajun> `(->) a` since `(1+)` is `Num a => a -> a`
2021-08-08 06:37:08 <euouae> is Num the functor?
2021-08-08 06:37:13 <euouae> wait, no
2021-08-08 06:37:21 <Cajun> this may hurt your head but (->) is a functor
2021-08-08 06:37:29 <Cajun> it has instances for functor, applicative, and monad iirc
2021-08-08 06:37:37 vysn joins (~vysn@user/vysn)
2021-08-08 06:37:46 <tomsmeding> also Monoid :p
2021-08-08 06:37:52 <euouae> if -> is a functor then what is the type of (1+)? F a
2021-08-08 06:38:04 <tomsmeding> no, ((->) a) is a functor
2021-08-08 06:38:12 <euouae> It's `F a` where `F = ((->) a)` ?
2021-08-08 06:38:15 <tomsmeding> (->) takes two type variables; a functor necessarily takes only one
2021-08-08 06:38:36 <Cajun> youre `fmap` 'ing `(,)` to the functor (-> a)
2021-08-08 06:38:43 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2021-08-08 06:39:38 <euouae> if a function is `a -> b` then it's `F b` right
2021-08-08 06:39:47 <euouae> For `F` the functor you're describing?
2021-08-08 06:39:47 img joins (~img@user/img)
2021-08-08 06:40:04 <euouae> Or am I going the wrong way? Is it `F a` for `F = ((->) b`?

All times are in UTC.