Logs: freenode/#haskell
| 2020-11-25 21:29:39 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2020-11-25 21:32:19 | → | banner joins (~banner@116-255-17-165.ip4.superloop.com) |
| 2020-11-25 21:32:22 | × | banner quits (~banner@116-255-17-165.ip4.superloop.com) (Client Quit) |
| 2020-11-25 21:32:38 | → | vollenweider joins (~vollenwei@4e69b241.skybroadband.com) |
| 2020-11-25 21:32:48 | → | param joins (~user@c-73-8-150-140.hsd1.il.comcast.net) |
| 2020-11-25 21:34:21 | × | ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Quit: ->) |
| 2020-11-25 21:34:48 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
| 2020-11-25 21:35:05 | <dminuoso> | Huh wow, here's a class I've never seen |
| 2020-11-25 21:35:07 | <dminuoso> | https://hackage.haskell.org/package/base-4.14.0.0/docs/Control-Monad-Zip.html#t:MonadZip |
| 2020-11-25 21:35:16 | <dminuoso> | % :t mzip |
| 2020-11-25 21:35:16 | <yahb> | dminuoso: ; <interactive>:1:1: error:; * Variable not in scope: mzip; * Perhaps you meant one of these: `zip' (imported from Data.List.NonEmpty), `BSLC.zip' (imported from Data.ByteString.Lazy.Char8), `BSC.zip' (imported from Data.ByteString.Char8) |
| 2020-11-25 21:35:27 | <dminuoso> | Oh well. Strange I have never seen this |
| 2020-11-25 21:35:43 | → | s00pcan joins (~chris@075-133-056-178.res.spectrum.com) |
| 2020-11-25 21:35:54 | <dminuoso> | liftM (f *** g) (mzip ma mb) = mzip (liftM f ma) (liftM g mb) |
| 2020-11-25 21:38:18 | × | jvsg quits (~root@165.227.89.139) (Ping timeout: 272 seconds) |
| 2020-11-25 21:38:36 | × | vollenweider quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 240 seconds) |
| 2020-11-25 21:38:43 | × | gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Ping timeout: 240 seconds) |
| 2020-11-25 21:38:46 | → | gehmehgeh_ joins (~ircuser1@gateway/tor-sasl/gehmehgeh) |
| 2020-11-25 21:40:52 | <shapr> | dminuoso: write a monad comprehension now? :-D |
| 2020-11-25 21:41:59 | × | Amras quits (~Amras@unaffiliated/amras) (Ping timeout: 272 seconds) |
| 2020-11-25 21:42:49 | → | Guest10117 joins (~vollenwei@4e69b241.skybroadband.com) |
| 2020-11-25 21:43:46 | → | hexfive joins (~hexfive@50-47-142-195.evrt.wa.frontiernet.net) |
| 2020-11-25 21:44:01 | × | alx741 quits (~alx741@181.196.69.178) (Ping timeout: 264 seconds) |
| 2020-11-25 21:44:04 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 2020-11-25 21:44:23 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 2020-11-25 21:44:54 | <dolio> | That lets you use zip comprehensions. [ E | x <- l | y <- r ] |
| 2020-11-25 21:45:38 | × | borne quits (~fritjof@200116b864509c00394a967dc8ef4e61.dip.versatel-1u1.de) (Ping timeout: 264 seconds) |
| 2020-11-25 21:46:06 | × | vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Quit: vfaronov) |
| 2020-11-25 21:50:24 | → | conal joins (~conal@64.71.133.70) |
| 2020-11-25 21:50:40 | → | borne joins (~fritjof@200116b864509c00394a967dc8ef4e61.dip.versatel-1u1.de) |
| 2020-11-25 21:50:53 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 2020-11-25 21:52:59 | ← | param parts (~user@c-73-8-150-140.hsd1.il.comcast.net) ("ERC (IRC client for Emacs 26.3)") |
| 2020-11-25 21:54:08 | × | Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 272 seconds) |
| 2020-11-25 21:56:29 | → | alx741 joins (~alx741@181.196.68.166) |
| 2020-11-25 21:57:00 | × | chaosmasttter quits (~chaosmast@p200300c4a7107e01f51a90bd3c8201d7.dip0.t-ipconnect.de) (Quit: WeeChat 2.9) |
| 2020-11-25 21:57:24 | × | __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving) |
| 2020-11-25 21:57:33 | → | Guest10117 joins (~vollenwei@4e69b241.skybroadband.com) |
| 2020-11-25 21:58:06 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2020-11-25 22:02:00 | hackage | mutable-lens 0.4.1.0 - Interoperate mutable references with regular lens https://hackage.haskell.org/package/mutable-lens-0.4.1.0 (infinity0) |
| 2020-11-25 22:03:18 | <koz_> | Wait, I remember someone talking about mutable lens stuffs. |
| 2020-11-25 22:03:41 | <koz_> | infinity0: Was it you who inquired about them recently? |
| 2020-11-25 22:04:34 | → | Rudd0 joins (~Rudd0@185.189.115.103) |
| 2020-11-25 22:04:38 | <infinity0> | koz_: no but i had a conversation with jle` about it a while ago, here https://github.com/mstksg/mutable/issues/2 |
| 2020-11-25 22:05:01 | <koz_> | infinity0: Ah, OK. I remember someone in here asking about this very thing not too long ago. |
| 2020-11-25 22:05:12 | <koz_> | Nice thing you've got there - I wonder if there's an optics version too? |
| 2020-11-25 22:05:41 | <infinity0> | i doubt it, i made this not too long ago, don't think anyone picked up heavily on the idea yet |
| 2020-11-25 22:06:04 | <infinity0> | probably could do with a bit of low-level optimisation but it performs reasonably ok |
| 2020-11-25 22:06:05 | × | Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 240 seconds) |
| 2020-11-25 22:06:20 | <koz_> | Did you try benching it? Where's the part that makes it choke? |
| 2020-11-25 22:07:00 | <infinity0> | i have a benchmark showing ~13% slowdown, probably due to the boxing and unboxing |
| 2020-11-25 22:07:09 | <infinity0> | in ghc/haskell you can't mix the two in a polymorphic way |
| 2020-11-25 22:07:40 | <infinity0> | so in primitive monads the state is unboxed, in my mutable lens wrapper it has to be boxed to interoperate with regular lens, optics, etc |
| 2020-11-25 22:07:55 | <infinity0> | would be great if someone figured out a solution |
| 2020-11-25 22:08:19 | <koz_> | Ah, yeah, that's... a tricky prospect. |
| 2020-11-25 22:08:22 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-11-25 22:08:37 | × | knupfer quits (~Thunderbi@200116b82ca9650071867c643babc6d8.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 2020-11-25 22:08:42 | × | darjeeling_ quits (~darjeelin@122.245.217.23) (Ping timeout: 272 seconds) |
| 2020-11-25 22:09:16 | <infinity0> | i also haven't tried running it on non-linear functors like [] to see if that would actually result in unsoundness, perhaps that's worth doing too... |
| 2020-11-25 22:09:52 | <infinity0> | actually on second thoughts it's probably fine, assuming the content of the reference is itself a pure immutable object and doesn't contain inner references |
| 2020-11-25 22:10:18 | → | Guest10117 joins (~vollenwei@4e69b241.skybroadband.com) |
| 2020-11-25 22:10:28 | → | hseg joins (~gesh@IGLD-84-228-238-117.inter.net.il) |
| 2020-11-25 22:11:02 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 2020-11-25 22:11:20 | → | reallymemorable joins (~quassel@pool-100-2-25-229.nycmny.fios.verizon.net) |
| 2020-11-25 22:11:50 | → | caecilius joins (~caecilius@pool-108-46-151-95.nycmny.fios.verizon.net) |
| 2020-11-25 22:12:01 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection) |
| 2020-11-25 22:15:04 | → | tsrt^ joins (tsrt@ip98-184-89-2.mc.at.cox.net) |
| 2020-11-25 22:15:34 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2020-11-25 22:16:35 | <koz_> | But yeah, cool little thing you have there. |
| 2020-11-25 22:17:05 | × | Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 256 seconds) |
| 2020-11-25 22:18:07 | <infinity0> | thanks! |
| 2020-11-25 22:18:29 | <infinity0> | to be clear the benchmark i quoted above does nothing except read/write to the reference/lens, so in a "real" program it won't be that much slower |
| 2020-11-25 22:18:36 | <infinity0> | so feel free to use it in your pet projects :) |
| 2020-11-25 22:19:16 | × | matta quits (~user@24-113-169-116.wavecable.com) (Ping timeout: 240 seconds) |
| 2020-11-25 22:19:20 | <koz_> | It'd be nice to have the various indexed stuff, since that'd be very useful for mutable arrays. |
| 2020-11-25 22:19:54 | → | dyamon joins (~dyamon@cpc69058-oxfd26-2-0-cust662.4-3.cable.virginm.net) |
| 2020-11-25 22:20:36 | × | michalz quits (~user@185.246.204.47) (Remote host closed the connection) |
| 2020-11-25 22:20:36 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2020-11-25 22:20:43 | → | Guest10117 joins (~vollenwei@4e69b241.skybroadband.com) |
| 2020-11-25 22:20:45 | → | hidedagger joins (~nate@unaffiliated/hidedagger) |
| 2020-11-25 22:22:22 | → | darjeeling_ joins (~darjeelin@122.245.217.23) |
| 2020-11-25 22:23:53 | × | hseg quits (~gesh@IGLD-84-228-238-117.inter.net.il) (Ping timeout: 256 seconds) |
| 2020-11-25 22:25:10 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving) |
| 2020-11-25 22:25:39 | → | kupi joins (uid212005@gateway/web/irccloud.com/x-wpurhmmpfcznlitw) |
| 2020-11-25 22:26:02 | <infinity0> | koz_: what works currently is various indexed lens (or anything really) composed with a mutable-lens, so you could use a MutVar (Map k v) or something like that |
| 2020-11-25 22:26:09 | × | Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 256 seconds) |
| 2020-11-25 22:26:13 | <infinity0> | but yeah, i didn't think too hard about mutable arrays etc yet |
| 2020-11-25 22:26:14 | <koz_> | Oh, that's nice. |
| 2020-11-25 22:26:24 | <koz_> | It'd be very useful to have that baked in, though. |
| 2020-11-25 22:26:41 | <kupi> | does Data.ByteString.Lazy.Char8.uncons copy the first chuck? |
| 2020-11-25 22:27:06 | <kupi> | *chunk |
| 2020-11-25 22:27:14 | × | neiluj quits (~jco@unaffiliated/neiluj) (Quit: Lost terminal) |
| 2020-11-25 22:27:24 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Read error: Connection reset by peer) |
| 2020-11-25 22:27:48 | → | Rudd0^ joins (~Rudd0@185.189.115.98) |
| 2020-11-25 22:28:06 | × | hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9) |
| 2020-11-25 22:28:38 | <infinity0> | koz_: i'm not sure how well mutable arrays fit into this lens-are-references paradigm, but there is a similar+different framework by jle` that is the "mutable" package https://hackage.haskell.org/package/mutable that covers mutable arrays |
| 2020-11-25 22:29:05 | <koz_> | infinity0: Noted. |
| 2020-11-25 22:29:24 | <koz_> | I might write an optics version for lols. |
| 2020-11-25 22:29:30 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection) |
| 2020-11-25 22:29:45 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 2020-11-25 22:29:47 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
All times are in UTC.