Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-18 16:14:02 <fgaz> multiple libraries? it pretty much works for source packages
2020-11-18 16:14:18 × dftxbs3e quits (~dftxbs3e@unaffiliated/dftxbs3e) (Remote host closed the connection)
2020-11-18 16:14:58 × kritzefitz_ quits (~kritzefit@fw-front.credativ.com) (Remote host closed the connection)
2020-11-18 16:14:59 <merijn> fgaz: It was about the "extraneous constraint" warning when your executable depends on a library in the same package
2020-11-18 16:15:24 <hekkaidekapus> <https://github.com/haskell/cabal/issues/5119> and <https://github.com/haskell/cabal/issues/5660>
2020-11-18 16:16:07 ClaudiusMaximus joins (~claude@198.123.199.146.dyn.plus.net)
2020-11-18 16:16:07 × ClaudiusMaximus quits (~claude@198.123.199.146.dyn.plus.net) (Changing host)
2020-11-18 16:16:07 ClaudiusMaximus joins (~claude@unaffiliated/claudiusmaximus)
2020-11-18 16:16:24 <fgaz> hekkaidekapus: afaik those two tickets have nothing to do with each other
2020-11-18 16:17:01 dftxbs3e joins (~dftxbs3e@unaffiliated/dftxbs3e)
2020-11-18 16:17:26 <hekkaidekapus> If an executable depends on a sublib and the warning is emitted, does that not relate to 5660?
2020-11-18 16:17:59 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-11-18 16:18:12 <fgaz> this also happens with the main library I think
2020-11-18 16:18:32 <fgaz> also 5660 refers to public sublibs
2020-11-18 16:18:46 <fgaz> that warning gets triggered on any sublib
2020-11-18 16:18:59 <the-smug-one> Hi, I solved a small toy problem for fun in Haskell and uploaded it to my website. It's very "explicit" (passing around state of visited vertices, etc.) and I want to know if there's obvious ways to make it more idiomatic. The link is here: https://jsjolen.github.io/#/structuraltyping the function is isSubtypeOf I'd really appreciate any eyes on it :-).
2020-11-18 16:19:00 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
2020-11-18 16:19:18 <hekkaidekapus> fgaz: Right. So, the discussion above was merely about 5119.
2020-11-18 16:19:30 <fgaz> According to one of the first comments in #5119, the cause was https://github.com/haskell/cabal/pull/4383
2020-11-18 16:20:46 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-11-18 16:20:58 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 260 seconds)
2020-11-18 16:22:45 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 240 seconds)
2020-11-18 16:24:47 <fgaz> merijn hekkaidekapus: I just read your messages more thoroughly, and yes, I see what you mean, sorry, it was indeed in preparation to public sublibraries
2020-11-18 16:25:24 <hekkaidekapus> No problem.
2020-11-18 16:25:27 invaser joins (~Thunderbi@31.148.23.125)
2020-11-18 16:26:51 <hekkaidekapus> fgaz: I pinged you since you seem to have taken over A. Williams’s work on public sublibs (beside Oleg, of course).
2020-11-18 16:27:04 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-11-18 16:27:49 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-11-18 16:29:32 × mastarija quits (~mastarija@93-136-96-155.adsl.net.t-com.hr) (Quit: Leaving)
2020-11-18 16:29:50 × pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!)
2020-11-18 16:31:20 mirrorb2rd joins (~psutcliff@89.40.182.152)
2020-11-18 16:31:24 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
2020-11-18 16:31:33 × ph88 quits (~ph88@ip5f5af6cd.dynamic.kabel-deutschland.de) (Ping timeout: 256 seconds)
2020-11-18 16:32:00 kritzefitz joins (~kritzefit@212.86.56.80)
2020-11-18 16:32:08 p0a joins (~user@unaffiliated/p0a)
2020-11-18 16:32:20 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Remote host closed the connection)
2020-11-18 16:32:25 <p0a> Hello in f >>= g, is it guaranteed that all of the side effects of f will take effect before g's?
2020-11-18 16:32:55 FreeBirdLjj joins (~freebirdl@101.228.42.108)
2020-11-18 16:33:41 <p0a> I'm looking at mapM magic (take 10 [1..]) >>= mapM_ print . takeWhile (< 18) where magic x = print x; return x*2, for example
2020-11-18 16:33:50 <tdammers> p0a: there are no side effects
2020-11-18 16:33:56 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2020-11-18 16:33:56 ph88 joins (~ph88@ip5f5af6cd.dynamic.kabel-deutschland.de)
2020-11-18 16:34:00 st8less joins (~st8less@2603:a060:11fd:0:d56c:a5ec:de50:ff91)
2020-11-18 16:34:05 × mirrorbird_ quits (~psutcliff@89.40.182.215) (Ping timeout: 240 seconds)
2020-11-18 16:34:36 <int-e> ordering of effects (if any) depends on the monad
2020-11-18 16:34:55 <int-e> In IO, effects of f will happen before effects of g, with the exception of lazy IO.
2020-11-18 16:35:09 <tdammers> there is some kind of implied ordering to >>=, but it's a bit more subtle than "happens before/after"
2020-11-18 16:35:26 <int-e> so your code will print 1..10, then 2,4..16.
2020-11-18 16:35:31 <p0a> Why is my example not lazy?
2020-11-18 16:36:05 <tdammers> it could be lazy, depending on how `magic` is implemented
2020-11-18 16:36:30 <p0a> Why is this magic not lazy then?
2020-11-18 16:36:42 <tdammers> why do you think it's not?
2020-11-18 16:36:56 <int-e> It is lazy. It returns an IO value. It has no effect by itself.
2020-11-18 16:37:29 <tdammers> it could return an IO value that specifies a lazy-IO operation though
2020-11-18 16:37:32 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Ping timeout: 265 seconds)
2020-11-18 16:37:34 <int-e> The effects happen when an IO value is run... either from the main function or from another Haskell thread. And that execution sequentializes IO effects.
2020-11-18 16:37:38 <tdammers> (lazy IO /= lazy evaluation!)
2020-11-18 16:38:19 <Ariakenom> lazy IO isnt different from threads in that sense
2020-11-18 16:38:23 <int-e> lazy IO is based on a dirty hack that suspends an IO action to be run when its result is needed
2020-11-18 16:38:46 <int-e> :t System.IO.Unsafe.unsafeInterleaveIO
2020-11-18 16:38:47 <lambdabot> IO a -> IO a
2020-11-18 16:39:02 <Ariakenom> so its not important to bring up as an exception
2020-11-18 16:39:03 × nuncanada quits (~dude@179.235.160.168) (Ping timeout: 260 seconds)
2020-11-18 16:39:07 <p0a> AH, I thought Lazy IO dependent on lazy evaluation or something like that
2020-11-18 16:39:10 <tdammers> my point is that "lazy IO" and an expression being lazy are two different and somewhat unrelated things
2020-11-18 16:39:23 <p0a> depended*
2020-11-18 16:39:43 <p0a> it's a good point tdammers, I didn't know that
2020-11-18 16:39:53 <int-e> p0a: Oh, it does. Lazy evaluation provides a mechanism to detect when a value is needed.
2020-11-18 16:40:09 <tdammers> ^ yeah, this is how they are related, hence "somewhat" unrelated
2020-11-18 16:40:23 <p0a> int-e: so the hack is the suspension?
2020-11-18 16:40:29 <int-e> yes
2020-11-18 16:40:51 <tdammers> without lazy evaluation, lazy IO would be completely transparent, because the value would be demanded immediately, and the "suspension" mechanism used in lazy IO would be undone straight away
2020-11-18 16:41:02 <p0a> lazy IO is not visible in the type system though, right?
2020-11-18 16:41:07 <tdammers> nope
2020-11-18 16:41:14 <tdammers> :t Data.Text.readFile
2020-11-18 16:41:16 <lambdabot> error:
2020-11-18 16:41:16 <lambdabot> Not in scope: ‘Data.Text.readFile’
2020-11-18 16:41:16 <lambdabot> No module named ‘Data.Text’ is imported.
2020-11-18 16:41:28 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
2020-11-18 16:41:29 <tdammers> @let import qualified Data.Text.IO
2020-11-18 16:41:31 <lambdabot> Defined.
2020-11-18 16:41:34 <tdammers> @let import qualified Data.Text.Lazy.IO
2020-11-18 16:41:36 <lambdabot> Defined.
2020-11-18 16:41:40 <tdammers> :t Data.Text.IO.readFile
2020-11-18 16:41:41 <lambdabot> FilePath -> IO Data.Text.Internal.Text
2020-11-18 16:41:48 <tdammers> :t Data.Text.Lazy.IO.readFile
2020-11-18 16:41:49 <lambdabot> FilePath -> IO Data.Text.Internal.Lazy.Text
2020-11-18 16:41:49 <int-e> :t T.readFile
2020-11-18 16:41:50 <lambdabot> error:
2020-11-18 16:41:50 <lambdabot> Not in scope: ‘T.readFile’
2020-11-18 16:41:50 <lambdabot> Perhaps you meant one of these:
2020-11-18 16:41:56 × lagothrix quits (~lagothrix@unaffiliated/lagothrix) (Ping timeout: 240 seconds)
2020-11-18 16:41:57 mananamenos_ joins (~mananamen@84.122.202.215.dyn.user.ono.com)
2020-11-18 16:42:09 <Ariakenom> lazy IO is not popular, recommended or important. although I think its interesting and I've used it for some things
2020-11-18 16:42:30 <tdammers> it is important to know that it exists, because you can easily cause some surprising and subtle bugs with it
2020-11-18 16:42:31 hackage phonetic-languages-general 0.3.0.0 - A generalization of the uniqueness-periods-vector-general functionality. https://hackage.haskell.org/package/phonetic-languages-general-0.3.0.0 (OleksandrZhabenko)
2020-11-18 16:42:41 <p0a> I'm trying to learn a bit on conduit
2020-11-18 16:42:53 <int-e> @where L.hs
2020-11-18 16:42:53 <lambdabot> what lambdabot has in scope is at https://silicon.int-e.eu/lambdabot/State/Pristine.hs
2020-11-18 16:43:48 <int-e> . o O ( nobody needs text )

All times are in UTC.