2024/10/03

2024-10-03 00:01:09 +0200 <haskellbridge> <sm> "hell" on HN: https://news.ycombinator.com/item?id=41694767
2024-10-03 00:01:34 +0200 <probie> % let{f x=print x>>pure x;tleft=fmap($ []).foldr(\x k -> liftA2(flip(.))k(fmap(:)x))(pure$id)}in tleft $ map f [1..5] -- Probably worse than two reverses because it spills the list to the stack
2024-10-03 00:01:34 +0200 <yahb2> 5 ; 4 ; 3 ; 2 ; 1 ; [1,2,3,4,5]
2024-10-03 00:02:00 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-10-03 00:05:57 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2024-10-03 00:12:48 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 00:17:16 +0200codaraxis___(~codaraxis@user/codaraxis) (Ping timeout: 244 seconds)
2024-10-03 00:17:24 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-10-03 00:18:49 +0200weary-traveler(~user@user/user363627) (Remote host closed the connection)
2024-10-03 00:23:16 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
2024-10-03 00:24:27 +0200codaraxis(~codaraxis@user/codaraxis) Codaraxis
2024-10-03 00:28:20 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 00:33:04 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
2024-10-03 00:33:44 +0200Sgeo(~Sgeo@user/sgeo) Sgeo
2024-10-03 00:34:33 +0200JuanDaugherty(~juan@user/JuanDaugherty) JuanDaugherty
2024-10-03 00:37:12 +0200ljdarj(~Thunderbi@user/ljdarj) (Ping timeout: 276 seconds)
2024-10-03 00:39:31 +0200athan(~athan@syn-098-153-145-140.biz.spectrum.com) (Quit: Konversation terminated!)
2024-10-03 00:42:03 +0200notzmv(~daniel@user/notzmv) (Read error: Connection reset by peer)
2024-10-03 00:43:56 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 00:45:31 +0200neuroevolutus(~neuroevol@37.19.200.152) (Ping timeout: 256 seconds)
2024-10-03 00:48:47 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
2024-10-03 00:50:00 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-10-03 00:55:08 +0200troojg(~troojg@user/troojg) troojg
2024-10-03 00:57:53 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 01:00:45 +0200ash3en(~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) ash3en
2024-10-03 01:00:50 +0200ash3en(~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) (Client Quit)
2024-10-03 01:02:42 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
2024-10-03 01:12:43 +0200 <c_wraith> does STM document its consistency properties anywhere? istr it's the equivalent of read-committed, rather than fully linearizable?
2024-10-03 01:13:15 +0200supercode(~supercode@user/supercode) supercode
2024-10-03 01:13:19 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 01:18:45 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
2024-10-03 01:20:05 +0200 <mauke> what's the difference?
2024-10-03 01:23:36 +0200 <geekosaur> I think it might be only by reference (there's a paper from Intel Research describing it)
2024-10-03 01:24:38 +0200Katarushisu(~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net) (Quit: Ping timeout (120 seconds))
2024-10-03 01:24:56 +0200Katarushisu(~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net) Katarushisu
2024-10-03 01:29:39 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 01:30:07 +0200sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 244 seconds)
2024-10-03 01:30:56 +0200 <c_wraith> mauke: with read-committed you can read a set of values that never would have existed together if all transactions were serialized.
2024-10-03 01:32:30 +0200 <geekosaur> I don't think you can get into that situation with STM; the only such sets wouldn't be observable, because anything that could observe them would be forced to `retry` and end up with a consistent set?
2024-10-03 01:32:34 +0200xff0x(~xff0x@2405:6580:b080:900:409b:fd54:4c14:6dc) (Ping timeout: 260 seconds)
2024-10-03 01:33:15 +0200 <c_wraith> hmm. possibly so. I tried a few traces that typically show that, and they did all retry with STM semantics.
2024-10-03 01:33:18 +0200 <geekosaur> something observing program state from outside could potentially see such states
2024-10-03 01:33:47 +0200 <c_wraith> well, something observing from the outside can see all kinds of stuff with STM
2024-10-03 01:33:52 +0200 <geekosaur> yep
2024-10-03 01:34:11 +0200 <geekosaur> this should all be covered in the Intel paper
2024-10-03 01:34:19 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
2024-10-03 01:40:21 +0200neuroevolutus(~neuroevol@37.19.200.152) neuroevolutus
2024-10-03 01:45:04 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 01:45:13 +0200xff0x(~xff0x@2405:6580:b080:900:409b:fd54:4c14:6dc)
2024-10-03 01:46:43 +0200neuroevolutus(~neuroevol@37.19.200.152) (Ping timeout: 256 seconds)
2024-10-03 01:49:32 +0200Smiles(uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2024-10-03 01:49:41 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
2024-10-03 01:55:28 +0200 <Lears> c_wraith: <https://www.microsoft.com/en-us/research/wp-content/uploads/2005/01/2005-ppopp-composable.pdf> (linked indirectly from Control.Concurrent.STM) is /the/ STM paper if GHC's particular form/extension of STM is what you're interested in. I imagine it has the answer you're looking for, though I'd be very surprised if such states were observable.
2024-10-03 01:55:48 +0200 <dolio> c_wraith: Yeah, that's true.
2024-10-03 01:56:06 +0200 <c_wraith> ugh, why did my irc client think the > is part of the link? bad client!
2024-10-03 01:56:26 +0200 <dolio> This is discussed in Revisting Software Transactional Memory in Haskell.
2024-10-03 01:56:31 +0200alexherbo2(~alexherbo@2a02-8440-3118-adab-ad64-111d-10db-8d9d.rev.sfr.net) (Remote host closed the connection)
2024-10-03 01:57:42 +0200alexherbo2(~alexherbo@2a02-8440-3118-adab-f186-fae0-9a30-1276.rev.sfr.net) alexherbo2
2024-10-03 02:00:09 +0200 <dolio> Oh, I guess unless the implementation in that paper has since replaced the original implementation in GHC, because the one in that paper does ensure every transaction sees a consistent memory state (I think).
2024-10-03 02:00:29 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 02:01:14 +0200alexherbo2(~alexherbo@2a02-8440-3118-adab-f186-fae0-9a30-1276.rev.sfr.net) (Remote host closed the connection)
2024-10-03 02:01:46 +0200 <dolio> They call the property that ensures that, 'opacity.'
2024-10-03 02:03:57 +0200 <c_wraith> I'm just getting there in the paper...
2024-10-03 02:04:50 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-10-03 02:04:55 +0200 <c_wraith> it would be nice to know if GHC switched inplemrntations
2024-10-03 02:05:04 +0200 <dolio> Yeah. That I don't know.
2024-10-03 02:08:51 +0200troojg(~troojg@user/troojg) (Ping timeout: 276 seconds)
2024-10-03 02:12:23 +0200supercode(~supercode@user/supercode) (Quit: Client closed)
2024-10-03 02:15:55 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 02:22:16 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds)
2024-10-03 02:27:52 +0200JuanDaugherty(~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
2024-10-03 02:32:32 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 02:37:06 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-10-03 02:43:00 +0200nkatte(~nkatte@191.177.174.42) (Quit: nkatte)
2024-10-03 02:44:11 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2024-10-03 02:45:41 +0200xff0x(~xff0x@2405:6580:b080:900:409b:fd54:4c14:6dc) (Ping timeout: 248 seconds)
2024-10-03 02:48:05 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 02:50:03 +0200acidjnk(~acidjnk@p200300d6e72cfb85cd0cf194bbc9b0a3.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2024-10-03 02:55:04 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-10-03 02:55:12 +0200econo_(uid147250@id-147250.tinside.irccloud.com)
2024-10-03 03:01:32 +0200paddymahoney(~paddymaho@pool-99-250-10-137.cpe.net.cable.rogers.com) (Ping timeout: 272 seconds)
2024-10-03 03:06:11 +0200emmanuelux(~emmanuelu@user/emmanuelux) (Quit: au revoir)
2024-10-03 03:06:17 +0200paddymahoney(~paddymaho@pool-99-250-10-137.cpe.net.cable.rogers.com)
2024-10-03 03:06:18 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 03:11:16 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
2024-10-03 03:12:07 +0200weary-traveler(~user@user/user363627) user363627
2024-10-03 03:21:45 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 03:27:42 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-10-03 03:33:06 +0200tomboy64(~tomboy64@user/tomboy64) (Ping timeout: 246 seconds)
2024-10-03 03:38:27 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 03:42:13 +0200xff0x(~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp)
2024-10-03 03:42:24 +0200shailangsa(~shailangs@host86-182-139-82.range86-182.btcentralplus.com) shailangsa
2024-10-03 03:43:05 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-10-03 03:47:05 +0200tomboy64(~tomboy64@user/tomboy64) tomboy64
2024-10-03 03:50:10 +0200athan(~athan@syn-098-153-145-140.biz.spectrum.com) athan
2024-10-03 03:54:11 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 03:58:59 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
2024-10-03 04:09:42 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 04:14:35 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
2024-10-03 04:19:25 +0200td_(~td@i5387093C.versanet.de) (Ping timeout: 265 seconds)
2024-10-03 04:20:56 +0200td_(~td@i5387091A.versanet.de) td_
2024-10-03 04:25:24 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 04:26:46 +0200codaraxis__(~codaraxis@user/codaraxis) Codaraxis
2024-10-03 04:29:40 +0200Digitteknohippie(~user@user/digit) Digit
2024-10-03 04:29:54 +0200codaraxis(~codaraxis@user/codaraxis) (Ping timeout: 260 seconds)
2024-10-03 04:29:54 +0200Digit(~user@user/digit) (Ping timeout: 260 seconds)
2024-10-03 04:29:54 +0200lambdabot(~lambdabot@haskell/bot/lambdabot) (Ping timeout: 260 seconds)
2024-10-03 04:30:02 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-10-03 04:31:17 +0200lambdabot(~lambdabot@haskell/bot/lambdabot) lambdabot
2024-10-03 04:31:17 +0200ChanServ+v lambdabot
2024-10-03 04:34:48 +0200identity(~identity@user/ZharMeny) (Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4))
2024-10-03 04:36:07 +0200DigitteknohippieDigit
2024-10-03 04:40:50 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 04:43:35 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 265 seconds)
2024-10-03 04:45:39 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
2024-10-03 04:49:26 +0200Smiles(uid551636@id-551636.lymington.irccloud.com) Smiles
2024-10-03 04:51:07 +0200neuroevolutus(~neuroevol@37.19.200.152) neuroevolutus
2024-10-03 04:51:29 +0200komikat(~user@218.185.248.66) (Ping timeout: 260 seconds)
2024-10-03 04:56:26 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 04:56:33 +0200neuroevolutus(~neuroevol@37.19.200.152) (Ping timeout: 256 seconds)
2024-10-03 04:56:46 +0200neuroevolutus(~neuroevol@146.70.211.46) neuroevolutus
2024-10-03 05:01:34 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-10-03 05:06:13 +0200zmt01(~zmt00@user/zmt00) zmt00
2024-10-03 05:10:13 +0200zmt00(~zmt00@user/zmt00) (Ping timeout: 248 seconds)
2024-10-03 05:12:46 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 05:17:44 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
2024-10-03 05:19:32 +0200aforemny_(~aforemny@i59F4C77A.versanet.de) aforemny
2024-10-03 05:20:48 +0200aforemny(~aforemny@2001:9e8:6cd7:c200:342e:20f9:8752:4727) (Ping timeout: 265 seconds)
2024-10-03 05:26:03 +0200weary-traveler(~user@user/user363627) (Remote host closed the connection)
2024-10-03 05:28:11 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 05:32:44 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-10-03 05:41:39 +0200billchenchina-(~billchenc@2a0d:2580:ff0c:1:e3c9:c52b:a429:5bfe) billchenchina
2024-10-03 05:43:18 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds)
2024-10-03 05:43:44 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 05:44:18 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2024-10-03 05:45:47 +0200 <haskellbridge> <thirdofmay18081814goya> can all problems regarding whether or not a computable function terminates be reduced to a logic program?
2024-10-03 05:47:00 +0200 <EvanR> is it even a computable function if it doesn't terminate
2024-10-03 05:47:09 +0200 <EvanR> for some inputs
2024-10-03 05:47:39 +0200 <EvanR> if not, that makes some undecidable problems computable
2024-10-03 05:48:27 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
2024-10-03 05:49:49 +0200 <haskellbridge> <thirdofmay18081814goya> EvanR: yeah I think termination and computability are distinct things
2024-10-03 05:50:00 +0200 <EvanR> :thonk:
2024-10-03 05:50:13 +0200 <EvanR> not saying they are the same
2024-10-03 05:51:54 +0200pavonia(~user@user/siracusa) siracusa
2024-10-03 05:51:59 +0200 <haskellbridge> <thirdofmay18081814goya> i mean i think they are independent from one another, and termination or non-termination is a property of computable functions
2024-10-03 05:52:56 +0200 <EvanR> a mathematical function from integers to integers is computable if there's an algorithm which can implement this function, so non-termination wouldn't come up here because of the codomain in the premise
2024-10-03 05:53:16 +0200 <EvanR> these functions wouldn't be missing any answers, and so an non-termination would be a failure to implement
2024-10-03 05:53:42 +0200 <EvanR> any* non-termination
2024-10-03 05:54:21 +0200 <Lears> thirdofmay: Computable functions are mathematical functions; they have no inherent notion of implementation or termination; they're defined at every argument.
2024-10-03 05:54:34 +0200 <Lears> You probably want the "general recursive functions".
2024-10-03 05:55:50 +0200 <Lears> "reduced to a logic program" is also unclear.
2024-10-03 05:55:54 +0200 <EvanR> you could posit a mathematical function into a space that includes an additional bottom value
2024-10-03 05:56:07 +0200 <EvanR> but I figured that'd be weird
2024-10-03 05:56:48 +0200 <EvanR> and use a convention that "computing the bottom" means the algorithm provably freezes up xD
2024-10-03 05:57:12 +0200 <EvanR> haskell maths
2024-10-03 05:58:30 +0200 <haskellbridge> <thirdofmay18081814goya> ty for ref
2024-10-03 05:58:50 +0200mud(~mud@user/kadoban) (Quit: quit)
2024-10-03 05:59:09 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 06:00:48 +0200cyphase(~cyphase@user/cyphase) (Ping timeout: 246 seconds)
2024-10-03 06:01:10 +0200cyphase(~cyphase@user/cyphase) cyphase
2024-10-03 06:02:30 +0200mud(~mud@user/kadoban) kadoban
2024-10-03 06:03:33 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
2024-10-03 06:06:56 +0200mud(~mud@user/kadoban) (Client Quit)
2024-10-03 06:08:21 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2024-10-03 06:10:07 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 06:10:25 +0200mud(~mud@user/kadoban) kadoban
2024-10-03 06:12:45 +0200Tisoxin(~Ikosit@user/ikosit) Ikosit
2024-10-03 06:14:48 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
2024-10-03 06:15:59 +0200amano(amano@gateway/vpn/airvpn/amano) amano
2024-10-03 06:16:36 +0200 <amano> Let's assume StateT (DataType a) m a. Can StateT replace DataType a with DataType b?
2024-10-03 06:17:10 +0200 <amano> I mean StateT (DataType a) m ()
2024-10-03 06:20:37 +0200 <Lears> :t StateT
2024-10-03 06:20:38 +0200 <lambdabot> (s -> m (a, s)) -> StateT s m a
2024-10-03 06:20:41 +0200 <c_wraith> nothing in mtl/transformers provides that. mmorph doesn't seem to provide that. lens *does*, as part of the Zoom interface.
2024-10-03 06:21:20 +0200 <c_wraith> the trick, and why it appears in lens, is that the transformation needs to be bidirectional
2024-10-03 06:21:51 +0200 <amano> Then, I have to use existential typeclass in a data type?
2024-10-03 06:22:19 +0200 <c_wraith> uh, not sure what you mean by that.
2024-10-03 06:22:32 +0200 <Lears> StateT uses the same type for the input state as the output state; so not unless you change both. If you lift this restriction with your own StateT', then you cannot make it a Monad, though you can make it an indexed monad.
2024-10-03 06:23:01 +0200 <Lears> If the type parameter to `DataType` is recoverable, then yes, it's simplest just to hide it with `Some DataType`.
2024-10-03 06:23:23 +0200 <c_wraith> I just mean that in (s -> m (a, s)), s appears in both positive and negative position. This means it's not covariant or contravariant - you can't map it simply.
2024-10-03 06:23:42 +0200 <c_wraith> Lens is all about bidirectional mapping, so it handles that case relatively easily.
2024-10-03 06:25:54 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) merijn
2024-10-03 06:26:29 +0200 <amano> I mean data SomeType = forall a. TypeClass a => SomeType a
2024-10-03 06:26:33 +0200 <amano> This is existential typeclass
2024-10-03 06:27:11 +0200 <c_wraith> and it's kinda useless.
2024-10-03 06:27:16 +0200 <amano> Why?
2024-10-03 06:27:41 +0200 <amano> This is the only way I know to use multiple typeclass instances in StateT.
2024-10-03 06:27:44 +0200 <c_wraith> it's no different from just passing around a function, or a record of them.
2024-10-03 06:28:03 +0200 <amano> I know it can be represented as a record of functions....