Logs: freenode/#haskell
| 2021-04-21 11:55:56 | <tomsmeding> | I'm not pretending to know anything about history or sociology :p |
| 2021-04-21 11:56:40 | <tomsmeding> | python has no real standardisation; is it detrimental? doesn't seem so |
| 2021-04-21 11:56:58 | <tomsmeding> | BASIC also has no real standardisation; is it detrimental? not sure, but it doesn't really flourish anyway :p |
| 2021-04-21 11:58:49 | → | nut_ joins (~gtk@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 2021-04-21 11:58:54 | × | frozenErebus quits (~frozenEre@37.231.244.249) (Remote host closed the connection) |
| 2021-04-21 11:58:57 | × | sh9 quits (~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8) |
| 2021-04-21 12:05:18 | ← | tatsumaru parts (~tatsumaru@85.196.189.103) () |
| 2021-04-21 12:07:44 | → | geekosaur joins (930099da@rrcs-147-0-153-218.central.biz.rr.com) |
| 2021-04-21 12:08:23 | × | NinjaTrappeur quits (~ninja@unaffiliated/ninjatrappeur) (Quit: WeeChat 3.1) |
| 2021-04-21 12:09:04 | → | NinjaTrappeur joins (~ninja@unaffiliated/ninjatrappeur) |
| 2021-04-21 12:13:16 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
| 2021-04-21 12:15:05 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-04-21 12:15:31 | × | curiousgay quits (~gay@178.217.208.8) (Read error: Connection reset by peer) |
| 2021-04-21 12:15:58 | × | codedmart quits (~codedmart@149.28.9.205) (Ping timeout: 268 seconds) |
| 2021-04-21 12:16:27 | → | mmfood_1 joins (~mmfood@45.91.21.58) |
| 2021-04-21 12:17:55 | → | sayola1 joins (~vekto@dslb-002-201-085-157.002.201.pools.vodafone-ip.de) |
| 2021-04-21 12:18:58 | × | sayola quits (~vekto@dslb-002-201-085-157.002.201.pools.vodafone-ip.de) (Ping timeout: 252 seconds) |
| 2021-04-21 12:19:03 | × | mmfood quits (~mmfood@185.176.246.69) (Ping timeout: 268 seconds) |
| 2021-04-21 12:22:52 | × | geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds) |
| 2021-04-21 12:23:11 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 240 seconds) |
| 2021-04-21 12:27:58 | → | loller_ joins (uid358106@gateway/web/irccloud.com/x-gvifcnmgsfzryozd) |
| 2021-04-21 12:30:51 | → | jonathanx_ joins (~jonathan@h-176-109.A357.priv.bahnhof.se) |
| 2021-04-21 12:31:29 | → | seven_th` joins (~user@pool-96-233-64-53.bstnma.fios.verizon.net) |
| 2021-04-21 12:32:37 | × | jonathanx quits (~jonathan@h-176-109.A357.priv.bahnhof.se) (Ping timeout: 268 seconds) |
| 2021-04-21 12:32:38 | × | jonathanx_ quits (~jonathan@h-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 2021-04-21 12:33:41 | × | knupfer quits (~Thunderbi@200116b82b5e7400a819040ab136d554.dip.versatel-1u1.de) (Ping timeout: 245 seconds) |
| 2021-04-21 12:34:03 | → | jonathanx joins (~jonathan@h-176-109.A357.priv.bahnhof.se) |
| 2021-04-21 12:35:23 | → | geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
| 2021-04-21 12:35:26 | × | seven_three quits (~user@pool-96-233-64-53.bstnma.fios.verizon.net) (Ping timeout: 240 seconds) |
| 2021-04-21 12:39:44 | → | CiaoSen joins (~Jura@p200300c9572bc100dd00e68a577d428e.dip0.t-ipconnect.de) |
| 2021-04-21 12:40:08 | → | v01d4lph4 joins (~v01d4lph4@27.57.103.213) |
| 2021-04-21 12:41:12 | → | nicholasbulka joins (~nicholasb@2601:900:4301:da0:bdc9:711a:32b8:207e) |
| 2021-04-21 12:48:54 | → | sleblanc joins (~sleblanc@unaffiliated/sebleblanc) |
| 2021-04-21 12:51:18 | → | heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-04-21 12:51:37 | <nut_> | test |
| 2021-04-21 12:51:47 | × | nut_ quits (~gtk@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Quit: WeeChat 2.8) |
| 2021-04-21 12:52:02 | → | nut joins (~gtk@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 2021-04-21 12:55:26 | × | heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 2021-04-21 12:55:41 | × | mrchampion quits (~mrchampio@38.18.109.23) (Ping timeout: 240 seconds) |
| 2021-04-21 12:56:11 | × | nut quits (~gtk@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds) |
| 2021-04-21 12:58:33 | → | mrchampion joins (~mrchampio@38.18.109.23) |
| 2021-04-21 13:01:04 | → | Tario joins (~Tario@201.192.165.173) |
| 2021-04-21 13:01:06 | → | nut joins (~gtk@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 2021-04-21 13:01:37 | → | dmytrish joins (~mitra@2a02:8084:a82:d900:fdd2:ac3d:3471:66d9) |
| 2021-04-21 13:01:39 | → | heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-04-21 13:01:53 | × | dpl_ quits (~dpl@77-121-78-163.chn.volia.net) (Quit: dpl_) |
| 2021-04-21 13:04:17 | <pjb> | tomsmeding: is it still true? It's documented, https://docs.python.org/3/reference/ and they have the PEPs process to standardize things. https://www.python.org/dev/peps/ But granted, they don't seem to have an "official" standard such as ANSI or ISO. |
| 2021-04-21 13:04:54 | <tomsmeding> | I honestly don't really know, perhaps I spoke too soon :p |
| 2021-04-21 13:05:20 | <tomsmeding> | that's true, the reference tries to be implementation-agnostic |
| 2021-04-21 13:05:46 | × | heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 245 seconds) |
| 2021-04-21 13:07:41 | <whataday> | what's the difference of MaybeT IO a and IO (Maybe a) to use? MaybeT IO is monad so we can use fmap apply f on a directly, but IO (Maybe a) we need to use fmap . fmap $ f? |
| 2021-04-21 13:08:03 | <Taneb> | whataday: that's pretty much it |
| 2021-04-21 13:08:07 | × | dmytrish quits (~mitra@2a02:8084:a82:d900:fdd2:ac3d:3471:66d9) (Ping timeout: 260 seconds) |
| 2021-04-21 13:10:07 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 2021-04-21 13:10:07 | → | dmytrish joins (~mitra@2a02:8084:a82:d900:fdd2:ac3d:3471:66d9) |
| 2021-04-21 13:11:35 | → | heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-04-21 13:12:39 | <whataday> | fetchUrl :: Url -> MaybeT IO a; traverse fetchUrl [Url1, Url2] :: ? |
| 2021-04-21 13:13:32 | <tomsmeding> | :t traverse |
| 2021-04-21 13:13:34 | <lambdabot> | (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b) |
| 2021-04-21 13:14:04 | <tomsmeding> | f = MaybeT IO; t = []; so MaybeT IO [a] |
| 2021-04-21 13:14:46 | <tomsmeding> | and a = Url and b = your a |
| 2021-04-21 13:14:50 | <whataday> | does it need runMaybeT to extract IO actions from list? |
| 2021-04-21 13:15:00 | <tomsmeding> | which "it"? |
| 2021-04-21 13:15:03 | × | dsrt^ quits (dsrt@ip98-184-89-2.mc.at.cox.net) () |
| 2021-04-21 13:15:42 | → | ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net) |
| 2021-04-21 13:15:48 | <whataday> | traverse (runMaybeT . fetchUrl) [Url] |
| 2021-04-21 13:15:55 | → | knupfer joins (~Thunderbi@200116b82b5e7400d544a78922962f4e.dip.versatel-1u1.de) |
| 2021-04-21 13:15:55 | <tomsmeding> | if you're talking about "traverse": no traverse is implemented using just the methods from Traversable and Applicative |
| 2021-04-21 13:16:22 | × | heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds) |
| 2021-04-21 13:16:26 | <tomsmeding> | runMaybeT :: MaybeT IO a -> IO (Maybe a); runMaybeT . fetchUrl :: Url -> IO (Maybe a) |
| 2021-04-21 13:16:40 | <whataday> | yes, I mean Data.Traversable |
| 2021-04-21 13:16:41 | <tomsmeding> | IO (Maybe a) is not of the form 'f b' for some f |
| 2021-04-21 13:16:46 | <tomsmeding> | so you can't use traverse like that |
| 2021-04-21 13:17:03 | <tomsmeding> | @src traverse |
| 2021-04-21 13:17:03 | <lambdabot> | Source not found. |
| 2021-04-21 13:17:05 | <tomsmeding> | aw |
| 2021-04-21 13:17:20 | <whataday> | and MaybeT IO is an instance of Traverable? |
| 2021-04-21 13:17:41 | <tomsmeding> | https://hackage.haskell.org/package/transformers-0.5.6.2/docs/src/Control.Monad.Trans.Maybe.html#line-129 |
| 2021-04-21 13:18:03 | <tomsmeding> | I guess pattern-matching on the MaybeT like that is equivalent to using runMaybeT |
| 2021-04-21 13:18:31 | <tomsmeding> | given the definition of MaybeT, which is: https://hackage.haskell.org/package/transformers-0.5.6.2/docs/src/Control.Monad.Trans.Maybe.html#MaybeT |
| 2021-04-21 13:18:37 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 3.1) |
| 2021-04-21 13:19:57 | → | ddellacosta joins (~ddellacos@ool-44c73afa.dyn.optonline.net) |
| 2021-04-21 13:19:58 | × | ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Read error: Connection reset by peer) |
| 2021-04-21 13:21:18 | → | hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net) |
| 2021-04-21 13:26:07 | → | v01d4lph_ joins (~v01d4lph4@27.57.103.213) |
| 2021-04-21 13:26:07 | × | v01d4lph4 quits (~v01d4lph4@27.57.103.213) (Read error: Connection reset by peer) |
| 2021-04-21 13:27:08 | ← | seven_th` parts (~user@pool-96-233-64-53.bstnma.fios.verizon.net) ("ERC (IRC client for Emacs 27.2)") |
| 2021-04-21 13:27:10 | → | ep1ctetus joins (~epictetus@ip72-194-54-201.sb.sd.cox.net) |
| 2021-04-21 13:28:21 | → | safinaskar joins (6dfc5a88@109.252.90.136) |
| 2021-04-21 13:29:47 | → | carlomagno joins (~cararell@148.87.23.7) |
| 2021-04-21 13:31:23 | × | ep1ctetus quits (~epictetus@ip72-194-54-201.sb.sd.cox.net) (Read error: Connection reset by peer) |
| 2021-04-21 13:32:44 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:30fd:c878:bb31:174a) |
| 2021-04-21 13:35:31 | <safinaskar> | hi. i continue to write my lexer. i got this problem: to write function "f" with type [(a, Maybe b)] -> [(a, b)]. This function should return pairs which have "Just" at their second element. how to do this? i can write such solution: "f list = map (\(x, Just y) -> (x, y)) $ filter (isJust . snd) list". Unfortunately, this solution contains lambda |
| 2021-04-21 13:35:32 | <safinaskar> | "\(x, Just y) -> (x, y)" with potentially failing pattern. Of course, in this particular case this pattern will never fail, but in general such patterns can fail, so i think this code is ugly. Is there better way? |
| 2021-04-21 13:37:01 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:30fd:c878:bb31:174a) (Ping timeout: 245 seconds) |
| 2021-04-21 13:37:11 | <merijn> | You can (ab)use list comprehension syntax |
| 2021-04-21 13:37:55 | <merijn> | > [(x, y) | (x, Just y) <- [(True, Nothing), (False, Just 1), (True, Just 2), (True, Nothing), (False, Nothing)] |
| 2021-04-21 13:37:56 | <lambdabot> | <hint>:1:111: error: |
| 2021-04-21 13:37:57 | <lambdabot> | <hint>:1:111: error: |
| 2021-04-21 13:37:57 | <lambdabot> | parse error (possibly incorrect indentation or mismatched brackets) |
All times are in UTC.