Logs: freenode/#haskell
| 2020-10-28 05:38:23 | <dminuoso> | koz_: Yeah, Im fond of QQ myself. I have some for IP/mac literals, especially in tests this is convenient. :) |
| 2020-10-28 05:38:56 | <koz_> | I'm definitely adding them to my arsenal for the future. |
| 2020-10-28 05:39:04 | <dminuoso> | http://hackage.haskell.org/package/hexquote-0.1/docs/Data-Hex-Quote.html this is a cute one as well |
| 2020-10-28 05:39:11 | <dminuoso> | That find usage in one of my projects tests a lot |
| 2020-10-28 05:42:42 | × | sandmwitch quits (~dmwit@pool-108-18-228-100.washdc.fios.verizon.net) (Read error: Connection reset by peer) |
| 2020-10-28 05:42:50 | <crestfallen> | Axman6: koz_: please look at > traverse bb list http://ix.io/2Cg1 |
| 2020-10-28 05:44:03 | → | dmwit joins (~dmwit@pool-108-18-228-100.washdc.fios.verizon.net) |
| 2020-10-28 05:44:52 | dmwit | is now known as dmwitch |
| 2020-10-28 05:46:07 | crestfallen | is now known as wretchswollen |
| 2020-10-28 05:51:20 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving) |
| 2020-10-28 05:51:25 | × | taurux quits (~taurux@net-188-216-37-152.cust.vodafonedsl.it) (Ping timeout: 240 seconds) |
| 2020-10-28 05:51:29 | <Axman6> | wretchswollen: what about it? |
| 2020-10-28 05:52:49 | <Axman6> | wretchswollen: try using this: bb x = if even x then Right (x `div` 2) else Left (show x) |
| 2020-10-28 05:54:00 | → | taurux joins (~taurux@net-188-216-13-237.cust.vodafonedsl.it) |
| 2020-10-28 05:54:16 | <dminuoso> | wretchswollen: You seem to be confusing Traversable with Filterable (see `witherable` package) |
| 2020-10-28 05:54:50 | <dminuoso> | (A poor mans witherable on just [] is `mapMaybe` in case you are looking for that) |
| 2020-10-28 05:56:04 | <dminuoso> | (Or I guess Witherable rather than Filterable) |
| 2020-10-28 05:57:26 | <wretchswollen> | with list each member needs to be even. so if it's traverse bb [2,4,6] then we get Just [1,2,3]. so the program doesn't get to the else statement |
| 2020-10-28 05:57:40 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2020-10-28 05:58:40 | <wretchswollen> | it builds Maybe List a without getting to the else statement |
| 2020-10-28 05:59:06 | <dminuoso> | wretchswollen: `Nothing` *is* Maybe [Int] too |
| 2020-10-28 05:59:23 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 2020-10-28 05:59:29 | <Axman6> | wretchswollen: why won';t you do the thing I've now told you three times you should do? step. through. the. functions. by. expanding. their. definitions |
| 2020-10-28 05:59:41 | <Axman6> | you will see what's happening nearly immediately |
| 2020-10-28 05:59:58 | <Axman6> | but instead yuou keep asking the same question and not understanding the answers |
| 2020-10-28 06:00:01 | × | scf-1 quits (~scf-1@84.39.116.180) () |
| 2020-10-28 06:00:20 | <dsal> | To write good code, one must become one with the compiler. |
| 2020-10-28 06:00:20 | <Axman6> | you have the wrong intuition, you can fix than by actually stepping through the evaluation |
| 2020-10-28 06:00:26 | × | Saukk quits (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) (Remote host closed the connection) |
| 2020-10-28 06:00:40 | → | mirrorbird joins (~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1) |
| 2020-10-28 06:00:49 | <Axman6> | I started the work for you, all you need to dfo is contunue it |
| 2020-10-28 06:00:51 | <Axman6> | continue* |
| 2020-10-28 06:01:40 | <wretchswollen> | theres a lot going on. |
| 2020-10-28 06:01:46 | <Axman6> | yes |
| 2020-10-28 06:01:50 | <Axman6> | so you take it one step at a time |
| 2020-10-28 06:01:55 | <Axman6> | like I told you to |
| 2020-10-28 06:02:20 | × | rinwa quits (~rinwa@5.102.238.236) (Ping timeout: 272 seconds) |
| 2020-10-28 06:02:20 | <wretchswollen> | I don't have scrollback on this blasted chat client |
| 2020-10-28 06:02:28 | <Axman6> | I think you need to step through this line by line: traverse bb (Add (Add (Con 3) (Con 4)) (Con (-5))) ==> Add <$> traverse bb (Add (Con 3) (Con 4)) <*> (Con (-5)) ==> ??? |
| 2020-10-28 06:02:30 | <dminuoso> | wretchswollen: Check the topic |
| 2020-10-28 06:02:34 | <dminuoso> | We have a log. |
| 2020-10-28 06:02:57 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 2020-10-28 06:03:15 | <Axman6> | @where paste |
| 2020-10-28 06:03:15 | <lambdabot> | Help us help you: please paste full code, input and/or output at eg https://paste.tomsmeding.com |
| 2020-10-28 06:06:29 | <Axman6> | wretchswollen: https://paste.tomsmeding.com/7TIQdWo7 |
| 2020-10-28 06:06:55 | <Axman6> | I took a few steps at a time there, you can spread it out more if you want |
| 2020-10-28 06:08:25 | × | elliott__ quits (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
| 2020-10-28 06:08:37 | × | tdhttt quits (~tdhttt@static-198-54-131-149.cust.tzulo.com) (Ping timeout: 264 seconds) |
| 2020-10-28 06:09:00 | <wretchswollen> | Axman6: thanks so much. I should probably revisit this tomm. dminuoso thanks kindly |
| 2020-10-28 06:09:32 | → | tdhttt joins (~tdhttt@static-198-54-131-149.cust.tzulo.com) |
| 2020-10-28 06:11:46 | → | obihann joins (~jhann@156.34.160.69) |
| 2020-10-28 06:12:54 | <wretchswollen> | Axman6: yeah ok so doing > traverse aa (Con (-5)) ==> Just (Con 0) |
| 2020-10-28 06:15:09 | <Axman6> | yes |
| 2020-10-28 06:15:37 | <Axman6> | which is _exactly_ what the definition of traverse says will happen if your applicative is Maybe |
| 2020-10-28 06:16:14 | <wretchswollen> | so what happens is essentially: Just (Add (Add (Con 8) (Con 9))) <*> Just (Con 0) |
| 2020-10-28 06:16:42 | <wretchswollen> | hold on checking that.. |
| 2020-10-28 06:16:52 | <Axman6> | sort of, the Add <$> is needed in front of that to make it type check |
| 2020-10-28 06:17:01 | × | obihann quits (~jhann@156.34.160.69) (Ping timeout: 246 seconds) |
| 2020-10-28 06:17:10 | <Axman6> | you get Add <$> Just (Add (Add (Con 8) (Con 9))) <*> Just (Con 0) |
| 2020-10-28 06:20:39 | <wretchswollen> | that's pretty interesting thanks Axman6 |
| 2020-10-28 06:20:40 | <Axman6> | which becomes Just (\x -> Add (Add (Add (Con 8) (Con 9))) x) <*> Just (Con 0) |
| 2020-10-28 06:20:57 | <Axman6> | % :t (<*> @Maybe) |
| 2020-10-28 06:20:57 | <yahb> | Axman6: ; <interactive>:1:6: error: parse error on input `@' |
| 2020-10-28 06:21:02 | <Axman6> | % :t (<*>) @Maybe |
| 2020-10-28 06:21:03 | <yahb> | Axman6: Maybe (a -> b) -> Maybe a -> Maybe b |
| 2020-10-28 06:21:52 | → | m4v1 joins (~m4v@185.244.214.217) |
| 2020-10-28 06:21:56 | × | zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving) |
| 2020-10-28 06:22:02 | → | _vaibhavingale_ joins (~Adium@42.106.216.64) |
| 2020-10-28 06:23:19 | → | zaquest joins (~notzaques@5.128.210.178) |
| 2020-10-28 06:25:01 | × | Sgeo quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer) |
| 2020-10-28 06:26:28 | × | jud^ quits (~jud@cpe-70-113-106-222.austin.res.rr.com) (Ping timeout: 246 seconds) |
| 2020-10-28 06:27:21 | → | jedws joins (~jedws@101.184.193.144) |
| 2020-10-28 06:30:44 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2020-10-28 06:31:21 | → | ecphras joins (~gschare@cpe-23-242-214-143.socal.res.rr.com) |
| 2020-10-28 06:34:00 | × | ecphras quits (~gschare@cpe-23-242-214-143.socal.res.rr.com) (Client Quit) |
| 2020-10-28 06:36:30 | → | geowiesnot joins (~user@87-89-181-157.abo.bbox.fr) |
| 2020-10-28 06:38:15 | → | idhugo joins (~idhugo@563472ae.rev.stofanet.dk) |
| 2020-10-28 06:41:53 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 2020-10-28 06:44:49 | → | nsyde joins (~nsyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) |
| 2020-10-28 06:45:24 | × | wretchswollen quits (~jvw@135-180-15-188.fiber.dynamic.sonic.net) (Ping timeout: 272 seconds) |
| 2020-10-28 06:46:26 | × | nados quits (~dan@69-165-210-185.cable.teksavvy.com) (Ping timeout: 256 seconds) |
| 2020-10-28 06:46:52 | × | caubert quits (~mrbentari@207.246.80.112) (Quit: WeeChat 2.9) |
| 2020-10-28 06:47:02 | → | mrbentarikau joins (~mrbentari@207.246.80.112) |
| 2020-10-28 06:47:20 | mrbentarikau | is now known as caubert |
| 2020-10-28 06:49:02 | × | kori quits (~kori@arrowheads/kori) (Quit: WeeChat 2.8) |
| 2020-10-28 06:50:28 | → | bitmagie joins (~Thunderbi@200116b8069fbf008d925686a233d598.dip.versatel-1u1.de) |
| 2020-10-28 06:53:00 | × | idhugo quits (~idhugo@563472ae.rev.stofanet.dk) (Ping timeout: 260 seconds) |
| 2020-10-28 06:53:03 | × | polyrain quits (~polyrain@2001:8003:e501:6901:e039:127e:3f21:3e4c) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-10-28 06:53:30 | → | tuple joins (~igloo@66.115.157.61) |
| 2020-10-28 06:53:49 | × | tuple quits (~igloo@66.115.157.61) (Client Quit) |
| 2020-10-28 06:54:56 | × | jedws quits (~jedws@101.184.193.144) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-10-28 06:57:57 | → | keep_learning joins (~keep_lear@43.231.26.152) |
| 2020-10-28 06:58:50 | → | | joins (183f4752@c-24-63-71-82.hsd1.ma.comcast.net) |
| 2020-10-28 06:59:14 | | | is now known as Guest35321 |
| 2020-10-28 07:00:28 | → | asheshambasta joins (~user@ptr-e1lysawl9rr13i61o92.18120a2.ip6.access.telenet.be) |
| 2020-10-28 07:01:50 | → | mimi1vx joins (~mimi@tulipan.habr.nat.praha12.net) |
| 2020-10-28 07:02:47 | → | polyrain joins (~polyrain@2001:8003:e501:6901:e039:127e:3f21:3e4c) |
| 2020-10-28 07:03:52 | → | plutoniix joins (~q@175.176.222.7) |
| 2020-10-28 07:04:09 | → | danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
| 2020-10-28 07:04:55 | × | mimi_vx quits (~mimi@2a01:490:16:1026:9954:a30:869a:297e) (Ping timeout: 272 seconds) |
All times are in UTC.