2022/06/10

2022-06-10 00:01:05 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2022-06-10 00:01:06 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2022-06-10 00:11:35 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 00:13:41 +0200Henson(~kvirc@107-179-133-201.cpe.teksavvy.com) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
2022-06-10 00:13:56 +0200Karel(~Karel@d51a4910f.access.telenet.be) (Ping timeout: 248 seconds)
2022-06-10 00:17:54 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-06-10 00:18:32 +0200trisolaran(~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 248 seconds)
2022-06-10 00:26:20 +0200Karel(~Karel@ptr-9091p57aekjr6i5k27f.18120a2.ip6.access.telenet.be)
2022-06-10 00:26:20 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc)
2022-06-10 00:27:18 +0200Kaiepi(~Kaiepi@156.34.47.253) (Ping timeout: 276 seconds)
2022-06-10 00:27:28 +0200jmcarthur(~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net)
2022-06-10 00:28:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 00:30:57 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 260 seconds)
2022-06-10 00:32:13 +0200Karel(~Karel@ptr-9091p57aekjr6i5k27f.18120a2.ip6.access.telenet.be) (Read error: Connection reset by peer)
2022-06-10 00:33:23 +0200slack1256(~slack1256@186.11.84.227)
2022-06-10 00:34:53 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 00:35:56 +0200ClathomasPrime(~Clathomas@pool-98-110-124-224.cmdnnj.fios.verizon.net) (Quit: Client closed)
2022-06-10 00:36:15 +0200yosef`(~user@user/yosef/x-2947716)
2022-06-10 00:41:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 00:42:01 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 246 seconds)
2022-06-10 00:42:50 +0200chomwitt(~chomwitt@2a02:587:dc1f:5600:28f0:c157:4d87:4f4e) (Ping timeout: 244 seconds)
2022-06-10 00:46:06 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 00:46:21 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-06-10 00:50:38 +0200 <Haskelytic> guys, how is cabal freeze different from stack resolver?
2022-06-10 00:52:10 +0200slack1256(~slack1256@186.11.84.227) (Ping timeout: 246 seconds)
2022-06-10 00:52:32 +0200 <hpc> the package set hasn't already been written by someone else
2022-06-10 00:53:05 +0200 <geekosaur> you can get a cabal.freeze from stackage.org
2022-06-10 00:53:22 +0200 <geekosaur> there are a few operational differences but I don't recall what they are off the top of my head
2022-06-10 00:54:08 +0200 <Haskelytic> so stackage and hackage are basically both package indices?
2022-06-10 00:54:47 +0200 <Bulby[m]> i think stackage is an attempt to keep it more stable
2022-06-10 00:55:43 +0200 <hpc> in theory you can make a package depend on all of a stack lts at the same time and it will still be coherent
2022-06-10 00:55:49 +0200 <geekosaur> hackage is the master repository, which even stackage uses. stackage publishes curated sets of packages, sourced from hackage, which are known to work together
2022-06-10 00:56:37 +0200 <Haskelytic> ohhh, makes sense now. thanks :)
2022-06-10 00:57:48 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 00:58:14 +0200 <geekosaur> if you use `cabal freeze` to create a freeze file, cabal won't upgrade packages listed in it just because a new version comes out, which it will otherwise do as long as the new package fits version constraints
2022-06-10 00:58:41 +0200 <geekosaur> this may avoid thrashing or discovery of bad package dependencies on a new release
2022-06-10 00:59:06 +0200 <Haskelytic> hmm I see
2022-06-10 00:59:23 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc)
2022-06-10 00:59:24 +0200 <Haskelytic> so it would be up to the developer to "unfreeze" as needed?
2022-06-10 00:59:35 +0200 <geekosaur> yes
2022-06-10 00:59:43 +0200tabemann(~tabemann@2600:1700:7990:24e0:ac21:ff4e:45be:2497)
2022-06-10 01:00:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 01:00:09 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
2022-06-10 01:00:18 +0200 <geekosaur> because you want something from a newer version, or just because you can afford have your dependencies getting rebuilt instead of just the thing you're working on :)
2022-06-10 01:01:01 +0200 <geekosaur> (hence "thrashing". I don't use a freeze file on my xmonad config, which uses dbus, and it rebuilds conduit and/or lens every couple weeks…)
2022-06-10 01:01:37 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-06-10 01:01:37 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-06-10 01:01:37 +0200wroathe(~wroathe@user/wroathe)
2022-06-10 01:01:47 +0200 <Haskelytic> ahh i see
2022-06-10 01:01:55 +0200 <Haskelytic> thanks for that detailed example
2022-06-10 01:03:07 +0200julian(~julian@20.83.116.49) (Killed (NickServ (GHOST command used by tos9_!~tos9@python/site-packages/Julian)))
2022-06-10 01:08:34 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 01:10:42 +0200AlexNoo_(~AlexNoo@94.233.240.35)
2022-06-10 01:11:52 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 01:12:49 +0200AlexZenon(~alzenon@178.34.150.134) (Ping timeout: 246 seconds)
2022-06-10 01:13:52 +0200Alex_test(~al_test@178.34.150.134) (Ping timeout: 246 seconds)
2022-06-10 01:14:22 +0200AlexNoo(~AlexNoo@178.34.150.134) (Ping timeout: 258 seconds)
2022-06-10 01:16:53 +0200AlexZenon(~alzenon@94.233.240.35)
2022-06-10 01:17:38 +0200bilegeek(~bilegeek@2600:1008:b016:eaf8:86d7:87a2:4b7e:8f8b)
2022-06-10 01:18:30 +0200Alex_test(~al_test@94.233.240.35)
2022-06-10 01:22:30 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 01:24:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 01:29:50 +0200jmcarthur(~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
2022-06-10 01:29:51 +0200Pickchea(~private@user/pickchea) (Ping timeout: 244 seconds)
2022-06-10 01:31:35 +0200DNH(~DNH@2a02:8108:1100:16d8:d5e4:216a:268c:a812) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-06-10 01:33:07 +0200yosef`(~user@user/yosef/x-2947716) (Ping timeout: 246 seconds)
2022-06-10 01:33:12 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds)
2022-06-10 01:34:59 +0200alp(~alp@user/alp) (Ping timeout: 255 seconds)
2022-06-10 01:36:57 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 01:37:04 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 01:39:27 +0200kaskal-(~kaskal@2001:4bb8:2a7:f3b8:36de:fd74:7690:c176)
2022-06-10 01:39:39 +0200zeenk(~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806) (Quit: Konversation terminated!)
2022-06-10 01:39:59 +0200kaskal(~kaskal@2001:4bb8:2d3:39b7:6dc3:9794:9538:b6b) (Ping timeout: 240 seconds)
2022-06-10 01:41:28 +0200nicbk(~nicbk@user/nicbk)
2022-06-10 01:45:14 +0200cosimone`(~user@93-44-186-171.ip98.fastwebnet.it) (Remote host closed the connection)
2022-06-10 01:45:54 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81)
2022-06-10 01:48:17 +0200mvk(~mvk@2607:fea8:5ce3:8500::ba9a)
2022-06-10 01:50:10 +0200hueso(~root@user/hueso) (Ping timeout: 240 seconds)
2022-06-10 01:50:20 +0200hueso(~root@user/hueso)
2022-06-10 01:51:43 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 01:52:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 01:52:56 +0200stackdroid18(14094@user/stackdroid) (Quit: Lost terminal)
2022-06-10 01:54:18 +0200hueso(~root@user/hueso) (Read error: Connection reset by peer)
2022-06-10 01:56:04 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 01:56:30 +0200hueso(~root@user/hueso)
2022-06-10 01:56:32 +0200Kaiepi(~Kaiepi@156.34.47.253)
2022-06-10 02:02:11 +0200Haskelytic(~Haskelyti@118.179.211.17) (Quit: Client closed)
2022-06-10 02:02:45 +0200Haskelytic(~Haskelyti@118.179.211.17)
2022-06-10 02:02:53 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 255 seconds)
2022-06-10 02:04:23 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 02:05:13 +0200shailangsa_(~shailangs@host86-186-136-116.range86-186.btcentralplus.com) ()
2022-06-10 02:08:14 +0200Feuermagier(~Feuermagi@user/feuermagier)
2022-06-10 02:10:17 +0200slack1256(~slack1256@186.11.82.227)
2022-06-10 02:15:34 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Ping timeout: 240 seconds)
2022-06-10 02:15:51 +0200 <dsal> Is there a meaningful difference between a constraint tuple and separate constraints?
2022-06-10 02:17:54 +0200toluene(~toluene@user/toulene) (Ping timeout: 244 seconds)
2022-06-10 02:18:25 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2022-06-10 02:19:20 +0200BusConscious(~martin@ip5f5bdee2.dynamic.kabel-deutschland.de) (Remote host closed the connection)
2022-06-10 02:20:05 +0200Tuplanolla(~Tuplanoll@91-159-69-1.elisa-laajakaista.fi) (Quit: Leaving.)
2022-06-10 02:23:03 +0200wroathe(~wroathe@user/wroathe) (Quit: Lost terminal)
2022-06-10 02:23:34 +0200 <Bulby[m]> is `fromMaybe <$> ... <*> ...` strict in its first argument
2022-06-10 02:24:55 +0200slack1256(~slack1256@186.11.82.227) (Ping timeout: 246 seconds)
2022-06-10 02:25:39 +0200 <Bulby[m]> because when i make the first argument an error, even if the second argument is a Just, it does the error
2022-06-10 02:26:54 +0200 <Bulby[m]> wtf
2022-06-10 02:26:55 +0200 <geekosaur> Applicative always evaluates all arguments
2022-06-10 02:27:04 +0200 <Bulby[m]> pgikhugljkag
2022-06-10 02:27:08 +0200 <Bulby[m]> that explains it
2022-06-10 02:27:36 +0200 <geekosaur> you may want asum
2022-06-10 02:27:43 +0200 <dsal> Do you mean `fromMaybe (error thing) <$> something` ?
2022-06-10 02:28:25 +0200 <Bulby[m]> no, `fromMaybe <$> (monadic fail) <*> (monadic action)`
2022-06-10 02:28:59 +0200 <dsal> `fromMaybe (monadic fail) <$> (monadic action)` ?
2022-06-10 02:29:30 +0200 <Bulby[m]> ...
2022-06-10 02:29:38 +0200 <Bulby[m]> no
2022-06-10 02:30:32 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc)
2022-06-10 02:30:49 +0200 <dsal> :t liftA2 fromMaybe
2022-06-10 02:30:50 +0200 <lambdabot> Applicative f => f c -> f (Maybe c) -> f c
2022-06-10 02:31:11 +0200 <Bulby[m]> yes
2022-06-10 02:31:12 +0200 <dsal> OK. I don't think I understand what you're trying to do, then.
2022-06-10 02:31:33 +0200 <Bulby[m]> switching it to a case statement fixed it
2022-06-10 02:31:54 +0200 <dsal> What's the case statement look like?
2022-06-10 02:32:51 +0200 <Bulby[m]> `do { val <- gets @Heap (M.lookup i); case val of { Nothing -> unexpected; Just v -> pure v }`
2022-06-10 02:33:04 +0200 <Bulby[m]> pretend the syntax is good
2022-06-10 02:33:39 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 240 seconds)
2022-06-10 02:33:52 +0200 <dsal> How's that different from `v <- fromMaybe unexpected <$> gets @Heap (M.lookup i)` ?
2022-06-10 02:34:15 +0200 <dsal> Or, perhaps `v <- maybe unexpected pure $ gets @Heap (M.lookup i)`
2022-06-10 02:34:30 +0200 <Bulby[m]> it isn't, on that second one
2022-06-10 02:34:33 +0200 <Bulby[m]> my code is consistent
2022-06-10 02:34:40 +0200 <Bulby[m]> inconsistent
2022-06-10 02:35:04 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 248 seconds)
2022-06-10 02:35:17 +0200 <dsal> It's just about "stop trying to write code" o'clock for me. I've broken my parser in a way that doesn't seem possible. That's exciting.
2022-06-10 02:36:56 +0200 <hpc> that's the trick to good programming, limit yourself to just the obvious errors
2022-06-10 02:36:56 +0200Haskelytic(~Haskelyti@118.179.211.17) (Quit: Client closed)
2022-06-10 02:37:00 +0200 <hpc> syntax errors, if possible :D
2022-06-10 02:37:17 +0200 <dsal> Yeah. I did a big refactoring and everything compiles, but the tests don't pass. How is this possible/
2022-06-10 02:38:08 +0200 <EvanR> imagining hpc's advice as a dart board with various kinds of errors on it
2022-06-10 02:38:11 +0200Haskelytic(~Haskelyti@118.179.211.17)
2022-06-10 02:39:04 +0200 <hpc> there's a kernel of truth in that advice, it's just hard to find :P
2022-06-10 02:39:26 +0200funsafe(~funsafe@2601:1c1:4200:9ac:84cb:185c:2a3c:c92c)
2022-06-10 02:39:34 +0200 <hpc> dsal: start with the part of the code you understand the least, then rewrite it until you understand something else less
2022-06-10 02:39:49 +0200 <dsal> Wait, are you watching me on this project?
2022-06-10 02:40:00 +0200 <dsal> That's pretty much exactly what I'm doing right now. heh
2022-06-10 02:40:04 +0200 <hpc> heh
2022-06-10 02:40:09 +0200 <dsal> "This thing is dumb. I shall delete it."
2022-06-10 02:41:35 +0200 <EvanR> the objective is to get a state of "everything was deleted", like mahjong solitaire right
2022-06-10 02:42:10 +0200 <hpc> yep
2022-06-10 02:42:12 +0200xff0x(~xff0x@b133147.ppp.asahi-net.or.jp) (Ping timeout: 260 seconds)
2022-06-10 02:42:16 +0200 <dsal> This particular thing just seemed to be a compromise between keeping the code simple and making it possibly incorrect.
2022-06-10 02:42:18 +0200 <EvanR> delete two things while maintaining some invariant. Until no more moves or you win
2022-06-10 02:42:23 +0200 <hpc> code is the enemy, and to defeat your enemy you must first know your enemy
2022-06-10 02:43:07 +0200vicfred(~vicfred@user/vicfred) (Quit: Leaving)
2022-06-10 02:43:40 +0200toluene(~toluene@user/toulene)
2022-06-10 02:44:01 +0200 <funsafe> p;;\\\\\\\\\\\\77777778888888
2022-06-10 02:44:10 +0200 <hpc> gesundheit
2022-06-10 02:45:15 +0200 <Bulby[m]> EvanR: have you tried vigil?
2022-06-10 02:45:35 +0200 <EvanR> no, also not sure what it is
2022-06-10 02:45:44 +0200 <Bulby[m]> https://github.com/munificent/vigil
2022-06-10 02:45:57 +0200 <Bulby[m]> run the sample a few times 🙂
2022-06-10 02:46:55 +0200 <EvanR> so it basically implements ghc's sadly removed feature of deleting your code on type error
2022-06-10 02:47:06 +0200 <Bulby[m]> WHAT IT ACTUALLY DID THAT
2022-06-10 02:47:10 +0200shailangsa(~shailangs@host86-186-136-116.range86-186.btcentralplus.com)
2022-06-10 02:47:21 +0200 <Bulby[m]> https://github.com/munificent/vigil/issues/3
2022-06-10 02:47:22 +0200 <EvanR> long ago, not sure why it was "fixed"
2022-06-10 02:48:50 +0200 <hpc> iirc it had to do with cleaning up temp files?
2022-06-10 02:48:59 +0200 <hpc> duckduckgo isn't finding the issue link
2022-06-10 02:49:00 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 276 seconds)
2022-06-10 02:49:30 +0200 <Bulby[m]> https://gitlab.haskell.org/ghc/ghc/-/issues/163 ?
2022-06-10 02:49:35 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc)
2022-06-10 02:50:43 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-06-10 02:50:44 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com)
2022-06-10 02:50:58 +0200 <Bulby[m]> i really want you to run it multiple times
2022-06-10 02:51:29 +0200 <Bulby[m]> i found it very amusing
2022-06-10 02:54:46 +0200kenaryn(~aurele@89-88-44-27.abo.bbox.fr)
2022-06-10 03:00:42 +0200 <EvanR> not enough brain fuel at the moment
2022-06-10 03:00:43 +0200nate3(~nate@98.45.169.16)
2022-06-10 03:01:50 +0200Haskelytic(~Haskelyti@118.179.211.17) (Quit: Client closed)
2022-06-10 03:02:17 +0200Haskelytic(~Haskelyti@118.179.211.17)
2022-06-10 03:04:50 +0200 <Haskelytic> When is using orphan instances okay?
2022-06-10 03:05:14 +0200 <jackdk> IMHO almost never, especially now we have -XDerivingVia
2022-06-10 03:05:43 +0200 <davean> jackdk: what does DerivingVia have to do with orphans?
2022-06-10 03:05:54 +0200nate3(~nate@98.45.169.16) (Ping timeout: 276 seconds)
2022-06-10 03:06:16 +0200 <jackdk> davean: the ergonomics of getting all the instances you want onto a newtype wrapper in your project are a lot better
2022-06-10 03:10:29 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-06-10 03:12:33 +0200zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-06-10 03:15:35 +0200 <Cale> Haskelytic: Whenever you're producing an executable and not a library that will be imported elsewhere, it's safe.
2022-06-10 03:16:20 +0200julian(~julian@20.83.116.49)
2022-06-10 03:16:36 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-06-10 03:17:53 +0200 <Cale> Orphan instances do exist for a reason, even if they can cause trouble in the form of incompatibility between libraries. Sometimes you control neither the library defining the type, nor the one defining the class, and yet need an instance to exist.
2022-06-10 03:21:58 +0200 <dsal> And if you, in turn, publish that instance, lots of people who use your library will get mad at you.
2022-06-10 03:27:19 +0200xff0x(~xff0x@s5.HtokyoFL1.vectant.ne.jp)
2022-06-10 03:27:33 +0200dcoutts_(~duncan@host86-177-125-97.range86-177.btcentralplus.com)
2022-06-10 03:29:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 03:29:50 +0200dcoutts__(~duncan@host86-144-78-203.range86-144.btcentralplus.com) (Ping timeout: 240 seconds)
2022-06-10 03:30:14 +0200dcoutts(~duncan@host86-144-78-203.range86-144.btcentralplus.com) (Ping timeout: 244 seconds)
2022-06-10 03:30:22 +0200dcoutts(~duncan@host86-177-125-97.range86-177.btcentralplus.com)
2022-06-10 03:31:03 +0200frost(~frost@user/frost)
2022-06-10 03:33:29 +0200 <Cale> It's also generally okay to have libraries that only consist of orphan instances
2022-06-10 03:33:40 +0200 <Cale> because they can be imported only by executables
2022-06-10 03:33:47 +0200 <Cale> and everything will be fine
2022-06-10 03:34:28 +0200 <EvanR> a library can't depend on that orphans lib?
2022-06-10 03:35:22 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 03:35:31 +0200 <Haskelytic> I'm using orphans for test suites
2022-06-10 03:35:44 +0200 <Haskelytic> writing Arbitrary instances for my types
2022-06-10 03:36:25 +0200 <jackdk> I switched to Hedgehog over quickcheck to not have to do that, and to get automatic shrinking (but there are other tradeoffs - one is not strictly better than the other)
2022-06-10 03:36:32 +0200 <Cale> EvanR: Yeah, it ought not to, because it will then export an orphan
2022-06-10 03:36:46 +0200 <Haskelytic> I actually did that because vscode (with Haskell extension) couldn't find the Arbitrary instance if I placed it along with module containing my type
2022-06-10 03:36:52 +0200 <Haskelytic> and it felt kind of dirty lol
2022-06-10 03:37:13 +0200 <Cale> Yeah, orphans are fine in test suites generally
2022-06-10 03:37:51 +0200 <Cale> Though, that thing about vscode seems weird
2022-06-10 03:38:10 +0200 <Haskelytic> yep definitely weird behavior
2022-06-10 03:38:43 +0200 <Haskelytic> I thought maybe I should add the module I'm testing into source dirs for test suite but then it would double-compile which is stupid
2022-06-10 03:42:35 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net)
2022-06-10 03:43:44 +0200ll4(~ll4@151.52.164.1)
2022-06-10 03:44:44 +0200 <ll4> me solder me, for me momy end me forest end me you ricovery data day ... for yaer 36 in it Sicilia
2022-06-10 03:45:16 +0200ChanServ+o monochrom
2022-06-10 03:45:26 +0200monochrom+b *!*@151.52.164.1
2022-06-10 03:45:26 +0200ll4monochrom (ll4)
2022-06-10 03:46:45 +0200bilegeek_(~bilegeek@111.sub-174-208-241.myvzw.com)
2022-06-10 03:46:50 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 255 seconds)
2022-06-10 03:47:35 +0200 <EvanR> a little slow on the draw there
2022-06-10 03:49:32 +0200bilegeek(~bilegeek@2600:1008:b016:eaf8:86d7:87a2:4b7e:8f8b) (Ping timeout: 255 seconds)
2022-06-10 03:52:58 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 244 seconds)
2022-06-10 03:58:32 +0200mvk(~mvk@2607:fea8:5ce3:8500::ba9a) (Ping timeout: 255 seconds)
2022-06-10 03:58:44 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 04:00:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 04:07:20 +0200bilegeek_(~bilegeek@111.sub-174-208-241.myvzw.com) (Remote host closed the connection)
2022-06-10 04:07:44 +0200bilegeek_(~bilegeek@111.sub-174-208-241.myvzw.com)
2022-06-10 04:08:39 +0200 <Bulby[m]> you know, i didn't expect to be thinking about manual "memory" management in a high level language like haskell
2022-06-10 04:10:36 +0200 <pavonia> Where do you need to do that?
2022-06-10 04:11:00 +0200 <Bulby[m]> when writing an interpreter for an OOP lang
2022-06-10 04:12:51 +0200 <EvanR> more like why are you doing manual memory management in THAT lang
2022-06-10 04:12:57 +0200monochrom-o monochrom
2022-06-10 04:13:10 +0200 <EvanR> it's not very java
2022-06-10 04:13:11 +0200 <Bulby[m]> there is no manual mem management in that lang
2022-06-10 04:13:16 +0200 <Bulby[m]> i mean on the haskell side
2022-06-10 04:14:21 +0200 <EvanR> it's either implement a gc or trick haskell into doing the gc, but that's advanced mode
2022-06-10 04:14:38 +0200 <monochrom> This is only because you write a low-level micromanaging interpreter. It would be the same in Prolog.
2022-06-10 04:14:45 +0200 <Bulby[m]> i want to implement a borrow checker \o/
2022-06-10 04:14:53 +0200 <Bulby[m]> I LOVE RUST
2022-06-10 04:15:17 +0200 <EvanR> people love managing memory it seems
2022-06-10 04:15:38 +0200 <monochrom> Programmers are control freaks who like micromanaging everything.
2022-06-10 04:16:06 +0200 <EvanR> which is why dependent types are the future
2022-06-10 04:16:09 +0200 <Bulby[m]> borrow checking an untyped lang sounds like an AMAZING idea
2022-06-10 04:17:16 +0200td_(~td@94.134.91.150) (Ping timeout: 246 seconds)
2022-06-10 04:17:49 +0200nate3(~nate@98.45.169.16)
2022-06-10 04:19:12 +0200td_(~td@94.134.91.132)
2022-06-10 04:19:13 +0200noteness(~noteness@user/noteness) (Remote host closed the connection)
2022-06-10 04:20:04 +0200noteness(~noteness@user/noteness)
2022-06-10 04:21:07 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc)
2022-06-10 04:24:55 +0200 <Axman6> it blows my mind that Swift is still using reaint and release, albeit automatically (they just announced an optimisation that removes a lot of unnecessary retain/release pairs at WWDC)
2022-06-10 04:25:28 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 248 seconds)
2022-06-10 04:30:07 +0200 <EvanR> marketting problem, like monads. "Garbage Collection" just isn't sexy
2022-06-10 04:32:46 +0200koolazer(~koo@user/koolazer)
2022-06-10 04:39:43 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc)
2022-06-10 04:41:16 +0200terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
2022-06-10 04:42:33 +0200terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1)
2022-06-10 04:43:04 +0200finn_elija(~finn_elij@user/finn-elija/x-0085643)
2022-06-10 04:43:04 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2022-06-10 04:43:04 +0200finn_elijaFinnElija
2022-06-10 04:45:44 +0200mvk(~mvk@2607:fea8:5ce3:8500::ba9a)
2022-06-10 04:49:45 +0200 <Axman6> Apple seem to be obsessed with turning Swift into a camel, they keep adding language features which should be libraries. They were very proud that they've added native regex syntax... then also introduced something which looks an awful lot like a parser combinator, but just said it was a different syntax for regexes (they don't appear to be monadic, so are probably still only for regular languages)
2022-06-10 04:49:57 +0200 <Axman6> they added a bunch of syntax for handling concurrency too
2022-06-10 04:59:33 +0200funsafe(~funsafe@2601:1c1:4200:9ac:84cb:185c:2a3c:c92c) (Quit: funsafe)
2022-06-10 05:00:07 +0200funsafe(~funsafe@2601:1c1:4200:9ac:84cb:185c:2a3c:c92c)
2022-06-10 05:03:07 +0200coot(~coot@213.134.190.95)
2022-06-10 05:06:56 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 255 seconds)
2022-06-10 05:10:13 +0200adanwan_(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-06-10 05:11:04 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 05:11:29 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-06-10 05:13:11 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 05:17:34 +0200dcoutts__(~duncan@host86-176-29-4.range86-176.btcentralplus.com)
2022-06-10 05:18:48 +0200nate3(~nate@98.45.169.16) (Ping timeout: 248 seconds)
2022-06-10 05:18:48 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 248 seconds)
2022-06-10 05:19:52 +0200dcoutts_(~duncan@host86-177-125-97.range86-177.btcentralplus.com) (Ping timeout: 248 seconds)
2022-06-10 05:20:14 +0200dcoutts_(~duncan@host86-176-29-4.range86-176.btcentralplus.com)
2022-06-10 05:20:17 +0200dcoutts(~duncan@host86-177-125-97.range86-177.btcentralplus.com) (Ping timeout: 256 seconds)
2022-06-10 05:27:24 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-06-10 05:27:35 +0200tvandinther(~tvandinth@2406:e002:68db:9f01:6532:b3cb:e7a1:1dce)
2022-06-10 05:29:31 +0200 <tvandinther> Hi, I have a beginner question. How can I forever iterate over an infinite list and print every n seconds? I currently have a do block and forever along with threadDelay to print the same thing every time, but I want to incorporate an infinite list I have using iterate.
2022-06-10 05:30:48 +0200 <dsal> That's kind of complicated.
2022-06-10 05:31:32 +0200 <dsal> If you use STM, you can have a tvar that's getting updated from a traversal across the list and a thread that's sleeping which grabs that tvar every N seconds.
2022-06-10 05:33:32 +0200 <tvandinther> I see, is the tvar a mutable data? Then when I call putStrLn it grabs whatever is in there, and then I make a transaction to update that tvar? This would be the first time dealing with these.
2022-06-10 05:38:35 +0200 <EvanR> your loop (recursive function) can simply take the list to be iterated over
2022-06-10 05:38:44 +0200 <EvanR> when you look, pass the tail of the list
2022-06-10 05:38:49 +0200 <EvanR> when you loop*
2022-06-10 05:39:17 +0200 <monochrom> mapM_ (\x -> threadDelay foo >> print x) [0..]
2022-06-10 05:39:59 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-06-10 05:40:48 +0200 <EvanR> let loop (x:xs) = threadDelay foo >> print x >> loop xs in loop [0..] -- xD
2022-06-10 05:41:56 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 258 seconds)
2022-06-10 05:44:03 +0200 <dsal> Oh, I took that as "do some work and occasionally print out the current state"
2022-06-10 05:44:10 +0200bilegeek_bilegeek
2022-06-10 05:44:43 +0200img(~img@user/img)
2022-06-10 05:45:14 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-06-10 05:52:09 +0200 <tvandinther> Ah I see, thanks! The approach makes sense.
2022-06-10 05:57:13 +0200 <kenaryn> Please what does the keyword "const" does and/or mean?
2022-06-10 05:57:32 +0200 <monochrom> Not a keyword in Haskell.
2022-06-10 05:58:57 +0200 <kenaryn> In the official wiki https://wiki.haskell.org/Keywords "const" is used as is `(const 1 +++ const 2) undefined` returns `(1,2)`
2022-06-10 06:00:01 +0200_xor(~xor@72.49.198.103)
2022-06-10 06:00:12 +0200 <monochrom> You are misreading. That one is explaining the keyword ~
2022-06-10 06:00:15 +0200 <kenaryn> Also, in Algebra-driven design book, a "filter false" law is written as the following: `forall (xs :: [a]). filter (const False) xs = []`. So I am wondering, what is its meaning?
2022-06-10 06:00:53 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 06:01:44 +0200 <jackdk> kenaryn: do you understand the `filter` function and the `const` function? (i.e., where should I start explaining from)/
2022-06-10 06:01:50 +0200 <kenaryn> I agree that the coercion mechanism is the one explained, but nonetheless, there is the word "const" used here so it might hold for a conventionally agreed meaning among uber users.
2022-06-10 06:02:41 +0200 <kenaryn> jackdk: filter will return only the elements that satisfy a condition but I did not know that const is in fact a function.
2022-06-10 06:03:19 +0200 <jackdk> kenaryn: right, so `const` is defined as `const :: a -> b -> a`; `const x _ = x`
2022-06-10 06:03:45 +0200 <jackdk> so `filter (const False)` is running a predicate which always returns `False` against the list, which means that it will reject every element
2022-06-10 06:04:07 +0200 <jackdk> > const False 3
2022-06-10 06:04:09 +0200 <lambdabot> False
2022-06-10 06:04:12 +0200 <jackdk> > const False "hello"
2022-06-10 06:04:15 +0200 <lambdabot> False
2022-06-10 06:04:17 +0200 <jackdk> (etc)
2022-06-10 06:04:27 +0200 <jackdk> :t const False
2022-06-10 06:04:28 +0200 <lambdabot> b -> Bool
2022-06-10 06:04:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 06:06:53 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc)
2022-06-10 06:08:37 +0200 <kenaryn> Allright, thank you.
2022-06-10 06:10:22 +0200z0k(~z0k@206.84.142.123) (Ping timeout: 272 seconds)
2022-06-10 06:11:26 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 244 seconds)
2022-06-10 06:12:12 +0200z0k(~z0k@206.84.143.2)
2022-06-10 06:14:42 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-06-10 06:15:03 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-06-10 06:15:25 +0200chomwitt(~chomwitt@2a02:587:dc1f:5600:b0ac:64b:5946:8d06)
2022-06-10 06:16:03 +0200Vajb(~Vajb@n5ar9yynwxqg80e32-2.v6.elisa-mobile.fi)
2022-06-10 06:19:44 +0200 <kronicma1> Anyone know how to implement early return in a polysemy effect?
2022-06-10 06:19:55 +0200 <kronicma1> Or callcc
2022-06-10 06:21:31 +0200qwedfg(~qwedfg@user/qwedfg) (Ping timeout: 246 seconds)
2022-06-10 06:22:39 +0200yosef`(~user@user/yosef/x-2947716)
2022-06-10 06:22:47 +0200qwedfg(~qwedfg@user/qwedfg)
2022-06-10 06:24:57 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc)
2022-06-10 06:27:26 +0200 <dsal> Hey, I remember this conversation recently.
2022-06-10 06:27:34 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 06:34:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 06:52:35 +0200 <dibblego> > map (const 7) [1,2,3,4,5] -- turn all the things into 7
2022-06-10 06:52:37 +0200 <lambdabot> [7,7,7,7,7]
2022-06-10 06:53:12 +0200Kaiepi(~Kaiepi@156.34.47.253) (Ping timeout: 248 seconds)
2022-06-10 06:58:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 06:59:56 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 07:01:26 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection)
2022-06-10 07:02:07 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81)
2022-06-10 07:11:39 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2022-06-10 07:11:45 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-06-10 07:15:08 +0200img(~img@user/img)
2022-06-10 07:15:41 +0200 <kenaryn> Please what does a "naive" implementation mean?
2022-06-10 07:16:20 +0200 <kenaryn> I admit it is not haskell specific but perhaps someone will accept to give an hint about it.
2022-06-10 07:16:40 +0200 <jackdk> simple, like what's the most straightforward way you could implement the thing
2022-06-10 07:17:23 +0200Psybur(~Psybur@c-76-123-45-25.hsd1.va.comcast.net) (Ping timeout: 258 seconds)
2022-06-10 07:18:52 +0200benin(~benin@183.82.179.200)
2022-06-10 07:26:16 +0200Vajb(~Vajb@n5ar9yynwxqg80e32-2.v6.elisa-mobile.fi) (Ping timeout: 248 seconds)
2022-06-10 07:27:22 +0200 <kenaryn> Allright, I understand. And do you know what a generalization is? I read that annihilation is the generalization of the law `x × 0 = 0`.
2022-06-10 07:27:54 +0200juhp[m]JensPetersen[m]
2022-06-10 07:28:24 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 248 seconds)
2022-06-10 07:30:09 +0200 <jackdk> generalisation = "the broader form of an idea". So `x * 0 = 0` in arithmetic, but an annihilator `z` behaves "like that, but in some broader way"
2022-06-10 07:31:30 +0200 <kenaryn> Thank you.
2022-06-10 07:33:50 +0200 <dsal> :t stimes
2022-06-10 07:33:51 +0200 <lambdabot> error: Variable not in scope: stimes
2022-06-10 07:33:55 +0200 <dsal> what!
2022-06-10 07:33:58 +0200 <dsal> that's a great generalization
2022-06-10 07:34:00 +0200 <dsal> @hoogle stimes
2022-06-10 07:34:01 +0200 <lambdabot> Data.Semigroup stimes :: (Semigroup a, Integral b) => b -> a -> a
2022-06-10 07:34:01 +0200 <lambdabot> GHC.Base stimes :: (Semigroup a, Integral b) => b -> a -> a
2022-06-10 07:34:01 +0200 <lambdabot> Hedgehog.Internal.Prelude stimes :: (Semigroup a, Integral b) => b -> a -> a
2022-06-10 07:35:30 +0200 <kenaryn> I'm just at chapter 5 of Chris Allen book, I firmly do NOT have a clue about semigroup features or uber user practices.
2022-06-10 07:35:42 +0200 <dsal> > stimes 0 (9 :: Sum Int)
2022-06-10 07:35:44 +0200 <lambdabot> Sum {getSum = 0}
2022-06-10 07:35:46 +0200 <dsal> > stimes 3 (9 :: Sum Int)
2022-06-10 07:35:48 +0200 <lambdabot> Sum {getSum = 27}
2022-06-10 07:35:50 +0200 <dsal> > stimes 3 "hello"
2022-06-10 07:35:52 +0200 <lambdabot> "hellohellohello"
2022-06-10 07:36:00 +0200 <Axman6> you'd be surprised, you may not know the words, but you definitely understand the concept of a semigroup
2022-06-10 07:36:16 +0200 <dsal> I've argued that they should teach semigroups in elementary school
2022-06-10 07:36:30 +0200 <kenaryn> :)
2022-06-10 07:36:37 +0200 <Axman6> they kind of do, they just don't tell you (or know they're doing it)
2022-06-10 07:36:40 +0200 <dsal> They teach all of these concepts that are the same thing, but give them all different names and people have to keep up with a bunch of stuff.
2022-06-10 07:38:08 +0200 <Axman6> wait, how does stimes 0 (Sum 9) work
2022-06-10 07:38:11 +0200 <dsal> They teach you how to add, how to multiply, how to do exponentiation eventually, how to put words together, how to put sentences together. They just don't point out that these are all the same thing so unless you're super smart you don't see the patterns.
2022-06-10 07:38:39 +0200 <kenaryn> Yeah let's all study denotational semantics before 7th grade.
2022-06-10 07:38:46 +0200 <dsal> It's a fold of n values with mempty
2022-06-10 07:39:03 +0200 <Axman6> kenaryn: I think you are vastly overestimating what a seemigroup is.
2022-06-10 07:39:11 +0200 <dsal> If you stimes Sum (addition) you get multiplication. If you stimes Product, you get exponentiation.
2022-06-10 07:39:35 +0200 <jackdk> It's also hard to even talk about why to generalise until you've got a few examples in your head, and can cut out a common theme and say "these are all alike in this way"
2022-06-10 07:39:39 +0200 <dsal> mempty of Sum is 0 and mempty of Product is 1
2022-06-10 07:39:40 +0200 <Axman6> (+) and numbers form a semigroup, (*) and numbers form a semigroup, (++) and lists form a semigroup, append and Text form a semigroup
2022-06-10 07:40:41 +0200 <Axman6> many people find Monoid simpler to understand, because we get some more useful laws - (+), 0 and numbers form a monoid - and a monoid is just a semigroup which also has some sort of identity for the combining function
2022-06-10 07:40:50 +0200 <Axman6> you know lots of monoids and semigroups already
2022-06-10 07:41:04 +0200 <Axman6> seven year olds also know lots of them
2022-06-10 07:41:39 +0200 <Axman6> sclv: how can stimes use mempty?
2022-06-10 07:41:57 +0200 <Axman6> uh, dsal (but feel free to answer sclv because you're also cool)
2022-06-10 07:42:36 +0200 <dsal> Hold on. I knew this one at one point.
2022-06-10 07:43:43 +0200 <dsal> oh. It's… OK, slightly special.
2022-06-10 07:43:55 +0200 <dsal> stimes is a method on Semigroup
2022-06-10 07:44:16 +0200Vajb(~Vajb@2001:999:580:7ad5:4d80:745:ec1c:305)
2022-06-10 07:46:26 +0200 <Axman6> this just feels wrong, like you're secretly showhorning Monoid into Semigroup
2022-06-10 07:46:30 +0200 <kenaryn> Allright, thanks for your feed-back, I'll take notes to look smart.
2022-06-10 07:49:09 +0200 <Axman6> A stack of papers, a.k.a, a document, is also a semigroup - you can take two documents and put them together to get a new document; they are also a Monoid, you can add the empty document (no pages) to the beginning or end of any other document and still have the same document
2022-06-10 07:49:48 +0200 <jackdk> kenaryn: I think you will find it easier than you far, once you start working through it.
2022-06-10 07:51:19 +0200 <kenaryn> But what is mempty? It may shed light on your many examples.
2022-06-10 07:52:25 +0200 <jackdk> mempty is the thing that "does nothing when you combine with it" - it's `0` when you combine with `+`, `1` when you combine with `*`, `[]` when you're appending lists, `False` when you combine with `&&`, `True` when you combine with `||`
2022-06-10 07:53:07 +0200 <kenaryn> So function composition of plusTwo and minusTwo is both a semigroup AND a Monoid?
2022-06-10 07:53:55 +0200 <kenaryn> They cancel out each other I mean.
2022-06-10 07:54:45 +0200 <kenaryn> So they produce nothing: `plusTwo . minusTwo = id`
2022-06-10 07:55:10 +0200 <jackdk> we generally say that the "set" (or in Haskell, the type) is the semigroup or monoid. If the operation is obvious, it is sometimes omitted
2022-06-10 07:55:30 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2022-06-10 07:55:54 +0200 <jackdk> so functions from any type back to itself (`a -> a` for some a) form a semigroup under composition, because `f . (g . h) = (f . g) . h` for any `f, g, h :: a -> a`
2022-06-10 07:57:30 +0200 <sm> Axman6: nice example!
2022-06-10 07:57:34 +0200 <jackdk> they're actually a monoid, because we have the identity function `id`, and for any `f :: a -> a`, `f . id = f` and `id . f = f`
2022-06-10 07:58:52 +0200 <jackdk> what you're talking about, with the `plusTwo` and `minusTwo` is called "invertability" and lets you talk about "undoing" things. so we'd say `minusTwo` is the inverse of `plusTwo`. A monoid where every element has an inverse is called a group
2022-06-10 07:59:33 +0200 <kenaryn> I thought it was commutativity.
2022-06-10 08:01:07 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection)
2022-06-10 08:02:31 +0200 <jackdk> commutativity is when you can swap things around and it doesn't change the result. Like `x + y = y + x`
2022-06-10 08:03:28 +0200 <dminuoso> 07:59:32 Axman6 | [05:36:37] they kind of do, they just don't tell you (or know they're doing it)
2022-06-10 08:03:54 +0200 <jackdk> you sometimes hear "commutative" structures called "abelian" structures, usually "abelian groups"
2022-06-10 08:04:04 +0200 <dminuoso> So there's an important distinction between particular examples of semigroups and the actual semigroup abstraction.
2022-06-10 08:04:10 +0200 <jackdk> but I think if you said "abelian semigroup" you'd be understood
2022-06-10 08:06:12 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81)
2022-06-10 08:07:00 +0200 <dminuoso> It's also why "you've been using monads without even knowing" is a red herring. I dont think you are truly using *Monad* unless your own code has some mention of `forall t. Monad t`
2022-06-10 08:09:16 +0200 <dminuoso> Similarly, a semigroup is more than just "being able to add numbers". In both cases it's about a particular object consciously knowing it has particular properties, and relying on these properties somehow.
2022-06-10 08:10:56 +0200 <kenaryn> I'll take it slowly, I'm merely try to learn programming after all. But the entry barriers of haskell world are often overwhelming.
2022-06-10 08:11:34 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
2022-06-10 08:12:37 +0200slack1256(~slack1256@186.11.82.227)
2022-06-10 08:13:22 +0200_ht(~quassel@231-169-21-31.ftth.glasoperator.nl)
2022-06-10 08:14:16 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc)
2022-06-10 08:15:28 +0200 <jackdk> slow and steady is the way
2022-06-10 08:22:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 08:26:27 +0200acidjnk_new(~acidjnk@pd9e0b3b9.dip0.t-ipconnect.de)
2022-06-10 08:28:56 +0200Guest40(~Guest40@240e:3b6:30fb:5307:f037:fd83:4468:f206)
2022-06-10 08:35:18 +0200o(niko@libera/staff/niko)
2022-06-10 08:35:48 +0200Feuermagier(~Feuermagi@user/feuermagier) (Remote host closed the connection)
2022-06-10 08:35:55 +0200Feuermagier_(~Feuermagi@2a02:2488:4211:3400:9757:fce7:dee0:8d0e)
2022-06-10 08:40:01 +0200_ht(~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
2022-06-10 08:40:37 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 08:40:49 +0200pmk(~user@2a02:587:9418:69b8:b896:d770:251d:c4d7)
2022-06-10 08:43:05 +0200echoreply(~echoreply@2001:19f0:9002:1f3b:5400:ff:fe6f:8b8d) (Quit: WeeChat 2.8)
2022-06-10 08:43:57 +0200echoreply(~echoreply@45.32.163.16)
2022-06-10 08:50:17 +0200slac73558(~slack1256@191.126.99.202)
2022-06-10 08:51:25 +0200 <rubin55> hi all, quick question, when you upgrade hls, how do you make existing installed ghc's be 'hls-powered'?
2022-06-10 08:51:33 +0200 <rubin55> (using ghcup)
2022-06-10 08:52:27 +0200slack1256(~slack1256@186.11.82.227) (Ping timeout: 258 seconds)
2022-06-10 08:53:59 +0200 <Axman6> hls-powered means that there's a version of hls that was compiled with that compiler version
2022-06-10 08:54:19 +0200 <Axman6> so it's more a note that if you use that version of GHC, you will get hls support
2022-06-10 08:55:12 +0200 <rubin55> right, I see
2022-06-10 08:57:02 +0200cfricke(~cfricke@user/cfricke)
2022-06-10 08:58:47 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 08:59:37 +0200 <rubin55> what confuses me is that I had ghc 8.10.7, hls-powered with hls 1.6.1.0, I then upgraded hls to 1.7.0.0, and uninstalled 1.6.1.0, after which all installed ghc's became NOT hls-powered, then I undid that and reinstalled 1.6.1.0, but I never got the hls-powered notes back again
2022-06-10 09:00:05 +0200 <rubin55> I nuke'ed and reinstalled, and all is hls-powered again, this time with higher version hls (1.7.0.0)
2022-06-10 09:00:22 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-06-10 09:00:28 +0200rembo10(~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in)
2022-06-10 09:01:20 +0200rembo10(~rembo10@main.remulis.com)
2022-06-10 09:02:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 09:03:34 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 09:05:16 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-06-10 09:07:45 +0200img(~img@user/img)
2022-06-10 09:08:41 +0200kenaryn(~aurele@89-88-44-27.abo.bbox.fr) (Quit: leaving)
2022-06-10 09:10:25 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:4347:f4b5:5ef3:c3f2)
2022-06-10 09:10:51 +0200 <tvandinther> What would I use if I want something like foldr but use an accumulator of a different type than the foldable? I.e. fold a set into a map
2022-06-10 09:11:26 +0200 <dminuoso> tvandinther: foldr.
2022-06-10 09:11:39 +0200 <dminuoso> :t foldr
2022-06-10 09:11:40 +0200 <lambdabot> Foldable t => (a -> b -> b) -> b -> t a -> b
2022-06-10 09:11:56 +0200 <dminuoso> Observe that `b` is free to be different from `t a`
2022-06-10 09:11:57 +0200alp(~alp@user/alp)
2022-06-10 09:12:04 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
2022-06-10 09:12:33 +0200 <dminuoso> @let import qualified Data.Map as M
2022-06-10 09:12:35 +0200 <lambdabot> Defined.
2022-06-10 09:12:39 +0200 <tvandinther> Oh right yeah. I missed that. Hmm, I must have another type mismatch in there
2022-06-10 09:13:45 +0200 <tvandinther> Oh haha I was being silly. Folding a set and using Map.insertWith but clearly I won't be getting key clashes folding from a set.
2022-06-10 09:14:25 +0200 <dminuoso> tvandinther: You can use foldrM in combination with alterF
2022-06-10 09:14:31 +0200vpan(~0@212.117.1.172)
2022-06-10 09:15:00 +0200 <dminuoso> I frequently define `insert1` in terms of alterF to get either validation errors or straight up exceptions on key conflicts.
2022-06-10 09:15:56 +0200 <tvandinther> Is this then the best way to create a map from a set with 1 as the default value? `foldr (`Map.insert` 1) Map.empty set`
2022-06-10 09:16:10 +0200nate3(~nate@98.45.169.16)
2022-06-10 09:16:37 +0200 <dminuoso> What do you mean by "default" value exactly?
2022-06-10 09:18:31 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 258 seconds)
2022-06-10 09:19:30 +0200 <tvandinther> In this situation, the set becomes the keys and then it needs an associated "default" value. "Make a map where the keys are all those in the given set and all with a value of 1"
2022-06-10 09:20:32 +0200 <dminuoso> There's a more performant way, but this will work yes.
2022-06-10 09:20:47 +0200 <tvandinther> What's the technique you would use?
2022-06-10 09:20:56 +0200nate3(~nate@98.45.169.16) (Ping timeout: 248 seconds)
2022-06-10 09:22:07 +0200 <dminuoso> I would use S.toAscList + M.fromAscList
2022-06-10 09:22:45 +0200 <dminuoso> But if the data is of trivial size, the foldr reads nicer
2022-06-10 09:23:59 +0200 <tvandinther> What would be the full expression to be equivalent to the foldr one?
2022-06-10 09:25:23 +0200 <dminuoso> M.fromAscList . (`zip` repeat 1) . S.toAscList
2022-06-10 09:25:52 +0200briandaed(~briandaed@109.95.143.14.r.toneticgroup.pl)
2022-06-10 09:26:17 +0200 <tvandinther> Ah I see, is it essentially creating a list of k,v pairs and then creating a map from that
2022-06-10 09:26:29 +0200gurkenglas(~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de)
2022-06-10 09:26:37 +0200 <dminuoso> tvandinther: Yes, though the more relevant part is the *Asc* bits.
2022-06-10 09:26:53 +0200 <tvandinther> Is that because the map is arranged in that order?
2022-06-10 09:27:07 +0200 <dminuoso> No rather, its assumed to be ordered already.
2022-06-10 09:27:29 +0200 <dminuoso> This lets it build the map in linear time
2022-06-10 09:27:49 +0200 <tvandinther> I see. And the Set is naturally ordered as insertions occur?
2022-06-10 09:28:21 +0200 <dminuoso> Well, it has some particular internal representation. But S.toAscList gives you a list in ascending values.
2022-06-10 09:28:46 +0200 <dminuoso> In M.fromAscList it is not checked whether the list is truly ascending (in the first element of the tuple), so it is unsafe in that sense. If you dont guarantee its order it will not behave nicely
2022-06-10 09:29:06 +0200 <dminuoso> (Id have to check, but I think you will get a really buggy map)
2022-06-10 09:30:08 +0200 <tvandinther> Okay, that makes sense. The unchecked nature allows you to avoid the logarithmic operation? And I presume the foldr method happens in n*logn time as it is performing n insertions.
2022-06-10 09:31:28 +0200 <dminuoso> I cant say for certain, it *may* be that both have the same asymptotics. Going through S.toAscList and M.fromAscList you have a guarantee.
2022-06-10 09:31:42 +0200 <dminuoso> Id have to figure out the internals of how M.insert works
2022-06-10 09:32:18 +0200 <dminuoso> And I dont know from the top off my head whether foldr will yield values in ascending either
2022-06-10 09:33:13 +0200kaskal-(~kaskal@2001:4bb8:2a7:f3b8:36de:fd74:7690:c176) (Quit: ZNC - https://znc.in)
2022-06-10 09:33:33 +0200kaskal(~kaskal@089144199195.atnat0008.highway.a1.net)
2022-06-10 09:33:41 +0200 <tvandinther> No worries, I got the answers I came for. I appreciate the help.
2022-06-10 09:33:45 +0200zeenk(~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806)
2022-06-10 09:34:17 +0200 <dminuoso> toAscList = foldrWithKey (\k x xs -> (k,x):xs) []
2022-06-10 09:34:22 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 09:34:48 +0200 <dminuoso> But then again, its not documented that foldr variants give ascending order. So I would not rely on this either
2022-06-10 09:34:58 +0200zeenk(~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806) (Read error: Connection reset by peer)
2022-06-10 09:34:59 +0200zeenk2(~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806)
2022-06-10 09:39:30 +0200jgeerds(~jgeerds@55d45f48.access.ecotel.net)
2022-06-10 09:47:46 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc)
2022-06-10 09:52:24 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 248 seconds)
2022-06-10 09:53:25 +0200_xor(~xor@72.49.198.103) (Ping timeout: 256 seconds)
2022-06-10 09:53:37 +0200shriekingnoise(~shrieking@201.231.16.156) (Quit: Quit)
2022-06-10 09:54:18 +0200bilegeek(~bilegeek@111.sub-174-208-241.myvzw.com) (Quit: Leaving)
2022-06-10 09:55:01 +0200yosef`(~user@user/yosef/x-2947716) (Remote host closed the connection)
2022-06-10 09:55:03 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a4d3:9794:7d08:2a06) (Remote host closed the connection)
2022-06-10 09:56:52 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-06-10 09:57:10 +0200_xor(~xor@72.49.198.103)
2022-06-10 10:02:34 +0200Psybur(~Psybur@c-76-123-45-25.hsd1.va.comcast.net)
2022-06-10 10:03:14 +0200CiaoSen(~Jura@p200300c95738d2002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-06-10 10:03:26 +0200MajorBiscuit(~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl)
2022-06-10 10:05:07 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc)
2022-06-10 10:07:35 +0200tcard(~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Quit: Leaving)
2022-06-10 10:11:19 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Remote host closed the connection)
2022-06-10 10:11:25 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-06-10 10:11:25 +0200jonathanx__(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 258 seconds)
2022-06-10 10:11:31 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc)
2022-06-10 10:12:09 +0200Kaiepi(~Kaiepi@156.34.47.253)
2022-06-10 10:12:44 +0200tcard(~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp)
2022-06-10 10:19:07 +0200tvandinther(~tvandinth@2406:e002:68db:9f01:6532:b3cb:e7a1:1dce) (Quit: Client closed)
2022-06-10 10:19:14 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 255 seconds)
2022-06-10 10:23:56 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-06-10 10:25:40 +0200gmg(~user@user/gehmehgeh)
2022-06-10 10:29:54 +0200Pickchea(~private@user/pickchea)
2022-06-10 10:32:04 +0200nicbk(~nicbk@user/nicbk) (Ping timeout: 240 seconds)
2022-06-10 10:35:53 +0200elkcl(~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) (Ping timeout: 255 seconds)
2022-06-10 10:36:27 +0200elkcl(~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru)
2022-06-10 10:39:01 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 258 seconds)
2022-06-10 10:41:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 10:47:43 +0200pie_(~pie_bnc@user/pie/x-2818909) ()
2022-06-10 10:48:05 +0200pie_(~pie_bnc@user/pie/x-2818909)
2022-06-10 10:51:49 +0200Goodbye_Vincent(cyvahl@freakshells.net) (Quit: Ping timeout (120 seconds))
2022-06-10 10:53:29 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 10:54:24 +0200Goodbye_Vincent(cyvahl@freakshells.net)
2022-06-10 10:55:28 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a4d3:9794:7d08:2a06)
2022-06-10 10:58:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 10:58:41 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 11:00:11 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a4d3:9794:7d08:2a06) (Ping timeout: 255 seconds)
2022-06-10 11:04:20 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-06-10 11:08:05 +0200pottsy(~pottsy@129.227.183.244) (Ping timeout: 265 seconds)
2022-06-10 11:08:54 +0200pottsy(~pottsy@129.227.183.244)
2022-06-10 11:11:07 +0200__monty__(~toonn@user/toonn)
2022-06-10 11:12:32 +0200 <merijn> dminuoso: It is now
2022-06-10 11:13:00 +0200 <merijn> I filed a issue about that and recent releases of containers should document that folds are guaranteed in key order
2022-06-10 11:14:14 +0200ubert(~Thunderbi@2a02:8109:abc0:6434:9e35:18b6:7752:8917)
2022-06-10 11:14:18 +0200 <dminuoso> Nice, though Im not sure you get O(n) when foldr'ing key ordered data with M.insert
2022-06-10 11:14:18 +0200 <merijn> dminuoso: see the note on the Foldable/Traversable instances for example
2022-06-10 11:14:41 +0200 <dminuoso> One part why I believe this may be the case, is because fromAscList is not implemented in terms of foldr + insert
2022-06-10 11:15:19 +0200 <dminuoso> fromMonoListWithKey has a very handtailored implementation
2022-06-10 11:15:19 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-06-10 11:15:26 +0200 <merijn> dminuoso: because foldr + insert is n log n? And you can do faster if you know the list is in order
2022-06-10 11:15:50 +0200 <dminuoso> merijn: I dont know whether it is `n log n` when the input is already ordered *shurts*
2022-06-10 11:15:52 +0200 <dminuoso> That's the point.
2022-06-10 11:16:14 +0200 <merijn> It is, unless you somehow special case that fact
2022-06-10 11:16:48 +0200 <merijn> O(n) to traverse the input list, log N to insert each element
2022-06-10 11:25:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 11:26:50 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 11:27:10 +0200dcoutts__(~duncan@host86-176-29-4.range86-176.btcentralplus.com) (Ping timeout: 240 seconds)
2022-06-10 11:28:43 +0200DNH(~DNH@2a02:8108:1100:16d8:589c:27c2:e36:6e88)
2022-06-10 11:29:24 +0200pie_(~pie_bnc@user/pie/x-2818909) (Remote host closed the connection)
2022-06-10 11:32:55 +0200zaquest(~notzaques@5.130.79.72) (Remote host closed the connection)
2022-06-10 11:34:06 +0200zaquest(~notzaques@5.130.79.72)
2022-06-10 11:35:12 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection)
2022-06-10 11:35:54 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81)
2022-06-10 11:36:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 11:38:35 +0200Guest40(~Guest40@240e:3b6:30fb:5307:f037:fd83:4468:f206) (Quit: Client closed)
2022-06-10 11:46:44 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 11:49:11 +0200 <Haskelytic> fellas i was reading the haskell2010 report and it says about modules: "A module defines a *mutually recursive scope* containing declarations for value bindings, data types, type
2022-06-10 11:49:12 +0200 <Haskelytic> synonyms, classes, etc."
2022-06-10 11:49:22 +0200 <Haskelytic> what makes it mutually recursive?
2022-06-10 11:52:52 +0200 <merijn> Haskelytic: The fact that foo and bar can both references each other
2022-06-10 11:53:36 +0200 <merijn> Consider a module with these two definitions: "zeroStart :: [Int]; zeroStart = 0 : oneStart" and "oneStart :: [Int]; oneStart = 1 : zeroStart"
2022-06-10 11:54:20 +0200dcoutts__(~duncan@host86-176-29-4.range86-176.btcentralplus.com)
2022-06-10 11:55:02 +0200 <merijn> Haskelytic: Basically "everything is in scope at once" (i.e. there is no ordering to "when do things come into scope" like you have in Python, C, etc.
2022-06-10 11:55:05 +0200 <merijn> )
2022-06-10 11:55:16 +0200 <merijn> Where things are only in scope *after* the point they're defined
2022-06-10 11:56:57 +0200 <Haskelytic> Ahhh makes sense
2022-06-10 11:57:19 +0200 <Haskelytic> merijn: thanks for that clear example!
2022-06-10 11:58:19 +0200 <Haskelytic> so its basically like a letrec
2022-06-10 11:58:22 +0200 <merijn> Yes
2022-06-10 11:58:48 +0200 <merijn> Haskelytic: I assume that means you've got an (S)ML background? :p
2022-06-10 11:59:18 +0200 <Haskelytic> XD  i wish...i was bred on sicp and lisp
2022-06-10 11:59:26 +0200 <Haskelytic> my first brush against functional programming
2022-06-10 11:59:51 +0200 <Haskelytic> I went into Haskell thinking, "how hard can it be?"
2022-06-10 12:00:02 +0200 <Haskelytic> Eating my words now lol
2022-06-10 12:00:08 +0200 <dminuoso> Im curious, sometimes I hear people complaining letrec to be the default in some languages. Why would users prefer `let` not to be `letrec` ever?
2022-06-10 12:00:40 +0200 <Haskelytic> I'm curious about how you can reason about runtime in the presence of non-strict evaluation
2022-06-10 12:00:45 +0200 <Haskelytic> Does not seem trivial at all to me
2022-06-10 12:01:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 12:01:04 +0200 <dminuoso> Haskelytic: Experience and practice. And yes, its not trivial.
2022-06-10 12:01:20 +0200 <dminuoso> It's a frequently named criticsm of Haskell
2022-06-10 12:02:36 +0200dextaa(~DV@user/dextaa)
2022-06-10 12:02:37 +0200 <merijn> dminuoso: You don't accidentally create recursive bindings when reusing variable names
2022-06-10 12:02:52 +0200 <merijn> But in practice that's screwed me up, like, twice in over a decade of haskell
2022-06-10 12:03:54 +0200 <merijn> dminuoso: So if you habitually shadow variables it can help reduce that
2022-06-10 12:04:20 +0200 <dminuoso> I use recursive bindings almost everywhere *shrugs*
2022-06-10 12:05:05 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2022-06-10 12:05:07 +0200 <merijn> Haskelytic: tbh, at the start it feels harder because everything is different and new and not much existing knowledge can be reused, but the further you get, the more your "old" programming experience becomes relevant
2022-06-10 12:05:34 +0200 <merijn> Like, data structures are data structures and 90% of the stuff you're used to is basically the same
2022-06-10 12:05:42 +0200 <sm> dminuoso: why, I suppose because it's easier to create infinite loops wihout noticing ?
2022-06-10 12:05:54 +0200HotblackDesiato(~HotblackD@gateway/tor-sasl/hotblackdesiato) (Remote host closed the connection)
2022-06-10 12:06:07 +0200 <dminuoso> sm: That's the thing, I cant recall having done infinite loops in the past 2 years at all..
2022-06-10 12:06:15 +0200HotblackDesiato(~HotblackD@gateway/tor-sasl/hotblackdesiato)
2022-06-10 12:06:41 +0200 <dminuoso> But is that only because I'm used to wielding a chainsaw?
2022-06-10 12:06:49 +0200 <sm> it has happened me a couple of times in recent years
2022-06-10 12:06:58 +0200xff0x(~xff0x@s5.HtokyoFL1.vectant.ne.jp) (Ping timeout: 246 seconds)
2022-06-10 12:07:02 +0200 <Haskelytic> merijn: thanks for that encouraging advice :)
2022-06-10 12:07:26 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
2022-06-10 12:07:35 +0200 <Haskelytic> dminuoso: well I suppose the Haskell chainsaw is better than C++
2022-06-10 12:07:54 +0200 <dminuoso> Haskelytic: Another thing is, for most problems performance is not relevant anyway, and the cost of missing strictness is usually negligable for most software a beginner is likely to write.
2022-06-10 12:07:56 +0200 <merijn> Haskelytic: If you, for example, browse the containers package Map's API should look the same as any other dictionary/map type you're used to (well, with a bunch more folding operations, I guess..) https://hackage.haskell.org/package/containers-0.6.5.1/docs/Data-Map-Lazy.html
2022-06-10 12:08:11 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 12:08:14 +0200 <merijn> sm: Do you normally program with name shadowing warning enabled or no?
2022-06-10 12:08:15 +0200 <Haskelytic> have any of you read chris okasaki's book of purely function data structures? i'm thinking of perusing that after i have gotten a solid grasp on the basics
2022-06-10 12:08:32 +0200 <merijn> Haskelytic: I've skimmed it. It's a classic
2022-06-10 12:09:10 +0200 <merijn> Haskelytic: It's basically a book version of his thesis (which was proving that "anything you can do in a mutable setting can be done in an immutable setting with *at worst* log N slowdown
2022-06-10 12:09:14 +0200 <merijn> )
2022-06-10 12:09:15 +0200 <Haskelytic> dminuoso: I really need to get out of the micro-optimization mindset :/
2022-06-10 12:09:17 +0200 <sm> merijn: not sure, I'll check that
2022-06-10 12:09:44 +0200 <sm> no, I seem to have that turned off
2022-06-10 12:09:52 +0200 <merijn> sm: I'm curious, because I've always used the name shadowing warning (-Wall enables it), which has trained me out of name-shadowing, which makes accidental recursion nearly impossible
2022-06-10 12:10:14 +0200 <sm> good tip, I might enablne it
2022-06-10 12:10:28 +0200 <Haskelytic> merijn: oh yeah i have definitely noticed that....I think it's the radical shift in thinking about the problem domain
2022-06-10 12:10:34 +0200 <merijn> The only time you can really create accidental recursion is when you were trying to use a variable 'x' inside a new shadowing binding named 'x' (making it recurse on itself)
2022-06-10 12:10:37 +0200 <Haskelytic> the biggest one is immutability
2022-06-10 12:11:12 +0200 <merijn> sm: If you only ever have one 'x' in scope, it's near impossible to accidentally recurse, because what other 'x' could you possibly refer to?
2022-06-10 12:11:24 +0200 <Haskelytic> merijn: oh wow....I didn't know that book was based on his thesis
2022-06-10 12:11:58 +0200 <merijn> sm: So my current hypothesis is that "people who run into letrec issues are people who don't habitually avoid name shadowing with the warning"
2022-06-10 12:12:15 +0200 <merijn> but that's a hard hypothesis to test :)
2022-06-10 12:12:20 +0200 <Haskelytic> merijn: ""anything you can do in a mutable setting can be done in an immutable setting with *at worst* log N slowdown" <- learned something new today
2022-06-10 12:12:25 +0200 <merijn> I guess I have N=1 now ;)
2022-06-10 12:13:20 +0200 <merijn> Haskelytic: Because you can replace mutable variable with an immutable Map, and updates on an immutable Map are O(n) complexity. So worst case you do "the mutable algorithm, but replacing all variables in scope with a Map you keep as state"
2022-06-10 12:13:27 +0200 <merijn> eh
2022-06-10 12:13:32 +0200 <merijn> O(log N), obviously
2022-06-10 12:14:15 +0200 <merijn> Although often there's equally fast (or faster?) alternatives for algorithms in an immutable setting
2022-06-10 12:18:04 +0200Haskelytic(~Haskelyti@118.179.211.17) (Ping timeout: 252 seconds)
2022-06-10 12:19:46 +0200 <tdammers> unless "mutable setting" means "you have to actually mutate something at all cost", logic seems to dictate that any immutable algorithm can also be implemented in a mutable setting, so that would rule out "faster"
2022-06-10 12:22:27 +0200 <merijn> tdammers: You cannot rely on immutable sharing as easily
2022-06-10 12:22:46 +0200 <merijn> So at least it might be harder to implement
2022-06-10 12:22:54 +0200dcoutts__(~duncan@host86-176-29-4.range86-176.btcentralplus.com) (Ping timeout: 258 seconds)
2022-06-10 12:23:01 +0200 <merijn> I guess faster is not possible in general, but you get the gist
2022-06-10 12:27:00 +0200Teacup(~teacup@user/teacup) (Quit: No Ping reply in 180 seconds.)
2022-06-10 12:27:31 +0200tvandinther(~tvandinth@2406:e002:68db:9f01:6532:b3cb:e7a1:1dce)
2022-06-10 12:27:43 +0200raym(~raym@user/raym) (Quit: why does nothing work?)
2022-06-10 12:27:53 +0200lbseale(~quassel@user/ep1ctetus) (Ping timeout: 258 seconds)
2022-06-10 12:28:27 +0200Teacup(~teacup@user/teacup)
2022-06-10 12:30:12 +0200raym(~raym@user/raym)
2022-06-10 12:31:11 +0200lbseale(~quassel@user/ep1ctetus)
2022-06-10 12:32:25 +0200Haskelytic(~Haskelyti@37.111.200.113)
2022-06-10 12:35:04 +0200Kaiepi(~Kaiepi@156.34.47.253) (Ping timeout: 248 seconds)
2022-06-10 12:35:09 +0200 <tvandinther> Heya, got another question. How would I create a function that could take a list of partially applied functions and apply a single parameter on them using short-circuiting logic? Something with a signature like this I think: `[(Int -> Int -> Bool)] -> Int -> Bool`
2022-06-10 12:35:15 +0200simendsjo(~user@78-72-230-58-no2730.tbcn.telia.com)
2022-06-10 12:35:30 +0200 <dminuoso> tvandinther: first thing to realize, there's no such thing as "partially applied functoins"
2022-06-10 12:35:52 +0200 <dminuoso> It's a notion that only exists in languages that have a notion of functions taking multiple arguments.
2022-06-10 12:35:57 +0200 <dminuoso> In Haskell all functions take a singular argument.
2022-06-10 12:36:03 +0200 <tvandinther> yeah my bad. C# is my day job haha
2022-06-10 12:36:26 +0200 <dminuoso> -> is right associative, meaning the following two types are grammatically even the sane:
2022-06-10 12:36:33 +0200 <dminuoso> Int -> Double -> Float -> String
2022-06-10 12:36:40 +0200 <dminuoso> Int -> (Double -> (Float -> String))
2022-06-10 12:36:58 +0200 <dminuoso> Apply it to one argument, get a function back.
2022-06-10 12:37:22 +0200 <sm> but as a user of the language, "partially applied function" is a fine mental image
2022-06-10 12:37:27 +0200 <dminuoso> And in fact, function applicatoin `f 1 2 3` associates to the left, so that actually reads `((f 1) 2) 3`
2022-06-10 12:37:32 +0200 <dminuoso> Which complements the ahove
2022-06-10 12:39:06 +0200 <tvandinther> It makes sense intuitively. I gotta get my head around the terminology and logic
2022-06-10 12:39:07 +0200slac73558(~slack1256@191.126.99.202) (Read error: Connection reset by peer)
2022-06-10 12:40:43 +0200Kaiepi(~Kaiepi@156.34.47.253)
2022-06-10 12:41:31 +0200 <Haskelytic> tvandinther: what do you mean it short-circuits?
2022-06-10 12:42:15 +0200 <tvandinther> If any of the listed functions resolve in True, it doesn't do any more. Perhaps that's implied with the lazy evaluation I'm not sure
2022-06-10 12:42:25 +0200 <Haskelytic> oh
2022-06-10 12:42:50 +0200 <tvandinther> [f1, f2, f3] becomes f1 n || f2 n || f3 n
2022-06-10 12:43:14 +0200 <Haskelytic> f1 n has type Int -> Bool
2022-06-10 12:43:30 +0200 <Haskelytic> based on your earlier types
2022-06-10 12:43:44 +0200 <Haskelytic> `[(Int -> Int -> Bool)] -> Int -> Bool`
2022-06-10 12:43:46 +0200 <tvandinther> Yep, my original question had a slightly incorrect signature
2022-06-10 12:44:08 +0200 <tvandinther> I mean `[Int -> Bool] -> Int -> Bool`
2022-06-10 12:44:15 +0200 <Haskelytic> sounds like a fold is in order
2022-06-10 12:44:34 +0200 <tvandinther> I went down the path of Applicatives, is that the wrong tool or just another way?
2022-06-10 12:45:25 +0200 <Haskelytic> something like `map ($ n) [f1, f2, f3]`
2022-06-10 12:45:34 +0200 <Haskelytic> then you fold the result with || as your operator
2022-06-10 12:45:44 +0200 <[Leary]> :t any
2022-06-10 12:45:46 +0200 <lambdabot> Foldable t => (a -> Bool) -> t a -> Bool
2022-06-10 12:46:01 +0200 <[Leary]> That pretty much does it.
2022-06-10 12:47:44 +0200notzmv(~zmv@user/notzmv)
2022-06-10 12:49:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 12:51:18 +0200coot(~coot@213.134.190.95)
2022-06-10 12:51:21 +0200 <tvandinther> If my foldable is a list of `Int -> Bool` would that make any be `(Int -> Bool -> Bool) -> t (Int -> Bool) -> Bool` ? Trying to get my head around all the typing
2022-06-10 12:52:29 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 12:52:51 +0200 <[Leary]> The first arg is ((Int -> Bool) -> Bool)
2022-06-10 12:53:16 +0200 <tvandinther> Oh okay, I thoguht they were identical
2022-06-10 12:53:34 +0200 <[Leary]> No, (a -> b -> c) is (a -> (b -> c)).
2022-06-10 12:54:06 +0200 <tvandinther> oooh right associative only
2022-06-10 12:55:30 +0200jgeerds(~jgeerds@55d45f48.access.ecotel.net) (Ping timeout: 240 seconds)
2022-06-10 12:55:57 +0200 <tvandinther> So how would I use any in this case?
2022-06-10 12:57:34 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-06-10 12:57:34 +0200Haskelytic(~Haskelyti@37.111.200.113) (Quit: Client closed)
2022-06-10 12:57:50 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-06-10 13:01:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 13:01:41 +0200CiaoSen(~Jura@p200300c95738d2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2022-06-10 13:02:36 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 276 seconds)
2022-06-10 13:04:20 +0200MajorBiscuit(~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) (Quit: WeeChat 3.5)
2022-06-10 13:07:31 +0200 <ridcully> tvandinther: something like this? `any (\f -> f 42) [odd, even, undefined]`
2022-06-10 13:07:46 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 13:08:06 +0200MajorBiscuit(~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl)
2022-06-10 13:08:07 +0200 <tvandinther> Yeah I think I managed with `any ($ n) rules`
2022-06-10 13:08:14 +0200xff0x(~xff0x@b133147.ppp.asahi-net.or.jp)
2022-06-10 13:08:27 +0200 <tvandinther> I'm just trying to wrap my head around how `($)` works to simplify the lambda
2022-06-10 13:10:50 +0200 <tvandinther> :t ($)
2022-06-10 13:10:52 +0200 <lambdabot> (a -> b) -> a -> b
2022-06-10 13:11:06 +0200 <tvandinther> :t ($ 1)
2022-06-10 13:11:07 +0200 <lambdabot> Num a => (a -> b) -> b
2022-06-10 13:12:33 +0200 <tvandinther> How come the number takes care of the a part instead of having a type issue? I would have thought that you'd apply a function and get `a -> b` back
2022-06-10 13:13:34 +0200 <lyiriyah[m]> Let's start with what `($)` does.
2022-06-10 13:13:34 +0200 <lyiriyah[m]> `($)` is an infix, right-associative operator for function application.
2022-06-10 13:14:08 +0200MajorBiscuit(~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) (Quit: WeeChat 3.5)
2022-06-10 13:14:13 +0200 <lyiriyah[m]> e.g `f (g x)` can be written as `f $ g x`
2022-06-10 13:14:58 +0200 <lyiriyah[m]> It's used as the function in the map because it's a cleaner syntax than a lambda expression (and I assume has some performance improvements, but don't quote me on that)
2022-06-10 13:15:28 +0200 <tvandinther> Ah I see. Is it typical that symbolic functions are infix?
2022-06-10 13:15:56 +0200 <tvandinther> :t (($) 1)
2022-06-10 13:15:58 +0200 <lambdabot> Num (a -> b) => a -> b
2022-06-10 13:16:18 +0200 <tvandinther> this is more in line with what I expected if I make the function prefix
2022-06-10 13:17:40 +0200nate3(~nate@98.45.169.16)
2022-06-10 13:20:40 +0200 <hpc> operator sections can fill in the parameter on either side
2022-06-10 13:20:51 +0200 <hpc> (/2) x = x/2
2022-06-10 13:20:55 +0200EvanR(~EvanR@user/evanr) (Quit: Leaving)
2022-06-10 13:20:57 +0200 <hpc> (2/) x = 2/x
2022-06-10 13:21:28 +0200 <hpc> or, ($ 42) f = f $ 42
2022-06-10 13:21:32 +0200 <hpc> or just (f 42)
2022-06-10 13:22:09 +0200 <hpc> or well, more accurately, \f -> f 42
2022-06-10 13:22:15 +0200 <hpc> which is what we had originally
2022-06-10 13:22:32 +0200nate3(~nate@98.45.169.16) (Ping timeout: 248 seconds)
2022-06-10 13:24:40 +0200lyle(~lyle@104.246.145.85)
2022-06-10 13:27:07 +0200MajorBiscuit(~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl)
2022-06-10 13:27:42 +0200zincy(~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Remote host closed the connection)
2022-06-10 13:29:07 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-06-10 13:32:15 +0200pie_(~pie_bnc@user/pie/x-2818909)
2022-06-10 13:37:30 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-06-10 13:40:05 +0200pie_(~pie_bnc@user/pie/x-2818909) (Ping timeout: 256 seconds)
2022-06-10 13:43:38 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-06-10 13:44:56 +0200Kaiepi(~Kaiepi@156.34.47.253) (Ping timeout: 248 seconds)
2022-06-10 13:47:23 +0200 <tvandinther> Thanks for the help everyone, I really appreciate it.
2022-06-10 13:47:59 +0200tvandinther(~tvandinth@2406:e002:68db:9f01:6532:b3cb:e7a1:1dce) (Quit: Client closed)
2022-06-10 13:48:32 +0200Kaiepi(~Kaiepi@156.34.47.253)
2022-06-10 13:51:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 13:53:09 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 13:53:51 +0200pie_(~pie_bnc@user/pie/x-2818909)
2022-06-10 13:55:09 +0200AlexNoo_AlexNoo
2022-06-10 13:55:22 +0200sympt3(~sympt@user/sympt)
2022-06-10 13:56:32 +0200sympt(~sympt@user/sympt) (Ping timeout: 260 seconds)
2022-06-10 13:56:32 +0200sympt3sympt
2022-06-10 13:58:22 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 13:59:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 14:00:24 +0200MajorBiscuit(~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) (Ping timeout: 248 seconds)
2022-06-10 14:02:42 +0200mattil(~mattil@helsinki.portalify.com)
2022-06-10 14:03:17 +0200MajorBiscuit(~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl)
2022-06-10 14:03:54 +0200z0k(~z0k@206.84.143.2) (Quit: WeeChat 3.5)
2022-06-10 14:04:25 +0200MajorBiscuit(~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) (Client Quit)
2022-06-10 14:05:43 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection)
2022-06-10 14:06:17 +0200MajorBiscuit(~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl)
2022-06-10 14:06:25 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net) (Remote host closed the connection)
2022-06-10 14:06:38 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-06-10 14:06:50 +0200mncheck(~mncheck@193.224.205.254) (Remote host closed the connection)
2022-06-10 14:07:59 +0200jgeerds(~jgeerds@55d45f48.access.ecotel.net)
2022-06-10 14:09:10 +0200nicbk(~nicbk@user/nicbk)
2022-06-10 14:10:11 +0200Teacup(~teacup@user/teacup) (Quit: No Ping reply in 180 seconds.)
2022-06-10 14:11:43 +0200Teacup(~teacup@user/teacup)
2022-06-10 14:16:05 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 14:21:14 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net)
2022-06-10 14:21:27 +0200acidjnk_new(~acidjnk@pd9e0b3b9.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2022-06-10 14:24:54 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection)
2022-06-10 14:25:04 +0200nicbk(~nicbk@user/nicbk) (Ping timeout: 240 seconds)
2022-06-10 14:25:36 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81)
2022-06-10 14:27:04 +0200alp(~alp@user/alp) (Ping timeout: 248 seconds)
2022-06-10 14:28:01 +0200alp(~alp@user/alp)
2022-06-10 14:30:31 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-06-10 14:36:37 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-06-10 14:45:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 14:46:36 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection)
2022-06-10 14:47:48 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 14:50:23 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:4347:f4b5:5ef3:c3f2) (Quit: WeeChat 2.8)
2022-06-10 14:52:00 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-06-10 14:52:05 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81)
2022-06-10 14:59:29 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a4d3:9794:7d08:2a06)
2022-06-10 15:02:01 +0200mattil(~mattil@helsinki.portalify.com) (Read error: Connection reset by peer)
2022-06-10 15:03:50 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a4d3:9794:7d08:2a06) (Ping timeout: 250 seconds)
2022-06-10 15:04:25 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-06-10 15:05:31 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-06-10 15:07:42 +0200califax(~califax@user/califx)
2022-06-10 15:21:54 +0200zincy(~zincy@195.25.159.41)
2022-06-10 15:28:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 15:32:02 +0200frost(~frost@user/frost) (Ping timeout: 252 seconds)
2022-06-10 15:34:44 +0200leib(~leib@2405:201:900a:f088:38f6:f1eb:59f8:2968)
2022-06-10 15:38:25 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 15:38:40 +0200o-90(~o-90@gateway/tor-sasl/o-90)
2022-06-10 15:40:27 +0200jonathanx_(~jonathan@c-5eea340e-74736162.cust.telenor.se)
2022-06-10 15:41:58 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Read error: Connection reset by peer)
2022-06-10 15:42:00 +0200o-90(~o-90@gateway/tor-sasl/o-90) (Remote host closed the connection)
2022-06-10 15:43:28 +0200pmk(~user@2a02:587:9418:69b8:b896:d770:251d:c4d7) (Remote host closed the connection)
2022-06-10 15:43:34 +0200jonathanx__(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-06-10 15:43:56 +0200jonathanx_(~jonathan@c-5eea340e-74736162.cust.telenor.se) (Read error: No route to host)
2022-06-10 15:52:39 +0200noteness(~noteness@user/noteness) (Remote host closed the connection)
2022-06-10 15:53:53 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-06-10 15:54:22 +0200alp(~alp@user/alp) (Ping timeout: 260 seconds)
2022-06-10 15:55:05 +0200noteness(~noteness@user/noteness)
2022-06-10 15:56:03 +0200ec_(~ec@gateway/tor-sasl/ec)
2022-06-10 15:58:01 +0200slack1256(~slack1256@186.11.82.227)
2022-06-10 16:00:15 +0200causal(~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0e) (Quit: WeeChat 3.5)
2022-06-10 16:00:27 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-06-10 16:07:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 16:08:19 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Quit: Leaving)
2022-06-10 16:09:37 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
2022-06-10 16:09:55 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 16:15:13 +0200vpan(~0@212.117.1.172) (Quit: Leaving.)
2022-06-10 16:19:27 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2022-06-10 16:23:35 +0200shriekingnoise(~shrieking@201.231.16.156)
2022-06-10 16:31:42 +0200slac81333(~slack1256@191.126.99.202)
2022-06-10 16:31:53 +0200jakalx(~jakalx@base.jakalx.net) ()
2022-06-10 16:32:28 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a4d3:9794:7d08:2a06)
2022-06-10 16:33:40 +0200vicfred(~vicfred@user/vicfred)
2022-06-10 16:34:00 +0200slack1256(~slack1256@186.11.82.227) (Ping timeout: 248 seconds)
2022-06-10 16:35:25 +0200Pickchea(~private@user/pickchea) (Ping timeout: 246 seconds)
2022-06-10 16:38:09 +0200zincy(~zincy@195.25.159.41) (Remote host closed the connection)
2022-06-10 16:41:38 +0200julian(~julian@20.83.116.49) (Killed (NickServ (GHOST command used by tos9_!~tos9@python/site-packages/Julian)))
2022-06-10 16:42:21 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Read error: Connection reset by peer)
2022-06-10 16:42:30 +0200\yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net)
2022-06-10 16:44:19 +0200Sgeo(~Sgeo@user/sgeo)
2022-06-10 16:50:57 +0200ec_(~ec@gateway/tor-sasl/ec) (Quit: ec_)
2022-06-10 16:52:30 +0200Ram-Z(~Ram-Z@li1814-254.members.linode.com) (Ping timeout: 240 seconds)
2022-06-10 16:55:31 +0200alp(~alp@user/alp)
2022-06-10 16:55:39 +0200slac81333slack1256
2022-06-10 16:55:49 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-06-10 16:57:05 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection)
2022-06-10 16:59:59 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81)
2022-06-10 17:00:52 +0200jgeerds(~jgeerds@55d45f48.access.ecotel.net) (Ping timeout: 260 seconds)
2022-06-10 17:01:16 +0200ec_(~ec@gateway/tor-sasl/ec)
2022-06-10 17:05:10 +0200ec_ec
2022-06-10 17:05:28 +0200jonathanx__(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-06-10 17:06:54 +0200Pickchea(~private@user/pickchea)
2022-06-10 17:07:30 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection)
2022-06-10 17:08:47 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-06-10 17:10:14 +0200jakalx(~jakalx@base.jakalx.net)
2022-06-10 17:10:22 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81)
2022-06-10 17:12:23 +0200_xor(~xor@72.49.198.103) (Quit: bbiab)
2022-06-10 17:13:58 +0200zincy(~zincy@195.25.159.41)
2022-06-10 17:18:10 +0200zincy(~zincy@195.25.159.41) (Ping timeout: 240 seconds)
2022-06-10 17:19:10 +0200nate3(~nate@98.45.169.16)
2022-06-10 17:21:58 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
2022-06-10 17:24:08 +0200nate3(~nate@98.45.169.16) (Ping timeout: 248 seconds)
2022-06-10 17:25:21 +0200finsternis(~X@23.226.237.192) (Read error: Connection reset by peer)
2022-06-10 17:26:09 +0200MajorBiscuit(~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) (Quit: WeeChat 3.5)
2022-06-10 17:31:16 +0200ec(~ec@gateway/tor-sasl/ec) (Quit: ec)
2022-06-10 17:32:19 +0200DNH(~DNH@2a02:8108:1100:16d8:589c:27c2:e36:6e88) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-06-10 17:34:04 +0200econo(uid147250@user/econo)
2022-06-10 17:36:28 +0200chomwitt(~chomwitt@2a02:587:dc1f:5600:b0ac:64b:5946:8d06) (Ping timeout: 258 seconds)
2022-06-10 17:37:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 17:40:54 +0200Ram-Z(~Ram-Z@li1814-254.members.linode.com)
2022-06-10 17:41:03 +0200Tuplanolla(~Tuplanoll@91-159-69-63.elisa-laajakaista.fi)
2022-06-10 17:48:55 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-06-10 17:53:40 +0200zer0bitz(~zer0bitz@2001:2003:f444:8f00:a9b0:33d4:b0a2:7015) (Ping timeout: 248 seconds)
2022-06-10 17:56:44 +0200DNH(~DNH@2a02:8108:1100:16d8:589c:27c2:e36:6e88)
2022-06-10 18:00:07 +0200kenran(~kenran@200116b82b2b160001075d8e18f07419.dip.versatel-1u1.de)
2022-06-10 18:01:47 +0200kaskal-(~kaskal@213-225-35-123.nat.highway.a1.net)
2022-06-10 18:02:00 +0200kaskal(~kaskal@089144199195.atnat0008.highway.a1.net) (Ping timeout: 248 seconds)
2022-06-10 18:14:32 +0200mimmy(~mimmy@S0106f81d0f5b3c63.vs.shawcable.net)
2022-06-10 18:15:36 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-06-10 18:17:22 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a4d3:9794:7d08:2a06) (Remote host closed the connection)
2022-06-10 18:19:13 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2022-06-10 18:20:13 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-06-10 18:20:51 +0200\yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Read error: Connection reset by peer)
2022-06-10 18:20:58 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net)
2022-06-10 18:21:07 +0200zeenk2(~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806) (Quit: Konversation terminated!)
2022-06-10 18:25:05 +0200Topsi(~Topsi@dyndsl-095-033-088-183.ewe-ip-backbone.de)
2022-06-10 18:26:35 +0200ec(~ec@gateway/tor-sasl/ec)
2022-06-10 18:42:09 +0200ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Ping timeout: 244 seconds)
2022-06-10 18:43:48 +0200z0k(~z0k@206.84.143.2)
2022-06-10 18:47:12 +0200segfaultfizzbuzz(~segfaultf@135-180-3-34.static.sonic.net)
2022-06-10 18:48:11 +0200segfaultfizzbuzz(~segfaultf@135-180-3-34.static.sonic.net) (Client Quit)
2022-06-10 18:51:52 +0200acidjnk_new(~acidjnk@p200300d0c7068b7704a00ff9b0caad64.dip0.t-ipconnect.de)
2022-06-10 18:54:53 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-06-10 18:57:34 +0200ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
2022-06-10 18:58:41 +0200zincy(~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0)
2022-06-10 18:58:42 +0200 <shapr> finally! I have the very most minimal working prototype of "run random tests until coverage stops increasing" ! HURRAH!
2022-06-10 18:59:27 +0200 <geekosaur> now you just have to figure out how to deal with local vs. global maxima :þ
2022-06-10 19:01:01 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Remote host closed the connection)
2022-06-10 19:01:07 +0200ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
2022-06-10 19:01:49 +0200 <shapr> right now I pull from Leancheck's infinite list of [(testcase,Bool)] and calculate the number of HPC regions that are non-zero, when that number stops increasing for N tests, the tests stop.
2022-06-10 19:02:14 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-06-10 19:03:52 +0200acidjnk_new(~acidjnk@p200300d0c7068b7704a00ff9b0caad64.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2022-06-10 19:03:57 +0200alp(~alp@user/alp) (Ping timeout: 260 seconds)
2022-06-10 19:06:08 +0200stackdroid18(~stackdroi@user/stackdroid)
2022-06-10 19:06:09 +0200slack1256(~slack1256@191.126.99.202) (Read error: Connection reset by peer)
2022-06-10 19:06:15 +0200gurkenglas(~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) (Read error: Connection reset by peer)
2022-06-10 19:07:27 +0200slack1256(~slack1256@186.11.82.227)
2022-06-10 19:07:52 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection)
2022-06-10 19:12:56 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81)
2022-06-10 19:12:58 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net)
2022-06-10 19:17:37 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2022-06-10 19:17:44 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 248 seconds)
2022-06-10 19:19:42 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.5)
2022-06-10 19:20:40 +0200Unicorn_Princess(~Unicorn_P@93-103-228-248.dynamic.t-2.net)
2022-06-10 19:23:46 +0200mimmy(~mimmy@S0106f81d0f5b3c63.vs.shawcable.net) (Ping timeout: 246 seconds)
2022-06-10 19:24:27 +0200ubert(~Thunderbi@2a02:8109:abc0:6434:9e35:18b6:7752:8917) (Quit: ubert)
2022-06-10 19:24:29 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net)
2022-06-10 19:24:30 +0200Pickchea(~private@user/pickchea) (Ping timeout: 240 seconds)
2022-06-10 19:27:06 +0200raym(~raym@user/raym) (Ping timeout: 272 seconds)
2022-06-10 19:27:16 +0200julian(~julian@20.83.116.49)
2022-06-10 19:27:47 +0200lemonsnicks(~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Ping timeout: 255 seconds)
2022-06-10 19:28:27 +0200alp(~alp@user/alp)
2022-06-10 19:29:08 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 255 seconds)
2022-06-10 19:29:27 +0200lemonsnicks(~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net)
2022-06-10 19:31:01 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
2022-06-10 19:34:51 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 19:38:33 +0200mimmy(~mimmy@S0106f81d0f5b3c63.vs.shawcable.net)
2022-06-10 19:41:22 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2022-06-10 19:44:55 +0200Teacup(~teacup@user/teacup) (Quit: No Ping reply in 180 seconds.)
2022-06-10 19:46:25 +0200Teacup(~teacup@user/teacup)
2022-06-10 19:48:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 19:48:51 +0200raym(~raym@user/raym)
2022-06-10 19:48:58 +0200sebastiandb_(~sebastian@pool-108-31-128-56.washdc.fios.verizon.net)
2022-06-10 19:49:02 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-06-10 19:49:12 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-06-10 19:50:37 +0200Teacup(~teacup@user/teacup) (Client Quit)
2022-06-10 19:53:28 +0200Teacup(~teacup@user/teacup)
2022-06-10 19:54:47 +0200leib(~leib@2405:201:900a:f088:38f6:f1eb:59f8:2968) (Remote host closed the connection)
2022-06-10 19:55:08 +0200leib(~leib@2405:201:900a:f088:38f6:f1eb:59f8:2968)
2022-06-10 19:55:53 +0200df(~ben@justworks.xyz)
2022-06-10 19:57:56 +0200cosimone`(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection)
2022-06-10 19:58:51 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net)
2022-06-10 20:03:19 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 246 seconds)
2022-06-10 20:03:37 +0200sebastiandb_(~sebastian@pool-108-31-128-56.washdc.fios.verizon.net) (Quit: Leaving)
2022-06-10 20:05:10 +0200cosimone`(~user@93-44-186-171.ip98.fastwebnet.it)
2022-06-10 20:05:46 +0200ubert(~Thunderbi@p200300ecdf14f9a1eda1a89be8fd240f.dip0.t-ipconnect.de)
2022-06-10 20:06:13 +0200Teacup(~teacup@user/teacup) (Quit: No Ping reply in 180 seconds.)
2022-06-10 20:07:50 +0200Teacup(~teacup@user/teacup)
2022-06-10 20:08:01 +0200 <Bulby[m]> Can only monads lift `maybe` in a non strict way? i.e. `maybeM :: Monad m => m a -> m (Maybe a) -> m a`
2022-06-10 20:08:30 +0200 <Bulby[m]> i defined it as `maybeM def act = maybe def pure =<< act`
2022-06-10 20:08:33 +0200 <geekosaur> monads as opposed to…?
2022-06-10 20:08:41 +0200 <Bulby[m]> applicative
2022-06-10 20:08:42 +0200lyle(~lyle@104.246.145.85) (WeeChat 3.5)
2022-06-10 20:09:17 +0200 <geekosaur> yes, but for monads it'll depend on the behavior of (>>=) (or (=<<) which is the same thing `flip`ped)
2022-06-10 20:10:21 +0200 <geekosaur> Applicatives can't make decisions so they always evaluate everything; Monads can make decisions based on earlier results, so may not evaluate some things
2022-06-10 20:10:44 +0200 <geekosaur> that's more or less the difference between the two
2022-06-10 20:10:44 +0200 <Bulby[m]> so it's inconsistent? what about `do { v <- act; case v of { Nothing -> def; Just v -> pure v } }`?
2022-06-10 20:10:59 +0200 <geekosaur> it's making a decision there, with the `case`
2022-06-10 20:11:09 +0200 <geekosaur> which a Monad can do but an Applicative can't
2022-06-10 20:11:21 +0200pottsy(~pottsy@129.227.183.244) (Ping timeout: 265 seconds)
2022-06-10 20:11:23 +0200 <Bulby[m]> is that why parser combinators for applicative is slower than monadic variants
2022-06-10 20:11:29 +0200 <geekosaur> yes, in part
2022-06-10 20:12:53 +0200 <geekosaur> the flip side of that is that Applicative can be parallelized, but Monad can't because it has to be able to receive the result to make decisions based on it
2022-06-10 20:13:17 +0200 <Bulby[m]> interesting
2022-06-10 20:13:30 +0200 <Bulby[m]> how can a monad be less powerful in a way than applicative
2022-06-10 20:13:44 +0200 <geekosaur> you're always trading off one thing to get another
2022-06-10 20:14:28 +0200 <geekosaur> it's less obvious with simpler stuff like Semigroup, but by the time you reach Monad it becomes nmore obvious what you're losing in order to gain something else
2022-06-10 20:14:48 +0200 <Bulby[m]> monad can still act as applicative tho, you just can't make decisions
2022-06-10 20:14:53 +0200 <geekosaur> right
2022-06-10 20:15:03 +0200justsomeguy(~justsomeg@user/justsomeguy) (Ping timeout: 256 seconds)
2022-06-10 20:16:32 +0200 <Bulby[m]> so a monad is an applicative that can make decisions and inspect its value
2022-06-10 20:16:37 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 246 seconds)
2022-06-10 20:17:00 +0200 <geekosaur> yes, pretty much
2022-06-10 20:17:26 +0200 <Bulby[m]> and an applicative is a functor that is pointed and ???
2022-06-10 20:18:54 +0200 <geekosaur> has "apply" (aka the former `ap`)
2022-06-10 20:19:09 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-06-10 20:19:51 +0200 <geekosaur> you actually run into another limitation similar in some ways to your question about Monad being in some ways less powerful, with Pointed + Apply
2022-06-10 20:20:05 +0200leib(~leib@2405:201:900a:f088:38f6:f1eb:59f8:2968) (Quit: Leaving)
2022-06-10 20:20:27 +0200 <geekosaur> a data type can be Pointed in a bunhc of ways, only some of which work with Apply and only one or two of which work with Applicative (and only one with Monad)
2022-06-10 20:20:46 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-06-10 20:22:53 +0200 <Bulby[m]> pointed doesn't exist because it doesn't really bring much to the table
2022-06-10 20:23:59 +0200 <geekosaur> that's only part of it
2022-06-10 20:24:15 +0200 <Bulby[m]> it also requires writing 6 classes
2022-06-10 20:24:22 +0200k8yun(~k8yun@user/k8yun)
2022-06-10 20:24:28 +0200 <Bulby[m]> to get monad
2022-06-10 20:25:15 +0200 <geekosaur> if Pointed existed, it would seem obvious to make Applicative simply be (Pointed f, Apply f), but Haskell doesn't handle this well especially when you know there's no actual Applicative instance but there *are* meaningful Pointed and Apply instances
2022-06-10 20:25:34 +0200 <geekosaur> Haskell would happily let you use it as a non-law-abiding Applicative
2022-06-10 20:26:11 +0200 <geekosaur> edwardk discussed this some time back in here
2022-06-10 20:30:46 +0200 <geekosaur> (this wouldn't happen, or at least would produce obvious errors, if Applicative had something in addition to taking `pure` from one and `(<*>)` from the other)
2022-06-10 20:31:59 +0200 <geekosaur> compare the situation with Applicative vs. Monad, where something that has Applicative but not Monad (consider ZipList) will cause (>>=) to break
2022-06-10 20:32:18 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-06-10 20:33:00 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2022-06-10 20:40:12 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 20:43:21 +0200 <c_wraith> yeah.. the situation is that you'd end up with a law-only class. And Haskell just doesn't handle those well.
2022-06-10 20:44:06 +0200 <c_wraith> You can't infer them, which is a big usability problem.
2022-06-10 20:46:50 +0200jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2022-06-10 20:49:17 +0200jinsun(~jinsun@user/jinsun)
2022-06-10 20:50:09 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2022-06-10 20:51:14 +0200 <c_wraith> (I mean, you could write logic that infers empty subclasses, but it would be wrong in situations like geekosaur mentions)
2022-06-10 20:52:13 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2022-06-10 20:54:11 +0200acidjnk_new(~acidjnk@p200300d0c7068b7704a00ff9b0caad64.dip0.t-ipconnect.de)
2022-06-10 20:57:54 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 20:58:07 +0200z0k(~z0k@206.84.143.2) (Ping timeout: 256 seconds)
2022-06-10 20:58:52 +0200kenran(~kenran@200116b82b2b160001075d8e18f07419.dip.versatel-1u1.de) (Ping timeout: 258 seconds)
2022-06-10 20:59:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 20:59:38 +0200kenran(~kenran@200116b82b2b160039f73c99514b53f8.dip.versatel-1u1.de)
2022-06-10 21:02:47 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-06-10 21:04:51 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2022-06-10 21:05:04 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-06-10 21:07:34 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 21:14:28 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 21:18:56 +0200justsomeguy(~justsomeg@user/justsomeguy) (Ping timeout: 255 seconds)
2022-06-10 21:20:43 +0200nate3(~nate@98.45.169.16)
2022-06-10 21:21:55 +0200 <NemesisD> has anyone ever used the hkd library? https://hackage.haskell.org/package/hkd-0.1 i'm trying to figure out how i could combine it with the HKD type family trick: `type family HKD f a where; HKD Identity a = a; HKD f a = f a`. When i try to do so it wants an instance of GFTraversable2 which isn't exported...
2022-06-10 21:23:11 +0200 <slack1256> Does aany module export a standard `Exist` data type that is isomorphic to just `exists n. n`?
2022-06-10 21:23:35 +0200 <c_wraith> slack1256: what would you do with such a type?
2022-06-10 21:24:08 +0200 <slack1256> Before you say that is not useful, it would make a pattern of lightweight depedent products (where I carry the proof arround) more standard between code bases.
2022-06-10 21:24:44 +0200 <c_wraith> Does it do something Void doesn't?
2022-06-10 21:25:00 +0200 <slack1256> Yeah, witht the proof, I can extract the wrapped value
2022-06-10 21:25:05 +0200 <slack1256> I will paste an example
2022-06-10 21:25:41 +0200nate3(~nate@98.45.169.16) (Ping timeout: 255 seconds)
2022-06-10 21:28:54 +0200pmk(~user@2a02:587:9418:69b8:b896:d770:251d:c4d7)
2022-06-10 21:29:01 +0200 <slack1256> c_wraith: NVM, I did not want an existential wrapper, I wanted the singleton.
2022-06-10 21:29:16 +0200 <slack1256> There I have to use TH to generate the code IIRC
2022-06-10 21:29:21 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-06-10 21:29:32 +0200Guest27(~Guest27@2601:281:d47f:1590::59a2)
2022-06-10 21:30:47 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-06-10 21:30:47 +0200 <pmk> Hello #haskell. Am I correct in assuming that the recommended way for a new haskell installation on Linux is ghcup?
2022-06-10 21:30:57 +0200 <geekosaur> yes
2022-06-10 21:31:18 +0200 <pmk> awesome, thanks!
2022-06-10 21:32:40 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 248 seconds)
2022-06-10 21:35:33 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net)
2022-06-10 21:36:00 +0200_ht(~quassel@231-169-21-31.ftth.glasoperator.nl)
2022-06-10 21:36:24 +0200pavonia(~user@user/siracusa)
2022-06-10 21:36:56 +0200mvk(~mvk@2607:fea8:5ce3:8500::ba9a) (Ping timeout: 272 seconds)
2022-06-10 21:39:18 +0200kenran(~kenran@200116b82b2b160039f73c99514b53f8.dip.versatel-1u1.de) (Quit: WeeChat info:version)
2022-06-10 21:40:18 +0200dschrempf(~dominik@070-207.dynamic.dsl.fonira.net)
2022-06-10 21:40:39 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 276 seconds)
2022-06-10 21:43:46 +0200dschrempf(~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit)
2022-06-10 21:44:51 +0200 <hololeap> @hackage barbies -- not sure if what this is what you are after, NemesisD, but the Barbies.Bare module contains that "trick" you're talking about
2022-06-10 21:44:51 +0200 <lambdabot> https://hackage.haskell.org/package/barbies -- not sure if what this is what you are after, NemesisD, but the Barbies.Bare module contains that "trick" you're talking about
2022-06-10 21:46:16 +0200pie_(~pie_bnc@user/pie/x-2818909) (Remote host closed the connection)
2022-06-10 21:46:52 +0200 <hololeap> oh, and it looks like Data.Functor.Barbie has classes that are analogous to what's in hkd
2022-06-10 21:47:34 +0200 <Bulby[m]> `Types that are parametric on unary type-constructors that control their shapes are like Barbies that can wear different clothes to become a different doll. `
2022-06-10 21:48:01 +0200 <c_wraith> yeah, I've read that package description before, and I still only thing of barbecue
2022-06-10 21:48:43 +0200 <Bulby[m]> haskellers come up with a lot fun names 😄
2022-06-10 21:49:09 +0200agumonkey(~user@2a01:e0a:8f9:d3e0:b117:81a8:33f6:93e7)
2022-06-10 21:49:36 +0200mvk(~mvk@2607:fea8:5ce3:8500::ba9a)
2022-06-10 21:49:57 +0200 <NemesisD> the metaphor gets really strained with that library haha
2022-06-10 21:50:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 21:50:10 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-06-10 21:50:41 +0200 <Bulby[m]> wtf, this is basically how I wrote my toml config
2022-06-10 21:50:49 +0200 <CAT_S> *shrug*
2022-06-10 21:52:08 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 21:52:16 +0200 <Bulby[m]> https://github.com/TheDrawingCoder-Gamer/haskell-status/blob/master/app/Status/Config.hs#L304-L306
2022-06-10 21:53:11 +0200Guest27(~Guest27@2601:281:d47f:1590::59a2) (Quit: Client closed)
2022-06-10 21:55:13 +0200 <Bulby[m]> reminds me of https://hackage.haskell.org/package/monad-chronicle-1.0.1/docs/Control-Monad-Chronicle.html
2022-06-10 21:55:34 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-06-10 21:56:45 +0200Guest27(~Guest27@2601:281:d47f:1590::59a2)
2022-06-10 21:59:04 +0200 <NemesisD> wow. i don't know exactly how it works and i'm sure i'll get even more weird looks from coworkers but `barbies` pretty much totally solves this use case
2022-06-10 22:03:36 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 248 seconds)
2022-06-10 22:04:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 22:04:59 +0200vicfred(~vicfred@user/vicfred) (Ping timeout: 256 seconds)
2022-06-10 22:06:01 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-06-10 22:07:40 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2022-06-10 22:07:52 +0200mimmy(~mimmy@S0106f81d0f5b3c63.vs.shawcable.net) (Ping timeout: 248 seconds)
2022-06-10 22:07:56 +0200_ht(~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
2022-06-10 22:11:32 +0200jgeerds(~jgeerds@55d45f48.access.ecotel.net)
2022-06-10 22:12:05 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2022-06-10 22:15:11 +0200ec(~ec@gateway/tor-sasl/ec)
2022-06-10 22:15:26 +0200chomwitt(~chomwitt@2a02:587:dc1f:5600:518c:c264:c8fd:1f6b)
2022-06-10 22:15:27 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 22:21:10 +0200Feuermagier(~Feuermagi@user/feuermagier)
2022-06-10 22:21:24 +0200justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.5)
2022-06-10 22:22:47 +0200Feuermagier_(~Feuermagi@2a02:2488:4211:3400:9757:fce7:dee0:8d0e) (Ping timeout: 240 seconds)
2022-06-10 22:26:07 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-06-10 22:35:03 +0200mimmy(~mimmy@S0106f81d0f5b3c63.vs.shawcable.net)
2022-06-10 22:41:06 +0200mimmy(~mimmy@S0106f81d0f5b3c63.vs.shawcable.net) (Ping timeout: 276 seconds)
2022-06-10 22:41:24 +0200Guest27(~Guest27@2601:281:d47f:1590::59a2) (Ping timeout: 252 seconds)
2022-06-10 22:41:43 +0200zincy(~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) (Remote host closed the connection)
2022-06-10 22:42:27 +0200zincy(~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0)
2022-06-10 22:42:45 +0200cyphase(~cyphase@user/cyphase) (Ping timeout: 258 seconds)
2022-06-10 22:42:47 +0200 <edwardk> NemesisD: the HEAD version of hkd and distributive have a lot better tools, but haven't made it to hackage yet
2022-06-10 22:43:13 +0200slac30456(~slack1256@191.125.99.202)
2022-06-10 22:43:17 +0200 <edwardk> i don't know the HKD type family trick though
2022-06-10 22:44:04 +0200ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
2022-06-10 22:44:04 +0200 <geekosaur> it "swallows" Identity so you get a normal data type if you use Foo Identity instead of e.g. Foo Maybe
2022-06-10 22:44:07 +0200 <edwardk> oh, you want the flat version with Id to actually be the identity on the thing
2022-06-10 22:44:32 +0200 <edwardk> what do you put in it ?
2022-06-10 22:45:10 +0200slack1256(~slack1256@186.11.82.227) (Ping timeout: 240 seconds)
2022-06-10 22:45:29 +0200 <edwardk> i don't have an argument after to feed it. i have Element a f = f a
2022-06-10 22:45:38 +0200 <edwardk> but most of my hkd types take (*->*) -> *
2022-06-10 22:45:44 +0200Kaiepi(~Kaiepi@156.34.47.253) (Ping timeout: 248 seconds)
2022-06-10 22:45:52 +0200 <edwardk> or (k->*) -> *
2022-06-10 22:46:30 +0200 <edwardk> so you wind up building a boring functorless type and a version with the functors?
2022-06-10 22:46:58 +0200zincy(~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) (Ping timeout: 258 seconds)
2022-06-10 22:47:43 +0200pie_(~pie_bnc@user/pie/x-2818909)
2022-06-10 22:47:57 +0200 <NemesisD> yeah. so for my use case the functorless version is usually a "raw" instance of the record. i usually have another version with a functor that represents metadata about the each field and maybe another version where the functor represents that the values have all been validated
2022-06-10 22:48:24 +0200agumonkey(~user@2a01:e0a:8f9:d3e0:b117:81a8:33f6:93e7) (Ping timeout: 248 seconds)
2022-06-10 22:49:00 +0200 <NemesisD> things weren't quite lining up right with `hkd` and to be honest I'm not really sure yet how `barbies` manages to allow for the functorless version
2022-06-10 22:49:02 +0200 <edwardk> so if i swapped out Element for your HKD, i'd write something like data Person f = Person { person :: Element Name f, age :: Element Age f } -- rather than the f Name and f Age in there today. and try to compose this so users of Person Identity felt like they were using a simple person?
2022-06-10 22:49:30 +0200 <edwardk> and if Element was the type family it'd do some kind of clever lift with Identity special cased to make it melt away
2022-06-10 22:49:54 +0200 <edwardk> er Element got renamed. F1 now?
2022-06-10 22:50:34 +0200 <NemesisD> that sounds about right. where does F1 come from?
2022-06-10 22:50:35 +0200slac30456(~slack1256@191.125.99.202) (Read error: Connection reset by peer)
2022-06-10 22:51:03 +0200 <edwardk> https://github.com/ekmett/hkd/blob/main/src/Data/HKD.hs#L222 is how i use it
2022-06-10 22:51:06 +0200 <edwardk> this is in HEAD hkd
2022-06-10 22:51:12 +0200 <edwardk> no functorless form
2022-06-10 22:51:23 +0200 <edwardk> just a building block i often offer
2022-06-10 22:51:29 +0200cyphase(~cyphase@user/cyphase)
2022-06-10 22:51:39 +0200 <NemesisD> ah ok
2022-06-10 22:51:47 +0200 <edwardk> another option rather than the functorless version would be to do it with patterns
2022-06-10 22:53:24 +0200 <edwardk> pattern F4I :: a -> b -> c -> d -> F4 a b c d Identity; pattern F4I a b c d = F4 (Identity a) (Identity b) (Identity c) (Identity d); {-# complete F4I :: F4 #-}
2022-06-10 22:53:43 +0200 <edwardk> now i keep the structure which is actually needed for me to be able to use generics the way i do
2022-06-10 22:53:55 +0200 <edwardk> but you could have the nicer accessor for the identity case
2022-06-10 22:54:50 +0200zincy(~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0)
2022-06-10 22:55:12 +0200 <NemesisD> thanks! i'll give that a try when i get a chance
2022-06-10 22:55:58 +0200mimmy(~mimmy@S0106f81d0f5b3c63.vs.shawcable.net)
2022-06-10 22:59:37 +0200zincy(~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) (Ping timeout: 260 seconds)
2022-06-10 22:59:57 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-06-10 23:00:12 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds)
2022-06-10 23:02:04 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
2022-06-10 23:03:43 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2022-06-10 23:05:11 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-06-10 23:05:19 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-06-10 23:06:46 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2022-06-10 23:07:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 23:10:57 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2022-06-10 23:18:03 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 23:18:16 +0200zincy(~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0)
2022-06-10 23:20:43 +0200pmk(~user@2a02:587:9418:69b8:b896:d770:251d:c4d7) (Remote host closed the connection)
2022-06-10 23:23:12 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-10 23:23:20 +0200zincy(~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) (Ping timeout: 272 seconds)
2022-06-10 23:24:30 +0200trisolaran(~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2022-06-10 23:26:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-10 23:26:30 +0200Topsi(~Topsi@dyndsl-095-033-088-183.ewe-ip-backbone.de) (Quit: Leaving.)
2022-06-10 23:27:10 +0200ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
2022-06-10 23:27:23 +0200Topsi(~Topsi@dyndsl-095-033-088-183.ewe-ip-backbone.de)
2022-06-10 23:27:27 +0200ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
2022-06-10 23:30:20 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 255 seconds)
2022-06-10 23:32:13 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-06-10 23:33:35 +0200cosimone`(~user@93-44-186-171.ip98.fastwebnet.it) (Read error: Connection reset by peer)
2022-06-10 23:34:10 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 240 seconds)
2022-06-10 23:36:14 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2022-06-10 23:39:06 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 258 seconds)
2022-06-10 23:40:38 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-06-10 23:41:19 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
2022-06-10 23:42:43 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2022-06-10 23:43:30 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-06-10 23:45:36 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-06-10 23:46:06 +0200Kaiepi(~Kaiepi@156.34.47.253)
2022-06-10 23:49:02 +0200Kaipei(~Kaiepi@156.34.47.253)
2022-06-10 23:49:14 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 255 seconds)
2022-06-10 23:51:20 +0200Kaiepi(~Kaiepi@156.34.47.253) (Ping timeout: 248 seconds)
2022-06-10 23:51:24 +0200zincy(~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0)
2022-06-10 23:54:06 +0200alp(~alp@user/alp) (Remote host closed the connection)
2022-06-10 23:54:30 +0200alp(~alp@user/alp)
2022-06-10 23:54:48 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-06-10 23:57:25 +0200jakalx(~jakalx@base.jakalx.net) ()
2022-06-10 23:58:56 +0200julian(~julian@20.83.116.49) (Killed (NickServ (GHOST command used by tos9_!~tos9@python/site-packages/Julian)))
2022-06-10 23:59:12 +0200mimmy_(~mimmy@185.153.179.38)