Home liberachat/#haskell: Logs Calendar

Logs on 2021-09-11 (liberachat/#haskell)

00:02:13 <lechner> awpr monochrom glguy: thanks! that works like a charm, and emacs indents it right too
00:04:54 <monochrom> Sometimes the syntax colourer is confused. But if you delete one of the quotes and enter again, it is right again.
00:05:06 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.2.1)
00:05:13 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
00:05:22 <glguy> When I'm using vim I press ^L to get syntax highlighting back in order
00:05:27 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
00:05:49 <glguy> I don't know where else that works, but it works there :)
00:06:27 × Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.)
00:10:04 <hololeap> a pattern that I'm looking for a name for: basically "barbies" with a type family where: TF Identity x = x; TF f x = f x
00:10:19 <lechner> actually, may it does not work so well. i get lexical error in string/character literal at character 't'
00:11:23 <monochrom> OptimizedTypeLevelApplication
00:11:30 <geekosaur> @where paste
00:11:30 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
00:13:06 <lechner> https://paste.tomsmeding.com/Ld3L3FeP
00:13:46 <geekosaur> you need the closing backslash too
00:13:53 <lechner> ah
00:14:14 <lechner> thanks! did i mention i am a newbie?
00:15:33 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
00:15:46 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
00:16:15 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
00:18:22 <lechner> Hi, what the right way to render HTML entities in Lucid please?
00:21:04 <lechner> HTML entities are escaped, and UTF-8 in the literal string is not encoded
00:24:28 <hololeap> Could not deduce (MonadFail m) arising from a do statement with the failable pattern
00:24:41 <hololeap> I've never seen this before. any ideas where it's coming from?
00:25:34 <geekosaur> you have a do with a pattern match in it, which induces a MonadFail constraint which can't be fulfilled
00:25:35 <awpr> hololeap: pattern on the LHS of an <- that doesn't cover all constructors of the type
00:25:40 <geekosaur> @where paste
00:25:40 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
00:26:18 <hololeap> awpr: huh ok, thanks
00:30:22 dajoer joins (~david@user/gvx)
00:30:53 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
00:31:08 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
00:32:44 <hololeap> are there any downsides to using :+: from GHC.Generics as opposed to Data.Functor.Compose ?
00:32:47 × neurocyte quits (~neurocyte@user/neurocyte) (Ping timeout: 252 seconds)
00:33:52 <glguy> You mean :.: ?
00:36:08 <hololeap> yeah
00:36:29 <hololeap> but I guess the same question could apply to :+: and Data.Functor.Sum
00:36:35 <glguy> If so the differences would be Compose and :.: happen to have different class instances, and you'll confuse your reader using :.: but not actually doing anything with Generic1; on the other hand an advantage of :.: is that it's poly kinded
00:36:58 <glguy> oh, nevermind, they both are
00:40:15 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Quit: WeeChat 3.1)
00:40:55 neurocyte joins (~neurocyte@195.80.55.123)
00:40:55 × neurocyte quits (~neurocyte@195.80.55.123) (Changing host)
00:40:55 neurocyte joins (~neurocyte@user/neurocyte)
00:55:43 × beka quits (~beka@104.193.170.240) (Read error: Connection reset by peer)
00:57:22 × Zianic quits (~12602@user/zianic) (Ping timeout: 250 seconds)
01:13:38 × harveypwca quits (~harveypwc@2601:246:c180:a570:2435:ba7:e573:bc26) (Quit: Leaving)
01:21:10 × xff0x quits (~xff0x@2001:1a81:531e:3c00:25c1:193a:5cc2:a16c) (Ping timeout: 260 seconds)
01:22:47 xff0x joins (~xff0x@2001:1a81:5337:500:e9c5:4ba0:f0a1:a088)
01:24:45 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:30:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
01:32:01 neurocyte1 joins (~neurocyte@94.46.86.84)
01:32:01 × neurocyte1 quits (~neurocyte@94.46.86.84) (Changing host)
01:32:01 neurocyte1 joins (~neurocyte@user/neurocyte)
01:34:34 × neurocyte quits (~neurocyte@user/neurocyte) (Ping timeout: 260 seconds)
01:34:34 neurocyte1 is now known as neurocyte
01:37:01 × unit73e quits (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Remote host closed the connection)
01:42:45 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
01:43:27 abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
01:46:14 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
01:46:27 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
01:56:40 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
01:56:55 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
02:00:31 benin03693230 joins (~benin@183.82.24.227)
02:01:21 lavaman joins (~lavaman@98.38.249.169)
02:02:28 × benin0369323 quits (~benin@183.82.24.241) (Ping timeout: 252 seconds)
02:02:29 benin03693230 is now known as benin0369323
02:05:50 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 260 seconds)
02:07:25 × martin02 quits (~silas@141.84.69.76) (Ping timeout: 252 seconds)
02:10:45 vysn joins (~vysn@user/vysn)
02:12:01 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
02:12:18 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
02:12:50 × aegon quits (~mike@174.127.249.180) (Remote host closed the connection)
02:12:50 × td_ quits (~td@94.134.91.202) (Ping timeout: 260 seconds)
02:14:18 martin02 joins (~silas@141.84.69.76)
02:14:44 td_ joins (~td@94.134.91.99)
02:20:50 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
02:20:53 allbery_b joins (~geekosaur@xmonad/geekosaur)
02:20:56 allbery_b is now known as geekosaur
02:26:09 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 265 seconds)
02:26:19 bzm3r joins (~bzm3r@d50-92-75-230.bchsia.telus.net)
02:29:06 × bzm3r quits (~bzm3r@d50-92-75-230.bchsia.telus.net) (Client Quit)
02:32:24 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
02:32:48 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
02:32:50 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
02:35:28 × alx741 quits (~alx741@186.178.109.89) (Ping timeout: 252 seconds)
02:36:04 alx741 joins (~alx741@186.178.109.89)
02:36:56 × alx741 quits (~alx741@186.178.109.89) (Client Quit)
02:37:51 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
02:38:05 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
02:43:11 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
02:43:28 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
02:48:32 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
02:48:51 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
02:55:48 benin03693230 joins (~benin@183.82.24.227)
02:59:02 × benin0369323 quits (~benin@183.82.24.227) (Ping timeout: 260 seconds)
03:01:52 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 252 seconds)
03:02:09 machinedgod joins (~machinedg@24.105.81.50)
03:03:49 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
03:03:52 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
03:04:06 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
03:09:12 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
03:09:26 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
03:19:19 × abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 252 seconds)
03:24:32 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
03:24:53 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
03:26:06 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 260 seconds)
03:26:31 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:31:24 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
03:42:45 × asivitz quits (uid178348@id-178348.tinside.irccloud.com) (Quit: Connection closed for inactivity)
03:49:17 texasmynsted parts (~texasmyns@99.96.221.112) (WeeChat 3.1)
03:51:46 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 260 seconds)
04:04:26 nicbk joins (~nicbk@user/nicbk)
04:09:52 j is now known as jess
04:21:21 <jle`> remember when we used to write (Applicative m, Monad m) => ..
04:37:50 nattiestnate joins (~nate@2001:448a:20a0:4134:25e:715f:d637:5263)
04:44:00 × beaky quits (~beaky@2a03:b0c0:0:1010::1e:a001) (Quit: WeeChat 3.2)
04:44:09 beaky joins (~beaky@2a03:b0c0:0:1010::1e:a001)
05:01:29 <iqubic> Nope!
05:01:42 <iqubic> I only started using Haskell 5 years ago.
05:02:37 <hololeap> @hoogle Monad m => (a -> m b) -> t a -> m (t b)
05:02:38 <lambdabot> Prelude mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
05:02:38 <lambdabot> Control.Monad mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
05:02:38 <lambdabot> Data.Traversable mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
05:03:10 × benin03693230 quits (~benin@183.82.24.227) (Ping timeout: 260 seconds)
05:03:23 <hololeap> is there a typeclass like Traversable but requiring Monad instead of Applicative on the `traverse` function?
05:05:42 <hololeap> also, hoogle.haskell.org is down
05:05:51 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:05:59 <hololeap> (no space left on device)
05:07:22 × mikoto-chan quits (~mikoto-ch@83.137.2.248) (Quit: mikoto-chan)
05:08:23 vk3wtf_ joins (~doc@194-193-188-29.tpgi.com.au)
05:09:12 <monochrom> @type mapM_
05:09:13 <lambdabot> (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
05:09:22 <monochrom> @type mapM
05:09:23 <lambdabot> (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
05:09:43 <monochrom> That one still requires Monad and does what traverse does.
05:10:40 × vk3wtf quits (~doc@220-245-2-190.tpgi.com.au) (Ping timeout: 240 seconds)
05:11:51 <awpr> the extra flexibility those monad-traversals would have is that they can have earlier elements' results affect later elements' inputs. I've never really come up with a sensible thing of that type that isn't just a normal Traversal
05:12:51 <awpr> I've implicitly adjusted the question to "what do you get if you put `Monad` instead of `Applicative` in the definition of `Traversal`"
05:14:10 <jle`> awpr: you can do that with StateT at least
05:14:19 <jle`> oh, i misread
05:14:53 <jle`> earlier elements' results affect the actions of later inputs, yeah, i think needs Monad
05:15:42 neo2 joins (~neo3@cpe-292712.ip.primehome.com)
05:19:44 <hololeap> monochrom: what I mean is there is no way to write `traverse` for this particular type, only `mapM` ... so it needs something different from Traversable
05:20:42 <awpr> what's the type? it must be pretty exotic to need `Monad` in its traversal-like thing
05:23:53 <hololeap> awpr: data Node f a b = Node a (HashMap Name (f b)) ; newtype MyTree f a = MyTree (Fix (Node f a))
05:24:08 <jle`> sounds like something that may not necessarily follow the Traversable laws anyway
05:24:39 <jle`> hololeap: what's the type you watn to write "traverse" for?
05:24:46 <hololeap> MyTree
05:25:10 <jle`> traverse :: (a -> m b) -> MyTree f a -> m (MyTree f b) ?
05:25:34 <jle`> any constraints on f or m?
05:25:54 <awpr> I don't immediately see why that would not support Traversable. it'd need `Traversable f`, but I don't think it'd need `Monad`
05:26:27 <hololeap> f needs to be Traversable... I haven't found a way to write it for m being Applicative, only when m is Monad
05:27:40 <jle`> ah, so it's not necesarily a theoretical thing like you *need* to have actions depend on previous reuslts ... it's that you aren't sure how to implement it ?
05:28:28 <hololeap> right
05:30:28 <hololeap> my implementation of Functor for MyTree uses hoistFix, and Foldable uses foldFix... I think Traversable would need (possibly) foldFixM which has a Monad constraint
05:30:38 <hololeap> https://hackage.haskell.org/package/data-fix-0.3.2/docs/Data-Fix.html#v:foldFixM
05:31:27 <hololeap> I tried writing: (Traversable g, Applicative m) => (forall a. f a -> m (g a)) -> Fix f -> m (Fix g)
05:31:33 <hololeap> as a new function
05:31:53 <hololeap> but I got stuck and the only way to proceed was to change "Applicatve m" to "Monad m"
05:32:47 <hololeap> so I'm starting to suspect it isn't possible to write `traverse` because of the Applicative constraint
05:33:35 × hays quits (rootvegeta@fsf/member/hays) (Quit: hays)
05:34:59 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
05:35:18 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
05:35:43 hays joins (rootvegeta@fsf/member/hays)
05:35:46 oxide joins (~lambda@user/oxide)
05:40:22 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
05:40:25 haskl[error] joins (~haskl@user/haskl)
05:40:26 × haskl quits (~haskl@user/haskl) (Ping timeout: 256 seconds)
05:40:36 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
05:43:12 <awpr> wrote one
05:44:29 <awpr> it's pretty straightforward/mechanical to write a bitraverse function for `Node`, and then with some kinda tricky recursion you can thread that through the tree to get a traverse for `MyTree`
05:44:53 <hololeap> ok, I actually have bitraverse for Node written
05:46:03 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
05:47:30 <hololeap> awpr: would you mind sharing what you wrote?
05:49:11 Cajun joins (~Cajun@user/cajun)
05:49:33 <awpr> `go (Fix node) = Fix <$> bitraverseNode f go node` is the core part of it
05:54:18 <hololeap> awpr: awesome, it works!
06:00:30 <awpr> I think you're right that that other type signature requires Monad. I haven't figured out a way to factor the recursion out of this implementation, but it seems like it should be possible
06:03:05 lavaman joins (~lavaman@98.38.249.169)
06:05:42 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
06:05:56 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
06:07:06 × zaquest quits (~notzaques@5.128.210.178) (Ping timeout: 260 seconds)
06:07:37 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
06:08:58 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
06:21:31 falafel joins (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com)
06:22:02 × xff0x quits (~xff0x@2001:1a81:5337:500:e9c5:4ba0:f0a1:a088) (Ping timeout: 260 seconds)
06:22:56 xff0x joins (~xff0x@2001:1a81:5337:500:915:acb5:b793:8885)
06:25:56 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
06:25:57 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
06:25:57 wroathe joins (~wroathe@user/wroathe)
06:27:06 × seeg quits (~thelounge@static.89.161.217.95.clients.your-server.de) (Quit: The Lounge - https://thelounge.chat)
06:27:48 seeg joins (~thelounge@static.89.161.217.95.clients.your-server.de)
06:28:06 × nicbk quits (~nicbk@user/nicbk) (Ping timeout: 276 seconds)
06:29:37 <hololeap> awpr: I think this is about as abstract as it gets: http://sprunge.us/HUBf35
06:30:10 Lycurgus joins (~juan@98.4.112.204)
06:30:21 × oxide quits (~lambda@user/oxide) (Quit: oxide)
06:30:43 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
07:01:06 <iqubic> Should I switch from Haskell to Idris?
07:03:27 <Lycurgus> y u only ax in the old black?
07:04:13 <Lycurgus> should also be in #idris, with same query
07:04:32 brandonh joins (~brandonh@151.82.94.194)
07:06:02 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
07:06:19 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
07:08:51 × tinwood quits (~tinwood@canonical/tinwood) (Remote host closed the connection)
07:10:59 zaquest joins (~notzaques@5.128.210.178)
07:11:55 tinwood joins (~tinwood@general.default.akavanagh.uk0.bigv.io)
07:11:56 × tinwood quits (~tinwood@general.default.akavanagh.uk0.bigv.io) (Changing host)
07:11:56 tinwood joins (~tinwood@canonical/tinwood)
07:13:41 × brandonh quits (~brandonh@151.82.94.194) (Quit: brandonh)
07:15:47 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
07:16:25 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
07:16:39 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
07:16:55 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 252 seconds)
07:20:42 Brumaire joins (~quassel@81-64-14-121.rev.numericable.fr)
07:25:36 acidjnk_new joins (~acidjnk@p200300d0c72030496808eef6383dbff4.dip0.t-ipconnect.de)
07:26:45 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
07:26:59 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
07:32:05 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
07:32:19 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
07:37:38 × falafel quits (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) (Ping timeout: 260 seconds)
07:40:26 × jinsun quits (~quassel@user/jinsun) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
07:40:50 jinsun joins (~quassel@user/jinsun)
07:42:25 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
07:42:38 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
07:42:38 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Client Quit)
07:42:46 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
07:42:48 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Client Quit)
07:43:04 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
07:50:44 max22- joins (~maxime@2a01cb088335980070405fe723f8a657.ipv6.abo.wanadoo.fr)
07:54:09 falafel joins (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com)
07:54:29 acidjnk_new3 joins (~acidjnk@p200300d0c72030494d60b877161c39dc.dip0.t-ipconnect.de)
07:56:26 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
07:57:08 wonko joins (~wjc@62.115.229.50)
07:57:58 falafel_ joins (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com)
07:58:10 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
07:58:19 × acidjnk_new quits (~acidjnk@p200300d0c72030496808eef6383dbff4.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
07:58:23 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
08:00:02 falafel__ joins (~falafel@cpe-76-168-195-162.socal.res.rr.com)
08:00:42 chomwitt joins (~chomwitt@ppp-94-67-221-96.home.otenet.gr)
08:01:26 × falafel quits (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) (Ping timeout: 260 seconds)
08:02:20 Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
08:03:16 × falafel_ quits (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) (Ping timeout: 252 seconds)
08:03:40 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
08:04:00 cheater joins (~Username@user/cheater)
08:06:20 hendursa1 joins (~weechat@user/hendursaga)
08:08:51 × hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds)
08:12:35 × abraham quits (~abraham@143.244.185.86) (Quit: The Lounge - https://thelounge.chat)
08:13:48 abraham joins (~abraham@143.244.185.86)
08:15:13 × falafel__ quits (~falafel@cpe-76-168-195-162.socal.res.rr.com) (Ping timeout: 252 seconds)
08:15:36 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c09c:3e60:e691:1fba) (Remote host closed the connection)
08:18:30 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
08:18:49 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
08:19:37 <jle`> iqubic: depends on what you want to do probably
08:20:05 Gurkenglas joins (~Gurkengla@dslb-002-207-014-195.002.207.pools.vodafone-ip.de)
08:26:10 × Gurkenglas quits (~Gurkengla@dslb-002-207-014-195.002.207.pools.vodafone-ip.de) (Ping timeout: 260 seconds)
08:31:13 × ephemient quits (uid407513@id-407513.lymington.irccloud.com) (Quit: Connection closed for inactivity)
08:31:20 gehmehgeh joins (~user@user/gehmehgeh)
08:33:50 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
08:34:12 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
08:34:17 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Client Quit)
08:34:40 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
08:34:42 random-jellyfish joins (~random-je@user/random-jellyfish)
08:37:34 ephemient joins (uid407513@id-407513.lymington.irccloud.com)
08:39:34 × martin02 quits (~silas@141.84.69.76) (Ping timeout: 252 seconds)
08:39:44 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
08:39:58 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
08:40:20 <Unhammer> Tried https://www.reddit.com/r/haskell/comments/plmrky/ann_vectorhashtables/ on a task I saw somewhere about doing frequency lists `awk '{for(i=1;i<=NF;i++)c[tolower($i)]++} END{for(w in c)print c[w],w}' bigtextfiles.txt`
08:40:24 <Unhammer> it's better than unordered-containers HashMap.Strict but I wonder if I'm doing something very wrong since it's quite a bit slower than awk
08:41:05 <Unhammer> Compared to unordered-containers HashMap, wall times are going from 4s→2.5s and CPU from 6.5s→3.5s (HashMap is doing more GC? Or is it because I'm using streamly) on a word list of 6200000 unique words
08:41:18 <Unhammer> while on a bigger corpus of real text it's like 34s→29s. But GNU awk uses <7s.
08:41:25 <Unhammer> https://github.com/unhammer/foo-vh-count
08:46:11 martin02 joins (~silas@141.84.69.76)
08:50:08 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
08:50:29 × hnOsmium0001 quits (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity)
08:52:28 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
08:59:06 × chomwitt quits (~chomwitt@ppp-94-67-221-96.home.otenet.gr) (Ping timeout: 265 seconds)
09:00:08 × adziahel[m] quits (~adziahelm@2001:470:69fc:105::b4d) (Quit: You have been kicked for being idle)
09:02:27 × random-jellyfish quits (~random-je@user/random-jellyfish) (Quit: Client closed)
09:03:54 kstuart joins (~kstuart@85.203.46.113)
09:05:04 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
09:05:06 TranquilEcho joins (~grom@user/tranquilecho)
09:05:26 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
09:05:37 × spruit11_ quits (~quassel@2a02:a467:ccd6:1:5542:2068:efaa:d531) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
09:05:59 spruit11 joins (~quassel@2a02:a467:ccd6:1:5542:2068:efaa:d531)
09:08:10 <ldlework> Wow I finally made it through chapter 12 of HFFP
09:08:16 <ldlework> what a slog!
09:10:13 <Rembane> \o/
09:13:45 <adamse> Unhammer: maybe gc? try running with +RTS -s to see some stats about where the time is spent
09:15:31 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
09:15:51 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
09:16:01 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c09c:3e60:e691:1fba)
09:20:27 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c09c:3e60:e691:1fba) (Ping timeout: 245 seconds)
09:20:44 × kstuart quits (~kstuart@85.203.46.113) (Quit: rcirc on GNU Emacs 28.0.50)
09:21:17 × wonko quits (~wjc@62.115.229.50) (Ping timeout: 245 seconds)
09:21:19 <jchia[m]> With a function `open :: String -> IO Connection` (https://hackage.haskell.org/package/sqlite-simple-0.4.18.0/docs/Database-SQLite-Simple.html#v:open), can I get the GHC runtime to call `close :: Connection -> IO ()` when the Connection has no more references to it, e.g. when it is is being GC'ed? This way I don't have to explicitly call close myself.
09:22:19 <Unhammer> http://sprunge.us/v3rIja adamse lots of time spent gc-ing there, yeah
09:22:28 <Unhammer> 25% productive
09:22:40 kstuart joins (~kstuart@85.203.46.113)
09:24:32 <Unhammer> I guess awk can allocate one area to put current line in and nearly never change that while my haskell thing is probably allocating for every string it reads
09:25:26 <Cale> jchia[m]: Not super-easily. It might be possible to hook up something involving ForeignPtr... if you're willing to edit the direct-sqlite3 package to use a ForeignPtr rather than a Ptr in the implementation of Database (which is reflected as Connection by this library)
09:25:50 <maerwald> GC hooks?
09:27:28 <jchia[m]> @Cale I'm not sure what to do with the FunPtr (https://hackage.haskell.org/package/base-4.15.0.0/docs/Foreign-Ptr.html#t:FunPtr). It seems rather complicated.
09:27:28 <lambdabot> Unknown command, try @list
09:27:34 cafkafk joins (~cafkafk@user/cafkafk)
09:27:46 <Cale> Which FunPtr?
09:28:17 <Cale> I'm referring to this type: https://hackage.haskell.org/package/base-4.15.0.0/docs/Foreign-ForeignPtr.html#t:ForeignPtr
09:28:46 <jchia[m]> https://hackage.haskell.org/package/base-4.15.0.0/docs/Foreign-Ptr.html#t:FunPtr https://hackage.haskell.org/package/base-4.15.0.0/docs/Foreign-Ptr.html#t:FunPtr
09:29:07 <maerwald> jchia[m]: https://github.com/composewell/streamly/blob/263da09804f3c45d40a8b17e030c1a5850d5b909/src/Streamly/Internal/Data/IOFinalizer.hs#L69
09:29:07 kuribas joins (~user@ptr-25vy0i92albk3w04mlr.18120a2.ip6.access.telenet.be)
09:29:10 <maerwald> does that help maybe?
09:29:14 <Cale> Do you mean the FunPtr to the finalizer?
09:29:35 <jchia[m]> newForeignPtr requires a FinalizerPtr, which is a type alias for FunPtr
09:29:41 <jchia[m]> Yes
09:31:06 <adamse> Unhammer: you might want to follow up with some profiling of allocations, maybe you can do lesd
09:31:08 <adamse> less
09:32:53 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
09:34:34 <Cale> It's odd that the ForeignPtr library doesn't already export something like this, but you can get a wrapper function that gets you a suitable finalizer pointer for a Haskell function like:
09:35:41 <Cale> foreign import ccall "wrapper" mkFinalizer :: (Ptr Database -> IO ()) -> IO (FunPtr (Ptr Database -> IO ()))
09:36:26 <Cale> Maybe that can't be polymorphic, I'm not sure.
09:36:39 <Cale> Actually, that's probably why?
09:36:50 <Unhammer> trying a profiling build, the code is so short I find it hard to find where I'm doing something I don't have to do https://github.com/unhammer/foo-vh-count/blob/master/src/Lib.hs#L29..L41 feeling more like I'm using the wrong libs or something
09:37:28 <Cale> Yeah.
09:38:13 <Cale> (sorry, that "Yeah" was with respect to my previous message)
09:41:02 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
09:45:55 × hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection)
09:47:18 hololeap joins (~hololeap@user/hololeap)
09:48:18 × max22- quits (~maxime@2a01cb088335980070405fe723f8a657.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
09:49:03 max22- joins (~maxime@2a01cb0883359800e9777d123123e3c6.ipv6.abo.wanadoo.fr)
09:55:52 <Unhammer> ok, so I need to try something other than streamly, 76%alloc there
09:58:27 gehmehgeh joins (~user@user/gehmehgeh)
09:59:51 chomwitt joins (~chomwitt@2a02:587:dc14:5d00:12c3:7bff:fe6d:d374)
10:04:47 lavaman joins (~lavaman@98.38.249.169)
10:05:54 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
10:06:07 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
10:09:40 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds)
10:13:03 × Brumaire quits (~quassel@81-64-14-121.rev.numericable.fr) (Ping timeout: 265 seconds)
10:13:28 <kuribas> is there a better way than runMaybeT . asum . map (MaybeT . ...) ?
10:13:50 <kuribas> foldMapA or something?
10:16:49 <kuribas> basically it runs the actions until one gives (Just a)
10:17:25 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c09c:3e60:e691:1fba)
10:19:15 <kuribas> > MaybeT (Identity $ Just 3) <|> MaybeT (Identity $ Just 4)
10:19:16 <lambdabot> error:
10:19:16 <lambdabot> • Data constructor not in scope:
10:19:16 <lambdabot> MaybeT :: Identity (Maybe a0) -> f a
10:21:33 × wolfshappen quits (~waff@irc.furworks.de) (Quit: later)
10:21:54 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c09c:3e60:e691:1fba) (Ping timeout: 260 seconds)
10:24:24 × phma quits (~phma@host-67-44-208-118.hnremote.net) (Read error: Connection reset by peer)
10:25:30 phma joins (~phma@host-67-44-208-57.hnremote.net)
10:27:33 brandonh joins (~brandonh@151.82.90.222)
10:29:46 mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
10:30:04 <hololeap> % import Control.Monad.Trans.Maybe
10:30:05 <yahb> hololeap:
10:30:29 <hololeap> % MaybeT (Identity $ Just 3) <|> MaybeT (Identity $ Just 4)
10:30:29 <yahb> hololeap: MaybeT (Identity (Just 3))
10:30:35 <hololeap> kuribas: ^
10:31:09 <kuribas> thanks :)
10:31:11 <hololeap> the Alternative instance returns the first (m (Just a))
10:31:20 <kuribas> % MaybeT (Identity $ Nothing) <|> MaybeT (Identity $ Just 4)
10:31:20 <yahb> kuribas: MaybeT (Identity (Just 4))
10:31:37 <kuribas> which is what I wanted...
10:32:16 <hololeap> % import qualified Data.Monoid as M
10:32:16 <yahb> hololeap:
10:32:22 <hololeap> % :i M.Alt
10:32:23 <yahb> hololeap: type role Alt representational nominal; type Alt :: forall {k}. (k -> *) -> k -> *; newtype Alt f a = Alt {getAlt :: f a}; -- Defined in `base-4.15.0.0:Data.Semigroup.Internal'; instance Alternative f => Alternative (Alt f) -- Defined in `base-4.15.0.0:Data.Semigroup.Internal'; instance Applicative f => Applicative (Alt f) -- Defined in `base-4.15.0.0:Data.Semigroup.Internal'; instance forall k (f ::
10:32:49 <hololeap> not a good output...
10:33:19 <hololeap> but the Alt wrapper lets you use an Alternative as a Monoid, which lets you do mconcat, for instance
10:33:52 <kuribas> right
10:36:29 <kuribas> That will be a lot of unwrapping...
10:36:35 <kuribas> I could use coerce though.
10:36:42 <kuribas> coerce $ foldMap (Alt . MaybeT . ($cmd) . getCgiCommand) cmds
10:37:05 <hololeap> you can make a newtype and derive Monoid using DerivingVia
10:37:17 <kuribas> no, it's just in one place.
10:37:48 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
10:39:08 <hololeap> even if it's in one place, thinking about how your data structures will combine using Semigroup and Monoid might save you a headache in the future
10:39:55 <hololeap> everything is monoidal, so it pops up quite a bit
10:40:34 <kuribas> I don't have a monoid for this...
10:40:43 <kuribas> You just need to give a list of commands.
10:41:00 <hololeap> is there an empty list of commands?
10:41:17 <kuribas> no, I already have 2 :)
10:41:26 <kuribas> there will be more, not less.
10:41:47 <hololeap> so minimum of 2?
10:42:10 <kuribas> yes
10:43:31 <hololeap> then Monoid probably won't be something it can get an instance of, but Semigroup is very powerful on its own. can you imagine a way that two lists of commands would combine? for instance a list that is from the command line, and a list that is the default
10:44:46 <kuribas> then I use (++) :)
10:44:48 gehmehgeh joins (~user@user/gehmehgeh)
10:46:59 <hololeap> well, a list is the definitive monoid
10:47:24 <hololeap> so there's your monoid
10:47:45 <kuribas> I prefer (++) because it may optimize better sometimes.
10:48:30 × xff0x quits (~xff0x@2001:1a81:5337:500:915:acb5:b793:8885) (Ping timeout: 260 seconds)
10:50:35 <hololeap> I think that (<>) = (++) for lists, so either way works. I'm just a big fan of monoids.
10:50:41 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
10:51:56 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
10:51:59 <hololeap> every time I start a new piece of code I work out Semigroup or Monoid instances for each type because it helps structure how the program composes
10:54:24 <kuribas> hololeap: it *is* equal to (++), but may behave different wrt rewrite rules.
10:55:14 <kuribas> foldr/buildr fusion etc...
10:55:28 <hololeap> that seems unlikely, but I really don't know. I would think that defining one function as another would get optimized easily by the compiler
10:56:06 <hololeap> so that (++) and (<>) are identical
10:58:51 <kuribas> rewrite rules don't look at meaning, they just work on literal code fragments.
10:58:56 <kuribas> It's what makes them fragile.
11:00:28 <hololeap> the semantics and denotation are both identical in the case of (++) and (<>), so I would be disappointed if there wasn't some kind of optimization that made them equivalent in production
11:00:59 alx741 joins (~alx741@186.178.109.89)
11:02:32 <kuribas> foldMap and concatMap aren't equal either
11:02:49 <kuribas> hololeap: you give to much credit to the compiler :)
11:03:03 <kuribas> ghc is pretty nice in many aspects, but it often misses the boat as well...
11:04:37 ubert joins (~Thunderbi@178.165.183.38.wireless.dyn.drei.com)
11:05:12 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
11:09:14 Pickchea joins (~private@user/pickchea)
11:10:05 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 265 seconds)
11:12:05 × AlexZenon quits (~alzenon@178.34.161.122) (Ping timeout: 260 seconds)
11:12:13 AlexNoo_ joins (~AlexNoo@178.34.151.112)
11:12:17 AlexZenon joins (~alzenon@178.34.151.112)
11:13:28 × AlexNoo quits (~AlexNoo@178.34.161.122) (Ping timeout: 252 seconds)
11:13:28 × Alex_test quits (~al_test@178.34.161.122) (Ping timeout: 265 seconds)
11:14:56 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
11:17:54 Alex_test joins (~al_test@178.34.151.112)
11:18:15 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c09c:3e60:e691:1fba)
11:18:49 × ubert quits (~Thunderbi@178.165.183.38.wireless.dyn.drei.com) (Read error: Connection reset by peer)
11:19:06 ubert joins (~Thunderbi@178.165.183.38.wireless.dyn.drei.com)
11:19:45 × brandonh quits (~brandonh@151.82.90.222) (Ping timeout: 265 seconds)
11:19:59 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
11:20:01 × kstuart quits (~kstuart@85.203.46.113) (Ping timeout: 252 seconds)
11:21:59 brandonh joins (brandonh@gateway/vpn/protonvpn/brandonh)
11:22:34 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c09c:3e60:e691:1fba) (Ping timeout: 260 seconds)
11:26:05 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
11:29:18 xff0x joins (~xff0x@2001:1a81:5337:500:915:acb5:b793:8885)
11:29:51 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
11:30:14 stiell joins (~stiell@gateway/tor-sasl/stiell)
11:30:38 <Las[m]> <kuribas> "foldMap and concatMap aren't..." <- "aren't equal" in what sense?
11:31:29 <kuribas> Las[m]: rewrite rules.
11:32:23 <Las[m]> Makes sense.
11:32:30 gehmehgeh joins (~user@user/gehmehgeh)
11:39:36 <pavonia> Those Matrix quotes are ridiculous
11:40:20 jakalx joins (~jakalx@base.jakalx.net)
11:41:13 × kuribas quits (~user@ptr-25vy0i92albk3w04mlr.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
11:42:38 × pbrisbin quits (~patrick@pool-108-16-214-93.phlapa.fios.verizon.net) (Ping timeout: 260 seconds)
11:45:19 × Pickchea quits (~private@user/pickchea) (Ping timeout: 252 seconds)
11:45:33 mestre joins (~mestre@191.177.175.57)
11:51:14 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
11:51:28 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
11:54:11 × brandonh quits (brandonh@gateway/vpn/protonvpn/brandonh) (Quit: brandonh)
11:57:53 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
12:01:40 × max22- quits (~maxime@2a01cb0883359800e9777d123123e3c6.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds)
12:01:52 pmk joins (~user@ppp-94-64-150-206.home.otenet.gr)
12:04:14 vs^ joins (~vsl@68.101.54.227)
12:06:03 gehmehgeh joins (~user@user/gehmehgeh)
12:08:38 _alexm_ joins (~alexm_@161.8.253.213)
12:13:31 × _alexm_ quits (~alexm_@161.8.253.213) (Read error: Connection reset by peer)
12:14:22 _alexm__ joins (~alexm_@161.8.253.213)
12:15:22 _alexm__ is now known as _alexm_
12:21:31 wolfshappen joins (~waff@irc.furworks.de)
12:24:36 × _alexm_ quits (~alexm_@161.8.253.213) (Remote host closed the connection)
12:27:07 × wolfshappen quits (~waff@irc.furworks.de) (Ping timeout: 252 seconds)
12:27:41 wolfshappen joins (~waff@irc.furworks.de)
12:35:11 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
12:35:16 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Client Quit)
12:36:27 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
12:38:23 Gurkenglas joins (~Gurkengla@dslb-002-207-014-195.002.207.pools.vodafone-ip.de)
12:40:54 <yushyin> pavonia: but this is no longer irc anyway, i was told, since more users here are connected via matrix supposedly
12:41:15 <pavonia> What :O
12:42:28 <pavonia> Though only a minority has the [m] nick suffix set
12:44:52 <yushyin> not a valid indicator, the suffix is not mandatory ;)
12:47:29 AlexNoo_ is now known as AlexNoo
12:48:33 acidjnk_new joins (~acidjnk@p5487d0ba.dip0.t-ipconnect.de)
12:51:28 × acidjnk_new3 quits (~acidjnk@p200300d0c72030494d60b877161c39dc.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
12:53:11 <yushyin> pavonia: you can check it with /whois, matrix sets the realname to the matrix id e.g. @user:matrix.org
12:54:00 × renzhi quits (~xp@modemcable070.17-177-173.mc.videotron.ca) (Ping timeout: 265 seconds)
12:56:25 max22- joins (~maxime@2a01cb08833598008c4acb2145aa7027.ipv6.abo.wanadoo.fr)
13:00:18 zebrag joins (~chris@user/zebrag)
13:01:00 Lycurgus joins (~juan@98.4.112.204)
13:12:27 × hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1)
13:12:53 hendursaga joins (~weechat@user/hendursaga)
13:16:34 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
13:16:50 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
13:20:27 × ByronJohnson quits (~bairyn@mail.digitalkingdom.org) (Ping timeout: 245 seconds)
13:20:33 kenran joins (~kenran@200116b82b9fab002cf9fc28ff8fabf2.dip.versatel-1u1.de)
13:26:31 × acidjnk_new quits (~acidjnk@p5487d0ba.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
13:28:43 slowButPresent joins (~slowButPr@user/slowbutpresent)
13:30:54 × zebrag quits (~chris@user/zebrag) (Ping timeout: 260 seconds)
13:31:45 zebrag joins (~chris@user/zebrag)
13:33:16 × nattiestnate quits (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) (Ping timeout: 252 seconds)
13:34:05 × max22- quits (~maxime@2a01cb08833598008c4acb2145aa7027.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
13:34:34 max22- joins (~maxime@2a01cb08833598008c4acb2145aa7027.ipv6.abo.wanadoo.fr)
13:35:27 × neurocyte quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
13:39:45 brandonh joins (brandonh@gateway/vpn/protonvpn/brandonh)
13:41:06 DNH joins (~DNH@2a02:8108:1100:16d8:412c:2d92:918c:4c0a)
13:41:40 MoC joins (~moc@user/moc)
13:44:20 × max22- quits (~maxime@2a01cb08833598008c4acb2145aa7027.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds)
13:44:45 ByronJohnson joins (~bairyn@mail.digitalkingdom.org)
13:52:52 × mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Read error: No route to host)
13:57:02 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 260 seconds)
13:58:23 max22- joins (~maxime@2a01cb0883359800283199c6bbbc014c.ipv6.abo.wanadoo.fr)
14:01:04 hyiltiz joins (~quassel@31.220.5.250)
14:01:30 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
14:02:07 mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
14:05:13 thyriaen joins (~thyriaen@dynamic-077-011-222-235.77.11.pool.telefonica.de)
14:06:11 lavaman joins (~lavaman@98.38.249.169)
14:10:34 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 260 seconds)
14:11:45 kuribas joins (~user@ptr-25vy0i92albk3w04mlr.18120a2.ip6.access.telenet.be)
14:12:19 aman joins (~aman@user/aman)
14:12:23 <kuribas> Is there a good CGI library?
14:13:29 abrantesasf joins (abrantesas@gateway/vpn/protonvpn/abrantesasf)
14:16:38 <sshine> kuribas, did you try 'cgi'?
14:16:56 <kuribas> yeah, I am trying it now.
14:17:08 <kuribas> It looks a bit old, but works...
14:17:30 <sshine> I thought that was part of the experience of CGI :P
14:17:37 <kuribas> true :)
14:17:54 <sshine> why not use wai?
14:17:57 <kuribas> what are the alternatives? fastcgi, running a webserver?
14:18:49 <kuribas> hmm, maybe I could...
14:18:54 <kuribas> but this is a stupid script.
14:19:14 <kuribas> The cgi just provides some information to rundeck, to populate the input forms.
14:19:19 <sshine> I would think that 'wai' is the smallest Haskell package that serves web and is actively relied upon by larger frameworks.
14:19:40 <dsal> Yeah, I've gone with the "run a web server" option for a decade or two
14:20:22 <sshine> I also just run a webserver. but if I were gonna run an app server, I'd still put it behind an nginx reverse proxy :)
14:20:38 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c09c:3e60:e691:1fba)
14:21:04 <kuribas> we already have a lighttpd server. We feed in cgi scripts in bash :)
14:21:08 pbrisbin joins (~patrick@2601:83:8002:d080:d2c6:37ff:fec8:a415)
14:21:42 <kuribas> but for this script, instead of using bash, I thought it might be easier to do the web handling in haskell.
14:23:58 machinedgod joins (~machinedg@24.105.81.50)
14:24:27 <kuribas> sshine: hm, wai looks a lot cleaner, I'll go with that, once I feel the motivated to rewrite...
14:25:02 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c09c:3e60:e691:1fba) (Ping timeout: 260 seconds)
14:26:02 <sshine> kuribas, ah, you serve bash scripts via CGI? that sounds... vulnerable :D
14:26:20 <kuribas> sshine: it's only for internal use
14:26:24 <sshine> kuribas, ah, okay.
14:29:12 <kuribas> is there a parser for querystrings?
14:29:24 <kuribas> like optparse-applicative, but for query strings?
14:29:53 <sshine> kuribas, https://hackage.haskell.org/package/wai-3.2.3/docs/Network-Wai.html#v:queryString ?
14:30:02 <sshine> sorry, you mean compatible with the 'cgi' package.
14:30:16 <kuribas> sshine: no, compatible with wai.
14:31:01 <sshine> ah okay. in that case. and even then, it appears to derive the query string parser from 'http-types' package.
14:31:54 <sshine> https://hackage.haskell.org/package/http-types-0.12.3/docs/Network-HTTP-Types-URI.html
14:32:43 sshine is trying out 'ghcup' on his new laptop. so far the experience is pretty great. :)
14:34:03 <kuribas> uhm, I gotto stop coding in the weekend, and do fun stuff...
14:34:09 <kuribas> Like cleaning!
14:37:55 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Ping timeout: 265 seconds)
14:38:49 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
14:41:02 harveypwca joins (~harveypwc@2601:246:c180:a570:2435:ba7:e573:bc26)
14:41:41 <kuribas> It's just, all this non-perfect code is luring me to it...
14:42:54 <kuribas> not rejecting bad unknown parameters, returning 500 when the request is wrong (instead of 404 or 400), remove stringly typed functions, ...
14:46:51 <Rembane> kuribas: So much to do, so little time.
14:46:56 <Rembane> kuribas: It sounds fun though.
14:47:48 <kuribas> How much is OCD, how much is an actual advantage?
14:49:04 <dsal> kuribas: servant?
14:49:26 <kuribas> dsal: sadly no, I need to do the cleaning myself :)
14:49:56 <kuribas> I heared cleaners are not that expensive though...
14:50:55 × aman quits (~aman@user/aman) (Quit: aman)
14:51:49 <Rembane> kuribas: Is the code you're cleaning seeing much change? Because otherwise you can probably leave it and go and play computer games instead.
14:52:19 <kuribas> Rembane: it's all fresh code, written by me.
14:52:31 <Rembane> kuribas: Even the bash stuff?
14:52:49 <kuribas> some of it, yes
14:53:01 <Rembane> Cool!
14:53:55 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
14:54:03 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
14:54:03 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
14:54:03 wroathe joins (~wroathe@user/wroathe)
14:54:17 <kuribas> I can write haskell faster than bash, but deployment is harder in haskell.
14:54:23 <kuribas> (if it is not on the same machine)
14:55:55 <kuribas> that's the reason we use bash, it's everywhere, and you don't need to worry about versions (as with python), docker images, etc...
14:56:38 <Rembane> That's very true.
14:57:19 × meinside quits (uid24933@id-24933.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
14:58:01 × haykam2 quits (~haykam@static.100.2.21.65.clients.your-server.de) (Remote host closed the connection)
14:58:03 justsomeguy joins (~justsomeg@user/justsomeguy)
14:58:15 haykam1 joins (~haykam@static.100.2.21.65.clients.your-server.de)
15:02:26 <Franciman> kuribas: an answer
15:02:31 <Franciman> perl
15:03:00 <Franciman> if you have git, you have perl
15:03:04 <Franciman> you don't have to worry about versions
15:03:14 <Franciman> it is still better than bash
15:04:31 <kuribas> nobody likes perl at our workplace...
15:04:46 Franciman takes note
15:05:06 <Franciman> I can agree, until you don't get caught in the escape hell of bash
15:05:37 <Franciman> on the other hand, the fact that simple bash is simple and complex bash programs are PURE EVIL
15:05:51 <Franciman> it can work as a "complexity cap" so you don't make your scripts too complex
15:06:06 <kuribas> Franciman: yeah, you need to use "defensive" bash.
15:06:35 <kuribas> And we probably use to many bashisms, better stick to posix, and use sed, grep, etc...
15:06:46 <Franciman> that's nice
15:06:52 <Franciman> but don't imagine it's a cup of cake, either
15:07:08 <Franciman> sometimes you want that bash thing badly
15:07:45 <Franciman> POSIX is nice, but I found it a bit restrictive sometimes, when I used to code in sh
15:08:15 <Franciman> a fun fact is that on a POSIX system you are guaranteed to have a c99 executable you can use to compile C programs
15:08:23 <Franciman> so you can use C99 on any posix system :P
15:11:59 × DNH quits (~DNH@2a02:8108:1100:16d8:412c:2d92:918c:4c0a) (Quit: Textual IRC Client: www.textualapp.com)
15:13:10 <kuribas> IMO knowing bash is elitism, like, look how much of the weird syntax I understand!
15:13:26 <kuribas> I bit like perl.
15:14:22 <Clint> pfft, if you want elitism you should learn ksh or zsh
15:14:39 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 265 seconds)
15:16:02 machinedgod joins (~machinedg@24.105.81.50)
15:18:52 × pbrisbin quits (~patrick@2601:83:8002:d080:d2c6:37ff:fec8:a415) (Ping timeout: 252 seconds)
15:19:38 <dsal> kuribas: Servant is a web framework that meets some of the requirements you were asking about. :p
15:20:06 × kenran quits (~kenran@200116b82b9fab002cf9fc28ff8fabf2.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
15:20:19 <kuribas> dsal: I know :)
15:20:45 <dsal> Ah, ok. That was pretty good
15:20:45 kenran joins (~kenran@200116b82b9fab00ce7d9e8e5214fdb7.dip.versatel-1u1.de)
15:22:57 son0p joins (~ff@181.136.122.143)
15:25:26 earthflax joins (~earthflax@202.153.44.149)
15:26:45 <earthflax> hi
15:33:43 <Las[m]> `hi
15:36:28 × hiruji quits (~hiruji@user/hiruji) (Ping timeout: 252 seconds)
15:39:26 × MoC quits (~moc@user/moc) (Quit: Konversation terminated!)
15:42:19 tommd joins (~tommd@75-164-130-101.ptld.qwest.net)
15:49:40 × sander quits (~sander@user/sander) (Quit: So long! :))
15:51:40 sander joins (~sander@user/sander)
15:51:42 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 245 seconds)
15:52:46 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 260 seconds)
15:53:28 timCF joins (~timCF@m91-129-108-244.cust.tele2.ee)
15:54:08 machinedgod joins (~machinedg@24.105.81.50)
15:54:28 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
15:56:30 <timCF> Hello! Let's say I have `newtype A1 = A1 A0` and also `newtype A2 = A2 A1`. Let's say there are instances of class `C` for both `A0` and `A1`. I want to newtype derive class `C` for `A2` with GeneralizedNewtypeDeriving. How do I specify which instance to use (`A0` or `A1`?)
15:57:47 <timCF> Basically I want to use more inner insance of `A0` in `A2` but I don't know how.
15:58:38 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 265 seconds)
15:59:23 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
16:00:06 × andreabedini[m] quits (~andreabed@2001:470:69fc:105::c821) (Quit: You have been kicked for being idle)
16:02:23 × earthflax quits (~earthflax@202.153.44.149) (Quit: earthflax)
16:02:38 earthflax joins (~earthflax@202.153.44.149)
16:07:16 justsomeguy joins (~justsomeg@user/justsomeguy)
16:12:44 × earthflax quits (~earthflax@202.153.44.149) (Quit: earthflax)
16:12:59 earthflax joins (~earthflax@202.153.44.149)
16:13:36 <dsal> I'm using postgresql-simple and doing truncates in tests. It's spewing NOTICEs all over the place. Is there a way to disable this?
16:14:01 <kuribas> timCF: GeneralizedNewtypeDeriving takes the immediate wrapped database.
16:14:40 <kuribas> timCF: if both have the same class `C`, there is no problem.
16:15:06 proofofkeags_ joins (~proofofke@205.209.28.54)
16:16:01 <timCF> kuribas: Yeah, I see. Actually in my case A1 which is intermediate newtype don't have an instance
16:16:12 <kuribas> you don't want an instance?
16:16:23 <timCF> And it actually shouldn't have it
16:16:41 <timCF> A0 already have, and A2 should derive it somehow
16:16:47 <kuribas> One way for A2 is to manually unwrap the newtypes (use coerce freely) in the instance definition.
16:17:01 × tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 252 seconds)
16:17:13 <kuribas> You could also try "deriving via A0"
16:17:18 <timCF> kuribas: good point. I can just use `coerce` to write one-line instance
16:18:05 <kuribas> Or use DerivingVia: https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/deriving_via.html
16:18:05 econo joins (uid147250@user/econo)
16:18:57 <kuribas> newtype A2 = A2 A1 deriving C via A0
16:19:13 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
16:20:36 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c09c:3e60:e691:1fba)
16:20:49 × mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Read error: Connection reset by peer)
16:21:29 <timCF> kuribas: oh, actually I can not use `coerce` to manually write instance, because A1 does not expose it (only smart constructor). But `DerivingVia` worked somehow! Magic!
16:22:23 wonko joins (~wjc@62.115.229.50)
16:22:24 <kuribas> hmm, I didn't know it could do that...
16:22:27 <kuribas> it sounds unsafe.
16:22:36 <timCF> I don't undrstand how it can work when default constructor is not exposed, but seems like it's just smarter than coece
16:22:39 <timCF> * coerce
16:22:55 <kuribas> Perhaps it just assumes you know what you are doing :)
16:23:01 <timCF> Or just unsafe :)
16:25:02 <hpc> or it's safe by some complicated reasoning
16:25:43 <kuribas> Couldn't I then derive via some datatype in a library, then pry at the implementation?
16:25:46 cheater joins (~Username@user/cheater)
16:26:24 mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
16:28:04 × earthflax quits (~earthflax@202.153.44.149) (Quit: earthflax)
16:28:35 × timCF quits (~timCF@m91-129-108-244.cust.tele2.ee) (Quit: leaving)
16:30:18 nicbk joins (~nicbk@user/nicbk)
16:35:07 <dsal> The answer to my question seems to be `set client_min_messages to warning`
16:36:01 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
16:42:59 × nicbk quits (~nicbk@user/nicbk) (Quit: nicbk)
16:47:27 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2)
16:48:56 × dajoer quits (~david@user/gvx) (Quit: leaving)
16:52:38 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
16:52:54 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
16:56:13 hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com)
16:57:59 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
16:58:12 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
17:05:23 Erutuon joins (~Erutuon@user/erutuon)
17:06:53 × sander quits (~sander@user/sander) (Quit: So long! :))
17:16:12 × kenran quits (~kenran@200116b82b9fab00ce7d9e8e5214fdb7.dip.versatel-1u1.de) (Quit: WeeChat info:version)
17:16:46 × myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 260 seconds)
17:18:47 × brandonh quits (brandonh@gateway/vpn/protonvpn/brandonh) (Ping timeout: 245 seconds)
17:24:03 brandonh joins (brandonh@gateway/vpn/protonvpn/brandonh)
17:26:57 tommd joins (~tommd@75-164-130-101.ptld.qwest.net)
17:35:26 × Vajb quits (~Vajb@n1xq4ni1adi29tefj-2.v6.elisa-mobile.fi) (Ping timeout: 260 seconds)
17:35:47 × natechan quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
17:36:06 Vajb joins (~Vajb@n5jcms613emg0qp3a-2.v6.elisa-mobile.fi)
17:37:16 sander joins (~sander@user/sander)
17:37:46 pbrisbin joins (~patrick@2601:83:8002:d080:d2c6:37ff:fec8:a415)
17:41:42 × brandonh quits (brandonh@gateway/vpn/protonvpn/brandonh) (Quit: brandonh)
17:45:42 × tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 260 seconds)
17:47:23 rhit joins (~rhit@ool-44c162d8.dyn.optonline.net)
17:47:34 tommd joins (~tommd@75-164-130-101.ptld.qwest.net)
17:51:47 brandonh joins (brandonh@gateway/vpn/protonvpn/brandonh)
17:52:13 × tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 265 seconds)
17:54:45 nattiestnate joins (~nate@2001:448a:20a0:4134:25e:715f:d637:5263)
17:55:54 Pickchea joins (~private@user/pickchea)
17:57:36 × brandonh quits (brandonh@gateway/vpn/protonvpn/brandonh) (Quit: brandonh)
18:05:32 tommd joins (~tommd@75-164-130-101.ptld.qwest.net)
18:05:47 Sgeo joins (~Sgeo@user/sgeo)
18:07:50 lavaman joins (~lavaman@98.38.249.169)
18:08:19 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
18:08:32 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
18:09:42 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
18:10:02 × tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 245 seconds)
18:10:10 <awpr> hmm, I couldn't reproduce GHC being willing to derive instances for newtypes with unexported constructors. IMO it'd be really scary if it would do that
18:10:46 <awpr> *via coercions across unexported newtype constructors
18:11:47 × kuribas quits (~user@ptr-25vy0i92albk3w04mlr.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
18:12:03 <awpr> looks like timCF left, but depending on what `C` is it could be that GHC can derive it without actually needing the coercion at all, I guess?
18:12:07 × nattiestnate quits (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) (Ping timeout: 245 seconds)
18:12:31 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds)
18:15:17 tommd joins (~tommd@75-164-130-101.ptld.qwest.net)
18:18:22 <_bin> Opinions on web frameworks? I see a few candidates like IHP, Obelisk, and Yesod, but am unsure as to how I should choose. Fairly simple web app where users can create and manage their accounts, manage alerts for certain things, and receive notifications via SMS and/or e-mail when one changes (that data will be put into a database by a separate thread.)
18:18:48 × mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 265 seconds)
18:19:23 hexology joins (~hexology@user/hexology)
18:19:49 × tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 252 seconds)
18:20:21 × ormaaj quits (~ormaaj@user/ormaaj) (Killed (gold.libera.chat (Nickname regained by services)))
18:21:04 mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
18:21:05 Guest6423 joins (~ormaaj@user/ormaaj)
18:21:25 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
18:21:29 Guest6423 is now known as ormaaj
18:21:49 × ystael quits (~ystael@user/ystael) (Ping timeout: 250 seconds)
18:22:56 × mestre quits (~mestre@191.177.175.57) (Quit: Lost terminal)
18:23:33 <sshine> _bin, if you're looking for more options, there's also WebGear: https://rkaippully.github.io/webgear/
18:23:45 × max22- quits (~maxime@2a01cb0883359800283199c6bbbc014c.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds)
18:24:57 tommd joins (~tommd@75-164-130-101.ptld.qwest.net)
18:27:51 <sshine> _bin, if you want something really simple (kinda like flask for python), try wai: https://hackage.haskell.org/package/wai -- yesod is built on this.
18:29:48 <_bin> sshine: Thanks. WebGear looks nice, though it doesn't include templating; do you have any experience as to which templating systems work better or worse with it?
18:30:33 <sshine> _bin, I haven't used WebGear, I just recall when it was announced.
18:33:12 alzgh joins (~alzgh@user/alzgh)
18:35:13 × neo2 quits (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 252 seconds)
18:40:38 <sshine> _bin, if you don't like shakespeare templates, I found this alternative that I quite like: https://hackage.haskell.org/package/heterocephalus
18:40:49 <Franciman> is there a canonical way to derive NFData instances of datatypes?
18:42:49 <awpr> Franciman: write an empty instance or turn on `DeriveAnyClass` and say `deriving NFData`
18:43:06 <_bin> sshine: Thanks, I'll look into that.
18:43:07 <awpr> the class comes with a default implementation based on `GHC.Generics`
18:44:13 <Franciman> thanks
18:44:31 __monty__ joins (~toonn@user/toonn)
18:47:08 lavaman joins (~lavaman@98.38.249.169)
18:52:45 max22- joins (~maxime@2a01cb0883359800e16e499d0efbd347.ipv6.abo.wanadoo.fr)
18:54:53 m5zs7k joins (aquares@web10.mydevil.net)
18:56:53 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
18:57:19 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
18:57:30 falafel joins (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com)
19:02:50 × mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds)
19:04:21 mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
19:06:26 × pbrisbin quits (~patrick@2601:83:8002:d080:d2c6:37ff:fec8:a415) (Ping timeout: 260 seconds)
19:11:31 × falafel quits (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) (Ping timeout: 252 seconds)
19:13:04 × tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 252 seconds)
19:13:25 × mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 265 seconds)
19:14:56 mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
19:21:20 × harveypwca quits (~harveypwc@2601:246:c180:a570:2435:ba7:e573:bc26) (Quit: Leaving)
19:23:08 myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net)
19:29:26 Codaraxis__ joins (~Codaraxis@user/codaraxis)
19:29:40 × alzgh quits (~alzgh@user/alzgh) (Ping timeout: 252 seconds)
19:31:45 alzgh joins (~alzgh@user/alzgh)
19:33:14 × Codaraxis_ quits (~Codaraxis@user/codaraxis) (Ping timeout: 265 seconds)
19:34:23 × Codaraxis__ quits (~Codaraxis@user/codaraxis) (Quit: Leaving)
19:36:41 pavonia joins (~user@user/siracusa)
19:37:37 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
19:48:22 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds)
19:50:24 burnsidesLlama joins (~burnsides@dhcp168-018.wadham.ox.ac.uk)
19:55:03 kuribas joins (~user@ptr-25vy0i92albk3w04mlr.18120a2.ip6.access.telenet.be)
19:59:56 jtomas joins (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net)
20:01:06 × ablutor quits (~quassel@145.131.24.183) (Quit: going for vitamine d)
20:02:40 <kuribas> seems merijn was right in avoiden HashMaps
20:03:39 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
20:03:52 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
20:05:42 × juhp quits (~juhp@128.106.188.220) (Ping timeout: 260 seconds)
20:06:47 juhp joins (~juhp@128.106.188.220)
20:07:54 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
20:10:31 jtomas_ joins (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net)
20:13:50 × jtomas quits (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 265 seconds)
20:14:13 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
20:15:12 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
20:16:24 × vs^ quits (~vsl@68.101.54.227) (Remote host closed the connection)
20:17:48 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c09c:3e60:e691:1fba) (Remote host closed the connection)
20:21:59 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
20:31:29 <sshine> context?
20:33:59 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
20:34:10 harveypwca joins (~harveypwc@2601:246:c180:a570:2435:ba7:e573:bc26)
20:34:22 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
20:35:29 lavaman joins (~lavaman@98.38.249.169)
20:38:52 acidjnk_new joins (~acidjnk@p200300d0c720301980aba8353aca9eb7.dip0.t-ipconnect.de)
20:40:11 <dsal> HashMaps seem like a bad idea in many use cases.
20:40:59 <clever> sshine: https://cs-syd.eu/posts/2021-09-11-json-vulnerability
20:41:51 yoctocell` joins (~user@h87-96-130-155.cust.a3fiber.se)
20:42:15 <dsal> Ah, I had that conversation a few days ago. :)
20:42:29 yoctocell` parts (~user@h87-96-130-155.cust.a3fiber.se) ()
20:43:57 <clever> i had heard of it years ago
20:44:56 <alzgh> is hashmaps in Haskell different than other languages or do you mean how they can be abused in general?
20:45:44 <clever> alzgh: the problem is more that the json parser is using an unsalted hashmap to store the key/value pairs in a json object
20:46:08 <clever> alzgh: so if i give you an object, where all of the keys collide, you loose all of the hashmap benefits, and it degrades into just a map with O(n) access
20:46:39 <clever> and if i upload a json blob with several million colliding keys, that becomes a major cpu hog
20:46:40 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
20:46:52 <clever> and a lot of haskell code, only validates the json after parsing, when its too late
20:47:07 <kuribas> clever: That's how Aeson parses.
20:47:17 <clever> kuribas: exactly
20:47:32 <kuribas> It first creates a Value (using HashMaps), then uses that parse into a curstom type.
20:48:09 <clever> so by the time the user code has any choice in the matter, the cpu cost of the attack has already hit you
20:48:20 <clever> and its too late to defend against it
20:50:09 <kuribas> The problem is that a random salt will break referential transparency when converting the hasmap to a list.
20:50:42 <kuribas> For example, I assume it will rearrange the order of keys in a printed JSON.
20:50:42 <clever> i can also see it being very difficult to even sneak a random salt into such a pure language
20:51:12 <kuribas> But I guess other languages have that problem as well.
20:51:16 <clever> in nix (another pure/functional language), all keys are converted into an int (just a global list of keys, and the index)
20:51:31 <clever> so the order of key/value pairs in a set, is dependant on the order the keys had first been used
20:51:48 <clever> to mask that artifact, nix will always sort the keys, by the key value, before exporting it to any list
20:52:05 <clever> so converting a set to a list, always gives you a stable result, all keys are sorted
20:52:22 × mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds)
20:52:30 <clever> i have only been able to violate that rule once, by using mapAttrs and trace
20:52:40 <clever> it still evaluates in a random order, and trace leaks that order
20:52:53 <clever> but the result is still pure, and you cant see it in the actual evaluation
20:53:20 <alzgh> So, in Haskell being a pure language, the hash of an input must always be the same or it breaks referential transparency?
20:53:31 <alzgh> I've just started Haskell, sorry if that's obvious.
20:53:31 _xft0 joins (~jaroslawj@185.234.208.208.r.toneticgroup.pl)
20:53:34 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c09c:3e60:e691:1fba)
20:53:42 wroathe joins (~wroathe@c-75-72-98-163.hsd1.mn.comcast.net)
20:53:43 × wroathe quits (~wroathe@c-75-72-98-163.hsd1.mn.comcast.net) (Changing host)
20:53:43 wroathe joins (~wroathe@user/wroathe)
20:53:45 <kuribas> alzgh: if it's a pure function, yes.
20:54:00 <kuribas> alzgh: btw, you want the hash to be same in another language too :)
20:54:23 <alzgh> On one run too, but not on different runs necessarily. That's what the seed is for, no?
20:54:29 <kuribas> yes
20:54:41 hexfive joins (~eric@50.35.83.177)
20:54:53 econo joins (uid147250@user/econo)
20:54:57 <clever> ive had bugs in the past, where the perl json encoder, sorts keys randomly
20:55:03 <alzgh> So, attackers can put together some data where all the hashes collide since the hashes will allways be the same.
20:55:12 <clever> so even if the json is identical, 2 given json files are not
20:55:28 <clever> i had to pass things thru `js --sort` to resolve that
20:55:44 <kuribas> yeah, so Aeson should use Map, problem solved...
20:55:58 <clever> the issue, is that the next step was using the hash of the json file, to figure out if some expensive computation had been done before or not
20:56:20 <clever> kuribas: then you just have that high cpu usage all of the time, rather then only when an attacker is exploiting you
20:56:49 <kuribas> clever: which is why it should reject unknown keys, when parsing into a known structure.
20:57:12 <clever> kuribas: yep
20:57:22 <kuribas> And don't name your keys "dufsiqopfjzempifdqfjkdmqfuimdosqfdmsqjfkmldjqsmfuiqlmsjefilmsjqfkmd"
20:57:28 <clever> but the current design, will parse all keys, into a map, then run a function to convert that map into a structure
20:57:30 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
20:57:31 <kuribas> Actually that would probably be still fine :)
20:57:50 <clever> the parser would need a re-design, to have a whitelist of keys
20:57:51 <alzgh> map gives logarithmic insertion, access, etc. time?
20:58:18 <clever> kuribas: hmmm, you could modify the FromJSON instance, to have an extra function, `isValidKey :: String -> Bool`
20:58:18 × hexfive quits (~eric@50.35.83.177) (Client Quit)
20:58:28 <clever> kuribas: the default would just be `_: True` to give the old behaviour
20:58:31 <kuribas> yeah
20:58:42 <clever> and then any malicious keys, just never hit the HashMap
20:58:55 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
20:59:00 <clever> and boom, problem solved, no need to change the salt
20:59:19 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
20:59:19 <clever> but every single parser has to now declare a list of keys they expect
20:59:46 <alzgh> that sounds reasonable to me
21:00:46 × xff0x quits (~xff0x@2001:1a81:5337:500:915:acb5:b793:8885) (Ping timeout: 260 seconds)
21:01:07 <kuribas> Could be added to the generic derivation.
21:01:31 xff0x joins (~xff0x@2001:1a81:5337:500:1487:c5ae:272e:6220)
21:03:33 <d34df00d> kuribas: > The problem is that a random salt will break referential transparency when converting the hasmap to a list.
21:03:36 <d34df00d> No it will not.
21:04:03 <kuribas> d34df00d: it will change the order, no?
21:04:18 <d34df00d> If salt is chosen on startup and stored somewhere (say even with unsafePerformIO or something), then you won't be able to observe that different invocations toList will change the ordering.
21:04:21 <kuribas> since HashMaps are "unordered".
21:04:29 <d34df00d> Because the ordering will be the same within a run.
21:04:44 <kuribas> d34df00d: until you store JSON in a file, then compare them later...
21:04:58 <kuribas> ok, textual compare of json is bad...
21:05:27 <d34df00d> To do comparisons in a file I need to do IO, and IO is not pure.
21:06:18 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
21:07:05 <kuribas> the IO isn't the problem...
21:08:34 <d34df00d> I think it could be simplified that referential transparency implies you could replace `let x = fun arg1 arg2; y = fun arg1 arg2 in ...` with `let x = fun arg1 arg2; y = x in ...`. And you surely can even if salt is random, and different runs of the program produce different results!
21:12:14 <monochrom> Pretty sure most ToJSON instances output in an order independent of any hashing.
21:13:58 <kuribas> monochrom: if they use toEncoding.
21:19:40 × burnsidesLlama quits (~burnsides@dhcp168-018.wadham.ox.ac.uk) (Ping timeout: 252 seconds)
21:22:06 Guest|77 joins (~Guest|77@host109-153-137-110.range109-153.btcentralplus.com)
21:22:58 × Guest|77 quits (~Guest|77@host109-153-137-110.range109-153.btcentralplus.com) (Client Quit)
21:24:07 justsomeguy joins (~justsomeg@user/justsomeguy)
21:25:02 × _xft0 quits (~jaroslawj@185.234.208.208.r.toneticgroup.pl) (Remote host closed the connection)
21:28:19 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 252 seconds)
21:29:22 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
21:29:35 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
21:30:04 hyiltiz joins (~quassel@31.220.5.250)
21:30:41 × Gurkenglas quits (~Gurkengla@dslb-002-207-014-195.002.207.pools.vodafone-ip.de) (Ping timeout: 265 seconds)
21:31:19 geekosaur joins (~geekosaur@xmonad/geekosaur)
21:36:45 <infinity0> i need to test a modification to the vector package; how do i make it visible in cabal? cabal seems intent on using the internal version
21:37:48 <kuribas> infinity0: you can put the link to your version in cabal.project or stack.yaml
21:38:01 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
21:38:20 <infinity0> hm i've done that. ok i'll try bumping the version number in vector.cabal too...
21:38:53 × kuribas quits (~user@ptr-25vy0i92albk3w04mlr.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
21:45:04 <infinity0> ok, that worked
21:47:43 × martin02 quits (~silas@141.84.69.76) (Ping timeout: 252 seconds)
21:49:34 AlistairB joins (~AlistairB@121-200-5-212.79c805.syd.nbn.aussiebb.net)
21:50:01 martin02 joins (~silas@141.84.69.76)
21:51:58 × max22- quits (~maxime@2a01cb0883359800e16e499d0efbd347.ipv6.abo.wanadoo.fr) (Quit: Leaving)
21:53:08 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
21:54:36 × alzgh quits (~alzgh@user/alzgh) (Quit: WeeChat 2.8)
21:58:14 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
22:02:52 <AlistairB> Hi, does anyone know how to verify the gpg signatures in https://downloads.haskell.org/~ghc/8.10.7/ ? I am trying `gpg --trusted-key 7CCFC277A14C97A7 --verify ghc-8.10.7-x86_64-deb10-linux.tar.xz.sig`
22:03:40 <AlistairB> after I have loaded this key `gpg --keyserver keyserver.ubuntu.com --recv-keys 01944ea522110b90c81f629d7ccfc277a14c97a7` - https://keyserver.ubuntu.com/pks/lookup?search=Zubin+Duggal&fingerprint=on&op=index
22:04:01 <AlistairB> but it fails with `Can't check signature: No public key`
22:04:10 × catern quits (~sbaugh@2604:2000:8fc0:b:a9c7:866a:bf36:3407) (Ping timeout: 240 seconds)
22:04:29 <AlistairB> I am guessing this is the right key as I believe Zubin is doing the releases
22:07:58 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
22:07:59 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
22:07:59 wroathe joins (~wroathe@user/wroathe)
22:10:19 × wonko quits (~wjc@62.115.229.50) (Ping timeout: 265 seconds)
22:28:32 falafel joins (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com)
22:29:51 epolanski joins (uid312403@id-312403.helmsley.irccloud.com)
22:36:08 × Cale quits (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com) (Remote host closed the connection)
22:38:05 <AlistairB> I think this is probably an issue with the new GHC releases. I will raise an issue on GHC.
22:38:35 × son0p quits (~ff@181.136.122.143) (Remote host closed the connection)
22:38:37 Cale joins (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com)
22:38:44 tlaxkit joins (~hexchat@170.253.38.52)
22:38:47 × Moyst quits (~moyst@user/moyst) (Ping timeout: 240 seconds)
22:39:16 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Read error: Connection reset by peer)
22:39:16 × hololeap quits (~hololeap@user/hololeap) (Write error: Connection reset by peer)
22:39:16 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Write error: Connection reset by peer)
22:39:16 × hendursaga quits (~weechat@user/hendursaga) (Write error: Connection reset by peer)
22:39:16 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
22:40:16 shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net)
22:41:18 Moyst joins (~moyst@user/moyst)
22:47:38 × falafel quits (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) (Ping timeout: 260 seconds)
22:48:24 Lycurgus joins (~juan@98.4.112.204)
22:49:50 [_] joins (~itchyjunk@user/itchyjunk/x-7353470)
22:52:07 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 245 seconds)
22:52:40 ub joins (~Thunderbi@178.165.201.147.wireless.dyn.drei.com)
22:52:42 sheddow joins (~sheddow@84-52-255.245.3p.ntebredband.no)
22:53:14 × ubert quits (~Thunderbi@178.165.183.38.wireless.dyn.drei.com) (Ping timeout: 260 seconds)
22:53:14 ub is now known as ubert
22:54:22 falafel joins (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com)
22:58:19 × chomwitt quits (~chomwitt@2a02:587:dc14:5d00:12c3:7bff:fe6d:d374) (Remote host closed the connection)
23:02:53 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
23:03:13 geekosaur joins (~geekosaur@xmonad/geekosaur)
23:04:30 lemonsni- joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net)
23:05:50 × acidjnk_new quits (~acidjnk@p200300d0c720301980aba8353aca9eb7.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
23:08:42 × lemonsni- quits (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Quit: ZNC 1.8.2 - https://znc.in)
23:08:47 × pmk quits (~user@ppp-94-64-150-206.home.otenet.gr) (Ping timeout: 245 seconds)
23:09:06 × falafel quits (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) (Ping timeout: 260 seconds)
23:13:46 × favonia quits (~favonia@user/favonia) (Ping timeout: 260 seconds)
23:14:01 lemonsni- joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net)
23:16:03 × jtomas_ quits (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 265 seconds)
23:19:42 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
23:19:55 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
23:22:37 × TranquilEcho quits (~grom@user/tranquilecho) (Quit: WeeChat 2.8)
23:32:44 × thyriaen quits (~thyriaen@dynamic-077-011-222-235.77.11.pool.telefonica.de) (Remote host closed the connection)
23:35:32 × Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.)
23:36:20 tommd joins (~tommd@75-164-130-101.ptld.qwest.net)
23:38:07 lavaman joins (~lavaman@98.38.249.169)
23:39:09 abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
23:40:02 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
23:40:16 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
23:42:38 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds)
23:50:10 × tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 260 seconds)
23:50:23 × amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha)
23:50:36 amitnjha joins (~amit@024-216-124-116.res.spectrum.com)
23:50:46 Pent48 joins (~Pent@pool-100-14-166-46.phlapa.fios.verizon.net)
23:51:58 tommd joins (~tommd@75-164-130-101.ptld.qwest.net)
23:53:34 × tlaxkit quits (~hexchat@170.253.38.52) (Quit: Leaving)
23:54:13 × slep quits (~slep@cpc150002-brnt4-2-0-cust437.4-2.cable.virginm.net) (Ping timeout: 252 seconds)
23:54:48 × Pent48 quits (~Pent@pool-100-14-166-46.phlapa.fios.verizon.net) (Client Quit)
23:56:36 slep joins (~slep@cpc150002-brnt4-2-0-cust437.4-2.cable.virginm.net)
23:56:49 × tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 252 seconds)

All times are in UTC on 2021-09-11.