Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-04-27 17:06:47 <monochrom> But I understand: lookupEnv "PORT" >>= \portString -> ...
2021-04-27 17:07:00 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2021-04-27 17:07:22 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Quit: WeeChat 3.0.1)
2021-04-27 17:08:17 <monochrom> Even for "fmap f m", I wouldn't say "lift".
2021-04-27 17:08:51 <monochrom> I know lots of people say "lift". I think it's because they're too lazy to really ask themselve what it would mean.
2021-04-27 17:09:16 <lechner> what does it mean, please?
2021-04-27 17:09:49 <monochrom> Why is "Effect X" higher than "X", such that fmap is "lifting" from X to "Effect X"? Why isn't it demoting?
2021-04-27 17:09:58 <monochrom> or lateral side-moving?
2021-04-27 17:10:49 × kiweun quits (~kiweun@2607:fea8:2a62:9600:d8d7:245f:2a72:5f1b) (Ping timeout: 245 seconds)
2021-04-27 17:10:51 <monochrom> "fmap f m" has the same effectful behaviour as "m", but the answer it gives is transformed by f.
2021-04-27 17:10:51 <lechner> fwiw, i actually mant "lift off" in the sense that it leaves X
2021-04-27 17:11:19 <lechner> is there a way I could use an integer port as default (which would require parseString to pass through a Maybe)?
2021-04-27 17:15:16 <monochrom> Yes but it requires knowing that Maybe is a Functor instance too, that it also has its fmap.
2021-04-27 17:15:39 <monochrom> So now you have two fmap's, one for Effect, the other for Maybe. I don't know whether it's cute or annoying to you.
2021-04-27 17:15:45 vaibhavsagar joins (vaibhavsag@gateway/shell/matrix.org/x-nutshnhfgisxgkne)
2021-04-27 17:15:46 <monochrom> But it can go like this:
2021-04-27 17:17:35 × idhugo__ quits (~idhugo@80-62-116-231-mobile.dk.customer.tdc.net) (Ping timeout: 252 seconds)
2021-04-27 17:19:15 × jonathanx quits (~jonathan@h-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2021-04-27 17:19:24 <lechner> i still like your first alternative the best. with <<< being function composition, could it also have been written as let port = (parseInt . fromMaybe) "8080" portString ?
2021-04-27 17:19:34 <monochrom> fmap (fromMaybe 8080 . fmap parseInt) lookupEnv "PORT"
2021-04-27 17:19:39 jonathanx joins (~jonathan@h-176-109.A357.priv.bahnhof.se)
2021-04-27 17:19:56 <monochrom> err
2021-04-27 17:20:00 <monochrom> fmap (fromMaybe 8080 . fmap parseInt) (lookupEnv "PORT")
2021-04-27 17:20:34 <lechner> that's getting a bit too complicated for me
2021-04-27 17:21:03 obfusk joins (~quassel@a82-161-150-56.adsl.xs4all.nl)
2021-04-27 17:21:11 nickmt joins (5b0624c1@p5b0624c1.dip0.t-ipconnect.de)
2021-04-27 17:21:23 ubert joins (~Thunderbi@91.141.3.200.wireless.dyn.drei.com)
2021-04-27 17:22:41 <lechner> i think i meant to write that instead just now let port = (parseInt . fromMaybe "8080") portString ?
2021-04-27 17:23:25 <monochrom> What does algebra say which one it is?
2021-04-27 17:23:41 <monochrom> Not intuition. Algebra.
2021-04-27 17:23:45 ADG1089 joins (~aditya@171.76.29.233)
2021-04-27 17:23:55 × ADG1089 quits (~aditya@171.76.29.233) (Client Quit)
2021-04-27 17:24:01 <nickmt> If f and g are functors I find it natural to think that `fmap (fmap id) x == id` for some `x :: g (f a)`. I'd like to prove but it seems so obvious that i don't know how start. Any hints?
2021-04-27 17:24:19 <monochrom> fmap id = id.
2021-04-27 17:25:07 × bennofs_ quits (~quassel@x4dbffbc2.dyn.telefonica.de) (Ping timeout: 260 seconds)
2021-04-27 17:27:02 × ubert quits (~Thunderbi@91.141.3.200.wireless.dyn.drei.com) (Ping timeout: 260 seconds)
2021-04-27 17:28:16 <nickmt> if  `x` is a concrete value, it's easy, e.g. `fmap (fmap id) [Just 3]` then I have `[fmap id (Just 3)]` and then [Just (id 3)] and finally [Just 3]. But I don't know how to do it if I don't know anything about the inner structure of `x` .
2021-04-27 17:29:20 <monochrom> fmap id = id.
2021-04-27 17:30:35 <nut> my cabal project depends on a c header file inside the cabal folder. How can I add it in the cabal file?
2021-04-27 17:31:04 <monochrom> Some field along the line of "c-sources"?
2021-04-27 17:31:15 <monochrom> Do you know the URL to the cabal user's guide?
2021-04-27 17:31:16 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
2021-04-27 17:31:19 <nut> c-sources: can't add header file
2021-04-27 17:31:51 <monochrom> What is "the cabal folder"?
2021-04-27 17:32:18 Varis joins (~Tadas@unaffiliated/varis)
2021-04-27 17:32:19 <nut> It's the cabal project folder
2021-04-27 17:32:30 <nickmt> @monochrom I see. Because f is a functor and the first law holds I can reduce `fmap (fmap id)` to `fmap id` and then do the same thing again because g is also a functor so `fmap id = id` . Is that it?
2021-04-27 17:32:30 <lambdabot> Unknown command, try @list
2021-04-27 17:32:35 <monochrom> The source code of Cabal itself?
2021-04-27 17:32:48 <monochrom> Yes nickmt
2021-04-27 17:33:01 <nut> I am using the inline-c package for my project and i put all c code inside a c header file
2021-04-27 17:33:02 <nickmt> thank you
2021-04-27 17:33:21 <lechner> monochrom: thanks here also!
2021-04-27 17:33:33 <sclv> nut: take a look at the bytestring cabal file for a good example of how to do this stuff
2021-04-27 17:33:33 <sclv> https://hackage.haskell.org/package/bytestring-0.11.1.0/bytestring.cabal
2021-04-27 17:34:03 <sclv> note include-dirs, includes, and install-includes
2021-04-27 17:34:23 <nut> sclv: great!
2021-04-27 17:34:28 <nut> found it
2021-04-27 17:34:38 <monochrom> So no one wants to see the user's guidee.
2021-04-27 17:34:42 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:58e6:3a0a:96a:ca2c) (Remote host closed the connection)
2021-04-27 17:35:35 <sclv> that would be another way to find this info yes: https://cabal.readthedocs.io/en/3.4/search.html?q=header&check_keywords=yes&area=default#
2021-04-27 17:35:49 <sclv> i find working by example and then checking docs to ensure i understand things to be more comfortable personally
2021-04-27 17:36:06 <enikar> monochrom: Indeed. The cabal users guide is the place to look for this question ;)
2021-04-27 17:36:11 × coot quits (~coot@37.30.50.130.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 260 seconds)
2021-04-27 17:37:42 <monochrom> Most people stop after "by example" before "checking docs".
2021-04-27 17:37:50 <monochrom> John Searle would be proud.
2021-04-27 17:39:28 <slack1256> On `wreq` is there any option so that "301 moved permanently" are followed automatically? I am using `head_`.
2021-04-27 17:39:49 <enikar> monochrom: bad.
2021-04-27 17:40:14 geekosaur joins (930099da@rrcs-147-0-153-218.central.biz.rr.com)
2021-04-27 17:41:26 <maerwald> who is responsible for haskell.org?
2021-04-27 17:42:12 <nut> monochrom: I did checked the doc. I'm a bit confused why cabal don't recompile after I made changes to the header files
2021-04-27 17:42:42 <nut> That isn't explained in the Cabal docs I think
2021-04-27 17:43:08 <sclv> maerwald: responsible for what aspect of it?
2021-04-27 17:43:24 <maerwald> website
2021-04-27 17:44:14 <sclv> oh right you're still following up on that. sigh. its the committee, which is chaired by tikhon at the moment.
2021-04-27 17:44:32 <sclv> let me try to work a side channel for you
2021-04-27 17:45:33 solidus-river joins (~mike@174.127.249.180)
2021-04-27 17:45:48 kalia joins (4c72abd3@c-76-114-171-211.hsd1.md.comcast.net)
2021-04-27 17:46:39 pgib joins (textual@lmms/pgib)
2021-04-27 17:50:22 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
2021-04-27 17:50:27 juuandyy joins (~juuandyy@90.106.228.121)
2021-04-27 17:51:42 × kalia quits (4c72abd3@c-76-114-171-211.hsd1.md.comcast.net) (Quit: Connection closed)
2021-04-27 17:52:30 <maerwald> Yes, I sent the committee an email
2021-04-27 17:53:42 × nickmt quits (5b0624c1@p5b0624c1.dip0.t-ipconnect.de) (Quit: Connection closed)
2021-04-27 17:55:28 bor0 joins (~boro@unaffiliated/boro/x-000000001)
2021-04-27 17:55:58 × conal quits (~conal@192.145.118.178) (Quit: Computer has gone to sleep.)
2021-04-27 17:56:15 chimera joins (~chimera@168-182-134-95.pool.ukrtel.net)
2021-04-27 17:58:30 M0b10s joins (94478efe@gateway/web/cgi-irc/kiwiirc.com/ip.148.71.142.254)
2021-04-27 18:00:53 <maerwald> at worst, we'll make another haskell.org fork *chuckle*
2021-04-27 18:01:14 vicfred joins (~vicfred@unaffiliated/vicfred)
2021-04-27 18:01:49 <carbolymer> YES, HAVE MY FORK -----E
2021-04-27 18:01:58 danso joins (~dan@modemcable156.91-20-96.mc.videotron.ca)
2021-04-27 18:03:15 <monochrom> Responsible parents wait after fork.
2021-04-27 18:03:32 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2021-04-27 18:03:44 × Major_Biscuit quits (~Major_Bis@82-169-100-198.biz.kpn.net) (Quit: WeeChat 3.0.1)
2021-04-27 18:04:14 <catern> apropos of nothing, if anyone has any contributions to my cursed PL iceberg let me know http://catern.com/iceberg.html
2021-04-27 18:04:43 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 252 seconds)
2021-04-27 18:05:16 <ski> joel135 : "Does haskell have the same syntax feature?" -- no
2021-04-27 18:06:03 <joel135> ok
2021-04-27 18:09:25 × Valion quits (~Valion@api.ivido.nl) (Quit: leaving)

All times are in UTC.