Home liberachat/#haskell: Logs Calendar

Logs on 2021-12-18 (liberachat/#haskell)

00:03:03 × Sofia1000 quits (~Sofia1000@122-59-18-247-adsl.sparkbb.co.nz) (Quit: Client closed)
00:04:17 alx741 joins (~alx741@157.100.93.160)
00:06:57 × emf_ quits (~emf@2620:10d:c091:480::1:2a01) (Ping timeout: 240 seconds)
00:07:01 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 245 seconds)
00:07:33 OscarZ joins (~oscarz@5d.57.36a9.ip4.static.sl-reverse.com)
00:07:41 × madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 256 seconds)
00:09:06 emf joins (~emf@2620:10d:c091:480::1:2a01)
00:10:39 falafel joins (~falafel@2603-8000-d800-688c-c489-b1e0-39de-1e29.res6.spectrum.com)
00:12:58 × max22- quits (~maxime@2a01cb08833598007b9c3a2aa19d2728.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
00:14:21 × Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Remote host closed the connection)
00:15:02 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
00:16:11 × martin02 quits (~silas@141.84.69.76) (Ping timeout: 250 seconds)
00:18:19 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
00:19:17 × jkaye quits (~jkaye@2601:281:8300:7530:e699:4743:67a2:216e) (Ping timeout: 240 seconds)
00:23:44 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
00:28:38 martin02 joins (~silas@141.84.69.76)
00:30:20 cf2m joins (~cf2m@2804:14c:5bd7:8a9c::1001)
00:31:45 × johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in)
00:31:57 × waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 240 seconds)
00:32:26 × jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 245 seconds)
00:34:24 cf2m parts (~cf2m@2804:14c:5bd7:8a9c::1001) (Good Bye)
00:37:22 Erutuon joins (~Erutuon@user/erutuon)
00:40:52 deadmarshal joins (~deadmarsh@95.38.118.228)
00:41:50 alx741 joins (~alx741@157.100.93.160)
00:41:57 × falafel quits (~falafel@2603-8000-d800-688c-c489-b1e0-39de-1e29.res6.spectrum.com) (Ping timeout: 240 seconds)
00:43:34 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
00:44:41 mvk joins (~mvk@2607:fea8:5cdd:f000::745c)
00:45:30 × deadmarshal quits (~deadmarsh@95.38.118.228) (Ping timeout: 268 seconds)
00:53:03 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
00:54:34 machinedgod joins (~machinedg@24.105.81.50)
00:56:01 emf_ joins (~emf@2620:10d:c091:480::1:2a01)
00:57:28 zebrag joins (~chris@user/zebrag)
00:58:37 × emf quits (~emf@2620:10d:c091:480::1:2a01) (Ping timeout: 240 seconds)
01:02:08 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:02:17 × emf_ quits (~emf@2620:10d:c091:480::1:2a01) (Ping timeout: 240 seconds)
01:03:55 emf joins (~emf@2620:10d:c091:480::1:2a01)
01:03:57 × doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
01:06:05 × machinedgod quits (~machinedg@24.105.81.50) (Remote host closed the connection)
01:06:43 × erisco quits (~erisco@d24-57-249-233.home.cgocable.net) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in)
01:06:58 machinedgod joins (~machinedg@24.105.81.50)
01:07:32 erisco joins (~erisco@d24-57-249-233.home.cgocable.net)
01:11:25 alx741 joins (~alx741@181.199.42.79)
01:19:28 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
01:19:28 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
01:19:28 wroathe joins (~wroathe@user/wroathe)
01:20:41 × wroathe quits (~wroathe@user/wroathe) (Client Quit)
01:29:37 × emf quits (~emf@2620:10d:c091:480::1:2a01) (Ping timeout: 240 seconds)
01:30:31 × acidjnk quits (~acidjnk@p200300d0c7271e65d42c28944a29f404.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
01:31:53 × burnsidesLlama quits (~burnsides@dhcp168-016.wadham.ox.ac.uk) (Remote host closed the connection)
01:32:03 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
01:32:03 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
01:32:04 wroathe joins (~wroathe@user/wroathe)
01:35:57 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
01:42:35 × hololeap quits (~hololeap@user/hololeap) (Quit: Bye)
01:44:01 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
01:44:34 <lechner> Hi, when parsing JSON with optional fields, am I better off using Maybe or should I create separate types? Thanks!
01:45:33 <hpc> depends on what you want to express
01:45:43 <hpc> maybe when a field is missing it just means to use some default value
01:47:33 cheater joins (~Username@user/cheater)
01:48:17 × alx741 quits (~alx741@181.199.42.79) (Read error: Connection reset by peer)
01:48:54 alx741 joins (~alx741@157.100.93.160)
01:51:06 emf joins (~emf@2620:10d:c091:480::1:2a01)
01:52:43 × cheater quits (~Username@user/cheater) (Ping timeout: 268 seconds)
01:53:16 cheater joins (~Username@user/cheater)
01:57:17 × emf quits (~emf@2620:10d:c091:480::1:2a01) (Ping timeout: 240 seconds)
01:59:35 × OscarZ quits (~oscarz@5d.57.36a9.ip4.static.sl-reverse.com) (Quit: Leaving)
02:00:39 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
02:15:12 × Tuplanolla quits (~Tuplanoll@91-159-68-169.elisa-laajakaista.fi) (Quit: Leaving.)
02:15:46 × jijimofo quits (~cmo@S010610561191f5d6.lb.shawcable.net) (Ping timeout: 245 seconds)
02:15:57 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 240 seconds)
02:16:53 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
02:17:02 × epolanski quits (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
02:18:27 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
02:18:33 alx741 joins (~alx741@157.100.93.160)
02:21:06 harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
02:26:37 × mmhat quits (~mmh@55d47b0f.access.ecotel.net) (Ping timeout: 240 seconds)
02:31:37 dyeplexer joins (~dyeplexer@user/dyeplexer)
02:31:48 emf joins (~emf@2620:10d:c091:480::1:2e5a)
02:32:21 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds)
02:32:32 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 240 seconds)
02:32:40 ub joins (~Thunderbi@p200300ecdf0a5d68805dbf0fab6de770.dip0.t-ipconnect.de)
02:34:02 × ubert quits (~Thunderbi@p200300ecdf0a5db5805dbf0fab6de770.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
02:34:02 ub is now known as ubert
02:37:17 × evocatus quits (~evocatus@62.182.78.42) (Ping timeout: 256 seconds)
02:37:26 × Feuermagier quits (~Feuermagi@user/feuermagier) (Ping timeout: 245 seconds)
02:37:57 × emf quits (~emf@2620:10d:c091:480::1:2e5a) (Ping timeout: 240 seconds)
02:38:41 <dsal> You can have other default values than Nothing as well.
02:39:01 SummerSonw joins (~The_viole@203.77.49.232)
02:41:07 mmhat joins (~mmh@55d47734.access.ecotel.net)
02:42:51 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
02:48:17 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
02:53:13 × mmhat quits (~mmh@55d47734.access.ecotel.net) (Quit: WeeChat 3.3)
02:57:17 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3)
02:59:13 × pfurla quits (~pfurla@172.58.27.44) (Read error: Connection reset by peer)
02:59:17 × xff0x quits (~xff0x@port-92-193-238-190.dynamic.as20676.net) (Ping timeout: 240 seconds)
02:59:19 pfurla_ joins (~pfurla@2804:18:5822:b7a4:5d55:ee0c:b89:ab0a)
03:01:33 xff0x joins (~xff0x@2001:1a81:5394:f900:dd60:fd82:cbed:c232)
03:06:03 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
03:06:03 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
03:06:03 finn_elija is now known as FinnElija
03:07:59 x_kuru joins (xkuru@user/xkuru)
03:09:01 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
03:11:17 × xkuru quits (~xkuru@user/xkuru) (Ping timeout: 256 seconds)
03:11:46 doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net)
03:22:02 × td_ quits (~td@94.134.91.242) (Ping timeout: 240 seconds)
03:23:58 td_ joins (~td@94.134.91.199)
03:24:43 x_kuru_ joins (~xkuru@user/xkuru)
03:27:02 alx741 joins (~alx741@157.100.93.160)
03:27:09 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
03:28:55 × x_kuru quits (xkuru@user/xkuru) (Ping timeout: 268 seconds)
03:31:31 hololeap joins (~hololeap@user/hololeap)
03:32:52 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:35:52 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
03:41:53 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
03:44:04 × hololeap quits (~hololeap@user/hololeap) (Quit: Bye)
03:45:45 hololeap joins (~hololeap@user/hololeap)
03:48:06 × erisco quits (~erisco@d24-57-249-233.home.cgocable.net) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in)
03:48:52 erisco joins (~erisco@d24-57-249-233.home.cgocable.net)
03:49:56 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
03:49:57 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
03:49:57 wroathe joins (~wroathe@user/wroathe)
03:50:57 × sourcemage quits (~sourcemag@c-24-14-124-168.hsd1.il.comcast.net) (Ping timeout: 256 seconds)
03:51:06 × rembo10 quits (~rembo10@remulis.com) (Quit: ZNC 1.8.2 - https://znc.in)
03:51:17 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 240 seconds)
03:52:09 rembo10 joins (~rembo10@remulis.com)
03:53:40 alx741 joins (~alx741@157.100.93.160)
03:59:33 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
04:07:02 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
04:09:06 <glguy> I imagine things just aren't there yet, but I wanted to check that this is what's expected and not just that my installation is messed up. I tried using ghc on arm mac and couldn't install ghcid, doctest fell over on a file that used UTF-8, and hls only reported supporting up to 8.10
04:09:13 <glguy> anyone had more luck with arm mac ghc?
04:10:54 <xerox> I don't have arm specific problems nowadays anymore
04:11:33 <glguy> Are you able to install ghcid on it, then?
04:12:04 <xerox> there is one of its dependencies that is lagging behind because the maintainer is not to be found
04:12:27 <xerox> so I had to build it manually with a vendored version, with the small fix
04:13:02 <glguy> HLS?
04:13:15 <xerox> HLS I don't use sorry
04:13:46 <glguy> I lean more on ghcid than HLS, so if that one's fixable I might be ok
04:14:02 <glguy> gotta figure out which computer I can use for AoC this weekend :)
04:14:45 <xerox> I ended up compiling master a month ago with the calling convention fix for ioctl to have ghci work, sticking with that for now :D
04:15:05 <xerox> there it is: https://github.com/biegunka/terminal-size/pull/16
04:18:14 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
04:19:26 <glguy> Which ghc version does that work with?
04:19:26 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
04:19:58 <xerox> mine reports 9.3.20211020
04:20:30 <xerox> ah but did I compile it with this, or with another... maybe I can figure that out
04:20:49 <xerox> I compiled it with ghc-8.10.7 from ghcup
04:20:49 <glguy> 9.0.1 and 9.2.1 generate different errors each for me :)
04:21:19 <glguy> OK, 8.10.7 is working better, thanks
04:21:26 <xerox> excellent
04:22:18 <glguy> Are you using 9.3 because 9.2.1 is broken in an interesting way or just because 9.3 is newer?
04:23:05 <xerox> it was the first branch that I was able to compile successfully, with the ioctl fix, so I just stuck with it, I had some problems compiling the release branch/tags that I can't remember right now
04:23:32 <glguy> What's the ioctl fix?
04:23:35 <xerox> so I guess the former, the situation might have changed tho
04:23:58 <glguy> I see that this PR mentions ioctl, but is that also related to picking a GHC in general?
04:24:10 <xerox> ghci had broken line editing, because a ioctl inside ghc was done incompatibly just like the terminal-size issue above
04:27:13 lavaman joins (~lavaman@98.38.249.169)
04:28:26 <xerox> it was libraries/haskeline/System/Console/Haskeline/Backend/Posix.hsc 66:foreign import capi "sys/ioctl.h ioctl" ioctl
04:28:40 <xerox> so any ghc with this fix ("capi") will not have broken ghci line editing
04:29:06 <xerox> there is also a workaround for it if you can't get such a ghc, if I can find it again...
04:30:44 <xerox> here https://gitlab.haskell.org/ghc/ghc/-/issues/20079#note_364118
04:33:13 notzmv joins (~zmv@user/notzmv)
04:33:24 <xerox> https://www.haskell.org/ghc/blog/20210709-capi-usage.html
04:34:17 × Akiva quits (~Akiva@user/Akiva) (Ping timeout: 240 seconds)
04:34:46 × curiousgay quits (~curiousga@77-120-141-90.kha.volia.net) (Quit: Leaving)
04:37:08 alx741 joins (~alx741@157.100.93.160)
04:38:25 <dsal> glguy: I've been running an M1 for a while. nix+stack. It's a bit of a balancing act, but mostly works.
04:38:41 <dsal> My mac's in the shop right now, though. Wife dropped a spoon on the screen which is apparently enough to completely disable it.
04:41:45 <hololeap> spwned
04:42:24 deadmarshal joins (~deadmarsh@95.38.113.39)
04:43:56 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
04:44:56 <dsal> haha. :(
04:47:03 × deadmarshal quits (~deadmarsh@95.38.113.39) (Ping timeout: 256 seconds)
04:48:20 <hololeap> :(
04:48:21 off^ joins (~off@64.253.22.77)
04:50:25 <EvanR> There Is No Spoon *myth busted*
04:50:59 shapr joins (~user@12.5.211.156)
04:52:07 <sm> woah. Noted, keep spouse and cutlery away from mac
04:52:31 <int-e> @pl \((a,b),(c,d)) -> ((a,c),(b,d))
04:52:32 <lambdabot> uncurry (uncurry (flip flip snd . (ap .) . flip flip fst . ((.) .) . (. (,)) . flip . (((.) . (,)) .) . (,)))
04:53:07 <dsal> I was sitting by the fire. She was standing over making (me) a drink. Spoon fell and hit just the edge of my screen. Doesn't take much to make expensive worthless. Only $99 to get it fixed. But also a lot of time.
04:54:06 <monochrom> You are trying to ship your spouse, a spoon, and an M1 Mac across the river. The boat can only hold two passengers...
04:55:28 <int-e> Can I throw the spoon all the way across?
04:58:57 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
04:59:17 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
04:59:36 <monochrom> Not if the M1 Mac is also on the other side, bearing the risk of getting hit by the spoon.
05:03:43 <hololeap> lol
05:06:57 × dtman34 quits (~dtman34@c-73-62-246-247.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
05:08:58 <hololeap> if I have (a -> Logic b) and [a], and I want to search each problem space enumerated by [a], is asum from Data.Foldable what I need?
05:09:16 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
05:09:20 <hololeap> assuming I want a depth-first search
05:09:34 dtman34 joins (~dtman34@c-73-62-246-247.hsd1.mn.comcast.net)
05:12:37 <hololeap> e.g. (\f xs -> asum (f <$> xs)) :: (a -> Logic b) -> [a] -> Logic b
05:14:51 <hololeap> I suppose that only makes sense if I'm looking for a single result, otherwise it shouldn't stop on the first successful branch, but keep gathering results instead
05:15:39 <hololeap> then again a depth-first search implies a single result
05:16:29 deadmarshal joins (~deadmarsh@95.38.113.39)
05:17:38 alx741 joins (~alx741@157.100.93.160)
05:18:55 selkirk joins (~selkirk@182.69.202.102)
05:24:14 × shapr quits (~user@12.5.211.156) (Ping timeout: 268 seconds)
05:25:45 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
05:27:13 × x_kuru_ quits (~xkuru@user/xkuru) (Read error: Connection reset by peer)
05:39:08 <hololeap> >>> observeAll ((pure 'a' `interleave` pure 'b' `interleave` pure 'c') `interleave` (pure 'd' `interleave` pure 'e') `interleave` pure 'f')
05:39:15 <hololeap> "afdceb"
05:39:42 <hololeap> so it starts with the front, then goes to the back and works to the left?
05:42:16 samebchase joins (~samebchas@51.15.68.182)
05:44:15 alx741 joins (~alx741@157.100.93.160)
05:52:54 × hgolden quits (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Remote host closed the connection)
05:52:54 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
05:54:54 × monochrom quits (trebla@216.138.220.146) (Quit: NO CARRIER)
05:55:10 <hololeap> >>> observeAll $ foldl interleave mzero (pure <$> "abcdefg")
05:55:11 <hololeap> "agfedcb"
05:55:14 <hololeap> seems like it
05:55:33 hgolden joins (~hgolden2@cpe-172-114-81-123.socal.res.rr.com)
06:03:22 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
06:07:51 × mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Quit: mikoto-chan)
06:10:52 alx741 joins (~alx741@157.100.93.160)
06:13:02 monochrom joins (trebla@216.138.220.146)
06:13:45 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
06:14:08 Sgeo joins (~Sgeo@user/sgeo)
06:14:26 mikoto-chan joins (~mikoto-ch@esm-84-240-99-143.netplaza.fi)
06:18:57 × deadmarshal quits (~deadmarsh@95.38.113.39) (Ping timeout: 240 seconds)
06:21:59 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
06:23:41 <hololeap> if you use foldr instead, it comes out as "abcdefg" ... weird
06:23:41 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
06:26:26 johnw joins (~johnw@2607:f6f0:3004:1:c8b4:50ff:fef8:6bf0)
06:28:07 × EvanR quits (~evan@user/evanr) (Remote host closed the connection)
06:31:03 coot joins (~coot@89-64-85-93.dynamic.chello.pl)
06:33:45 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
06:36:32 deadmarshal joins (~deadmarsh@95.38.113.39)
06:37:33 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
06:41:22 alx741 joins (~alx741@157.100.93.160)
06:47:22 int-e sighs
06:47:29 <int-e> ...reading is so hard...
06:48:52 wehttam joins (~wehttam@159.196.24.74)
06:57:27 EvanR joins (~evan@user/evanr)
07:00:21 <EvanR> i/o sync errors causing my linux to freeze and crash in the middle of my almost getting tonights answer did not help
07:04:16 lavaman joins (~lavaman@98.38.249.169)
07:05:57 × mvk quits (~mvk@2607:fea8:5cdd:f000::745c) (Ping timeout: 240 seconds)
07:08:37 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
07:15:13 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
07:15:13 × EvanR quits (~evan@user/evanr) (Remote host closed the connection)
07:15:30 img joins (~img@user/img)
07:16:34 × wehttam quits (~wehttam@159.196.24.74) ()
07:16:48 EvanR joins (~evan@user/evanr)
07:20:37 × SummerSonw quits (~The_viole@203.77.49.232) (Ping timeout: 240 seconds)
07:26:02 Sobhan joins (~Sobhan@modemcable039.128-131-66.mc.videotron.ca)
07:26:18 <Sobhan> Hi
07:26:37 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds)
07:27:59 × deadmarshal quits (~deadmarsh@95.38.113.39) (Ping timeout: 256 seconds)
07:28:24 deadmarshal joins (~deadmarsh@95.38.113.39)
07:29:00 <Sobhan> i'm trying to short circuit a calculation in ST monad (STUArray), i want my function to run until it hits a certain condition, right now i use https://dpaste.com/E6CRB8LKR the trace shows that it reaches the solution but it doesn't stop. it's like it's stop in a 1 : goto 1 type of loop (no allocations)
07:29:24 <Sobhan> (yes it's for advent of code)
07:29:45 × natechan quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Quit: WeeChat 2.9)
07:29:49 <Sobhan> also `it :: STUArray s (Int, Int) Int -> ST s Int`
07:30:21 <dsal> Sobhan: It's not clear why you think that should stop.
07:30:21 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
07:31:00 <Sobhan> i think i'm not getting the state monad but in the state less version that would short circuit
07:31:09 <Sobhan> dsal
07:31:16 × gdd1 quits (~gdd@129.199.146.230) (Ping timeout: 268 seconds)
07:31:48 <Sobhan> i'm clearly not "getting" the ST monad
07:32:19 takuan joins (~takuan@178-116-218-225.access.telenet.be)
07:32:20 <Sobhan> `dd _ _ b a = return b` doesn't short as i had hopped it would
07:32:23 <dsal> It's not the ST, it's the fold over an infinite list.
07:32:32 <dsal> `return` is a confusing term.
07:32:37 <dsal> I'd just never use it.
07:32:46 <Sobhan> but fold can short, right?
07:33:17 <dsal> foldr can in lists if it doesn't use the accumulator.
07:33:44 × puke quits (~puke@user/puke) (Quit: puke)
07:34:06 <EvanR> foldl can't short circuit, foldlM even less likely
07:34:34 <Sobhan> huh, what would be a good way to short then?
07:34:44 <EvanR> in this case, it can't run the ST action until it knows what you want to do with every element
07:35:24 <Sobhan> that makes sense
07:36:02 <Sobhan> i think i got it. i have to move the ST inside my iteration
07:36:13 <EvanR> there's takeWhileM ...
07:36:45 <Sobhan> would that work with ST?
07:36:52 <EvanR> :t takeWhileM
07:36:53 <lambdabot> error:
07:36:53 <lambdabot> • Variable not in scope: takeWhileM
07:36:53 <lambdabot> • Perhaps you meant one of these:
07:37:08 <Sobhan> the one from monad-loops Control.Monad.Loops
07:37:10 <Sobhan> right?
07:37:55 lavaman joins (~lavaman@98.38.249.169)
07:38:12 <EvanR> to short circuit to a solution before delving into anything else, I'd probably start with a explicit recursive ST action
07:38:31 <EvanR> so you decide to recurse or quit at any step
07:41:45 × lemonsnicks quits (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Ping timeout: 268 seconds)
07:41:57 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
07:41:57 Feuermagier joins (~Feuermagi@user/feuermagier)
07:42:43 lemonsnicks joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net)
07:43:03 <Square> This may be stupid question. But are both Data.ByteString and Data.Text needed? Add a Lazy variant to both. Do both fill meaningful purposes? I find one often tries to adopt strings between packages. Oh, then we have String too.
07:43:15 <dsal> They don't do the same thing.
07:43:41 sofviic[m] joins (~sofviicma@2001:470:69fc:105::1:51fd)
07:43:43 <EvanR> bytestring is pretty straight forward, it's packed vectors of Word8
07:44:10 <EvanR> unlike String and Text which deal with unicode
07:44:24 <Square> Gotcha.
07:44:45 <EvanR> many languages get things mixed up
07:45:12 <EvanR> like, presume a string encoding, ... or supposedly did then change their mind and add encodings
07:45:52 <Square> Ok, that makes sense.
07:45:58 <EvanR> in the end string and array of word8 should be separate
07:47:14 <Square> Thanks for the leason, i never took the time to really understand their differences. Hard to get hyped over strings. =D
07:48:58 alx741 joins (~alx741@157.100.93.160)
07:49:35 <EvanR> picking the right types is bread and butter in haskell... and then turns out that's necessary in every language
07:50:01 <EvanR> you just don't always get any help with it lol
07:50:39 Feuermagier_ joins (~Feuermagi@138.199.36.133)
07:53:28 × Feuermagier quits (~Feuermagi@user/feuermagier) (Ping timeout: 268 seconds)
07:53:52 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
07:56:15 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
08:00:37 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:02:14 × qrpnxz quits (~qrpnxz@user/qrpnxz) (Ping timeout: 260 seconds)
08:08:18 × selkirk quits (~selkirk@182.69.202.102) (Quit: leaving)
08:13:06 alx741 joins (~alx741@157.100.93.160)
08:15:14 <Sobhan> how can i have a function that returns both an STArray and a value that it depends on Array. i can't figure out how to use runST and run STUArray at the same time (either on a ST s (a, b) or (ST s a, STUArray ...))
08:16:25 <Sobhan> type A s a = STUArray s (Int, Int) a
08:16:25 <Sobhan> it__ :: UArray (Int, Int) Int -> (Int, A s Int)
08:16:26 <Sobhan> it__ a1 = bimap runST runSTUArray $ do {arr <- (thaw a1 :: ST s (A s Int)); i <- readArray arr (1, 1); (i, arr)}
08:16:29 <Sobhan> so like something like this
08:21:03 <EvanR> I'm guessing you have to use runST and do what runSTUArray does yourself in the process of returning
08:21:31 <EvanR> i.e. unsafeFreeze
08:23:31 × jespada quits (~jespada@87.74.33.157) (Ping timeout: 256 seconds)
08:23:32 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
08:24:17 sprout joins (~quassel@2a02:a467:ccd6:1:21ba:a382:6b6:54c4)
08:24:18 <Sobhan> i did actually try that but i get `• Couldn't match type ‘a1’ with ‘(Int, A s Int)’
08:24:19 <Sobhan>     because type variable ‘s’ would escape its scope`
08:25:04 <Sobhan> it__ a1 = runST $ do {arr <- (thaw a1 :: ST s (A s Int)); i <- readArray arr (1, 1); return (i, arr)}
08:25:28 <EvanR> thaw?
08:25:43 <Sobhan> thaw :: forall i (a :: * -> * -> *) e (b :: * -> * -> *) (m :: * -> *). (Ix i, IArray a e, MArray b e m) => a i e -> m (b i e)
08:25:50 <Sobhan> ugh
08:25:56 <Sobhan> it converts an UArray to a STUArray
08:25:58 <EvanR> I must be thinking backwards what you want
08:26:16 jespada joins (~jespada@87.74.33.157)
08:26:45 <EvanR> in ST the mutable arrays you use are supposed to contained within that ST action
08:27:33 <EvanR> I thought you wanted to return one frozen... instead it seems like you want to get a mutable array from elsewhere?
08:27:57 <Sobhan> i want the 1,1 index (or something like that & the array (frozen)
08:28:03 × jtomas quits (~jtomas@153.red-83-53-252.dynamicip.rima-tde.net) (Remote host closed the connection)
08:28:14 <Sobhan> i'm returning the number of operations on the array
08:28:18 <Sobhan> plus the new array
08:28:24 <EvanR> I... don't see the point of ST here
08:28:55 <EvanR> you're messing with outside arrays within ST, and that's it
08:30:03 <Sobhan> this is sample code, i want to take a an IArray, modify it and report the number of edits and the results. i kinda need an implementation of a MArray. i was thinking of not using IO
08:30:10 <Sobhan> so i ended up with ST
08:30:17 <EvanR> make a new array, operating on it, maybe read some immutable outside data, return the new array, that would make sense
08:30:48 <Sobhan> well i'm doing operations on it, just not in the sample code
08:31:43 <Sobhan> i have to choose between Data.Array.IO, Data.Array.ST, and Data.Array.Storable.
08:31:45 <Sobhan> right?
08:32:02 <EvanR> I mainly use Data.Vector
08:32:08 <Sobhan> assuming i *NEED* mutable arrays
08:33:02 × euandreh quits (~euandreh@2804:14c:33:9fe5:1e71:dc8c:d2fa:3d7e) (Ping timeout: 252 seconds)
08:33:07 <Sobhan> i need 2d arrays
08:33:14 Erutuon joins (~Erutuon@user/erutuon)
08:34:47 euandreh joins (~euandreh@2804:14c:33:9fe5:995c:e86e:470c:8a37)
08:35:53 <EvanR> yeah I also use vector for that xD
08:37:26 <dsal> a 2D array is just a 1D array with Ix.
08:37:38 <dsal> You can have arbitrary dimensions where some aren't even numerical if you want.
08:37:52 <dsal> (that's all you're doing with Arrays)
08:38:58 <EvanR> my other array uses real number indexes
08:40:08 <dsal> Numbers aren't real.
08:40:20 <Sobhan> but i'll be back to using ST, right?
08:40:25 alx741 joins (~alx741@157.100.93.160)
08:40:26 <Sobhan> modify :: (forall s. MVector s a -> ST s ()) -> Vector a -> Vector a
08:40:51 × Jing quits (~hedgehog@2604:a840:3::103e) (Remote host closed the connection)
08:41:10 <Sobhan> i'll still be at point zero until i figure out how to return multiple things from ST
08:41:21 <Sobhan> oops, sorry for the ping
08:41:28 Jing joins (~hedgehog@125.105.142.62)
08:42:07 <EvanR> I'm just not sure what you're gaining from ST here
08:42:16 <Sobhan> over IO?
08:42:34 <Sobhan> i want to put my function in a pure context
08:42:46 <dsal> Do you have something working that's not mutalbe?
08:43:09 <Sobhan> ?
08:43:19 <int-e> Sobhan: you have to manually freeze arrays if you want to return more than one
08:43:45 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
08:44:00 <int-e> @src runSTArray
08:44:00 <lambdabot> Source not found. :(
08:44:05 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:178:131c:7a0c:e758) (Remote host closed the connection)
08:44:09 <int-e> pity... runSTArray st = runST (st >>= unsafeFreezeSTArray)
08:44:27 <EvanR> yes... like I said xD
08:44:38 <int-e> I don't know how that works for vectors, do they have a freeze operation as well?
08:44:42 <EvanR> you'll need to freeze, you only have a thaw there
08:44:51 <EvanR> yeah they have freeze and thaw too
08:45:18 <int-e> (I have used `vector` a little, but apparently never with explicit ST.)
08:47:33 acidjnk joins (~acidjnk@p200300d0c7271e65d42c28944a29f404.dip0.t-ipconnect.de)
08:48:46 <EvanR> actually embedding an array mutating program within a pure function with ST is really cool, I just never ran into a case where it would be worth it
08:48:57 <Sobhan> int-e thanks, i finally figured it out `it__ ::  UArray (Int, Int) Int -> (Int,  UArray (Int, Int) Int)
08:48:58 <Sobhan> it__ a1 = runST $ do {arr <- (thaw a1 :: ST s (STUArray s (Int, Int) Int)); i <- readArray arr (1, 1); farr <- freeze arr; return (i, farr)}`
08:51:02 <int-e> Sobhan: yep. (you /can/ use unsafeFreeze there and avoid a copy; the promise you're making is that you don't touch the array afterwards)
08:51:12 SummerSonw joins (~The_viole@203.77.49.232)
08:51:35 <Sobhan> i don't think i can keep a promise XD
08:51:56 <int-e> Sobhan: Oh, sorry. "afterwards" is scoped by the ST action
08:52:06 <EvanR> since you're returning from the ST action... I don't see how you could touch it after
08:52:10 <Sobhan> i got that...
08:52:19 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
08:52:35 <Sobhan> by forgetting what unsafeFreeze tomorrow morning...
08:53:11 <EvanR> don't touch it between freeze and returning?
08:53:25 × coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot)
08:53:25 <EvanR> unsafeFreeze
08:54:35 <Sobhan> it was a joke...
08:54:43 <int-e> Sobhan: I mainly bring it up because unlike most `unsafe` functions, the promise here is completely local in scope, so it's a pretty sane optimization.
08:55:39 <Sobhan> i'm guessing that the unsafe thawt isn't going to work tho
08:55:42 <int-e> (In contrast, `unsafeThaw` requires you to keep the constraint in mind for the rest of the program.)
08:57:06 <int-e> (The constraint being that the immutable array you're thawing is not used elsewhere.)
09:00:21 <nshepperd2> Sobhan: fun fact, vector actually has a function for doing that sort of thing that I added!
09:01:14 <nshepperd2> V.createT (do mut <- V.thaw xs; a <- M.read mut 0; return (a, mut))
09:02:17 <nshepperd2> (createT does 'traverse unsafeFreeze' over any traversable container of mutable vectors that you return)
09:03:39 × Sobhan quits (~Sobhan@modemcable039.128-131-66.mc.videotron.ca) (Ping timeout: 256 seconds)
09:03:57 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
09:08:37 × xff0x quits (~xff0x@2001:1a81:5394:f900:dd60:fd82:cbed:c232) (Ping timeout: 240 seconds)
09:08:37 alx741 joins (~alx741@181.199.42.79)
09:09:44 xff0x joins (~xff0x@2001:1a81:5394:f900:9067:7a5d:460c:e4bd)
09:11:49 madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net)
09:16:19 gehmehgeh joins (~user@user/gehmehgeh)
09:17:20 <c_wraith> oh, only traversables? And here I was thinking you were playing fancy tricks with Data
09:17:36 allbery_b joins (~geekosaur@xmonad/geekosaur)
09:17:36 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
09:17:39 allbery_b is now known as geekosaur
09:24:02 × xff0x quits (~xff0x@2001:1a81:5394:f900:9067:7a5d:460c:e4bd) (Ping timeout: 240 seconds)
09:24:54 xff0x joins (~xff0x@port-92-195-110-215.dynamic.as20676.net)
09:25:05 PVPANTHONY joins (~The_viole@203.77.49.232)
09:26:09 Jing_ joins (~hedgehog@2604:a840:3::103e)
09:26:20 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
09:27:17 × cyphase quits (~cyphase@user/cyphase) (Ping timeout: 240 seconds)
09:27:32 × Jing quits (~hedgehog@125.105.142.62) (Read error: Connection reset by peer)
09:27:57 × SummerSonw quits (~The_viole@203.77.49.232) (Ping timeout: 240 seconds)
09:28:05 ProfSimm joins (~ProfSimm@87.227.196.109)
09:28:34 jakalx parts (~jakalx@base.jakalx.net) ()
09:28:34 cyphase joins (~cyphase@user/cyphase)
09:30:31 jakalx joins (~jakalx@base.jakalx.net)
09:32:24 × alx741 quits (~alx741@181.199.42.79) (Read error: Connection reset by peer)
09:32:46 coot joins (~coot@89-64-85-93.dynamic.chello.pl)
09:33:07 alx741 joins (~alx741@157.100.93.160)
09:44:36 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
09:48:37 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
09:52:24 × mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Quit: mikoto-chan)
10:06:01 deadmarshal_ joins (~deadmarsh@95.38.113.39)
10:06:37 × deadmarshal quits (~deadmarsh@95.38.113.39) (Ping timeout: 240 seconds)
10:08:48 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
10:09:27 max22- joins (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr)
10:14:49 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
10:17:12 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
10:17:37 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds)
10:18:29 Lord_of_Life_ is now known as Lord_of_Life
10:23:37 × pfurla_ quits (~pfurla@2804:18:5822:b7a4:5d55:ee0c:b89:ab0a) (Ping timeout: 240 seconds)
10:24:01 pfurla joins (~pfurla@2804:18:5822:b7a4:6913:9198:2dcc:b6a5)
10:24:06 jakalx parts (~jakalx@base.jakalx.net) ()
10:25:38 Tuplanolla joins (~Tuplanoll@91-159-68-169.elisa-laajakaista.fi)
10:29:28 × coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot)
10:31:30 niemand joins (~niemand@p2e52fab3.dip0.t-ipconnect.de)
10:32:22 jakalx joins (~jakalx@base.jakalx.net)
10:32:36 alx741 joins (~alx741@157.100.93.160)
10:33:33 waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4)
10:41:48 × deadmarshal_ quits (~deadmarsh@95.38.113.39) (Ping timeout: 256 seconds)
10:41:48 × madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 256 seconds)
10:44:06 Digit joins (~user@user/digit)
10:47:21 × niemand quits (~niemand@p2e52fab3.dip0.t-ipconnect.de) (Quit: Connection closed)
10:49:36 <nshepperd> hehe no
10:52:33 × PVPANTHONY quits (~The_viole@203.77.49.232) (Ping timeout: 256 seconds)
10:53:16 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 245 seconds)
10:55:48 deadmarshal joins (~deadmarsh@95.38.113.39)
10:57:59 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
11:00:39 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:06:59 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
11:06:59 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
11:07:11 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
11:09:17 × deadmarshal quits (~deadmarsh@95.38.113.39) (Ping timeout: 240 seconds)
11:17:43 × waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Quit: WeeChat 3.3)
11:17:44 zer0bitz joins (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi)
11:21:07 × hugo quits (znc@verdigris.lysator.liu.se) (Quit: ZNC 1.8.2 - https://znc.in)
11:23:04 hugo joins (znc@verdigris.lysator.liu.se)
11:23:15 deadmarshal joins (~deadmarsh@95.38.113.39)
11:25:09 alx741 joins (~alx741@157.100.93.160)
11:25:52 mikoto-chan joins (~mikoto-ch@2a00:1d50:3:0:d35c:a450:4ccc:94ac)
11:28:27 × off^ quits (~off@64.253.22.77) (Remote host closed the connection)
11:28:49 jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net)
11:31:09 × cheater quits (~Username@user/cheater) (Ping timeout: 268 seconds)
11:34:31 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
11:37:27 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
11:39:01 AlexNoo_ is now known as AlexNoo
11:39:40 lavaman joins (~lavaman@98.38.249.169)
11:45:16 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
11:45:21 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
11:46:33 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:178:131c:7a0c:e758)
11:48:25 __monty__ joins (~toonn@user/toonn)
11:50:37 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:178:131c:7a0c:e758) (Ping timeout: 240 seconds)
11:53:17 PVPANTHONY joins (~The_viole@203.77.49.232)
11:55:39 alx741 joins (~alx741@157.100.93.160)
11:58:10 <Digit> hi. nyxt has me inspired to ask along the lines of... what's "the" web browser written/configured in haskell?
11:59:43 deadmarshal_ joins (~deadmarsh@95.38.113.39)
12:00:57 × deadmarshal quits (~deadmarsh@95.38.113.39) (Read error: Connection reset by peer)
12:10:39 zincy joins (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684)
12:10:47 × tom__ quits (~tom@host86-151-99-97.range86-151.btcentralplus.com) (Remote host closed the connection)
12:10:47 × tom_ quits (~tom@host86-151-99-97.range86-151.btcentralplus.com) (Remote host closed the connection)
12:10:54 tom__ joins (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684)
12:14:44 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
12:15:37 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
12:15:58 rito_ joins (~rito_gh@45.112.243.172)
12:16:56 madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net)
12:17:30 × phma quits (phma@2001:5b0:210b:d6b8:694b:ba82:ab88:1eae) (Read error: Connection reset by peer)
12:19:06 phma joins (phma@2001:5b0:210f:398:45c4:2d78:79ea:d21b)
12:23:08 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection)
12:29:56 jeetelongname joins (~jeet@88-111-159-26.dynamic.dsl.as9105.com)
12:30:37 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Ping timeout: 240 seconds)
12:31:05 _ht joins (~quassel@37.120.218.165)
12:31:51 alx741 joins (~alx741@157.100.93.160)
12:37:42 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
12:41:08 MoC joins (~moc@user/moc)
12:42:54 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
12:43:18 <sm> I can't think of one offhand. that's a colossal project
12:45:35 mmhat joins (~mmh@55d47734.access.ecotel.net)
12:45:57 × deadmarshal_ quits (~deadmarsh@95.38.113.39) (Ping timeout: 240 seconds)
12:46:00 × robbert-vdh quits (~robbert@robbertvanderhelm.nl) (Remote host closed the connection)
12:46:25 robbert-vdh joins (~robbert@robbertvanderhelm.nl)
12:46:26 <geekosaur> manatee had a web browser component, but it's long dead
12:46:27 <sm> a few experiments on hackage, like hbro
12:46:55 × lagash quits (lagash@lagash.shelltalk.net) (Ping timeout: 250 seconds)
12:52:04 × mikoto-chan quits (~mikoto-ch@2a00:1d50:3:0:d35c:a450:4ccc:94ac) (Quit: mikoto-chan)
12:55:55 deadmarshal joins (~deadmarsh@95.38.113.39)
12:56:15 × Megant quits (megant@user/megant) (Ping timeout: 250 seconds)
12:57:54 Megant joins (megant@user/megant)
12:59:59 burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk)
13:00:01 × burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Remote host closed the connection)
13:00:03 alx741 joins (~alx741@157.100.93.160)
13:00:28 burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk)
13:00:33 × burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Remote host closed the connection)
13:00:40 burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk)
13:01:37 machinedgod joins (~machinedg@24.105.81.50)
13:01:44 × son0p quits (~ff@2800:484:1d81:b700:d40b:900:b387:320) (Remote host closed the connection)
13:02:00 gensyst joins (gensyst@user/gensyst)
13:03:16 × max22- quits (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) (Ping timeout: 245 seconds)
13:04:55 × burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Remote host closed the connection)
13:05:58 × gensyst quits (gensyst@user/gensyst) (Client Quit)
13:08:59 pfurla_ joins (~pfurla@2804:18:5813:43a7:2d02:6b96:1847:d254)
13:11:05 slowButPresent joins (~slowButPr@user/slowbutpresent)
13:11:57 × pfurla quits (~pfurla@2804:18:5822:b7a4:6913:9198:2dcc:b6a5) (Ping timeout: 240 seconds)
13:11:58 cheater joins (~Username@user/cheater)
13:14:50 <opqdonut> what's the cool way to write `f <$> x <*> pure y` ?
13:15:12 <opqdonut> there must be some <**$ operator somewhere I can use
13:15:48 × MoC quits (~moc@user/moc) (Quit: Konversation terminated!)
13:18:13 toastloop joins (toastloop@user/toastloop)
13:18:13 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
13:29:02 × jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 240 seconds)
13:29:59 Guest7 joins (~Guest7@145.107.126.224)
13:31:10 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
13:31:54 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
13:35:06 × acidjnk quits (~acidjnk@p200300d0c7271e65d42c28944a29f404.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
13:36:41 alx741 joins (~alx741@157.100.93.160)
13:40:36 burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk)
13:41:30 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
13:41:33 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
13:43:09 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
13:43:32 × Guest7 quits (~Guest7@145.107.126.224) (Quit: Connection closed)
13:45:39 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
13:46:37 × burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 240 seconds)
13:48:07 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:178:131c:7a0c:e758)
13:48:11 × mrmonday quits (~robert@what.i.hope.is.not.a.tabernaevagant.es) (Quit: .)
13:48:23 mrmonday joins (~robert@what.i.hope.is.not.a.tabernaevagant.es)
13:50:05 × jeetelongname quits (~jeet@88-111-159-26.dynamic.dsl.as9105.com) (Read error: Connection reset by peer)
13:52:17 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:178:131c:7a0c:e758) (Ping timeout: 240 seconds)
13:55:00 max22- joins (~maxime@2a01cb088335980036297c973223bba4.ipv6.abo.wanadoo.fr)
13:59:12 alx741 joins (~alx741@157.100.93.160)
13:59:52 × perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.3)
14:03:11 pfurla joins (~pfurla@2804:d41:4331:4800:510d:e80b:d7e8:54bf)
14:03:57 _73 joins (~user@pool-108-49-252-36.bstnma.fios.verizon.net)
14:03:57 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
14:04:31 <_73> does this combinator have a name? `foo f g = \x y -> f (g x) (g y)`
14:04:57 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
14:05:14 × rembo10 quits (~rembo10@remulis.com) (Quit: ZNC 1.8.2 - https://znc.in)
14:05:37 rembo10 joins (~rembo10@remulis.com)
14:05:57 × deadmarshal quits (~deadmarsh@95.38.113.39) (Ping timeout: 240 seconds)
14:06:02 × cheater quits (~Username@user/cheater) (Ping timeout: 240 seconds)
14:06:23 deadmarshal joins (~deadmarsh@95.38.113.39)
14:06:25 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
14:06:45 × xsperry quits (~xs@user/xsperry) (Remote host closed the connection)
14:07:10 × pfurla_ quits (~pfurla@2804:18:5813:43a7:2d02:6b96:1847:d254) (Ping timeout: 260 seconds)
14:07:16 xsperry joins (~xs@user/xsperry)
14:08:12 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:08:33 perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
14:08:45 <yushyin> on?
14:09:36 pfurla_ joins (~pfurla@2804:18:5813:43a7:5d3e:bc70:a654:ea1e)
14:09:36 × rembo10 quits (~rembo10@remulis.com) (Client Quit)
14:09:54 rembo10 joins (~rembo10@remulis.com)
14:10:11 × max22- quits (~maxime@2a01cb088335980036297c973223bba4.ipv6.abo.wanadoo.fr) (Ping timeout: 252 seconds)
14:11:30 × madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 268 seconds)
14:11:34 pfurla__ joins (~pfurla@2804:d41:4331:4800:b8e7:6926:586a:39fa)
14:11:35 <_73> yushyin: yes `on` appears the same thanks. It would be helpful to me if somebody knew a mathematical name for this function.
14:13:01 × pfurla quits (~pfurla@2804:d41:4331:4800:510d:e80b:d7e8:54bf) (Ping timeout: 240 seconds)
14:13:53 burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk)
14:14:13 × pfurla_ quits (~pfurla@2804:18:5813:43a7:5d3e:bc70:a654:ea1e) (Ping timeout: 240 seconds)
14:16:21 <Rembane> _73: It's called the psi combinator according to https://hackage.haskell.org/package/data-aviary-0.4.0/docs/Data-Aviary-Birds.html but I can't find any more sources than that.
14:16:57 <_73> awesome. Thanks
14:17:52 <Rembane> No worries. :)
14:20:22 alx741 joins (~alx741@157.100.93.160)
14:20:47 × rembo10 quits (~rembo10@remulis.com) (Quit: ZNC 1.8.2 - https://znc.in)
14:21:04 rembo10 joins (~rembo10@remulis.com)
14:23:25 × rembo10 quits (~rembo10@remulis.com) (Client Quit)
14:23:41 rembo10 joins (~rembo10@remulis.com)
14:24:42 sleblanc joins (~sleblanc@user/sleblanc)
14:25:12 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
14:26:27 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
14:26:31 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
14:28:56 jeetelongname joins (~jeet@88-111-159-26.dynamic.dsl.as9105.com)
14:28:56 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
14:29:17 × deadmarshal quits (~deadmarsh@95.38.113.39) (Ping timeout: 240 seconds)
14:29:40 × rembo10 quits (~rembo10@remulis.com) (Quit: ZNC 1.8.2 - https://znc.in)
14:29:58 rembo10 joins (~rembo10@remulis.com)
14:35:04 madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net)
14:35:35 <yushyin> it's the first time i heard of psi or 'combinator birds'. Why birds? Seems like a reference to a book. 'In his delightful book To mock a mockingbird, Smullyan (1985) chooses birds for his combinators, in memory of Haskell Curry, an early pioneer in the theory of combinators (1958) and an avid bird-watcher.'
14:37:39 × zincy quits (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684) (Remote host closed the connection)
14:37:39 × tom__ quits (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684) (Read error: Connection reset by peer)
14:41:55 <juhp> This has been bothering me quite a while - maybe a good one for r/haskell monthly AMA, but isn't there a nice function to say "filter a list by a list of prefixes" for example? Well I dare say it is probably in some package, but I wish a not too obscure one
14:42:20 <juhp> I mean a generic function of course
14:43:43 cheater joins (~Username@user/cheater)
14:43:53 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
14:47:00 alx741 joins (~alx741@157.100.93.160)
14:47:28 sourcemage joins (~sourcemag@c-24-14-124-168.hsd1.il.comcast.net)
14:47:29 juhp[m] joins (~juhpmatri@2001:470:69fc:105::6e9)
14:50:32 sourcemage parts (~sourcemag@c-24-14-124-168.hsd1.il.comcast.net) ()
14:50:42 jkaye joins (~jkaye@2601:281:8300:7530:c697:c75:764c:d1a0)
14:53:51 zebrag joins (~chris@user/zebrag)
14:59:17 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
15:03:41 × madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 245 seconds)
15:07:11 <juhp> Maybe it is too easy to define case-by-case...
15:08:32 × PVPANTHONY quits (~The_viole@203.77.49.232) (Ping timeout: 240 seconds)
15:11:07 max22- joins (~maxime@2a01cb08833598005bdb830adfc4642c.ipv6.abo.wanadoo.fr)
15:11:27 × lechner quits (~lechner@debian/lechner) (Ping timeout: 250 seconds)
15:11:58 evocatus joins (~evocatus@62.182.78.42)
15:13:49 × _ht quits (~quassel@37.120.218.165) (Ping timeout: 240 seconds)
15:14:21 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
15:15:15 × evocatus quits (~evocatus@62.182.78.42) (Client Quit)
15:16:21 alx741 joins (~alx741@157.100.93.160)
15:16:48 <_73> I actually have a copy of "To Mock a Mockingbird" that was gifted to me and I never got around to reading. I didn't realize that it was about combinatory logic.
15:17:16 selkirk joins (~selkirk@182.69.202.102)
15:17:25 jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net)
15:17:46 × jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Remote host closed the connection)
15:19:36 deadmarshal joins (~deadmarsh@95.38.113.39)
15:23:40 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
15:25:37 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
15:25:37 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
15:25:37 wroathe joins (~wroathe@user/wroathe)
15:31:17 madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net)
15:34:57 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Read error: Connection reset by peer)
15:37:22 cosimone joins (~user@93-34-133-159.ip49.fastwebnet.it)
15:40:00 × noex quits (~null@2600:8804:1280:aa0:5857:94a:25de:c513) (Quit: :q!)
15:40:42 alx741 joins (~alx741@157.100.93.160)
15:44:21 × cosimone quits (~user@93-34-133-159.ip49.fastwebnet.it) (Remote host closed the connection)
15:45:11 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
15:45:32 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
15:49:36 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:178:131c:7a0c:e758)
15:50:59 bollu joins (uid233390@id-233390.helmsley.irccloud.com)
15:51:00 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
15:52:45 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
15:53:37 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:178:131c:7a0c:e758) (Ping timeout: 240 seconds)
16:02:15 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:03:15 alx741 joins (~alx741@157.100.93.160)
16:04:05 × toastloop quits (toastloop@user/toastloop) (Remote host closed the connection)
16:05:46 coot joins (~coot@89-64-85-93.dynamic.chello.pl)
16:08:42 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
16:09:51 xkuru joins (~xkuru@user/xkuru)
16:10:50 × deadmarshal quits (~deadmarsh@95.38.113.39) (Ping timeout: 260 seconds)
16:12:00 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds)
16:13:04 deadmarshal joins (~deadmarsh@95.38.113.39)
16:13:54 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
16:14:09 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
16:15:38 × selkirk quits (~selkirk@182.69.202.102) (Quit: leaving)
16:16:27 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
16:25:08 earendel joins (uid498179@user/earendel)
16:28:06 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
16:31:42 CyberTailor joins (~cyber@gateway/tor-sasl/cybertailor)
16:31:50 × madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 260 seconds)
16:31:53 alx741 joins (~alx741@157.100.93.160)
16:32:06 × jeetelongname quits (~jeet@88-111-159-26.dynamic.dsl.as9105.com) (Ping timeout: 268 seconds)
16:32:10 <CyberTailor> i have too little RAM to compile haskell packages, what to do?
16:35:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
16:35:37 lagash joins (lagash@lagash.shelltalk.net)
16:36:37 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
16:36:38 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
16:36:57 × pfurla__ quits (~pfurla@2804:d41:4331:4800:b8e7:6926:586a:39fa) (Ping timeout: 240 seconds)
16:39:55 pfurla joins (~pfurla@2804:d41:4331:4800:8490:5949:caf8:c808)
16:42:54 <pragma-> download more
16:44:28 <geekosaur> generally you add swap somehow. of course that'll be slow.
16:46:07 <geekosaur> if this is something like a vps or droplet, you build on another machine and copy the artifacts over. if it's something like an rpi and you can't easily add swap, you may have to look into an arm vps
16:46:48 Vajb joins (~Vajb@2001:999:62:f3d1:4390:fbed:1f9b:9d03)
16:52:46 <sm> how much too little ?
16:54:25 alx741 joins (~alx741@157.100.93.160)
16:59:44 <CyberTailor> sm: 4GB and zram
17:00:08 <geekosaur> ow
17:00:39 <geekosaur> might suggest using qemu on an x86 box for builds
17:00:57 <geekosaur> it'll be slow, but not as slow as swapping on 4gb
17:00:57 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
17:01:06 <sm> I don't know ram, but many (most ?) packages can build in 4G, some tweaks to your command can help
17:01:26 <sm> @where lowmem
17:01:26 <lambdabot> stack build ONEPKG -j1 --ghc-options='+RTS -M1G -RTS'
17:02:04 <sm> @where lowmemcabal
17:02:04 <lambdabot> I know nothing about lowmemcabal.
17:02:55 <sm> but you're probably building pandoc or something
17:02:58 <monochrom> cabal's is still -j1 and --ghc-options
17:03:10 <sm> +1
17:03:58 <sm> @where+ lowmem cabal/stack build ONEPKG -j1 --ghc-options='+RTS -M2G -RTS'
17:03:58 <lambdabot> Done.
17:04:38 slack1256 joins (~slack1256@191.126.99.206)
17:05:04 <CyberTailor> gentoo builds with +RTS -A256M -qb0 -RTS
17:05:06 <monochrom> GHC these days autotune its allocator based on physical RAM size. It may be unnecessary to dictate that ghc-options.
17:05:41 <sm> interesting.. well, worth testing CyberTailor
17:05:52 × shailangsa quits (~shailangs@host86-186-127-224.range86-186.btcentralplus.com) (Remote host closed the connection)
17:06:24 <c_wraith> most build memory problems come from either the linker or packages like vector-algorithms that do recursive inlining up to some ridiculous depth such that they generate huge amounts of code.
17:08:36 <c_wraith> it can help to know what situation you're in
17:09:58 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
17:09:58 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
17:09:58 wroathe joins (~wroathe@user/wroathe)
17:10:52 <sm> poor, grim, or dire ?
17:11:15 <CyberTailor> building e.g. shellcheck or gentoo's hackport
17:12:16 <sm> is the above command helping ?
17:15:17 <CyberTailor> i'm just going to put off haskell until i get more ram
17:18:53 × mrus quits (~mrus@2001:19f0:5:1535:5400:3ff:fe7d:10ae) (Quit: Surfing the great wave off Kanagawa)
17:19:00 alx741 joins (~alx741@157.100.93.160)
17:19:11 mrus joins (~mrus@2001:19f0:5:1535:5400:3ff:fe7d:10ae)
17:22:01 <hololeap> this is an example of a what gentoo outputs when configuring. I know that things were optimized at one point to favor speed over RAM economy: http://sprunge.us/oXtTK7
17:24:09 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
17:24:23 <sm> aww... too sensible :)
17:26:52 <hololeap> does anyone spot any options that are obviously memory-hungry in that?
17:28:27 <hololeap> or know of changes that would allow us to have a low-memory profile for building?
17:28:41 <monochrom> -j4
17:29:15 <hololeap> sure, they tried with -j1 I'm pretty sure
17:30:24 <monochrom> I guess I don't understand your question.
17:31:45 <hololeap> there are a bunch of other options that I'm not familiar with, such as --ghc-option=-optl-Wl,-O1, and I'm wondering if any (besides -j4) stand out as culprits for increasing RAM consumption during compilation
17:38:47 delYsid joins (~user@84-115-55-45.cable.dynamic.surfer.at)
17:39:57 <delYsid> I think I need ExistentialQuantification, but the concept is totally new to me.
17:41:01 × coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot)
17:41:04 alx741 joins (~alx741@157.100.93.160)
17:41:07 <delYsid> I get that it would be better to expand every possible operation to a record and keep that in a list, but I think I can not do that since I want the body of my datatype to be extensible, if that wording makes any sense.
17:42:59 <delYsid> I am trying to create programmable views in a brick app using dyre. The idea is to have a generic View type which the user can create which holds data and functions which specify how to draw and handle events.
17:44:06 <delYsid> Are there any other patterns then ExistentialQuantification to do this, or should I happily proceed with Typeable and cast?
17:44:17 × slack1256 quits (~slack1256@191.126.99.206) (Ping timeout: 240 seconds)
17:45:50 shailangsa joins (~shailangs@host86-186-127-224.range86-186.btcentralplus.com)
17:45:51 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
17:46:46 regr joins (~regr@2a02:a466:cf4f:1:5446:667c:b4:12f6)
17:46:47 <hololeap> delYsid: you only need ExistentialQuantification if you are trying to "hide" some aspect of the type
17:48:01 <hololeap> for instance, if you had the type (Thing t) and constructors for (Thing String) and (Thing Bool), you would not be able to stick both of those in [Thing t], because lists are homogeneous
17:49:08 <hololeap> so you could use ExistentialQuantification to make a SomeThing type which hides `t', allowing you to stick it into containers, but you lose the type-level information of what `t' was
17:49:38 × deadmarshal quits (~deadmarsh@95.38.113.39) (Ping timeout: 256 seconds)
17:51:34 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:178:131c:7a0c:e758)
17:52:56 × _73 quits (~user@pool-108-49-252-36.bstnma.fios.verizon.net) (Remote host closed the connection)
17:53:55 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:54:29 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:178:131c:7a0c:e758) (Remote host closed the connection)
17:54:45 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
18:00:05 × benin quits (~benin@183.82.27.121) (Ping timeout: 252 seconds)
18:00:34 benin joins (~benin@183.82.27.121)
18:02:14 alx741 joins (~alx741@157.100.93.160)
18:02:33 CyberTailor parts (~cyber@gateway/tor-sasl/cybertailor) (Konversation terminated!)
18:03:01 <delYsid> hololeap: Thats pretty much it. I dont want to hide anything in particular, but I need a way to add an aribtrary number of custom types of a container. I am hoping to be able to recover t with a Typeable constraint and cast?
18:03:17 <delYsid> s/of/to/
18:05:12 <hololeap> I don't think that's necessary. you can shove as much info as you want into the `s' variable for brick's App
18:05:20 <monochrom> "Hiding" is true, but is true of all parametric polymorphism. If I code up "f :: forall a. a -> a" and you are the user of f, you are hiding the actual type from me, too. Changing "forall" to "exist" just turns the table around.
18:06:14 <monochrom> Instead, "forall" is a product type that is an infinite product, "exists" is a sum type that is an infinite sum.
18:06:19 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection)
18:06:58 <monochrom> That infinitness is also the driving force of why some people say "open".
18:09:40 <hololeap> Q: where did you put my keys? A: There exists a location in the universe where your keys are present -- sounds a bit like "hiding" to me ;)
18:12:47 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
18:13:13 <hololeap> delYsid: you might want to model a widget off of brick's App, where the user just needs to give you (s -> [Widget n]) and (s -> Event n e -> EventM n (Next s)) functions in order to have a View
18:13:40 <hololeap> _how_ they implement the functions is their business and outside the scope of your library
18:15:49 <monochrom> Observe that: 1. It uses "forall". 2. It is saying that now the user can hide their s from you. Which is what I said.
18:16:25 <monochrom> Generally and formally, "(exists s. ...) -> t" is equivalent to "forall s. ... -> t".
18:16:31 <delYsid> hololeap: Yes. Maybe I am stuck in some sort of confusion, but what I want to achieve is the ability to add an aribtrary amount of these to the brick state. I want some sort of function addView :: View -> State -> State -- which adds the given view (with its own state) to the global brick state.
18:16:53 madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net)
18:17:09 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
18:18:11 econo joins (uid147250@user/econo)
18:19:11 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
18:20:28 dsrt^ joins (~dsrt@64.253.22.77)
18:20:37 × Feuermagier_ quits (~Feuermagi@138.199.36.133) (Quit: Leaving)
18:20:48 Feuermagier joins (~Feuermagi@user/feuermagier)
18:21:27 <monochrom> If you find that View is conceptually an open sum type, you can define it to be an existential type, as said.
18:22:41 <delYsid> ah, that sounds about right then
18:23:53 <monochrom> A finite and closed sum type is for example "data F = C1 Int | C2 Bool | C3 Char". If you receive x::F, you say "I know, it can only be Int, Bool, or Char".
18:25:16 jakalx joins (~jakalx@base.jakalx.net)
18:25:29 <monochrom> An infinite and open sum type is for example "data O = forall s. O s (s -> String)". If you receive x::O, it may be any type, you don't know which, but you know it supports an "s -> String" operations.
18:25:29 <EvanR> you may be able to do it if you can find a uniform interface to your view
18:25:36 <EvanR> without fancy types
18:26:07 <monochrom> Note that "O -> Foo" is the same as "forall s. (s, s->String) -> Foo".
18:26:53 <monochrom> In a language without built-in existential typing, you use that encoding.
18:27:27 <hololeap> ok, but if we're getting into theory here, what about the yoneda lemma, where a ~ (a -> r) -> r is saying "if you can give me an `r' from your huge open sum type `a', I really don't care what `a' is. just give me the `r'" -- doesn't this also provide a mechanism for dealing with open sum types without getting into ExistentialQuantification?
18:28:42 <monochrom> But so is F. "F -> Foo" is the same as "(Int -> Foo, Bool -> Foo, Char -> Foo)" --- a finite "forall".
18:29:02 deadmarshal joins (~deadmarsh@95.38.113.39)
18:29:28 <EvanR> delYsid, does the ultimate use of your dynamic view end up being something like a map reduce
18:29:50 <EvanR> and foldmap... like map all your weird values to a uniform value and mush them together
18:29:52 × doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
18:30:01 natechan joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
18:30:24 <monochrom> You are missing a "forall" there. a ~ forall r. (a -> r) -> r
18:30:42 <monochrom> In category theory terms, "natural in r".
18:30:52 <EvanR> is that version of yoneda lemma at all related to scott encoding (or what's it called encoding) of data types
18:30:56 alx741 joins (~alx741@157.100.93.160)
18:31:00 <monochrom> Naturality in category theory becomes parametricity in programming.
18:31:43 <monochrom> There is also an outer "forall a." over the whole thing. The Yoneda correspondence is natural in a, too.
18:32:09 <monochrom> THIS IS WHY HASKELL SHOULD HAVE MADE YOU WRITE "forall" EXPLICITLY.
18:32:31 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:32:36 <EvanR> that would get annoying
18:32:51 <hololeap> I don't know enough about the theory to actually use it to make a point :) but my point is that the user can just give you back a [Widget] and you don't need to know all the steps they took (or types they used) to do so
18:32:54 <EvanR> category theory is full of omitted important stuff like that
18:33:03 <EvanR> the student is just supposed to know it's there
18:33:16 <EvanR> it's even worse in physics
18:33:27 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
18:34:10 <EvanR> yes, what hololeap said
18:34:26 × thevishy quits (~Nishant@2405:201:f005:c007:4c69:b93c:3bc3:9ff2) (Quit: Leaving)
18:34:29 <delYsid> Well, the draw part of the view is simple, since it is pure. I have that worked out. But event handling is different, since it can mutate state, and I need a way for the view to know where its data is located in the big state.
18:34:50 <EvanR> [BigData -> Widget]
18:35:26 <monochrom> We can talk non-theory. I started without theory, I didn't bring up Yoneda. I started with basic Haskell code.
18:35:31 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
18:35:55 <monochrom> You can work with my O->Foo example to see what I mean. No Yoda required.
18:36:25 <EvanR> Yoda Nelemma
18:37:01 <monochrom> And you can see that it is the same technique you described. I was connecting forall with exist.
18:37:36 <monochrom> My hidden agenda is, though, to de-FUD existential types.
18:38:27 <monochrom> Existential types are not an anti-pattern.
18:38:46 <EvanR> existential types hide stuff... simply applying a function hides stuff xD
18:38:51 <EvanR> what's the problem
18:39:13 Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net)
18:39:22 × gustik quits (~gustik@2a01:c844:242f:ba20:72e:7030:46bf:1353) (Quit: Leaving)
18:39:41 <monochrom> Well yeah that's another of my point, too. Existential types do not have a monopoly on hiding.
18:40:14 <monochrom> In fact to the point that the hiding should be attributed to something else unrelated.
18:41:14 <monochrom> In Java, you have instanceOf, you have a whole java.reflection machinery. They break parametricity in a very strong way. They also break all the fabled "hiding" promised by OOP.
18:41:43 <monochrom> The conclusion is that hiding should be attributed to parametricity.
18:42:34 <hololeap> delYsid: here's my thinking: you can write: (local -> BrickEvent n e -> EventM n (Next local)) -> ((s,local) -> BrickEvent n e -> EventM n (Next (s,local)))
18:42:43 <monochrom> Just that the OOP people boast "hiding" more often, and they use existential types more often, so you get a distorted impression.
18:42:49 <earendel> i think you misunderstand it as a kind of security feature.
18:43:22 <monochrom> Uh no. Look at academic explanations of "parametricity" and "type case".
18:43:25 <earendel> in case you mean private and internal types.
18:43:47 <hololeap> delYsid: this will allow you to take a state function that focuses on your local View state and apply it to your appHandleEvent from Brick.Main
18:43:53 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:43:57 <delYsid> I think my problem boils down to a this "pointer". If I were to write this in C++, I would have base class, some virtual methods, and hide all the private state in the various view subclasses. To add a view, I'd push it to a vector of base pointers. If I call my virtual handle event method, I get a this pointer and can mutate my state. I am looking for something that lets me do this with Brick, where the State is actually a global
18:43:58 <delYsid> big nested record, and I have to figure out where my private state lives.
18:44:06 <monochrom> In particular "type case implies losing parametricity"
18:44:50 <EvanR> delYsid, you can do exactly this by passing a this pointer as an argument
18:45:03 <EvanR> and using IO or STM to use it
18:45:11 <monochrom> Haskell is not very good at subclassing though, even after you use existential types.
18:45:38 <monochrom> But a virtual class (ignoring subclassing), that we can do.
18:47:09 × regr quits (~regr@2a02:a466:cf4f:1:5446:667c:b4:12f6) (Ping timeout: 268 seconds)
18:47:26 <EvanR> virtual class = record of functions? xD
18:47:31 <monochrom> Yeah!
18:47:40 <EvanR> cute
18:48:16 <monochrom> Or even better, record of a few value fields and a few function fields that use those value fields.
18:48:32 × deadmarshal quits (~deadmarsh@95.38.113.39) (Ping timeout: 240 seconds)
18:48:41 <monochrom> For example, "data O = forall s. O s (s -> String)" as said.
18:49:19 <EvanR> that screams "String" to me
18:49:33 <monochrom> Or you can recgonize that "s -> String looks like a Show method" so you compress it to "data O' = forall s. Show s => O' s"
18:51:33 <monochrom> It is a basic but dumb and useless example.
18:51:37 × madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 240 seconds)
18:51:48 <monochrom> As usual, all useful OOP examples take up at least 10 lines.
18:51:51 regr joins (~regr@2a02:a466:cf4f:1:cb36:2141:856f:f900)
18:52:11 mc47 joins (~mc47@xmonad/TheMC47)
18:53:11 <delYsid> EvanR: I have never worked with pointers in Haskell. I was hoping I could get what I want with Lens, but I am sort of stuck here.
18:53:23 <monochrom> delYsid: There is a chance "pointer" translates to "lens"...
18:53:25 <EvanR> not called a pointer, it's IORef or TVar
18:53:41 alx741 joins (~alx741@157.100.93.160)
18:53:50 <geekosaur> well, one could claim you work with nothing but pointers
18:54:24 <monochrom> But yeah maybe IORef or TVar is more idiomatic.
18:54:40 <monochrom> Unless you don't want IO or STM.
18:55:41 <EvanR> accessing (potentially modifying?) that external "big" "state" ?
18:56:10 <EvanR> from your OOP subcomponents?
18:56:22 <monochrom> But if it is strictly a pure function View -> State -> State, different values of View address different slices of State, and there are too many possibilities to write a finite sum type for View...
18:56:28 <EvanR> seems awkward to do it entirely pure
18:56:33 <monochrom> then that's straight to the definition of "lens".
18:56:50 <delYsid> EvanR: Yes. Its a bit like having two states. The private state of the view which lives somewhere in a NonEmpty in the global state. The handler should be able to modify both.
18:57:30 <EvanR> if you figure out how to do that without IO, you still have the original problem of unmanagable spooky action at a distance
18:57:38 <EvanR> that happens immediately with lots of globals
18:58:31 <EvanR> in my current code, I don't have global state and restrict access to what's relevant
18:58:44 <delYsid> But without access to the global state, the handler is pretty limited in reusing any (global) functionality...
18:59:45 <delYsid> imagine a clipboard. How would a view copy stuff to it?
19:00:07 <EvanR> sounds like a single TVar, the clipboard
19:00:30 <EvanR> and whatever can use it, has it
19:00:46 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
19:01:01 <EvanR> (also, a "view" that modifies the clipboard? xD)
19:01:02 <delYsid> hmm, thats something to think about.
19:01:19 <EvanR> not your dads MVC pattern
19:01:20 × max22- quits (~maxime@2a01cb08833598005bdb830adfc4642c.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds)
19:01:31 <delYsid> nah
19:01:56 <delYsid> Lets call it DisplayableObject then :-)
19:02:08 <EvanR> it can do anything as well as display
19:02:20 <EvanR> redundant? xD
19:02:48 <monochrom> "Object" is redundant :)
19:03:53 × cocreature quits (~moritz@2a03:b0c0:3:d0::c8:f001) (Quit: WeeChat 3.0.1)
19:05:24 cocreature joins (~moritz@2a03:b0c0:3:d0::c8:f001)
19:05:34 × paddymahoney quits (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com) (Ping timeout: 256 seconds)
19:06:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
19:06:52 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
19:07:05 <delYsid> OK, I get the message, I think. Dont open everything up because that makes code unpredictable. So a displayable should only have access to its own state. And if it needs to do stuff to the global state, make these operations explicit as fields and feed them at creation time.
19:08:05 <EvanR> something like that is a classic OOP strategy, though the background assumes everything in IO
19:09:10 <delYsid> Its not even that I am after OOP. I dont have any sort of inheritance or anything like that. All I want is a polymorhpic container of things with private state!
19:09:25 <EvanR> bah inheritance
19:09:56 <EvanR> haskell has other ways to reuse code
19:10:32 <delYsid> inheritance is not relevant anyway. polymorphism is.
19:11:05 <EvanR> the "polymorphic container of things" with private state has an issue in haskell because it doesn't describe what the things or the container are supposed to be able to do
19:11:29 <EvanR> even implementing it as [IO ()] is too specific, depending on what the point is
19:12:03 <EvanR> in other languages you have a default background of things all objects can do, but in haskell you don't
19:12:06 regr parts (~regr@2a02:a466:cf4f:1:cb36:2141:856f:f900) (WeeChat 2.8)
19:12:18 <EvanR> i.e. [forall a . a] can't do anything
19:13:16 wootehfoot joins (~wootehfoo@user/wootehfoot)
19:13:32 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
19:14:07 <delYsid> Well, Things is a typeclass in my case I guess... The point is more about what signature its methods should exactly have. as said, the pure draw is simple and done, but the stateful handleEvent probably needs Lens somehow to writ the mutation back to the global state.
19:15:23 <EvanR> if the big global state has type S then it sounds like your just want a S -> S
19:15:41 <EvanR> lenses can help you build those, if you want
19:16:37 <EvanR> your interface could involve (S -> S) or it could take IORef S
19:17:10 <EvanR> but yeah that there needs to be some interface was my point
19:17:24 <EvanR> polymorphic or not
19:18:01 zincy joins (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807)
19:19:23 alx741 joins (~alx741@157.100.93.160)
19:19:39 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
19:20:15 <Raito_Bezarius> is it possible to open a named shared memory location with stm library in Haskell?
19:20:34 <monochrom> I think no.
19:20:38 × zincy quits (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807) (Remote host closed the connection)
19:22:25 <Raito_Bezarius> Is there a way to open named shared memory locations in Haskell, monochrom ?
19:24:49 <geekosaur> I don't think there's an interface to the shmget() etc. functions currently. There is one to mmap() but I'm not sure how up to date it is
19:25:24 <geekosaur> STM only operates in-process; there is no way to synchronize across processes using a shared memory segment, either with STM or with MVars
19:25:55 <Raito_Bezarius> Thanks geekosaur!
19:25:57 <hololeap> delYsid: this is my idea: http://sprunge.us/uIMjhF?haskell
19:26:04 Sgeo joins (~Sgeo@user/sgeo)
19:29:35 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
19:29:38 <sm> looks interesting
19:30:34 lavaman joins (~lavaman@98.38.249.169)
19:31:21 <hololeap> oops, there's a typo at the end. fixed: http://sprunge.us/7F3zYK?haskell
19:32:43 <EvanR> what is the n type in bricks Widget
19:32:49 max22- joins (~maxime@2a01cb088335980062ccec88c4c3abad.ipv6.abo.wanadoo.fr)
19:33:12 <hololeap> you might notice that viewHandleEvent returns `EventM n (Maybe (Next v))` instead of `EventM n (Next v)` -- this is so that you can choose to pass the event on to the parent handler
19:33:16 Erutuon joins (~Erutuon@user/erutuon)
19:33:35 <hololeap> EvanR: it's essentially a sum type that lets you identify your widgets, or at least the important ones
19:33:54 <EvanR> oh, a naming system
19:33:59 <hololeap> yeah
19:34:22 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Read error: Connection reset by peer)
19:34:52 qrpnxz joins (~qrpnxz@user/qrpnxz)
19:36:03 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
19:36:04 qrpnxz joins (~qrpnxz@user/qrpnxz)
19:36:48 × rito_ quits (~rito_gh@45.112.243.172) (Quit: Leaving)
19:38:28 waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4)
19:40:04 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
19:40:04 qrpnxz joins (~qrpnxz@user/qrpnxz)
19:40:17 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds)
19:40:48 <delYsid> n is for name, actually.
19:41:33 <delYsid> hololeap: Hmm, I am too slow to digest this immediately, but it looks promising. Thanks for writing it up!
19:41:50 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
19:41:50 qrpnxz joins (~qrpnxz@user/qrpnxz)
19:43:06 Erutuon joins (~Erutuon@user/erutuon)
19:45:15 <hololeap> delYsid: np. you might also want to add this http://sprunge.us/txnro4 ... not sure how it will all shake out in real code, but this could probably accommodate nested Views as well
19:45:31 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
19:45:32 qrpnxz joins (~qrpnxz@user/qrpnxz)
19:46:19 madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net)
19:46:43 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
19:46:44 qrpnxz joins (~qrpnxz@user/qrpnxz)
19:47:35 <hololeap> where you would end up with `ViewState (ViewState v2 v1) s` or something, where v1 is the state for the outer View and v2 is the state for the inner View
19:47:50 alx741 joins (~alx741@157.100.93.160)
19:48:36 <hololeap> I've actually thought about this exact problem before so I had some ideas already :)
19:49:55 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Quit: Lost terminal)
19:50:13 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
19:51:11 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
19:52:20 <delYsid> Oh, so the plan is to launch an App for a view? Thats interesting
19:52:58 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 260 seconds)
19:56:54 zebrag joins (~chris@user/zebrag)
19:57:00 <hololeap> the idea is that a View is an independent system, sort of like an App, and this means you need to hijack appHandleEvent so that the View can handle events independently and pass on any "leftovers" to the main App
19:58:15 <hololeap> again, I've only ever thought about this in theory. I haven't tried implementing it or using it so I don't know if it will end up being annoying to use in the end for some reason
19:59:27 <Athas> ...is there really no convenience function in aeson for decoding from String or Text?
19:59:28 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
19:59:54 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
19:59:55 qrpnxz joins (~qrpnxz@user/qrpnxz)
20:00:05 <hololeap> there should probably be a mechanism so that a View can both handle event _and_ pass it on to its parent, instead of "consuming" it being the only choice
20:01:01 jumper149 joins (~jumper149@static.6.71.203.116.clients.your-server.de)
20:01:03 <jumper149> Can I use a literate Haskell file with cabal?
20:01:19 <geekosaur> cabal knows the .lhs extension is Haskell source, yes
20:03:12 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
20:03:46 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
20:03:55 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
20:03:55 qrpnxz joins (~qrpnxz@user/qrpnxz)
20:04:21 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
20:04:21 qrpnxz joins (~qrpnxz@user/qrpnxz)
20:04:37 × juhp quits (~juhp@128.106.188.82) (Ping timeout: 240 seconds)
20:04:45 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
20:04:46 qrpnxz joins (~qrpnxz@user/qrpnxz)
20:07:37 juhp joins (~juhp@128.106.188.82)
20:09:46 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
20:10:21 <delYsid> hololeap: I way planning to do the "passing on of event" by actually suing some sort of Keymap. Right now, I have a global appHandleEvent which picks the current view and call its handler, doing any global stuff hardcoded. Your idea looks neat, but I dont see how I'd add views to a container, same problem I guess.
20:11:21 <delYsid> hololeap: As said initially, I'd like to combine Brick and Dyre, which means I'll have a config file which launches the resulting app. the plan is to be able to add views in that config file, hence the open sum type thing...
20:11:45 <delYsid> damn, I cant type.
20:15:20 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
20:17:24 alx741 joins (~alx741@157.100.93.160)
20:17:25 jonathanx joins (~jonathan@94.234.53.6)
20:20:37 × jkaye quits (~jkaye@2601:281:8300:7530:c697:c75:764c:d1a0) (Ping timeout: 240 seconds)
20:20:40 × bollu quits (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
20:22:06 × alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer)
20:22:09 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
20:22:10 qrpnxz joins (~qrpnxz@user/qrpnxz)
20:22:38 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
20:24:43 × madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Remote host closed the connection)
20:29:44 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
20:29:44 qrpnxz joins (~qrpnxz@user/qrpnxz)
20:32:09 notzmv joins (~zmv@user/notzmv)
20:33:07 <EvanR> so if I had, let's say, a big Data.Map which will not change. Then use Data.Compact to get the compact version of it. Then I want to union in additional smaller maps that don't overlap with the big map... can I just do it and it will utilize the compact region?
20:33:35 <EvanR> or would it be better to hold two maps, the small dynamic ones and the large compact one and manually check both
20:33:37 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
20:36:02 <EvanR> I'm thinking merging a compact map and a non compact map may begin to copy stuff out of the compact region and defeat the purpose
20:37:21 <geekosaur> I think that'd only copy the spine out, keys and values would stay put as long as there's no overlap?
20:37:36 doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net)
20:38:58 <EvanR> if keys and values are small, wouldn't the spine constitute a big % of the space
20:39:38 <geekosaur> yes, but they'd both have to be pretty small
20:40:01 <geekosaur> bad idea for Map Int Int, less so for Map String String
20:40:04 × troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset)
20:40:35 <EvanR> or IntMap BasicADTWithAFewInts
20:40:41 troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua)
20:41:24 <EvanR> that the keys and values stay in the compact region is good
20:41:46 <geekosaur> IntMap probably breaks that since it'd be possible to UNPACK the keys into the spine
20:41:49 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
20:41:52 <EvanR> oof
20:42:24 × ozzymcduff quits (~mathieu@81-234-151-21-no94.tbcn.telia.com) (Remote host closed the connection)
20:42:57 EvanR hmms
20:43:47 <EvanR> i will stop premature optimizing for now
20:43:51 cosimone joins (~user@93-34-133-159.ip49.fastwebnet.it)
20:44:31 ozzymcduff joins (~mathieu@81-234-151-21-no94.tbcn.telia.com)
20:47:15 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
20:51:12 pavonia joins (~user@user/siracusa)
20:52:32 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
20:52:32 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
20:52:32 wroathe joins (~wroathe@user/wroathe)
20:52:57 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds)
20:54:02 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
20:54:02 qrpnxz joins (~qrpnxz@user/qrpnxz)
20:55:40 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
20:55:41 qrpnxz joins (~qrpnxz@user/qrpnxz)
20:58:20 xb0o2 joins (~xb0o2@user/xb0o2)
20:58:48 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
20:58:49 qrpnxz joins (~qrpnxz@user/qrpnxz)
20:59:26 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
20:59:26 qrpnxz joins (~qrpnxz@user/qrpnxz)
20:59:41 coot joins (~coot@2a02:a310:e03f:8500:933a:39ca:ef4e:37cb)
21:00:09 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
21:00:10 qrpnxz joins (~qrpnxz@user/qrpnxz)
21:00:25 <__monty__> Hmm, I use Criterion to benchmark my Advent of Code solutions and yesterday's assignement is throwing me for a loop. The benchmark errors out on me with "Too many open files." What's the usual fix for this? Am I accidentally using lazy IO and the file's not clos... Yep, that was it (file not closing not sure it's actually lazy IO), wasn't parsing until eof >.<
21:00:37 <__monty__> Thanks for rubber ducking! <3
21:01:17 × jonathanx quits (~jonathan@94.234.53.6) (Ping timeout: 240 seconds)
21:01:40 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:02:18 × Alex_test quits (~al_test@178.34.163.82) (Ping timeout: 256 seconds)
21:02:47 <xb0o2> You're welcome... to where do we send the invoice?
21:02:51 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
21:02:52 qrpnxz joins (~qrpnxz@user/qrpnxz)
21:03:07 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:03:08 <c_wraith> __monty__: benchmarking is better when it doesn't include the file IO anyway. You'd probably get more actionable results if you read the input first and then passed it to all the test cases
21:03:36 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
21:03:37 qrpnxz joins (~qrpnxz@user/qrpnxz)
21:03:37 × AlexZenon quits (~alzenon@178.34.163.82) (Ping timeout: 240 seconds)
21:04:31 <__monty__> c_wraith: I know these numbers aren't very meaningful. (I don't even bother making sure the load on my machine isn't already high before running them.) It's just the number I want to know : )
21:04:47 Erutuon joins (~Erutuon@user/erutuon)
21:06:17 Alex_test joins (~al_test@178.34.163.82)
21:06:54 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: closed)
21:07:05 qrpnxz joins (~qrpnxz@user/qrpnxz)
21:07:08 neurocyte0132889 joins (~neurocyte@94.46.66.157)
21:07:08 × neurocyte0132889 quits (~neurocyte@94.46.66.157) (Changing host)
21:07:08 neurocyte0132889 joins (~neurocyte@user/neurocyte)
21:09:03 AlexZenon joins (~alzenon@178.34.163.82)
21:10:56 × mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Read error: Connection reset by peer)
21:11:30 mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net)
21:11:36 × sprout quits (~quassel@2a02:a467:ccd6:1:21ba:a382:6b6:54c4) (Ping timeout: 245 seconds)
21:17:20 acidjnk joins (~acidjnk@pd9e0bdc0.dip0.t-ipconnect.de)
21:17:45 × mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Read error: Connection reset by peer)
21:18:07 mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net)
21:18:59 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
21:19:09 sprout joins (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3)
21:19:39 zincy joins (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807)
21:19:57 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
21:23:30 × cosimone quits (~user@93-34-133-159.ip49.fastwebnet.it) (Remote host closed the connection)
21:24:24 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
21:27:26 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 245 seconds)
21:34:36 × benin quits (~benin@183.82.27.121) (Ping timeout: 256 seconds)
21:37:26 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
21:40:56 × Midjak quits (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Quit: This computer has gone to sleep)
21:41:07 bollu joins (uid233390@id-233390.helmsley.irccloud.com)
21:43:57 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
21:43:57 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
21:43:57 wroathe joins (~wroathe@user/wroathe)
21:44:20 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:46:41 × zincy quits (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807) (Remote host closed the connection)
21:48:56 deadmarshal joins (~deadmarsh@95.38.113.39)
21:49:03 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
21:53:18 × deadmarshal quits (~deadmarsh@95.38.113.39) (Ping timeout: 256 seconds)
21:56:06 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
21:58:10 benin joins (~benin@183.82.27.121)
22:12:30 × sprout quits (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3) (Ping timeout: 260 seconds)
22:14:50 × xsperry quits (~xs@user/xsperry) (Ping timeout: 256 seconds)
22:15:38 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
22:17:09 xsperry joins (~xs@user/xsperry)
22:18:10 son0p joins (~ff@181.136.122.143)
22:18:27 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4)
22:19:19 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:178:131c:7a0c:e758)
22:24:31 <dmj`> xb0o2: lol
22:29:57 × dtman34 quits (~dtman34@c-73-62-246-247.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
22:32:09 × erisco quits (~erisco@d24-57-249-233.home.cgocable.net) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in)
22:32:52 erisco joins (~erisco@d24-57-249-233.home.cgocable.net)
22:34:12 × coot quits (~coot@2a02:a310:e03f:8500:933a:39ca:ef4e:37cb) (Quit: coot)
22:35:48 × zer0bitz quits (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi) (Read error: Connection reset by peer)
22:38:23 dtman34 joins (~dtman34@c-73-62-246-247.hsd1.mn.comcast.net)
22:46:57 lavaman joins (~lavaman@98.38.249.169)
22:47:44 jpds1 joins (~jpds@gateway/tor-sasl/jpds)
22:48:16 machinedgod joins (~machinedg@24.105.81.50)
22:48:25 × Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
22:48:26 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
22:48:38 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
22:51:40 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
23:00:13 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:178:131c:7a0c:e758) (Remote host closed the connection)
23:10:21 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
23:10:22 qrpnxz joins (~qrpnxz@user/qrpnxz)
23:12:47 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
23:18:58 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
23:19:03 <zero> can someone help me understand where I should put my class constraints when i use forall.?
23:19:36 × zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
23:19:57 <zero> frequencies :: (Foldable f, Ord a) => forall a. f a -> Map a Int -- does this make sense?
23:19:57 <EvanR> forall usually goes all the way to the right
23:20:04 <EvanR> ~~~~~~
23:20:06 <EvanR> to the left
23:20:22 <EvanR> forall is only somewhere in the middle when doing RankN types
23:20:33 <hpc> the way to remember is forall brings things into scope
23:20:43 zaquest joins (~notzaques@5.130.79.72)
23:20:57 <hpc> it's like writing "x \x -> stuff"
23:21:24 <EvanR> forall f a . (Foldable f, Ord a) => f a -> Map a Int
23:22:10 <zero> fair enough. and we need the f beacause we lost the implicit quantification, right?
23:23:04 <EvanR> if you're doing ScopedTypeVariables you have to name them all
23:23:04 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:23:04 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
23:23:04 wroathe joins (~wroathe@user/wroathe)
23:23:31 <EvanR> unless they we're already introduced by an enclosing forall
23:24:06 <EvanR> name em all or name none
23:25:38 <monochrom> One forall to bind them all. :)
23:25:47 <dsal> I did the "number my tree" thing for last night's thing using traverse in a State monad and was trying to see if I could do something fancier with partsOf/biplate, but all attempts are worse.
23:25:54 <dsal> I need to just get around to learning how to make a zipper.
23:27:16 <EvanR> numbers...
23:27:50 × tomboy64 quits (~tomboy64@user/tomboy64) (Quit: Off to see the wizard.)
23:28:29 <dsal> This is not actually that bad: `number = flip evalState 0 . traverse (\x -> (,x) <$> (id <+= 1))`
23:28:32 <dsal> but the solution kind of sucks.
23:32:49 tomboy64 joins (~tomboy64@user/tomboy64)
23:33:50 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
23:39:57 × acidjnk quits (~acidjnk@pd9e0bdc0.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
23:44:59 × max22- quits (~maxime@2a01cb088335980062ccec88c4c3abad.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
23:46:07 sprout joins (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3)
23:47:01 × Jing_ quits (~hedgehog@2604:a840:3::103e) (Remote host closed the connection)
23:47:34 Jing joins (~hedgehog@2604:a840:3::103e)
23:49:52 × snake quits (~snake@user/snake) (Quit: Quitting)
23:52:08 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d)
23:52:26 × sprout quits (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3) (Ping timeout: 245 seconds)
23:52:57 × jumper149 quits (~jumper149@static.6.71.203.116.clients.your-server.de) (Quit: WeeChat 3.3)
23:55:14 Henson joins (~kvirc@107-179-133-201.cpe.teksavvy.com)
23:55:53 snake joins (~snake@user/snake)

All times are in UTC on 2021-12-18.