Home liberachat/#haskell: Logs Calendar

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

00:00:49 epolanski joins (uid312403@id-312403.helmsley.irccloud.com)
00:05:14 <monochrom> d34df00d: If GHC 9.2, QuantifiedConstraints may help, but I haven't checked.
00:05:39 <d34df00d> monochrom: I'm doing this with ghc 8.10 and -XQuantifiedConstraints on. I'll try with 9.2, thanks!
00:07:33 <d34df00d> Hmm, looks like the same error.
00:08:03 <monochrom> Then it is something else I don't know of.
00:10:37 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d)
00:10:55 × superstar64 quits (~superstar@2600:1700:ed80:50a0:d250:99ff:fe2c:53c4) (Quit: Leaving)
00:18:06 SummerSonw joins (~The_viole@203.77.49.232)
00:20:47 × jackson99 quits (~bc8147f2@cerf.good1.com) (Quit: CGI:IRC (Ping timeout))
00:21:37 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
00:21:49 × waleee quits (~waleee@h-98-128-229-110.NA.cust.bahnhof.se) (Ping timeout: 240 seconds)
00:21:54 × xsperry quits (~xs@user/xsperry) (Ping timeout: 268 seconds)
00:24:21 Techcable_ is now known as Techcable
00:25:35 machinedgod joins (~machinedg@24.105.81.50)
00:25:39 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3)
00:27:02 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
00:28:34 sprout joins (~quassel@2a02:a467:ccd6:1:21ba:a382:6b6:54c4)
00:33:32 × sprout quits (~quassel@2a02:a467:ccd6:1:21ba:a382:6b6:54c4) (Ping timeout: 240 seconds)
00:33:57 DNH_ joins (~DNH@ip5f5abb04.dynamic.kabel-deutschland.de)
00:34:14 × mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 268 seconds)
00:34:16 × DNH_ quits (~DNH@ip5f5abb04.dynamic.kabel-deutschland.de) (Client Quit)
00:35:59 × DNH quits (~DNH@2a02:8108:1100:16d8:d8a9:a97b:f226:606f) (Ping timeout: 252 seconds)
00:42:09 xsperry joins (~xs@user/xsperry)
00:49:44 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds)
00:59:57 × jkaye quits (~jkaye@2601:281:8300:7530:76ff:6d0a:27ec:c880) (Ping timeout: 240 seconds)
01:00:39 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
01:04:12 sprout joins (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3)
01:05:32 × Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection)
01:05:47 Everything joins (~Everythin@128-124-10-123.mobile.vf-ua.net)
01:06:38 × doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Remote host closed the connection)
01:08:37 × sprout quits (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3) (Ping timeout: 240 seconds)
01:11:07 × ubert quits (~Thunderbi@p200300ecdf0a5d10d9ff0243dc33f2a7.dip0.t-ipconnect.de) (Remote host closed the connection)
01:11:25 ubert joins (~Thunderbi@p200300ecdf0a5d10d9ff0243dc33f2a7.dip0.t-ipconnect.de)
01:11:36 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:17:43 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:19:42 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds)
01:24:57 × taterbase quits (~user@2603-7081-6902-9100-0000-0000-0000-0006.res6.spectrum.com) (Ping timeout: 240 seconds)
01:26:10 × Jing quits (~hedgehog@2604:a840:3::103b) (Remote host closed the connection)
01:26:40 × Jonno_FTW quits (~come@api.carswap.me) (Changing host)
01:26:40 Jonno_FTW joins (~come@user/jonno-ftw/x-0835346)
01:27:00 Jing joins (~hedgehog@2604:a840:3::103b)
01:37:46 sprout joins (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3)
01:43:05 × sprout quits (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3) (Ping timeout: 252 seconds)
01:50:04 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
01:53:57 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 240 seconds)
01:59:35 × Sobhan quits (~Sobhan@modemcable039.128-131-66.mc.videotron.ca) (Ping timeout: 256 seconds)
01:59:50 lavaman joins (~lavaman@98.38.249.169)
02:01:22 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
02:01:56 <jackdk> `(Applicative f, (forall a. WrapperType f a ~ f a)) => ...`, perhaps?
02:02:15 <[itchyjunk]> Anyone saw this this?
02:02:17 <[itchyjunk]> https://www.cs.yale.edu/homes/hudak/Papers/HSoM.pdf
02:03:57 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
02:07:56 <EvanR> that's an old one
02:08:10 <EvanR> has anyone seen the software though
02:08:33 <[itchyjunk]> its from 2012 apparently
02:11:29 <EvanR> maybe I was thinking of haskell school of expression
02:12:00 <[itchyjunk]> The topics in the book looks fairly advanced.
02:12:12 <[itchyjunk]> I wonder what kind of person can handle a book like that
02:12:35 sprout joins (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3)
02:14:42 × bollu quits (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
02:14:49 Feuermagier joins (~Feuermagi@user/feuermagier)
02:17:38 × sprout quits (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3) (Ping timeout: 260 seconds)
02:18:31 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
02:23:19 <EvanR> evolution of a haskell programmer
02:27:39 ub joins (~Thunderbi@p200300ecdf0a5d0bd9ff0243dc33f2a7.dip0.t-ipconnect.de)
02:27:42 × ubert quits (~Thunderbi@p200300ecdf0a5d10d9ff0243dc33f2a7.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
02:27:42 ub is now known as ubert
02:28:36 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds)
02:31:18 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
02:31:18 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
02:31:18 wroathe joins (~wroathe@user/wroathe)
02:31:52 <d34df00d> jackdk: nope, that doesn't help, sadly, I get the same error.
02:37:43 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4)
02:39:34 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
02:39:37 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 240 seconds)
02:39:50 <jackdk> d34df00d: can you pastebin an example for me to play with?
02:42:03 mbuf joins (~Shakthi@223.178.83.73)
02:45:08 kaph joins (~kaph@net-2-47-236-216.cust.vodafonedsl.it)
02:46:47 sprout joins (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3)
02:47:33 Guest1 joins (~Guest1@2601:18c:4300:36d0:7c5f:5bfd:da1:79ca)
02:50:19 dsrt^ joins (~dsrt@64.253.22.77)
02:51:03 × Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection)
02:52:26 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
02:52:43 Feuermagier joins (~Feuermagi@user/feuermagier)
02:53:15 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
02:54:13 × sprout quits (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3) (Ping timeout: 240 seconds)
02:55:46 geekosaur joins (~geekosaur@xmonad/geekosaur)
02:55:53 sprout joins (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3)
02:57:20 × xff0x quits (~xff0x@2001:1a81:53d2:9000:941d:3a25:9fc5:6e77) (Ping timeout: 252 seconds)
02:57:49 mikoto-chan joins (~mikoto-ch@esm-84-240-99-143.netplaza.fi)
02:59:21 xff0x joins (~xff0x@2001:1a81:5214:2e00:5b16:4ef1:d67d:4f66)
03:00:31 × epolanski quits (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
03:01:01 × sprout quits (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3) (Ping timeout: 268 seconds)
03:01:02 notzmv joins (~zmv@user/notzmv)
03:03:22 × mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Ping timeout: 260 seconds)
03:03:58 mikoto-chan joins (~mikoto-ch@esm-84-240-99-143.netplaza.fi)
03:04:43 × lemonsnicks quits (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Quit: ZNC 1.8.2 - https://znc.in)
03:04:54 lavaman joins (~lavaman@98.38.249.169)
03:06:06 × Guest1 quits (~Guest1@2601:18c:4300:36d0:7c5f:5bfd:da1:79ca) (Quit: Client closed)
03:10:02 danso joins (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009)
03:11:37 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
03:16:11 lemonsnicks joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net)
03:20:07 × td_ quits (~td@muedsl-82-207-238-128.citykom.de) (Ping timeout: 268 seconds)
03:21:23 td_ joins (~td@94.134.91.10)
03:23:57 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Remote host closed the connection)
03:24:31 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
03:24:57 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
03:27:03 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
03:28:57 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
03:29:22 sprout joins (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3)
03:34:44 × sprout quits (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3) (Ping timeout: 252 seconds)
03:36:13 × TranquilEcho quits (~grom@user/tranquilecho) (Quit: WeeChat 2.8)
03:37:54 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: Replaced by new connection)
03:37:55 qrpnxz joins (~qrpnxz@user/qrpnxz)
03:38:22 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: closed)
03:38:34 qrpnxz joins (~qrpnxz@user/qrpnxz)
03:39:27 × Nahra quits (~user@static.161.95.99.88.clients.your-server.de) (Remote host closed the connection)
03:42:46 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
03:42:57 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
03:44:09 terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1)
03:47:48 × Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Remote host closed the connection)
03:48:19 × Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection)
03:49:06 slowButPresent joins (~slowButPr@user/slowbutpresent)
03:49:07 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 268 seconds)
03:54:02 × pgib quits (~textual@173.38.117.69) (Ping timeout: 268 seconds)
03:58:22 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 268 seconds)
03:59:56 × Everything quits (~Everythin@128-124-10-123.mobile.vf-ua.net) (Quit: leaving)
04:00:43 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
04:03:48 sprout joins (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3)
04:05:30 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
04:05:34 lavaman joins (~lavaman@98.38.249.169)
04:06:22 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
04:08:17 × sprout quits (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3) (Ping timeout: 240 seconds)
04:10:37 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
04:14:22 × abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Read error: Connection reset by peer)
04:16:42 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
04:17:00 Akiva joins (~Akiva@user/Akiva)
04:22:23 hornetcluster joins (~textual@2601:5c0:c280:7e20:5502:4cf:f65e:fd6b)
04:24:36 × cjb quits (~cjb@user/cjb) (Quit: rcirc on GNU Emacs 29.0.50)
04:29:52 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:30:00 abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
04:30:23 <hornetcluster> Need help: https://paste.tomsmeding.com/nQLUyCHJ
04:32:15 deadmarshal joins (~deadmarsh@95.38.230.107)
04:34:54 <Axman6> > fmap (*2) <$> [Just 1, Nothing, Just 2, Just 3]
04:34:56 <lambdabot> [Just 2,Nothing,Just 4,Just 6]
04:35:26 <Axman6> > getCompose $ (*2) <$> Compose [Just 1, Nothing, Just 2, Just 3]
04:35:28 <lambdabot> error:
04:35:28 <lambdabot> Variable not in scope: getCompose :: f0 b0 -> terror:
04:35:28 <lambdabot> • Data constructor not in scope: Compose :: [Maybe a0] -> f0 b0
04:35:36 <Axman6> % getCompose $ (*2) <$> Compose [Just 1, Nothing, Just 2, Just 3]
04:35:36 <yahb> Axman6: ; <interactive>:199:1: error: Variable not in scope: getCompose :: f0 b0 -> t; <interactive>:199:23: error:; * Data constructor not in scope: Compose :: [Maybe a0] -> f0 b0; * Perhaps you meant one of these: variable `M.compose' (imported from Data.Map), variable `IM.compose' (imported from Data.IntMap), variable `icompose' (imported from Control.Lens)
04:36:34 <Axman6> % Data.Functor.Compose.getCompose $ (*2) <$> Compose [Just 1, Nothing, Just 2, Just 3]
04:36:34 <yahb> Axman6: ; <interactive>:200:44: error:; * Data constructor not in scope: Compose :: [Maybe a0] -> Data.Functor.Compose.Compose f g a; * Perhaps you meant one of these: variable `M.compose' (imported from Data.Map), variable `IM.compose' (imported from Data.IntMap), variable `icompose' (imported from Control.Lens)
04:36:44 <Axman6> % Data.Functor.Compose.getCompose $ (*2) <$> Data.Functor.Compose.Compose [Just 1, Nothing, Just 2, Just 3]
04:36:44 <yahb> Axman6: [Just 2,Nothing,Just 4,Just 6]
04:37:02 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
04:37:25 sprout joins (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3)
04:38:25 lavaman joins (~lavaman@98.38.249.169)
04:38:44 hornetcluster Continuation from above paste, I have one more question: https://paste.tomsmeding.com/tMQse5GX
04:41:46 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
04:42:02 × sprout quits (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3) (Ping timeout: 240 seconds)
04:42:18 <Axman6> You can ask these questions in the channel by the way
04:43:05 <Axman6> what behaviour do you want? What should be the result of foldl (+) 0 [Just 1, Nothing, Just 2, Just 3] (ish) to be? Nothing? 6?
04:43:38 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
04:43:53 <hornetcluster> Just 6 is fine. 6 Ideally. I am learning Haskell, obviously.
04:44:57 <Axman6> @hoogle catMaybes
04:44:58 <lambdabot> Data.Maybe catMaybes :: [Maybe a] -> [a]
04:44:58 <lambdabot> System.Directory.Internal.Prelude catMaybes :: () => [Maybe a] -> [a]
04:44:58 <lambdabot> Data.Conduit.List catMaybes :: Monad m => ConduitT (Maybe a) a m ()
04:45:11 <Axman6> :t sum . catMaybes
04:45:12 <lambdabot> Num c => [Maybe c] -> c
04:45:25 <Axman6> > sum . catMaybes $ [Just 1, Nothing, Just 2, Just 3]
04:45:26 <lambdabot> 6
04:49:03 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
04:51:14 justsomeguy joins (~justsomeg@user/justsomeguy)
04:53:58 notzmv joins (~zmv@user/notzmv)
04:54:46 hornetcluster Thanks. However, I am looking for something that works for general monadic type -- not just Maybe types. Here's my main problem: https://paste.tomsmeding.com/IWSWK4I7
04:58:11 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
04:58:37 × yaroot quits (~yaroot@175.0.30.125.dy.iij4u.or.jp) (Ping timeout: 240 seconds)
04:58:45 × earendel quits (uid498179@user/earendel) (Quit: Connection closed for inactivity)
04:59:29 yaroot joins (~yaroot@60.149.13.160.dy.iij4u.or.jp)
05:00:29 <Axman6> Can you specify what general behaviour you want?
05:03:29 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
05:05:40 jakalx joins (~jakalx@base.jakalx.net)
05:05:42 <hornetcluster> Sorry for not being clear. This is the post I made on reddit. https://www.reddit.com/r/haskell/comments/rhxrl6/dynamic_programming_minimum_number_of_coins_to/
05:06:17 <hornetcluster> This post makes it clear on what I want to do.
05:06:44 <hornetcluster> I'm trying to use a mutable array to count minimum number of coins required to make up an amount.
05:08:00 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Remote host closed the connection)
05:08:30 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Remote host closed the connection)
05:09:22 × Flonk quits (~Flonk@vps-zap441517-1.zap-srv.com) (Quit: Ping timeout (120 seconds))
05:09:45 Flonk joins (~Flonk@vps-zap441517-1.zap-srv.com)
05:11:25 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
05:12:22 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
05:12:24 sprout joins (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3)
05:12:37 <Axman6> what does that have to do with the questions you've been asking about for lists of maybes?
05:12:56 × deadmarshal quits (~deadmarsh@95.38.230.107) (Ping timeout: 256 seconds)
05:16:16 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
05:18:48 hornetcluster Mutable array is a monadic type. So, I have to deal with [m Int] lists instead of [Int] lists while computing the minimum using `minimum . map ((+1).(readArray arr).(`mod` max).(a -)) . filter (<=a) $ cs` because `readArray arr` returns `m Int` type.
05:23:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
05:23:47 hornetcluster so it doesn't work the way I have written. hence my questions on how to deal with monadic types within a list
05:27:00 ksqsf joins (~user@134.209.106.31)
05:29:18 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
05:29:18 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
05:29:18 wroathe joins (~wroathe@user/wroathe)
05:34:33 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
05:47:51 × jespada quits (~jespada@87.74.33.157) (Ping timeout: 245 seconds)
05:50:37 jespada joins (~jespada@87.74.33.157)
05:53:21 × pfurla quits (~pfurla@2804:d41:4331:4800:11e0:2623:c59:6cb7) (Quit: gone to sleep. ZZZzzz…)
05:55:43 <mniip> hornetcluster, you can use sequence to sequence the actions
05:56:30 <mniip> which makes sense because the result of readArray may have different values depending on when it's executed
06:01:13 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
06:01:17 deadmarshal joins (~deadmarsh@95.38.230.107)
06:11:39 jonathanx joins (~jonathan@c-5eea3642-74736162.cust.telenor.se)
06:13:52 <EvanR> sequence :: Monad m => [m a] -> m [a]
06:14:27 <EvanR> (e.g.)
06:15:05 KnifeFire joins (~Knifefire@120.242.179.19)
06:17:27 <int-e> . o O ( exercise: what does `sequence` do in the list monad? )
06:17:41 <EvanR> sure go ahead and bump me down the glguy leaderboard... I know I was at 11th xD
06:17:51 <EvanR> (being bumped down is annoying)
06:19:02 <int-e> EvanR: want a commemorative screenshot? https://int-e.eu/~bf3/tmp/ER.png ;-)
06:19:26 <EvanR> through the magic of "stats", by completing the puzzle later than me, you end up doing better xD
06:19:46 <int-e> oh no, I've leaked my secret identity
06:20:02 <EvanR> sok I didn't click
06:21:24 × KnifeFire quits (~Knifefire@120.242.179.19) (Quit: WeeChat 3.0.1)
06:24:49 <int-e> (it's easy enough to guess anyway :P)
06:25:01 <g> Are you glguy?
06:25:51 <int-e> no, glguy is glguy.
06:26:06 <g> That's probably what he wants you to think!
06:26:14 × mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Quit: mikoto-chan)
06:27:02 × hornetcluster quits (~textual@2601:5c0:c280:7e20:5502:4cf:f65e:fd6b) (Quit: Textual IRC Client: www.textualapp.com)
06:27:05 <g> int-e: do you post solutions online?
06:27:12 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
06:27:40 <int-e> you don't get 20 questions :P
06:27:56 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit)
06:27:59 <g> How many do I get?
06:30:19 xerox commemorates his temporary 9 in there too
06:31:04 python476 joins (~user@88.160.31.174)
06:31:43 lavaman joins (~lavaman@98.38.249.169)
06:33:21 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:36:11 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds)
06:37:36 <EvanR> I posted all my code so far but it's steadily degrades in quality with time
06:38:33 <EvanR> I went from having it print the answer and having code all tidy to being a hodgepodge of functions that I used half used in the repl with help from a randomly behaving main
06:39:10 <EvanR> I'm not above mouse copy pasting show output into my code xD
06:39:57 <EvanR> I still don't know how the 7-segment display code works
06:41:27 <xerox> I think that was my favorite problem this year so far
06:41:30 <nshepperd2> most days i have two functions part1 input = ...; part2 input = ... which i call from the repl
06:42:00 <nshepperd2> needed to compile day 19 for speed though
06:42:52 <EvanR> I sat there for like 20 minutes waiting for day 19 answers in the repl because I forgot to compile
06:43:10 <opqdonut> my 19 was 13 secs in ghci
06:43:16 <opqdonut> 15 was the one I needed to compile
06:43:29 <opqdonut> probably because I couldn't bother to go full A*
06:43:41 <EvanR> oh yeah, no idea how that works either
06:44:00 <EvanR> A* seems pretty mystical
06:44:02 <opqdonut> (my 19 https://github.com/opqdonut/adventofcode21/blob/master/Day19.hs)
06:45:36 <EvanR> regularized vector distance, what is this magick
06:45:56 <opqdonut> it's something I made up on the spot I guess
06:46:22 <EvanR> I was wondering if there was some kinda correlation junk I never learned that would help
06:46:36 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
06:46:38 <opqdonut> it's rotation-invariant, and has a bit more "resolution" than just manhattan distance (meaning I get fewer false positives)
06:47:30 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
06:47:35 <opqdonut> squared euclidean distance might've worked just as well
06:48:42 × deadmarshal quits (~deadmarsh@95.38.230.107) (Ping timeout: 256 seconds)
06:50:17 <nshepperd2> oh interesting. i used Linear.Matrix for the rotations
06:50:49 <nshepperd2> they are all integer matrices with determinant 1
06:51:29 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Remote host closed the connection)
06:51:35 <opqdonut> I felt matrices are overkill for simple flips and permutations ... but I ended up writing it using dot products anyway
06:51:40 <EvanR> i used . to build the 24 rotations xD
06:51:50 <EvanR> rubicks cube style
06:51:52 <opqdonut> yeah that's pretty good
06:52:15 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
06:52:58 <EvanR> (Int,Int,Int) probably slowed me down
06:53:29 × ksqsf quits (~user@134.209.106.31) (Ping timeout: 268 seconds)
06:53:36 <int-e> I was quite happy with this for rotations: https://paste.debian.net/1224107/
06:53:56 <EvanR> ah
06:53:57 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds)
06:54:25 <EvanR> I appreciate their clue spoiling how to enumerate the rotations
06:54:40 <EvanR> that would have taken me a minute
06:55:48 lavaman joins (~lavaman@98.38.249.169)
06:57:10 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
06:57:24 <int-e> clue, oh they spelled out why there are 24. right.
06:57:42 <EvanR> and how to get them all
06:57:44 <int-e> but I knew that :)
06:58:07 <EvanR> I lost some time opening the octahedral symmetry group wikipedia
06:58:21 <int-e> heh
06:59:13 toastloop joins (toastloop@user/toastloop)
07:01:18 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
07:05:16 deadmarshal joins (~deadmarsh@95.38.230.107)
07:06:18 <int-e> I have a separate terminal at all times that I can use to compile-and-run in parallel with the bytecode version.
07:06:57 <int-e> because otherwise I'd have the dilemma of deciding whether the bytecode version is just about to finish
07:07:17 thevishy joins (~Nishant@2405:201:f005:c007:48b2:97f1:a252:93a6)
07:07:43 <EvanR> yeah I just did that
07:08:07 <EvanR> repl was not instant, began going for the compilable version
07:08:16 × khumba quits (~khumba@user/khumba) ()
07:08:26 <EvanR> right before that was ready repl spat out the answer xD
07:10:05 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
07:12:11 mikoto-chan joins (~mikoto-ch@nat1.panoulu.net)
07:14:17 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
07:19:40 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:22:32 ksqsf joins (~user@134.209.106.31)
07:23:17 × deadmarshal quits (~deadmarsh@95.38.230.107) (Ping timeout: 240 seconds)
07:23:55 deadmarshal joins (~deadmarsh@95.38.230.107)
07:33:08 <int-e> rotations, less scrutable: https://paste.debian.net/1224141/
07:36:58 <EvanR> computers, making the obvious incomprehensible since leibniz xD
07:40:46 <int-e> I think people did group presentations (this is closely related) before computers.
07:41:31 <EvanR> yeah
07:41:32 <int-e> though computers made those much more meaningful (because they become practically applicable to larger groups)
07:42:11 × ksqsf quits (~user@134.209.106.31) (Remote host closed the connection)
07:45:37 × python476 quits (~user@88.160.31.174) (Ping timeout: 240 seconds)
07:45:44 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
07:46:24 jakalx joins (~jakalx@base.jakalx.net)
07:48:13 × danso quits (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Ping timeout: 240 seconds)
07:51:43 coot joins (~coot@89-64-85-93.dynamic.chello.pl)
07:53:52 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
07:57:02 × kaph quits (~kaph@net-2-47-236-216.cust.vodafonedsl.it) (Ping timeout: 240 seconds)
07:58:10 lortabac joins (~lortabac@2a01:e0a:541:b8f0:5002:c5c3:7481:de0c)
08:00:26 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d) (Remote host closed the connection)
08:03:57 danso joins (~danso@d67-193-121-2.home3.cgocable.net)
08:04:28 Erutuon joins (~Erutuon@user/erutuon)
08:06:04 <mjrosenb> Interesting, I saw that there were 24, and didn't actually look beyond that.
08:06:09 × Midjak quits (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Quit: This computer has gone to sleep)
08:06:49 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
08:07:21 neurocyte0132889 joins (~neurocyte@IP-045136168122.dynamic.medianet-world.de)
08:07:21 × neurocyte0132889 quits (~neurocyte@IP-045136168122.dynamic.medianet-world.de) (Changing host)
08:07:21 neurocyte0132889 joins (~neurocyte@user/neurocyte)
08:07:27 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
08:07:46 <mjrosenb> also, that was yesterday's right? I don't remember seeing any 3d stuff for today's.
08:08:37 <EvanR> today was 2d
08:08:50 <EvanR> tomorrow is 5d
08:10:08 chexum_ joins (~quassel@gateway/tor-sasl/chexum)
08:10:18 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
08:10:19 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Quit: No Ping reply in 180 seconds.)
08:11:57 × mvk quits (~mvk@2607:fea8:5cdd:f000::917a) (Ping timeout: 240 seconds)
08:13:39 × jonathanx quits (~jonathan@c-5eea3642-74736162.cust.telenor.se) (Ping timeout: 268 seconds)
08:15:50 <nshepperd2> in exchange for the sleigh keys, the grim reaper challenges you to a game of five dimensional chess...
08:16:28 iqubic joins (~user@2601:602:9502:c70:c28f:848:f184:6c67)
08:16:34 <int-e> as long as there's no time travel
08:17:17 × deadmarshal quits (~deadmarsh@95.38.230.107) (Ping timeout: 240 seconds)
08:17:18 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
08:21:57 <EvanR> (wait, a version of chess featuring time travel (other than the mundane "undo" feature))
08:23:23 × xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer)
08:24:08 <int-e> EvanR: did you miss https://en.wikipedia.org/wiki/5D_Chess_with_Multiverse_Time_Travel (didn't play, saw a few videos, didn't really like what I saw)
08:24:58 <EvanR> I saw the ad but didn't realize there was timetravel
08:24:59 bollu joins (uid233390@id-233390.helmsley.irccloud.com)
08:25:06 <int-e> the "time travel" is going back in the game tree and spawning an alternative timeline
08:25:09 <EvanR> multiverse time travel sounds kind of lame though
08:25:10 dminuoso unpacks his TardisT
08:25:38 <int-e> but the "timelines" interact and its all weird.
08:25:46 <EvanR> at least have the board contain a closed timelike loop
08:26:12 <dminuoso> EvanR: I wonder, is that even computable for a chess board?
08:26:33 <dminuoso> Presumably you'd have to limit backwards time travel to some degree.
08:27:50 <EvanR> a sequence of moves triggers time travel... and what happens next must eventually be fulfilled like bill and ted
08:28:27 <EvanR> or maybe at some point all the piece rules are backward
08:28:56 <EvanR> maybe I should look at 5D chess
08:29:28 <int-e> EvanR: just don't blame me if it sucks :P
08:29:39 <int-e> it's still a viable meme though
08:33:21 <mjrosenb> IIRC, you only need to get checkmate in one timeline, and if you've checked in *a* timeline, then you can't delay getting out of check in that timeline.
08:34:10 <mjrosenb> anyhow, there's a function in lens that turns a traversal accessing one element into a lens, does anyone remember what it is?
08:34:21 <int-e> things get wild when pieces cross between timelines
08:34:50 <int-e> it's just weird though, not interesting, because the complexity arises from comlpex rules
08:34:53 <dminuoso> mjrosenb: unsafeSingular
08:35:09 <int-e> (in my opinion, ymmv)
08:37:33 <mjrosenb> dminuoso: danke (turns out I lied, and I just want to turn a traversal into a getter, and can use singular)
08:40:45 × burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Remote host closed the connection)
08:42:29 cfricke joins (~cfricke@user/cfricke)
08:43:24 <EvanR> if a bishop is able to change colors I'm out
08:44:17 <mjrosenb> I think it can, since the board keeps its parity over time, but the time is part of a bishop's parity?
08:44:34 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
08:44:37 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
08:45:02 <iqubic> EvanR: Yeah. Bishops can easily change color
08:47:39 ksqsf joins (~user@134.209.106.31)
08:49:52 acidjnk joins (~acidjnk@p200300d0c7271e24a8fe310273dd6d48.dip0.t-ipconnect.de)
08:51:57 <dibblego> @src find
08:51:57 deadmarshal joins (~deadmarsh@95.38.230.107)
08:51:57 <lambdabot> find p = listToMaybe . filter p
08:54:59 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Remote host closed the connection)
09:00:37 darchitect joins (~darchitec@2a00:23c6:3584:df00:7dec:bf13:8fa:748c)
09:00:40 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
09:00:48 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d)
09:01:01 × shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit)
09:03:17 max22- joins (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr)
09:04:57 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d) (Ping timeout: 240 seconds)
09:08:45 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
09:09:32 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 240 seconds)
09:10:38 geekosaur joins (~geekosaur@xmonad/geekosaur)
09:10:52 ProfSimm joins (~ProfSimm@87.227.196.109)
09:11:35 cfricke joins (~cfricke@user/cfricke)
09:11:37 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
09:11:46 × Jing quits (~hedgehog@2604:a840:3::103b) (Remote host closed the connection)
09:12:29 Jing joins (~hedgehog@2604:a840:3::103b)
09:12:51 × dsrt^ quits (~dsrt@64.253.22.77) (Ping timeout: 268 seconds)
09:13:37 gehmehgeh joins (~user@user/gehmehgeh)
09:16:17 <nshepperd2> "shall a bishop change its stripes?"
09:17:25 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
09:17:35 geekosaur joins (~geekosaur@xmonad/geekosaur)
09:19:52 mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
09:20:51 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
09:21:59 jakalx joins (~jakalx@base.jakalx.net)
09:23:24 × jle` quits (~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 256 seconds)
09:25:28 jle` joins (~jle`@cpe-23-240-75-236.socal.res.rr.com)
09:25:55 <int-e> nshepperd2: 🨃 or maybe 🩂🨭🨘?
09:27:06 <dminuoso> Is there some tool that would help me identify unused extensions?
09:28:03 <dminuoso> For me the assumption that, if the program compiles without that extension in a module, it's unused is enough - knowing this could harbor some exotic exceptions where removing an extension could alter the program
09:29:25 dsrt^ joins (~dsrt@64.253.22.77)
09:30:14 × dsrt^ quits (~dsrt@64.253.22.77) (Remote host closed the connection)
09:35:59 × mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Quit: WeeChat 2.8)
09:38:27 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
09:41:56 lavaman joins (~lavaman@98.38.249.169)
09:43:02 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
09:43:28 lavaman joins (~lavaman@98.38.249.169)
09:44:19 <int-e> It's always a bit of a surprise that ghc needs a C++ compiler to built on Linux (because of libffi)
09:45:47 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
09:49:51 × Akiva quits (~Akiva@user/Akiva) (Ping timeout: 268 seconds)
09:50:27 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
09:51:06 Akiva joins (~Akiva@user/Akiva)
09:51:10 × deadmarshal quits (~deadmarsh@95.38.230.107) (Ping timeout: 256 seconds)
09:52:56 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
09:54:07 × joo-_ quits (~joo-_@fsf/member/joo--) (Quit: leaving)
09:54:22 joo-_ joins (~joo-_@87-49-45-77-mobile.dk.customer.tdc.net)
09:54:22 × joo-_ quits (~joo-_@87-49-45-77-mobile.dk.customer.tdc.net) (Changing host)
09:54:22 joo-_ joins (~joo-_@fsf/member/joo--)
09:54:27 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
09:54:42 lavaman joins (~lavaman@98.38.249.169)
09:54:49 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
09:56:54 kupi joins (uid212005@id-212005.hampstead.irccloud.com)
09:58:15 × joo-_ quits (~joo-_@fsf/member/joo--) (Client Quit)
09:59:02 Tuplanolla joins (~Tuplanoll@91-159-68-169.elisa-laajakaista.fi)
10:01:21 deadmarshal joins (~deadmarsh@95.38.230.107)
10:06:57 <Unhammer> bah this ghcid thing also needs constant restarting
10:07:34 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 260 seconds)
10:08:12 Unhammer goes back to while sleep 1; do timeout 30 stack repl; done
10:08:24 <Hecate> Unhammer: why does it need restarting?
10:08:31 <Hecate> or rather, what change does it not pick up?
10:09:57 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
10:11:40 <Unhammer> when I save a file, nothing happens
10:11:58 <Unhammer> maybe it's that text show pretty error because I have that in my ghci but not installed …
10:12:42 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d)
10:12:58 × chexum_ quits (~quassel@gateway/tor-sasl/chexum) (Quit: No Ping reply in 180 seconds.)
10:14:19 chexum joins (~quassel@gateway/tor-sasl/chexum)
10:16:18 jakalx joins (~jakalx@base.jakalx.net)
10:16:57 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d) (Ping timeout: 240 seconds)
10:17:16 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Remote host closed the connection)
10:18:02 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
10:18:22 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
10:19:50 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
10:20:37 × Inst quits (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 240 seconds)
10:22:58 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
10:24:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
10:25:17 × danso quits (~danso@d67-193-121-2.home3.cgocable.net) (Ping timeout: 240 seconds)
10:25:20 lavaman joins (~lavaman@98.38.249.169)
10:26:00 __monty__ joins (~toonn@user/toonn)
10:26:03 zer0bitz joins (~zer0bitz@2001:2003:f444:a000:81c1:fdbc:2b2:4c4a)
10:29:42 pfurla joins (~pfurla@2804:d41:4331:4800:11e0:2623:c59:6cb7)
10:29:42 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
10:31:01 xbreu joins (~xbreu@2001:470:69fc:105::1:5061)
10:35:59 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
10:37:33 <mjrosenb> I know that ghcid is really suboptimal for me, since I get about 3 pages worth or warnings every time I save
10:39:04 danso joins (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009)
10:43:13 dsp joins (~dsp@cpc152107-haye27-2-0-cust227.17-4.cable.virginm.net)
10:43:57 × dsp quits (~dsp@cpc152107-haye27-2-0-cust227.17-4.cable.virginm.net) (Remote host closed the connection)
10:44:17 × Akiva quits (~Akiva@user/Akiva) (Ping timeout: 240 seconds)
10:45:57 × mikoto-chan quits (~mikoto-ch@nat1.panoulu.net) (Quit: mikoto-chan)
10:46:21 wroathe joins (~wroathe@user/wroathe)
10:51:31 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
10:54:23 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d)
10:54:39 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
10:57:25 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
10:58:37 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d) (Ping timeout: 240 seconds)
11:01:12 × ksqsf quits (~user@134.209.106.31) (Remote host closed the connection)
11:03:34 img joins (~img@user/img)
11:07:24 × ubert quits (~Thunderbi@p200300ecdf0a5d0bd9ff0243dc33f2a7.dip0.t-ipconnect.de) (Quit: ubert)
11:09:19 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
11:09:42 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
11:13:50 × xff0x quits (~xff0x@2001:1a81:5214:2e00:5b16:4ef1:d67d:4f66) (Ping timeout: 260 seconds)
11:14:42 xff0x joins (~xff0x@2001:1a81:5214:2e00:39f0:aaaf:c001:5cae)
11:14:52 × toastloop quits (toastloop@user/toastloop) (Quit: Leaving)
11:15:17 × ft quits (~ft@shell.chaostreff-dortmund.de) (Quit: leaving)
11:15:28 ft joins (~ft@shell.chaostreff-dortmund.de)
11:17:09 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
11:17:09 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
11:17:09 wroathe joins (~wroathe@user/wroathe)
11:19:49 dyeplexer joins (~dyeplexer@user/dyeplexer)
11:20:23 × bollu quits (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
11:22:24 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
11:26:03 × danso quits (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Ping timeout: 268 seconds)
11:26:27 Guest57 joins (~Guest57@82.47.22.49)
11:27:05 × Guest57 quits (~Guest57@82.47.22.49) (Client Quit)
11:27:36 danso joins (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009)
11:28:23 mikoto-chan joins (~mikoto-ch@esm-84-240-99-143.netplaza.fi)
11:32:10 machinedgod joins (~machinedg@24.105.81.50)
11:33:10 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
11:35:58 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d)
11:36:07 ksqsf joins (~user@134.209.106.31)
11:40:17 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d) (Ping timeout: 240 seconds)
11:41:02 × danso quits (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Ping timeout: 240 seconds)
11:41:17 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 240 seconds)
11:55:41 polezaivsani joins (~polezaivs@orangeshoelaces.net)
11:57:37 × deadmarshal quits (~deadmarsh@95.38.230.107) (Ping timeout: 240 seconds)
12:00:37 × acidjnk quits (~acidjnk@p200300d0c7271e24a8fe310273dd6d48.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
12:04:23 waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4)
12:06:00 <dminuoso> Given a string `x` and another list of strings `zs`, for which I want to find the longest string in `zs`, that happens to be a suffix of x.
12:06:54 <dminuoso> Now, I need to do this quite often, so Im thinking to build a (maybe patricia) trie from `zs`, and then do a lookup of `x` inside that trie
12:07:24 <dminuoso> Well not quite lookup, but rather a lookup of the leaf-most suffix
12:07:34 kranius joins (~kranius@222.186.245.213.rev.sfr.net)
12:07:36 <dminuoso> Is there something less convoluted Im missing?
12:08:08 <dminuoso> uh, and we can pretend this to be prefix too, that's just a matter of calling `reverse`
12:08:25 danso joins (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009)
12:08:58 <dminuoso> in reality Im dealing with lists of texts (call them labels, if you want), so the longest matching tail is what I want
12:11:43 × kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
12:13:24 × kranius quits (~kranius@222.186.245.213.rev.sfr.net) (Ping timeout: 256 seconds)
12:16:37 Inst joins (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net)
12:17:18 <Unhammer> mjrosenb yeah same here :/
12:20:02 acidjnk joins (~acidjnk@p200300d0c7271e24a1571c369919364e.dip0.t-ipconnect.de)
12:20:30 jonathanx joins (~jonathan@c-5eea3642-74736162.cust.telenor.se)
12:21:03 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:22:33 lavaman joins (~lavaman@98.38.249.169)
12:27:07 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds)
12:27:07 × jonathanx quits (~jonathan@c-5eea3642-74736162.cust.telenor.se) (Ping timeout: 268 seconds)
12:32:23 × pfurla quits (~pfurla@2804:d41:4331:4800:11e0:2623:c59:6cb7) (Quit: gone to sleep. ZZZzzz…)
12:34:35 × coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot)
12:38:15 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d)
12:38:21 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Remote host closed the connection)
12:39:40 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
12:42:17 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d) (Ping timeout: 240 seconds)
12:44:17 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
12:51:50 × wolfshappen quits (~waff@irc.furworks.de) (Quit: later)
12:55:20 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
12:56:23 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
12:57:30 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
12:58:34 shlomo joins (~shlomo@128.90.165.9)
13:00:01 × shlomo quits (~shlomo@128.90.165.9) (Quit: Leaving)
13:00:14 × benin quits (~benin@183.82.27.121) (Ping timeout: 260 seconds)
13:01:18 deadmarshal joins (~deadmarsh@95.38.230.107)
13:01:37 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
13:02:52 benin joins (~benin@183.82.27.121)
13:03:11 kranius joins (~kranius@222.186.245.213.rev.sfr.net)
13:06:08 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
13:07:50 × kranius quits (~kranius@222.186.245.213.rev.sfr.net) (Ping timeout: 252 seconds)
13:08:11 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3)
13:10:53 ph88 joins (~ph88@ip5f5af068.dynamic.kabel-deutschland.de)
13:13:47 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
13:13:47 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
13:13:47 wroathe joins (~wroathe@user/wroathe)
13:16:02 × mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Ping timeout: 240 seconds)
13:17:21 <carbolymer> Damn, Haskell is too smart for me. It tells me that something is a stupid idea right away, and it takes me two days of working around ghc errors to figure this out myself.
13:17:26 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 256 seconds)
13:18:10 <yushyin> maybe next time ask here and we might be of help
13:18:32 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
13:18:46 <carbolymer> Asking smarter folks for advice is always a good idea
13:20:09 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d)
13:22:54 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
13:24:17 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d) (Ping timeout: 240 seconds)
13:26:37 × danso quits (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Ping timeout: 240 seconds)
13:27:17 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
13:27:53 kuribas joins (~user@ptr-25vy0i760m61zg72p7f.18120a2.ip6.access.telenet.be)
13:28:31 <ksqsf> b
13:28:37 <yushyin> then you should not ask me ;)
13:28:56 <pragma-> ksqsf: that is a fine letter
13:29:40 pretty_dumm_guy joins (~trottel@eduroam-134-96-204-6.uni-saarland.de)
13:30:39 danso joins (~danso@d67-193-121-2.home3.cgocable.net)
13:32:18 jkaye joins (~jkaye@2601:281:8300:7530:6566:3224:cc66:3345)
13:32:53 × pretty_dumm_guy quits (~trottel@eduroam-134-96-204-6.uni-saarland.de) (Client Quit)
13:38:32 bollu joins (uid233390@id-233390.helmsley.irccloud.com)
13:42:57 × deadmarshal quits (~deadmarsh@95.38.230.107) (Ping timeout: 240 seconds)
13:44:56 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
13:45:40 Vajb joins (~Vajb@2001:999:62:f3d1:4390:fbed:1f9b:9d03)
13:52:23 × max22- quits (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) (Ping timeout: 252 seconds)
13:59:22 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 256 seconds)
14:05:41 wolfshappen joins (~waff@irc.furworks.de)
14:06:08 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
14:06:58 shriekingnoise joins (~shrieking@186.137.144.80)
14:07:18 deadmarshal joins (~deadmarsh@95.38.230.107)
14:17:15 ees joins (~user@pool-108-18-30-46.washdc.fios.verizon.net)
14:23:13 × kuribas quits (~user@ptr-25vy0i760m61zg72p7f.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
14:26:02 shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net)
14:28:32 <tomsmeding> dminuoso: sort the list `zs` and lookup x in that sorted list, potentially by binary search?
14:28:44 <tomsmeding> you won't find a match, but you'll end up next to the best match
14:29:15 <tomsmeding> (with lexicographical ordering and search)
14:31:16 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
14:31:16 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
14:31:16 wroathe joins (~wroathe@user/wroathe)
14:32:16 <tomsmeding> (in reversed form -- naively this does prefix searching of course)
14:32:36 kranius joins (~kranius@146.133.22.93.rev.sfr.net)
14:34:00 pfurla joins (~pfurla@2804:d41:4331:4800:11e0:2623:c59:6cb7)
14:37:37 × Inst quits (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 240 seconds)
14:44:02 × kranius quits (~kranius@146.133.22.93.rev.sfr.net) (Ping timeout: 240 seconds)
14:45:00 kranius joins (~kranius@44.149.22.93.rev.sfr.net)
14:45:55 tristanC_ is now known as tristanC
14:48:17 × deadmarshal quits (~deadmarsh@95.38.230.107) (Ping timeout: 240 seconds)
14:50:02 × SummerSonw quits (~The_viole@203.77.49.232) (Quit: Leaving)
14:50:54 doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net)
14:51:43 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
14:57:14 slaydr joins (~seriley@45.131.194.254)
14:59:12 × wolfshappen quits (~waff@irc.furworks.de) (Quit: later)
14:59:41 wolfshappen joins (~waff@irc.furworks.de)
15:02:17 × kranius quits (~kranius@44.149.22.93.rev.sfr.net) (Ping timeout: 240 seconds)
15:03:37 × wolfshappen quits (~waff@irc.furworks.de) (Ping timeout: 240 seconds)
15:04:18 wolfshappen joins (~waff@irc.furworks.de)
15:05:06 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
15:06:57 × euandreh quits (~euandreh@2804:14c:33:9fe5:995c:e86e:470c:8a37) (Ping timeout: 240 seconds)
15:09:17 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
15:10:12 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
15:11:14 zebrag joins (~chris@user/zebrag)
15:16:12 × pfurla quits (~pfurla@2804:d41:4331:4800:11e0:2623:c59:6cb7) (Quit: gone to sleep. ZZZzzz…)
15:16:32 euouae joins (~euouae@user/euouae)
15:20:13 hornetcluster joins (~textual@2601:5c0:c280:7e20:5502:4cf:f65e:fd6b)
15:21:03 × hornetcluster quits (~textual@2601:5c0:c280:7e20:5502:4cf:f65e:fd6b) (Client Quit)
15:21:33 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d)
15:21:37 × ksqsf quits (~user@134.209.106.31) (Ping timeout: 268 seconds)
15:22:36 × zopsi quits (zopsi@2600:3c00::f03c:91ff:fe14:551f) (Quit: Oops)
15:22:36 × Vajb quits (~Vajb@2001:999:62:f3d1:4390:fbed:1f9b:9d03) (Read error: Connection reset by peer)
15:23:39 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
15:25:37 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7cf1:85e9:3000:4f4d) (Ping timeout: 240 seconds)
15:26:04 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
15:27:04 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
15:27:04 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
15:27:04 wroathe joins (~wroathe@user/wroathe)
15:27:43 Sgeo joins (~Sgeo@user/sgeo)
15:28:25 pfurla joins (~pfurla@2804:d41:4331:4800:11e0:2623:c59:6cb7)
15:28:52 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
15:31:44 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
15:38:55 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
15:40:47 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
15:42:37 × EvanR quits (~evan@user/evanr) (Ping timeout: 240 seconds)
15:45:36 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
15:46:36 ksqsf joins (~user@134.209.106.31)
15:47:04 × bollu quits (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
15:48:35 coot joins (~coot@2a02:a310:e03f:8500:7248:52ac:817b:7fb4)
15:49:59 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:5002:c5c3:7481:de0c) (Quit: WeeChat 2.8)
15:50:19 mc47 joins (~mc47@xmonad/TheMC47)
15:51:14 chomwitt joins (~chomwitt@2a02:587:dc19:a500:12c3:7bff:fe6d:d374)
15:51:34 × ksqsf quits (~user@134.209.106.31) (Ping timeout: 256 seconds)
15:51:46 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
15:57:37 timCF joins (~timCF@m91-129-100-224.cust.tele2.ee)
15:57:51 × acidjnk quits (~acidjnk@p200300d0c7271e24a1571c369919364e.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
15:58:35 <timCF> Hello! Is there something similar to ~ function constraint, but for type parametrer non-equality?
15:58:45 <Arsen> can Data.Yaml (from yaml) load an object like {"a": "b", "c": "d"} into a simple hashmap?
15:58:52 <Arsen> I am simply storing key-value pairs
15:59:55 deadmarshal joins (~deadmarsh@95.38.230.107)
16:00:07 <geekosaur> timCF, no. equality can be done directly in the typechecker, but non-equality requires a type witness
16:00:12 × the-coot[m] quits (~the-cootm@2001:470:69fc:105::95f) (Quit: You have been kicked for being idle)
16:02:15 <timCF> geekosaur: thanks!
16:03:04 ksqsf joins (~user@134.209.106.31)
16:06:32 × deadmarshal quits (~deadmarsh@95.38.230.107) (Ping timeout: 240 seconds)
16:06:40 ProfSimm joins (~ProfSimm@87.227.196.109)
16:07:44 euandreh joins (~euandreh@2804:14c:33:9fe5:b7fd:fa95:80d6:f41)
16:08:26 mikoto-chan joins (~mikoto-ch@esm-84-240-99-143.netplaza.fi)
16:10:37 × jkaye quits (~jkaye@2601:281:8300:7530:6566:3224:cc66:3345) (Ping timeout: 240 seconds)
16:11:56 neverfindme joins (~hayden@158.123.160.43)
16:12:29 × timCF quits (~timCF@m91-129-100-224.cust.tele2.ee) (Quit: leaving)
16:15:34 max22- joins (~maxime@2a01cb0883359800306516e9c6b993f0.ipv6.abo.wanadoo.fr)
16:17:42 × coot quits (~coot@2a02:a310:e03f:8500:7248:52ac:817b:7fb4) (Quit: coot)
16:21:34 × zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
16:22:32 × neverfindme quits (~hayden@158.123.160.43) (Remote host closed the connection)
16:22:49 neverfindme joins (~hayden@158.123.160.43)
16:24:37 lavaman joins (~lavaman@98.38.249.169)
16:26:10 deadmarshal joins (~deadmarsh@95.38.230.107)
16:26:15 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
16:26:40 × neverfindme quits (~hayden@158.123.160.43) (Client Quit)
16:28:45 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
16:28:57 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
16:29:11 kupi joins (uid212005@id-212005.hampstead.irccloud.com)
16:30:17 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
16:30:26 geekosaur joins (~geekosaur@xmonad/geekosaur)
16:31:34 earendel joins (uid498179@user/earendel)
16:34:15 jakalx parts (~jakalx@base.jakalx.net) ()
16:34:41 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4)
16:35:12 × deadmarshal quits (~deadmarsh@95.38.230.107) (Ping timeout: 256 seconds)
16:35:17 jakalx joins (~jakalx@base.jakalx.net)
16:37:45 kaph joins (~kaph@net-2-47-236-216.cust.vodafonedsl.it)
16:39:34 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
16:39:57 × doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
16:40:11 × awpr quits (uid446117@id-446117.lymington.irccloud.com) (Quit: Connection closed for inactivity)
16:42:52 zincy joins (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807)
16:43:34 earendel is now known as disfrutar-conchi
16:43:42 emf joins (~emf@2603-6080-9403-11bf-1471-5d14-4db5-bab4.res6.spectrum.com)
16:47:44 <monochrom> Very late to the 5D Chess with multiverse time travel conversation, but consider Tenet Chess, too. >:)
16:47:57 × emf quits (~emf@2603-6080-9403-11bf-1471-5d14-4db5-bab4.res6.spectrum.com) (Ping timeout: 240 seconds)
16:48:33 emf_ joins (~emf@2620:10d:c091:480::1:4a0)
16:48:33 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
16:48:52 <Hecate> monochrom: NO
16:48:54 <Hecate> :<
16:48:58 <Hecate> it hurts my brain :(
16:50:20 <janus> does it make sense to have 'seq x x' ? hlint has a warning about it
16:50:27 <monochrom> It doesn't.
16:51:13 × zincy quits (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807) (Remote host closed the connection)
16:51:24 <janus> is it because the x would be exactly evaluated when the seq is reached, and that is also the case when the seq is there?
16:51:25 <monochrom> "Yo dawg I heard you like forcing so I force x while you force x."
16:51:49 <monochrom> Yeah, it's redundant, repetitive, idempotent.
16:52:56 <monochrom> See also my http://www.vex.net/~trebla/humour/tautologies.html #6 :)
16:57:27 <c_wraith> janus: seq isn't magic. laziness still applies. It ties the evaluation of two values together, but that only does anything when it's actually demanded
16:58:52 zincy joins (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807)
16:59:23 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 252 seconds)
16:59:56 <janus> right. i guess my confusion is of how it is often explained with 'evaluation' but i like the explanation on the haskell wiki more, which also talks about data dependency
17:00:38 <janus> it even mentions this exact example https://wiki.haskell.org/Seq
17:01:13 Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net)
17:04:29 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
17:04:46 zaquest joins (~notzaques@5.130.79.72)
17:05:44 × thevishy quits (~Nishant@2405:201:f005:c007:48b2:97f1:a252:93a6) (Quit: Leaving)
17:07:27 slowButPresent joins (~slowButPr@user/slowbutpresent)
17:07:49 <c_wraith> most notably, "seq x y" is mostly useful when x is some substructure of y that isn't evaluated when y is, but you want it to be.
17:10:44 <c_wraith> for instance, there's an idiom "iterate f x !! n" for applying the function f to the value x, n times. But it works really suboptimally when n is large.
17:12:29 <c_wraith> because (!!) forces evaluation of the (:) constructors in the list resulting from iterate, but nothing else. This means you get a huge nested series of applications of f in memory, each one as a thunk taking up memory in a manner that's useless for any strict function f
17:14:50 <c_wraith> more recent version of base have added a new function, iterate', which resolves this issue for strict f. it uses seq to tie together evaluation of the (:) constructor with its first argument.
17:15:35 <c_wraith> This means that when you just traverse the spine of the list with (!!), it's still evaluating the values stored in the list along the way, preventing a buildup of thunks
17:15:43 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
17:17:24 epolanski joins (uid312403@id-312403.helmsley.irccloud.com)
17:18:36 burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk)
17:18:37 <c_wraith> Do note that this isn't the complete story, though. There are a lot of ways you could write the value for f such that it will always leak space. And if f makes use of productive laziness, neither iterate nor iterate' is a good way to apply it repeatedly.
17:19:36 × mbuf quits (~Shakthi@223.178.83.73) (Quit: Leaving)
17:20:27 img joins (~img@user/img)
17:23:24 <euouae> I don't understand why `iterate f x !! n` is bad for large n
17:24:29 jkaye joins (~jkaye@2601:281:8300:7530:bdb2:1444:46f4:adc7)
17:24:39 <euouae> when the final cons cell is reached, it's a big series of thunks, each one application of f? is that why? As opposed to evaluating f and then caching the result when iterating the list?
17:24:58 deadmarshal joins (~deadmarsh@95.38.230.107)
17:25:54 <c_wraith> yep. "iterate f x !! n" is always going to generate n nested applications of f before any of them is evaluated
17:25:56 <geekosaur> right, rather than caching it just points to the previous thunk
17:29:16 <euouae> okay, thanks
17:29:32 <c_wraith> if n is small or f doesn't close over anything, that might not be a big deal
17:30:41 <c_wraith> Hmm. f is shared. if it's a huge closure that's only constant extra space, I suppose. So really, it's just the size of n that matters.
17:32:34 × zincy quits (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807) (Remote host closed the connection)
17:32:36 <c_wraith> But it's notable that large chains of thunks can have surprising performance impacts. They can cause drag in the garbage collector which actually makes program performance asymptotically worse in certain cases.
17:32:54 zincy joins (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807)
17:33:22 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection)
17:34:01 × pfurla quits (~pfurla@2804:d41:4331:4800:11e0:2623:c59:6cb7) (Quit: gone to sleep. ZZZzzz…)
17:34:11 × qrpnxz quits (~qrpnxz@user/qrpnxz) (Quit: Gateway shutdown)
17:37:39 × zincy quits (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807) (Remote host closed the connection)
17:41:19 × max22- quits (~maxime@2a01cb0883359800306516e9c6b993f0.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
17:42:13 max22- joins (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr)
17:45:48 jakalx parts (~jakalx@base.jakalx.net) ()
17:46:38 mvk joins (~mvk@2607:fea8:5cdd:f000::917a)
17:47:57 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
17:47:57 jakalx joins (~jakalx@base.jakalx.net)
17:51:32 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Quit: Leaving)
17:52:37 geekosaur joins (~geekosaur@xmonad/geekosaur)
17:55:57 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 240 seconds)
17:56:13 <dminuoso> tomsmeding: Yeah I thought about it as well
17:56:31 <dminuoso> tomsmeding: I think Ill just go with a simple nested map as a non-patricia trie
17:56:39 <dminuoso> the implementation is very straight forward
17:57:12 <dminuoso> https://gist.github.com/dminuoso/41d18409f95b98963df7bdff681ecdbd
17:57:33 <dminuoso> Construction is somewhat inefficient, but that's acceptable to me.
17:58:24 <euouae> add some comments :P
17:58:58 <dminuoso> With `newtype DomTable = DomTable (M.Map T.Text DomTable) deriving Show`
17:59:00 <dminuoso> Of course
17:59:18 <tomsmeding> oh right, just a nested tree of Maps
17:59:53 <dminuoso> Thing though is, Id really like this to be a patricia trie
18:00:23 tomsmeding doesn't know how patricia trees work
18:00:36 <dminuoso> It's simply a trie in which single branches get coalesced/merged
18:00:46 <tomsmeding> ah
18:01:05 <tomsmeding> does that happen lots of times in your case?
18:01:06 <dminuoso> i.e. when storing a string, you dont store characters separately, so when you have `foo` and `fob`, the root would start with `fo`
18:03:23 econo joins (uid147250@user/econo)
18:03:53 × Morrow quits (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Remote host closed the connection)
18:04:10 <tomsmeding> https://hackage.haskell.org/package/list-tries exists, but not sure if you want a dependency for this
18:04:35 <dminuoso> I dont think a generic trie implementation can realistically work
18:04:39 <tomsmeding> probably best to go with the nested maps tree unless it becomes a performance liability
18:04:42 <dminuoso> yeah
18:04:52 <dminuoso> I mean this is not really out of performance concerns
18:04:58 <dminuoso> This is just CS golfing, if you want.
18:05:06 <tomsmeding> I like that term
18:05:14 Morrow joins (~quassel@bzq-110-168-31-106.red.bezeqint.net)
18:05:35 <tomsmeding> though I still kind of like my original idea
18:05:59 <dminuoso> It's still linear in lookup though
18:06:12 <dminuoso> And realistically, the data will not be nicely averaged
18:07:04 <tomsmeding> what if you take newtype DomTable = DomTable (Set [T.Text]), and for lookup, use Set.lookupLE to get the longest matching prefix
18:07:09 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:07:16 <tomsmeding> I think that should work
18:07:21 <tomsmeding> there's a lot of duplication in the keys though
18:07:34 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
18:07:34 <dminuoso> Uh how would that even work?
18:07:59 <dminuoso> It certainly wouldnt work with the regular Ord instance
18:08:03 <dminuoso> Note:
18:08:06 <tomsmeding> table = DomTable (Set.fromList [["com", "google", "maps"], ["com", "tomsmeding", "paste"]])
18:08:21 <dminuoso> Find largest key _smaller or equal_ to the given one
18:08:29 <tomsmeding> yeah, lexicographically
18:08:44 <tomsmeding> if it finds an equal key, then that's obviously the longest prefix
18:09:07 <tomsmeding> it there isn't an equal key, then the longest matching prefix is certainly going to be <= your lookup domain
18:09:26 <dminuoso> Im genuinely curious now
18:09:27 <tomsmeding> and if there is another item in the set in between, then that can only be a longer prefix -- contradiction
18:09:50 Midjak joins (~Midjak@may53-1-78-226-116-92.fbx.proxad.net)
18:09:56 tomsmeding might be rambling
18:10:08 <dminuoso> % sort $ [["foo", "bar", "quux", "baz"], ["google", "maps"], ["com", "tomsmeding", "paste"]]
18:10:08 <yahb> dminuoso: [["com","tomsmeding","paste"],["foo","bar","quux","baz"],["google","maps"]]
18:10:19 <disfrutar-conchi> maybe some levensthein derivatation could help
18:10:39 <tomsmeding> % sort $ [["foo", "bar", "quux", "baz"], ["google", "maps"], ["com", "tomsmeding", "paste"], ["google", "images"]]
18:10:39 <yahb> tomsmeding: [["com","tomsmeding","paste"],["foo","bar","quux","baz"],["google","images"],["google","maps"]]
18:10:41 Akiva joins (~Akiva@user/Akiva)
18:10:53 <dminuoso> tomsmeding: How would `["www", "google", "maps"]` ever be smaller or equal than only ["google", "maps"] here?
18:11:09 <tomsmeding> I'm talking about _prefix_ matching here
18:11:18 <tomsmeding> if you want suffix matching, you'll have to reverse everything :p
18:11:35 <dminuoso> tomsmeding: Sure, lets just pretend we're on the same level with prefix/suffix here.
18:11:43 <disfrutar-conchi> string matching.
18:11:49 <dminuoso> oh hold on.
18:11:51 <dminuoso> mmm
18:12:17 <dminuoso> % s = Data.Set.fromList = [["foo", "bar", "quux", "baz"], ["google", "maps"], ["com", "tomsmeding", "paste"], ["google", "images"]]
18:12:17 <yahb> dminuoso: ; <interactive>:205:23: error: parse error on input `='
18:12:22 <dminuoso> % s = Data.Set.fromList [["foo", "bar", "quux", "baz"], ["google", "maps"], ["com", "tomsmeding", "paste"], ["google", "images"]]
18:12:22 <yahb> dminuoso:
18:12:30 <tomsmeding> % S.lookupLE ["com", "google", "images"] (S.fromList [["com", "google", "docs"], ["com", "google", "maps"]])
18:12:30 <yahb> tomsmeding: Just ["com","google","docs"]
18:12:41 <tomsmeding> oh I'm dumb
18:12:44 <dminuoso> Yeah that looks borked.
18:12:53 <tomsmeding> % S.lookupLE ["com", "google", "images"] (S.fromList [["com", "google", "docs"], ["com", "google", "maps"], ["com"]])
18:12:54 <yahb> tomsmeding: Just ["com","google","docs"]
18:12:58 <tomsmeding> here you want the ["com"]
18:13:06 <dminuoso> But that's the thing
18:13:07 × YoungFrog quits (~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be) (Quit: ZNC 1.7.x-git-3-96481995 - https://znc.in)
18:13:17 <dminuoso> % S.lookupLE ["foo"] (S.fromList [["com", "google", "docs"], ["com", "google", "maps"], ["com"]])
18:13:17 <yahb> dminuoso: Just ["com","google","maps"]
18:13:25 <dminuoso> No this will not work for what I do
18:13:28 <tomsmeding> my idea only works if there are no two items in the set that are prefixes of each other lol
18:13:31 <tomsmeding> which is not helpful for you
18:13:33 <dminuoso> Yeah
18:13:53 <dminuoso> And it assumes that the queried domain has some matching suffix in there
18:13:59 <tomsmeding> the idea was the whole time that you should double-check if the result of lookupLE is indeed a prefix
18:14:01 <dminuoso> If it doesnt, it gives junk back
18:14:04 <tomsmeding> yeah
18:14:21 <dminuoso> I think I might do
18:14:35 <tomsmeding> but can your map-tree distinguish between [["com", "google"]] and [["com", "google"], ["com"]] ?
18:14:37 YoungFrog joins (~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be)
18:14:51 <dminuoso> My original one?
18:14:54 <tomsmeding> yeah
18:14:59 <tomsmeding> https://gist.github.com/dminuoso/41d18409f95b98963df7bdff681ecdbd
18:15:00 <dminuoso> Yes
18:15:06 <dminuoso> Try it out
18:15:24 <dminuoso> tomsmeding: basically *because* its a trie.
18:15:31 <dminuoso> tomsmeding: the former gets turned into the latter, so to speak
18:15:52 <dminuoso> let chain = foldr (\x t -> DomTable (M.singleton x t)) (DomTable M.empty) xs in DomTable (M.insert x chain table)
18:16:33 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
18:16:37 <tomsmeding> 19:15 <dminuoso> tomsmeding: the former gets turned into the latter, so to speak
18:16:43 <tomsmeding> okay so it _can't_ distinguish? :p
18:17:13 <dminuoso> Oh sorry, no it cant
18:17:18 <dminuoso> I see your point.
18:17:26 <dminuoso> And that's actually a valid one.
18:17:28 <dminuoso> Mmm.
18:17:37 <euouae> and finally the peano encoding was useful for something
18:17:47 <tomsmeding> in an actual Trie, there's a boolean tag on each node indicating whether this prefix is actually in the trie
18:17:59 <tomsmeding> euouae: peano encoding?
18:18:01 <dminuoso> dont degrade my trie now :(
18:18:06 <tomsmeding> lol
18:18:10 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
18:18:18 <euouae> tomsmeding in set theory the successor of a set n is {n, {n}}
18:18:44 <euouae> I wouldn't say this is exactly the situation here but it looks like [[x], [x,y]]. Maybe just ignore me :P
18:18:47 <dminuoso> tomsmeding: I guess in most tries you dont because you only care about finding leafs.
18:19:02 <dminuoso> and then it doesnt matter
18:19:07 <tomsmeding> euouae: but then the next step, here, would be [[x], [x,y], [x,y,z]] ;)
18:19:29 <tomsmeding> dminuoso: do you? I learned a trie as a data structure for a set of strings, I think
18:19:54 <tomsmeding> in which case, if you want to represent {"fo", "foo"}, you'll need to have a False tag on the f node and True tags on both o nodes
18:20:19 <monochrom> I though {n, {n}} was von Neumann's.
18:20:39 <tomsmeding> dminuoso: longestSuffix (Domain ["com", "tomsmeding"]) (insert (Domain ["com", "google"]) (insert (Domain ["com"]) emptyDomTable)) == Nothing
18:20:41 <tomsmeding> is that expected?
18:20:47 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
18:20:54 <tomsmeding> or is this precisely the thing we're taling about
18:21:00 <euouae> monochrom oh yeah, thanks, I was trying to look up the actual name of the person who thought of it,
18:21:40 <euouae> monochrom now my statement is even sillier "One of von Neumann's creations was _finally_ useful..."
18:22:24 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
18:22:56 neurocyte0132889 joins (~neurocyte@IP-045136168122.dynamic.medianet-world.de)
18:22:56 × neurocyte0132889 quits (~neurocyte@IP-045136168122.dynamic.medianet-world.de) (Changing host)
18:22:56 neurocyte0132889 joins (~neurocyte@user/neurocyte)
18:25:06 <tomsmeding> dminuoso: oh I mixed up prefix and suffix again
18:26:54 × tcard quits (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Remote host closed the connection)
18:27:08 tcard joins (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp)
18:27:38 <c_wraith> that's not complicated enough. let's say invent infix tries!
18:28:22 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:28:37 × emf_ quits (~emf@2620:10d:c091:480::1:4a0) (Ping timeout: 240 seconds)
18:29:06 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 256 seconds)
18:29:09 emf joins (~emf@2620:10d:c091:480::1:4a0)
18:29:26 <tomsmeding> dminuoso: https://paste.tomsmeding.com/8x6WH4dX I _think_ this implements the boolean tags I mentioned
18:29:29 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
18:29:49 <tomsmeding> the <|> ensures that if the search fails later, then we still return this prefix (in go) that did match
18:30:01 <tomsmeding> but only if the tag is True, which is when this prefix is indeed in the tree
18:30:16 kranius joins (~kranius@162.19.149.77.rev.sfr.net)
18:31:56 python476 joins (~user@88.160.31.174)
18:32:06 × benin quits (~benin@183.82.27.121) (Quit: The Lounge - https://thelounge.chat)
18:32:17 × deadmarshal quits (~deadmarsh@95.38.230.107) (Ping timeout: 240 seconds)
18:32:29 xkuru joins (~xkuru@user/xkuru)
18:33:30 <tomsmeding> (if you wish my contribution to the code is public domain :p )
18:34:02 <tomsmeding> (but you probably want to rewrite it in a neater way anyway, heh)
18:36:50 neurocyte0132889 joins (~neurocyte@IP-045136168122.dynamic.medianet-world.de)
18:36:50 × neurocyte0132889 quits (~neurocyte@IP-045136168122.dynamic.medianet-world.de) (Changing host)
18:36:50 neurocyte0132889 joins (~neurocyte@user/neurocyte)
18:38:44 × kranius quits (~kranius@162.19.149.77.rev.sfr.net) (Ping timeout: 256 seconds)
18:38:50 × kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
18:39:37 × emf quits (~emf@2620:10d:c091:480::1:4a0) (Ping timeout: 240 seconds)
18:44:11 deadmarshal joins (~deadmarsh@95.38.230.107)
18:45:40 EvanR joins (~EvanR@user/evanr)
18:52:19 doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net)
19:00:47 × EvanR quits (~EvanR@user/evanr) (Quit: Leaving)
19:00:55 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:00:56 × waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 252 seconds)
19:01:21 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
19:01:42 EvanR joins (~EvanR@user/evanr)
19:03:02 waleee joins (~waleee@h-98-128-229-110.NA.cust.bahnhof.se)
19:03:38 × max22- quits (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) (Ping timeout: 268 seconds)
19:08:45 tcard_ joins (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp)
19:08:57 × tcard quits (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Ping timeout: 240 seconds)
19:09:20 × deadmarshal quits (~deadmarsh@95.38.230.107) (Ping timeout: 256 seconds)
19:09:47 kranius joins (~kranius@162.19.149.77.rev.sfr.net)
19:11:19 <zero> say we have an infinite tree where each node is a calculation on the parent node. if we run an initial bfs to evaluate all nodes up to a depth of n, will running it a second time to n+1 benefit from the former evaluation?
19:12:31 coot joins (~coot@89-64-85-93.dynamic.chello.pl)
19:12:43 <zero> in another words, is this a valid model for memoization?
19:13:25 ridcully_ joins (~ridcully@pd951f824.dip0.t-ipconnect.de)
19:14:31 × ridcully quits (~ridcully@p508ac9bf.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
19:15:52 <dsal> It depends on how the calculations are stored.
19:16:18 <dsal> If they're thunks and you're evaluating them, then it should help
19:16:58 <dsal> It's not going to add new storage facilities for you, though.
19:18:18 whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com)
19:18:40 <zero> i'm not sure what is meant by that
19:19:41 <disfrutar-conchi> did u mean storage factories? :p
19:20:21 justsomeguy joins (~justsomeg@user/justsomeguy)
19:23:01 <zero> data Tree a = Node a (Tree a) (Tree a) ; tree n = Node n (tree $ n+2) (tree $ n*2)
19:23:17 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 240 seconds)
19:23:35 son0p joins (~ff@181.136.122.143)
19:23:40 <euouae> zero: how is your tree example different than a list?
19:23:59 <euouae> after all a path from root to node in your tree is like a list
19:24:20 <euouae> so it seems that you can recast the question on a list (which is a simpler model) instead
19:25:16 <tomsmeding> zero: if you construct an infinite tree which you then evaluate up to a certain depth, that evaluation will create that prefix of the tree in memory
19:25:36 <tomsmeding> so if you keep hold of the data structure, the next evaluation will just read the results of the previous evaluation from memory
19:26:05 <tomsmeding> but it won't memoise automatically -- you have to explicitly keep the same datastructure and not construct a new one (watch out for polymorphism)
19:26:53 <EvanR> imagine the result of a breadth first traversal is a boring list of nodes, or list of list of nodes in a level. Then everything you know about lists now applies
19:27:48 <disfrutar-conchi> every hash is binary tree .. and by thus quick to look up.
19:27:59 <EvanR> :thonk:
19:28:38 <tomsmeding> zero: note that if you evaluate up to depth n+1, then the _new_ stuff you're evaluating is 2^(n+1) nodes, but the whole tree up until now (levels 0 through n) contains 2^(n+1)-1 nodes. So you're only saving half the work. This factor (1/2) decreases if the branching factor of your tree increases
19:28:53 <tomsmeding> so in case the branching factor is >2, re-evaluate whether it's worthwhile to cache results :)
19:29:19 <zero> yes
19:31:25 <euouae> in this case you can probably have a formula that translates a tree node to the immediate calculation
19:32:04 <tomsmeding> (potentially related search keyword, but you're probably already aware of this: iterative-deepening depth-first search)
19:34:46 × kranius quits (~kranius@162.19.149.77.rev.sfr.net) (Changing host)
19:34:46 kranius joins (~kranius@user/kranius)
19:35:04 × kranius quits (~kranius@user/kranius) (Quit: leaving)
19:35:24 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
19:43:38 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
19:45:49 max22- joins (~maxime@2a01cb0883359800b82a50c14ca08cd9.ipv6.abo.wanadoo.fr)
19:45:53 lavaman joins (~lavaman@98.38.249.169)
19:47:57 × Neuromancer quits (~Neuromanc@user/neuromancer) (Ping timeout: 240 seconds)
19:49:07 emf joins (~emf@2620:10d:c091:480::1:8fa6)
19:49:28 machinedgod joins (~machinedg@24.105.81.50)
19:49:45 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
19:52:21 × dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.3)
19:53:57 × emf quits (~emf@2620:10d:c091:480::1:8fa6) (Ping timeout: 240 seconds)
19:57:13 emf joins (~emf@2620:10d:c091:480::1:8fa6)
19:58:06 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
19:58:51 jpds joins (~jpds@gateway/tor-sasl/jpds)
19:59:46 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
20:00:21 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 268 seconds)
20:02:02 × ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds)
20:02:02 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
20:02:28 × son0p quits (~ff@181.136.122.143) (Remote host closed the connection)
20:03:00 kranius joins (~kranius@user/kranius)
20:03:16 × iteratee_ quits (~kyle@162.218.222.107) (Read error: Connection reset by peer)
20:03:22 × samhh quits (7569f027cf@2604:bf00:561:2000::e4) (Read error: Connection reset by peer)
20:03:26 iteratee joins (~kyle@162.218.222.107)
20:03:29 samhh_ joins (7569f027cf@2604:bf00:561:2000::e4)
20:03:36 <gentauro> `GHC-9.0.1` -> `I don't know how to install GHC for (OSX,AArch64), please install manually` xD
20:03:44 samhh_ is now known as samhh
20:04:31 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
20:04:44 lavaman joins (~lavaman@98.38.249.169)
20:05:01 × juhp quits (~juhp@128.106.188.82) (Ping timeout: 240 seconds)
20:05:28 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
20:05:54 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3)
20:07:40 juhp joins (~juhp@128.106.188.82)
20:08:22 neurocyte0132889 joins (~neurocyte@user/neurocyte)
20:08:38 machinedgod joins (~machinedg@24.105.81.50)
20:10:07 × coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot)
20:10:40 coot joins (~coot@89-64-85-93.dynamic.chello.pl)
20:11:38 <geekosaur> I think 9.0.1 doesn't suupport that platform, only 8.10.7 and 9.2.1
20:11:47 <geekosaur> the release schedule went kinda weird there
20:12:24 jeffz` joins (~user@lambda.xen.prgmr.com)
20:12:26 <geekosaur> (in particular 8.10 should really have been considered closed to new features, but got extended specifically for mac aarch64)
20:13:49 × jeffz quits (~user@lambda.xen.prgmr.com) (Ping timeout: 256 seconds)
20:15:04 × polezaivsani quits (~polezaivs@orangeshoelaces.net) (Ping timeout: 256 seconds)
20:15:55 zincy joins (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807)
20:16:07 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
20:16:08 polezaivsani joins (~polezaivs@orangeshoelaces.net)
20:16:46 × superbil quits (~superbil@1-34-176-171.hinet-ip.hinet.net) (Ping timeout: 256 seconds)
20:17:34 × epolanski quits (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
20:18:54 × zincy quits (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807) (Remote host closed the connection)
20:19:45 ksqsf joins (~user@134.209.106.31)
20:21:58 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
20:23:06 × polezaivsani quits (~polezaivs@orangeshoelaces.net) (Ping timeout: 260 seconds)
20:24:37 × ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds)
20:26:41 <EvanR> i see java has a nextUp :: Double -> Double math utility which increases a float by 1 ULP. Can haskell do it? (lambdabot gimme something)
20:28:38 <gentauro> geekosaur: nighly on `stack` points to `9.0.1`
20:28:39 <gentauro> hmmmm
20:28:54 <tomsmeding> % unsafeCoerce (unsafeCoerce (42.0 :: Double) + 1 :: Int) :: Double -- EvanR
20:28:54 <yahb> tomsmeding: 42.00000000000001
20:29:05 <EvanR> lol
20:29:31 superbil joins (~superbil@1-34-176-171.hinet-ip.hinet.net)
20:29:33 EvanR gives tomsmeding's beer back
20:29:44 <tomsmeding> :D
20:30:28 <euouae> is that adding 1 to the bit representation?
20:30:32 <tomsmeding> yeah
20:30:34 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
20:30:34 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
20:30:34 wroathe joins (~wroathe@user/wroathe)
20:31:09 <euouae> nice, is there an issue between Double and Int being incompatible in size?
20:31:33 <tomsmeding> Int is a 64-bit int on 64-bit platforms, and Double is also 64-bit, so they happen to have equivalent representations
20:33:45 <EvanR> and then somehow the adding 1 to an int does what you want 🤔
20:34:14 <geekosaur> I bet it only does so if the modulus is correct
20:34:18 <EvanR> yeah
20:34:21 wrengr joins (~wrengr@150.12.83.34.bc.googleusercontent.com)
20:34:31 <tomsmeding> modulus?
20:34:33 <euouae> I think https://hackage.haskell.org/package/floating-bits-0.3.0.0/docs/Data-Bits-Floating-Ulp.html may be a bit more careful
20:34:59 <geekosaur> % unsafeCoerce (unsafeCoerce (1e120 :: Double) + 1 :: Int) :: Double
20:34:59 <yahb> geekosaur: 1.0000000000000001e120
20:35:02 <geekosaur> huh
20:35:24 <EvanR> what does it do one the last value before exponent change
20:35:24 <geekosaur> soorry, meant exponent
20:35:39 <geekosaur> since floats and doubles are stored as modulus and exponent
20:35:59 lavaman joins (~lavaman@98.38.249.169)
20:36:18 <euouae> https://en.wikipedia.org/wiki/IEEE_754-1985 This is how floats are stored I believe, that's the standard it follows
20:36:26 <tomsmeding> % -1.0/0
20:36:26 <yahb> tomsmeding: -Infinity
20:36:29 <tomsmeding> % unsafeCoerce (unsafeCoerce (-1.0/0 :: Double) - 1 :: Int) :: Double
20:36:30 <yahb> tomsmeding: -1.7976931348623157e308
20:36:31 <tomsmeding> clearly
20:36:44 <euouae> oh whoops, that's the /old/ one, the new one is https://en.wikipedia.org/wiki/IEEE_754
20:36:49 tomsmeding learned "mantissa and exponent"
20:36:55 zincy joins (~zincy@host86-151-99-97.range86-151.btcentralplus.com)
20:37:08 <geekosaur> and I misremembered mantissa, dammit
20:37:13 <geekosaur> not my day I guess
20:37:27 <EvanR> so to get out of -infinity, you have to go down lol
20:37:50 <tomsmeding> IEEE-754 floats are designed in such a way that apart from the sign bit, < comparison is the same as interpreting them as integers
20:37:58 <EvanR> should be in the hacker survival guide or something
20:38:09 <tomsmeding> only flaw in that is that negative numbers sort above positive numbers due to the sign bit
20:38:25 <tomsmeding> so adding one is indeed +1ULP, except that there are special cases surrounding infinity/NaN
20:38:39 <tomsmeding> because they take up some of the code space
20:38:40 <euouae> now I wish I had some na'an
20:38:54 <tomsmeding> naan <3
20:39:15 <gentauro> geekosaur: `8.10.7` seem to work. Thx for the tip
20:39:16 <gentauro> :)
20:39:32 <geekosaur> np
20:39:50 × sprout quits (~quassel@2a02:a467:ccd6:1:1116:7911:5ad7:44c3) (Ping timeout: 268 seconds)
20:40:17 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
20:40:18 <tomsmeding> 21:35 <EvanR> what does it do one the last value before exponent change
20:40:29 <tomsmeding> it raises the exponent by one and resets the mantissa to zero
20:40:33 <tomsmeding> which is exactly the right thing
20:40:37 <EvanR> slick
20:40:48 <tomsmeding> (except at the inf/nan boundaries and across zero)
20:41:18 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
20:41:25 <euouae> I think those checks are shown in the floating-bits link I had above
20:41:55 <tomsmeding> yeah use a proper lib please instead of this hack lol
20:42:11 <euouae> in undergrad I was grilled on floats by a professor
20:42:40 <euouae> scary stuff, I managed to blurt out "maybe try double?"
20:43:39 <euouae> "No. Won't work." he responded before moving on to a different set of questions, and to this day I have no idea what the issue wqas
20:44:04 CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
20:44:08 × zincy quits (~zincy@host86-151-99-97.range86-151.btcentralplus.com) (Ping timeout: 268 seconds)
20:44:20 <geekosaur> my opinion on floating point is if I need to know that stuff, I've landed in the wrong line of work :)
20:44:33 <geekosaur> that's the compiler's job as far as I
20:44:40 <EvanR> if you remember the question at least you could try again or ask it here
20:44:40 <geekosaur> 'm concerned
20:45:15 <geekosaur> that said I guess now I understand how that hack that came up the other day works
20:45:16 <euouae> well, it /was/ a numerical analysis class...
20:45:47 <geekosaur> (mm, did that come up here or in a different channel?)
20:45:47 <monochrom> float and double have the same problems, just at different scales.
20:45:49 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
20:45:57 <tomsmeding> euouae: perhaps it was some kind of log(1+x) style issue
20:46:24 Guest70 joins (~Guest70@89.151.178.153)
20:46:37 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
20:46:53 × Guest70 quits (~Guest70@89.151.178.153) (Client Quit)
20:47:35 <euouae> Who knows. I knew increasing to double would make it more accurate like monochrom says, but he must have been wanting me to analyze the underlying cause.
20:47:58 cjb joins (~cjb@user/cjb)
20:49:05 <[itchyjunk]> Is there an easy enough example of this that I might understand?
20:49:06 <[itchyjunk]> https://en.wikipedia.org/wiki/Uniqueness_type
20:49:07 <EvanR> it gets more precise but not necessarily more accurate xD
20:49:29 <[itchyjunk]> String is also list of char so it's not unique?
20:49:53 <tomsmeding> [itchyjunk]: have you ever looked at the programming language Futhark
20:49:59 <tomsmeding> or Clean
20:50:06 <[itchyjunk]> never heard of them :O
20:50:10 <EvanR> > let (m,e) = decodeFloat 99.0 in encodeFloat (m - 1) e -- I guess this is a passable way without having to install floating bits
20:50:12 <lambdabot> 98.99999999999999
20:50:20 kupi joins (uid212005@id-212005.hampstead.irccloud.com)
20:50:28 <EvanR> wait that won't work
20:50:36 <EvanR> or will it
20:50:54 <euouae> [itchyjunk] look into linear types, that should help you I think
20:51:00 <tomsmeding> [itchyjunk]: https://futhark.readthedocs.io/en/stable/language-reference.html#in-place-updates
20:51:14 <tomsmeding> not sure that will help you, but it _is_ a real-world example of usage of uniqueness types
20:51:45 <monochrom> I thought of that. What I worried about was again "what does it do one the last value before exponent change", does encodeFloat do the desirable thing? Or does it just bottom out?
20:51:55 <[itchyjunk]> ohh, you get to do non functional programming language thing but with the fp benifits of no side effect?
20:51:58 <EvanR> encodeFloat is the wildcard
20:52:01 <tomsmeding> linear types, depending on who you talk to, either refers to something subly different from uniqueness types, or otherwise to a more general class of type system( feature)s that include uniqueness types among other things
20:52:32 <tomsmeding> [itchyjunk]: kind of, the idea is that if you have a value with a unique type, then you know that you have the only reference to that thing
20:52:50 <tomsmeding> so it's safe to do all kinds of mutation on it, because you remain referentially transparent: nobody else can see what you're doing
20:53:16 <[itchyjunk]> hmm cant i have some unique type but with two things pointing to it?
20:53:18 sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b)
20:53:24 <[itchyjunk]> it's still one of a kind but 2 things point to it
20:53:36 <tomsmeding> note that this is subly different from the LinearTypes thing that Haskell has since GHC 9.0: there we have function arrows %1-> that guarantee that a function uses its input exactly once (roughly)
20:53:56 <monochrom> I think you are using the "unique" adjective on the wrong object.
20:54:04 <monochrom> It is not "unique as in snowflake".
20:54:09 <tomsmeding> doesn't mean that the function can assume that it has the only reference to its input value
20:54:21 <monochrom> It is "unique as in can't have two users".
20:54:46 <[itchyjunk]> ahh
20:55:43 <dmj`> Has anyone attempted to parse the Haskell 2010 grammar with an Earley parser? Wondering if that can help in situations where ambiguity is present (e.g. aexp vs. apat).
20:56:37 <tomsmeding> suppose that you have an imaginary haskell-like language where for any type T, *T denotes "a unique T". Suppose you have a function f :: *(Array Int) -> *(Array Float). Then the code `let a = newArray in zipWith (+) (f a) (f a)` is invalid because `a` is shared between the two calls to `f`, so the arguments to `f` are not unique
20:57:07 <tomsmeding> however, `let a = newArray ; b = newArray in zipWith (+) (f a) (f b)` would be valid, since both calls to `f` get a value to which they have the only reference
20:57:21 <tomsmeding> assuming that newArray produces a brand new value of type *(Array Int)
20:58:29 <c_wraith> dmj`: Earley's algorithm can't handle context-sensitive grammars, which Haskell is. at best you could parse it to an intermediate point and then you'd have to do another pass to fix up the things it couldn't parse correctly on the first pass
21:00:07 yauhsien joins (~yauhsien@61-231-38-209.dynamic-ip.hinet.net)
21:00:32 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
21:04:56 × yauhsien quits (~yauhsien@61-231-38-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
21:05:03 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:07:55 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Read error: Connection reset by peer)
21:08:05 <dmj`> c_wraith: Haskell's grammar as defined in the report is not context sensitive (so it says). Things like white space / layout are handled by a post-lexing layout phase to convert the grammar into a CFG. So by the time you get to the LALR parser you're operating on a CFG. My understanding is that the issue is the CFG is not a deterministic CFG.
21:09:57 × sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 240 seconds)
21:09:58 pfurla joins (~pfurla@2804:d41:4331:4800:5835:b5d3:9cc8:104b)
21:11:51 lavaman joins (~lavaman@98.38.249.169)
21:13:59 ksqsf joins (~user@134.209.106.31)
21:14:19 acidjnk joins (~acidjnk@p200300d0c7271e5430c1f3c646e9c4d1.dip0.t-ipconnect.de)
21:14:35 × pfurla quits (~pfurla@2804:d41:4331:4800:5835:b5d3:9cc8:104b) (Ping timeout: 252 seconds)
21:16:16 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
21:17:04 pfurla joins (~pfurla@2804:d41:4331:4800:5835:b5d3:9cc8:104b)
21:17:24 zincy joins (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807)
21:17:36 <dmj`> c_wraith: GHC (and JHC) "solve" this by treating all patterns as expressions https://github.com/ghc/ghc/blob/master/compiler/GHC/Parser.y#L3280-L3289
21:18:59 × ksqsf quits (~user@134.209.106.31) (Ping timeout: 252 seconds)
21:19:52 × zincy quits (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807) (Remote host closed the connection)
21:25:06 jmtd is now known as Jon
21:31:43 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:34:58 × doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Remote host closed the connection)
21:35:34 sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b)
21:37:57 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
21:38:42 × sander quits (~sander@user/sander) (Read error: Connection reset by peer)
21:39:27 rond_ joins (~rond_@100.42.200.146.dyn.plus.net)
21:40:41 sander joins (~sander@user/sander)
21:43:33 × rond_ quits (~rond_@100.42.200.146.dyn.plus.net) (Client Quit)
21:43:45 × hueso quits (~root@user/hueso) (Ping timeout: 250 seconds)
21:44:21 hueso joins (~root@user/hueso)
21:44:58 <Henson> what's a good IDE for doing Haskell development? I used to use Atom's haskell-ide package, but it looks like it hasn't been updated in some time, and ghc-mod apparently doesn't work with newer versions of Haskell.
21:45:06 <disfrutar-conchi> there are no none deterministic operations for a machine.
21:45:14 <disfrutar-conchi> especially not for a computer.
21:45:24 <euouae> I like Emacs Henson, I use it with the doom-emacs package and it's batteries included
21:45:43 <tomsmeding> Henson: vscode is generally the easiest to get working with haskell-language-server, but you can use haskell-language-server with other editors too if they support the language server protocol
21:45:57 <tomsmeding> (HLS is "the thing" for IDE support now)
21:45:58 <disfrutar-conchi> that is at the the heart of the erisian illusion (as opposed to the unerisian)
21:46:31 <iqubic> HLS is excellent. I use HLS with Emacs and it works really really well.
21:47:18 <euouae> disfrutar-conchi never heard of the erisian illusion
21:47:39 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:48:21 <disfrutar-conchi> euouae: you certainly heard einstein popularily claiming god does no dice. well.. it turned out he spent the whole sunday on inventing them.
21:48:34 <Henson> thanks for the info, everyone, I'll look into HLS. Maybe I need to switch from VI to Emacs!
21:48:53 <disfrutar-conchi> and by that get rid of his almight. hardest part.
21:49:10 <disfrutar-conchi> but much more exciting.
21:49:30 <tomsmeding> Henson: I'm using HLS in neovim with the built-in LSP support and it works fine; I used it before in vim with ALE and it also worked fine. Though it doesn't support all the fancy stuff like code lenses and whatnot
21:49:46 <disfrutar-conchi> euouae: https://principia-discordia.com
21:50:07 <geekosaur> disfrutar-conchi, what has this to do with Haskell?
21:50:35 <disfrutar-conchi> geekosaur: look up chain of events. if you care.
21:50:55 <disfrutar-conchi> i would like to know what is meant with deterministic.
21:51:09 <EvanR> haskell allows non-deterministic computations
21:51:23 <EvanR> pretty easily
21:52:19 <disfrutar-conchi> i will look it up. thank you. good night. bye.
21:52:58 disfrutar-conchi there is nothing that will stop me.
21:52:58 <euouae> oh we're getting trolled
21:53:19 disfrutar-conchi parts (uid498179@user/earendel) ()
21:53:34 <geekosaur> yeh, that was why I stepped in
21:54:23 × sagax quits (~sagax_nb@user/sagax) (Ping timeout: 250 seconds)
21:54:26 <geekosaur> don't see what part of "not a deterministic CFG" leads to "there are no none (sic) deterministic operations for a machine" followed by a bunch of pseudophilosophy
21:54:45 <geekosaur> but I may be grumpy today
21:58:59 <EvanR> trolling / philosophy is there a diff? xD
22:00:14 deadmarshal joins (~deadmarsh@95.38.230.107)
22:01:13 zincy joins (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807)
22:02:32 <euouae> I enjoy Nietzsche
22:03:23 <pfurla-matrix> Descartes
22:03:42 × kjak quits (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Ping timeout: 268 seconds)
22:03:54 <euouae> curry-howard correspondence has a section on philosophical interpretation on wikipedia :P
22:04:17 × deadmarshal quits (~deadmarsh@95.38.230.107) (Ping timeout: 240 seconds)
22:04:21 <monochrom> "earendel is now known as disfrutar-conchi" some 5 hours ago.
22:04:28 <Inst_> hi guys
22:04:31 <Inst_> btw, i'm confused
22:04:38 <Inst_> someone on Functional Programming Discord
22:04:52 <Inst_> told me that join is only defined for 2 or more levels of structure on a given monad
22:05:17 × zincy quits (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807) (Ping timeout: 240 seconds)
22:05:21 <pfurla-matrix> euouae: all by the same author, a bit disheartening
22:05:56 <pfurla-matrix> `join :: m (m a) -> m a`
22:06:08 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
22:06:32 <Inst_> ah
22:07:17 <Inst_> join :: Monad m => m (m a) -> m a
22:07:29 <Inst_> yup so join should not be defined for stuff like join [3]
22:07:41 <pfurla-matrix> euouae: the said author https://en.wikipedia.org/wiki/Ruy_de_Queiroz, he is actually an engineer
22:07:51 <monochrom> IMO, as usual, the type signature is infinitely clearer than wordy descriptions like "two levels of structure".
22:08:03 <Inst_> okay, world makes sense again
22:08:07 ksqsf joins (~user@134.209.106.31)
22:08:32 <Inst_> bind = join.fmap
22:08:47 <geekosaur> didn't we cover that one yesterday?
22:08:51 <Inst_> i think we did
22:08:57 <geekosaur> :t join . fmap -- doesn't work
22:08:58 <lambdabot> error:
22:08:58 <lambdabot> • Occurs check: cannot construct the infinite type: m ~ (->) (m a)
22:08:58 <lambdabot> Expected type: (a -> a1) -> m (m a1)
22:09:08 <geekosaur> :t (join .) . fmap
22:09:09 <lambdabot> Monad m => (a1 -> m a2) -> m a1 -> m a2
22:09:16 <Inst_> ????
22:09:22 <Inst_> :t id.id
22:09:23 <lambdabot> c -> c
22:09:26 <euouae> pfurla-matrix rest assured there are probably more philosophical works out there discussing CHL iso...
22:09:29 <Inst_> :t join.fmap
22:09:30 <lambdabot> error:
22:09:30 <lambdabot> • Occurs check: cannot construct the infinite type: m ~ (->) (m a)
22:09:30 <lambdabot> Expected type: (a -> a1) -> m (m a1)
22:09:36 <geekosaur> you can think of this meaning that (join . fmap) only handles one parameter, whereas fmap needs two
22:09:38 <Inst_> iirc that's the definition of bind somewhere, no?
22:09:47 <monochrom> NO
22:09:51 × sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 268 seconds)
22:09:54 <Inst_> oh christ
22:10:22 <monochrom> IMO in this case the pointful formula is more helpful. m>>=k = join (fmap k m)
22:10:39 <monochrom> join (fmap k m) is obviously not (join . fmap) k m
22:11:02 <dmj`> geekosaur: thanks for trying to keep my question from getting derailed, "machines do not have deterministic operations" is arguing a separate point from Haskell2010 CFG.
22:11:48 <Inst_> okay, fine, so let's use that definition of bind, etc etc etc
22:12:48 ees parts (~user@pool-108-18-30-46.washdc.fios.verizon.net) (ERC 5.4 (IRC client for GNU Emacs 28.0.90))
22:13:01 × xff0x quits (~xff0x@2001:1a81:5214:2e00:39f0:aaaf:c001:5cae) (Ping timeout: 240 seconds)
22:13:03 <pfurla-matrix> join . fmap k
22:13:41 × ksqsf quits (~user@134.209.106.31) (Ping timeout: 245 seconds)
22:14:10 <monochrom> It is still pretty ugly. At best you have to invoke section syntax (which isn't enlightening) and go "(>>= k) = join . fmap k".
22:14:14 xff0x joins (~xff0x@2001:1a81:5214:2e00:3a40:685:1119:99d6)
22:14:14 <pfurla-matrix> join = (>>= id)
22:14:14 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
22:16:31 <EvanR> join .: fmap, :sunglasses:
22:16:40 <monochrom> heh
22:16:42 <Inst_> (>>= k) = join . fmap k
22:17:11 <EvanR> there you go
22:17:13 <Inst_> what is .: anyways?
22:17:13 <Inst_> is that compose with cons?
22:17:34 <EvanR> it composes but feeds two arguments into the first function
22:17:47 <EvanR> your missing k in this case
22:18:05 <pfurla-matrix> euouae: in the CHL wikipage, right after there is a section named "synthetic papers", do you know what is synthetic paper?
22:18:32 <EvanR> it's a cheesy not really standard operator
22:18:39 <Inst_> i see
22:18:47 <pfurla-matrix> EvanR, where is it defined?
22:18:51 <EvanR> right here
22:18:54 <pfurla-matrix> :t (.:)
22:18:55 <lambdabot> error:
22:18:55 <lambdabot> • Variable not in scope: .:
22:18:56 <lambdabot> • Perhaps you meant one of these:
22:19:01 <EvanR> @def (.:) = (.) . (.)
22:19:01 <lambdabot> <command line>: does not exist: .L.hs
22:19:10 <monochrom> It's @let
22:19:13 <euouae> pfurla-matrix I think it's a technical term in logic, "synthetic". I'm suspecting it from pages such as https://ncatlab.org/nlab/show/synthetic+topology
22:19:27 <EvanR> @let (.:) = (.) . (.)
22:19:27 <lambdabot> <command line>: does not exist: .L.hs
22:19:49 <geekosaur> o.O
22:19:52 <monochrom> But yeah lately lambdabot has a problem with that.
22:20:28 <pfurla-matrix> euouae: I think this is the correct definition https://ncatlab.org/nlab/show/synthetic+mathematics, but thanks
22:21:18 <Inst_> what is a function composition anyways?
22:21:22 <Inst_> maybe I don't get the meaning of .
22:21:27 <euouae> pfurla-matrix hmm yeah I think you got it
22:21:48 <geekosaur> (f . g) x is just a short way of saying f (g x)
22:21:51 <monochrom> f . g = \x -> f (g x)
22:22:01 <pfurla-matrix> :t (.)
22:22:02 <lambdabot> (b -> c) -> (a -> b) -> a -> c
22:22:20 <euouae> pfurla-matrix I've read the P. Wadler paper "Propositions as Types" and I would not call it "synthetic", more of an exposition.
22:22:22 <Inst_> wait, is the problem with . that (b -> c) -> (a -> B)?
22:22:29 <Inst_> erm, (a -> b)?
22:22:34 <monochrom> Soon, you will understand why I follow Dijkstra in saying "a formula is worth a thousand pictures" (so a million words).
22:23:14 <Inst_> since fmap is (a->b) -> a -> b iirc
22:23:21 <pfurla-matrix> euouae: I agree
22:23:35 × kaph quits (~kaph@net-2-47-236-216.cust.vodafonedsl.it) (Read error: Connection reset by peer)
22:23:41 <pfurla-matrix> fmap :: (a -> b) -> m a -> m b
22:23:46 <monochrom> (a->b) -> M a -> M b, whichever monad you use for M.
22:23:46 × yushyin quits (3RNeQpThcJ@karif.server-speed.net) (Quit: WeeChat 3.3)
22:23:48 <Inst_> erm, f a f b
22:23:55 yushyin joins (C2iSDogdK9@karif.server-speed.net)
22:24:35 <Inst_> so . fails in join . fmap because fmap doesn't match the type requirements of .?
22:24:48 <pfurla-matrix> how many words is a type worth? :)
22:25:07 <monochrom> Type signatures are formulas, too.
22:25:52 <Inst_> :t .
22:25:53 <lambdabot> error: parse error on input ‘.’
22:25:54 <pfurla-matrix> yeah
22:25:59 <Inst_> :t (.)
22:26:00 <lambdabot> (b -> c) -> (a -> b) -> a -> c
22:26:04 <Inst_> :t (.)(.)
22:26:05 <lambdabot> (a1 -> b -> c) -> a1 -> (a2 -> b) -> a2 -> c
22:26:20 kaph joins (~kaph@net-2-47-236-216.cust.vodafonedsl.it)
22:26:20 <pfurla-matrix> it needs a section
22:26:23 <pfurla-matrix> :t (.)
22:26:24 <lambdabot> (b -> c) -> (a -> b) -> a -> c
22:26:25 <Inst_> :t (..)
22:26:26 <lambdabot> error: parse error on input ‘..’
22:26:42 <hpc> ".." is part of import syntax and list ranges
22:26:57 <Inst_> (.)(.) join fmap
22:27:15 <EvanR> :t ((.) . (.)) join fmap
22:27:15 <lambdabot> Monad m => (a1 -> m a2) -> m a1 -> m a2
22:27:20 × cjb quits (~cjb@user/cjb) (Quit: rcirc on GNU Emacs 29.0.50)
22:27:23 <pfurla-matrix> sections are when you don't give all the arguments to an operator and it the compiler needs to be aware it's missing arguments
22:27:32 × hueso quits (~root@user/hueso) (Ping timeout: 240 seconds)
22:27:35 <EvanR> surely all is clear now
22:27:37 <pfurla-matrix> so we right (+) or (+1)
22:27:50 <Inst_> :t (>>=)
22:27:51 <lambdabot> Monad m => m a -> (a -> m b) -> m b
22:28:09 <pfurla-matrix> *write (f phonetics)
22:28:30 <hpc> fonetics
22:28:35 <monochrom> I think "((.) . (.))" can be further "improved" to "((.) (.) (.))"
22:28:47 <Inst_> you know this is a boobies joke, right?
22:28:51 <pfurla-matrix> hpc: exactly
22:28:52 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
22:29:02 <monochrom> In fact, using the covariant homset functor, "(fmap fmap fmap)"
22:29:09 <EvanR> ((.) (.) (.)) would have to be the total recall boobies joke
22:29:10 cjb joins (~cjb@user/cjb)
22:29:19 <monochrom> heh
22:29:51 <Inst_> :t join (.).(.) fmap
22:29:52 <pfurla-matrix> EvenR: I see you are familiar on the ways of 80s references
22:29:52 <lambdabot> Functor f => ((f a -> f b) -> a -> b) -> (f a -> f b) -> f a -> f b
22:30:02 <Inst_> heh
22:30:13 <Inst_> in this channel, we are trying to turn monads into a mammary gland joke
22:30:19 <EvanR> not usually
22:30:26 <monochrom> @type fmap fmap fmap join fmap
22:30:27 <lambdabot> Monad m => (a1 -> m a2) -> m a1 -> m a2
22:30:31 hueso joins (~root@user/hueso)
22:30:32 <monochrom> \∩/
22:30:47 <EvanR> my god it's full of fmaps
22:30:58 <mrianbloom> What is the right way to enable LinearTypes in package.yaml?
22:31:11 <Inst_> :t join (.)(.) fmap
22:31:12 <lambdabot> error:
22:31:12 <lambdabot> • Occurs check: cannot construct the infinite type: a ~ f a
22:31:12 <lambdabot> Expected type: ((b -> f b) -> (f a -> b) -> f a -> f b)
22:31:28 <Inst_> :t join . fmap
22:31:29 <lambdabot> error:
22:31:29 <lambdabot> • Occurs check: cannot construct the infinite type: m ~ (->) (m a)
22:31:29 <lambdabot> Expected type: (a -> a1) -> m (m a1)
22:31:41 <monochrom> OK I'm done.
22:31:44 <Inst_> yeah, sorry
22:31:50 <Inst_> i'll scoot, just need to repair my thinkpad again
22:31:55 notzmv joins (~zmv@user/notzmv)
22:31:57 <Inst_> need to send it back to servicing, f- lolnovo
22:33:34 <janus> mrianbloom: you put it in default-extensions?
22:34:02 <mrianbloom> Ah, default-extensions? I'll try that.
22:35:36 <dmj`> c_wraith: purescript has an interesting way of getting around this ambiguity using %partial in happy, https://github.com/natefaubion/purescript-cst/blob/master/src/Language/PureScript/CST/Parser.y#L441-L454
22:36:12 <pfurla-matrix> :t join (+)
22:36:14 <lambdabot> Num a => a -> a
22:36:57 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 276 seconds)
22:37:05 sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b)
22:38:22 jpds joins (~jpds@gateway/tor-sasl/jpds)
22:38:40 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
22:42:35 × sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 252 seconds)
22:43:53 HurdyGurdyBurdy parts (~HurdyGurd@user/hurdygurdyburdy) (server died; rip)
22:45:11 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
22:45:45 <janus> why can't i coerce Int32 -> Int ? does GHC support platforms where Int is smaller than 32 bits?
22:46:22 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
22:47:04 <geekosaur> it can'tper the Report (minimum size of Int is 30 bits)
22:47:28 ddb joins (~ddb@ipv6two.tilde.club)
22:47:45 <geekosaur> how are you trying to coerce it?
22:48:07 <janus> with Data.Coerce.coerce. but i will just use fromIntegral then, i guess
22:48:22 <geekosaur> oh. that does not work ith basic types, only with newtypes
22:48:42 <geekosaur> it wraps and unwraps newtypes only
22:49:16 <janus> but i thought Int32 and Int were actually newtypes that wrapped some type with a hash sign in it
22:49:24 <monochrom> Ah right, "data Int32 = ..."
22:49:30 <monochrom> similarly for Int
22:49:38 <janus> @src Int
22:49:38 <lambdabot> data Int = I# Int#
22:49:59 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
22:50:04 <monochrom> Int and Int32 have to support laziness. Can't be Int# directly.
22:50:19 geekosaur joins (~geekosaur@xmonad/geekosaur)
22:54:04 <janus> it's interesting that there is coerce and fromIntegral. but what if i want to convert but without betraying the sign of the input? what is the function for that?
22:54:11 sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b)
22:54:47 <geekosaur> I don't understand "betraying the sign", but I think there is a package for that
22:55:48 <janus> geekosaur: i mean, if you convert 256 to an Int8, it becomes negative, right? that is what i mean about betraying the sign
22:57:04 <janus> % :m +GHC.Int
22:57:04 <yahb> janus:
22:57:17 <janus> % 0xf0000000 :: Int32
22:57:17 <yahb> janus: ; <interactive>:216:1: warning: [-Woverflowed-literals] Literal 4026531840 is out of the Int32 range -2147483648..2147483647; -268435456
22:57:44 <janus> % fromIntegral 0xf0000000 :: Int32
22:57:44 <yahb> janus: -268435456
22:57:47 <EvanR> in quickcheck's Arbitrary instance for Float, it doesn't seem to ever generate very small values or very large, just "normal" and zero?
22:58:24 <geekosaur> https://hackage.haskell.org/package/conversions-0.0.4/docs/Data-Conversions.html#v:checkedFromIntegral
22:58:32 × sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 240 seconds)
22:59:01 <janus> oooh very cool
22:59:09 <janus> suspicious how it has no docs
22:59:13 <janus> but i guess it documents itself
23:00:08 × kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
23:00:12 sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b)
23:00:39 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
23:01:15 qrpnxz joins (abc4f95c31@user/qrpnxz)
23:01:42 qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: closed)
23:01:48 qrpnxz joins (abc4f95c31@user/qrpnxz)
23:02:20 ksqsf joins (~user@134.209.106.31)
23:03:39 <pfurla-matrix> I am adopting https://inutile.club/estatis/falso/ for all my logic needs https://inutile.club/estatis/falso/
23:04:02 <EvanR> prop_huh x = not (0 < x && x < 0.001) -- passes 10000 tests
23:05:30 × sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 260 seconds)
23:05:35 justsomeguy joins (~justsomeg@user/justsomeguy)
23:06:57 × ksqsf quits (~user@134.209.106.31) (Ping timeout: 240 seconds)
23:07:04 <EvanR> ok, it doesn't pass 1000000 tests
23:08:03 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
23:11:49 <janus> that's why hedgehog is better ;)
23:11:55 <janus> @check \x -> not $ 0 < x && x < 0.1
23:11:57 <lambdabot> +++ OK, passed 100 tests.
23:15:00 typeswitch joins (~textual@2001:8a0:da87:e500:68bf:9d74:2322:5a5b)
23:15:57 × zer0bitz quits (~zer0bitz@2001:2003:f444:a000:81c1:fdbc:2b2:4c4a) (Read error: Connection reset by peer)
23:16:09 <Christoph[m]> <janus> "why can't i coerce Int32 -> Int..." <- In Which, Int32 -> Int is instanciated as TryFrom:
23:16:09 <Christoph[m]> https://hackage.haskell.org/package/witch-0.3.4.1/docs/Witch.html
23:16:10 <Christoph[m]> But it doesn't say why.
23:16:37 × python476 quits (~user@88.160.31.174) (Ping timeout: 240 seconds)
23:16:59 <EvanR> Int32 isn't guaranteed promotable to Int
23:17:19 <Axman6> Int is defined as being at least 30 bits
23:17:19 <EvanR> there's multiverse where haskell runs on 30 bit computers
23:17:50 <Axman6> well, not quite, there was some space left for tagging if implementations wanted to do that
23:17:56 <euouae> lisp machines
23:17:59 <Axman6> having Int take up one Word would be quite nice
23:18:02 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
23:18:04 <euouae> do the tagging too
23:18:26 <Axman6> GHC does too, but on pointers, since everything is word aligned
23:19:06 <euouae> has anyone looked into F*? I've been learning more of it recently and it's fun
23:19:16 <euouae> The language F*
23:20:04 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
23:21:45 <janus> it seems really focused on cryptography
23:21:48 × Midjak quits (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Quit: This computer has gone to sleep)
23:24:45 <euouae> From what I've learned so far I can do some elementary proofs. So a property such as (reverse (reverse l)) == l can be proven in the type system
23:25:21 <euouae> and so you wouldn't need e.g. hedgehog to run tests on such a property, because you've proven it true
23:26:21 <janus> right, it has dependent types. some people want haskell to have this also
23:26:48 <EvanR> funny "workflow" in idris is to write the property as a type at the top level, the definition of it is the proof, checked by the type checker
23:27:44 <EvanR> you may or may not run or use the value
23:28:08 <euouae> the other component of F* is that it uses the Z3 theorem prover, and that means you can get automation and other things, and I think Idris does not have that.
23:28:24 <euouae> There's also other projects like Liquid Haskell? Lean, ...
23:30:00 <euouae> so that's the sort of thing that blew my mind because when you're trying to prove properties for your functions, the implementation matters, and the "black box abstraction" of functions is out the window!
23:30:13 AlexNoo_ joins (~AlexNoo@178.34.150.63)
23:30:57 ksqsf joins (~user@134.209.106.31)
23:31:59 <euouae> but ok -- not much enthusiasm. I really hope to learn more because I'm fascinated about the application of extracting correct programs.
23:32:17 × AlexZenon quits (~alzenon@178.34.163.82) (Ping timeout: 240 seconds)
23:32:38 <EvanR> that's what some people say, you can't hide implementation details with dependent types
23:33:04 <EvanR> also it seems like there might be like 5 people on earth who know what they're doing with dependent types
23:33:24 × Alex_test quits (~al_test@178.34.163.82) (Ping timeout: 256 seconds)
23:33:32 sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b)
23:34:17 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Ping timeout: 252 seconds)
23:34:21 × AlexNoo quits (~AlexNoo@178.34.163.82) (Ping timeout: 268 seconds)
23:34:41 <justsomeguy> How can I seek to the beginning of an open file handle?
23:35:29 <EvanR> hSeek
23:35:34 <EvanR> in System.IO
23:35:44 <Henson> tomsmeding: vscode seems to be a pretty similar experience Atom, and HLS support was very easy to get working.
23:36:14 × ksqsf quits (~user@134.209.106.31) (Ping timeout: 256 seconds)
23:37:02 AlexZenon joins (~alzenon@178.34.150.63)
23:37:42 Alex_test joins (~al_test@178.34.150.63)
23:38:23 AlexNoo_ is now known as AlexNoo
23:38:37 × kranius quits (~kranius@user/kranius) (Ping timeout: 240 seconds)
23:38:50 × typeswitch quits (~textual@2001:8a0:da87:e500:68bf:9d74:2322:5a5b) (Changing host)
23:38:50 typeswitch joins (~textual@user/typeswitch)
23:39:17 × sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 268 seconds)
23:40:15 kupi joins (uid212005@id-212005.hampstead.irccloud.com)
23:47:01 × Jing quits (~hedgehog@2604:a840:3::103b) (Remote host closed the connection)
23:47:42 Jing joins (~hedgehog@2604:a840:3::103b)
23:50:01 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3)
23:51:02 sprout joins (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b)
23:55:17 × sprout quits (~quassel@2a02:a467:ccd6:1:d0f9:15ce:3995:401b) (Ping timeout: 240 seconds)
23:56:37 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 240 seconds)
23:57:12 × euouae quits (~euouae@user/euouae) (Ping timeout: 256 seconds)
23:57:17 × CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
23:58:12 ksqsf joins (~user@134.209.106.31)
23:58:42 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)

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