2021-10-23 00:02:13 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 252 seconds) |
2021-10-23 00:02:17 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) (Remote host closed the connection) |
2021-10-23 00:04:24 +0200 | reumeth | (~reumeth@user/reumeth) |
2021-10-23 00:05:10 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-10-23 00:07:38 +0200 | mjrosenb | (~mjrosenb@pool-108-54-97-96.nycmny.fios.verizon.net) |
2021-10-23 00:07:55 +0200 | <mjrosenb> | getId :: (MonadState s m) => Lens' s (IdGen a) -> m (Id) -- should this require RankNTypes? |
2021-10-23 00:08:22 +0200 | <c_wraith> | yes |
2021-10-23 00:08:37 +0200 | <mjrosenb> | is that because Lens' requires RankNTypes? |
2021-10-23 00:08:40 +0200 | <c_wraith> | no |
2021-10-23 00:08:56 +0200 | <c_wraith> | It's because Lens' has a forall inside it, and expanding it puts the forall inside the argument |
2021-10-23 00:09:28 +0200 | <mjrosenb> | that sounds like Lens' requiring RankNTypes? |
2021-10-23 00:09:45 +0200 | <c_wraith> | nah, you can write foo :: Lens' Bar Foo |
2021-10-23 00:09:52 +0200 | <c_wraith> | and the forall expands at the top level |
2021-10-23 00:10:17 +0200 | <mjrosenb> | Ahh, gotcha. |
2021-10-23 00:10:31 +0200 | <c_wraith> | This is why things in the lens library that accept optics tend to take types like ALens instead of Lens |
2021-10-23 00:11:25 +0200 | <mjrosenb> | makes sense, I'm guessing ALens is missing that forall? |
2021-10-23 00:11:49 +0200 | <mjrosenb> | can you just pass optics into functions that accept ALens? |
2021-10-23 00:11:54 +0200 | <c_wraith> | yes to both |
2021-10-23 00:12:13 +0200 | <mjrosenb> | I know there are *many* parts of lens that are completely opaque to me |
2021-10-23 00:12:17 +0200 | <mjrosenb> | like 90% at least. |
2021-10-23 00:12:32 +0200 | <c_wraith> | ALens specializes to a Functor instance that lets you extract the polymorphic version again to use it |
2021-10-23 00:12:42 +0200 | wyrd | (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds) |
2021-10-23 00:13:33 +0200 | Pickchea | (~private@user/pickchea) (Quit: Leaving) |
2021-10-23 00:14:54 +0200 | <mjrosenb> | I know all of those words separately |
2021-10-23 00:15:14 +0200 | <c_wraith> | so.. a lens is a function that's polymorphic over some Functor instance |
2021-10-23 00:16:02 +0200 | <c_wraith> | ALens is an alias for a function at a concrete Functor instance, so you can pass a lens to a function that expects ALens as an argument |
2021-10-23 00:16:04 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 00:16:34 +0200 | <c_wraith> | But the functor instance was carefully chosen so that you can make convert it back to being polymorphic over any functor |
2021-10-23 00:16:36 +0200 | <mjrosenb> | and (^.) and (.~) force the functor to be specialized in a way suitable for getting or updating? |
2021-10-23 00:17:04 +0200 | <c_wraith> | Yes. (^.) forces it to be Const, (.~) forces it to be Identity |
2021-10-23 00:17:10 +0200 | notzmv | (~zmv@user/notzmv) (Remote host closed the connection) |
2021-10-23 00:18:30 +0200 | mmhat | (~mmh@55d497bf.access.ecotel.net) (Ping timeout: 260 seconds) |
2021-10-23 00:18:54 +0200 | acidjnk_new3 | (~acidjnk@p200300d0c703cb9378de40592bee5174.dip0.t-ipconnect.de) |
2021-10-23 00:18:58 +0200 | slowButPresent | (~slowButPr@user/slowbutpresent) (Ping timeout: 260 seconds) |
2021-10-23 00:19:17 +0200 | <mjrosenb> | > polymorphic over any functor -- over absolutely any functor? or over any functors that you'd reasonably want to coerce an optic into? |
2021-10-23 00:19:18 +0200 | <lambdabot> | error: |
2021-10-23 00:19:18 +0200 | <lambdabot> | • Variable not in scope: |
2021-10-23 00:19:18 +0200 | <lambdabot> | polymorphic |
2021-10-23 00:19:23 +0200 | wyrd | (~wyrd@gateway/tor-sasl/wyrd) |
2021-10-23 00:19:35 +0200 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2021-10-23 00:19:36 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
2021-10-23 00:19:38 +0200 | allbery_b | geekosaur |
2021-10-23 00:19:52 +0200 | <c_wraith> | any |
2021-10-23 00:20:22 +0200 | <c_wraith> | :t id :: Lens' Int Int |
2021-10-23 00:20:23 +0200 | <lambdabot> | Functor f => (Int -> f Int) -> Int -> f Int |
2021-10-23 00:20:34 +0200 | <c_wraith> | any Functor! |
2021-10-23 00:22:14 +0200 | notzmv | (~zmv@user/notzmv) |
2021-10-23 00:22:36 +0200 | acidjnk_new | (~acidjnk@p200300d0c703cb93c8c758eae23fe552.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
2021-10-23 00:23:19 +0200 | gehmehgeh | (~user@user/gehmehgeh) (Quit: Leaving) |
2021-10-23 00:26:47 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 264 seconds) |
2021-10-23 00:27:05 +0200 | ec_ | (~ec@gateway/tor-sasl/ec) (Quit: ec_) |
2021-10-23 00:28:30 +0200 | jstolarek | (~jstolarek@137.220.120.162) (Ping timeout: 260 seconds) |
2021-10-23 00:28:37 +0200 | neo3 | (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 252 seconds) |
2021-10-23 00:28:45 +0200 | <mjrosenb> | :t id :: ALens' Int Int |
2021-10-23 00:28:46 +0200 | <lambdabot> | ALens' Int Int |
2021-10-23 00:28:59 +0200 | <mjrosenb> | ... I guess I should have expected that. |
2021-10-23 00:29:13 +0200 | <c_wraith> | for whatever reason, it doesn't pierce the type aliases there |
2021-10-23 00:31:07 +0200 | <c_wraith> | it's like... (Int -> Pretext (->) Int Int Int) -> Int -> Pretext (->) Int Int Int |
2021-10-23 00:31:17 +0200 | mmhat | (~mmh@55d49dd9.access.ecotel.net) |
2021-10-23 00:31:21 +0200 | <c_wraith> | and Pretext is a type I don't pretend to understand at all |
2021-10-23 00:32:05 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-10-23 00:33:34 +0200 | kupi | (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2021-10-23 00:36:14 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
2021-10-23 00:36:56 +0200 | reumeth | (~reumeth@user/reumeth) (Ping timeout: 258 seconds) |
2021-10-23 00:37:16 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-10-23 00:38:30 +0200 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2021-10-23 00:38:58 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 00:39:29 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.) |
2021-10-23 00:43:28 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 252 seconds) |
2021-10-23 00:44:57 +0200 | <hpc> | c_wraith: do you tend to understand text? |
2021-10-23 00:45:34 +0200 | <c_wraith> | nope. |
2021-10-23 00:45:54 +0200 | <hpc> | :D |
2021-10-23 00:48:02 +0200 | dhouthoo | (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.3) |
2021-10-23 00:48:03 +0200 | wonko | (~wjc@62.115.229.50) (Ping timeout: 258 seconds) |
2021-10-23 00:48:19 +0200 | tommd | (~tommd@75-164-130-101.ptld.qwest.net) |
2021-10-23 00:50:01 +0200 | manjaro-user__ | (~manjaro-u@95.85.66.41) |
2021-10-23 00:50:25 +0200 | <c_wraith> | On the other hand, I do end to understand ext |
2021-10-23 00:52:25 +0200 | manjaro-user__ | (~manjaro-u@95.85.66.41) (Quit: Konversation terminated!) |
2021-10-23 00:52:47 +0200 | f-a | (f2a@f2a.jujube.ircnow.org) () |
2021-10-23 00:58:31 +0200 | jespada | (~jespada@2803:9800:9842:7a62:c904:aff:1e1a:fc0a) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-10-23 01:02:43 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) |
2021-10-23 01:06:34 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-10-23 01:06:51 +0200 | Hecate | (~mariposa@163.172.211.189) (Changing host) |
2021-10-23 01:06:51 +0200 | Hecate | (~mariposa@user/hecate) |
2021-10-23 01:07:35 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) (Ping timeout: 264 seconds) |
2021-10-23 01:09:35 +0200 | burnsidesLlama | (~burnsides@dhcp168-036.wadham.ox.ac.uk) |
2021-10-23 01:10:53 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) |
2021-10-23 01:12:19 +0200 | acidjnk_new | (~acidjnk@p200300d0c703cb67c0866ab856626c9e.dip0.t-ipconnect.de) |
2021-10-23 01:13:41 +0200 | slowButPresent | (~slowButPr@user/slowbutpresent) |
2021-10-23 01:14:26 +0200 | Hayek | (~xxx@cpe-72-134-91-230.natsow.res.rr.com) |
2021-10-23 01:15:14 +0200 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-10-23 01:15:28 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-10-23 01:15:36 +0200 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-10-23 01:15:39 +0200 | acidjnk_new3 | (~acidjnk@p200300d0c703cb9378de40592bee5174.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
2021-10-23 01:15:49 +0200 | burnsidesLlama | (~burnsides@dhcp168-036.wadham.ox.ac.uk) (Ping timeout: 244 seconds) |
2021-10-23 01:19:06 +0200 | Hayek | (~xxx@cpe-72-134-91-230.natsow.res.rr.com) (Ping timeout: 258 seconds) |
2021-10-23 01:33:40 +0200 | acidjnk_new | (~acidjnk@p200300d0c703cb67c0866ab856626c9e.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
2021-10-23 01:36:44 +0200 | <mrianbloom> | Is there a way to get a cabal/stack project to also build a library with cmake? |
2021-10-23 01:37:13 +0200 | <sclv> | fully custom setup.hs file but please don’t |
2021-10-23 01:37:25 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
2021-10-23 01:39:51 +0200 | <mrianbloom> | What would you recommend instead? |
2021-10-23 01:40:29 +0200 | iqubic | (~user@2601:602:9502:c70:3ba1:e05a:f13:1fa6) |
2021-10-23 01:41:20 +0200 | mvk | (~mvk@2607:fea8:5cc1:300::4b63) |
2021-10-23 01:42:57 +0200 | <iqubic> | Does anyone know why MonadAccum isn't yet in mtl? Transformers has Control.Monad.Trans.Accum already. |
2021-10-23 01:43:49 +0200 | <davean> | iqubic: because edwardk has his hands under his ass and hasn't gotten a release out yet :) |
2021-10-23 01:43:54 +0200 | <davean> | its in the repository |
2021-10-23 01:44:05 +0200 | <iqubic> | I see. That's so annoying. |
2021-10-23 01:44:28 +0200 | <monochrom> | But then it should be s/mtl/transformers/ |
2021-10-23 01:45:45 +0200 | <davean> | iqubic: Uh, feel free to show up and squash release blockers I guess? |
2021-10-23 01:46:07 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-10-23 01:47:27 +0200 | <iqubic> | Basically, I want to add a 'MonadAccum w m' constraint to my function, so that I can use "add :: w -> m ()" and "look :: m w" in my function body. |
2021-10-23 01:47:30 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2021-10-23 01:47:31 +0200 | <monochrom> | https://lambdacats.github.io/fixed-in-head/ :) |
2021-10-23 01:47:47 +0200 | tommd | (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 264 seconds) |
2021-10-23 01:48:01 +0200 | <geekosaur> | I ewas under the impression mtl release was waiting on the new CLC, maybe I'm wrong |
2021-10-23 01:48:13 +0200 | <monochrom> | I misread. Sorry! You already know about transformers. |
2021-10-23 01:49:06 +0200 | tommd | (~tommd@75-164-130-101.ptld.qwest.net) |
2021-10-23 01:49:08 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 01:49:18 +0200 | <monochrom> | But if release blockers happen to be humans, do you squash them too? "If you see Buddha, kill Buddha"? >:) |
2021-10-23 01:49:22 +0200 | <davean> | https://github.com/haskell/mtl/issues/86 |
2021-10-23 01:49:33 +0200 | <iqubic> | Yes. I know that transformers has Control.Monad.Trans.AccumT. But I'd prefer to write my code in the tagless final format that mtl uses. |
2021-10-23 01:49:55 +0200 | <davean> | "Sorry, I'm behind with polishing MonadAccum, but I hope it's not holding up the release? I believe it's not necessary to ship it with the next version. But in case it is, I can speed up." specificly |
2021-10-23 01:50:14 +0200 | <davean> | There is stuff to polish, if you want MonadAccum sooner, show up and help would be my advice - its a blocker ATM |
2021-10-23 01:50:40 +0200 | <davean> | The specific thing you want is a blocker ATM |
2021-10-23 01:50:50 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-10-23 01:50:50 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-10-23 01:50:50 +0200 | wroathe | (~wroathe@user/wroathe) |
2021-10-23 01:51:00 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
2021-10-23 01:51:03 +0200 | <iqubic> | I see. That makes sense. |
2021-10-23 01:51:22 +0200 | <davean> | But like, it really should be pretty easy to move that forward |
2021-10-23 01:51:57 +0200 | dsrt^ | (~dsrt@wsip-68-227-92-38.mc.at.cox.net) |
2021-10-23 01:52:22 +0200 | hololeap | (~hololeap@user/hololeap) |
2021-10-23 01:52:31 +0200 | <iqubic> | Yeah, I guess it would be. |
2021-10-23 01:52:53 +0200 | <iqubic> | It's just that I've never contributed to a major package like this, so I have no clue how to do so. |
2021-10-23 01:53:05 +0200 | <davean> | Clone it, make some patches, start a marge request |
2021-10-23 01:53:09 +0200 | <davean> | seriously, it'll be fine |
2021-10-23 01:53:35 +0200 | <iqubic> | I don't know what patches need to be made. That's it. |
2021-10-23 01:53:44 +0200 | <davean> | Well for one theres documentation listed |
2021-10-23 01:53:47 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 264 seconds) |
2021-10-23 01:53:58 +0200 | <davean> | you'll get edits and such, you'll probably learn stuff from the process |
2021-10-23 01:54:23 +0200 | tommd | (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 265 seconds) |
2021-10-23 01:54:26 +0200 | <iqubic> | I guess I'll just let others work on this. It's not critical that I have this right now. |
2021-10-23 01:54:46 +0200 | <davean> | Seriously this is probably VERY easy |
2021-10-23 01:56:10 +0200 | <iqubic> | I know. But I'm busy with other things right now. I don't actually have the time to work on this right now. |
2021-10-23 01:56:22 +0200 | <davean> | well now you know why its not in mtl yet :) |
2021-10-23 01:57:24 +0200 | <iqubic> | I guess so. |
2021-10-23 02:02:20 +0200 | <zzz> | opensource in a nutshell |
2021-10-23 02:06:23 +0200 | mmhat | (~mmh@55d49dd9.access.ecotel.net) (Quit: WeeChat 3.3) |
2021-10-23 02:07:04 +0200 | sprout | (~quassel@2a02:a467:ccd6:1:75c6:cb1e:9970:92ae) (Ping timeout: 252 seconds) |
2021-10-23 02:09:11 +0200 | <Inst_> | curious |
2021-10-23 02:09:15 +0200 | <Inst_> | does haskel lhave anything like this already? |
2021-10-23 02:09:16 +0200 | <Inst_> | https://towardsdatascience.com/read-text-from-image-with-one-line-of-python-code-c22ede074cac |
2021-10-23 02:09:33 +0200 | <Inst_> | or, if it doesn't, how hard would it be to reimplement this in haskell? would there also be FOSS issues? |
2021-10-23 02:14:11 +0200 | myShoggoth | (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 264 seconds) |
2021-10-23 02:15:29 +0200 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) |
2021-10-23 02:15:50 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
2021-10-23 02:16:18 +0200 | <Cajun> | did a tiny bit of digging and found a library meant for solving captchas.. so it definitely can be done :P |
2021-10-23 02:16:20 +0200 | tommd | (~tommd@75-164-130-101.ptld.qwest.net) |
2021-10-23 02:16:29 +0200 | <Cajun> | `antigate` to be specific |
2021-10-23 02:16:49 +0200 | Lord_of_Life_ | Lord_of_Life |
2021-10-23 02:17:35 +0200 | jgeerds | (~jgeerds@55d40de2.access.ecotel.net) (Ping timeout: 265 seconds) |
2021-10-23 02:20:24 +0200 | sprout | (~quassel@2a02:a467:ccd6:1:5d6e:87c6:1a95:cc2d) |
2021-10-23 02:20:44 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-10-23 02:21:23 +0200 | tommd | (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 264 seconds) |
2021-10-23 02:22:02 +0200 | <Cajun> | -and hackage's tagging system leaves many features to be desired- (how do i do strikethough?) |
2021-10-23 02:23:17 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 02:23:47 +0200 | Inst_ | (~Inst@2601:6c4:4080:3f80:e9cf:d82f:5daa:fcc1) (Ping timeout: 264 seconds) |
2021-10-23 02:24:59 +0200 | sprout | (~quassel@2a02:a467:ccd6:1:5d6e:87c6:1a95:cc2d) (Ping timeout: 264 seconds) |
2021-10-23 02:25:03 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 244 seconds) |
2021-10-23 02:28:06 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 258 seconds) |
2021-10-23 02:30:34 +0200 | waleee | (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 260 seconds) |
2021-10-23 02:30:59 +0200 | <Cajun> | ah it doesnt seem like the library does any of the actual heavy lifting, just sending it to a website to do it for you. lazy AND boring.. |
2021-10-23 02:32:32 +0200 | lbseale | (~lbseale@user/ep1ctetus) (Read error: Connection reset by peer) |
2021-10-23 02:35:22 +0200 | tommd | (~tommd@75-164-130-101.ptld.qwest.net) |
2021-10-23 02:36:21 +0200 | Player001 | (~Player001@user/player001) (Quit: Quitting) |
2021-10-23 02:38:47 +0200 | mvk | (~mvk@2607:fea8:5cc1:300::4b63) (Ping timeout: 264 seconds) |
2021-10-23 02:39:49 +0200 | tommd | (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 265 seconds) |
2021-10-23 02:44:09 +0200 | Inst_ | (~Inst@2601:6c4:4080:3f80:5872:8a70:85c4:9bd4) |
2021-10-23 02:46:55 +0200 | MQ-17J | (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
2021-10-23 02:49:32 +0200 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2021-10-23 02:49:47 +0200 | img | (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-10-23 02:51:14 +0200 | img | (~img@user/img) |
2021-10-23 02:51:54 +0200 | MQ-17J | (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
2021-10-23 02:52:48 +0200 | m5zs7k | (aquares@web10.mydevil.net) (Quit: m5zs7k) |
2021-10-23 02:53:05 +0200 | <xsperry> | Inst_, python is just interacting with libraries written in other languages (OpenCV and PyTesseract), which you can do in haskell as well. cursory glance at hackage shows bindings for both libraries, but I'm not sure how well they are maintained |
2021-10-23 02:53:15 +0200 | tommd | (~tommd@75-164-130-101.ptld.qwest.net) |
2021-10-23 02:53:24 +0200 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 258 seconds) |
2021-10-23 02:53:27 +0200 | <xsperry> | OpenCV and Tesseract* |
2021-10-23 02:53:43 +0200 | sprout | (~quassel@2a02:a467:ccd6:1:5d6e:87c6:1a95:cc2d) |
2021-10-23 02:54:34 +0200 | img | (~img@user/img) (Client Quit) |
2021-10-23 02:55:13 +0200 | m5zs7k | (aquares@web10.mydevil.net) |
2021-10-23 02:55:56 +0200 | img | (~img@user/img) |
2021-10-23 02:57:21 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 02:57:36 +0200 | tommd | (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 244 seconds) |
2021-10-23 02:58:06 +0200 | alzgh | (~alzgh@user/alzgh) (Remote host closed the connection) |
2021-10-23 02:58:14 +0200 | m5zs7k | (aquares@web10.mydevil.net) (Client Quit) |
2021-10-23 02:58:39 +0200 | m5zs7k | (aquares@web10.mydevil.net) |
2021-10-23 03:01:55 +0200 | mestre | (~mestre@191.177.175.57) (Quit: Lost terminal) |
2021-10-23 03:02:11 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 264 seconds) |
2021-10-23 03:02:45 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-10-23 03:03:02 +0200 | Player001 | (~Player001@user/player001) |
2021-10-23 03:06:10 +0200 | m5zs7k | (aquares@web10.mydevil.net) (Quit: m5zs7k) |
2021-10-23 03:08:00 +0200 | m5zs7k | (aquares@web10.mydevil.net) |
2021-10-23 03:11:13 +0200 | tommd | (~tommd@75-164-130-101.ptld.qwest.net) |
2021-10-23 03:12:00 +0200 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2021-10-23 03:13:07 +0200 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2021-10-23 03:16:20 +0200 | Nosrep | (~archbox@user/nosrep) (Quit: WeeChat 3.3) |
2021-10-23 03:16:22 +0200 | tommd | (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 252 seconds) |
2021-10-23 03:18:38 +0200 | neurocyte0132889 | (~neurocyte@user/neurocyte) (Ping timeout: 260 seconds) |
2021-10-23 03:20:46 +0200 | sprout | (~quassel@2a02:a467:ccd6:1:5d6e:87c6:1a95:cc2d) (Ping timeout: 252 seconds) |
2021-10-23 03:30:30 +0200 | brainfreeze | (~brainfree@2a03:1b20:4:f011::20d) |
2021-10-23 03:31:08 +0200 | wei2912 | (~wei2912@138.75.71.147) |
2021-10-23 03:32:30 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 03:32:50 +0200 | <kronicmage> | hey can anyone here help with a linear types problem? |
2021-10-23 03:33:01 +0200 | <kronicmage> | i'm trying to return an (Ur Int, Array Int) |
2021-10-23 03:33:20 +0200 | <kronicmage> | o wait nvm my bad |
2021-10-23 03:33:31 +0200 | <kronicmage> | getting rid of ($) and using brackets fixed my problem |
2021-10-23 03:34:49 +0200 | <pavonia> | What is Ur? |
2021-10-23 03:34:52 +0200 | harveypwca | (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
2021-10-23 03:35:05 +0200 | <kronicmage> | from linear-base by tweag |
2021-10-23 03:35:30 +0200 | <kronicmage> | it's their container for getting unrestricted/nonlinear stuff out of linear datatypes |
2021-10-23 03:36:53 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 244 seconds) |
2021-10-23 03:37:06 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 258 seconds) |
2021-10-23 03:40:18 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-10-23 03:41:17 +0200 | <Cajun> | could someone explain the whole idea behind linear-base? does adding explicit linear signatures allow the compiler to do anything special? or am i just entirely misunderstanding what linear types are for |
2021-10-23 03:42:15 +0200 | sprout | (~quassel@2a02:a467:ccd6:1:5d6e:87c6:1a95:cc2d) |
2021-10-23 03:42:41 +0200 | myShoggoth | (~myShoggot@97-120-85-195.ptld.qwest.net) |
2021-10-23 03:45:08 +0200 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3) |
2021-10-23 03:51:01 +0200 | xff0x | (~xff0x@2001:1a81:5287:aa00:fcfc:7af3:e2b:ab16) (Ping timeout: 252 seconds) |
2021-10-23 03:51:05 +0200 | <rtpg> | @Cajun I think that without linear-base you would not be able to use anything in base on linear variables, as the type signatures in base don't describe linearness |
2021-10-23 03:51:05 +0200 | <lambdabot> | Unknown command, try @list |
2021-10-23 03:52:58 +0200 | xff0x | (~xff0x@2001:1a81:52c0:f300:645b:c6c7:cd20:13be) |
2021-10-23 03:56:00 +0200 | <Cajun> | oh alright i see, yeah makes sense. the motivation section of the proposal also cleared it up. very neat addition |
2021-10-23 04:07:14 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 04:12:28 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 252 seconds) |
2021-10-23 04:12:54 +0200 | dsrt^ | (~dsrt@wsip-68-227-92-38.mc.at.cox.net) (Remote host closed the connection) |
2021-10-23 04:13:23 +0200 | emergence | (~emergence@vm0.max-p.me) (Ping timeout: 246 seconds) |
2021-10-23 04:13:35 +0200 | emergence | (~emergence@vm0.max-p.me) |
2021-10-23 04:14:36 +0200 | stefan-__ | (~cri@42dots.de) (Excess Flood) |
2021-10-23 04:14:47 +0200 | stefan-_ | (~cri@42dots.de) |
2021-10-23 04:18:53 +0200 | NiKaN | (sid385034@id-385034.helmsley.irccloud.com) (Ping timeout: 258 seconds) |
2021-10-23 04:19:04 +0200 | econo | (uid147250@user/econo) (Ping timeout: 252 seconds) |
2021-10-23 04:19:15 +0200 | scav | (sid309693@id-309693.helmsley.irccloud.com) (Read error: Connection reset by peer) |
2021-10-23 04:19:16 +0200 | agander_m | (sid407952@id-407952.tinside.irccloud.com) (Ping timeout: 245 seconds) |
2021-10-23 04:19:16 +0200 | cbarrett | (sid192934@id-192934.helmsley.irccloud.com) (Ping timeout: 258 seconds) |
2021-10-23 04:19:16 +0200 | cln | (sid336875@id-336875.ilkley.irccloud.com) (Ping timeout: 258 seconds) |
2021-10-23 04:19:26 +0200 | tapas_ | (sid467876@id-467876.ilkley.irccloud.com) |
2021-10-23 04:19:39 +0200 | dpratt_ | (sid193493@id-193493.helmsley.irccloud.com) (Ping timeout: 258 seconds) |
2021-10-23 04:19:39 +0200 | bjs | (sid190364@user/bjs) (Read error: Connection reset by peer) |
2021-10-23 04:19:41 +0200 | JSharp | (sid4580@id-4580.lymington.irccloud.com) (Ping timeout: 245 seconds) |
2021-10-23 04:19:41 +0200 | gmc | (sid58314@id-58314.ilkley.irccloud.com) (Ping timeout: 245 seconds) |
2021-10-23 04:19:41 +0200 | tapas | (sid467876@id-467876.ilkley.irccloud.com) (Ping timeout: 245 seconds) |
2021-10-23 04:19:41 +0200 | tapas_ | tapas |
2021-10-23 04:19:42 +0200 | angerman_ | (sid209936@id-209936.ilkley.irccloud.com) |
2021-10-23 04:19:43 +0200 | meinside | (uid24933@id-24933.helmsley.irccloud.com) (Read error: Connection reset by peer) |
2021-10-23 04:20:05 +0200 | jonrh | (sid5185@ilkley.irccloud.com) (Read error: Connection reset by peer) |
2021-10-23 04:20:06 +0200 | NemesisD | (sid24071@id-24071.lymington.irccloud.com) (Ping timeout: 245 seconds) |
2021-10-23 04:20:13 +0200 | S11001001 | (sid42510@ilkley.irccloud.com) (Read error: Connection reset by peer) |
2021-10-23 04:20:15 +0200 | mrianbloom | (sid350277@ilkley.irccloud.com) (Read error: Connection reset by peer) |
2021-10-23 04:20:23 +0200 | econo | (uid147250@user/econo) |
2021-10-23 04:20:25 +0200 | angerman | (sid209936@id-209936.ilkley.irccloud.com) (Ping timeout: 258 seconds) |
2021-10-23 04:20:27 +0200 | rtpg | (sid443069@ilkley.irccloud.com) (Read error: Connection reset by peer) |
2021-10-23 04:20:27 +0200 | pepeiborra | (sid443799@ilkley.irccloud.com) (Read error: Connection reset by peer) |
2021-10-23 04:20:27 +0200 | SethTisue__ | (sid14912@ilkley.irccloud.com) (Read error: Connection reset by peer) |
2021-10-23 04:20:43 +0200 | bw | (sid2730@user/betawaffle) (Ping timeout: 252 seconds) |
2021-10-23 04:20:44 +0200 | dpratt_ | (sid193493@helmsley.irccloud.com) |
2021-10-23 04:20:44 +0200 | scav | (sid309693@helmsley.irccloud.com) |
2021-10-23 04:20:47 +0200 | sa1 | (sid7690@ilkley.irccloud.com) (Ping timeout: 264 seconds) |
2021-10-23 04:20:52 +0200 | ysh | (sid6017@ilkley.irccloud.com) (Read error: Connection reset by peer) |
2021-10-23 04:20:55 +0200 | rune | (sid21167@ilkley.irccloud.com) (Read error: Connection reset by peer) |
2021-10-23 04:20:56 +0200 | caasih | (sid13241@ilkley.irccloud.com) (Read error: Connection reset by peer) |
2021-10-23 04:20:58 +0200 | edwardk | (sid47016@haskell/developer/edwardk) (Read error: Connection reset by peer) |
2021-10-23 04:21:00 +0200 | hook54321 | (sid149355@user/hook54321) (Read error: Connection reset by peer) |
2021-10-23 04:21:02 +0200 | supersven | (sid501114@ilkley.irccloud.com) (Read error: Connection reset by peer) |
2021-10-23 04:21:02 +0200 | ProofTechnique | (sid79547@ilkley.irccloud.com) (Read error: Connection reset by peer) |
2021-10-23 04:21:08 +0200 | agander_m | (sid407952@tinside.irccloud.com) |
2021-10-23 04:21:11 +0200 | bjs | (sid190364@user/bjs) |
2021-10-23 04:21:12 +0200 | cbarrett | (sid192934@helmsley.irccloud.com) |
2021-10-23 04:21:21 +0200 | vito | (sid1962@user/vito) (Ping timeout: 245 seconds) |
2021-10-23 04:21:21 +0200 | bradparker | (sid262931@id-262931.uxbridge.irccloud.com) (Ping timeout: 245 seconds) |
2021-10-23 04:21:28 +0200 | bradparker_ | (sid262931@uxbridge.irccloud.com) |
2021-10-23 04:21:40 +0200 | NiKaN | (sid385034@helmsley.irccloud.com) |
2021-10-23 04:21:50 +0200 | eruditass | (uid248673@id-248673.uxbridge.irccloud.com) (Ping timeout: 260 seconds) |
2021-10-23 04:21:57 +0200 | aarchi | (sid486183@id-486183.uxbridge.irccloud.com) (Ping timeout: 258 seconds) |
2021-10-23 04:22:22 +0200 | jonrh | (sid5185@id-5185.ilkley.irccloud.com) |
2021-10-23 04:22:22 +0200 | aarchi | (sid486183@id-486183.uxbridge.irccloud.com) |
2021-10-23 04:22:23 +0200 | S11001001 | (sid42510@id-42510.ilkley.irccloud.com) |
2021-10-23 04:22:24 +0200 | mrianbloom | (sid350277@id-350277.ilkley.irccloud.com) |
2021-10-23 04:22:25 +0200 | cln | (sid336875@id-336875.ilkley.irccloud.com) |
2021-10-23 04:22:31 +0200 | NemesisD | (sid24071@id-24071.lymington.irccloud.com) |
2021-10-23 04:22:32 +0200 | meinside | (uid24933@helmsley.irccloud.com) |
2021-10-23 04:22:32 +0200 | vito | (sid1962@user/vito) |
2021-10-23 04:22:33 +0200 | gmc | (sid58314@id-58314.ilkley.irccloud.com) |
2021-10-23 04:22:34 +0200 | angerman_ | angerman |
2021-10-23 04:22:35 +0200 | pepeiborra | (sid443799@id-443799.ilkley.irccloud.com) |
2021-10-23 04:22:38 +0200 | SethTisue__ | (sid14912@id-14912.ilkley.irccloud.com) |
2021-10-23 04:22:53 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 04:22:56 +0200 | supersven | (sid501114@ilkley.irccloud.com) |
2021-10-23 04:22:59 +0200 | sa1 | (sid7690@ilkley.irccloud.com) |
2021-10-23 04:23:00 +0200 | eruditass | (uid248673@id-248673.uxbridge.irccloud.com) |
2021-10-23 04:23:01 +0200 | ysh | (sid6017@id-6017.ilkley.irccloud.com) |
2021-10-23 04:23:05 +0200 | edwardk | (sid47016@haskell/developer/edwardk) |
2021-10-23 04:23:06 +0200 | caasih | (sid13241@id-13241.ilkley.irccloud.com) |
2021-10-23 04:23:09 +0200 | bw | (sid2730@user/betawaffle) |
2021-10-23 04:23:15 +0200 | ProofTechnique | (sid79547@id-79547.ilkley.irccloud.com) |
2021-10-23 04:23:15 +0200 | rtpg | (sid443069@ilkley.irccloud.com) |
2021-10-23 04:24:12 +0200 | rune | (sid21167@id-21167.ilkley.irccloud.com) |
2021-10-23 04:24:20 +0200 | hook54321 | (sid149355@user/hook54321) |
2021-10-23 04:24:45 +0200 | Psybur | (~Psybur@mobile-166-170-29-82.mycingular.net) (Remote host closed the connection) |
2021-10-23 04:26:46 +0200 | ishutin | (~ishutin@94-21-131-99.pool.digikabel.hu) (Ping timeout: 260 seconds) |
2021-10-23 04:27:51 +0200 | <mjrosenb> | I have a bit of code that I feel should not compile, but it does. |
2021-10-23 04:28:10 +0200 | <mjrosenb> | inFlightLen <- use $ flatrisState . FM.inFlight . to length |
2021-10-23 04:28:38 +0200 | <mjrosenb> | in particular FM.inFlight is a lens for a (Map foo bar), not a list. |
2021-10-23 04:29:08 +0200 | <mjrosenb> | (It used to be a list, but I've updated it, and am going through uses of it, but it just compiled, and this use hasn't been updated) |
2021-10-23 04:29:18 +0200 | <mjrosenb> | is lens doing something funny here? |
2021-10-23 04:30:46 +0200 | caasih | (sid13241@id-13241.ilkley.irccloud.com) (Ping timeout: 258 seconds) |
2021-10-23 04:30:46 +0200 | vito | (sid1962@user/vito) (Ping timeout: 258 seconds) |
2021-10-23 04:30:46 +0200 | NemesisD | (sid24071@id-24071.lymington.irccloud.com) (Ping timeout: 258 seconds) |
2021-10-23 04:31:10 +0200 | rune | (sid21167@id-21167.ilkley.irccloud.com) (Ping timeout: 252 seconds) |
2021-10-23 04:31:21 +0200 | aria | (sid380617@id-380617.lymington.irccloud.com) (Ping timeout: 245 seconds) |
2021-10-23 04:31:21 +0200 | gonz___ | (sid304396@id-304396.lymington.irccloud.com) (Ping timeout: 245 seconds) |
2021-10-23 04:31:32 +0200 | T_S_ | (sid501726@id-501726.uxbridge.irccloud.com) (Ping timeout: 258 seconds) |
2021-10-23 04:31:35 +0200 | ProofTechnique | (sid79547@id-79547.ilkley.irccloud.com) (Ping timeout: 264 seconds) |
2021-10-23 04:31:35 +0200 | edwardk | (sid47016@haskell/developer/edwardk) (Ping timeout: 264 seconds) |
2021-10-23 04:31:35 +0200 | angerman | (sid209936@id-209936.ilkley.irccloud.com) (Ping timeout: 264 seconds) |
2021-10-23 04:31:43 +0200 | gmc | (sid58314@id-58314.ilkley.irccloud.com) (Ping timeout: 252 seconds) |
2021-10-23 04:31:43 +0200 | cln | (sid336875@id-336875.ilkley.irccloud.com) (Ping timeout: 252 seconds) |
2021-10-23 04:31:43 +0200 | mrianbloom | (sid350277@id-350277.ilkley.irccloud.com) (Ping timeout: 252 seconds) |
2021-10-23 04:31:43 +0200 | jonrh | (sid5185@id-5185.ilkley.irccloud.com) (Ping timeout: 252 seconds) |
2021-10-23 04:31:55 +0200 | S11001001 | (sid42510@id-42510.ilkley.irccloud.com) (Ping timeout: 258 seconds) |
2021-10-23 04:31:55 +0200 | tapas | (sid467876@id-467876.ilkley.irccloud.com) (Ping timeout: 258 seconds) |
2021-10-23 04:32:04 +0200 | <mjrosenb> | and, I guess a better quesion: is it doing what I want it to do, or is it doing something wrong, like synthesizing a list of length 1 (that contains a Map foo bar), and giving the length of that? |
2021-10-23 04:32:16 +0200 | eruditass | (uid248673@id-248673.uxbridge.irccloud.com) (Ping timeout: 252 seconds) |
2021-10-23 04:32:18 +0200 | aarchi | (sid486183@id-486183.uxbridge.irccloud.com) (Ping timeout: 258 seconds) |
2021-10-23 04:32:20 +0200 | hendi | (sid489601@id-489601.lymington.irccloud.com) (Ping timeout: 260 seconds) |
2021-10-23 04:32:20 +0200 | nrr_ | (sid20938@id-20938.lymington.irccloud.com) (Ping timeout: 260 seconds) |
2021-10-23 04:32:27 +0200 | aria | (sid380617@lymington.irccloud.com) |
2021-10-23 04:32:38 +0200 | NemesisD | (sid24071@lymington.irccloud.com) |
2021-10-23 04:32:41 +0200 | ysh | (sid6017@id-6017.ilkley.irccloud.com) (Ping timeout: 258 seconds) |
2021-10-23 04:32:47 +0200 | hook54321 | (sid149355@user/hook54321) (Ping timeout: 264 seconds) |
2021-10-23 04:32:47 +0200 | SethTisue__ | (sid14912@id-14912.ilkley.irccloud.com) (Ping timeout: 264 seconds) |
2021-10-23 04:32:47 +0200 | pepeiborra | (sid443799@id-443799.ilkley.irccloud.com) (Ping timeout: 264 seconds) |
2021-10-23 04:32:52 +0200 | gmc | (sid58314@ilkley.irccloud.com) |
2021-10-23 04:33:09 +0200 | aarchi | (sid486183@uxbridge.irccloud.com) |
2021-10-23 04:33:16 +0200 | vito | (sid1962@user/vito) |
2021-10-23 04:33:25 +0200 | T_S_ | (sid501726@uxbridge.irccloud.com) |
2021-10-23 04:33:37 +0200 | gonz___ | (sid304396@lymington.irccloud.com) |
2021-10-23 04:33:42 +0200 | hendi | (sid489601@lymington.irccloud.com) |
2021-10-23 04:33:45 +0200 | ishutin | (~ishutin@92-249-141-159.pool.digikabel.hu) |
2021-10-23 04:33:45 +0200 | rune | (sid21167@ilkley.irccloud.com) |
2021-10-23 04:33:45 +0200 | SethTisue__ | (sid14912@ilkley.irccloud.com) |
2021-10-23 04:33:51 +0200 | nrr_ | (sid20938@lymington.irccloud.com) |
2021-10-23 04:33:59 +0200 | ysh | (sid6017@ilkley.irccloud.com) |
2021-10-23 04:34:12 +0200 | ProofTechnique | (sid79547@ilkley.irccloud.com) |
2021-10-23 04:34:14 +0200 | edwardk | (sid47016@haskell/developer/edwardk) |
2021-10-23 04:35:13 +0200 | <awpr> | :t length |
2021-10-23 04:35:14 +0200 | <lambdabot> | Foldable t => t a -> Int |
2021-10-23 04:35:36 +0200 | JSharp | (sid4580@lymington.irccloud.com) |
2021-10-23 04:35:42 +0200 | cln | (sid336875@ilkley.irccloud.com) |
2021-10-23 04:35:44 +0200 | <mjrosenb> | oh, emacs is lying to me. It is giving me [a] -> Int |
2021-10-23 04:35:56 +0200 | <dsal> | :t Data.List.length |
2021-10-23 04:35:57 +0200 | <lambdabot> | Foldable t => t a -> Int |
2021-10-23 04:35:57 +0200 | <mjrosenb> | although I guess switching to Data.Map.Size will be faster? |
2021-10-23 04:36:17 +0200 | <awpr> | hmm, weird. maybe some stale HLS data that hasn't accounted for the changed type yet? |
2021-10-23 04:36:39 +0200 | <mjrosenb> | I have absolutely no clue where emacs is getting its data from |
2021-10-23 04:36:41 +0200 | <c_wraith> | mjrosenb: should be the same. length is part of the class, so it can be efficient |
2021-10-23 04:36:44 +0200 | <mjrosenb> | probably not HLS |
2021-10-23 04:36:53 +0200 | tapas | (sid467876@ilkley.irccloud.com) |
2021-10-23 04:36:58 +0200 | jonrh | (sid5185@ilkley.irccloud.com) |
2021-10-23 04:37:00 +0200 | pepeiborra | (sid443799@ilkley.irccloud.com) |
2021-10-23 04:37:00 +0200 | mrianbloom | (sid350277@ilkley.irccloud.com) |
2021-10-23 04:37:06 +0200 | <mjrosenb> | I wouldn't be surprised if someone added in a bunch of hard-coded signatures in like 7.6 |
2021-10-23 04:37:29 +0200 | <awpr> | `length` is a proper method of `Foldable`, so well-written instances typically implement it with something more efficient than the `foldMap (const (Sum 1))` thing |
2021-10-23 04:38:32 +0200 | angerman | (sid209936@ilkley.irccloud.com) |
2021-10-23 04:38:32 +0200 | caasih | (sid13241@ilkley.irccloud.com) |
2021-10-23 04:38:37 +0200 | S11001001 | (sid42510@ilkley.irccloud.com) |
2021-10-23 04:39:01 +0200 | <mjrosenb> | well, then I'll change that back to length :-) |
2021-10-23 04:40:35 +0200 | td_ | (~td@94.134.91.189) (Ping timeout: 264 seconds) |
2021-10-23 04:42:09 +0200 | td_ | (~td@muedsl-82-207-238-090.citykom.de) |
2021-10-23 04:43:15 +0200 | UpstreamSalmon | (uid12077@hampstead.irccloud.com) |
2021-10-23 04:43:25 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 260 seconds) |
2021-10-23 04:44:51 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2021-10-23 04:46:57 +0200 | eruditass | (uid248673@uxbridge.irccloud.com) |
2021-10-23 04:47:55 +0200 | hook54321 | (sid149355@user/hook54321) |
2021-10-23 04:48:34 +0200 | <davean> | hlint? |
2021-10-23 04:48:40 +0200 | <davean> | Its insane :) |
2021-10-23 04:58:49 +0200 | <Inst_> | hmm, what do people think about ocaml vs haskell? |
2021-10-23 04:58:55 +0200 | <Inst_> | ocaml apparently has two major advantages over haskell |
2021-10-23 04:58:57 +0200 | Inst_ | Inst |
2021-10-23 04:59:15 +0200 | <Inst> | one, OCaml's compilers are fast, whereas GHC takes me 15 seconds on a Xeon to compile even the simplest stuff |
2021-10-23 04:59:45 +0200 | <ghoulguy> | with practice you'll get faster, though |
2021-10-23 04:59:49 +0200 | <Inst> | two, OcaML apparently has a superior parallel |
2021-10-23 04:59:54 +0200 | <Inst> | compile, not code |
2021-10-23 05:00:02 +0200 | <Inst> | parallel cost model, whatever that means |
2021-10-23 05:01:10 +0200 | <dsal> | I used to program in ocaml a couple decades ago. It was kind of neat. I did like that I had native binaries out of my program running on my SunOS 4.1.4 machine. |
2021-10-23 05:01:20 +0200 | <dsal> | Haskell is way more comfortable, though. |
2021-10-23 05:01:52 +0200 | <Inst> | I assume parallel cost model is baked into the language design, unfortunately |
2021-10-23 05:02:20 +0200 | <Inst> | you might end up needing a PHaskell or something like that for implementing a parallel cost model comparable to OCaml, but then again, someone needs to either fix GHC or make a faster compiler |
2021-10-23 05:02:27 +0200 | <Inst> | even Target is complaining about how long it takes for GHC to run |
2021-10-23 05:04:13 +0200 | <mjrosenb> | Target? |
2021-10-23 05:13:42 +0200 | <c_wraith> | I don't understand how people make ghc take so long. |
2021-10-23 05:13:58 +0200 | <c_wraith> | Unless they're using TH for things that don't need it |
2021-10-23 05:15:09 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2021-10-23 05:16:13 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2021-10-23 05:16:13 +0200 | MQ-17J | (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
2021-10-23 05:16:18 +0200 | <Inst> | quick, dumb question |
2021-10-23 05:16:28 +0200 | <Inst> | i was told to avoid Template Haskell like the plague? |
2021-10-23 05:16:34 +0200 | <Inst> | why is GHC getting pissed off when I put a pipe? |
2021-10-23 05:16:45 +0200 | MQ-17J | (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
2021-10-23 05:17:10 +0200 | <Inst> | https://pastebin.com/m8m9bEbi |
2021-10-23 05:17:10 +0200 | MQ-17J | (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
2021-10-23 05:17:32 +0200 | MQ-17J | (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
2021-10-23 05:18:50 +0200 | <tapas> | it needs a let binding, a return statement to lift the bmiTell string into a monad, and some tact because why tf would you post that publicly |
2021-10-23 05:19:08 +0200 | <Inst> | thanks, it's cribbing do |
2021-10-23 05:19:13 +0200 | <Inst> | that's why it's failing |
2021-10-23 05:19:26 +0200 | <Inst> | and taken from Learn Me A Haskell |
2021-10-23 05:19:36 +0200 | <Inst> | just trying to figure out how to get guards to work |
2021-10-23 05:19:41 +0200 | <Inst> | in a compiled environment |
2021-10-23 05:20:11 +0200 | shapr | (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 264 seconds) |
2021-10-23 05:20:13 +0200 | <mjrosenb> | learn you a haskell? |
2021-10-23 05:20:39 +0200 | <Inst> | ya |
2021-10-23 05:21:04 +0200 | <Inst> | http://learnyouahaskell.com/syntax-in-functions#guards-guards |
2021-10-23 05:21:05 +0200 | <tapas> | sigh. |
2021-10-23 05:21:40 +0200 | <tapas> | why tf did they write that -.- |
2021-10-23 05:21:48 +0200 | <awpr> | personally I make GHC take so long by using GHC.Generics on a record with enough fields to make the inliner give up |
2021-10-23 05:22:41 +0200 | <Inst> | i'm told LYAH is terrible |
2021-10-23 05:22:46 +0200 | <Inst> | and you should be using haskell book etc instead |
2021-10-23 05:23:03 +0200 | <tapas> | Inst: the syntax is <func name> <arg1> ... <argN> | <guard1> = ... | <guard2> = ... | ... | otherwise = ... |
2021-10-23 05:23:21 +0200 | <mjrosenb> | I have a bunch of templates just because of lens. |
2021-10-23 05:23:27 +0200 | <Inst> | i guess it's more my problem with trying to figure out how to hack a .hs file into compiling |
2021-10-23 05:23:27 +0200 | <tapas> | you can do similar things with patterns in case statements |
2021-10-23 05:23:40 +0200 | <tapas> | > Inst> i'm told LYAH is terrible |
2021-10-23 05:23:42 +0200 | <lambdabot> | error: Data constructor not in scope: Insterror: |
2021-10-23 05:23:42 +0200 | <lambdabot> | Variable not in scope: i'm :: t0 -> t1 -> t2 -> t3 -> a0error: |
2021-10-23 05:23:42 +0200 | <lambdabot> | • Variable not in scope: told |
2021-10-23 05:23:43 +0200 | <tapas> | yeah. |
2021-10-23 05:23:46 +0200 | <mjrosenb> | and 'otherwise' isn't actually necessary, it is just an alias for True, since | True = "looks weird" |
2021-10-23 05:23:48 +0200 | <tapas> | hate that book lmao |
2021-10-23 05:24:11 +0200 | <mjrosenb> | and is also not actually needed if the previous cases handle everything. |
2021-10-23 05:24:12 +0200 | dwt_ | (~dwt_@c-98-200-58-177.hsd1.tx.comcast.net) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-10-23 05:30:57 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 258 seconds) |
2021-10-23 05:32:05 +0200 | <Inst> | mjrosenb: |
2021-10-23 05:32:39 +0200 | <Inst> | Target built a bunch of Haskell systems, it's an American grocery / department store |
2021-10-23 05:32:53 +0200 | <Inst> | their head dev on Quora / stackexchange went and bitched about GHC's long compile times |
2021-10-23 05:33:24 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-10-23 05:34:45 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
2021-10-23 05:35:03 +0200 | <Cajun> | i remember reading the first few pages of Learn You a Haskell and man was it just not a fun or educational experience. picking up a 'real' textbook will always be better |
2021-10-23 05:35:28 +0200 | <Inst> | HYAh probably should be B& or something |
2021-10-23 05:35:39 +0200 | <Inst> | it's a painful textbook and I'm glad someone explained to me it's crap |
2021-10-23 05:35:49 +0200 | <tapas> | can we just collectively forget it exists? that may be easier |
2021-10-23 05:35:57 +0200 | <Inst> | the fact that it's freely available online is horrible because everyone just goes to LYAh |
2021-10-23 05:36:07 +0200 | <Inst> | tapas: it's listed on haskellwiki |
2021-10-23 05:36:18 +0200 | <tapas> | rip |
2021-10-23 05:38:10 +0200 | <awpr> | I never really know what to recommend when people ask. I keep being tempted to just buy HPFFP and judge it for myself, but I can't get over the feeling that $60 wouldn't be worth it just to decide whether it's worth recommending |
2021-10-23 05:38:50 +0200 | betelgeuse | (~betelgeus@94-225-47-8.access.telenet.be) (Ping timeout: 260 seconds) |
2021-10-23 05:42:10 +0200 | <Cajun> | i would recommend `Programming in Haskell` because it was a pretty pleasant intro to the language, but i have no experience with other introductory textbooks |
2021-10-23 05:43:10 +0200 | zebrag | (~chris@user/zebrag) (Quit: Konversation terminated!) |
2021-10-23 05:44:14 +0200 | <Cajun> | though for some reason it doesnt cover some language features like putting @ in front of a pattern anywhere and i dont know why. there was another thing too but i cant remember it off the top of my head, but its very minor |
2021-10-23 05:45:20 +0200 | <brainfreeze> | Is that the Graham Hutton one? I can vouch for that one. Plus he's got lectures for the book on his youtube channel, so you can LARP like he's your teacher! |
2021-10-23 05:45:49 +0200 | alx741 | (~alx741@186.178.108.23) (Quit: alx741) |
2021-10-23 05:46:01 +0200 | dwt_ | (~dwt_@c-98-200-58-177.hsd1.tx.comcast.net) |
2021-10-23 05:46:14 +0200 | <Cajun> | yes its the Graham Hutton one. it also has some nice specialist chapters at the end, but i think i skipped the last one or two |
2021-10-23 05:46:46 +0200 | <Cajun> | i really dont like how an explanation of lazy evaluation is one of the last chapters, but it is what it is |
2021-10-23 05:48:08 +0200 | <Cajun> | it also provides further reading to papers on stuff from the chapter at the end of each, which are nice for those who want to get into the more academic side |
2021-10-23 05:50:36 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2021-10-23 05:52:08 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2021-10-23 05:55:48 +0200 | <Inst> | given that i tend to study with multiple textbooks, i would be an excellent reviewer of haskell textboks |
2021-10-23 05:55:59 +0200 | <Inst> | except that i'm not competent enough to judge all the intro textbooks i have coming in |
2021-10-23 05:56:40 +0200 | <mjrosenb> | putting @ in front of a pattern, not as part of a pattern? |
2021-10-23 05:57:11 +0200 | <Cajun> | mjrosenb: like `foo tup@(a,b) = tup` |
2021-10-23 05:57:54 +0200 | <mjrosenb> | ok, yeah. I've always thought of that as part of a pattern. |
2021-10-23 05:58:09 +0200 | <Cajun> | oh yeah the other thing it didnt cover was irrefutable patterns |
2021-10-23 05:59:52 +0200 | <mjrosenb> | I have never once needed those, and am vaguely aware of when they're necessary. |
2021-10-23 06:00:30 +0200 | <mjrosenb> | I would not be surprised if there were a bunch of places that I put awful hacks in place that could have been solved with an irrefutable pattern |
2021-10-23 06:01:36 +0200 | <mjrosenb> | ok, question: how do I use ^@..? the indexed portion of lens has always been kind of opaque to me, and I'm trying with some simple cases, and the types are not lining up. |
2021-10-23 06:02:55 +0200 | aegon | (~mike@174.127.249.180) (Quit: leaving) |
2021-10-23 06:03:29 +0200 | <mjrosenb> | ahh, searching for itoListOf on google is *way* better than searching for ^@.. |
2021-10-23 06:03:38 +0200 | <mjrosenb> | which I assume it is discarding as nonsense |
2021-10-23 06:03:59 +0200 | <mjrosenb> | since why would that sequence of non-alphanumeric characters ever have meaning? |
2021-10-23 06:04:10 +0200 | <awpr> | Haddock JS search feature works great for operators, if you already know what package it's in |
2021-10-23 06:04:22 +0200 | <awpr> | (hit 's' anywhere in a package's docs) |
2021-10-23 06:05:48 +0200 | azimut_ | (~azimut@gateway/tor-sasl/azimut) |
2021-10-23 06:05:58 +0200 | <Cajun> | i seriously dislike how search engines seem to sometimes erase symbols and sometimes dont, and some of them are shortcut commands when first. its all a complete mess |
2021-10-23 06:06:33 +0200 | <mjrosenb> | that takes me to its definition, but but the lens docs are missing examples for these functions. |
2021-10-23 06:07:25 +0200 | <Cajun> | maybe the documentation in optics will make sense? the use case is analogous, but the representation is different |
2021-10-23 06:07:44 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 244 seconds) |
2021-10-23 06:07:56 +0200 | <Cajun> | ( https://hackage.haskell.org/package/optics-0.4/docs/Optics.html#g:21 ) this specifically |
2021-10-23 06:09:12 +0200 | <mjrosenb> | Cajun: that's what google pointed me to when I searched from itoListOf :-) |
2021-10-23 06:09:33 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds) |
2021-10-23 06:09:37 +0200 | <mjrosenb> | also, it looks like I need to s/traversed/itraversed/ in order to use that function |
2021-10-23 06:10:10 +0200 | <Cajun> | youll probably have to switch to indexed versions to get the types to match |
2021-10-23 06:10:26 +0200 | <Cajun> | since instead of `s t a b` it uses `i s t a b` |
2021-10-23 06:11:09 +0200 | <mjrosenb> | A great sentiment to have when working with lenses. |
2021-10-23 06:11:14 +0200 | <Cajun> | or i guess just `i s a` , which is quite a bit less entertaining |
2021-10-23 06:11:31 +0200 | <awpr> | an indexed lens `i s a` lens too |
2021-10-23 06:12:48 +0200 | <Cajun> | i was getting optics and lens mixed up :P |
2021-10-23 06:20:04 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 252 seconds) |
2021-10-23 06:21:18 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) (Remote host closed the connection) |
2021-10-23 06:22:30 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-10-23 06:27:13 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
2021-10-23 06:29:41 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 06:34:10 +0200 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 260 seconds) |
2021-10-23 06:37:07 +0200 | son0p | (~ff@181.136.122.143) (Ping timeout: 252 seconds) |
2021-10-23 06:43:18 +0200 | slowButPresent | (~slowButPr@user/slowbutpresent) (Quit: leaving) |
2021-10-23 06:53:11 +0200 | wei2912 | (~wei2912@138.75.71.147) (Ping timeout: 264 seconds) |
2021-10-23 07:04:52 +0200 | <awpr> | hmm, HPFFP already has a fair number of things that either weirdly out of order, confusingly worded, or just straight up wrong if interpreted in the most likely way |
2021-10-23 07:06:54 +0200 | <awpr> | "The `$` function evaluates everything to its right first and can thereby be used to delay function application." I see what they're trying to say, but I think most people will read this as "it causes the rhs argument to be evaluated before applying the function", which it doesn't do |
2021-10-23 07:08:47 +0200 | <awpr> | so uh, is all the beginner learning material like this? it does do some really nice things like show counterexamples of bad indentation and what errors that'd cause, and go out of the way to clarify some common misconceptions |
2021-10-23 07:10:27 +0200 | <awpr> | but it just kinda name-drops redexes in the first real section and then forgets about them for at least the rest of the 100-page free sample |
2021-10-23 07:10:53 +0200 | <Cajun> | i didnt find anything explicitly confusing other than the diagrams of Applicative machinery and Monad machinery in PiH. it also doesnt go out of the way to clarify misconceptions, i do like when a textbook shows you "oh, this code errored! why? well...." |
2021-10-23 07:11:53 +0200 | <awpr> | yeah, it's doing a very good job of that so far |
2021-10-23 07:19:34 +0200 | MQ-17J | (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
2021-10-23 07:20:44 +0200 | <awpr> | wait _what_? I've never seen anybody line up equals signs between a top-level definition and the bindings of its where-clause |
2021-10-23 07:20:46 +0200 | MQ-17J | (~MQ-17J@8.21.10.17) |
2021-10-23 07:20:47 +0200 | myShoggoth | (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 264 seconds) |
2021-10-23 07:21:48 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) |
2021-10-23 07:21:53 +0200 | <awpr> | it's like if Mondrian decided to try his hand at writing Haskell code |
2021-10-23 07:27:29 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) (Ping timeout: 258 seconds) |
2021-10-23 07:28:44 +0200 | dyeplexer | (~dyeplexer@user/dyeplexer) |
2021-10-23 07:29:40 +0200 | <mjrosenb> | awpr: link? |
2021-10-23 07:30:12 +0200 | <awpr> | to the HPFFP sample? https://lorepub.com/product/haskellbook |
2021-10-23 07:30:52 +0200 | wei2912 | (~wei2912@138.75.71.147) |
2021-10-23 07:31:28 +0200 | <mjrosenb> | in particular, the weird alignment |
2021-10-23 07:31:47 +0200 | <awpr> | ah, it's page 37, but I can pastebin it |
2021-10-23 07:33:00 +0200 | <awpr> | https://paste.tomsmeding.com/ZjVHHag1 |
2021-10-23 07:33:19 +0200 | <mjrosenb> | danke. |
2021-10-23 07:34:29 +0200 | <mjrosenb> | TBF, I've avoided using where clauses when they can also be top level definitions, in part because I never liked the way they indented |
2021-10-23 07:34:32 +0200 | <mjrosenb> | but |
2021-10-23 07:34:40 +0200 | <mjrosenb> | *that* is not the solution to my problem. |
2021-10-23 07:36:57 +0200 | <awpr> | although I do also prefer a style some people will think is weird for where clauses: indent the keyword a half-step less than the expression, and the bindings the same as the expression https://paste.tomsmeding.com/aG9KTXd1 |
2021-10-23 07:37:58 +0200 | <hololeap> | awpr: I do that too, more or less |
2021-10-23 07:38:11 +0200 | Alleria | (~textual@user/alleria) (Ping timeout: 264 seconds) |
2021-10-23 07:38:56 +0200 | <hololeap> | I use 4-space indents and use a half indent (2 spaces) for the where keyword. everything else is pretty standard |
2021-10-23 07:39:01 +0200 | <Cajun> | i dont believe the x=5 should be directly after "where," looks weird |
2021-10-23 07:39:35 +0200 | <awpr> | yeah, 4/2 vs. 2/1 is just the orthogonal choice of how big a tab stop is |
2021-10-23 07:39:43 +0200 | <hololeap> | although if I have a very short where clause with only one definition, I might give 'where' a full indentation and put the definition on the same line after it |
2021-10-23 07:39:54 +0200 | <Cajun> | "whatever is default" is my number of spaces |
2021-10-23 07:40:10 +0200 | bontaq | (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 260 seconds) |
2021-10-23 07:40:42 +0200 | awpr | heads off to check if vim can render a half-width space so I can use 1/0.5 |
2021-10-23 07:41:00 +0200 | <hololeap> | haha probably not |
2021-10-23 07:41:50 +0200 | ski | confusedly wonders what this "half indent" thing could be |
2021-10-23 07:43:00 +0200 | myShoggoth | (~myShoggot@97-120-85-195.ptld.qwest.net) |
2021-10-23 07:45:03 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
2021-10-23 07:45:07 +0200 | <int-e> | can't wait for the PR to ghc that changes indent width type to Double and correctly accounts for various space widths *runs* |
2021-10-23 07:45:59 +0200 | <int-e> | s/Double/Rational/ |
2021-10-23 07:46:09 +0200 | <int-e> | (let's be clean) |
2021-10-23 07:46:12 +0200 | ski | was just thinking `CReal' .. |
2021-10-23 07:46:14 +0200 | <Cajun> | why not be even uglier and use Float |
2021-10-23 07:47:13 +0200 | <int-e> | Oh and a pragma to declare the font being used. |
2021-10-23 07:47:15 +0200 | <ski> | (apropos, i noticed (from someone else's query) that `CReal' doesn't seem to be imported in lambdabot any longer ..) |
2021-10-23 07:47:31 +0200 | <int-e> | Hmm. Maybe flesh it out for next year's April Fool's day... |
2021-10-23 07:52:03 +0200 | InstX1 | (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) |
2021-10-23 07:53:47 +0200 | <int-e> | Hmm. I don't remember whether there was an actual issue with the package (safehaskell) or whether it's just a victim of me reducing dependencies a few years ago... |
2021-10-23 07:55:02 +0200 | <ski> | yea (i think i've noticed it before, but seeing that interaction recently reminded me of it) |
2021-10-23 07:55:17 +0200 | <int-e> | @let import Data.Number.CReal |
2021-10-23 07:55:19 +0200 | <lambdabot> | Defined. |
2021-10-23 07:55:35 +0200 | <int-e> | > pi :: CReal |
2021-10-23 07:55:36 +0200 | <lambdabot> | Could not find module ‘Data.Number.CReal’ |
2021-10-23 07:55:36 +0200 | <lambdabot> | Use -v (or `:set -v` in ghci) to see a list of the files searched for.Could ... |
2021-10-23 07:55:36 +0200 | <lambdabot> | Use -v (or `:set -v` in ghci) to see a list of the files searched for. |
2021-10-23 07:55:47 +0200 | <int-e> | huh? |
2021-10-23 07:55:51 +0200 | <int-e> | @undef |
2021-10-23 07:55:51 +0200 | <lambdabot> | Undefined. |
2021-10-23 07:55:53 +0200 | <c_wraith> | > () |
2021-10-23 07:55:54 +0200 | <lambdabot> | () |
2021-10-23 07:55:59 +0200 | <c_wraith> | Oh, you undef'd it |
2021-10-23 07:58:44 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2021-10-23 07:59:06 +0200 | InstX1 | (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 260 seconds) |
2021-10-23 08:03:51 +0200 | <int-e> | Oh, I think I know what went wrong there. @let is checking imports against the wrong environment... ouch |
2021-10-23 08:04:01 +0200 | myShoggoth | (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 252 seconds) |
2021-10-23 08:04:01 +0200 | zmt00 | (~zmt00@user/zmt00) (Ping timeout: 252 seconds) |
2021-10-23 08:04:09 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-10-23 08:04:26 +0200 | harveypwca | (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
2021-10-23 08:04:56 +0200 | <int-e> | @let import Data.Number.CReal |
2021-10-23 08:04:57 +0200 | <lambdabot> | Defined. |
2021-10-23 08:04:58 +0200 | <int-e> | > pi :: CReal |
2021-10-23 08:04:59 +0200 | <lambdabot> | 3.1415926535897932384626433832795028841972 |
2021-10-23 08:06:09 +0200 | <int-e> | @undef |
2021-10-23 08:06:09 +0200 | <lambdabot> | Undefined. |
2021-10-23 08:06:11 +0200 | <int-e> | > pi :: CReal |
2021-10-23 08:06:12 +0200 | <lambdabot> | 3.1415926535897932384626433832795028841972 |
2021-10-23 08:07:25 +0200 | <int-e> | > text $ showCReal 200 pi |
2021-10-23 08:07:27 +0200 | <lambdabot> | 3.14159265358979323846264338327950288419716939937510582097494459230781640628... |
2021-10-23 08:08:56 +0200 | <ski> | najs :) |
2021-10-23 08:14:08 +0200 | reumeth | (~reumeth@user/reumeth) |
2021-10-23 08:18:28 +0200 | <gentauro> | int-e: that `type` reminds me of `South Park` (Al Gore) |
2021-10-23 08:23:34 +0200 | <gentauro> | > :t text |
2021-10-23 08:23:35 +0200 | <lambdabot> | <hint>:1:1: error: parse error on input ‘:’ |
2021-10-23 08:23:59 +0200 | <gentauro> | > text |
2021-10-23 08:24:01 +0200 | <lambdabot> | <[Char] -> Doc> |
2021-10-23 08:24:22 +0200 | <ski> | @type text |
2021-10-23 08:24:24 +0200 | <lambdabot> | String -> Doc |
2021-10-23 08:24:45 +0200 | <gentauro> | int-e: is it this `text`? https://hackage.haskell.org/package/text |
2021-10-23 08:25:03 +0200 | <gentauro> | last time (many years) when I tried to use it with `Safe-Haskell` it exploded :o |
2021-10-23 08:25:06 +0200 | <gentauro> | is it fixed by now? |
2021-10-23 08:25:20 +0200 | <c_wraith> | No, it's from a pretty-printing library |
2021-10-23 08:25:41 +0200 | <gentauro> | c_wraith: aha |
2021-10-23 08:33:30 +0200 | <awpr> | > text ":t id" |
2021-10-23 08:33:31 +0200 | <lambdabot> | :t id |
2021-10-23 08:33:57 +0200 | <gentauro> | kind of interesting "blogpost series" https://byorgey.wordpress.com/2021/10/14/competitive-programming-in-haskell-bfs-part-1/ |
2021-10-23 08:34:01 +0200 | <awpr> | guess the bots aren't on speaking terms with each other |
2021-10-23 08:34:02 +0200 | <c_wraith> | lambdabot's outputs all start with space, and it ignores anything that starts with a space. |
2021-10-23 08:34:10 +0200 | <gentauro> | I have been looking into trying do something similar |
2021-10-23 08:34:41 +0200 | <gentauro> | but, as it's only allowed to use `base` and only submit one file, it all becomes "clumsy" (lack of `submodules`) :( |
2021-10-23 08:34:54 +0200 | <pavonia> | gentauro: Maybe we should make that one of our mottoes: "Haskell -- our values are super CReal" |
2021-10-23 08:35:30 +0200 | <gentauro> | pavonia: I was hopping that they already used a similar description for the package ;) |
2021-10-23 08:36:30 +0200 | emf | (~emf@2620:10d:c090:400::5:bb17) (Quit: emf) |
2021-10-23 08:37:30 +0200 | <gentauro> | awpr: are there still multiple bots here in #haskell? |
2021-10-23 08:37:44 +0200 | <gentauro> | % :t show |
2021-10-23 08:37:44 +0200 | <yahb> | gentauro: Show a => a -> String |
2021-10-23 08:37:48 +0200 | <gentauro> | yep |
2021-10-23 08:37:48 +0200 | <jackdk> | > :t show |
2021-10-23 08:37:50 +0200 | <lambdabot> | <hint>:1:1: error: parse error on input ‘:’ |
2021-10-23 08:37:50 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2021-10-23 08:37:58 +0200 | <jackdk> | @botsnack sorry lambdabot |
2021-10-23 08:37:58 +0200 | <lambdabot> | :) |
2021-10-23 08:38:03 +0200 | <gentauro> | there is the `%` and the `>` |
2021-10-23 08:39:33 +0200 | <gentauro> | has somebody came up with a `snippet` that makes yahb post a new `> …` to lambdabot and then lambdabot to post a new `% …` to yahb? |
2021-10-23 08:39:43 +0200 | gentauro | some people just want to se the world burn xD |
2021-10-23 08:40:24 +0200 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-10-23 08:41:05 +0200 | <gentauro> | % show "@let import Data.Number.CReal" |
2021-10-23 08:41:05 +0200 | <yahb> | gentauro: "\"@let import Data.Number.CReal\"" |
2021-10-23 08:41:05 +0200 | <awpr> | hmm, `> 42` is apparently an invalid nick |
2021-10-23 08:41:10 +0200 | <ski> | istr we played this game, last time (preflex ?) we had multiple bots |
2021-10-23 08:41:24 +0200 | <brainfreeze> | Is there a way to stop the list monad on a certain condition? Kind of like the guard function, but won't produce duplicates and would just be a single valued list. |
2021-10-23 08:41:32 +0200 | <awpr> | I was hoping to hijack its reply syntax to turn it into a cons constructor, but I guess I can't |
2021-10-23 08:41:39 +0200 | UpstreamSalmon | (uid12077@hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2021-10-23 08:41:49 +0200 | <gentauro> | % "@let import Data.Number.CReal" |
2021-10-23 08:41:50 +0200 | <yahb> | gentauro: "@let import Data.Number.CReal" |
2021-10-23 08:41:56 +0200 | <ski> | brainfreeze : example ? |
2021-10-23 08:43:02 +0200 | <gentauro> | brainfreeze: wouldn't that requiere some kind of `Ord a`? and you can't specify any context in a Monad (the reason we can have monads for Dictionaries/HashTables) |
2021-10-23 08:44:46 +0200 | <brainfreeze> | ski: https://paste.tomsmeding.com/5SdgMX60 |
2021-10-23 08:46:18 +0200 | <brainfreeze> | So basically, I'm just using the list monad to get all the combinations. I'm sure there may be a better answer, but that's what I came up with. |
2021-10-23 08:47:15 +0200 | <Cajun> | gotta love list as the brute-force enabler, always too tempted to use it rather than some algorithmic approach |
2021-10-23 08:47:35 +0200 | <ski> | (gentauro : s/can/can't/ ?) |
2021-10-23 08:47:39 +0200 | <nitrix> | If it works for Prolog... :P |
2021-10-23 08:48:18 +0200 | ski | ought to go back attempting to reverse-engineer a Prolog system .. |
2021-10-23 08:48:24 +0200 | <ski> | (.. for Commodore 64) |
2021-10-23 08:48:37 +0200 | fef | (~thedawn@user/thedawn) |
2021-10-23 08:48:55 +0200 | <ski> | brainfreeze : example input, with expected/desired output ? |
2021-10-23 08:51:09 +0200 | <[exa]> | brainfreeze: if you can sort `xs` (O(n log n)), you can walk it parallelly from the beginning and end without guessing, getting all combinations in just O(n log n + n) instead of O(n^2) |
2021-10-23 08:52:18 +0200 | retro_ | (~retro@2e41e9c8.skybroadband.com) |
2021-10-23 08:52:19 +0200 | <gentauro> | ski: yeah, you are right (I had the first can't, but forgot the second) |
2021-10-23 08:52:59 +0200 | <brainfreeze> | ski: https://paste.tomsmeding.com/Vo9Xj8ew comments have the input and current/desired output |
2021-10-23 08:55:10 +0200 | retroid_ | (~retro@2e41e9c8.skybroadband.com) (Ping timeout: 252 seconds) |
2021-10-23 08:55:23 +0200 | <[exa]> | brainfreeze: you can do something like `xts <- tails xs; a:bs <- xts; b <- bs` but it's still gonna be slow |
2021-10-23 08:57:43 +0200 | <[exa]> | (correction: `(a:bs) <- tails xs; b<-bs; ...` ) |
2021-10-23 08:58:08 +0200 | <gentauro> | brainfreeze: you need somekind of `distinct . order` functionality :0 |
2021-10-23 08:59:18 +0200 | gentauro | with the `distinct` you need to reorder the created `tuple` => (x,y) => (min x y, max x y) |
2021-10-23 09:00:31 +0200 | <ski> | % :t comparing |
2021-10-23 09:00:32 +0200 | <yahb> | ski: Ord a => (b -> a) -> b -> b -> Ordering |
2021-10-23 09:00:35 +0200 | <ski> | % :let equating :: Eq a => (b -> a) -> (b -> b -> Ordering); equating f = (==) `on` f |
2021-10-23 09:00:35 +0200 | <yahb> | ski: unknown command ':let'; use :? for help. |
2021-10-23 09:00:56 +0200 | <ski> | % let equating :: Eq a => (b -> a) -> (b -> b -> Ordering); equating f = (==) `on` f |
2021-10-23 09:00:56 +0200 | <yahb> | ski: ; <interactive>:100:72: error:; * Couldn't match type `Bool' with `Ordering'; Expected: b -> b -> Ordering; Actual: b -> b -> Bool; * In the expression: (==) `on` f; In an equation for `equating': equating f = (==) `on` f |
2021-10-23 09:01:36 +0200 | <ski> | oh, i always mix the order up there .. |
2021-10-23 09:01:50 +0200 | <ski> | % let equating :: Eq a => (b -> a) -> (b -> b -> Ordering); equating f = f `on` (==) |
2021-10-23 09:01:50 +0200 | <yahb> | ski: ; <interactive>:101:72: error:; * Couldn't match type `a' with `b -> Ordering'; Expected: b -> b -> Ordering; Actual: b -> a; `a' is a rigid type variable bound by; the type signature for:; equating :: forall a b. Eq a => (b -> a) -> b -> b -> Ordering; at <interactive>:101:5-56; * In the first argument of `on', namely `f'; In the expression: f `on |
2021-10-23 09:02:46 +0200 | <ski> | % let equating :: Eq a => (b -> a) -> (b -> b -> Bool); equating f = (==) `on` f; nubOn :: Eq b => (a -> b) -> [a] -> [a]; nubOn = nubBy . equating |
2021-10-23 09:02:46 +0200 | <yahb> | ski: |
2021-10-23 09:02:59 +0200 | <ski> | % [ x | x <- [0,1,0,2,0,1,0,3],then nubOn by x] |
2021-10-23 09:02:59 +0200 | <yahb> | ski: [0,1,2,3] |
2021-10-23 09:03:20 +0200 | <ski> | brainfreeze : anyway, that ^ seems to work |
2021-10-23 09:03:28 +0200 | <ski> | @hoogle nubOn |
2021-10-23 09:03:28 +0200 | <lambdabot> | Data.List.Extra nubOn :: Eq b => (a -> b) -> [a] -> [a] |
2021-10-23 09:03:28 +0200 | <lambdabot> | Extra nubOn :: Eq b => (a -> b) -> [a] -> [a] |
2021-10-23 09:03:28 +0200 | <lambdabot> | Turtle.Prelude nubOn :: Ord b => (a -> b) -> Shell a -> Shell a |
2021-10-23 09:04:06 +0200 | <ski> | (and no, getting just `514579' isn't possible) |
2021-10-23 09:04:45 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 260 seconds) |
2021-10-23 09:05:25 +0200 | <gentauro> | brainfreeze: something like this -> `Data.List.sort $ map (\(x,y) -> (min x y, max x y)) $ cp [0..2] [0..2]` where cp is: `cp xs ys = (,) <$> xs <*> ys` |
2021-10-23 09:05:41 +0200 | <gentauro> | brainfreeze: you can easily make a distinct with that list ;) |
2021-10-23 09:05:55 +0200 | <gentauro> | s/list/sorted list/ |
2021-10-23 09:06:20 +0200 | <gentauro> | `[(0,0),(0,1),(0,1),(0,2),(0,2),(1,1),(1,2),(1,2),(2,2)]` |
2021-10-23 09:06:22 +0200 | <ski> | @hoogle Ord b => (a -> b) -> [a] -> [a] |
2021-10-23 09:06:23 +0200 | <lambdabot> | Data.List sortOn :: Ord b => (a -> b) -> [a] -> [a] |
2021-10-23 09:06:23 +0200 | <lambdabot> | GHC.Exts sortWith :: Ord b => (a -> b) -> [a] -> [a] |
2021-10-23 09:06:23 +0200 | <lambdabot> | GHC.OldList sortOn :: Ord b => (a -> b) -> [a] -> [a] |
2021-10-23 09:07:28 +0200 | <ski> | > [(x,y) | ys@(x:_) <- [0 .. 3],y <- ys] |
2021-10-23 09:07:29 +0200 | <lambdabot> | error: |
2021-10-23 09:07:29 +0200 | <lambdabot> | • No instance for (Num [()]) arising from a use of ‘e_103’ |
2021-10-23 09:07:29 +0200 | <lambdabot> | • In the expression: e_103 |
2021-10-23 09:07:39 +0200 | <ski> | > [(x,y) | ys@(x:_) <- tails [0 .. 3],y <- ys] |
2021-10-23 09:07:41 +0200 | <lambdabot> | [(0,0),(0,1),(0,2),(0,3),(1,1),(1,2),(1,3),(2,2),(2,3),(3,3)] |
2021-10-23 09:07:50 +0200 | <ski> | > [(x,y) | x:ys <- tails [0 .. 3],y <- ys] |
2021-10-23 09:07:52 +0200 | <lambdabot> | [(0,1),(0,2),(0,3),(1,2),(1,3),(2,3)] |
2021-10-23 09:07:59 +0200 | <brainfreeze> | That nub function seems like exactly what I was looking for! Terribly named, yeesh. |
2021-10-23 09:08:12 +0200 | <ski> | (a nice way to only grab ordered pairs from the same list) |
2021-10-23 09:08:27 +0200 | <gentauro> | brainfreeze: `nub` has a bad asymtotic complexity if I recall correctly |
2021-10-23 09:08:35 +0200 | <ski> | yea, quadratic |
2021-10-23 09:09:13 +0200 | <gentauro> | ski: nice list comprehension |
2021-10-23 09:09:21 +0200 | <ski> | if your lists are sorted, you should be able to define and use a `nubOrd :: Ord a => [a] -> [a]' that only checks adjacent elements for duplicates |
2021-10-23 09:09:28 +0200 | <gentauro> | sorted and not duplicated. ME GUSTA |
2021-10-23 09:09:39 +0200 | <jackdk> | look for there are many functions called `ordNub` on hoogle |
2021-10-23 09:09:44 +0200 | <ski> | (i wouldn't be surprised if this is defined in some package) |
2021-10-23 09:10:06 +0200 | <[exa]> | I realized there's a problem with `tails`, if there was 1010 in the input it wouldn't trigger |
2021-10-23 09:10:12 +0200 | <brainfreeze> | It's just for practice, so I think that's fine. I really like the idea of "sorting and walking one list forward and one backwards" too. I'll give that a shot. |
2021-10-23 09:10:14 +0200 | <[exa]> | jackdk: (map head.group) |
2021-10-23 09:10:14 +0200 | <jackdk> | many alternative preludes provide one, but I'd probably reach for the one in witherable, because I have a soft spot for that package |
2021-10-23 09:10:16 +0200 | <gentauro> | ski: it seems that brainfreeze list isn't sorted: `-- example input: [1721, 979, 366,299,675,1456]` |
2021-10-23 09:10:24 +0200 | <ski> | (hm, or i guess it would only actually need to be `Eq a => [a] -> [a]' still) |
2021-10-23 09:11:19 +0200 | <jackdk> | [exa]: noice. |
2021-10-23 09:11:58 +0200 | <[exa]> | jackdk: fun how you only need Eq at that point |
2021-10-23 09:12:27 +0200 | segfaultfizzbuzz | (~segfaultf@135-180-0-138.static.sonic.net) |
2021-10-23 09:13:40 +0200 | ikex | (ash@user/ikex) (Ping timeout: 258 seconds) |
2021-10-23 09:13:48 +0200 | <[exa]> | brainfreeze: the sort&walk seems to work fine here, just for xs=[1..2000] the difference in speed can be felt a lot :] |
2021-10-23 09:14:23 +0200 | ikex | (~ash@user/ikex) |
2021-10-23 09:15:17 +0200 | <[exa]> | (but yeah it's uglier, there's like 5 cases to take care of :] ) |
2021-10-23 09:15:32 +0200 | <ski> | for `a + b', perhaps it could be nicer if `a' walked `xs' from the front, and `b' walked it from the back .. |
2021-10-23 09:16:15 +0200 | <ski> | (in the case `xs' is sorted, that is .. which is not the case in the given examples, as noted) |
2021-10-23 09:16:38 +0200 | <[exa]> | still sorting is going to be faster than the list binding |
2021-10-23 09:16:46 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 09:18:08 +0200 | <[exa]> | (fun hint: you can actually split the list to (<=1010) and (>=1010) parts to save some extra sorting power) |
2021-10-23 09:21:23 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 264 seconds) |
2021-10-23 09:22:23 +0200 | max22- | (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
2021-10-23 09:24:29 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) |
2021-10-23 09:28:51 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) (Ping timeout: 245 seconds) |
2021-10-23 09:29:16 +0200 | alzgh | (~alzgh@user/alzgh) |
2021-10-23 09:30:25 +0200 | segfaultfizzbuzz | (~segfaultf@135-180-0-138.static.sonic.net) (Ping timeout: 260 seconds) |
2021-10-23 09:36:38 +0200 | econo | (uid147250@user/econo) (Quit: Connection closed for inactivity) |
2021-10-23 09:37:33 +0200 | acidjnk_new | (~acidjnk@p200300d0c703cb67c0866ab856626c9e.dip0.t-ipconnect.de) |
2021-10-23 09:42:12 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
2021-10-23 09:49:34 +0200 | phma | (~phma@host-67-44-209-75.hnremote.net) (Read error: Connection reset by peer) |
2021-10-23 09:50:30 +0200 | phma | (~phma@host-67-44-208-32.hnremote.net) |
2021-10-23 09:51:34 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 09:56:05 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 260 seconds) |
2021-10-23 10:01:50 +0200 | _ht | (~quassel@82-169-194-8.biz.kpn.net) |
2021-10-23 10:05:38 +0200 | hendursa1 | (~weechat@user/hendursaga) |
2021-10-23 10:08:27 +0200 | <Unhammer> | Do I have to `stack clean` if I add -threaded to ghc-options? It doesn't seem to do much when I `stack build` after toggling it |
2021-10-23 10:08:45 +0200 | hendursaga | (~weechat@user/hendursaga) (Ping timeout: 276 seconds) |
2021-10-23 10:08:46 +0200 | <Unhammer> | (it says Preprocessing, Building, Linking but doesn't go through each file – should it?) |
2021-10-23 10:09:54 +0200 | hendursa1 | (~weechat@user/hendursaga) (Remote host closed the connection) |
2021-10-23 10:10:22 +0200 | hendursa1 | (~weechat@user/hendursaga) |
2021-10-23 10:11:41 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) |
2021-10-23 10:12:39 +0200 | <Unhammer> | hm, sending +RTS -N4 works when threaded but not without threaded so I guess recompiling when just toggling threading is fast then :) |
2021-10-23 10:13:03 +0200 | <Unhammer> | Does -threaded have an effect on library sections in .cabal? |
2021-10-23 10:15:11 +0200 | neo3 | (~neo3@cpe-292712.ip.primehome.com) |
2021-10-23 10:16:01 +0200 | <hololeap> | Unhammer: I don't think so, I think it only effects the runtime system |
2021-10-23 10:17:59 +0200 | <hololeap> | along with -threaded you can also add -rtsopts=-N4 to make that the default for the binary (or -N to have it try to autodetect the number of cores available) |
2021-10-23 10:21:07 +0200 | Guest16 | (~Guest16@122.164.27.104) |
2021-10-23 10:22:36 +0200 | Guest16 | (~Guest16@122.164.27.104) (Client Quit) |
2021-10-23 10:22:56 +0200 | cufussed | (~cufussed@122.164.27.104) |
2021-10-23 10:23:17 +0200 | coot | (~coot@37.30.49.107.nat.umts.dynamic.t-mobile.pl) |
2021-10-23 10:26:33 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 10:27:49 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-10-23 10:27:58 +0200 | mikoto-chan | (~mikoto-ch@185.237.102.115) |
2021-10-23 10:29:05 +0200 | fendor | (~fendor@77.119.192.109.wireless.dyn.drei.com) |
2021-10-23 10:30:07 +0200 | Gurkenglas | (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
2021-10-23 10:31:35 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 264 seconds) |
2021-10-23 10:37:35 +0200 | jgeerds | (~jgeerds@55d40de2.access.ecotel.net) |
2021-10-23 10:38:13 +0200 | wei2912 | (~wei2912@138.75.71.147) (Quit: Lost terminal) |
2021-10-23 10:40:46 +0200 | brainfreeze | (~brainfree@2a03:1b20:4:f011::20d) (Quit: Leaving) |
2021-10-23 10:43:04 +0200 | cufussed | (~cufussed@122.164.27.104) (Quit: Client closed) |
2021-10-23 10:52:54 +0200 | gehmehgeh | (~user@user/gehmehgeh) |
2021-10-23 11:00:17 +0200 | mikoto-chan | (~mikoto-ch@185.237.102.115) (Read error: Connection reset by peer) |
2021-10-23 11:00:46 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 11:01:12 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 244 seconds) |
2021-10-23 11:03:16 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 11:05:47 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 264 seconds) |
2021-10-23 11:08:38 +0200 | hendursa1 | (~weechat@user/hendursaga) (Remote host closed the connection) |
2021-10-23 11:09:06 +0200 | hendursa1 | (~weechat@user/hendursaga) |
2021-10-23 11:11:56 +0200 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2021-10-23 11:17:50 +0200 | rk04 | (~rk04@user/rajk) |
2021-10-23 11:23:11 +0200 | notzmv | (~zmv@user/notzmv) (Ping timeout: 264 seconds) |
2021-10-23 11:23:45 +0200 | Farzad | (~FarzadBek@178.131.24.167) |
2021-10-23 11:26:00 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) |
2021-10-23 11:30:06 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) (Ping timeout: 245 seconds) |
2021-10-23 11:30:43 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-10-23 11:31:18 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 11:31:45 +0200 | jonatan | (~nate@h85-8-60-194.cust.a3fiber.se) (Remote host closed the connection) |
2021-10-23 11:33:14 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 244 seconds) |
2021-10-23 11:33:36 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 11:37:58 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 252 seconds) |
2021-10-23 11:38:55 +0200 | rk04 | (~rk04@user/rajk) (Ping timeout: 244 seconds) |
2021-10-23 11:39:56 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-10-23 11:40:24 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-10-23 11:41:38 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 265 seconds) |
2021-10-23 11:43:36 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 11:46:15 +0200 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2021-10-23 11:47:11 +0200 | cross | (~cross@spitfire.i.gajendra.net) (Ping timeout: 245 seconds) |
2021-10-23 11:49:09 +0200 | rk04 | (~rk04@user/rajk) |
2021-10-23 11:49:10 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds) |
2021-10-23 11:49:21 +0200 | cross | (~cross@spitfire.i.gajendra.net) |
2021-10-23 11:50:56 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 11:55:27 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 244 seconds) |
2021-10-23 11:56:10 +0200 | shriekingnoise | (~shrieking@186.137.144.80) (Quit: Quit) |
2021-10-23 11:57:15 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 11:57:44 +0200 | rk04 | (~rk04@user/rajk) (Ping timeout: 258 seconds) |
2021-10-23 11:59:35 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-10-23 12:02:54 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 265 seconds) |
2021-10-23 12:04:34 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 12:07:50 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 12:09:40 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 265 seconds) |
2021-10-23 12:09:49 +0200 | mestre | (~mestre@191.177.175.57) |
2021-10-23 12:10:01 +0200 | mc47 | (~mc47@xmonad/TheMC47) |
2021-10-23 12:10:51 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 12:10:53 +0200 | Hanicef | (~gustaf@81-229-9-108-no92.tbcn.telia.com) |
2021-10-23 12:11:25 +0200 | acidjnk_new3 | (~acidjnk@p200300d0c703cb67a588bcb670b337ca.dip0.t-ipconnect.de) |
2021-10-23 12:12:37 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 252 seconds) |
2021-10-23 12:14:59 +0200 | acidjnk_new | (~acidjnk@p200300d0c703cb67c0866ab856626c9e.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
2021-10-23 12:15:56 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 245 seconds) |
2021-10-23 12:24:45 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-10-23 12:29:02 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 244 seconds) |
2021-10-23 12:29:47 +0200 | sprout | (~quassel@2a02:a467:ccd6:1:5d6e:87c6:1a95:cc2d) (Ping timeout: 264 seconds) |
2021-10-23 12:32:25 +0200 | acidjnk_new3 | (~acidjnk@p200300d0c703cb67a588bcb670b337ca.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2021-10-23 12:33:37 +0200 | ulvarrefr | (~user@185.24.53.152) (Read error: Connection reset by peer) |
2021-10-23 12:34:44 +0200 | jstolarek | (~jstolarek@137.220.120.162) |
2021-10-23 12:37:35 +0200 | xff0x | (~xff0x@2001:1a81:52c0:f300:645b:c6c7:cd20:13be) (Ping timeout: 264 seconds) |
2021-10-23 12:38:08 +0200 | sprout | (~quassel@2a02:a467:ccd6:1:5d6e:87c6:1a95:cc2d) |
2021-10-23 12:38:09 +0200 | xff0x | (~xff0x@2001:1a81:52c0:f300:1be9:ff56:80a8:5503) |
2021-10-23 12:39:46 +0200 | rk04 | (~rk04@user/rajk) |
2021-10-23 12:40:14 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 12:40:31 +0200 | coot | (~coot@37.30.49.107.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
2021-10-23 12:41:10 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2021-10-23 12:42:09 +0200 | mmhat | (~mmh@55d498fd.access.ecotel.net) |
2021-10-23 12:42:09 +0200 | wyrd | (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds) |
2021-10-23 12:42:24 +0200 | zer0bitz | (~zer0bitz@dsl-hkibng31-54fae3-116.dhcp.inet.fi) |
2021-10-23 12:45:15 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 260 seconds) |
2021-10-23 12:45:28 +0200 | reumeth | (~reumeth@user/reumeth) (Quit: reumeth) |
2021-10-23 12:47:46 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-10-23 12:48:12 +0200 | <merijn> | dminuoso: Anyone who likes static linking loathes glibc in general :p |
2021-10-23 12:49:32 +0200 | jespada | (~jespada@2803:9800:9842:7a62:c904:aff:1e1a:fc0a) |
2021-10-23 12:49:47 +0200 | jgeerds | (~jgeerds@55d40de2.access.ecotel.net) (Ping timeout: 265 seconds) |
2021-10-23 12:52:10 +0200 | jstolarek | (~jstolarek@137.220.120.162) (Ping timeout: 260 seconds) |
2021-10-23 12:53:45 +0200 | jollygood2 | (~bc8165b6@217.29.117.252) |
2021-10-23 12:54:22 +0200 | phma_ | (~phma@host-67-44-208-174.hnremote.net) |
2021-10-23 12:55:20 +0200 | phma | (~phma@host-67-44-208-32.hnremote.net) (Read error: Connection reset by peer) |
2021-10-23 12:59:31 +0200 | jstolarek | (~jstolarek@137.220.120.162) |
2021-10-23 13:00:53 +0200 | alx741 | (~alx741@186.178.108.23) |
2021-10-23 13:10:52 +0200 | ssipos90 | (~ssipos@86.123.18.123) |
2021-10-23 13:11:43 +0200 | _ht | (~quassel@82-169-194-8.biz.kpn.net) (Ping timeout: 258 seconds) |
2021-10-23 13:11:55 +0200 | <ssipos90> | Hi, guys. Is this the right place to ask for some help with rio? |
2021-10-23 13:12:10 +0200 | _ht | (~quassel@37.120.218.164) |
2021-10-23 13:12:18 +0200 | AlexNoo_ | (~AlexNoo@178.34.150.6) |
2021-10-23 13:12:34 +0200 | ssipos90 | (~ssipos@86.123.18.123) (Quit: WeeChat 3.3) |
2021-10-23 13:12:48 +0200 | ssipos | (~ssipos@86.123.18.123) |
2021-10-23 13:14:06 +0200 | rond_ | (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) |
2021-10-23 13:14:47 +0200 | Alex_test | (~al_test@178.34.160.45) (Ping timeout: 264 seconds) |
2021-10-23 13:14:56 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 13:15:03 +0200 | <ssipos> | if someone has 5 mins to take a look a the highlighted line( and the following), I'd appreciate it https://github.com/ssipos90/tasks2-hs/blob/main/src/Run.hs#L209 |
2021-10-23 13:15:23 +0200 | AlexZenon | (~alzenon@178.34.160.45) (Ping timeout: 264 seconds) |
2021-10-23 13:15:32 +0200 | jstolarek | (~jstolarek@137.220.120.162) (Ping timeout: 244 seconds) |
2021-10-23 13:15:58 +0200 | AlexNoo | (~AlexNoo@178.34.160.45) (Ping timeout: 260 seconds) |
2021-10-23 13:16:42 +0200 | max22- | (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Ping timeout: 258 seconds) |
2021-10-23 13:17:11 +0200 | Gurkenglas | (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 264 seconds) |
2021-10-23 13:19:16 +0200 | AlexZenon | (~alzenon@178.34.150.6) |
2021-10-23 13:19:23 +0200 | peterhil | (~peterhil@mobile-access-5672cd-211.dhcp.inet.fi) |
2021-10-23 13:19:24 +0200 | Alex_test | (~al_test@178.34.150.6) |
2021-10-23 13:20:21 +0200 | <merijn> | ssipos: FYI: you don't needa new let for each binding, you can have only one on line 204 and then just binding on the following lines (assuming they're indented as far as 'task') |
2021-10-23 13:26:21 +0200 | phma_ | phma |
2021-10-23 13:26:44 +0200 | AlexNoo_ | AlexNoo |
2021-10-23 13:26:45 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2021-10-23 13:27:38 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) |
2021-10-23 13:28:03 +0200 | __monty__ | (~toonn@user/toonn) |
2021-10-23 13:28:04 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2021-10-23 13:28:25 +0200 | mengu | (~mengu@c188-150-15-33.bredband.tele2.se) |
2021-10-23 13:30:30 +0200 | <merijn> | There's no strict tuple in base, right? |
2021-10-23 13:31:04 +0200 | emanuele6 | (~emanuele6@user/emanuele6) |
2021-10-23 13:31:46 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) (Ping timeout: 245 seconds) |
2021-10-23 13:33:03 +0200 | notzmv | (~zmv@user/notzmv) |
2021-10-23 13:33:19 +0200 | <geekosaur> | not unless you count (# , #) |
2021-10-23 13:33:23 +0200 | pfurla_ | (~pfurla@ool-182ed2e2.dyn.optonline.net) (Quit: Textual IRC Client: www.textualapp.com) |
2021-10-23 13:33:26 +0200 | <hololeap> | weird thought, would `WriterT x (Writer y a)`, where WriterT is the Strict version, be considered a strict tuple (in x and y) with extra data? |
2021-10-23 13:33:34 +0200 | <merijn> | geekosaur: Unboxed tuple are entirely different, though |
2021-10-23 13:33:34 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 258 seconds) |
2021-10-23 13:33:53 +0200 | fendor | (~fendor@77.119.192.109.wireless.dyn.drei.com) (Remote host closed the connection) |
2021-10-23 13:34:08 +0200 | mengu | (~mengu@c188-150-15-33.bredband.tele2.se) (Quit: Leaving...) |
2021-10-23 13:34:10 +0200 | <merijn> | geekosaur: I just want the laziness to now make my mconcat super slow |
2021-10-23 13:34:15 +0200 | <merijn> | s/now/not |
2021-10-23 13:34:37 +0200 | <merijn> | foldMap' is nice, but tuple basically defeats it >.> |
2021-10-23 13:35:44 +0200 | <hololeap> | can you deepseq it? |
2021-10-23 13:36:19 +0200 | <merijn> | I mean, I can, but that makes everything more verbose and this is something I end up needing frequently |
2021-10-23 13:37:24 +0200 | <hololeap> | I'd say make a custom strict tuple for each use case and at least you can use the verbosity to describe something |
2021-10-23 13:42:29 +0200 | Gestotterd | (~Stotteren@pool-108-20-79-41.bstnma.fios.verizon.net) (Quit: Leaving) |
2021-10-23 13:42:57 +0200 | fendor | (~fendor@77.119.192.109.wireless.dyn.drei.com) |
2021-10-23 13:45:23 +0200 | <ssipos> | @merijn, screw those lets, I have bigger fish to fry. My logging attempts aren't working |
2021-10-23 13:45:23 +0200 | <lambdabot> | Unknown command, try @list |
2021-10-23 13:45:30 +0200 | <ssipos> | merijn, screw those lets, I have bigger fish to fry. My logging attempts aren't working |
2021-10-23 13:45:30 +0200 | _ht | (~quassel@37.120.218.164) (Ping timeout: 244 seconds) |
2021-10-23 13:45:57 +0200 | _ht | (~quassel@82-169-194-8.biz.kpn.net) |
2021-10-23 13:46:21 +0200 | <merijn> | ssipos: Sure, but I was too lazy to figure out what was going on, so I gave up :p |
2021-10-23 13:46:44 +0200 | ssipos90 | (~ssipos90@86.123.18.123) |
2021-10-23 13:47:36 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 13:48:33 +0200 | ssipos90 | (~ssipos90@86.123.18.123) (Client Quit) |
2021-10-23 13:49:14 +0200 | <ssipos> | thanks for tryin' |
2021-10-23 13:49:49 +0200 | ssipos90 | (~ssipos90@86.123.18.123) |
2021-10-23 13:50:09 +0200 | rk04 | (~rk04@user/rajk) (Ping timeout: 244 seconds) |
2021-10-23 13:50:17 +0200 | ssipos | (~ssipos@86.123.18.123) (Quit: WeeChat 3.3) |
2021-10-23 13:50:29 +0200 | <ssipos90> | . |
2021-10-23 13:52:10 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 252 seconds) |
2021-10-23 14:05:24 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 14:07:49 +0200 | jstolarek | (~jstolarek@137.220.120.162) |
2021-10-23 14:09:21 +0200 | whatif | (~xxx@47.245.54.240) |
2021-10-23 14:14:12 +0200 | rk04 | (~rk04@user/rajk) |
2021-10-23 14:18:45 +0200 | slowButPresent | (~slowButPr@user/slowbutpresent) |
2021-10-23 14:18:48 +0200 | rk04 | (~rk04@user/rajk) (Ping timeout: 258 seconds) |
2021-10-23 14:23:13 +0200 | burnsidesLlama | (~burnsides@dhcp168-012.wadham.ox.ac.uk) |
2021-10-23 14:27:11 +0200 | jstolarek | (~jstolarek@137.220.120.162) (Ping timeout: 245 seconds) |
2021-10-23 14:33:18 +0200 | fef | (~thedawn@user/thedawn) (Ping timeout: 276 seconds) |
2021-10-23 14:37:26 +0200 | Guest9678 | (~neo3@cpe-292712.ip.primehome.com) |
2021-10-23 14:37:46 +0200 | fef | (~thedawn@user/thedawn) |
2021-10-23 14:40:17 +0200 | neo3 | (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 244 seconds) |
2021-10-23 14:40:49 +0200 | <jollygood2> | is there no equivalent that returns Text? System.Win32.String.peekTString :: LPCTSTR -> IO String |
2021-10-23 14:41:26 +0200 | agumonkey | (~user@88.160.31.174) |
2021-10-23 14:42:11 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-10-23 14:42:16 +0200 | <geekosaur> | probably there isn't, System.Win32 could use a lot of love |
2021-10-23 14:42:31 +0200 | <jollygood2> | it calls Foreign.C.String.peekCString :: CString -> IO String. there doesn't seem to be Text equivalent in there either |
2021-10-23 14:42:59 +0200 | jollygood2 | (~bc8165b6@217.29.117.252) (Quit: http://www.okay.uz/ (EOF)) |
2021-10-23 14:44:04 +0200 | <geekosaur> | I know they left, but that one might be harder, not sure that doesn't tie Text too closely to ghc |
2021-10-23 14:44:12 +0200 | <geekosaur> | then again I guess text could export its own |
2021-10-23 14:45:49 +0200 | <geekosaur> | @tell jollygood2 you could always file an issue on the text repo, or even provide diffs. probably can't go into base though |
2021-10-23 14:45:50 +0200 | <lambdabot> | Consider it noted. |
2021-10-23 14:46:02 +0200 | jollygood2 | (~bc8165b6@217.29.117.252) |
2021-10-23 14:46:16 +0200 | <jollygood2> | seems like an uphill battle trying to use Text when String is used all over the place, even in base :| |
2021-10-23 14:46:47 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 258 seconds) |
2021-10-23 14:47:01 +0200 | <geekosaur> | migration to Text is somewhere in the HF/CLC priorities, iirc |
2021-10-23 14:47:11 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 264 seconds) |
2021-10-23 14:48:26 +0200 | <geekosaur> | that said, it's muddled because there's a fair amount of convenience in String, and it still works well for short strings |
2021-10-23 14:48:41 +0200 | <geekosaur> | so I expect a lot of bikeshedding over it |
2021-10-23 14:49:07 +0200 | <merijn> | hah |
2021-10-23 14:49:10 +0200 | <geekosaur> | also I suspect they want to get utf8 Text out first |
2021-10-23 14:49:22 +0200 | <merijn> | Text in base is gonna take decades :p |
2021-10-23 14:49:36 +0200 | <merijn> | That's even more controversial and painful than AMP |
2021-10-23 14:50:31 +0200 | fa | (~fa@116.127.1.72) |
2021-10-23 14:52:08 +0200 | <maerwald> | jollygood2: https://github.com/hasufell/abstract-filepath |
2021-10-23 14:52:19 +0200 | <maerwald> | you don't want Text |
2021-10-23 14:52:36 +0200 | <maerwald> | but that's WIP and not finished |
2021-10-23 14:53:11 +0200 | <jollygood2> | I am not dealing with file paths |
2021-10-23 14:53:19 +0200 | <maerwald> | doesn't matter |
2021-10-23 14:53:24 +0200 | <maerwald> | https://github.com/hasufell/abstract-filepath/blob/61fb550abd78805c5ddea232fab8e5e065410b29/abstra… |
2021-10-23 14:53:29 +0200 | <maerwald> | `peekTString :: LPCTSTR -> IO WindowsString` |
2021-10-23 14:56:43 +0200 | fa | (~fa@116.127.1.72) (Leaving) |
2021-10-23 14:57:59 +0200 | <maerwald> | newtype WindowsString = WS { unWFP :: BS.ShortByteString } -- which is UTF16 encoded |
2021-10-23 15:05:41 +0200 | <jollygood2> | if I understood it right, there would be greater overhead when converting from Text to LPCTSTR, and vice versa, than from WindowsString to LPCTSTR? |
2021-10-23 15:07:08 +0200 | <maerwald> | well, WindowsString keeps the data untouched that comes from syscalls |
2021-10-23 15:07:12 +0200 | <maerwald> | that's the point |
2021-10-23 15:07:56 +0200 | <maerwald> | but here, they are short bytestrings that are unpinned bytearrays |
2021-10-23 15:08:21 +0200 | <maerwald> | that means they cause a memcpy, but they avoid memory fragmentation |
2021-10-23 15:08:53 +0200 | <maerwald> | so this wouldn't make sense for reading file contents |
2021-10-23 15:09:33 +0200 | Guest32 | (~Guest32@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
2021-10-23 15:09:45 +0200 | <Guest32> | is there a reason why TypeSynonymInstances are disabled by default? |
2021-10-23 15:10:10 +0200 | <Guest32> | people generally don |
2021-10-23 15:10:40 +0200 | <Guest32> | 't like type synonyms either, why is that? |
2021-10-23 15:11:14 +0200 | Guest9678 | (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 260 seconds) |
2021-10-23 15:13:06 +0200 | unmanbearpig | (~unmanbear@user/unmanbearpig) (Ping timeout: 260 seconds) |
2021-10-23 15:13:15 +0200 | <jollygood2> | maerwald, that's pretty neat, and could be useful when doing a lot of winapi calls in a tight loop. but when I am writing haskell, and dealing with text, I usually want to manipulate text with haskell functions, not low-level winapi functions. and for that, Text should be the default, not String |
2021-10-23 15:13:38 +0200 | <merijn> | Guest32: They're confusing |
2021-10-23 15:13:39 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-10-23 15:13:50 +0200 | <merijn> | Guest32: And don't add any type safety |
2021-10-23 15:14:20 +0200 | <merijn> | Guest32: You see people defining 3 layers of type synonyms only for the eventual *actual* type to be "Int", but now I have to click through several links/modules to find out what a function *actually* wants |
2021-10-23 15:15:17 +0200 | <merijn> | Guest32: If something takes an Int, the signature should just be Int...now, sometimes for callbacks that have long types they can have some use to cleanup and make types more readable, but any use of type synonyms that is *not* abbreviation is bad IMO |
2021-10-23 15:15:33 +0200 | <merijn> | Either just write the actual type *or* use an actual newtype and get some type safety |
2021-10-23 15:15:56 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 15:16:14 +0200 | mestre | (~mestre@191.177.175.57) (Quit: Lost terminal) |
2021-10-23 15:17:31 +0200 | <Guest32> | that clears things up |
2021-10-23 15:17:37 +0200 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
2021-10-23 15:17:53 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-10-23 15:18:57 +0200 | <merijn> | Guest32: Consider an example like "type JSON = Text" and "foo :: JSON -> Something" and you can see how that kinda thing might just be straight up misleading :) |
2021-10-23 15:20:34 +0200 | MQ-17J | (~MQ-17J@8.21.10.17) (Ping timeout: 244 seconds) |
2021-10-23 15:20:43 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 252 seconds) |
2021-10-23 15:21:22 +0200 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2021-10-23 15:22:15 +0200 | <hpc> | or if you really want to mess with people, do something like type Just = Maybe |
2021-10-23 15:23:22 +0200 | <Guest32> | so there are no type class instances because they would contradict existing instances for some types? |
2021-10-23 15:23:52 +0200 | <Guest32> | if I type CoolNumber = Int and I try to instance say Show for it |
2021-10-23 15:23:53 +0200 | <geekosaur> | yes, since they can't have their owninstances; they are exactly the same as the aliased type |
2021-10-23 15:23:57 +0200 | <Guest32> | that can't be good? |
2021-10-23 15:24:31 +0200 | <geekosaur> | TypeSynonymInstances is therefore misleading because it sounds like you coulkd create such an instance, but it'll still fail because there's already an instance |
2021-10-23 15:25:36 +0200 | <geekosaur> | or trickier ones, like if you defined an instance for String it would prevent you from defining an instance for lists |
2021-10-23 15:25:46 +0200 | <Guest32> | type synonyms bad |
2021-10-23 15:25:47 +0200 | <geekosaur> | because type String = [Char] |
2021-10-23 15:26:32 +0200 | <Guest32> | but [a] != [b] ? |
2021-10-23 15:26:37 +0200 | <geekosaur> | that one actually required an additional extension because it could cause so much trouble (FlexibleInstances) |
2021-10-23 15:26:47 +0200 | <Guest32> | or is it just lists of chars that will be out of reach |
2021-10-23 15:27:17 +0200 | <Guest32> | yet another reason not to use String |
2021-10-23 15:27:54 +0200 | <hpc> | for a good time, look at the Show instance for lists |
2021-10-23 15:27:58 +0200 | <geekosaur> | instance ... String ... in effect becomes (x ~ Char) => instance ... [x] |
2021-10-23 15:27:58 +0200 | <hpc> | > [1, 2, 3] |
2021-10-23 15:27:59 +0200 | <lambdabot> | [1,2,3] |
2021-10-23 15:28:03 +0200 | <hpc> | > ['a', 'b', 'c'] |
2021-10-23 15:28:04 +0200 | <lambdabot> | "abc" |
2021-10-23 15:28:20 +0200 | <geekosaur> | so it matches all lists, then checks that the specific list is a list of Char |
2021-10-23 15:29:14 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) |
2021-10-23 15:29:32 +0200 | <geekosaur> | you can't do otherwise given separate compilation: other modules can't know that you defined an instance with a constraint (here x ~ Char), and it's on the linker to connect the instances up and the linker has no clue about Haskell constraints |
2021-10-23 15:29:45 +0200 | Hanicef | (~gustaf@81-229-9-108-no92.tbcn.telia.com) (Quit: leaving) |
2021-10-23 15:30:30 +0200 | <geekosaur> | so in general defining instances on type synonyms is just asking for trouble |
2021-10-23 15:31:33 +0200 | <geekosaur> | as is using type synonyms in general, just because they're so confusing and provide no type safety |
2021-10-23 15:33:23 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 15:33:26 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) (Ping timeout: 245 seconds) |
2021-10-23 15:33:33 +0200 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 258 seconds) |
2021-10-23 15:37:36 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 245 seconds) |
2021-10-23 15:38:57 +0200 | <geekosaur> | (if you're wondering how instance Show String works, it doesn't. there's one Show instance for lists which calls the showList method of the list member type. this has a default implementation for all types except Char.) |
2021-10-23 15:42:38 +0200 | <jollygood2> | how do I efficiently build Text in IO char by char? is there a TextBuilder, or something? |
2021-10-23 15:43:30 +0200 | <geekosaur> | https://hackage.haskell.org/package/text-1.2.5.0/docs/Data-Text-Internal-Builder.html ? |
2021-10-23 15:44:41 +0200 | <jollygood2> | that works in ST. so I have to mix and match IO and ST? |
2021-10-23 15:44:53 +0200 | <merijn> | jollygood2: You can trivially convert ST to IO |
2021-10-23 15:45:10 +0200 | <merijn> | There's literally a stToIO function somewhere :p |
2021-10-23 15:45:22 +0200 | <jollygood2> | ah, ok. :P |
2021-10-23 15:45:25 +0200 | <merijn> | @hoogle stToIO |
2021-10-23 15:45:25 +0200 | <lambdabot> | Control.Monad.ST stToIO :: ST RealWorld a -> IO a |
2021-10-23 15:45:25 +0200 | <lambdabot> | Control.Monad.ST.Lazy stToIO :: ST RealWorld a -> IO a |
2021-10-23 15:45:25 +0200 | <lambdabot> | Control.Monad.ST.Lazy.Safe stToIO :: ST RealWorld a -> IO a |
2021-10-23 15:45:38 +0200 | <merijn> | jollygood2: Because IO and ST use the exact same underlying implementation in GHC |
2021-10-23 15:46:16 +0200 | <Franciman> | @hoogle wiki |
2021-10-23 15:46:17 +0200 | <lambdabot> | XMonad.Actions.Search wikipedia :: SearchEngine |
2021-10-23 15:46:17 +0200 | <lambdabot> | package wikicfp-scraper |
2021-10-23 15:46:17 +0200 | <lambdabot> | Path.Extensions wikiExtension :: String |
2021-10-23 15:46:40 +0200 | <geekosaur> | :) |
2021-10-23 15:51:13 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 15:54:06 +0200 | shapr | (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
2021-10-23 15:54:24 +0200 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-10-23 15:54:36 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-10-23 15:55:35 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 264 seconds) |
2021-10-23 15:59:50 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 244 seconds) |
2021-10-23 16:01:42 +0200 | max22- | (~maxime@2a01cb0883359800a1b62314adf10ac2.ipv6.abo.wanadoo.fr) |
2021-10-23 16:02:59 +0200 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) |
2021-10-23 16:03:18 +0200 | burnsidesLlama | (~burnsides@dhcp168-012.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-10-23 16:10:02 +0200 | betelgeuse | (~betelgeus@94-225-47-8.access.telenet.be) |
2021-10-23 16:11:17 +0200 | kuribas | (~user@ptr-25vy0i98mhuqx60svv0.18120a2.ip6.access.telenet.be) |
2021-10-23 16:13:00 +0200 | <Guest32> | why does https://hackage.haskell.org/package/prettyprinter-1.7.1/docs/Prettyprinter.html#v:nest only ident the tail of the list? |
2021-10-23 16:14:34 +0200 | emanuele6 | (~emanuele6@user/emanuele6) (Ping timeout: 258 seconds) |
2021-10-23 16:21:36 +0200 | arpl | (~arpl@84-107-171-239.cable.dynamic.v4.ziggo.nl) |
2021-10-23 16:22:47 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 16:24:11 +0200 | arpl | (~arpl@84-107-171-239.cable.dynamic.v4.ziggo.nl) (Client Quit) |
2021-10-23 16:25:21 +0200 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 265 seconds) |
2021-10-23 16:26:04 +0200 | rk04 | (~rk04@user/rajk) |
2021-10-23 16:27:11 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 245 seconds) |
2021-10-23 16:28:14 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-10-23 16:28:30 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-10-23 16:28:40 +0200 | Guest92 | (~Guest92@178-78-205-86.customers.ownit.se) |
2021-10-23 16:29:16 +0200 | <Guest92> | Hi! I'm trying to understand currying, and want to write mypi x = x ^ 2 * pi, but without using x -- like I can do triple = (*) 3. Is this possible? |
2021-10-23 16:29:52 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-10-23 16:30:03 +0200 | <hpc> | yes |
2021-10-23 16:30:06 +0200 | [Kalisto]_ | (~nico@user/kalisto/x-8968079) (Ping timeout: 260 seconds) |
2021-10-23 16:30:13 +0200 | dbqp | (~dbqp@84-107-171-239.cable.dynamic.v4.ziggo.nl) |
2021-10-23 16:30:22 +0200 | <hpc> | it's a bit more awkward though, and you'll have to use function composition |
2021-10-23 16:30:39 +0200 | <hpc> | @pl \x -> x ^ 2 * pi |
2021-10-23 16:30:40 +0200 | <lambdabot> | (pi *) . (^ 2) |
2021-10-23 16:31:20 +0200 | <hpc> | any function can be rewritten in pointfree style with enough effort |
2021-10-23 16:31:20 +0200 | unmanbearpig | (~unmanbear@user/unmanbearpig) |
2021-10-23 16:32:16 +0200 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-10-23 16:32:16 +0200 | <hpc> | @pl \a b c d e f g -> f e e d b e e f b a g |
2021-10-23 16:32:18 +0200 | <lambdabot> | (const .) . flip (flip . ((flip . (flip .)) .) . (flip =<< ((flip . (flip .)) .) . flip flip id . ((flip . (ap .)) .) . flip flip id . (liftM2 flip .) . flip flip id . (liftM2 flip .) . flip (flip . |
2021-10-23 16:32:18 +0200 | <lambdabot> | (flip .) . flip (flip . (flip =<< flip id))))) |
2021-10-23 16:32:20 +0200 | <Guest92> | Thanks -- I have some more reading to do, evidently :). But at least I wasn't missing something simple! |
2021-10-23 16:33:44 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
2021-10-23 16:35:43 +0200 | Darwin226 | (~Darwin226@95.168.118.20) |
2021-10-23 16:35:47 +0200 | dbqp | (~dbqp@84-107-171-239.cable.dynamic.v4.ziggo.nl) (Quit: Client closed) |
2021-10-23 16:36:01 +0200 | max22- | (~maxime@2a01cb0883359800a1b62314adf10ac2.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
2021-10-23 16:38:03 +0200 | <Darwin226> | Does anyone know if the monad instance for cofree is the only possible one? Specifically, would swaping the arguments to <|> make an invalid instance? |
2021-10-23 16:38:06 +0200 | <Darwin226> | it's here https://hackage.haskell.org/package/free-5.1.7/docs/src/Control.Comonad.Cofree.html#line-177 |
2021-10-23 16:39:33 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 16:41:38 +0200 | burnsidesLlama | (~burnsides@dhcp168-012.wadham.ox.ac.uk) |
2021-10-23 16:42:07 +0200 | Gurkenglas | (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
2021-10-23 16:44:25 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 260 seconds) |
2021-10-23 16:44:40 +0200 | agumonke` | (~user@88.160.31.174) |
2021-10-23 16:45:27 +0200 | <kronicmage> | does anyone know if there's a version of Array.read that's linear on both arguments, rather than just the array? |
2021-10-23 16:45:30 +0200 | <kronicmage> | in linear-base |
2021-10-23 16:45:37 +0200 | rk04 | (~rk04@user/rajk) (Ping timeout: 258 seconds) |
2021-10-23 16:46:20 +0200 | agumonkey | (~user@88.160.31.174) (Ping timeout: 244 seconds) |
2021-10-23 16:47:22 +0200 | burnsidesLlama | (~burnsides@dhcp168-012.wadham.ox.ac.uk) (Ping timeout: 244 seconds) |
2021-10-23 16:48:14 +0200 | CiaoSen | (~Jura@p200300c95730dd002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2021-10-23 16:48:28 +0200 | betelgeuse | (~betelgeus@94-225-47-8.access.telenet.be) (Quit: The Lounge - https://thelounge.chat) |
2021-10-23 16:48:29 +0200 | sedeki | (~textual@user/sedeki) |
2021-10-23 16:50:09 +0200 | betelgeuse | (~betelgeus@94-225-47-8.access.telenet.be) |
2021-10-23 16:52:00 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-10-23 16:52:17 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-10-23 16:53:04 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-10-23 16:53:18 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-10-23 16:53:34 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2021-10-23 16:55:06 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-10-23 16:55:14 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-10-23 16:55:48 +0200 | <whatif> | I have a simple question, how a function can change a variable out of the function? |
2021-10-23 16:56:25 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-10-23 16:56:27 +0200 | <whatif> | like there are two functions, they need to visit one same variable and change it for store result |
2021-10-23 16:57:16 +0200 | sedeki | (~textual@user/sedeki) (Quit: Textual IRC Client: www.textualapp.com) |
2021-10-23 16:57:25 +0200 | <whatif> | in OOP it will look like Object.method1 and Object.method2 change Object.attribute |
2021-10-23 16:57:46 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-10-23 16:57:47 +0200 | <geekosaur> | variables are immutable, so you can't change them even in one function. you instead return the new value possible as part of a tuple |
2021-10-23 16:58:14 +0200 | <whatif> | or in Kotlin, there're two function and one variable defined inside a function, that inside function can visit that variable |
2021-10-23 16:58:16 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 16:58:43 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-10-23 16:59:04 +0200 | <geekosaur> | in general you design to avoid such things, or use the State monad to hide the fact that youy're actually passing values in and out |
2021-10-23 16:59:56 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-10-23 17:00:01 +0200 | Guest92 | (~Guest92@178-78-205-86.customers.ownit.se) (Ping timeout: 256 seconds) |
2021-10-23 17:00:40 +0200 | <geekosaur> | there are alsao IORefs for when you really do need to do such things, but you still need to pass the IORef around and this forces you to have everything in IO |
2021-10-23 17:00:47 +0200 | <whatif> | except haskell, which language would you guys use? I'd like to make an example, but I don't know which is perfer |
2021-10-23 17:01:03 +0200 | <whatif> | js python java kotlin? |
2021-10-23 17:01:11 +0200 | <whatif> | or scheme? |
2021-10-23 17:01:35 +0200 | <kronicmage> | pure scheme is probably closest to haskell, but either way i think you just have a design problem whatif |
2021-10-23 17:02:03 +0200 | <kronicmage> | you shouldn't be wanting to mutate in the first place, and if you do, you better contain it properly in a State/ST/IORef |
2021-10-23 17:02:47 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 264 seconds) |
2021-10-23 17:02:50 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-10-23 17:04:26 +0200 | <whatif> | fun outter(){ var a=1; fun add1(){ a=a+1 }; fun add2(){ a = a+2 } ... } |
2021-10-23 17:04:51 +0200 | <whatif> | add1 and add2 both need to visit a, change it |
2021-10-23 17:05:11 +0200 | <whatif> | how to use State to express this? |
2021-10-23 17:05:33 +0200 | <kuribas> | whatif: idris :) |
2021-10-23 17:05:57 +0200 | <whatif> | "🟢#haskell kuribas :whatif: idris :)", what is idris? |
2021-10-23 17:06:10 +0200 | <kronicmage> | whatif: you make the a your state, and then you write `add1 = modify (+1)` and `add2 = modify (+2)` |
2021-10-23 17:06:33 +0200 | <kronicmage> | but I stress again that if you can avoid doing so, it's better to not use State |
2021-10-23 17:06:45 +0200 | <kuribas> | whatif: a language I would use besides haskell: https://www.idris-lang.org/ |
2021-10-23 17:06:45 +0200 | <kronicmage> | and that depends on what exactly you're doing with your outer and your add functions |
2021-10-23 17:07:00 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 244 seconds) |
2021-10-23 17:08:37 +0200 | <whatif> | "🟢#haskell kronicmage :whatif: you make the a your state, and then you write `add1 = modify (+1)` and `add2 = modify (+2)`", more details please |
2021-10-23 17:08:43 +0200 | <whatif> | I don't get it |
2021-10-23 17:10:06 +0200 | <kuribas> | whatif: you cannot "change state", so you take one state, and return a new one. |
2021-10-23 17:10:26 +0200 | <kronicmage> | whatif: https://pastebin.com/4HZtvZ2t |
2021-10-23 17:10:32 +0200 | <kuribas> | whatif: if you need to change it twice, then pass the state from the first function to the second function. |
2021-10-23 17:11:06 +0200 | <kuribas> | whatif: however "I need to change a variable" is already not thinking in a haskell way. |
2021-10-23 17:11:13 +0200 | <kronicmage> | oops sorry my pastebin is wrong |
2021-10-23 17:11:31 +0200 | <whatif> | "🟢#haskell kuribas :whatif: if you need to change it twice, then pass the state from the first function to the second function.", but what if the two function running at different threads? |
2021-10-23 17:11:33 +0200 | <kronicmage> | you need to redo `a <- get` before each trace statement |
2021-10-23 17:11:44 +0200 | <whatif> | so it can not be passed |
2021-10-23 17:11:58 +0200 | <kronicmage> | whatif: half the point of haskell is writing stateless functions to make concurrency much easier |
2021-10-23 17:12:13 +0200 | <kuribas> | whatif: if you have two threads then you need to use mutable variables, like IORef, MVar, or STVar. |
2021-10-23 17:12:22 +0200 | <kronicmage> | if you must use state and you must have it be threaded, then an MVar or TVar may be your best choice |
2021-10-23 17:12:34 +0200 | <kronicmage> | but still inferior to just writing pure functions and letting concurrency happen automagically |
2021-10-23 17:12:54 +0200 | <kuribas> | kronicmage: concurrency doesn't happen "magically", you need to write it. |
2021-10-23 17:13:02 +0200 | Farzad | (~FarzadBek@178.131.24.167) (Ping timeout: 260 seconds) |
2021-10-23 17:13:18 +0200 | <kronicmage> | sorry i overexagerrated. but still preferable to doing so statefully |
2021-10-23 17:13:28 +0200 | <kuribas> | There are many different ways and libraries to do concurrency/parallelism, but none of them are completely automatic. |
2021-10-23 17:13:45 +0200 | <ski> | @quote is.no.state |
2021-10-23 17:13:45 +0200 | <lambdabot> | MonadState says: Do not try to change the state; that's impossible. Instead only try to realize the truth: There is no state. |
2021-10-23 17:13:57 +0200 | <kuribas> | it depends, are you doing concurrency, or parallelism? |
2021-10-23 17:14:21 +0200 | <whatif> | me? yes |
2021-10-23 17:14:27 +0200 | <Hecate> | :'D |
2021-10-23 17:14:56 +0200 | <kuribas> | parallelism is where you have a pure function that you want to run in different threads for performance reasons. |
2021-10-23 17:15:19 +0200 | burnsidesLlama | (~burnsides@dhcp168-012.wadham.ox.ac.uk) |
2021-10-23 17:15:24 +0200 | <kuribas> | concurrency means you have side-effects which you want to run aside from each-other, for example web-server requests. |
2021-10-23 17:15:30 +0200 | <whatif> | there're two different functions running in async block, they need to visit one same variable and change it result for each other |
2021-10-23 17:15:31 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2021-10-23 17:15:46 +0200 | <kuribas> | whatif: then use MVar or TVar. |
2021-10-23 17:15:57 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2021-10-23 17:15:59 +0200 | <whatif> | yes, there's IO Socket |
2021-10-23 17:16:03 +0200 | burnsidesLlama | (~burnsides@dhcp168-012.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-10-23 17:16:10 +0200 | burnsidesLlama | (~burnsides@dhcp168-012.wadham.ox.ac.uk) |
2021-10-23 17:16:43 +0200 | <ski> | Oz has declarative concurrency (without data races). also, iirc, `lvish' |
2021-10-23 17:19:21 +0200 | <maerwald[m]> | kuribas: you can also use streamly for async |
2021-10-23 17:20:00 +0200 | <kuribas> | maerwald[m]: I didn't mention any library... |
2021-10-23 17:21:25 +0200 | agumonke` | (~user@88.160.31.174) (Ping timeout: 265 seconds) |
2021-10-23 17:30:43 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) |
2021-10-23 17:30:59 +0200 | zmt00 | (~zmt00@user/zmt00) |
2021-10-23 17:31:26 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 17:34:23 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 244 seconds) |
2021-10-23 17:34:50 +0200 | myShoggoth | (~myShoggot@97-120-85-195.ptld.qwest.net) |
2021-10-23 17:35:06 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) (Ping timeout: 245 seconds) |
2021-10-23 17:35:21 +0200 | <ski> | @hackage lvish |
2021-10-23 17:35:21 +0200 | <lambdabot> | https://hackage.haskell.org/package/lvish |
2021-10-23 17:35:51 +0200 | ski | . o O ( <https://en.wikipedia.org/wiki/Oz_(programming_language)#Dataflow_variables_and_declarative_concurrency>,<http://mozart2.org/mozart-v1/doc-1.4.0/tutorial/node8.html#chapter.concurrency>,<http://mozart2.org/mozart-v1/doc-1.4.0/dstutorial/node2.html#single.assignment> ) |
2021-10-23 17:36:01 +0200 | max22- | (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
2021-10-23 17:36:46 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 245 seconds) |
2021-10-23 17:37:11 +0200 | LimeGolem | (~LimeGolem@82.40.121.143) |
2021-10-23 17:40:50 +0200 | mmhat | (~mmh@55d498fd.access.ecotel.net) (Quit: WeeChat 3.3) |
2021-10-23 17:41:58 +0200 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 258 seconds) |
2021-10-23 17:43:31 +0200 | jespada | (~jespada@2803:9800:9842:7a62:c904:aff:1e1a:fc0a) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-10-23 17:43:45 +0200 | waleee | (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
2021-10-23 17:46:00 +0200 | jkaye | (~jkaye@2601:281:8300:7530:30bc:26a4:e2b8:8034) |
2021-10-23 17:46:11 +0200 | rk04 | (~rk04@user/rajk) |
2021-10-23 17:50:55 +0200 | rk04 | (~rk04@user/rajk) (Ping timeout: 244 seconds) |
2021-10-23 17:55:44 +0200 | <Cajun> | theres also a `scheduler` library used by `massiv` that allows for nested parallelism. its pretty cool but i havent used it directly |
2021-10-23 17:56:57 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-10-23 17:57:29 +0200 | LimeGolem | (~LimeGolem@82.40.121.143) (Quit: Client closed) |
2021-10-23 18:00:31 +0200 | Farzad | (~FarzadBek@151.238.114.164) |
2021-10-23 18:01:52 +0200 | <whatif> | yushyin, why version? |
2021-10-23 18:02:37 +0200 | Farzad | (~FarzadBek@151.238.114.164) (Client Quit) |
2021-10-23 18:04:34 +0200 | econo | (uid147250@user/econo) |
2021-10-23 18:05:17 +0200 | Darwin226 | (~Darwin226@95.168.118.20) (Quit: Client closed) |
2021-10-23 18:05:39 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-10-23 18:05:39 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-10-23 18:05:39 +0200 | wroathe | (~wroathe@user/wroathe) |
2021-10-23 18:05:49 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 18:06:23 +0200 | fef | (~thedawn@user/thedawn) (Quit: Leaving) |
2021-10-23 18:06:32 +0200 | <yushyin> | whatif: you can ignore it, it was a ctcp command, but apparently your client doesn't support it |
2021-10-23 18:07:29 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-10-23 18:08:47 +0200 | hyiltiz | (~quassel@31.220.5.250) (Ping timeout: 265 seconds) |
2021-10-23 18:09:01 +0200 | Null_A | (~null_a@2601:645:8700:2290:6cb0:bf84:22bf:3285) |
2021-10-23 18:10:35 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 264 seconds) |
2021-10-23 18:12:15 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
2021-10-23 18:12:32 +0200 | <whatif> | yushyin, what is solanum? |
2021-10-23 18:13:40 +0200 | CiaoSen | (~Jura@p200300c95730dd002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2021-10-23 18:14:45 +0200 | <jollygood2> | geekosaur, hmm, this doesn't sound very reassuring. link to Data.Text.Internal.Builder you posted earlier. "Warning: this is an internal module, and does not have a stable API or name. Functions in this module may not check or enforce preconditions expected by public modules. Use at your own risk!" |
2021-10-23 18:17:18 +0200 | <jkaye> | Don't authors usually use Internal modules to signal that you shouldn't use it? That was my understanding |
2021-10-23 18:18:55 +0200 | <jollygood2> | perhaps you wanted to paste a link to this? Data.Text.Lazy.Builder |
2021-10-23 18:20:37 +0200 | fendor | (~fendor@77.119.192.109.wireless.dyn.drei.com) (Remote host closed the connection) |
2021-10-23 18:21:33 +0200 | <jollygood2> | I'm also a bit confused why there's no strict variant |
2021-10-23 18:22:00 +0200 | <Franciman> | because it would be more costly to generate |
2021-10-23 18:22:13 +0200 | <Franciman> | lazy text is basically a list of strict texts |
2021-10-23 18:22:23 +0200 | <Franciman> | so builder can easily and cheaply generate it |
2021-10-23 18:22:33 +0200 | <Franciman> | and you can also support strange streaming things |
2021-10-23 18:22:37 +0200 | <Franciman> | that's my understanding |
2021-10-23 18:23:40 +0200 | <Franciman> | while, I think you need to have the whole builder available to efficiently build a strict text, which AFAIK is a contiguous chunk of memory |
2021-10-23 18:23:51 +0200 | <Franciman> | so it's costly to allocate and deallocate it copying the whole thing |
2021-10-23 18:25:14 +0200 | <geekosaur> | jollygood2, there's a way to hide internals completely. Internals modules are specifically exported for those who really do need to use them |
2021-10-23 18:25:18 +0200 | <jollygood2> | isn't the whole point of Builder to keep track of concating and appending chars/strings, and then allocate memory for Text once, when you are done? so I don't see the point of using Lazy Text asthe middle gorund? |
2021-10-23 18:25:19 +0200 | harveypwca | (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
2021-10-23 18:25:55 +0200 | <Franciman> | jollygood2: but a Builder value can be lazily computed! |
2021-10-23 18:26:03 +0200 | <geekosaur> | so you can build it in chunks instead of all at once |
2021-10-23 18:26:06 +0200 | <jkaye> | geekosaur, how can we hide internals complete (assuming we still need to test them and such)? I didn't know that was possible |
2021-10-23 18:26:14 +0200 | <geekosaur> | other-modules: |
2021-10-23 18:26:28 +0200 | <Franciman> | if you force the evaluation of a builder completely, then you can easily get a Strict Text |
2021-10-23 18:26:35 +0200 | <Franciman> | just keeping track of things |
2021-10-23 18:29:34 +0200 | <jkaye> | Cool, thanks |
2021-10-23 18:31:51 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 18:36:42 +0200 | <jollygood2> | my use case is trying to write efficient Foreign.C.String.peekCString equivalent that returns Text. should I use Data.Text.Lazy.Builder or Data.Text.Internal.Builder? |
2021-10-23 18:37:16 +0200 | andrevdm | (~andre@41.76.35.141) |
2021-10-23 18:37:35 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 264 seconds) |
2021-10-23 18:37:52 +0200 | <geekosaur> | probably the exported one |
2021-10-23 18:37:57 +0200 | <jollygood2> | I tried to pack peekCString's result to Text, but that didn't improve performance one bit compared to just using String everywhere |
2021-10-23 18:37:59 +0200 | <geekosaur> | somehow I missed it before |
2021-10-23 18:38:17 +0200 | <geekosaur> | yes, I expect a Builder will work better |
2021-10-23 18:38:39 +0200 | <jollygood2> | I was hoping fusion would take care of String being created at all. maybe it can't, or maybe I called pack too late |
2021-10-23 18:46:00 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 18:46:12 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 244 seconds) |
2021-10-23 18:46:37 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-10-23 18:50:30 +0200 | Topsi | (~Tobias@dyndsl-095-033-090-025.ewe-ip-backbone.de) |
2021-10-23 18:54:42 +0200 | kupi | (uid212005@id-212005.hampstead.irccloud.com) |
2021-10-23 18:55:30 +0200 | peterhil | (~peterhil@mobile-access-5672cd-211.dhcp.inet.fi) (Ping timeout: 244 seconds) |
2021-10-23 18:56:45 +0200 | <awpr> | re the TypeSynonymInstances discussion, (I had to go test this out in a repl, but) `instance C String` is not like `a ~ Char => instance C [a]` |
2021-10-23 18:57:20 +0200 | <geekosaur> | no, I cut some corners there |
2021-10-23 18:57:45 +0200 | <geekosaur> | there are similarities but it's not quite identical |
2021-10-23 18:58:07 +0200 | <awpr> | the former only matches `[Char]`, and prevents an overlapped `instance C [a]` from matching without further knowledge of `a`; while the latter matches any `[a]` and forcibly makes the element type be `Char` |
2021-10-23 18:58:20 +0200 | <awpr> | (resulting in a type error if it's something else) |
2021-10-23 18:58:46 +0200 | <awpr> | equality constraints in instance contexts are interesting beasts |
2021-10-23 18:59:13 +0200 | peterhil | (~peterhil@mobile-access-5672cd-211.dhcp.inet.fi) |
2021-10-23 18:59:27 +0200 | emanuele6 | (~emanuele6@net-2-36-101-242.cust.vodafonedsl.it) |
2021-10-23 18:59:46 +0200 | emanuele6 | (~emanuele6@net-2-36-101-242.cust.vodafonedsl.it) (Changing host) |
2021-10-23 18:59:46 +0200 | emanuele6 | (~emanuele6@user/emanuele6) |
2021-10-23 19:02:05 +0200 | <hpc> | it's also kind of just the natural continuation of general class constraints in instance definitions |
2021-10-23 19:02:19 +0200 | <hpc> | the right side of (=>) is all that counts for instance resolution |
2021-10-23 19:02:37 +0200 | hyiltiz | (~quassel@31.220.5.250) |
2021-10-23 19:02:45 +0200 | <awpr> | yeah, the interesting new thing about them is that they can cause the type the instance head matched to "change" by unification |
2021-10-23 19:03:10 +0200 | <hpc> | yeah |
2021-10-23 19:03:23 +0200 | <hpc> | instance Show a => ... lets you use show |
2021-10-23 19:03:26 +0200 | <jkaye> | Anyone tried out Polysemy for a larger project? Wondering if it's worth looking into, I like the idea of dealing with effects in that way, but also have never really had a problem with mtl |
2021-10-23 19:03:31 +0200 | <hpc> | instance (a ~ Char) => ... lets you use ord, chr, etc |
2021-10-23 19:03:51 +0200 | <awpr> | right, but it also can make the call site behave differently under type inference |
2021-10-23 19:04:41 +0200 | <geekosaur> | hm, isn't polytsemy the one that really wants a patched compiler for decent performance? |
2021-10-23 19:04:46 +0200 | <geekosaur> | *polysemy |
2021-10-23 19:07:08 +0200 | segfaultfizzbuzz | (~segfaultf@135-180-0-138.static.sonic.net) |
2021-10-23 19:07:41 +0200 | <yushyin> | geekosaur: eff |
2021-10-23 19:07:50 +0200 | <geekosaur> | oh |
2021-10-23 19:08:23 +0200 | <geekosaur> | lose track of all these effects libraries :/ |
2021-10-23 19:08:24 +0200 | Guest9678 | (~neo3@cpe-292712.ip.primehome.com) |
2021-10-23 19:08:31 +0200 | <dsal> | poultrysemi |
2021-10-23 19:08:43 +0200 | <yushyin> | and afaik the ghc-proposal was accepted but is yet to be implemented |
2021-10-23 19:08:46 +0200 | <dsal> | It used to require compiler plugins. eff required new primops of some sort. |
2021-10-23 19:08:52 +0200 | <awpr> | we have all these libraries for tracking effects, but what we really need is a library for keeping track of effects _libraries_ |
2021-10-23 19:09:22 +0200 | <geekosaur> | there's an xkcd for that |
2021-10-23 19:09:58 +0200 | <awpr> | I was thinking it sounded a bit like "14 competing standards", but this case is a bit more meta |
2021-10-23 19:10:00 +0200 | wootehfoot | (~wootehfoo@user/wootehfoot) |
2021-10-23 19:10:15 +0200 | <yushyin> | https://github.com/hasura/eff/issues/15 |
2021-10-23 19:10:20 +0200 | <geekosaur> | that one, yes |
2021-10-23 19:10:54 +0200 | ArtVandelayer | (~ArtVandel@ip174-68-147-20.lv.lv.cox.net) (Ping timeout: 258 seconds) |
2021-10-23 19:11:13 +0200 | aegon | (~mike@174.127.249.180) |
2021-10-23 19:13:02 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2021-10-23 19:15:36 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2021-10-23 19:17:23 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2021-10-23 19:17:38 +0200 | nekroxxiga | (~nekroxxig@88.222.185.135) |
2021-10-23 19:17:48 +0200 | rk04 | (~rk04@user/rajk) |
2021-10-23 19:19:25 +0200 | Guest32 | (~Guest32@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 256 seconds) |
2021-10-23 19:19:29 +0200 | <remexre> | Is there a typeclass that's sufficient to express filterability? |
2021-10-23 19:19:41 +0200 | <awpr> | Filterable/Witherable |
2021-10-23 19:19:51 +0200 | <awpr> | https://hackage.haskell.org/package/witherable-0.4.2/docs/Data-Witherable.html |
2021-10-23 19:21:40 +0200 | jollygood2 | (~bc8165b6@217.29.117.252) (Quit: quit) |
2021-10-23 19:22:53 +0200 | rk04 | (~rk04@user/rajk) (Ping timeout: 244 seconds) |
2021-10-23 19:24:50 +0200 | notzmv | (~zmv@user/notzmv) (Ping timeout: 260 seconds) |
2021-10-23 19:27:47 +0200 | xsperry | (~xs@user/xsperry) () |
2021-10-23 19:28:11 +0200 | <monochrom> | Nice, the reactionary movement of elliding hierarchical module names and going "module Witherable" :) |
2021-10-23 19:29:59 +0200 | turlando | (~turlando@user/turlando) (Ping timeout: 265 seconds) |
2021-10-23 19:32:13 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) |
2021-10-23 19:32:13 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-10-23 19:36:04 +0200 | <hpc> | soon we'll be writing #include <lens.h> |
2021-10-23 19:36:58 +0200 | <dsal> | The previous version of the codebase I'm working on had lens in their prelude, but now it's banned. I feel like they may have overcorrected. |
2021-10-23 19:36:59 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) (Ping timeout: 264 seconds) |
2021-10-23 19:37:21 +0200 | <hpc> | ew, the older versions of witherable don't have module Witherable either |
2021-10-23 19:37:29 +0200 | <hpc> | it's the benjamin button of software |
2021-10-23 19:37:42 +0200 | <hpc> | going back in time with every release |
2021-10-23 19:37:45 +0200 | rk04 | (~rk04@user/rajk) |
2021-10-23 19:40:06 +0200 | kuribas | (~user@ptr-25vy0i98mhuqx60svv0.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
2021-10-23 19:41:45 +0200 | <maerwald> | dsal: why? |
2021-10-23 19:42:14 +0200 | <dsal> | The story I heard was that devs were "bored" or something and trying to look super smart, so they just did all the fancy stuff they could. |
2021-10-23 19:42:58 +0200 | Vajb | (~Vajb@n8vwdu04eps78g521-2.v6.elisa-mobile.fi) |
2021-10-23 19:43:11 +0200 | <geekosaur> | "Bored now!" |
2021-10-23 19:43:20 +0200 | <maerwald> | that's why you give devs the freedom to experiment outside of your codebase |
2021-10-23 19:43:28 +0200 | <maerwald> | but... most managers don't understand this |
2021-10-23 19:43:45 +0200 | <dsal> | I had a case where lens wasn't necessary, but it made a five line special function digging through a list of records to pull a string value of out of an aeson object out of a Maybe. I replaced it with five or so lines of function, but it doesn't read better, IMO. |
2021-10-23 19:44:24 +0200 | <dsal> | It does read better in the O of someone who says nobody should have to know any libraries to work on the codebase. Apparently encountering `_Just` completely blew his mind and he had no idea what it might do. |
2021-10-23 19:44:59 +0200 | <maerwald> | if you use lens, you should have a good internal tutorial |
2021-10-23 19:45:13 +0200 | <maerwald> | not "go google about it" |
2021-10-23 19:45:29 +0200 | <dsal> | The approximate argument I'm failing to understand and characterizing badly is "people shouldn't have to learn things" |
2021-10-23 19:45:58 +0200 | <dsal> | But yeah, in this discussion, they looked up the docs for _Just and were complaining about how impossible it is to understand. I pointed out that this is not a reasonable way to learn things. |
2021-10-23 19:46:11 +0200 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2021-10-23 19:46:11 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
2021-10-23 19:46:14 +0200 | allbery_b | geekosaur |
2021-10-23 19:46:15 +0200 | <maerwald> | all depends on internal culture... if none of the seniors can be bothered to take a day to help juniors without being productive, well... |
2021-10-23 19:46:34 +0200 | <dsal> | The code was basically `view (someField . _Just . key "thing" . _String)` and that's just too much, man. |
2021-10-23 19:46:35 +0200 | <maerwald> | I've been in companies were seniors are more concerned with their own productivity |
2021-10-23 19:46:43 +0200 | <dsal> | I'd *love* to help people understand stuff. That's my favorite thing to do. |
2021-10-23 19:47:16 +0200 | burnsidesLlama | (~burnsides@dhcp168-012.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-10-23 19:48:00 +0200 | <dsal> | I said I'd rather buy everyone a copy of Penner's book if they don't understand something than to just avoid it. I can understand how that came across poorly, though. |
2021-10-23 19:48:23 +0200 | <monochrom> | When I was young and reckless and arrogant, I said a few arrogant things. A minority turns out to be timeless truth, not arrogance. |
2021-10-23 19:48:49 +0200 | <dsal> | I'm old and reckless, but try not to be arrogant. |
2021-10-23 19:48:53 +0200 | <monochrom> | People do write-protect their brains upon graduation or hitting age 21 or something. |
2021-10-23 19:49:16 +0200 | <maerwald> | lol |
2021-10-23 19:49:40 +0200 | <dsal> | I'm not sure how old the guy is who's running this project, but he did point out that he's working on a cache that might need to be reevaluated. So he at least recognized that phenomenon. |
2021-10-23 19:49:45 +0200 | rk04 | (~rk04@user/rajk) (Ping timeout: 244 seconds) |
2021-10-23 19:51:36 +0200 | geekosaur | at least tries to keep his brain R/W. seems to get harder as he gets older though :( |
2021-10-23 19:51:48 +0200 | <dsal> | The problem I run into a lot is people don't want to have to "know" a library or concept or something, they'd rather just see lots of redundant code. But that code all has to be named something. So now I have to come up with a new name for the concept and that's the hardest part. |
2021-10-23 19:52:07 +0200 | <geekosaur> | (sadly this only really got to be a problem a few years ago) |
2021-10-23 19:52:08 +0200 | <monochrom> | BTW I also oppose to the millenial learn-off-free-resources-on-the-internet notion that library docs are obliged to teach. |
2021-10-23 19:52:46 +0200 | <monochrom> | Library docs are obliged to specify. There is difference. |
2021-10-23 19:52:51 +0200 | <dsal> | One of the vague rules is to not write instances of things, just functions. e.g., `concatSomeThing` is preferable to `Semigroup SomeThing` or whatever. But now I have to have a huge vocabulary and wonder why this things' special each time. I don't pay much attention to that one, though. |
2021-10-23 19:53:14 +0200 | <dsal> | Library docs are pretty good for what they are. |
2021-10-23 19:53:30 +0200 | <monochrom> | And when library docs include examples, they are to clarify the spec, still not to teach. |
2021-10-23 19:53:51 +0200 | <dsal> | I was using a library recently while learning a new concept and the docs had zero docstrings, but I could still understand how to use the thing because the types told the story. |
2021-10-23 19:54:51 +0200 | <hpc> | monochrom: funny you mention that, i always go straight to library docs because i prefer specifying to "tutorializing" |
2021-10-23 19:54:54 +0200 | <dsal> | But yeah, I found linking to the docs for _Just as an argument for how it's confusing was disingenuous: https://hackage.haskell.org/package/lens-5.0.1/docs/Control-Lens-Prism.html#v:_Just |
2021-10-23 19:55:28 +0200 | <dsal> | There are a few cases where you can actually read and write stuff without having a super deep understanding of it. Prisms are kind of that. |
2021-10-23 19:55:50 +0200 | <dsal> | In that discussion, I was asked if I knew that _Just was actually a prism and not a lens and whether I could explain to strawman what it actually did and how it failed and all that. |
2021-10-23 19:56:36 +0200 | <dsal> | You don't need to get into theory, though. I'm making a list of stuff. It has to pick stuff out of a record. There's a Maybe here. If it hits Nothing, then I'm not going to find the things I'm looking for down that path. You don't need to understand how profunctors compose to get it. |
2021-10-23 20:01:14 +0200 | rond_ | (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) (Quit: Client closed) |
2021-10-23 20:04:48 +0200 | hololeap | (~hololeap@user/hololeap) (Ping timeout: 276 seconds) |
2021-10-23 20:04:55 +0200 | hololeap_ | (~hololeap@user/hololeap) |
2021-10-23 20:05:43 +0200 | max22- | (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Ping timeout: 258 seconds) |
2021-10-23 20:07:15 +0200 | hololeap_ | hololeap |
2021-10-23 20:08:08 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-10-23 20:08:21 +0200 | <hololeap> | the names of things naturally bring up theory, though. someone has to eventually ask why it's named Functor |
2021-10-23 20:08:57 +0200 | <hpc> | eventually |
2021-10-23 20:09:24 +0200 | <geekosaur> | unless they ask "Why isn't it named something meaningful?" |
2021-10-23 20:09:42 +0200 | <hololeap> | you could just say it's greek, which is technically true I think :p |
2021-10-23 20:10:25 +0200 | <[exa]> | I guess FP naming is still much better than combs & sheafs & fibrations |
2021-10-23 20:10:38 +0200 | <dsal> | Sure. I deleted a bunch of code in a change to just make a thing a monoid and got pushback from strawman noob guy because he didn't know what any of that was. Meanwhile, I stared at this code for a while to realize it's just `foldMap` with a bunch of new names. |
2021-10-23 20:10:40 +0200 | <[exa]> | except, well, for the case of lenses |
2021-10-23 20:12:01 +0200 | <dsal> | It's a weird balance. Do you want someone who doesn't know anything to be able to come in and work on code at the expected rate, or do you want people who *do* know things to come in and work on code at that expected rate? |
2021-10-23 20:12:23 +0200 | random-jellyfish | (~random-je@user/random-jellyfish) |
2021-10-23 20:12:32 +0200 | turlando | (~turlando@93-42-250-112.ip89.fastwebnet.it) |
2021-10-23 20:12:32 +0200 | turlando | (~turlando@93-42-250-112.ip89.fastwebnet.it) (Changing host) |
2021-10-23 20:12:32 +0200 | turlando | (~turlando@user/turlando) |
2021-10-23 20:12:38 +0200 | <aegon> | what do y'all think is the eta on dependent haskell |
2021-10-23 20:12:54 +0200 | <[exa]> | dsal: honestly I wouldn't say that the catch-up lag is THAT harsh |
2021-10-23 20:13:03 +0200 | <hololeap> | I think getting someone up to speed on monoids is probably a good first mandatory introduction to the terms |
2021-10-23 20:13:14 +0200 | <dsal> | [exa]: heh, which one? |
2021-10-23 20:13:14 +0200 | <aegon> | imo if you dont have the time and energy to train a new hire on your code base, don't hire anyone |
2021-10-23 20:13:23 +0200 | <dsal> | I'm hugely biased towards everyone knowing things that I know. |
2021-10-23 20:13:31 +0200 | <aegon> | its wrong to them, wrong to you and its an easy way to grow antagonisim in your org |
2021-10-23 20:13:40 +0200 | <geekosaur> | aegon, a long time |
2021-10-23 20:14:01 +0200 | <hololeap> | getting someone to intuitively understand monoids opens the door to so much else |
2021-10-23 20:14:15 +0200 | <dsal> | aegon: "we need to hire more people" usually comes from people who aren't working on codebases. |
2021-10-23 20:14:42 +0200 | <geekosaur> | not only are we a long ways from it, but apparently linear haskell is getting more internal attention right now |
2021-10-23 20:15:21 +0200 | <geekosaur> | "the mythical man-month" |
2021-10-23 20:15:24 +0200 | <dsal> | I've often been asked after giving an estimate for how long it'll take to do something how long it'd take me to get someone else to do something. I'm only really good at expressing my ideas in code and I don't know all the detailed issues until I encounter them. My estimates aren't too bad with that. However, if I have to use someone else's brain and hands, it's definitely going to take me 8x longer. |
2021-10-23 20:16:35 +0200 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) |
2021-10-23 20:16:44 +0200 | falafel | (~falafel@cpe-76-168-195-162.socal.res.rr.com) |
2021-10-23 20:17:03 +0200 | <hololeap> | translating code to and from english (or whatever language you're speaking) is a lot of overhead, but being able to discuss it in english seems pretty necessary |
2021-10-23 20:17:17 +0200 | <geekosaur> | also I get the impression dependent haskell is more or less eisenberg's personal project and mostly doesn't exist even in his head yet, only vague ideas that have yet to be firmed down |
2021-10-23 20:17:38 +0200 | <geekosaur> | (I think it's eisenberg?) |
2021-10-23 20:17:55 +0200 | <dsal> | hololeap: I don't completely disagree with that, but I can't discuss it in English before it exists because I only have a vague idea of what it is. e.g., I know what parts needs to exist at a pretty high level, but when I start working on them, I realize there are necessary things at the bottom I wasn't thinking of. |
2021-10-23 20:18:12 +0200 | <hololeap> | yeah, you both need to be on the same level |
2021-10-23 20:18:23 +0200 | <hololeap> | or similar at least |
2021-10-23 20:18:30 +0200 | <dsal> | It comes down to: Do you want to see it working, or do you want me to tell you a story about what something that might work looks like where each sentence is increasingly further from the truth? |
2021-10-23 20:18:32 +0200 | <aegon> | geekosaur: well, linear is pretty cool too but the need for a whole other iteration on existing libs to really take advantage of it makes it seem super far off too |
2021-10-23 20:19:30 +0200 | <[exa]> | dsal: like, there is a serious ratio of programmers out there who just refuse to learn, which might be a problem though, but from what I've seen you can get productive in typemagic-less haskell in 1-2 days, just by trying things |
2021-10-23 20:19:55 +0200 | notzmv | (~zmv@user/notzmv) |
2021-10-23 20:19:58 +0200 | <aegon> | dsal: yeah, i think there are a ton of problems with our current structure for stuff. I thought things were much more sane untill i worked at microsoft |
2021-10-23 20:20:13 +0200 | <aegon> | their team / org nonesense is the craziest pile of garbo i've experienced |
2021-10-23 20:20:24 +0200 | <aegon> | only place i quit in a spectacle |
2021-10-23 20:20:30 +0200 | <dsal> | [exa]: Sure. And there are lots of things you can be reasonably good at without actually understanding them. I kind of recommend that approach in general. Don't try to completely understand something before using it. |
2021-10-23 20:20:57 +0200 | <dsal> | aegon: I worked at Google for a while which has a strong culture for design docs for everything. But people were pretty happy with me writing design docs after I had stuff working. |
2021-10-23 20:21:07 +0200 | <aegon> | lol |
2021-10-23 20:21:35 +0200 | <aegon> | my experience with microsoft was no one has time to help anyone so figure it out, then the people who make the most convoluded systems get praise and ego and continue doing it |
2021-10-23 20:21:44 +0200 | <geekosaur> | well, sure. how often do you get decent docs for anything? |
2021-10-23 20:22:10 +0200 | <aegon> | so you end up with toxicity top down and a bunch of new hires out of college taht don't know this isn't normal freaking out trying to learn with no one to mentor |
2021-10-23 20:22:15 +0200 | <geekosaur> | so you have lofty goals but in the end any docs at all are a win |
2021-10-23 20:22:23 +0200 | <[exa]> | aegon: is that internal or external experience? (I reached that externally :D ) |
2021-10-23 20:22:25 +0200 | <dsal> | aegon: Yeah, there's a butterfly effect in incentives at some of these places. We want people who can demonstrate an ability to manage complexity. Challenge accepted. |
2021-10-23 20:22:47 +0200 | <hololeap> | haskell libs seem to have a lot of good docs, if they are a little verbose with the theoretical jargon |
2021-10-23 20:23:05 +0200 | <geekosaur> | [exa], note "I thought things were much more sane untill i worked at microsoft" |
2021-10-23 20:23:06 +0200 | Vajb | (~Vajb@n8vwdu04eps78g521-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer) |
2021-10-23 20:23:07 +0200 | <dsal> | and terse with any human language at all. :) |
2021-10-23 20:23:16 +0200 | <aegon> | internal, i've been a manager at a couple places now and it literaly made me flip tables one day. apparently the guy who holds the power has changed since i blew up but it was just a terrible experience and i feel bad for folks that start there |
2021-10-23 20:24:07 +0200 | <aegon> | the rest of the team like sent me thank you texts after |
2021-10-23 20:24:22 +0200 | <hololeap> | there seems to be a positive feedback loop surrounding toxicity in organizations as the best and brightest quit in frustration leaving only those who can tolerate it |
2021-10-23 20:24:25 +0200 | <[exa]> | oh that's nice actually |
2021-10-23 20:24:47 +0200 | <dsal> | I'm going to be working with a guy shortly who has ~no Haskell experience. I'm pretty excited about it. I'm hoping for a combination of having things that are hard to use incorrectly and easy to use correctly helping guide the process along. |
2021-10-23 20:26:13 +0200 | <monochrom> | Eh hard to use incorrectly? "challenge accepted" >:) |
2021-10-23 20:26:36 +0200 | <monochrom> | Among my students, the weak ones try that. |
2021-10-23 20:26:40 +0200 | <dsal> | ha. Well, e.g., you can't make an HTTP request in the middle of a DB transaction. |
2021-10-23 20:26:50 +0200 | <hololeap> | oh, speaking of, what is a good alternative prelude that does away with partial functions? |
2021-10-23 20:27:14 +0200 | <[exa]> | dsal: slight hint, never insist that it's "better" (it's not), I'm usually saying that "it saves me a lot of coding" which is caught up much more smoothly |
2021-10-23 20:27:17 +0200 | rk04 | (~rk04@user/rajk) |
2021-10-23 20:27:23 +0200 | <dsal> | hololeap: We've got a vicious hlint precommit for that sort of thing. |
2021-10-23 20:27:24 +0200 | burnsidesLlama | (~burnsides@dhcp168-012.wadham.ox.ac.uk) |
2021-10-23 20:27:26 +0200 | <[exa]> | dsal: also, friendly constructive code reviews help. :D |
2021-10-23 20:27:56 +0200 | <aegon> | whew, sorry for the ranting, that + some morning coffee brought back some crud |
2021-10-23 20:28:19 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:4852:7354:5eb5:641f) |
2021-10-23 20:28:43 +0200 | <hololeap> | no worries, it was a pretty small rant |
2021-10-23 20:28:50 +0200 | <[exa]> | aegon: no worries I guess, I'm happy to have my stuff confirmed from insiders :D |
2021-10-23 20:28:53 +0200 | xsperry | (~xs@user/xsperry) |
2021-10-23 20:29:12 +0200 | <dsal> | [exa]: Yeah. Makes sense. Saves time coding is less important than saves time reading, which is where the arguments come from. I think reading a super simple lens access thing (just field . field . _Just . field . etc) is easier than reading the function I wrote in its place. Others thing the function is easier because you don't have to "know anything." |
2021-10-23 20:29:23 +0200 | <geekosaur> | I could have done that, secondhand |
2021-10-23 20:30:13 +0200 | <dsal> | My favorite part of that particular discussion was that I spent like, three or four days rewriting this test three times because of "simplicity" bikeshedding yet nobody noticed that in a previously bikeshed commit where I introduced my Transaction monad, *it did start a transaction* |
2021-10-23 20:30:29 +0200 | <dsal> | er. *did not* |
2021-10-23 20:30:45 +0200 | <dsal> | Like, the whole point of the thing was to do DB work in a transaction, and it didn't do the most basic thing it was supposed to do. |
2021-10-23 20:30:47 +0200 | Guest9678 | (~neo3@cpe-292712.ip.primehome.com) (Quit: Leaving) |
2021-10-23 20:31:31 +0200 | <geekosaur> | I know the guy who came up with what got perverted into sharepoint. boy did he ever have scathing things to say about the business side of ms |
2021-10-23 20:32:11 +0200 | rk04 | (~rk04@user/rajk) (Ping timeout: 264 seconds) |
2021-10-23 20:32:17 +0200 | <geekosaur> | (he was in msr) |
2021-10-23 20:32:20 +0200 | dyeplexer | (~dyeplexer@user/dyeplexer) (Remote host closed the connection) |
2021-10-23 20:32:53 +0200 | <[exa]> | "... what got perverted into ..." -- ah yeah that's the way. |
2021-10-23 20:33:14 +0200 | <dsal> | Yeah, it often seems like the business people are there like, "Yeah, that's a good idea and all, but what can we add to make it worse before selling it to people?" |
2021-10-23 20:33:59 +0200 | burnsidesLlama | (~burnsides@dhcp168-012.wadham.ox.ac.uk) (Ping timeout: 264 seconds) |
2021-10-23 20:34:05 +0200 | <dsal> | I always think of Sony with that because I like dated references. The PSP was a pretty amazing piece of technology, but let's make a proprietary storage device and a proprietary media format and assume everyone will just buy all new things from us. |
2021-10-23 20:34:13 +0200 | <[exa]> | "People will miss MS Comic Chat integration" |
2021-10-23 20:34:16 +0200 | jkaye | (~jkaye@2601:281:8300:7530:30bc:26a4:e2b8:8034) (Ping timeout: 245 seconds) |
2021-10-23 20:36:21 +0200 | <hpc> | it doesn't even take business people to ruin software - just look at yaml |
2021-10-23 20:36:34 +0200 | <dsal> | haha. I'd rather not. |
2021-10-23 20:36:53 +0200 | <hpc> | take a perfectly sensible data format, then add a zillion aliases for true/false and add the classic xml amplification vulnerability back |
2021-10-23 20:36:55 +0200 | max22- | (~maxime@2a01cb08833598006074215d6309d66e.ipv6.abo.wanadoo.fr) |
2021-10-23 20:37:07 +0200 | <[exa]> | you mean "what people think is yaml" or "what yaml specification tries to say" ? :D |
2021-10-23 20:37:19 +0200 | <hpc> | the latter |
2021-10-23 20:37:30 +0200 | <hpc> | such as it is - it's not very well documented either |
2021-10-23 20:37:32 +0200 | <[exa]> | ah yes that's the victim of xml |
2021-10-23 20:37:36 +0200 | <dsal> | My favorite yaml feature is Norway. |
2021-10-23 20:38:15 +0200 | <[exa]> | all at all, this stuff is victim of software designers who fail terribly at parsing&validating inputs |
2021-10-23 20:38:33 +0200 | benin | (~benin@183.82.207.116) |
2021-10-23 20:40:38 +0200 | <dsal> | Postel's law was repealed. |
2021-10-23 20:41:49 +0200 | <shapr> | too bad |
2021-10-23 20:41:52 +0200 | <monochrom> | Oh, that was not from Larry Wall? |
2021-10-23 20:42:27 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 244 seconds) |
2021-10-23 20:42:46 +0200 | <c_wraith> | Postel's law is a really bad idea anyway |
2021-10-23 20:42:54 +0200 | <c_wraith> | It just encourages being sloppy |
2021-10-23 20:42:54 +0200 | jstolarek | (~jstolarek@137.220.120.162) |
2021-10-23 20:44:04 +0200 | <c_wraith> | if you're liberal in what you accept, there will be people who aren't strict in what they produce. |
2021-10-23 20:44:12 +0200 | ubert | (~Thunderbi@77.119.175.138.wireless.dyn.drei.com) |
2021-10-23 20:44:32 +0200 | peterhil | (~peterhil@mobile-access-5672cd-211.dhcp.inet.fi) (Ping timeout: 244 seconds) |
2021-10-23 20:45:23 +0200 | <[exa]> | by "liberal in what you accept" I usually read as "choose the subset yourself", not "parse everything" |
2021-10-23 20:45:25 +0200 | ski | . o O ( co- & contra-variance of function type, vs. bounded polymorphism ) |
2021-10-23 20:46:41 +0200 | hendursa1 | (~weechat@user/hendursaga) (Quit: hendursa1) |
2021-10-23 20:47:22 +0200 | hendursaga | (~weechat@user/hendursaga) |
2021-10-23 20:48:43 +0200 | Midjak | (~Midjak@82-65-111-221.subs.proxad.net) |
2021-10-23 20:48:44 +0200 | <monochrom> | Oh! That kind of liberal. Heh. |
2021-10-23 20:48:51 +0200 | peterhil | (~peterhil@mobile-access-5672cd-211.dhcp.inet.fi) |
2021-10-23 20:49:14 +0200 | solomon | (~solomon@cpe-76-168-7-139.socal.res.rr.com) |
2021-10-23 20:49:26 +0200 | <dsal> | That's not how people did it SMTP. |
2021-10-23 20:49:49 +0200 | <hpc> | there are no lessons to be learned from smtp |
2021-10-23 20:50:05 +0200 | <c_wraith> | sure there is. "EHLO" is the best way to spell "Hello". |
2021-10-23 20:50:07 +0200 | <solomon> | is it possible to have two `%token` directives in a Happy parser? I want to do the token case matching different in certain contexts. |
2021-10-23 20:51:14 +0200 | <hendursaga> | c_wraith: I think Edison's Hallo is better :P |
2021-10-23 20:53:23 +0200 | <hpc> | the LTE protocol initiates connections with "NEW PHONE WHO DIS" |
2021-10-23 20:54:45 +0200 | <dsal> | It totally would if I worked on that protocol. |
2021-10-23 20:55:30 +0200 | <dsal> | I used to do simple text protocols with `:)` to indicate a positive response and `:(` to indicate a negative response. |
2021-10-23 20:56:16 +0200 | Null_A | (~null_a@2601:645:8700:2290:6cb0:bf84:22bf:3285) (Remote host closed the connection) |
2021-10-23 20:56:20 +0200 | random-jellyfish | (~random-je@user/random-jellyfish) (Ping timeout: 256 seconds) |
2021-10-23 20:58:13 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2021-10-23 21:03:48 +0200 | falafel | (~falafel@cpe-76-168-195-162.socal.res.rr.com) (Remote host closed the connection) |
2021-10-23 21:03:58 +0200 | falafel | (~falafel@cpe-76-168-195-162.socal.res.rr.com) |
2021-10-23 21:07:05 +0200 | Pickchea | (~private@user/pickchea) |
2021-10-23 21:07:26 +0200 | max22- | (~maxime@2a01cb08833598006074215d6309d66e.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
2021-10-23 21:07:30 +0200 | mtjm | (~mutantmel@2604:a880:2:d0::208b:d001) |
2021-10-23 21:08:00 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 21:08:08 +0200 | max22- | (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
2021-10-23 21:11:16 +0200 | jkaye | (~jkaye@2601:281:8300:7530:5bae:6a75:284d:ff5) |
2021-10-23 21:12:14 +0200 | son0p | (~ff@181.136.122.143) |
2021-10-23 21:12:47 +0200 | <dsal> | amazonka 2.0 is using generic lens which is kind of neat except the error messages are unnecessarily not as good as they should be. You do `field @"x"` instead of the older thing, but then it's like, "There's no x" |
2021-10-23 21:13:47 +0200 | <hololeap> | is there a way to make an exception hierarchy that is less boilerplatey than what's described in the Control.Exception docs? |
2021-10-23 21:15:11 +0200 | <hololeap> | I have NoRootException and AmbiguousRootException, and I just want to be able to catch either one of these but not other exceptions |
2021-10-23 21:15:35 +0200 | <hololeap> | or is making a heirarchy for something this simple even a good idea? |
2021-10-23 21:16:06 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 21:16:17 +0200 | <hololeap> | maybe polysemy would be a good fit here. I have yet to try that out |
2021-10-23 21:16:34 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 252 seconds) |
2021-10-23 21:17:13 +0200 | <dsal> | I've seen that in the form of a RootedException with two constructors. |
2021-10-23 21:17:33 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Client Quit) |
2021-10-23 21:17:47 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 21:19:08 +0200 | Guest52 | (~Guest52@144.164.185.81.rev.sfr.net) |
2021-10-23 21:19:12 +0200 | <hololeap> | yeah that's a good idea |
2021-10-23 21:19:39 +0200 | <Guest52> | I'm trying to match againt Map.empty but I'm getting "Qualified name in binding posiition" ? |
2021-10-23 21:20:03 +0200 | max22- | (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Remote host closed the connection) |
2021-10-23 21:20:12 +0200 | <dsal> | hololeap: in particular, I was doing this yesterday or so: https://hackage.haskell.org/package/postgresql-simple-0.6.4/docs/Database-PostgreSQL-Simple-FromFi… |
2021-10-23 21:20:24 +0200 | <Guest52> | the Map module has to be imported qualified |
2021-10-23 21:20:36 +0200 | <dsal> | Guest52: can you show more code? |
2021-10-23 21:20:40 +0200 | max22- | (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
2021-10-23 21:20:46 +0200 | <dsal> | You probably don't want to match against Map.empty anyway. Do you just mean null? |
2021-10-23 21:20:47 +0200 | <dsal> | :t null |
2021-10-23 21:20:48 +0200 | <lambdabot> | Foldable t => t a -> Bool |
2021-10-23 21:21:12 +0200 | <hololeap> | Map.empty is the same as mempty, actually |
2021-10-23 21:21:51 +0200 | <ski> | you could rewrite `foo M.empty = ...; ...' into `foo (null -> True) = ...; ...', using `ViewPatterns' |
2021-10-23 21:22:12 +0200 | <ski> | (or `foo m | null m = ...; ...') |
2021-10-23 21:23:10 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds) |
2021-10-23 21:23:48 +0200 | max22- | (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Remote host closed the connection) |
2021-10-23 21:24:05 +0200 | <hololeap> | dsal: I suppose my only complaint with that approach is that you can't specify exactly which exception constructor a function may return at the type level |
2021-10-23 21:24:21 +0200 | <hololeap> | it really isn't much of a big deal, though |
2021-10-23 21:24:23 +0200 | max22- | (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
2021-10-23 21:24:33 +0200 | <c_wraith> | Guest52: you can't match against named values anyway - only patterns. |
2021-10-23 21:24:49 +0200 | <c_wraith> | Guest52: that's what the error message is trying to tell you, except it focused on a weird detail |
2021-10-23 21:25:03 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 21:25:17 +0200 | <dsal> | hololeap: Yeah. I only cared in a test where the test framework that would catch the exception and return a bool if it matched, so it worked out fine for me. :) |
2021-10-23 21:25:27 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 258 seconds) |
2021-10-23 21:25:35 +0200 | andrevdm | (~andre@41.76.35.141) (Ping timeout: 264 seconds) |
2021-10-23 21:25:40 +0200 | <Guest52> | dsal: I don't really know what to show .. https://paste.tomsmeding.com/JJubAVjX |
2021-10-23 21:26:20 +0200 | <hololeap> | doesn't map have a pattern synonym for that? |
2021-10-23 21:26:43 +0200 | <c_wraith> | hololeap: no, because there's no good matching pattern synonym for extracting a value |
2021-10-23 21:26:45 +0200 | <Guest52> | c_wraith: oh I see, so there is no pattern for Map.empty I suppose? I should simply use say null in an if/then/else as was suggested? |
2021-10-23 21:27:02 +0200 | <c_wraith> | Guest52: or use a guard, but yeah |
2021-10-23 21:27:07 +0200 | <hololeap> | that's true |
2021-10-23 21:27:08 +0200 | ArtVandelayer | (~ArtVandel@ip174-68-147-20.lv.lv.cox.net) |
2021-10-23 21:27:24 +0200 | falafel | (~falafel@cpe-76-168-195-162.socal.res.rr.com) (Ping timeout: 244 seconds) |
2021-10-23 21:27:46 +0200 | <ski> | Guest52 : you could define a pattern synonym .. |
2021-10-23 21:28:32 +0200 | <dsal> | I just modified a bunch of code to compile against amazonka 2. I assume it's perfect. |
2021-10-23 21:30:26 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 258 seconds) |
2021-10-23 21:31:18 +0200 | <ski> | % pattern Empty :: Foldable t => t a; pattern Empty <- (null -> True) |
2021-10-23 21:31:19 +0200 | <yahb> | ski: |
2021-10-23 21:31:21 +0200 | <ski> | % let foo Empty = () in foo M.empty |
2021-10-23 21:31:21 +0200 | <yahb> | ski: () |
2021-10-23 21:31:25 +0200 | <ski> | Guest52 ^ |
2021-10-23 21:31:48 +0200 | <c_wraith> | where's the other direction of that pattern? :P |
2021-10-23 21:32:11 +0200 | <ski> | unidirectional, for simplicity :b |
2021-10-23 21:32:12 +0200 | <Guest52> | I didn't know you could do that x) |
2021-10-23 21:32:19 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 21:32:29 +0200 | <ski> | which constraints would you like, for bidirectional ? |
2021-10-23 21:32:35 +0200 | <c_wraith> | Monoid, probably |
2021-10-23 21:32:42 +0200 | <ski> | or `Alternative' ? |
2021-10-23 21:33:04 +0200 | <c_wraith> | Hmm, Alternative does match kindedness better |
2021-10-23 21:33:10 +0200 | oxide | (~lambda@user/oxide) |
2021-10-23 21:33:17 +0200 | <ski> | > empty :: S.Set () |
2021-10-23 21:33:18 +0200 | <lambdabot> | error: |
2021-10-23 21:33:18 +0200 | <lambdabot> | • No instance for (Alternative S.Set) arising from a use of ‘empty’ |
2021-10-23 21:33:18 +0200 | <lambdabot> | • In the expression: empty :: S.Set () |
2021-10-23 21:33:19 +0200 | <ski> | > mempty :: S.Set () |
2021-10-23 21:33:20 +0200 | <lambdabot> | fromList [] |
2021-10-23 21:33:25 +0200 | <c_wraith> | but yeah, that |
2021-10-23 21:33:34 +0200 | <c_wraith> | A lot more Monoids than Alternatives |
2021-10-23 21:34:25 +0200 | <ski> | % pattern Empty :: (Monoid (t a),Foldable t) => t a; pattern Empty <- (null -> True) where Empty = empty |
2021-10-23 21:34:25 +0200 | <yahb> | ski: ; <interactive>:131:98: error:; * Could not deduce (Alternative t) arising from a use of `empty'; from the context: (Monoid (t a), Foldable t) bound by the signature for pattern synonym `Empty' at <interactive>:131:52-102; Possible fix: add (Alternative t) to the "required" context of the signature for pattern synonym `Empty'; * In the expression: empty; In an equation for `Emp |
2021-10-23 21:34:32 +0200 | <ski> | % pattern Empty :: (Monoid (t a),Foldable t) => t a; pattern Empty <- (null -> True) where Empty = mempty |
2021-10-23 21:34:33 +0200 | <yahb> | ski: |
2021-10-23 21:35:10 +0200 | <ski> | % let foo Empty = () in foo (Empty :: M.Map Void Void) |
2021-10-23 21:35:10 +0200 | <yahb> | ski: () |
2021-10-23 21:35:41 +0200 | <c_wraith> | I don't really think it's that useful of a pattern, though |
2021-10-23 21:35:56 +0200 | <solomon> | can I use mutliple wrappers with `Alex`? Or at that point should I just write my own? |
2021-10-23 21:36:00 +0200 | <c_wraith> | Because you can't usefully express a complete pattern set that way |
2021-10-23 21:36:50 +0200 | <c_wraith> | Unless... you wanted to get into horrible type-level programming stuff using GHC 9.2 :P |
2021-10-23 21:37:44 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 244 seconds) |
2021-10-23 21:37:52 +0200 | <solomon> | oh nevermind, the `monad` wrapper is basically just a fancier version of `posn` and looks more like an example for how to write your own alex monad wrapper |
2021-10-23 21:37:56 +0200 | <ski> | i was wondering if one could have `InsertMin' or something .. but then that'd be a partial function |
2021-10-23 21:38:07 +0200 | <ski> | (or non-injective, if you return a `Maybe') |
2021-10-23 21:38:35 +0200 | <solomon> | why don't more people use Alex and Happy? All I ever hear about is parser combinators from haskell folks |
2021-10-23 21:38:37 +0200 | <c_wraith> | Yeah, that still doesn't let you create complete patterns |
2021-10-23 21:39:37 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 21:39:55 +0200 | <geekosaur> | solomon, alex and happy are kinda targeted toward folks used to lex/yacc from C, whereas parser combinators are a more natural fit for Haskell |
2021-10-23 21:40:42 +0200 | <solomon> | @geekosaur i have always used parser combinators but recently ported a parser over to Happy and found it to be way nicer for anything non-trivial. Parser Combinators get out of control really fast in my experience |
2021-10-23 21:40:42 +0200 | <lambdabot> | Unknown command, try @list |
2021-10-23 21:41:33 +0200 | <c_wraith> | solomon: did you try using parser combinators over a token stream rather than a character stream? parsing characters is usually where they get unwieldy |
2021-10-23 21:41:46 +0200 | <solomon> | yeah i was using a custom lexer with megaparsec |
2021-10-23 21:41:49 +0200 | <jkaye> | I've had nothing but great experiences with the various Parsec libraries |
2021-10-23 21:42:50 +0200 | <geekosaur> | yeh, it sounds like you may not be using parser combinators especially well. and you can do much the same token parsing with them, by using two different parsers, one to collect characters into tokens and the other to parse the resulting token stream |
2021-10-23 21:43:33 +0200 | <solomon> | happy checkes for ambiguity, handles left recursion perfectly, and happy rules are essentially BNF grammars so you can just have a quick glance and understand hte language |
2021-10-23 21:43:47 +0200 | <geekosaur> | it's also a lot easier to have multiuple parsers, which can also simplify things considerably |
2021-10-23 21:43:54 +0200 | <jkaye> | When you've used combinators, do you define "building blocks" for yourself and compose them together? There's probably a better word for that, but I've seen that mistake before where people just make individual combinators way too large |
2021-10-23 21:44:04 +0200 | <c_wraith> | I often do left recursion just fine with parser combinators. |
2021-10-23 21:44:14 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 258 seconds) |
2021-10-23 21:44:19 +0200 | <c_wraith> | The key is understanding that the parsec design sucks, and not using it. :P |
2021-10-23 21:45:10 +0200 | retro_ | (~retro@2e41e9c8.skybroadband.com) (Ping timeout: 252 seconds) |
2021-10-23 21:45:11 +0200 | <solomon> | @jkaye yes i build up my parsers compositionally when using *parsec |
2021-10-23 21:45:11 +0200 | <lambdabot> | Unknown command, try @list |
2021-10-23 21:45:22 +0200 | <c_wraith> | parsec does have flaws that require you to build your grammar around its limitations |
2021-10-23 21:45:55 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 21:46:21 +0200 | peterhil | (~peterhil@mobile-access-5672cd-211.dhcp.inet.fi) (Ping timeout: 245 seconds) |
2021-10-23 21:47:01 +0200 | <solomon> | *shrug*, idk. Maybe i'm just a bad programmer but after using parser combinators on a bunch of projects and Happy for 48 hours, i'm probably not going back to combinators. |
2021-10-23 21:47:05 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-10-23 21:47:17 +0200 | <davean> | They're not the same |
2021-10-23 21:47:32 +0200 | <davean> | They have different domains and purposes |
2021-10-23 21:47:38 +0200 | <davean> | well similar purposes |
2021-10-23 21:47:42 +0200 | geekosaur | used yacc for a couple decades and doesn't miss it |
2021-10-23 21:47:47 +0200 | <solomon> | well, my domain of interest is writing languages |
2021-10-23 21:47:59 +0200 | <hololeap> | % :t lens id (const Identity) |
2021-10-23 21:47:59 +0200 | <yahb> | hololeap: Functor f => (a -> f b) -> a -> f (Identity b) |
2021-10-23 21:48:25 +0200 | <hololeap> | is there another name for this (replacing Identity with another constructor) |
2021-10-23 21:48:42 +0200 | <hololeap> | (I just used Identity here for illustrative purposes) |
2021-10-23 21:49:19 +0200 | <c_wraith> | monad morphism, when they're monads. |
2021-10-23 21:49:44 +0200 | <hololeap> | well, I meant in lens terms. it seems like it wouldn't need to be as powerful as a lens with id thrown in there |
2021-10-23 21:51:10 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 244 seconds) |
2021-10-23 21:51:18 +0200 | <hololeap> | % :t lens id (const Identity) :: Lens s (Identity b) a b |
2021-10-23 21:51:18 +0200 | <yahb> | hololeap: ; <interactive>:1:1: error:; * Couldn't match type `a1' with `s1'; Expected: (a1 -> f1 b1) -> s1 -> f1 (Identity b1); Actual: (a1 -> f1 b1) -> a1 -> f1 (Identity b1); `a1' is a rigid type variable bound by; an expression type signature:; forall s1 b1 a1. Lens s1 (Identity b1) a1 b1; at <interactive>:1:29-51; `s1' is a rigid type variable bound by; |
2021-10-23 21:52:10 +0200 | <c_wraith> | that doesn't look very lensy |
2021-10-23 21:52:13 +0200 | <hololeap> | % :t lens id (const Identity) :: Lens a (Identity b) a b |
2021-10-23 21:52:13 +0200 | <yahb> | hololeap: Functor f => (a -> f b) -> a -> f (Identity b) |
2021-10-23 21:52:17 +0200 | <hololeap> | there it is |
2021-10-23 21:52:39 +0200 | retroid_ | (~retro@2e41e9c8.skybroadband.com) |
2021-10-23 21:52:53 +0200 | <c_wraith> | I'm pretty sure that doesn't actually satisfy the unchecked requirements on the type of a lens |
2021-10-23 21:53:13 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 21:53:13 +0200 | peterhil | (~peterhil@mobile-access-5672cd-211.dhcp.inet.fi) |
2021-10-23 21:55:12 +0200 | <c_wraith> | yeah, it doesn't. |
2021-10-23 21:55:49 +0200 | jstolarek | (~jstolarek@137.220.120.162) (Ping timeout: 244 seconds) |
2021-10-23 21:56:05 +0200 | <c_wraith> | See the "Why is it a Lens Family" section in http://comonad.com/reader/2012/mirrored-lenses/ |
2021-10-23 21:56:13 +0200 | <hololeap> | hm, which way would it misbehave? |
2021-10-23 21:57:29 +0200 | <c_wraith> | In that particular case, since Identity does nothing, I'm pretty sure you can't actually find a case where it does |
2021-10-23 21:57:53 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 244 seconds) |
2021-10-23 21:58:25 +0200 | oxide | (~lambda@user/oxide) (Quit: oxide) |
2021-10-23 21:59:30 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 22:00:28 +0200 | _ht | (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
2021-10-23 22:00:45 +0200 | <c_wraith> | But since Identity does nothing, you could just use the stuff in Control.Lens.Wrapped to have an Iso for working with adding and removing Identity wrappers |
2021-10-23 22:03:06 +0200 | hololeap | (~hololeap@user/hololeap) (Ping timeout: 276 seconds) |
2021-10-23 22:03:11 +0200 | hololeap_ | (~hololeap@user/hololeap) |
2021-10-23 22:05:10 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds) |
2021-10-23 22:05:11 +0200 | juhp | (~juhp@128.106.188.220) (Ping timeout: 264 seconds) |
2021-10-23 22:05:34 +0200 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2021-10-23 22:06:46 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 22:06:47 +0200 | juhp | (~juhp@128.106.188.220) |
2021-10-23 22:07:32 +0200 | larryba | (~bc8165b6@217.29.117.252) |
2021-10-23 22:07:55 +0200 | Pickchea | (~private@user/pickchea) (Quit: Leaving) |
2021-10-23 22:12:10 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds) |
2021-10-23 22:13:24 +0200 | alx741 | (~alx741@186.178.108.23) (Ping timeout: 244 seconds) |
2021-10-23 22:14:04 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 22:14:49 +0200 | shriekingnoise | (~shrieking@186.137.144.80) |
2021-10-23 22:16:08 +0200 | <shapr> | Is there some magical Haskell library that converts CSV files into a normalized database? |
2021-10-23 22:16:22 +0200 | <shapr> | I want to split columns with only a few unique values into their own table. |
2021-10-23 22:18:33 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 244 seconds) |
2021-10-23 22:20:22 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 22:20:58 +0200 | Midjak | (~Midjak@82-65-111-221.subs.proxad.net) (Quit: This computer has gone to sleep) |
2021-10-23 22:22:46 +0200 | son0p | (~ff@181.136.122.143) (Remote host closed the connection) |
2021-10-23 22:23:41 +0200 | <[exa]> | Hm, I'm debugging one problem with cabal on ubuntu, basically `cabal update` on a fresh cabal from ghcup does something and ends up with message: Could not deserialize <repo>/root.json: Malformed: (line 1, column 1): unexpected end of input. |
2021-10-23 22:24:37 +0200 | <[exa]> | any hints on where to start searching? (We've pretty much stumped here, cabal nukes & reinstalls have been attempted) |
2021-10-23 22:25:46 +0200 | <maerwald> | how do you derive a read instance for a GADT? |
2021-10-23 22:25:51 +0200 | nekroxxiga | (~nekroxxig@88.222.185.135) (Quit: Client closed) |
2021-10-23 22:25:55 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 265 seconds) |
2021-10-23 22:26:04 +0200 | alx741 | (~alx741@186.178.108.74) |
2021-10-23 22:26:11 +0200 | <jkaye> | StandaloneDeriving |
2021-10-23 22:26:22 +0200 | <sclv> | did you nuke <repo>/* ? |
2021-10-23 22:26:23 +0200 | <maerwald> | tried, causes compile error |
2021-10-23 22:26:33 +0200 | <jkaye> | Do you have a gist? |
2021-10-23 22:26:45 +0200 | <jkaye> | I've done it in the past |
2021-10-23 22:26:53 +0200 | ec_ | (~ec@gateway/tor-sasl/ec) |
2021-10-23 22:27:12 +0200 | <maerwald> | jkaye: https://gist.github.com/hasufell/95ddd1ca14760e6d3a68e1bc5fd2d7cd |
2021-10-23 22:27:17 +0200 | <geekosaur> | I think if the GADT involves an existential, which is most of the point of GADTs, you can't derive a Read instance? |
2021-10-23 22:27:24 +0200 | <maerwald> | this is the type |
2021-10-23 22:27:26 +0200 | <maerwald> | https://hackage.haskell.org/package/uri-bytestring-0.3.3.1/docs/URI-ByteString.html#t:URIRef |
2021-10-23 22:27:27 +0200 | <[exa]> | sclv: we nuked everything (I'm debugging this over a chat too :]) |
2021-10-23 22:27:32 +0200 | <geekosaur> | and possibly can't define one manually |
2021-10-23 22:27:39 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 22:31:23 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 258 seconds) |
2021-10-23 22:31:59 +0200 | acidjnk_new3 | (~acidjnk@p200300d0c703cb67a588bcb670b337ca.dip0.t-ipconnect.de) |
2021-10-23 22:33:01 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 252 seconds) |
2021-10-23 22:34:01 +0200 | ec_ | (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
2021-10-23 22:34:56 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 22:35:23 +0200 | ec_ | (~ec@gateway/tor-sasl/ec) |
2021-10-23 22:36:02 +0200 | <[exa]> | sclv: oh meh, `curl` was missing and the default ubuntu wrapper made it look like it's not missing or something |
2021-10-23 22:36:23 +0200 | jkaye | (~jkaye@2601:281:8300:7530:5bae:6a75:284d:ff5) (Ping timeout: 264 seconds) |
2021-10-23 22:36:42 +0200 | <sclv> | cool, sounded like a transport issue, good to know its solved! |
2021-10-23 22:37:03 +0200 | <[exa]> | nah, 1000% ubuntu issue |
2021-10-23 22:37:32 +0200 | <[exa]> | no precise idea why cabal wouldn't fail because of missing curl though |
2021-10-23 22:38:53 +0200 | <geekosaur> | ask maerwald, I think he had major problems trying to make sense of the output of various versions of curl |
2021-10-23 22:38:59 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-10-23 22:38:59 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-10-23 22:38:59 +0200 | wroathe | (~wroathe@user/wroathe) |
2021-10-23 22:39:02 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-10-23 22:39:04 +0200 | <geekosaur> | including that apparently there's no reliable version flag |
2021-10-23 22:39:44 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 244 seconds) |
2021-10-23 22:40:19 +0200 | <[exa]> | this was IMO even without curl |
2021-10-23 22:40:32 +0200 | akspecs__ | (~akspecs@136-24-181-20.cab.webpass.net) |
2021-10-23 22:40:32 +0200 | akspecs__ | (~akspecs@136-24-181-20.cab.webpass.net) (Changing host) |
2021-10-23 22:40:32 +0200 | akspecs__ | (~akspecs@user/akspecs) |
2021-10-23 22:40:37 +0200 | <jiribenes> | [exa]: that's horrifying |
2021-10-23 22:40:40 +0200 | <[exa]> | ubuntu's got this wrapper of everything that tells you "did you mean apt-get install curl" if curl is not installed right? |
2021-10-23 22:40:46 +0200 | <maerwald> | yes, ubuntu now uses snap |
2021-10-23 22:40:54 +0200 | <[exa]> | oh snap |
2021-10-23 22:40:55 +0200 | <maerwald> | it's all broken now |
2021-10-23 22:40:56 +0200 | machinedgod | (~machinedg@24.105.81.50) |
2021-10-23 22:41:11 +0200 | <maerwald> | some ppl reported that curl is provided by snap |
2021-10-23 22:41:11 +0200 | <monochrom> | I thought that was just a shell thing. |
2021-10-23 22:41:12 +0200 | <maerwald> | and fails |
2021-10-23 22:41:13 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 22:41:41 +0200 | <monochrom> | You can configure cabal-install to use wget. |
2021-10-23 22:41:59 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
2021-10-23 22:42:18 +0200 | <monochrom> | I haven't tried ubuntu 21.10, I'm on 21.04, but "apt-get install curl" is pretty uneventful. |
2021-10-23 22:42:50 +0200 | <[exa]> | yeah, I was more surprised that the lack of curl kinda passes silently without screaing there's no curl |
2021-10-23 22:42:57 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 22:43:22 +0200 | <[exa]> | I'll try to dig it a bit eventually and report details if there's something more useful than just "avoid ubuntu" (it's not even on my computer) |
2021-10-23 22:43:41 +0200 | <monochrom> | There is nothing left to avoid. |
2021-10-23 22:43:42 +0200 | <maerwald> | ghcup config set downloader Wget |
2021-10-23 22:43:56 +0200 | <monochrom> | Like, would you seriously recommend slackware? |
2021-10-23 22:44:24 +0200 | <maerwald> | but wget is really bad |
2021-10-23 22:44:47 +0200 | <maerwald> | 1. it's slow, 2. using etags via If-None-Match is even slower |
2021-10-23 22:45:50 +0200 | <larryba> | is stack no longer necessary to avoid cabal hell? |
2021-10-23 22:46:00 +0200 | <monochrom> | Right. |
2021-10-23 22:46:20 +0200 | <larryba> | I used cabal sandbox in the past. then stack. now I can just use cabal install? |
2021-10-23 22:46:27 +0200 | <sclv> | pretty sure cabal does look for curl and fallback if not avail. Its just.. it doesn’t test the thing named curl is “really curl” |
2021-10-23 22:46:32 +0200 | <[exa]> | larryba: yes, cabal hell is over |
2021-10-23 22:46:46 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 252 seconds) |
2021-10-23 22:46:53 +0200 | <sclv> | you can even use plain http transport and require neither wget nor curl |
2021-10-23 22:47:07 +0200 | <monochrom> | Now you use "cabal build" or "cabal repl" if you're a developer. "cabal install" if you're an exe user. |
2021-10-23 22:47:20 +0200 | <larryba> | how did they solve it? something similar to what stack did? |
2021-10-23 22:48:26 +0200 | <[exa]> | larryba: mostly by proper versioning of builds, nix-like |
2021-10-23 22:48:30 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 22:48:52 +0200 | <larryba> | nice |
2021-10-23 22:49:47 +0200 | <larryba> | when was this solved? just so I have a counter argument when someone mentions cabal hell :P |
2021-10-23 22:50:00 +0200 | <geekosaur> | cabal 2.x |
2021-10-23 22:50:04 +0200 | <[exa]> | a few years back? :) |
2021-10-23 22:50:05 +0200 | benin | (~benin@183.82.207.116) (Ping timeout: 244 seconds) |
2021-10-23 22:50:26 +0200 | peterhil | (~peterhil@mobile-access-5672cd-211.dhcp.inet.fi) (Ping timeout: 260 seconds) |
2021-10-23 22:51:15 +0200 | benin | (~benin@183.82.207.116) |
2021-10-23 22:51:38 +0200 | jgeerds | (~jgeerds@55d40de2.access.ecotel.net) |
2021-10-23 22:53:14 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 258 seconds) |
2021-10-23 22:54:07 +0200 | <[exa]> | man, curl in snap, what the hell |
2021-10-23 22:54:48 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 22:54:59 +0200 | waleee | (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 264 seconds) |
2021-10-23 22:56:27 +0200 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-10-23 22:57:56 +0200 | peterhil | (~peterhil@mobile-access-5672cd-211.dhcp.inet.fi) |
2021-10-23 22:59:05 +0200 | ec_ | (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
2021-10-23 22:59:29 +0200 | ec_ | (~ec@gateway/tor-sasl/ec) |
2021-10-23 22:59:53 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 244 seconds) |
2021-10-23 23:00:40 +0200 | <merijn> | [exa]: *Proper* cabal hell was solved over a decade ago |
2021-10-23 23:00:57 +0200 | <merijn> | The one that actually earned that name |
2021-10-23 23:01:27 +0200 | rk04 | (~rk04@user/rajk) |
2021-10-23 23:01:46 +0200 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 245 seconds) |
2021-10-23 23:02:04 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 23:02:47 +0200 | <[exa]> | merijn: well you're right, but I forced myself to forget that one forever |
2021-10-23 23:02:50 +0200 | <[exa]> | :D |
2021-10-23 23:04:35 +0200 | <merijn> | 99% of people talking about cabal hell in 2021 have never experienced cabal hell, tbh |
2021-10-23 23:05:45 +0200 | <merijn> | I wish it wasn't such a catchy name >.> |
2021-10-23 23:07:05 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
2021-10-23 23:07:11 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 245 seconds) |
2021-10-23 23:07:47 +0200 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-10-23 23:09:07 +0200 | segfaultfizzbuzz | (~segfaultf@135-180-0-138.static.sonic.net) (Quit: Leaving) |
2021-10-23 23:09:21 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 23:09:42 +0200 | zzz | zero |
2021-10-23 23:10:42 +0200 | jstolarek | (~jstolarek@137.220.120.162) |
2021-10-23 23:11:09 +0200 | <zero> | cabal purgatory |
2021-10-23 23:11:54 +0200 | <geekosaur> | and it was never really cabal hell anyway, it was ghc hell but cabal 1.x forcefully exposed it |
2021-10-23 23:12:13 +0200 | <geekosaur> | stack and later cabal came up with ways to beat ghc over the head to make it behave sanely |
2021-10-23 23:12:32 +0200 | <geekosaur> | because if you let ghc pick the libraries itself it will pick the wrong ones |
2021-10-23 23:12:58 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2021-10-23 23:13:51 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 245 seconds) |
2021-10-23 23:15:37 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 23:21:23 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 264 seconds) |
2021-10-23 23:21:33 +0200 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-10-23 23:22:54 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 23:23:10 +0200 | <merijn> | geekosaur: I mean, silently overwriting existing packages was, in fact, cabal's fault |
2021-10-23 23:24:12 +0200 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2021-10-23 23:24:12 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
2021-10-23 23:24:15 +0200 | allbery_b | geekosaur |
2021-10-23 23:27:46 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds) |
2021-10-23 23:28:01 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) (Ping timeout: 245 seconds) |
2021-10-23 23:28:48 +0200 | d34df00d | (~d34df00d@2600:1700:8c60:3a10::48) |
2021-10-23 23:28:51 +0200 | <d34df00d> | Hi! |
2021-10-23 23:29:00 +0200 | <d34df00d> | What's the cheapest way to get glyph count for a string? |
2021-10-23 23:29:10 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 23:29:11 +0200 | <merijn> | define glyph and define string |
2021-10-23 23:29:45 +0200 | <merijn> | (seriously, those 2 terms are vaguer than you can imagine) |
2021-10-23 23:30:08 +0200 | <d34df00d> | A string is a sequence of UTF-8 codepoints. A glyph is a combination of code points that's being treated as a single entity by an average human. |
2021-10-23 23:30:25 +0200 | <d34df00d> | In particular, I want the length of "≡̂" to be 1, while Prelude.length and Data.Text.length think it's 2. |
2021-10-23 23:30:26 +0200 | <merijn> | ok, that last part is horrendously difficult and ill-defined, tbh |
2021-10-23 23:30:28 +0200 | gehmehgeh | (~user@user/gehmehgeh) (Quit: Leaving) |
2021-10-23 23:30:37 +0200 | <geekosaur> | "utf-8 codepoints" isn't really a thing either |
2021-10-23 23:30:41 +0200 | <maerwald> | merijn: not sure, I think some languages index strings by glyphs |
2021-10-23 23:30:52 +0200 | <maerwald> | so I guess it works |
2021-10-23 23:30:58 +0200 | <merijn> | maerwald: For specific, technical definitions of "glyph" |
2021-10-23 23:31:04 +0200 | <geekosaur> | Text uses utf-16; String uses unicode codepoints directly and only encodes for I/O |
2021-10-23 23:31:25 +0200 | <merijn> | geekosaur: That's honestly not really relevant, Text *also* uses unicode codepoints |
2021-10-23 23:31:44 +0200 | <merijn> | The real pedantic thing is that "utf-8 codepoints" is nonsense, because utf-8 is an encoding of unicode codepoints |
2021-10-23 23:31:56 +0200 | <merijn> | d34df00d: You probably want text-icu |
2021-10-23 23:32:00 +0200 | <merijn> | @hackage text-icu |
2021-10-23 23:32:00 +0200 | <lambdabot> | https://hackage.haskell.org/package/text-icu |
2021-10-23 23:32:23 +0200 | <d34df00d> | Actually, hold on. |
2021-10-23 23:32:29 +0200 | <maerwald> | those sweet C++ bindings |
2021-10-23 23:32:43 +0200 | <d34df00d> | Ah, nope, don't hold on, that seems to be a step towards my actual problem anyway, thanks. |
2021-10-23 23:32:57 +0200 | <maerwald> | have fun with build issues |
2021-10-23 23:33:05 +0200 | <d34df00d> | merijn: oh. I used icu in the past for some other applications, and I remember it being slow. |
2021-10-23 23:33:06 +0200 | nvmd | (~nvmd@user/nvmd) |
2021-10-23 23:33:19 +0200 | <d34df00d> | But I'll use it sure if there's nothing better. |
2021-10-23 23:33:21 +0200 | <merijn> | d34df00d: It's the only thing with a remote hope of being correct, though |
2021-10-23 23:33:25 +0200 | <geekosaur> | that's because what it's doing is much more compolex than you think it is |
2021-10-23 23:33:31 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds) |
2021-10-23 23:33:35 +0200 | <geekosaur> | *complex |
2021-10-23 23:33:56 +0200 | <geekosaur> | and much more complex than most other programmers think it is, for that matter |
2021-10-23 23:33:56 +0200 | <maerwald> | we need more "can do" attitude here :p |
2021-10-23 23:33:57 +0200 | <d34df00d> | Hmm, now I need to verify if I actually get glyph count or codepoint count in my specific domain. |
2021-10-23 23:34:01 +0200 | <merijn> | d34df00d: Also note that many people don't agree on what "a glyph" is. So any definition of "treated as a single entity by an average human" is a *super* cursed definition |
2021-10-23 23:34:21 +0200 | <merijn> | Especially in languages like arabic |
2021-10-23 23:34:30 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds) |
2021-10-23 23:34:53 +0200 | <d34df00d> | We just need some probability distribution monad and return the count in that monad as a distribution. |
2021-10-23 23:34:54 +0200 | <d34df00d> | Problem solved. |
2021-10-23 23:35:20 +0200 | <merijn> | d34df00d: unicode has a definition of "character" which would count something like é as "1 character", (even if it is two codepoints), but that definition is *very* technical and might not line up with what people expact/want |
2021-10-23 23:35:22 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-10-23 23:35:49 +0200 | <hpc> | converting a string to upper/lower is already locale-specific |
2021-10-23 23:36:28 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-10-23 23:36:28 +0200 | <merijn> | character count can be generation specific :p |
2021-10-23 23:37:00 +0200 | Hayek | (~xxx@2603-8000-b401-6099-7541-8f40-8f83-6bcb.res6.spectrum.com) |
2021-10-23 23:37:02 +0200 | <maerwald> | I'm sure it'll be fine |
2021-10-23 23:37:39 +0200 | <merijn> | To me, my name has always been 5 letters, but apparently kids these days are taught it as 6 (not entirely sure) and in Flanders, which generally uses the same locale it's always been 6 |
2021-10-23 23:38:40 +0200 | <hpc> | there's only one solution - we need to add unicode info to tzdata :D |
2021-10-23 23:39:40 +0200 | <d34df00d> | I just wanted to marry neovim and agda using haskell. Now I'm curious why some fun weekend project always ends up in some not so funny details (like, unicode). |
2021-10-23 23:40:08 +0200 | <merijn> | Because people are messy :p |
2021-10-23 23:40:25 +0200 | <monochrom> | Adga glyph count is more simpler than generalized unicode human language glyph count. |
2021-10-23 23:40:32 +0200 | <monochrom> | s/more/much/ |
2021-10-23 23:40:41 +0200 | <merijn> | d34df00d: Wait, is the point that you wanted to figure out that your example character renders as one terminal character? |
2021-10-23 23:40:48 +0200 | <d34df00d> | But nobody stops people from putting almost arbitrary glyphs into their .agda files, right? |
2021-10-23 23:41:13 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 244 seconds) |
2021-10-23 23:41:30 +0200 | hrnz | (~ethical@vegan.im.it) (der channel hier ist nicht mein niveau ciao) |
2021-10-23 23:41:34 +0200 | <d34df00d> | merijn: not sure I parse that correctly, but agda gives me highlighting info in either codepoint or glyph offsets, while vim eats bytes. |
2021-10-23 23:41:36 +0200 | pparmin | (~pparmin@p20030006214e0337dcae6b48c40f53cd.dip0.t-ipconnect.de) |
2021-10-23 23:41:37 +0200 | <monochrom> | If someone actually puts Middle Earth elf runes there, let us know. |
2021-10-23 23:42:07 +0200 | <merijn> | d34df00d: Basically, you can consider a terminal as being a rectangular grid of blocks right, with fixed width characters taking up 1 cell |
2021-10-23 23:42:17 +0200 | <d34df00d> | Yep. |
2021-10-23 23:42:45 +0200 | <merijn> | d34df00d: The width (in fixed-width terminal cells) of a character can be queried with wcswidth in C |
2021-10-23 23:42:55 +0200 | <merijn> | Or wcswidth_l for locale aware |
2021-10-23 23:43:07 +0200 | max22- | (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Quit: Leaving) |
2021-10-23 23:43:35 +0200 | <merijn> | This is why you should be pedantically precise about what you need to do for these kinda niche things ;) |
2021-10-23 23:44:20 +0200 | <hpc> | monochrom: careful, someone will get pedantic about sindarin vs quenya :D |
2021-10-23 23:44:30 +0200 | <d34df00d> | That's gonna be ridiculously slow to figure out what character corresponds to which byte. |
2021-10-23 23:44:48 +0200 | <merijn> | d34df00d: Well, yes, |
2021-10-23 23:44:56 +0200 | <merijn> | Live sucks, everything is terrible :) |
2021-10-23 23:45:18 +0200 | maerwald | opens a whisky bottle |
2021-10-23 23:45:29 +0200 | <d34df00d> | I hate programming. |
2021-10-23 23:45:44 +0200 | <merijn> | Telltale sign of not being clueless ;) |
2021-10-23 23:45:56 +0200 | <maerwald> | d34df00d: yeah, I said that in an interview once |
2021-10-23 23:46:04 +0200 | <pparmin> | hey everyone :) I am currently going through learn4haskell for this year's Hacktoberfest and I am having a blast so far!! I am currently trying to solve the last task in the first chapter which basically ask you to recursively remove the last digit until you have the first digit in a number. This is my current solution: |
2021-10-23 23:46:04 +0200 | <merijn> | If you don't hate programming, you don't know enough :p |
2021-10-23 23:46:04 +0200 | <pparmin> | https://paste.tomsmeding.com/87hmk1co and I am kind of stuck on understanding the error message. I was hoping someone might be able to give me a hint as to what I am doing wrong. Judging by the error message, I was wondering whether there is an issue with using "* 0.1" as I am specifying integers. |
2021-10-23 23:46:27 +0200 | <merijn> | I'm convinced hating programming is required for being good. People who *like* writing code, will inevitably write too much of it :p |
2021-10-23 23:46:55 +0200 | <merijn> | pparmin: 0.1 is not an Int |
2021-10-23 23:46:57 +0200 | <d34df00d> | Yep, deleting code is the best you can do to the code. |
2021-10-23 23:47:03 +0200 | <d34df00d> | Even in haskell and the likes. |
2021-10-23 23:47:04 +0200 | <merijn> | pparmin: You cannot multiply an Int by a non-Int |
2021-10-23 23:47:05 +0200 | zero | let x = whisky:x in gulp <$> x |
2021-10-23 23:47:16 +0200 | <geekosaur> | also you need moe parentheses |
2021-10-23 23:47:30 +0200 | <merijn> | pparmin: You probably want to use "div" instead |
2021-10-23 23:47:39 +0200 | <geekosaur> | firstDigit (...) |
2021-10-23 23:47:43 +0200 | <merijn> | > (100 :: Int) * 0.1 |
2021-10-23 23:47:45 +0200 | <lambdabot> | error: |
2021-10-23 23:47:45 +0200 | <lambdabot> | • No instance for (Fractional Int) arising from the literal ‘0.1’ |
2021-10-23 23:47:45 +0200 | <lambdabot> | • In the second argument of ‘(*)’, namely ‘0.1’ |
2021-10-23 23:47:50 +0200 | <merijn> | > (100 :: Int) `div` 10 |
2021-10-23 23:47:52 +0200 | <lambdabot> | 10 |
2021-10-23 23:48:01 +0200 | <monochrom> | In a math channel someone wrote "x+y/a+b" so I said it's ambiguous, you need more parentheses. |
2021-10-23 23:48:02 +0200 | <pparmin> | merijn: Why am I able to multiply an int by 0.1 from within ghci? That's what has confused me |
2021-10-23 23:48:17 +0200 | <merijn> | pparmin: You aren't |
2021-10-23 23:48:22 +0200 | <monochrom> | The resulting clarification was "(x)+(y)/(a)+(b)" |
2021-10-23 23:48:23 +0200 | <geekosaur> | if you used a literal, it wasn't an int |
2021-10-23 23:48:33 +0200 | <geekosaur> | :t 5 |
2021-10-23 23:48:34 +0200 | <lambdabot> | Num p => p |
2021-10-23 23:48:36 +0200 | <merijn> | pparmin: If you write "10 * 0.1", then 10 isn't an Int |
2021-10-23 23:48:44 +0200 | <pparmin> | ah god damn :D |
2021-10-23 23:48:54 +0200 | <zero> | monochrom: :D |
2021-10-23 23:49:04 +0200 | <merijn> | :t fromIntegral -- this is what you want |
2021-10-23 23:49:06 +0200 | <lambdabot> | (Integral a, Num b) => a -> b |
2021-10-23 23:49:10 +0200 | <ski> | monochrom : how's it ambiguous ? |
2021-10-23 23:49:23 +0200 | <merijn> | Or rather, you don't want it, because why convert Int to Double and back if you can use "div" ;) |
2021-10-23 23:49:31 +0200 | <merijn> | :t div |
2021-10-23 23:49:32 +0200 | <lambdabot> | Integral a => a -> a -> a |
2021-10-23 23:49:58 +0200 | <d34df00d> | :t span |
2021-10-23 23:49:59 +0200 | <lambdabot> | (a -> Bool) -> [a] -> ([a], [a]) |
2021-10-23 23:50:04 +0200 | <d34df00d> | Ok some html here. |
2021-10-23 23:50:26 +0200 | <pparmin> | I am sorry, i am really new to Haskell and some stuff really confuses me still :D |
2021-10-23 23:50:27 +0200 | <ski> | pparmin : `10' isn't necessarily an `Int'. numeric literals are overloaded. `10' could be of any numeric type (and `0.1' of any floating-point type) |
2021-10-23 23:50:36 +0200 | <ski> | > 10 :: Complex Float |
2021-10-23 23:50:37 +0200 | <lambdabot> | 10.0 :+ 0.0 |
2021-10-23 23:50:40 +0200 | <ski> | > 10 :: Rational |
2021-10-23 23:50:41 +0200 | <lambdabot> | 10 % 1 |
2021-10-23 23:50:44 +0200 | ssipos90 | (~ssipos90@86.123.18.123) (Quit: Leaving) |
2021-10-23 23:50:59 +0200 | <pparmin> | ski: actually that makes a lot of sense. I didn't think about it that way |
2021-10-23 23:51:38 +0200 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
2021-10-23 23:51:46 +0200 | <ski> | pparmin : but there's no implicit/automatic conversion between different numeric types. if you really need that, use (usually) `fromIntegral' or `realToFrac'. but in this case, if you want integral division, it's better to use `div' |
2021-10-23 23:52:37 +0200 | <pparmin> | so basically it should work if I write firstDigit (truncate (n `div` 10)) |
2021-10-23 23:52:40 +0200 | ssipos | (~ssipos@86.123.18.123) |
2021-10-23 23:52:53 +0200 | <merijn> | pparmin: The truncate is redundant there (and doesn't typecheck :p) |
2021-10-23 23:52:55 +0200 | <merijn> | :t truncate |
2021-10-23 23:52:57 +0200 | <lambdabot> | (RealFrac a, Integral b) => a -> b |
2021-10-23 23:52:57 +0200 | ski | idly recalls a corrector of a math exam not liking `2\(...)' in an answer .. |
2021-10-23 23:53:24 +0200 | <merijn> | pparmin: truncate rounds a fractional value to an Int, but div already always returns an Integral value |
2021-10-23 23:53:27 +0200 | <ski> | @type [floor,ceiling,round,truncate] |
2021-10-23 23:53:27 +0200 | <lambdabot> | (RealFrac a, Integral b) => [a -> b] |
2021-10-23 23:53:51 +0200 | <ski> | > 25 `div` 7 |
2021-10-23 23:53:52 +0200 | <lambdabot> | 3 |
2021-10-23 23:53:56 +0200 | <ski> | > 25 `mod` 7 |
2021-10-23 23:53:58 +0200 | <lambdabot> | 4 |
2021-10-23 23:54:25 +0200 | <monochrom> | firstDigit (n `div` 10) very simply. |
2021-10-23 23:54:29 +0200 | <monochrom> | and directly. |
2021-10-23 23:55:19 +0200 | <pparmin> | oh my!! it works :D |
2021-10-23 23:55:43 +0200 | <pparmin> | I also understood why you were advising me to put proper parantheses when my recursion went towards infinity :D |
2021-10-23 23:56:43 +0200 | <pparmin> | thank you so much everyone!! this has been a huge help |
2021-10-23 23:57:23 +0200 | <hpc> | > 25 `divMod` 7 |
2021-10-23 23:57:25 +0200 | <lambdabot> | (3,4) |
2021-10-23 23:57:38 +0200 | ski | . o O ( "Proposal for Division Operators in Scheme" by Riastradh in 2009,2010,2011 at <https://mumble.net/~campbell/tmp/division.txt> ; "Division and Modulus for Computer Scientists" by Daan Leijen in 2001-12-03 at <https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/divmodnote-letter.pdf> ) |
2021-10-23 23:59:53 +0200 | ssipos | (~ssipos@86.123.18.123) (Quit: WeeChat 3.3) |