Home liberachat/#haskell: Logs Calendar

Logs on 2024-06-12 (liberachat/#haskell)

00:09:21 × vadparaszt quits (~Rodney@176.254.244.83) (Ping timeout: 272 seconds)
00:10:16 Rodney_ joins (~Rodney@85.255.233.18)
00:11:09 × tertek_ quits (~tertek@101.175.150.247) (Quit: %quit%)
00:11:27 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
00:11:34 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds)
00:12:11 vadparaszt joins (~Rodney@176.254.244.83)
00:12:51 Lord_of_Life_ is now known as Lord_of_Life
00:13:10 × Rodney_ quits (~Rodney@85.255.233.18) (Read error: No route to host)
00:13:26 × zlqrvx_ quits (~zlqrvx@101.175.150.247) (Quit: %quit%)
00:13:47 zlqrvx joins (~zlqrvx@user/zlqrvx)
00:16:11 × dcoutts quits (~duncan@185.110.91.104) (Ping timeout: 264 seconds)
00:22:03 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 255 seconds)
00:27:17 × oo_miguel quits (~Thunderbi@78-11-181-16.static.ip.netia.com.pl) (Ping timeout: 240 seconds)
00:32:13 × califax quits (~califax@user/califx) (Remote host closed the connection)
00:33:44 califax joins (~califax@user/califx)
00:40:28 <cheater> hello
00:40:37 <cheater> i heard this is a cult now is that true
00:41:13 <EvanR> "now" ?
00:41:29 <cheater> yeah there was a haskell hit piece
00:41:34 <cheater> recently on the news
00:41:44 <cheater> lol
00:41:49 <EvanR> what was the AOL keyword so I can find it
00:44:10 <cheater> https://www.wired.com/story/inside-the-cult-of-the-haskell-programmer/
00:45:00 <EvanR> the cover art fails to compile
00:45:10 <haskellbridge> <sm> that's us starting to go mainstream
00:45:42 <cheater> wired isn't mainstream
00:47:51 Guest40 joins (~Guest40@c-98-37-216-109.hsd1.ca.comcast.net)
00:49:13 <EvanR> the last comment on the article says he turned a 100,000 line C rule engine for medical devices into 11 lines of haskell xD
00:49:34 <EvanR> what an elitist!
00:49:48 <Guest40> loop :: a -> (a -> Bool) -> (a -> a) -> [a]
00:49:49 <Guest40> loop seed pred next = go seed pred next []
00:49:49 <Guest40>     where go curr pred next xs = if pred curr
00:49:50 <Guest40>                                         then xs
00:49:50 <Guest40>                                     else go (next curr) pred next (curr : xs)
00:49:51 <Guest40> is there a function in base/monad-loops/some other library that replicates this functionality but with more polymorphism?
00:50:47 <EvanR> no need for monads there
00:51:23 <EvanR> but you could rewrite it using a combination of existing functions
00:51:51 × machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 264 seconds)
00:52:20 <EvanR> :t \seed pred next -> takeWhile pred (iterate next seed)
00:52:21 <lambdabot> a -> (a -> Bool) -> (a -> a) -> [a]
00:53:57 <EvanR> cheater, any idea what the operator :>: is?
00:54:33 <cheater> some sorta subtyping shit?
00:54:42 <cheater> i think i saw it used with effects
00:54:44 <cheater> or with servant
00:55:34 <EvanR> Guest40, loop seed pred next = takeWhile pred (iterate next seed)
00:56:01 <EvanR> you might be able to rearrange the arguments to make that a nicer combo
00:56:25 <cheater> EvanR: where did you see it
00:56:48 <EvanR> it's in the article complaining about how haskell syntax is terse and incomprehensible because of operators such as >>=, <$>, and :>:
00:57:03 <EvanR> you don't usually get complaints about this last one xD
00:57:05 <cheater> why are you reading articles like that
00:57:07 <cheater> it's unhealthy
00:59:04 <Guest40> EvanR Makes sense, thanks
01:04:11 × pointlessslippe1 quits (~pointless@212.82.82.3) (Ping timeout: 264 seconds)
01:06:06 <EvanR> gratuitous awful use of monads for the same thing
01:06:15 <EvanR> :t \seed pred next -> execWriter (fix (\loop s -> if pred s then return () else tell s >> loop (next s)) seed)
01:06:16 <lambdabot> Monoid t => t -> (t -> Bool) -> (t -> t) -> t
01:07:13 <EvanR> ok that's botched
01:07:46 <EvanR> :t \seed pred next -> execWriter (fix (\loop s -> if pred s then return () else tell [s] >> loop (next s)) seed)
01:07:47 <lambdabot> t -> (t -> Bool) -> (t -> t) -> [t]
01:16:12 × Guest40 quits (~Guest40@c-98-37-216-109.hsd1.ca.comcast.net) (Quit: Client closed)
01:16:26 <joeyadams> :t \predicate -> takeWhile predicate . iterate
01:16:27 <lambdabot> error:
01:16:27 <lambdabot> • Couldn't match type ‘a1 -> [a1]’ with ‘[a]’
01:16:27 <lambdabot> Expected type: (a1 -> a1) -> [a]
01:17:51 <joeyadams> :t \pred next seed -> takeWhile pred (iterate next seed)
01:17:52 <lambdabot> (a -> Bool) -> (a -> a) -> a -> [a]
01:18:04 <joeyadams> I think that's what Guest40 was looking for, but I was 10 seconds too late.
01:18:18 × waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 268 seconds)
01:21:19 <EvanR> yeah I said that one
01:21:34 <EvanR> to compose all that you will need .:
01:23:25 <EvanR> @define (.:) = (.) . (.)
01:23:26 <lambdabot> Defined.
01:23:39 <EvanR> :t \predicate -> takeWhile predicate .: iterate
01:23:40 <lambdabot> (a -> Bool) -> (a -> a) -> a -> [a]
01:23:53 <EvanR> but I don't know if that's very clear
01:29:19 <geekosaur> they should have used that operator instead of :>:
01:44:13 divya joins (~user@202.170.201.94)
01:44:48 × divya quits (~user@202.170.201.94) (Client Quit)
01:45:14 divya joins (~user@202.170.201.94)
01:51:02 <monochrom> Also, a -> Maybe a is better than a pair of a->Bool, a->a.
01:53:50 <EvanR> iterate doesn't work with a -> Maybe a :(
01:54:16 <EvanR> :t unfoldr
01:54:17 <lambdabot> (b -> Maybe (a, b)) -> b -> [a]
01:54:22 <monochrom> iterate doesn't plan to end. But you can use unfoldr.
01:54:50 <monochrom> And there is a reason why it is not a triple of b->Bool, b->a, b->b.
01:55:17 <EvanR> after all this shenanigans are worked out, I can finally create my a -> Maybe a to feed into it by combining my a -> a and a -> Bool that I started with xD
01:55:58 <monochrom> Despite how much misguided beginners wish for it in, e.g., https://discourse.haskell.org/t/equivalence-of-unfoldr-and-unfold/9657
01:57:12 <EvanR> :t \f seed -> unfoldr (let g x = (x,x) in g . f) seed
01:57:13 <lambdabot> error:
01:57:13 <lambdabot> • Couldn't match type ‘(b, b)’ with ‘Maybe (a1, a)’
01:57:13 <lambdabot> Expected type: a -> Maybe (a1, a)
01:57:35 <EvanR> :t \f seed -> unfoldr (let g x = (x,x) in fmap g f) seed
01:57:36 <lambdabot> error:
01:57:36 <lambdabot> • Couldn't match type ‘(b1, b1)’ with ‘Maybe (a, b)’
01:57:36 <lambdabot> Expected type: b -> Maybe (a, b)
01:57:40 <EvanR> frak
01:59:07 <monochrom> I think it is fmap g . f
01:59:39 <EvanR> :t \f seed -> unfoldr (let g x = (x,x) in fmap (fmap g) f) seed
01:59:40 <lambdabot> (a -> Maybe a) -> a -> [a]
02:00:07 <monochrom> :)
02:01:32 <EvanR> :t \next pred x -> if pred x then Nothing else Just (next x)
02:01:33 <lambdabot> (t -> a) -> (t -> Bool) -> t -> Maybe a
02:02:28 <EvanR> apparently the types can change
02:08:27 <probie> :t \f seed -> catMaybes $ takeWhile isJust $ iterate (>>= f) (Just seed)
02:08:29 <lambdabot> (a -> Maybe a) -> a -> [a]
02:16:07 <probie> :t unfoldr . (fmap (join (,)) .)
02:16:08 <lambdabot> (a -> Maybe a) -> a -> [a]
02:39:23 philopsos1 joins (~caecilius@user/philopsos)
02:56:21 × td_ quits (~td@i53870920.versanet.de) (Ping timeout: 268 seconds)
02:58:04 td_ joins (~td@i5387092E.versanet.de)
03:07:13 × rdcdr quits (~rdcdr@user/rdcdr) (Read error: Connection reset by peer)
03:09:15 × y04nn quits (~username@2a03:1b20:8:f011::e10d) (Ping timeout: 264 seconds)
03:11:54 Lycurgus joins (~georg@user/Lycurgus)
03:45:57 aforemny joins (~aforemny@2001:9e8:6cf6:d100:13b7:91e0:122d:7bf6)
03:47:13 × aforemny_ quits (~aforemny@i59F516DE.versanet.de) (Ping timeout: 256 seconds)
04:00:21 Garbanzo joins (~Garbanzo@2602:304:6eac:dc10:fbf2:b01f:1d47:7542)
04:03:27 <probie> I don't suppose anyone knows what language I mean when I say "functional, but looks procedural with an effect system with some sort of reference counting". I can't seem to recall the name or even enough for a search engine to find it
04:05:06 <glguy> Nim?
04:07:17 <probie> Nah, it was newer than that (and not production ready)
04:09:27 <probie> Found it; https://koka-lang.github.io (sorry for the slightly off-topic spam)
04:15:41 <Lycurgus> it's on topic for telepathy, my last interlocution here
04:17:20 <Lycurgus> also this is a pretty permissive channel, and that query was about FP
04:24:45 Guest27 joins (~Guest37@123.24.49.96)
04:24:55 michalz joins (~michalz@185.246.207.201)
04:26:15 × Guest27 quits (~Guest37@123.24.49.96) (Client Quit)
04:30:24 × euleritian quits (~euleritia@dynamic-176-000-199-065.176.0.pool.telefonica.de) (Read error: Connection reset by peer)
04:30:41 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
04:31:15 × vadparaszt quits (~Rodney@176.254.244.83) (Quit: Connection error?!)
04:31:23 vizimajac joins (vizimajac@shell.xshellz.com)
04:45:56 <mauke> "with some sort of reference counting" made me think of perceus
04:46:42 <mauke> ... which is indeed what's implemented in koka: https://www.microsoft.com/en-us/research/publication/perceus-garbage-free-reference-counting-with-reuse/
04:57:18 × sp1ff quits (~user@c-24-21-45-157.hsd1.wa.comcast.net) (Read error: Connection reset by peer)
04:58:26 sp1ff joins (~user@c-24-21-45-157.hsd1.wa.comcast.net)
05:07:24 × philopsos1 quits (~caecilius@user/philopsos) (Ping timeout: 268 seconds)
05:11:17 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds)
05:11:50 × sympt quits (~sympt@user/sympt) (Ping timeout: 252 seconds)
05:15:15 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:16:28 euleritian joins (~euleritia@dynamic-176-004-148-108.176.4.pool.telefonica.de)
05:17:47 × euleritian quits (~euleritia@dynamic-176-004-148-108.176.4.pool.telefonica.de) (Read error: Connection reset by peer)
05:19:05 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
05:25:27 × superbil quits (~superbil@1-34-176-171.hinet-ip.hinet.net) (Ping timeout: 260 seconds)
05:30:01 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
05:37:40 superbil joins (~superbil@1-34-176-171.hinet-ip.hinet.net)
05:56:50 × Garbanzo quits (~Garbanzo@2602:304:6eac:dc10:fbf2:b01f:1d47:7542) (Remote host closed the connection)
06:04:50 y04nn joins (~username@2a03:1b20:8:f011::e10d)
06:05:44 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds)
06:06:29 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
06:07:07 euleritian joins (~euleritia@dynamic-176-004-148-108.176.4.pool.telefonica.de)
06:11:10 × Lycurgus quits (~georg@user/Lycurgus) (Quit: leaving)
06:15:15 × joeyadams quits (~joeyadams@2603:6010:5100:2ed:3133:5b8c:8231:983f) (Quit: Leaving)
06:15:37 × rvalue quits (~rvalue@user/rvalue) (Read error: Connection reset by peer)
06:16:08 rvalue joins (~rvalue@user/rvalue)
06:27:18 Flow_ joins (~none@gentoo/developer/flow)
06:27:31 qhong joins (~qhong@rescomp-21-400677.stanford.edu)
06:27:50 × Flow quits (~none@gentoo/developer/flow) (Read error: Connection reset by peer)
06:34:46 lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
06:37:48 dcoutts joins (~duncan@212.23.229.86)
06:39:25 rdcdr joins (~rdcdr@user/rdcdr)
06:41:51 × y04nn quits (~username@2a03:1b20:8:f011::e10d) (Ping timeout: 255 seconds)
06:52:18 oo_miguel joins (~Thunderbi@78-11-181-16.static.ip.netia.com.pl)
07:01:49 <cheater> i'm surprised we don't have refcounting in ghc
07:02:09 <cheater> you'd think that would be the one thing a functional language would be good at
07:03:38 × dcoutts quits (~duncan@212.23.229.86) (Ping timeout: 268 seconds)
07:04:21 dcoutts joins (~duncan@212.23.229.86)
07:04:45 <probie> refcounting is a poor choice for a lazy language where cycles lurk everywhere
07:07:10 gmg joins (~user@user/gehmehgeh)
07:07:44 pointlessslippe1 joins (~pointless@212.82.82.3)
07:08:00 acidjnk joins (~acidjnk@p200300d6e714dc68856d8905203ea039.dip0.t-ipconnect.de)
07:09:40 sord937 joins (~sord937@gateway/tor-sasl/sord937)
07:13:56 × dcoutts quits (~duncan@212.23.229.86) (Ping timeout: 252 seconds)
07:15:21 × jespada_ quits (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Ping timeout: 268 seconds)
07:18:00 fun-safe-math joins (~fun-safe-@24.21.106.247)
07:18:01 zetef joins (~quassel@136.255.76.202)
07:22:47 jespada joins (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net)
07:23:12 chele joins (~chele@user/chele)
07:27:17 × zetef quits (~quassel@136.255.76.202) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
07:31:18 × euleritian quits (~euleritia@dynamic-176-004-148-108.176.4.pool.telefonica.de) (Read error: Connection reset by peer)
07:31:47 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
07:34:27 × jle` quits (~jle`@2603:8001:3b02:84d4:f1a2:838a:8749:d076) (Ping timeout: 256 seconds)
07:34:39 × Luj quits (~Luj@2a01:e0a:de4:a0e1:be24:11ff:febc:b5b5) (Quit: Ping timeout (120 seconds))
07:34:58 Luj joins (~Luj@2a01:e0a:de4:a0e1:be24:11ff:febc:b5b5)
07:35:33 jle` joins (~jle`@2603:8001:3b02:84d4:8e83:44df:afb0:80e1)
07:45:07 rosco joins (~rosco@175.136.155.137)
07:46:18 sadome joins (~sadome@user/sadome)
07:46:19 × sadome quits (~sadome@user/sadome) (Excess Flood)
07:49:00 target_i joins (~target_i@user/target-i/x-6023099)
07:53:55 danza joins (~francesco@rm-19-59-6.service.infuturo.it)
07:57:28 machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net)
07:57:56 × rachelambda quits (~rachelamb@cust-95-80-25-71.csbnet.se) (Ping timeout: 252 seconds)
07:59:59 dcoutts joins (~duncan@212.23.229.86)
08:00:35 × fun-safe-math quits (~fun-safe-@24.21.106.247) (Ping timeout: 264 seconds)
08:03:55 <cheater> eh
08:04:03 <cheater> there's solutions to that...
08:05:03 × dcoutts quits (~duncan@212.23.229.86) (Ping timeout: 264 seconds)
08:06:51 × danza quits (~francesco@rm-19-59-6.service.infuturo.it) (Ping timeout: 264 seconds)
08:15:02 pyooque joins (~puke@user/puke)
08:15:02 puke is now known as Guest6730
08:15:02 × Guest6730 quits (~puke@user/puke) (Killed (mercury.libera.chat (Nickname regained by services)))
08:15:02 pyooque is now known as puke
08:16:25 × puke quits (~puke@user/puke) (Max SendQ exceeded)
08:16:35 rachelambda joins (~rachelamb@cust-95-80-25-71.csbnet.se)
08:18:09 puke joins (~puke@user/puke)
08:19:22 × puke quits (~puke@user/puke) (Max SendQ exceeded)
08:19:51 puke joins (~puke@user/puke)
08:20:16 × puke quits (~puke@user/puke) (Remote host closed the connection)
08:28:51 <probie> the solution is garbage collection
08:32:13 × rachelambda quits (~rachelamb@cust-95-80-25-71.csbnet.se) (Ping timeout: 272 seconds)
08:33:00 danse-nr3 joins (~danse-nr3@rm-19-59-6.service.infuturo.it)
08:33:34 × danse-nr3 quits (~danse-nr3@rm-19-59-6.service.infuturo.it) (Remote host closed the connection)
08:33:58 danse-nr3 joins (~danse-nr3@rm-19-59-6.service.infuturo.it)
08:52:20 sawilagar joins (~sawilagar@user/sawilagar)
08:56:12 × tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
08:56:25 × Franciman quits (~Franciman@mx1.fracta.dev) (Ping timeout: 255 seconds)
08:59:50 cpressey joins (~weechat@33b62f0c.skybroadband.com)
09:00:51 lxsameer joins (~lxsameer@Serene/lxsameer)
09:09:15 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
09:14:29 zmt01 joins (~zmt00@user/zmt00)
09:18:04 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 268 seconds)
09:18:35 × ft quits (~ft@p508db8fc.dip0.t-ipconnect.de) (Quit: leaving)
09:21:31 <lortabac> is there a cabal option to force recompilation of a single file? I have some Template Haskell code which needs to be executed on each build
09:22:37 <sclv> nope. you can add a dependent file in th tho which forces recomp if that dependent file changed
09:23:06 <sclv> or have a build.sh that touches the file then runs cabal build
09:25:41 <tomsmeding> lortabac: https://hackage.haskell.org/package/template-haskell-2.18.0.0/docs/Language-Haskell-TH-Syntax.html#v:addDependentFile
09:27:15 <lortabac> tomsmeding: this doesn't look like what I was asking for
09:27:38 <tomsmeding> it's not, but if the reason you want to re-execute is that some non-haskell file changed, then that might have been the solution to the X problem :)
09:28:27 <lortabac> the TH code returns the current Git hash
09:29:21 <lortabac> maybe I can add some Git internal file as a dependent file?
09:29:22 <tomsmeding> hm, yeah there's not a single file that contains that
09:29:30 <tomsmeding> .git/HEAD contains a ref, but not necessarily the commit hash
09:29:42 cfricke joins (~cfricke@user/cfricke)
09:29:47 <tomsmeding> you could parse that manually and add a dependent file on .git/refs/heads/THE_HEAD_NAME
09:31:44 <lortabac> maybe .git/refs/heads/production
09:31:53 <tomsmeding> if you know that it will always be that branch :p
09:32:01 <lortabac> yes it's always that branch
09:32:06 <tomsmeding> then yes
09:32:32 <tomsmeding> it will depend on the wrong file if switch branches then, though
09:32:39 <tomsmeding> *if you
09:32:55 <lortabac> not an ideal solution because if we change our deployment strategy we need to remember to update the dependent file as well
09:33:21 <lortabac> probably a full 'cabal clean' is a better option
09:33:23 <tomsmeding> yeah, more robust would be parsing .git/HEAD and referring to that file
09:33:43 <lortabac> or as you say, parsing .git/HEAD
09:33:44 <tomsmeding> where you should note that if you checkout a commit ("detached HEAD"), .git/HEAD just contains a commit hash
09:34:54 <sclv> people often use a cusrom
09:35:06 <sclv> a custom setup with hooks for this
09:35:21 <tomsmeding> wouldn't the Setup.hs still need to figure out exactly what files to depend on
09:35:27 <sclv> but i think its cleaner to avoid that using just th
09:35:28 <tomsmeding> or does cabal run Setup every time the user compiles?
09:36:26 <sclv> it runs some setup phases. but custom setups are fragile and don’t always work with newer features like multirepl
09:37:41 × econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
09:42:01 __monty__ joins (~toonn@user/toonn)
09:50:30 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 4.2.2)
09:50:50 rachelambda joins (~rachelamb@cust-95-80-25-71.csbnet.se)
10:05:37 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.2)
10:06:53 alexherbo2 joins (~alexherbo@45.39.22.93.rev.sfr.net)
10:12:01 × alexherbo2 quits (~alexherbo@45.39.22.93.rev.sfr.net) (Remote host closed the connection)
10:17:08 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
10:28:07 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
10:31:35 alexherbo2 joins (~alexherbo@45.39.22.93.rev.sfr.net)
10:36:54 dcoutts joins (~duncan@212.23.229.86)
10:45:06 × CrunchyFlakes quits (~CrunchyFl@146.52.130.128) (Read error: Connection reset by peer)
10:45:36 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
10:46:06 tt12310978 joins (~tt1231@2603:6010:8700:4a81:219f:50d3:618a:a6ee)
10:47:01 CrunchyFlakes joins (~CrunchyFl@146.52.130.128)
10:47:59 × dcoutts quits (~duncan@212.23.229.86) (Ping timeout: 264 seconds)
10:48:54 × tt1231097 quits (~tt1231@2603:6010:8700:4a81:219f:50d3:618a:a6ee) (Ping timeout: 255 seconds)
10:48:54 tt12310978 is now known as tt1231097
10:53:32 Guest|68 joins (~Guest|68@222-153-150-75-adsl.sparkbb.co.nz)
10:56:26 causal joins (~eric@50.35.88.207)
11:11:00 CiaoSen joins (~Jura@2a05:5800:2b1:db00:e6b9:7aff:fe80:3d03)
11:12:13 dcoutts joins (~duncan@212.23.229.86)
11:19:43 × danse-nr3 quits (~danse-nr3@rm-19-59-6.service.infuturo.it) (Ping timeout: 246 seconds)
11:20:31 × divya quits (~user@202.170.201.94) (Read error: Connection reset by peer)
11:28:30 × acidsys quits (~crameleon@openSUSE/member/crameleon) (Ping timeout: 268 seconds)
11:29:36 × m1dnight quits (~christoph@82.146.125.185) (Quit: WeeChat 4.2.2)
11:31:04 m1dnight joins (~christoph@82.146.125.185)
11:31:43 × m1dnight quits (~christoph@82.146.125.185) (Client Quit)
11:32:09 m1dnight joins (~christoph@82.146.125.185)
11:42:45 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
11:43:47 × Guest|68 quits (~Guest|68@222-153-150-75-adsl.sparkbb.co.nz) (Ping timeout: 256 seconds)
11:44:41 cfricke joins (~cfricke@user/cfricke)
11:45:56 acidsys joins (~crameleon@openSUSE/member/crameleon)
11:49:07 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 246 seconds)
11:54:11 × Guest91 quits (~Guest91@ool-2f109624.dyn.optonline.net) (Quit: Client closed)
11:54:35 × noctux quits (~noctux@user/noctux) (Ping timeout: 264 seconds)
11:54:56 noctux joins (~noctux@user/noctux)
11:56:39 × cpressey quits (~weechat@33b62f0c.skybroadband.com) (Ping timeout: 264 seconds)
11:59:36 cfricke joins (~cfricke@user/cfricke)
12:06:13 × dev2 quits (~dev@2405:201:c062:801d:74fb:a90f:fd55:89e8) (Quit: WeeChat 4.3.1)
12:12:32 lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
12:17:31 danse-nr3 joins (~danse-nr3@151.44.179.149)
12:18:11 × danse-nr3 quits (~danse-nr3@151.44.179.149) (Remote host closed the connection)
12:18:52 danse-nr3 joins (~danse-nr3@151.44.179.149)
12:34:37 × alexherbo2 quits (~alexherbo@45.39.22.93.rev.sfr.net) (Remote host closed the connection)
12:40:31 × califax quits (~califax@user/califx) (Remote host closed the connection)
12:41:31 andrei_n joins (~andrei_n@user/andrei-n:62396)
12:42:14 califax joins (~califax@user/califx)
12:46:59 × danse-nr3 quits (~danse-nr3@151.44.179.149) (Remote host closed the connection)
12:47:11 alexherbo2 joins (~alexherbo@2a02-8440-3313-51a8-f0e2-1840-0dc8-1db7.rev.sfr.net)
12:50:28 danse-nr3 joins (~danse-nr3@151.44.179.149)
12:54:41 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
12:56:19 × ames quits (~amelia@offtopia/offtopian/amelia) (Ping timeout: 272 seconds)
13:05:55 bontaq joins (~user@ool-45779c03.dyn.optonline.net)
13:09:28 wootehfoot joins (~wootehfoo@user/wootehfoot)
13:10:19 <danse-nr3> what is the name for the alternative operator <|>?
13:11:33 <ncf> <|>
13:11:35 <cheater> alternative
13:11:51 <cheater> or, alternatively, "bracket pipe"
13:12:12 <danse-nr3> cheers cheater
13:12:26 <cheater> haha, ncf gets nothing
13:12:37 <cheater> :P
13:12:58 <danse-nr3> err sorry but i don't know what to do with that answer if not ignoring it :P
13:13:00 Guest8 joins (~Guest91@ool-2f109624.dyn.optonline.net)
13:13:44 <ncf> https://en.wikipedia.org/wiki/Garbage_in,_garbage_out
13:14:07 <cheater> now now, ncf, no need to be self-deprecating :P
13:17:46 × califax quits (~califax@user/califx) (Remote host closed the connection)
13:17:49 <danse-nr3> @hoogle (Foldable t, Alternative a) => t a -> a
13:17:51 <lambdabot> Test.Extrapolate.TypeBinding argTy1of1 :: con a -> a
13:17:51 <lambdabot> Prelude maximum :: forall a . (Foldable t, Ord a) => t a -> a
13:17:51 <lambdabot> Prelude minimum :: forall a . (Foldable t, Ord a) => t a -> a
13:18:46 <danse-nr3> foldr (<|>) i guess
13:19:07 <ncf> :t asum
13:19:09 <lambdabot> (Foldable t, Alternative f) => t (f a) -> f a
13:19:20 <danse-nr3> facepalm
13:19:22 <ncf> wait what
13:19:24 <ncf> Alternative a?
13:19:41 <ncf> i guess hoogle doesn't kind-check lol
13:20:26 <danse-nr3> thanks ncf
13:20:58 califax joins (~califax@user/califx)
13:28:10 <raehik> I call (<|>) "or" when I need a non-infix name am I weird
13:28:35 <raehik> "choice" came across the mind but I just like "or" better
13:29:31 Midjak joins (~MarciZ@82.66.147.146)
13:30:34 <__monty__> @hoogle choice
13:30:35 <lambdabot> Text.ParserCombinators.ReadP choice :: [ReadP a] -> ReadP a
13:30:35 <lambdabot> Text.ParserCombinators.ReadPrec choice :: [ReadPrec a] -> ReadPrec a
13:30:35 <lambdabot> Text.Parsec choice :: Stream s m t => [ParsecT s u m a] -> ParsecT s u m a
13:31:04 <__monty__> Already commonly means `foldr1 (<|>)`, no?
13:33:34 <danse-nr3> not sure signatures do not mention alternative, seems more a different abstraction
13:34:26 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.2)
13:34:36 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds)
13:34:54 <danse-nr3> "or" makes sense but i would rather not overload existing concepts
13:35:45 <danse-nr3> (also because "alt" isn't much longer)
13:37:45 <ncf> so your question is how to read it out loud?
13:37:50 euleritian joins (~euleritia@dynamic-176-004-153-084.176.4.pool.telefonica.de)
13:43:17 Square joins (~Square4@user/square)
13:44:08 <danse-nr3> well sure
13:49:12 × Guest8 quits (~Guest91@ool-2f109624.dyn.optonline.net) (Quit: Client closed)
13:49:34 dev2 joins (~dev@2405:201:c062:801d:4d6f:d1e8:5a8c:26e3)
13:50:09 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 256 seconds)
14:00:39 <EvanR> is there an esoteric programming language which doesn't work unless you read the code aloud
14:03:02 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:03:52 <danse-nr3> not sure but humans have generally benefited from being able to name things
14:04:57 × alexherbo2 quits (~alexherbo@2a02-8440-3313-51a8-f0e2-1840-0dc8-1db7.rev.sfr.net) (Remote host closed the connection)
14:05:17 <EvanR> in programming there turns out to be a lot of opportunities to name things, too many. See single assignment form
14:05:31 <EvanR> we skip ahead of the animals by eliding most of it and forming expressions
14:05:45 <EvanR> similarly we can read faster by not reading aloud (now)
14:06:47 <EvanR> of course it comes across as in haskell we're too good to name things!
14:07:00 andrei-n joins (~andrei_n@2a02:a03f:c091:a800:6208:726b:3655:52d8)
14:07:06 × andrei-n quits (~andrei_n@2a02:a03f:c091:a800:6208:726b:3655:52d8) (Remote host closed the connection)
14:07:35 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
14:07:50 <EvanR> also not having real names for most of the operators in haskell explains why it avoids success so well. Giant conferences fueled by keynotes and guest speakers can't pronounce anything xD
14:11:03 <danse-nr3> yeah well makes sense not to name ephemeral entities, while more consolidated concepts have names since before getting into a language like haskell for instance. But names sometimes also remain segregated into small circles and have no chance to propagate, that's why i asked
14:12:06 <EvanR> I do appreciate how most of the "operators" in lens are hitherto unused dictionary words
14:12:32 <EvanR> words do be having power
14:15:07 <haskellbridge> <sm> array-oriented languages, apl and family, famous for their obscure glyphs, do also have a word name for each one. That's useful for docs and also for data entry
14:15:19 kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be)
14:15:26 <haskellbridge> <sm> +standardised
14:16:25 <haskellbridge> <sm> in haskell we don't have a standard name for everything
14:17:04 RedFlamingos joins (~RedFlamin@user/RedFlamingos)
14:17:50 × rosco quits (~rosco@175.136.155.137) (Quit: Lost terminal)
14:19:04 <EvanR> sometimes an operator has not a name per se but a long winded description. Like if you see xyzw in group theory, if asked, someone will say the operator (juxtaposition) is "group theoretic multiplication" or something. In category theory "composition of morphisms". Not something you would pronounce in line
14:19:42 <EvanR> and yeah how do you document that
14:21:11 <haskellbridge> <sm> is xyzw a real operator name ?
14:21:27 <haskellbridge> <sm> I see it mentioned as "quaternions" in graphics programming
14:21:39 <EvanR> that's four variables being operatored
14:21:44 <EvanR> abcd
14:21:45 <haskellbridge> <sm> ah
14:21:55 <EvanR> fgh
14:21:57 <haskellbridge> <sm> gotcha
14:22:49 <EvanR> a <|> b <|> c <|> d ... Alternative's sequential failover... or something
14:23:34 Sgeo joins (~Sgeo@user/sgeo)
14:28:52 × ystael quits (~ystael@user/ystael) (Read error: Connection reset by peer)
14:29:19 ystael joins (~ystael@user/ystael)
14:31:29 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
14:39:40 × danse-nr3 quits (~danse-nr3@151.44.179.149) (Ping timeout: 268 seconds)
14:47:58 scav parts (sid309693@user/scav) ()
15:02:14 greenflower joins (~greenflow@103.191.25.63)
15:11:39 × CrunchyFlakes quits (~CrunchyFl@146.52.130.128) (Ping timeout: 264 seconds)
15:14:05 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 252 seconds)
15:14:13 CrunchyFlakes joins (~CrunchyFl@146.52.130.128)
15:23:53 × dcoutts quits (~duncan@212.23.229.86) (Remote host closed the connection)
15:24:16 dcoutts joins (~duncan@212.23.229.86)
15:30:35 × euleritian quits (~euleritia@dynamic-176-004-153-084.176.4.pool.telefonica.de) (Ping timeout: 264 seconds)
15:30:51 euleritian joins (~euleritia@dynamic-176-007-201-187.176.7.pool.telefonica.de)
15:31:46 × dcoutts quits (~duncan@212.23.229.86) (Ping timeout: 268 seconds)
15:32:44 danse-nr3 joins (~danse-nr3@151.44.179.149)
15:33:17 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 240 seconds)
15:36:19 × waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 260 seconds)
15:37:19 × mud quits (~mud@user/kadoban) (Ping timeout: 268 seconds)
15:43:29 × Square quits (~Square4@user/square) (Ping timeout: 268 seconds)
15:47:39 × euleritian quits (~euleritia@dynamic-176-007-201-187.176.7.pool.telefonica.de) (Ping timeout: 264 seconds)
15:51:59 euleritian joins (~euleritia@dynamic-176-001-140-054.176.1.pool.telefonica.de)
15:54:24 × danse-nr3 quits (~danse-nr3@151.44.179.149) (Remote host closed the connection)
15:54:48 danse-nr3 joins (~danse-nr3@151.44.179.149)
15:57:58 × chele quits (~chele@user/chele) (Remote host closed the connection)
16:03:41 × danse-nr3 quits (~danse-nr3@151.44.179.149) (Ping timeout: 240 seconds)
16:04:08 joeyadams joins (~joeyadams@2603:6010:5100:2ed:156b:aa72:70b8:c5f5)
16:04:33 danse-nr3 joins (~danse-nr3@rm-19-3-15.service.infuturo.it)
16:12:04 dcoutts joins (~duncan@46-253-189-44.dynamic.monzoon.net)
16:14:03 × euleritian quits (~euleritia@dynamic-176-001-140-054.176.1.pool.telefonica.de) (Ping timeout: 264 seconds)
16:15:13 × kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection)
16:16:06 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 260 seconds)
16:17:35 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
16:18:48 gmg joins (~user@user/gehmehgeh)
16:19:13 × machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 255 seconds)
16:20:38 × danse-nr3 quits (~danse-nr3@rm-19-3-15.service.infuturo.it) (Ping timeout: 252 seconds)
16:20:42 euleritian joins (~euleritia@dynamic-176-001-140-054.176.1.pool.telefonica.de)
16:20:48 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
16:32:36 × mei quits (~mei@user/mei) (Remote host closed the connection)
16:35:01 mei joins (~mei@user/mei)
16:42:30 Square joins (~Square@user/square)
16:43:59 × greenflower quits (~greenflow@103.191.25.63) (Quit: Client closed)
16:45:21 <lxsameer> hey friends, I'm overwhelmed by the number of packages that offer Expection/Error handling. Do you have any recommendation? my workload is async, And I use a simple ReaderT
16:46:29 × dcoutts quits (~duncan@46-253-189-44.dynamic.monzoon.net) (Ping timeout: 252 seconds)
16:49:56 <Rembane> lxsameer: Lets X/Y this. Why do you need that kind of error handling?
16:50:49 <glguy> You probably don't need any package for it
16:50:54 erty joins (~user@user/aeroplane)
16:52:20 <Rembane> Maybe transformers or mtl?
16:55:12 <lxsameer> Rembane: let me ask you this, how do you handle async Errors in your mtl stack?
16:55:54 <glguy> Do you mean exceptions from the async package, or asynchronous exceptions?
16:56:20 danse-nr3 joins (~danse-nr3@rm-19-3-15.service.infuturo.it)
16:56:32 <lxsameer> asynchronous exceptions
16:56:48 <glguy> You don't handle those in an mtl context, you handle them in an IO context
16:56:54 <Rembane> lxsameer: I'm using the async package to handle them.
16:56:57 <glguy> or ideally you aren't using them
16:57:54 <lxsameer> do you integrate them with your mtl transformer stack?
16:59:29 <Rembane> lxsameer: Like this: https://github.com/dtekcth/mat-chalmers/blob/main/app/Main.hs#L79 but it struck me that this is needed because we run things concurrently in that project.
16:59:39 <Rembane> lxsameer: No, they're not part of the stack.
17:00:26 <Rembane> lxsameer: They're just outside of the stack.
17:00:32 <lxsameer> cool cool
17:00:46 <lxsameer> that makes things simpler
17:00:51 <lxsameer> thank you
17:01:56 <Rembane> No worries. I hope this didn't make you more confused than you were before. :)
17:03:33 <lxsameer> no, it helped a lot.
17:04:31 econo_ joins (uid147250@id-147250.tinside.irccloud.com)
17:05:28 <Rembane> Cool!
17:07:54 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 260 seconds)
17:08:04 igghibu joins (~igghibu@178.249.211.102)
17:08:58 gmg joins (~user@user/gehmehgeh)
17:10:26 × CiaoSen quits (~Jura@2a05:5800:2b1:db00:e6b9:7aff:fe80:3d03) (Ping timeout: 268 seconds)
17:14:41 igghibu_ joins (~igghibu@146.70.225.113)
17:15:05 × CrunchyFlakes quits (~CrunchyFl@146.52.130.128) (Quit: ZNC 1.8.2 - https://znc.in)
17:15:59 CrunchyFlakes joins (~CrunchyFl@146.52.130.128)
17:17:36 × igghibu quits (~igghibu@178.249.211.102) (Ping timeout: 256 seconds)
17:17:39 × danse-nr3 quits (~danse-nr3@rm-19-3-15.service.infuturo.it) (Ping timeout: 264 seconds)
17:21:09 alexherbo2 joins (~alexherbo@2a02-8440-3313-51a8-b4f8-85c4-3803-196a.rev.sfr.net)
17:21:41 × troydm quits (~troydm@user/troydm) (Ping timeout: 252 seconds)
17:22:26 <EvanR> the point of exceptions is NOT handling them, usually xD
17:23:00 <monochrom> Wait, then what is the point?
17:23:09 <EvanR> not handling them
17:23:24 <EvanR> being freed from the burden of handling them, all
17:23:34 <monochrom> Oh heh I see how to parse that now.
17:24:25 <Rembane> Let it crash!
17:24:31 uri39 joins (~uri39@200.23.157.245)
17:25:13 <monochrom> You know, that really ties in with the math. Plotkin was trying to use algebra to explain effects, and he found out that handling exceptions doesn't fit, only raising does.
17:25:40 <dolio> Well, kind of.
17:27:15 <glguy> monochrom: similarly if you only have handling but not raising, that'd be pretty easy to support, too
17:27:16 igghibu joins (~igghibu@146.70.225.113)
17:28:43 <dolio> The type of internal catch can actually come from an algebraic effect.
17:29:29 <dolio> `m a -> (e -> m a) -> m a` is the 'model' view of the effect `pick : Maybe e`
17:29:51 dcoutts joins (~duncan@46-253-189-44.dynamic.monzoon.net)
17:30:04 × igghibu_ quits (~igghibu@146.70.225.113) (Ping timeout: 256 seconds)
17:30:13 <dolio> Like how `m a -> m a -> m a` corresponds to the effect `pick : Bool`.
17:31:05 y04nn joins (~username@2a03:1b20:8:f011::e10d)
17:33:04 <dolio> Of course, if you have `throw` and `pick`, the handler can do whatever it wants with both, meaning `pick` doesn't necessarily have to have anything to do with `throw`. Unless you have equations.
17:33:36 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:38:17 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
17:41:01 × totbwf quits (sid402332@id-402332.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
17:45:16 × joeyadams quits (~joeyadams@2603:6010:5100:2ed:156b:aa72:70b8:c5f5) (Quit: Leaving)
17:49:36 × uri39 quits (~uri39@200.23.157.245) (Quit: Client closed)
17:55:45 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
17:56:30 × alexherbo2 quits (~alexherbo@2a02-8440-3313-51a8-b4f8-85c4-3803-196a.rev.sfr.net) (Remote host closed the connection)
17:59:03 × causal quits (~eric@50.35.88.207) (Quit: WeeChat 4.3.1)
17:59:44 causal joins (~eric@50.35.88.207)
18:04:24 × erty quits (~user@user/aeroplane) (Remote host closed the connection)
18:05:03 × y04nn quits (~username@2a03:1b20:8:f011::e10d) (Ping timeout: 264 seconds)
18:05:37 × SethTisue quits (sid14912@id-14912.ilkley.irccloud.com) (Read error: Connection reset by peer)
18:05:57 × ProofTechnique_ quits (sid79547@id-79547.ilkley.irccloud.com) (Read error: Connection reset by peer)
18:06:05 SethTisue joins (sid14912@id-14912.ilkley.irccloud.com)
18:06:08 × igghibu quits (~igghibu@146.70.225.113) (Quit: igghibu)
18:06:19 × alanz quits (sid110616@id-110616.uxbridge.irccloud.com) (Read error: Connection reset by peer)
18:06:20 × JSharp quits (sid4580@user/JSharp) (Ping timeout: 256 seconds)
18:06:30 alanz joins (sid110616@id-110616.uxbridge.irccloud.com)
18:06:50 JSharp joins (sid4580@user/JSharp)
18:06:51 ProofTechnique_ joins (sid79547@id-79547.ilkley.irccloud.com)
18:06:54 × sa quits (sid1055@id-1055.tinside.irccloud.com) (Ping timeout: 256 seconds)
18:06:54 × lally quits (sid388228@id-388228.uxbridge.irccloud.com) (Ping timeout: 256 seconds)
18:06:54 × aristid quits (sid1599@id-1599.uxbridge.irccloud.com) (Ping timeout: 256 seconds)
18:08:57 aristid joins (sid1599@id-1599.uxbridge.irccloud.com)
18:09:02 lally joins (sid388228@id-388228.uxbridge.irccloud.com)
18:10:03 sa joins (sid1055@id-1055.tinside.irccloud.com)
18:10:46 cpressey joins (~weechat@33b62f0c.skybroadband.com)
18:13:08 × sclv quits (sid39734@haskell/developer/sclv) (Ping timeout: 256 seconds)
18:13:42 × jackdk quits (sid373013@cssa/jackdk) (Ping timeout: 256 seconds)
18:13:56 jackdk joins (sid373013@cssa/jackdk)
18:14:00 sclv joins (sid39734@haskell/developer/sclv)
18:19:28 <tomsmeding> I thought `vector`'s fusion framework was suppose to make things faster, but `sum (force (concat l))` is almost 4x as fast as `sum (concat l)`, undependently of `length l` (tested lengths: [0, 10, 100, 1000] with lengths of vectors so that there are 1e6 elements in total)
18:19:40 <tomsmeding> *independently
18:21:57 × causal quits (~eric@50.35.88.207) (Quit: WeeChat 4.3.1)
18:22:40 causal joins (~eric@50.35.88.207)
18:26:40 × dcoutts quits (~duncan@46-253-189-44.dynamic.monzoon.net) (Remote host closed the connection)
18:26:57 dcoutts joins (~duncan@46-253-189-44.dynamic.monzoon.net)
18:31:44 <int-e> I'd *guess* that `force` causes the code to actually materialize the intermediate vector, while without `force` the code fuses perfectly.
18:31:51 <tomsmeding> indeed
18:32:02 <tomsmeding> the intent of that 'force' there was to break fusion
18:32:09 <tomsmeding> but then why is the one without fusion _faster_?
18:32:33 <tomsmeding> and not a little bit too
18:32:35 <int-e> Aha, I misread.
18:32:39 × cpressey quits (~weechat@33b62f0c.skybroadband.com) (Ping timeout: 264 seconds)
18:33:59 × euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.)
18:34:10 y04nn joins (~username@2a03:1b20:8:f011::e10d)
18:36:14 × picnoir quits (~picnoir@about/aquilenet/vodoo/NinjaTrappeur) (Quit: WeeChat 4.2.2)
18:37:10 × Sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Quit: o/)
18:38:03 picnoir joins (~picnoir@about/aquilenet/vodoo/NinjaTrappeur)
18:38:59 euphores joins (~SASL_euph@user/euphores)
18:40:55 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
18:41:19 dmj` joins (uid72307@id-72307.hampstead.irccloud.com)
18:41:26 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:42:26 gmg joins (~user@user/gehmehgeh)
18:44:08 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
18:44:18 × dcoutts quits (~duncan@46-253-189-44.dynamic.monzoon.net) (Ping timeout: 256 seconds)
18:48:18 <c_wraith> tomsmeding: does it depend on how you generate l?
18:49:40 tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net)
18:50:13 <tomsmeding> c_wraith: the creation of `l` is intentionally separated from the consumption in `concat`; the `sum (concat l)` is inside Test.Tasty.Bench.nf and the creation of `l` is outside of it
18:50:45 <tomsmeding> (it's `replicate n (VS.enumFromTo (1::Int) k)`, where n and k vary as above)
18:51:08 <tomsmeding> I haven't tried other ways of generating l, but I would imagine it doesn't matter much because fusion cannot connect the two
18:51:52 <c_wraith> Oh, putting it outside means it'll be reused, so definitely can't be fused.
18:52:03 <int-e> Can't replicate that in isolation. Can confirm that the `force` version allocates more. This is with https://paste.tomsmeding.com/KZhEHgUI to prevent cross-optimization with generation of the vectors
18:52:06 <tomsmeding> ah, also that
18:53:01 <int-e> (the extra argument is there so I can evaluate that multiple times without GHC seeing any sharing)
18:54:02 <tomsmeding> int-e: also not with Data.Vector.Storable?
18:54:30 <tomsmeding> (perhaps I should've specified that I'm using storable vectors)
18:54:51 <int-e> yeah, qualitatively the same with .Storable
18:55:27 <int-e> For .Storable `foo` is 5x faster in my test; without boxed vectos it's only 2x faster.
18:55:49 <tomsmeding> hm, let me see
18:56:44 <int-e> compiling with -O2, I wonder whether -O changes anything... it does!
18:57:12 <int-e> With -O the version without `force` *is* slower.
18:57:17 <tomsmeding> aha!
18:57:21 <int-e> That's... interesting.
18:58:04 <int-e> I did not expect to see code for which -O2 is almost 20x faster than -O.
18:58:41 <tomsmeding> int-e: which vector lengths are you using that you get 20x? :p
18:58:52 <int-e> I used replicate 100 (V.fromList [1..10000])
18:59:09 <int-e> so 1e6
18:59:37 <int-e> tomsmeding: the 20x is for `foo`, compiled with -O vs -O2
18:59:44 <tomsmeding> I see, I get the same
19:00:29 <tomsmeding> fun!
19:00:44 <int-e> with -O, foo is ~2x slower than bar; with -O2 foo is ~5x faster than bar. Insane.
19:00:54 <dolio> vector's fusion is very complicated. I'm not exactly sure what would depend on -O2, but I guess with just -O there is some cruft left over.
19:01:08 <tomsmeding> I tried this: https://paste.tomsmeding.com/spBJbnoo
19:01:26 <tomsmeding> with -O1, foo / bar is ~4.2; with _O2, foo / bar is ~0.11
19:01:32 <tomsmeding> *-O2
19:01:41 <tomsmeding> dolio: evidently!
19:01:54 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
19:02:26 <dolio> Like, it does things like building multiple ways for every expression to be evaluated, then expecting the compiler to throw most of them out.
19:03:17 <tomsmeding> laziness would presumably throw them out anyway, but at an overhead cost
19:04:43 <int-e> So this shows additional rules firing: (-ddump-rule-firings) https://paste.tomsmeding.com/3kUGXgp4
19:06:20 <int-e> I'm not sure what those rules are.
19:06:43 Sciencentistguy joins (~sciencent@hacksoc/ordinary-member)
19:07:00 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
19:07:43 <tomsmeding> that "Rule fired: +# (BUILTIN)" looks helpful
19:07:50 <tomsmeding> just from the name
19:10:13 joeyadams joins (~joeyadams@2603:6010:5100:2ed:156b:aa72:70b8:c5f5)
19:10:54 <dolio> I think some of those others are worker-wrapper.
19:11:14 cpressey joins (~weechat@33b62f0c.skybroadband.com)
19:11:30 <int-e> tomsmeding: https://paste.tomsmeding.com/z6BIxayL
19:12:30 <int-e> (that's for `foo`, the version without `force`)
19:12:32 ft joins (~ft@p3e9bcb39.dip0.t-ipconnect.de)
19:12:39 <tomsmeding> it unpacked the Either as if it was a product type?
19:12:57 <tomsmeding> wait, no it didn't
19:13:22 <int-e> I /think/ it can split the function into two, one for Left and one for Right.
19:13:28 <tomsmeding> int-e: is this inner loop for every scalar, or for every vector?
19:13:47 <tomsmeding> s/scalar/int/
19:13:49 <int-e> This /may/ come down to the (fragile) choice of loop breakers in recursive functions.
19:14:02 <int-e> for every scalar
19:14:06 <tomsmeding> oof okay
19:14:33 <tomsmeding> oh I see, the Right case is "currently reducing this vector at this cursor, and this is the remaining work" probably
19:15:31 visilii_ joins (~visilii@46.61.242.35)
19:15:40 <tomsmeding> anyway, this is apparently not a bug in vector :)
19:15:41 <int-e> yeah
19:16:00 <int-e> I'm not agreeing that this is a bug
19:16:00 <tomsmeding> luckily -- it would've been a bit embarrassing if it had been
19:16:20 <tomsmeding> I said this is _not_ a bug in vector
19:16:24 <tomsmeding> I thought originally that it might be
19:16:40 <int-e> GHC is *supposed* to eliminate that Either, but it's tricky to make it do that reliably.
19:16:41 <tomsmeding> but if the solution is "use -O2 if you want vector to be fast", that's fair
19:16:50 <int-e> Oh I still can't read.
19:16:51 <int-e> Sigh.
19:16:53 <tomsmeding> :)
19:17:19 <int-e> Anyway I hope my net contribution is still positive :)
19:17:26 <tomsmeding> definitely
19:17:29 <monochrom> yes, no worries
19:17:42 <tomsmeding> I've been told too often that -O2 typically doesn't do much
19:17:47 × visilii quits (~visilii@213.24.125.2) (Ping timeout: 268 seconds)
19:17:56 <tomsmeding> but I forgot the part after that, which goes "then profile and check if -O2 does actually help in your case"
19:18:04 <monochrom> Right, but I think bytestring, text, vector need it.
19:18:30 <tomsmeding> text and vector have fusion frameworks which I can imagine need -O2 (given this discussion), but bytestring doesn't do anything special, right?
19:18:32 <monochrom> Basically the only exceptions because they go ham with fusion.
19:18:35 <int-e> Anyway, I can't explain why GHC does so terribly with -O here... picking the wrong loop breaker is my guess but I barely know what they are, never mind how GHC picks them.
19:19:25 <tomsmeding> it's indeed probably a single missed optimisation somewhere that makes the carefully constructed castle collapse
19:19:47 <monochrom> I think we would call that a house of cards. :)
19:19:52 <tomsmeding> ah, we do
19:20:31 <monochrom> jenga :)
19:20:36 <int-e> I'd imagine that bytestring is in the same boat in principle. Maybe a bit simpler and more battle-proven (i.e. GHC and bytestring both have been tuned a bit more to work well together.)
19:20:51 <tomsmeding> does bytestring have fusion stuff?
19:20:57 <int-e> yes
19:21:18 <int-e> it's where stream fusion was first implemented
19:22:08 <tomsmeding> oh via RULES only
19:22:14 <tomsmeding> vector does _much_ more than rules
19:22:28 × Batzy quits (~quassel@user/batzy) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
19:22:47 <tomsmeding> which, incidentally, is profoundly annoying if you want to figure out how a particular vector operaetion is implemented :p
19:22:52 Batzy joins (~quassel@user/batzy)
19:23:55 <tomsmeding> but I'm not seeing any interesting RULES either, actually, just specialisation
19:23:57 <tomsmeding> s
19:24:07 <tomsmeding> am I looking in the wrong place?
19:24:15 × andrei_n quits (~andrei_n@user/andrei-n:62396) (Ping timeout: 264 seconds)
19:25:39 <tomsmeding> according to its documentation, bytestring has been rewritten a bunch of times; perhaps you're referring to a past version
19:25:58 × euleritian quits (~euleritia@dynamic-176-001-140-054.176.1.pool.telefonica.de) (Read error: Connection reset by peer)
19:26:16 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
19:28:16 × Batzy quits (~quassel@user/batzy) (Ping timeout: 268 seconds)
19:28:59 zenex joins (~zenex@cpc157775-rdng31-2-0-cust836.15-3.cable.virginm.net)
19:29:45 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
19:31:04 <int-e> tomsmeding: I /think/ I'm referring to 0.10 with this, but my memory is hazy; it may have been even earlier. https://hackage.haskell.org/package/bytestring-0.10.0.0/docs/src/Data-ByteString-Lazy-Builder-Internal.html#ChunkIOStream
19:32:47 × alinab quits (sid468903@id-468903.helmsley.irccloud.com) (Read error: Connection reset by peer)
19:32:53 × cpressey quits (~weechat@33b62f0c.skybroadband.com) (Ping timeout: 268 seconds)
19:32:55 alinab joins (sid468903@id-468903.helmsley.irccloud.com)
19:32:55 zenex parts (~zenex@cpc157775-rdng31-2-0-cust836.15-3.cable.virginm.net) ()
19:34:44 × rubin55 quits (sid175221@id-175221.hampstead.irccloud.com) (Ping timeout: 256 seconds)
19:35:31 × mei quits (~mei@user/mei) (Remote host closed the connection)
19:36:23 andrei_n joins (~andrei_n@user/andrei-n:62396)
19:37:04 × lally quits (sid388228@id-388228.uxbridge.irccloud.com) (Ping timeout: 246 seconds)
19:37:59 mei joins (~mei@user/mei)
19:38:03 rubin55 joins (sid175221@id-175221.hampstead.irccloud.com)
19:38:52 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
19:39:05 cpressey joins (~weechat@33b62f0c.skybroadband.com)
19:39:50 × bontaq quits (~user@ool-45779c03.dyn.optonline.net) (Ping timeout: 256 seconds)
19:40:15 lally joins (sid388228@id-388228.uxbridge.irccloud.com)
19:42:37 <tomsmeding> int-e: I see, for Builder; here it is for current bytestring: https://hackage.haskell.org/package/bytestring-0.12.1.0/docs/src/Data.ByteString.Builder.Internal.html#ChunkIOStream
19:43:14 <tomsmeding> it seems all the fusion is left to ghc, however; there are no relevant RULES
19:43:30 <tomsmeding> only ones that reassociate operations to make it easier for ghc, presumably
19:46:49 × ocra8 quits (~ocra8@user/ocra8) (Read error: Connection reset by peer)
19:49:05 <int-e> Yeah AFAIUI the hope in all of this is that GHC will find a lot of case analyses for the ChunkedIOStream type with a known constructor and use the opportunity to elide the construction of that value. That's how fusion actuall happens here.
19:49:19 <tomsmeding> that sounds pretty robust
19:49:30 <tomsmeding> if it's just inlining and cast-of-known-constructor
19:49:36 <tomsmeding> *case
19:51:40 <int-e> Anyway it's clearly much simpler than what vector is doing these days.
19:52:45 ocra8 joins (~ocra8@user/ocra8)
19:53:28 <int-e> The history is confusing because there's a 2007 paper on this, but the corresponding code never made it into the published bytestring package in that form; instead we have this: https://hackage.haskell.org/package/bytestring-0.9.1.0/docs/src/Data-ByteString-Fusion.html
19:53:39 <tomsmeding> /urlselect
19:53:54 <tomsmeding> (I'm good at typing precisely today, it seems)
19:54:00 <tomsmeding> lol that file
19:55:38 × Square quits (~Square@user/square) (Remote host closed the connection)
20:02:52 machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net)
20:04:15 emmanuelux joins (~emmanuelu@user/emmanuelux)
20:12:53 × son0p quits (~ff@186.121.8.17) (Ping timeout: 240 seconds)
20:24:22 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 260 seconds)
20:30:05 × lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 240 seconds)
20:31:27 × machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 264 seconds)
20:31:42 Batzy joins (~quassel@user/batzy)
20:33:29 × motherfsck quits (~motherfsc@user/motherfsck) (Quit: quit)
20:40:06 Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
20:53:25 ChaiTRex joins (~ChaiTRex@user/chaitrex)
20:59:07 × andrei_n quits (~andrei_n@user/andrei-n:62396) (Quit: Leaving)
21:04:47 × tabemann quits (~tabemann@2600:1700:7990:24e0:7b2b:151c:4735:737f) (Ping timeout: 256 seconds)
21:07:34 Square joins (~Square@user/square)
21:09:10 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:10:06 × dmj` quits (uid72307@id-72307.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
21:11:08 dcoutts joins (~duncan@212.140.138.201)
21:14:10 × cpressey quits (~weechat@33b62f0c.skybroadband.com) (Quit: WeeChat 4.3.0)
21:15:13 × michalz quits (~michalz@185.246.207.201) (Quit: ZNC 1.9.0 - https://znc.in)
21:19:00 × dcoutts quits (~duncan@212.140.138.201) (Ping timeout: 256 seconds)
21:20:58 dcoutts joins (~duncan@212.140.138.201)
21:23:26 × EvanR quits (~EvanR@user/evanr) (Quit: Leaving)
21:25:24 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
21:25:27 × dcoutts quits (~duncan@212.140.138.201) (Ping timeout: 264 seconds)
21:25:44 EvanR joins (~EvanR@user/evanr)
21:26:05 × sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 240 seconds)
21:41:53 × joeyadams quits (~joeyadams@2603:6010:5100:2ed:156b:aa72:70b8:c5f5) (Quit: Leaving)
21:44:49 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
21:44:49 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
21:44:49 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection)
21:44:49 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
21:44:49 × ec quits (~ec@gateway/tor-sasl/ec) (Read error: Connection reset by peer)
21:44:49 × califax quits (~califax@user/califx) (Read error: Connection reset by peer)
21:44:49 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Read error: Connection reset by peer)
21:45:25 califax joins (~califax@user/califx)
21:45:26 sord937 joins (~sord937@gateway/tor-sasl/sord937)
21:45:28 ChaiTRex joins (~ChaiTRex@user/chaitrex)
21:45:43 ec joins (~ec@gateway/tor-sasl/ec)
21:45:54 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
21:46:06 gmg joins (~user@user/gehmehgeh)
21:46:52 stiell joins (~stiell@gateway/tor-sasl/stiell)
21:47:15 Square2 joins (~Square4@user/square)
21:49:36 × Square quits (~Square@user/square) (Ping timeout: 256 seconds)
21:53:03 × acidjnk quits (~acidjnk@p200300d6e714dc68856d8905203ea039.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
21:59:10 pavonia joins (~user@user/siracusa)
22:06:14 × mei quits (~mei@user/mei) (Remote host closed the connection)
22:08:40 mei joins (~mei@user/mei)
22:11:18 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
22:17:58 tabemann joins (~tabemann@syn-074-135-160-243.res.spectrum.com)
22:18:09 esph joins (~weechat@user/esph)
22:18:39 × target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving)
22:36:23 rustisafungus joins (~segfaultf@23-93-189-95.fiber.dynamic.sonic.net)
22:36:39 <rustisafungus> would it be too offtopic to ask whether folks here are using jax?
22:37:16 <rustisafungus> on a related note i saw a differentiable renderer somewhere commenting about laziness helping with differentiability of the program, but the commentary was above my reading level,... how do the two relate...?
22:38:59 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
22:52:13 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:56:26 × wagle quits (~wagle@quassel.wagle.io) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
22:56:43 wagle joins (~wagle@quassel.wagle.io)
22:56:44 × wagle quits (~wagle@quassel.wagle.io) (Client Quit)
22:57:34 wagle joins (~wagle@quassel.wagle.io)
22:59:48 philopsos1 joins (~caecilius@user/philopsos)
23:01:56 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
23:04:11 × tabemann quits (~tabemann@syn-074-135-160-243.res.spectrum.com) (Ping timeout: 264 seconds)
23:05:35 × wagle quits (~wagle@quassel.wagle.io) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
23:06:25 wagle joins (~wagle@quassel.wagle.io)
23:10:11 × mei quits (~mei@user/mei) (Ping timeout: 264 seconds)
23:10:58 mei joins (~mei@user/mei)
23:12:51 × philopsos1 quits (~caecilius@user/philopsos) (Ping timeout: 264 seconds)
23:17:51 × oo_miguel quits (~Thunderbi@78-11-181-16.static.ip.netia.com.pl) (Ping timeout: 260 seconds)
23:21:58 × Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.)
23:23:17 × TonyStone quits (~TonyStone@user/TonyStone) (Ping timeout: 240 seconds)
23:30:53 dysthesis joins (~dysthesis@user/dysthesis)
23:36:21 TonyStone joins (~TonyStone@user/TonyStone)
23:39:13 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
23:48:15 × rustisafungus quits (~segfaultf@23-93-189-95.fiber.dynamic.sonic.net) (Ping timeout: 264 seconds)
23:56:20 sprout_ joins (~quassel@2a02-a448-3a80-0-bd5b-db91-763e-cf24.fixed6.kpn.net)
23:57:31 × sprout quits (~quassel@84-80-106-227.fixed.kpn.net) (Ping timeout: 260 seconds)
23:58:29 × vizimajac quits (vizimajac@shell.xshellz.com) (Ping timeout: 240 seconds)

All times are in UTC on 2024-06-12.