Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-21 01:54:11 <ski> (longer ago, actually)
2021-03-21 01:55:10 <monochrom> And in the early days of switching over to a monad model, people still imagine the monad to be a "state of the world" monad. A state model would be equivalent to a stream model by a final algebra.
2021-03-21 01:55:51 <monochrom> Both have been long abandoned because in the face of concurrent programming, and one day even distributed computing, they are completely broken.
2021-03-21 01:56:16 <dolio> Is that actually true? hbc didn't use the fake state implementation.
2021-03-21 01:56:17 <sim590> Everytime I come back to my haskell code base after a while, I find myself with these dependencies that can't be resolved for base which advanced on my system and I get errors like: "Could not find module ‘Prelude’
2021-03-21 01:56:18 <sim590> There are files missing in the ‘base-4.14.1.0’ package"
2021-03-21 01:56:51 <monochrom> I was referring to what people told each other, not what compilers did.
2021-03-21 01:56:54 <sim590> My project was configured for base >=4.12 && <4.13
2021-03-21 01:57:04 <sim590> And now I can't compile on 4.14...
2021-03-21 01:57:05 <dolio> And prior to monads, there was the list thing, and continuation wrappers, which are pretty close to monads.
2021-03-21 01:57:35 <dolio> I'm asking if they actually told each other that, since it was completely different than what they had all been doing up to that point.
2021-03-21 01:58:14 <dolio> They already had ready made explanations that weren't the 'state of the world' thing that doesn't really make sense.
2021-03-21 01:58:29 <monochrom> "Tackling The Awkward Squad" began with the world-state monad story.
2021-03-21 01:58:33 <MarcelineVQ> sim590: archlinux?
2021-03-21 01:58:36 <__minoru__shirae> how does concurrency break the "state of the world" or a "stream" model?
2021-03-21 01:58:37 <sim590> MarcelineVQ: Yeah
2021-03-21 01:59:12 <MarcelineVQ> that error typically comes from having pacman installed haskell libs since they have dynamicly linked libs and static is typically expected for haskell projects, easiest to rid yourself of them and install things via ghcup or stack
2021-03-21 02:00:01 <sim590> My project uses cabal. Shouldn't simply cabal new-build get the dependencies?
2021-03-21 02:00:03 <MarcelineVQ> could try installing ghc-static first but I'd still reccomend ghcup
2021-03-21 02:00:51 <__minoru__shirae> because from the inside of a thread you can talk about state of the world, or a stream, no?
2021-03-21 02:01:09 <sim590> So it's because I did install the "ghc" package?
2021-03-21 02:01:37 <MarcelineVQ> It might not be up to cabal at that point. and probably yes
2021-03-21 02:02:03 <monochrom> And https://wiki.haskell.org/IO_inside#Running_with_the_RealWorld still hasn't been deleted.
2021-03-21 02:02:12 <hololeap> __minoru__shirae: i would assume that it breaks when two or more entities try to update the "state of the world" where there is a conflict and one state has to be chosen, or the two are merged monoidally
2021-03-21 02:02:54 <sim590> MarcelineVQ: is cabal-install also a problem? It does depend on ghc-libs
2021-03-21 02:03:10 <MarcelineVQ> possibly, ghcup can install that for you too though
2021-03-21 02:03:11 <__minoru__shirae> hololeap: one could interpret it as world rejecting their update
2021-03-21 02:03:16 <dolio> Takling the Awkward Squad was 5 years after monads in Haskell, apparently.
2021-03-21 02:03:19 <MarcelineVQ> many worlds theory doesn't extend to PL? truly the ivory tower is too tall
2021-03-21 02:03:42 <sim590> MarcelineVQ: OK. Would it be bad to install ghcup through pacman? Or is it even not possible?
2021-03-21 02:04:02 <__minoru__shirae> or their update "failiing" or something like that. you already have a notion of failure in state-of-the-world or stream model
2021-03-21 02:04:12 <MarcelineVQ> sim590: that's fine, but it's on the AUR
2021-03-21 02:04:26 <sim590> MarcelineVQ: ghcup-hs-bin ?
2021-03-21 02:04:49 <MarcelineVQ> sim590: should be
2021-03-21 02:04:54 conal joins (~conal@64.71.133.70)
2021-03-21 02:05:07 <sim590> Alright. I'll remove everything and try to use ghcup.
2021-03-21 02:05:15 <hololeap> __minoru__shirae: ok, but the problem arises when you have to choose which update succeeds and which updates fail. what is the most fair way of dealing with this?
2021-03-21 02:05:20 Tario joins (~Tario@201.192.165.173)
2021-03-21 02:05:50 <MarcelineVQ> hololeap: raft concensus :>
2021-03-21 02:05:57 botro joins (~botro@178.239.168.171)
2021-03-21 02:07:20 <__minoru__shirae> hololeap: all I'm saying is I don't see how concurrency breaks those models, because in those models you can interpret concurrency stuff with no problem, seems to me.
2021-03-21 02:07:28 ski . o O ( concurrent races, timers )
2021-03-21 02:08:19 <dolio> You don't need concurrency for the state of the world to make no sense.
2021-03-21 02:08:40 <dolio> It can't really make sense of `forever (putStrLn "Hi.")`
2021-03-21 02:09:44 <dolio> There is no reason for that to be semantically different than `forever (pure ())`, unless functions have side effects.
2021-03-21 02:09:52 <__minoru__shirae> async exceptions are problematic though
2021-03-21 02:10:34 <monochrom> Right, we don't need forkIO concurrency to break it. But allow me to be revisionist >:) and refer to meta-level concurrency, i.e., if the sequential computer is interacting with me, you have two threads right there: the computer, and me.
2021-03-21 02:12:38 myShoggoth joins (~myShoggot@75.164.81.55)
2021-03-21 02:12:47 <__minoru__shirae> what if one says "let GHC implementers worry about that"
2021-03-21 02:13:11 <hololeap> __minoru__shirae: it certainly seems like a fixable problem. i'm not an expert on any of this stuff.
2021-03-21 02:13:36 ski . o O ( if an unknown thread running in a process dies, does it makes a difference ? )
2021-03-21 02:14:23 <monochrom> Again, I am talking about models, not compilers.
2021-03-21 02:14:27 <__minoru__shirae> and one could say "you see, people who implemented GHC solved those problems for us, they had different model in mind while implementing it."
2021-03-21 02:15:02 <__minoru__shirae> "and thanks to them now we can reason about our programs using a state of the world model or a stream model"
2021-03-21 02:15:27 <monochrom> Models are what we tell each other for the purpose of predicting that our programs do what we want and explaining programs.
2021-03-21 02:17:40 <__minoru__shirae> there is a word "abstraction leak"
2021-03-21 02:18:44 <hololeap> pinning things down for any given problem, so that there is a specific model for composoition, seems like a good step in the direction of "best model"
2021-03-21 02:19:32 <__minoru__shirae> people create high level abstractions, and create low-level implementations of those abstractions
2021-03-21 02:19:39 <hololeap> but i agree that there are different, valid, and competing models for most problems
2021-03-21 02:20:29 <__minoru__shirae> and if you expose too much of your low-level abstractions, it means that you created an abstraction leak
2021-03-21 02:21:11 <hololeap> or it means that your abstraction isn't 100% waterproof to corner cases
2021-03-21 02:22:32 <hololeap> abstractions that have no corner cases are considered "beautiful" for a reason
2021-03-21 02:25:33 <__minoru__shirae> you can say that a model became obsolete or outdated when you have a better fitting model
2021-03-21 02:26:04 Wuzzy joins (~Wuzzy@p57a2ecf2.dip0.t-ipconnect.de)
2021-03-21 02:26:31 average joins (uid473595@gateway/web/irccloud.com/x-mlbuggytwdwptlyu)
2021-03-21 02:26:47 <__minoru__shirae> is there a model that works better than "state of the world" and "stream" models?
2021-03-21 02:27:17 × xff0x_ quits (~xff0x@2001:1a81:527b:4200:5766:67eb:a550:2a8c) (Ping timeout: 244 seconds)
2021-03-21 02:28:09 × conal quits (~conal@64.71.133.70) (Ping timeout: 246 seconds)
2021-03-21 02:28:15 <hololeap> as far as "things that are outside the state of the program and we can't predict", that seems like the best model to me. but you also have to take on the responsibility of understanding and managing that state within the context of your program
2021-03-21 02:28:32 <__minoru__shirae> a model of many threads interacting with each other?
2021-03-21 02:29:07 <dolio> There was a better model before the state of the world model.
2021-03-21 02:29:29 xff0x_ joins (~xff0x@2001:1a81:52b5:3300:bd27:5212:7f1:6207)
2021-03-21 02:29:34 <hololeap> if all those threads are within the scope of your program, you can't expect anything outside of your program to handle it for you
2021-03-21 02:29:41 conal joins (~conal@209.58.130.230)
2021-03-21 02:30:41 <__minoru__shirae> when you write a multi-threaded program, you change perspective many times
2021-03-21 02:30:58 <__minoru__shirae> you write code from the perspective of this thread
2021-03-21 02:31:20 <__minoru__shirae> and then from the perspective of that thread
2021-03-21 02:32:36 <__minoru__shirae> looks like you have a meta-model that allows you to choose a model when writing code
2021-03-21 02:33:10 × chewb quits (~chewb@abii185.neoplus.adsl.tpnet.pl) (Read error: Connection reset by peer)
2021-03-21 02:33:36 <__minoru__shirae> dolio: what was that? a stream model?
2021-03-21 02:34:30 <dolio> I'm not exactly sure what the stream model is. But you can explain IO as a sort of dialogue with an opaque runtime system via continuations.
2021-03-21 02:34:41 <hololeap> right, the essense of abstraction is separating the scope of one thing from another thing, but they also need to compose. when you hit the barrier of IO, it presents some difficult choices, because that is the limit of your scope. maybe there is a model of IO that reduces the number of choices thus simplifying the problem.
2021-03-21 02:34:52 <dolio> Which I believe is how hbc actually implemented things.
2021-03-21 02:35:56 × LogicUpgrade quits (57e3c46d@87.227.196.109) (Quit: Connection closed)
2021-03-21 02:36:23 <dolio> That probably extends naturally to concurrency, too, because the way that is often modeled is just that multiple continuations are being processed simultaneously.
2021-03-21 02:36:25 <ski> preflex: xseen augustss
2021-03-21 02:37:01 <dolio> The sort of preemptive stuff that GHC does might be hard to explain, though.
2021-03-21 02:37:58 chenshen joins (~chenshen@2620:10d:c090:400::5:2b70)
2021-03-21 02:39:02 ski . o O ( <https://existentialtype.wordpress.com/2016/07/11/pclsring-in-semantics/>,<http://fare.tunes.org/tmp/emergent/pclsr.htm> )
2021-03-21 02:42:41 liyang joins (~liyang@90.253.54.54)
2021-03-21 02:44:31 <koz_> What's the argument to give to GHC if you want it to dump the results after all TH stuff has finished?
2021-03-21 02:45:44 <glguy> -ddump-splices
2021-03-21 02:49:01 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-21 02:49:17 × Sheilong quits (uid293653@gateway/web/irccloud.com/x-vnorxjroamajdrqk) ()
2021-03-21 02:53:27 × chenshen quits (~chenshen@2620:10d:c090:400::5:2b70) (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
2021-03-21 02:56:04 chenshen joins (~chenshen@2620:10d:c090:400::5:2b70)
2021-03-21 03:01:56 <sim590> MarcelineVQ: can ghcup install ghc-pkg? HIE needs ghc-pkg, but I don't have it after installing cabal and ghc through ghcup.
2021-03-21 03:02:20 <glguy> ghc-pkg comes with installing GHC
2021-03-21 03:02:48 <sim590> Ah sry. I forgot that I had to symlink ghc-pkg-8.6 to ghc
2021-03-21 03:02:51 <sim590> I mean

All times are in UTC.