2022/10/01

2022-10-01 00:00:23 +0200beteigeuze(~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df)
2022-10-01 00:02:33 +0200zero(~z@user/zero)
2022-10-01 00:02:54 +0200 <[exa]> monadic joke choice is pretty safe here tbh. :D
2022-10-01 00:04:30 +0200L29Ah(~L29Ah@wikipedia/L29Ah) (Ping timeout: 244 seconds)
2022-10-01 00:05:05 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-01 00:05:41 +0200nate3(~nate@98.45.169.16)
2022-10-01 00:06:00 +0200 <monochrom> Oh heh.
2022-10-01 00:06:16 +0200zzz(~z@user/zero) (Ping timeout: 268 seconds)
2022-10-01 00:10:31 +0200nate3(~nate@98.45.169.16) (Ping timeout: 260 seconds)
2022-10-01 00:10:53 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 00:10:56 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-01 00:14:38 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 00:15:46 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
2022-10-01 00:16:21 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 260 seconds)
2022-10-01 00:18:15 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 00:18:36 +0200thyriaen(~thyriaen@2a02:8109:8340:686c:7383:e0e2:ad95:9fce) (Quit: Leaving)
2022-10-01 00:23:41 +0200zmt00(~zmt00@user/zmt00) (Read error: Connection reset by peer)
2022-10-01 00:23:42 +0200vorpuni(~pvorp@2001:861:3881:c690:ec7f:c79:dd1b:f81a)
2022-10-01 00:25:38 +0200zmt00(~zmt00@user/zmt00)
2022-10-01 00:26:43 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 244 seconds)
2022-10-01 00:28:22 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 00:31:59 +0200Midjak(~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
2022-10-01 00:32:45 +0200titibandit(~titibandi@xdsl-212-8-150-57.nc.de) (Remote host closed the connection)
2022-10-01 00:32:58 +0200michalz(~michalz@185.246.207.221) (Remote host closed the connection)
2022-10-01 00:35:31 +0200rosalind(rosalind@id-194105.uxbridge.irccloud.com) (Quit: bbl)
2022-10-01 00:37:34 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 244 seconds)
2022-10-01 00:39:55 +0200zebrag(~chris@user/zebrag)
2022-10-01 00:41:18 +0200rosalind(rosalind@id-194105.uxbridge.irccloud.com)
2022-10-01 00:41:38 +0200ardell(~ardell@user/ardell) (Quit: Leaving)
2022-10-01 00:55:13 +0200gff_(~gff@user/gff) (Ping timeout: 246 seconds)
2022-10-01 00:56:01 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-01 00:57:26 +0200gff_(~gff@user/gff)
2022-10-01 00:59:21 +0200vglfr(~vglfr@145.224.100.164)
2022-10-01 00:59:47 +0200Tuplanolla(~Tuplanoll@91-159-69-34.elisa-laajakaista.fi)
2022-10-01 00:59:49 +0200megaTherion(~therion@unix.io) (Remote host closed the connection)
2022-10-01 00:59:56 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-10-01 01:00:08 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 01:03:12 +0200megaTherion(~therion@unix.io)
2022-10-01 01:03:52 +0200edrx(~Eduardo@2804:18:5805:83e:c9df:9b:886f:e903)
2022-10-01 01:04:21 +0200 <edrx> hi all!
2022-10-01 01:04:57 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 244 seconds)
2022-10-01 01:05:50 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 01:05:51 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-10-01 01:06:07 +0200 <edrx> I am trying to translate the definitions of Functor, Applicative, and Monad into some kinds of diagrams that I am very familiar with... two questions: 1) what is the pronounciation of <*>? 2) is there a way to define <*> from (>>=)? how?
2022-10-01 01:07:00 +0200 <hpc> @src ap
2022-10-01 01:07:00 +0200 <lambdabot> ap = liftM2 id
2022-10-01 01:07:07 +0200 <hpc> bah
2022-10-01 01:07:21 +0200 <ski> well, i pronounce it `ap' .. for the other question, see ^
2022-10-01 01:07:24 +0200 <hpc> anyhoo, ap = (<*>), so see how that's defined
2022-10-01 01:07:31 +0200 <ski> @src liftM2
2022-10-01 01:07:32 +0200 <lambdabot> liftM2 f m1 m2 = do
2022-10-01 01:07:32 +0200 <lambdabot> x1 <- m1
2022-10-01 01:07:32 +0200 <lambdabot> x2 <- m2
2022-10-01 01:07:33 +0200 <lambdabot> return (f x1 x2)
2022-10-01 01:08:49 +0200 <ski> liftM2 f m0 m1 = m0 >>= \x0 -> m1 >>= \x1 -> return (f x0 x1)
2022-10-01 01:08:54 +0200 <ski> = m0 >>= \x0 -> (return . f x0 <$> m1)
2022-10-01 01:09:17 +0200 <ski> so
2022-10-01 01:09:31 +0200 <edrx> so that's a definition for <*>?
2022-10-01 01:09:43 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2022-10-01 01:09:47 +0200 <edrx> I'll need some minutes to type each subexpression of that
2022-10-01 01:09:55 +0200 <geekosaur> use `id` for `f`
2022-10-01 01:10:20 +0200 <ski> er, sorry, no `return' in the last line
2022-10-01 01:10:26 +0200 <ski> = m0 >>= \x0 -> (f x0 <$> m1)
2022-10-01 01:11:34 +0200 <ski> mf `ap` mx = mf >>= \f -> f <$> mx
2022-10-01 01:11:35 +0200 <ski> = mf >>= (<$> mx)
2022-10-01 01:14:44 +0200 <ski> (i used here that `f <$> mx ={synonym}= fmap f mx ={law}= liftM f mx ={definition}= mx >>= \x -> return (f x)' to simplify the `m1 >>= \x1 -> return (f x0 x1)' to `f x0 <$> m1')
2022-10-01 01:15:48 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 01:17:01 +0200 <edrx> let me see
2022-10-01 01:18:21 +0200 <ski> edrx : it's not uncommon, if you're making both an `Applicative', and a `Monad' instance, to do the former like `pure = return' and `(<*>) = ap', and then do the "real implementation" in `Monad', defining `return' and `(>>=)' (and maybe `(>>)', if you care enough / want something better than the default implementation)
2022-10-01 01:19:21 +0200 <ski> similarly, if you're making an `Applicative' instance, you can make the `Functor' instance by `fmap = liftA' (`liftA' is defined in terms of `pure' and `(<*>)'). or, if you already also have a `Monad' instance, you could go directly for `fmap = liftM'
2022-10-01 01:20:19 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-01 01:21:12 +0200 <ski> iow, `liftA' and `liftM' are suitable default implementations for `fmap' (/ `(<$>)'), in case you have the "proper" implementation in `Applicative' or `Monad'. and similarly `ap' (and `return') is a suitable default implementation of `(<*>)' (and `pure'), if you're doing `Monad'
2022-10-01 01:23:31 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 01:24:10 +0200 <ski> it would also be nice if one could implement `Monad' by defining `join' (and `fmap' in `Functor', possibly via `liftA'), and then `mx >>= k = join (k <$> mx)' .. but alas, there are currently technical difficulties to this (related to being able to derive `Functor',`Applicative',`Monad' instances for `newtypes', iirc)
2022-10-01 01:24:50 +0200 <ski> (because sometimes, it's easier to think in terms of `join' than `(>>=)'/`(=<<)' (or even `(>=>)'/`(<=<)'))
2022-10-01 01:28:53 +0200chomwitt(~chomwitt@2a02:587:dc14:f500:3759:458b:6e75:9dca) (Ping timeout: 268 seconds)
2022-10-01 01:29:19 +0200nckxnckhexen
2022-10-01 01:33:19 +0200 <edrx> are the symbols "={synonym}=", "={law}=", "={definition}=" common? I'm going to start using them!
2022-10-01 01:33:29 +0200rosalind(rosalind@id-194105.uxbridge.irccloud.com) (Quit: Yawn)
2022-10-01 01:33:50 +0200rosalind(rosalind@id-194105.uxbridge.irccloud.com)
2022-10-01 01:34:53 +0200 <edrx> oops
2022-10-01 01:35:08 +0200 <edrx> I think I've asked the wrong question =/
2022-10-01 01:35:50 +0200 <edrx> I was looking for a way to define <*> - not <$> - from return and (>>=)...
2022-10-01 01:36:46 +0200 <geekosaur> you were shown the definiiton of `ap` which is <*>, thn how to derive it from >>=
2022-10-01 01:37:03 +0200 <edrx> gaaah
2022-10-01 01:37:08 +0200 <edrx> let me read that again, sorry
2022-10-01 01:38:54 +0200rosalind(rosalind@id-194105.uxbridge.irccloud.com) ()
2022-10-01 01:41:31 +0200edrx(~Eduardo@2804:18:5805:83e:c9df:9b:886f:e903) (Ping timeout: 260 seconds)
2022-10-01 01:47:19 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 244 seconds)
2022-10-01 01:50:29 +0200 <ski> @tell edrx "are the symbols \"={synonym}=\", \"={law}=\", \"={definition}=\" common? I'm going to start using them!" -- well, `={...}=' is just a symbol i've been using (and others have used similar symbols before) for documenting the *reason*/*justification* for an equality holding, when doing equational reasoning (for reasoning about code, including refactoring code)
2022-10-01 01:50:30 +0200 <lambdabot> Consider it noted.
2022-10-01 01:51:28 +0200anthezium(~anthezium@75.164.54.59)
2022-10-01 01:53:31 +0200 <anthezium> hey folks, does anyone know what the blessed way to do things like map a closed type family over a type-level list promoted with DataKinds is?  Is the functionality from e.g. https://hackage.haskell.org/package/type-list-0.5.0.0 duplicated in a non-deprecated place?
2022-10-01 01:54:20 +0200 <anthezium> is there a way to promote term-level map from the prelude, or something?
2022-10-01 01:56:55 +0200 <ski> @tell edrx "I was looking for a way to define <*> - not <$> - from return and (>>=)..." -- and i derived, from the definition `ap = liftM2 id', and the definitions of `liftM',`liftM2' (in terms of `do'-notation / `(>>=)' and `return'), (also using the definitions `(<$>) = fmap' and (implicitly) `id x = x'), and the laws `liftM = fmap' and `ap = (<*>)', an alternate definition of `(<*>)'/`ap' in terms
2022-10-01 01:56:55 +0200 <lambdabot> Consider it noted.
2022-10-01 01:57:01 +0200 <ski> of`(>>=)' and `(<$>)'
2022-10-01 01:57:10 +0200 <ski> @tell edrx .. of `(>>=)' and `(<$>)'
2022-10-01 01:57:11 +0200 <lambdabot> Consider it noted.
2022-10-01 01:58:02 +0200jero98772(~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff)
2022-10-01 01:58:37 +0200 <moonsheep> How many bytes can I receive from a TCP stream with the network package?
2022-10-01 01:58:45 +0200 <moonsheep> The docs say that "Considering hardware and network realities, the maximum number of bytes to receive should be a small power of 2, e.g., 4096."
2022-10-01 01:58:48 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2022-10-01 01:58:59 +0200 <moonsheep> Yet it is my understanding that TCP can split messages into separate packets and deliver them in order
2022-10-01 01:59:21 +0200 <moonsheep> So do I have to manually receive 4k chunks and reassemble them?
2022-10-01 02:00:01 +0200vulpineghoulpine
2022-10-01 02:01:11 +0200 <geekosaur> no, TCP does that for you. you may be waiting a long time to receive a very large series of bytes, though
2022-10-01 02:01:31 +0200 <geekosaur> retransmissions aren't instantaneous
2022-10-01 02:05:07 +0200 <moonsheep> right, I don't need to receive many bytes anyway, just *exactly* however many I want
2022-10-01 02:07:11 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 260 seconds)
2022-10-01 02:09:06 +0200greuben(~greuben@user/greuben)
2022-10-01 02:10:34 +0200zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-10-01 02:11:25 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-10-01 02:11:57 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
2022-10-01 02:11:59 +0200 <geekosaur> recvBuf should work in that case, for TCP sockets. (UDP's another matter, as it won't combine two packets together to fill the buffer)
2022-10-01 02:12:34 +0200 <geekosaur> this is why the socket type matters
2022-10-01 02:16:12 +0200 <moonsheep> yeah don't worry, I'm using TCP
2022-10-01 02:16:42 +0200 <moonsheep> why should I use recvBuf instead of the ByteString recv though?
2022-10-01 02:16:47 +0200 <moonsheep> is there any advantage?
2022-10-01 02:18:01 +0200dr_merijn(~dr_merijn@86-86-29-250.fixed.kpn.net)
2022-10-01 02:20:24 +0200 <geekosaur> ByteString would be preferable because that's usually what you really want. Going through String for what is presumably binary data (since it's size delimited instead of e.g. line oriented) is dumb
2022-10-01 02:20:41 +0200jargon(~jargon@184.101.88.60)
2022-10-01 02:20:45 +0200 <geekosaur> so ByteString and then `binary` to parse it
2022-10-01 02:21:44 +0200 <geekosaur> (or attoparsec for complex packets)
2022-10-01 02:22:42 +0200 <moonsheep> oh I'm using cereal
2022-10-01 02:22:44 +0200 <moonsheep> is that a problem?
2022-10-01 02:22:47 +0200 <geekosaur> `network` and its `recvBuf` predate wide use of ByteString
2022-10-01 02:22:55 +0200dr_merijn(~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 265 seconds)
2022-10-01 02:23:19 +0200 <geekosaur> cereal's mostly obsolete since `binary` started supporting lazy ByteString, but if it's being kept up to date then go ahead
2022-10-01 02:23:22 +0200archsinner(~archsinne@2603-9000-8400-033b-0000-0000-0000-1df1.inf6.spectrum.com)
2022-10-01 02:23:32 +0200 <moonsheep> oh I didn't know that
2022-10-01 02:23:38 +0200 <moonsheep> I always used cereal as the default my whole life
2022-10-01 02:23:42 +0200 <moonsheep> I guess the name's catchier
2022-10-01 02:24:31 +0200 <moonsheep> btw, what's the best way to parse variable-length packets?
2022-10-01 02:24:49 +0200 <moonsheep> use recv to get the first 4 bytes, decode them as an integer length, and recv as much as that?
2022-10-01 02:27:04 +0200 <geekosaur> that's probably not optimal. recv in what chunks you can and queue them, then decode length, then decode data based on length. attoparsec is better than binary/cereal here because it can produce a partial parse if you need to wait for more data
2022-10-01 02:27:38 +0200 <moonsheep> right, so I end up having to reassemble them manually anyway.
2022-10-01 02:27:47 +0200 <moonsheep> I've always wondered if the stream abstraction was necessary for TCP
2022-10-01 02:28:04 +0200 <moonsheep> why not still treat the connection as packets that arrive in order and without corruption?
2022-10-01 02:28:05 +0200 <geekosaur> not really, the closest you get to that is telling attoparsec to resume a parse
2022-10-01 02:28:20 +0200 <moonsheep> that always felt like a weird design decision for TCP honestly
2022-10-01 02:28:35 +0200 <moonsheep> you nearly always end up concatting the packets in the stream anyway
2022-10-01 02:28:47 +0200 <moonsheep> except for large file transfers I guess, that makes some sense
2022-10-01 02:28:47 +0200 <geekosaur> which is what stream does
2022-10-01 02:29:03 +0200 <geekosaur> so I'm not seeing your point
2022-10-01 02:29:19 +0200 <moonsheep> well why treat the connection as a stream of bytes, as opposed to as a stream of packets?
2022-10-01 02:29:34 +0200 <moonsheep> so you'd do send and recv in terms of packets, not bytes
2022-10-01 02:29:41 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 265 seconds)
2022-10-01 02:29:48 +0200 <moonsheep> you need to build that abstraction back on top of TCP anyway, right?
2022-10-01 02:30:18 +0200 <geekosaur> no?
2022-10-01 02:30:30 +0200 <geekosaur> most TCP protocols are line oriented, not packet
2022-10-01 02:30:43 +0200 <moonsheep> well I guess fair enough
2022-10-01 02:30:57 +0200 <moonsheep> maybe mine is the exception not the rule
2022-10-01 02:31:23 +0200 <moonsheep> it's a chat, so I do have to separate messages as different units
2022-10-01 02:31:25 +0200 <moonsheep> or "packets"
2022-10-01 02:31:46 +0200 <geekosaur> the sockets interface does support SOCK_SEQPACKET but I don't think TCP/IP does
2022-10-01 02:31:50 +0200 <geekosaur> OSI does, I think
2022-10-01 02:31:56 +0200 <moonsheep> oh alright
2022-10-01 02:31:58 +0200 <moonsheep> anyway thanks for everything
2022-10-01 02:35:30 +0200Tuplanolla(~Tuplanoll@91-159-69-34.elisa-laajakaista.fi) (Quit: Leaving.)
2022-10-01 02:36:33 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
2022-10-01 02:38:21 +0200moonsheep(~user@user/moonsheep) (Quit: ERC 5.4 (IRC client for GNU Emacs 28.2))
2022-10-01 02:41:46 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 265 seconds)
2022-10-01 02:47:16 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-10-01 02:48:01 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
2022-10-01 02:48:06 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2022-10-01 02:55:44 +0200frost(~frost@user/frost)
2022-10-01 02:56:06 +0200neightchan(~nate@98.45.169.16) (Quit: WeeChat 2.9)
2022-10-01 02:59:21 +0200Katarushisu(~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (Quit: Ping timeout (120 seconds))
2022-10-01 02:59:41 +0200jespada(~jespada@cpc121060-nmal24-2-0-cust249.19-2.cable.virginm.net) (Ping timeout: 260 seconds)
2022-10-01 02:59:59 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-10-01 03:00:43 +0200Katarushisu(~Katarushi@86.1.5.247)
2022-10-01 03:02:55 +0200jespada(~jespada@77.97.36.250)
2022-10-01 03:03:11 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
2022-10-01 03:03:49 +0200LoupGrisLycanthropy
2022-10-01 03:04:23 +0200LycanthropyHaematophage
2022-10-01 03:08:28 +0200jespada_(~jespada@cpc121060-nmal24-2-0-cust249.19-2.cable.virginm.net)
2022-10-01 03:08:51 +0200jespada(~jespada@77.97.36.250) (Ping timeout: 265 seconds)
2022-10-01 03:08:51 +0200Katarushisu(~Katarushi@86.1.5.247) (Ping timeout: 265 seconds)
2022-10-01 03:08:59 +0200adanwan_(~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 258 seconds)
2022-10-01 03:09:01 +0200Katarushisu(~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net)
2022-10-01 03:09:20 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 03:10:04 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-01 03:10:05 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-01 03:10:05 +0200wroathe(~wroathe@user/wroathe)
2022-10-01 03:10:31 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-01 03:13:41 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
2022-10-01 03:19:24 +0200tcard_(~tcard@p1205018-ipngn11201hodogaya.kanagawa.ocn.ne.jp)
2022-10-01 03:19:31 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2022-10-01 03:20:06 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-01 03:21:16 +0200beteigeuze(~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df) (Ping timeout: 260 seconds)
2022-10-01 03:22:23 +0200tcard(~tcard@p696070-ipngn8501hodogaya.kanagawa.ocn.ne.jp) (Ping timeout: 265 seconds)
2022-10-01 03:25:12 +0200tcard_(~tcard@p1205018-ipngn11201hodogaya.kanagawa.ocn.ne.jp) (Quit: Leaving)
2022-10-01 03:26:43 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 265 seconds)
2022-10-01 03:29:38 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 265 seconds)
2022-10-01 03:29:56 +0200vorpuni(~pvorp@2001:861:3881:c690:ec7f:c79:dd1b:f81a) (Remote host closed the connection)
2022-10-01 03:35:19 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 03:35:45 +0200harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
2022-10-01 03:43:38 +0200lyle(~lyle@104.246.145.85) (Ping timeout: 265 seconds)
2022-10-01 03:43:52 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 258 seconds)
2022-10-01 03:44:37 +0200TonyStone(~TonyStone@2603-7080-8607-c36a-cc48-2eb7-9785-f03a.res6.spectrum.com) (Quit: Leaving)
2022-10-01 03:44:55 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-01 03:48:53 +0200archsinner(~archsinne@2603-9000-8400-033b-0000-0000-0000-1df1.inf6.spectrum.com) (Quit: archsinner)
2022-10-01 03:49:17 +0200archsinner(~archsinne@2603-9000-8400-033b-0000-0000-0000-1df1.inf6.spectrum.com)
2022-10-01 03:51:51 +0200talismanick(~talismani@c-73-41-86-39.hsd1.ca.comcast.net) (Ping timeout: 265 seconds)
2022-10-01 03:53:39 +0200TonyStone(~TonyStone@cpe-74-76-51-197.nycap.res.rr.com)
2022-10-01 03:56:41 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
2022-10-01 03:58:56 +0200bilegeek_(~bilegeek@10.sub-174-208-237.myvzw.com)
2022-10-01 04:00:06 +0200razetime(~quassel@117.254.34.169)
2022-10-01 04:00:35 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 04:01:09 +0200bilegeek(~bilegeek@2600:1008:b018:1dfc:44e1:aaa5:595f:8e17) (Ping timeout: 244 seconds)
2022-10-01 04:01:14 +0200archsinner(~archsinne@2603-9000-8400-033b-0000-0000-0000-1df1.inf6.spectrum.com) (Quit: archsinner)
2022-10-01 04:04:14 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 244 seconds)
2022-10-01 04:05:01 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
2022-10-01 04:05:42 +0200anthezium(~anthezium@75.164.54.59) (Ping timeout: 252 seconds)
2022-10-01 04:07:11 +0200nate3(~nate@98.45.169.16)
2022-10-01 04:08:34 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-10-01 04:08:51 +0200adanwan_(~adanwan@gateway/tor-sasl/adanwan)
2022-10-01 04:11:01 +0200greuben(~greuben@user/greuben) (Quit: WeeChat 3.6)
2022-10-01 04:11:53 +0200nate3(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-10-01 04:13:00 +0200td_(~td@94.134.91.160) (Ping timeout: 264 seconds)
2022-10-01 04:14:44 +0200td_(~td@94.134.91.190)
2022-10-01 04:15:26 +0200nate3(~nate@98.45.169.16)
2022-10-01 04:20:27 +0200edrx(~Eduardo@2804:56c:d2d3:4800:cf7d:b421:4c3a:392e)
2022-10-01 04:20:43 +0200 <edrx> @src ap
2022-10-01 04:20:44 +0200 <lambdabot> ap = liftM2 id
2022-10-01 04:21:29 +0200tcard(~tcard@2400:4051:5801:7500:19ce:ed82:2ab7:90f9)
2022-10-01 04:22:30 +0200 <edrx> question: where did lambdabot find that? a few hours ago I asked some questions here and people answered by asking things to the lambdabot, and I was able to locate most of the answers in the source code of the Prelude... but not this definition for ap =/
2022-10-01 04:25:49 +0200 <monochrom> Does liftM2 ($) help?
2022-10-01 04:26:21 +0200 <edrx> in what sense?
2022-10-01 04:27:23 +0200 <edrx> for understanding how to define <*> from monad methods?
2022-10-01 04:30:46 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 04:31:26 +0200 <jackdk> `($) :: (a -> b) -> a -> b` unifies with `id :: c -> c` with `c ~ (a -> b)` (remember that `(->)` is right-associative)
2022-10-01 04:31:48 +0200greuben(~greuben@user/greuben)
2022-10-01 04:35:01 +0200harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
2022-10-01 04:35:22 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
2022-10-01 04:35:48 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 268 seconds)
2022-10-01 04:41:10 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 04:45:37 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
2022-10-01 04:46:50 +0200tcard(~tcard@2400:4051:5801:7500:19ce:ed82:2ab7:90f9) (Quit: Leaving)
2022-10-01 04:48:31 +0200tcard(~tcard@2400:4051:5801:7500:19ce:ed82:2ab7:90f9)
2022-10-01 04:55:16 +0200 <edrx> aaaaah
2022-10-01 04:55:18 +0200 <edrx> :module +GHC.Base
2022-10-01 04:55:18 +0200 <edrx> :t liftM2
2022-10-01 04:55:18 +0200 <edrx> :t liftM2 ($)
2022-10-01 04:55:19 +0200 <lambdabot> Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
2022-10-01 04:55:20 +0200 <lambdabot> Monad m => m (a -> r) -> m a -> m r
2022-10-01 04:55:31 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Quit: Lost terminal)
2022-10-01 04:55:40 +0200 <edrx> lovely =)
2022-10-01 05:07:51 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 05:14:04 +0200bilegeek_(~bilegeek@10.sub-174-208-237.myvzw.com) (Remote host closed the connection)
2022-10-01 05:14:12 +0200 <sm> hey all.. is it possible to re-export one thing from module X, without also leaking orphan instances defined in X ?
2022-10-01 05:14:26 +0200bilegeek_(~bilegeek@10.sub-174-208-237.myvzw.com)
2022-10-01 05:14:43 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 05:15:16 +0200 <sm> eg: import Text.Megaparsec.Custom as X (customErrorBundlePretty) -- re-exporting X, don't want to re-export orphan instances
2022-10-01 05:17:23 +0200 <jackdk> I would use newtypes instead of orphan instances and this is one reason why.
2022-10-01 05:19:36 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 264 seconds)
2022-10-01 05:23:27 +0200bilegeek_bilegeek
2022-10-01 05:28:03 +0200xff0x(~xff0x@2405:6580:b080:900:b7c1:3130:710b:2a7f) (Ping timeout: 248 seconds)
2022-10-01 05:29:01 +0200 <[Leary]> sm: I think you can just put customWhatever straight in your export list?
2022-10-01 05:29:26 +0200darkstardevx(~darkstard@192.183.207.94) (Remote host closed the connection)
2022-10-01 05:29:38 +0200 <sm> [Leary]: that sounds good, and should avoid re-exporting the orphan instances ?
2022-10-01 05:30:11 +0200razetime(~quassel@117.254.34.169) (Ping timeout: 260 seconds)
2022-10-01 05:30:49 +0200darkstardevx(~darkstard@192.183.207.94)
2022-10-01 05:30:57 +0200 <[Leary]> I would imagine so, but I don't actually know.
2022-10-01 05:33:36 +0200mmhat(~mmh@p200300f1c7062333ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.6)
2022-10-01 05:33:56 +0200Everything(~Everythin@37.115.210.35) ()
2022-10-01 05:34:07 +0200 <sm> thanks, both
2022-10-01 05:34:39 +0200jargon(~jargon@184.101.88.60) (Remote host closed the connection)
2022-10-01 05:36:41 +0200luffy(~chenqisu1@183.217.201.220)
2022-10-01 05:38:11 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 265 seconds)
2022-10-01 05:40:12 +0200xff0x(~xff0x@2405:6580:b080:900:b7c1:3130:710b:2a7f)
2022-10-01 05:42:26 +0200darkstardevx(~darkstard@192.183.207.94) (Ping timeout: 260 seconds)
2022-10-01 05:42:48 +0200jpds1(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-10-01 05:43:29 +0200jpds1(~jpds@gateway/tor-sasl/jpds)
2022-10-01 05:43:59 +0200luffy(~chenqisu1@183.217.201.220) (Ping timeout: 265 seconds)
2022-10-01 05:48:09 +0200 <[Leary]> sm: Haskell wiki says: "All instances defined in a module A are imported automatically when importing A, or importing any module that imports A, directly or indirectly."
2022-10-01 05:48:19 +0200 <[Leary]> So it looks like I'm wrong; you can't escape the pollution.
2022-10-01 05:48:44 +0200 <sm> ack
2022-10-01 05:49:18 +0200jero98772(~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection)
2022-10-01 05:50:32 +0200jargon(~jargon@184.101.88.60)
2022-10-01 05:50:43 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 05:51:02 +0200jargon(~jargon@184.101.88.60) (Remote host closed the connection)
2022-10-01 05:51:19 +0200bilegeek_(~bilegeek@10.sub-174-208-237.myvzw.com)
2022-10-01 05:52:25 +0200bilegeek(~bilegeek@10.sub-174-208-237.myvzw.com) (Read error: Connection reset by peer)
2022-10-01 05:53:25 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 05:54:58 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 258 seconds)
2022-10-01 05:55:19 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 244 seconds)
2022-10-01 05:56:39 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-10-01 05:56:42 +0200razetime(~quassel@117.254.34.169)
2022-10-01 05:56:48 +0200 <EvanR> instances are very global
2022-10-01 05:57:32 +0200 <EvanR> it's like there can be only one instance for a given type in the whole ecosystem
2022-10-01 06:01:17 +0200bilegeek_(~bilegeek@10.sub-174-208-237.myvzw.com) (Remote host closed the connection)
2022-10-01 06:02:14 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2022-10-01 06:02:16 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-10-01 06:08:53 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 06:09:22 +0200bilegeek(~bilegeek@10.sub-174-208-237.myvzw.com)
2022-10-01 06:13:37 +0200 <hololeap> I'm curious if there's an appreciable difference between `LogicT (State s) a` and `StateT s Logic a`. I just want to throw a counter on for each element in the Logic monad
2022-10-01 06:13:51 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-01 06:15:31 +0200 <hololeap> I could also use `zip [1..]` after observeAll
2022-10-01 06:17:18 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 06:18:14 +0200dr_merijn(~dr_merijn@86-86-29-250.fixed.kpn.net)
2022-10-01 06:20:12 +0200edrx(~Eduardo@2804:56c:d2d3:4800:cf7d:b421:4c3a:392e) (Ping timeout: 264 seconds)
2022-10-01 06:22:25 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-01 06:22:47 +0200dr_merijn(~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds)
2022-10-01 06:30:31 +0200nate3(~nate@98.45.169.16) (Ping timeout: 246 seconds)
2022-10-01 06:40:01 +0200 <jackdk> In fact, if you want to explicitly import instances and silence warnings, the idiom is to `import Foo ()`
2022-10-01 06:41:51 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 06:43:43 +0200tmiller(~tmiller@199.241.26.152) (Quit: WeeChat 3.6)
2022-10-01 06:45:35 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-01 06:48:27 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-01 06:49:28 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 06:52:26 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 260 seconds)
2022-10-01 06:55:03 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-01 06:55:52 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2022-10-01 06:56:56 +0200nate3(~nate@98.45.169.16)
2022-10-01 07:06:06 +0200nate3(~nate@98.45.169.16) (Ping timeout: 244 seconds)
2022-10-01 07:10:43 +0200gawen(~gawen@user/gawen) (Quit: cya)
2022-10-01 07:10:46 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 07:12:03 +0200gawen(~gawen@user/gawen)
2022-10-01 07:15:16 +0200frost(~frost@user/frost) (Ping timeout: 252 seconds)
2022-10-01 07:15:57 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-01 07:17:56 +0200Lycurgus(~juan@user/Lycurgus)
2022-10-01 07:20:00 +0200nate3(~nate@98.45.169.16)
2022-10-01 07:21:01 +0200Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt juan@acm.org)
2022-10-01 07:23:22 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 07:23:58 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-10-01 07:24:23 +0200nate3(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-10-01 07:25:32 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2022-10-01 07:28:36 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-01 07:34:06 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 07:39:06 +0200mvk(~mvk@2607:fea8:5ce3:8500::778c) (Ping timeout: 260 seconds)
2022-10-01 07:39:07 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 246 seconds)
2022-10-01 07:42:58 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2022-10-01 07:43:04 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 07:44:11 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 252 seconds)
2022-10-01 07:47:19 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-10-01 07:49:10 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 265 seconds)
2022-10-01 07:49:51 +0200k8yun(~k8yun@user/k8yun)
2022-10-01 08:02:04 +0200gmg(~user@user/gehmehgeh)
2022-10-01 08:02:09 +0200k8yun(~k8yun@user/k8yun) (Ping timeout: 252 seconds)
2022-10-01 08:02:58 +0200ksu(~ksu@user/prtr)
2022-10-01 08:03:25 +0200redmp(~redmp@mobile-166-171-251-80.mycingular.net)
2022-10-01 08:03:45 +0200redmp(~redmp@mobile-166-171-251-80.mycingular.net) (Client Quit)
2022-10-01 08:06:06 +0200redmp(~redmp@mobile-166-171-251-80.mycingular.net)
2022-10-01 08:09:21 +0200redmp(~redmp@mobile-166-171-251-80.mycingular.net) (Client Quit)
2022-10-01 08:09:50 +0200vorpuni(~pvorp@2001:861:3881:c690:f9de:fbcb:2100:7597)
2022-10-01 08:17:01 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-10-01 08:20:31 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-01 08:22:40 +0200nate3(~nate@98.45.169.16)
2022-10-01 08:27:40 +0200nate3(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-10-01 08:32:59 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 08:33:10 +0200greuben(~greuben@user/greuben) (Ping timeout: 265 seconds)
2022-10-01 08:38:40 +0200 <ksu> is there a way to prevent _silently_ type defaulting integer constants to Int around functions like length or (!!)?
2022-10-01 08:38:44 +0200 <ksu> > (2 ^ 81, 2 ^ 81 + length [], [0] !! (2 ^ 81))
2022-10-01 08:38:45 +0200 <lambdabot> (2417851639229258349412352,0,0)
2022-10-01 08:39:49 +0200 <ksu> literals
2022-10-01 08:43:39 +0200greuben(~greuben@user/greuben)
2022-10-01 08:44:56 +0200vglfr(~vglfr@145.224.100.164) (Remote host closed the connection)
2022-10-01 08:45:50 +0200vglfr(~vglfr@145.224.100.164)
2022-10-01 08:48:36 +0200Midjak(~Midjak@82.66.147.146)
2022-10-01 08:50:33 +0200vglfr(~vglfr@145.224.100.164) (Remote host closed the connection)
2022-10-01 08:51:13 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346) (Remote host closed the connection)
2022-10-01 08:52:17 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-10-01 08:53:48 +0200vglfr(~vglfr@145.224.100.164)
2022-10-01 08:55:26 +0200 <probie> They're not defaulting, they're being "solved", since the types of `length` and `(!!)` involve `Int`s, and things like `(+)` require both arguments to have the same type
2022-10-01 08:55:45 +0200talismanick(~talismani@2601:200:c100:c9e0::24ac)
2022-10-01 08:58:26 +0200paddymahoney(~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com) (Ping timeout: 260 seconds)
2022-10-01 08:58:47 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-10-01 08:58:53 +0200 <probie> :t length
2022-10-01 08:58:54 +0200 <lambdabot> Foldable t => t a -> Int
2022-10-01 08:58:58 +0200 <probie> :t (!!)
2022-10-01 08:58:59 +0200 <lambdabot> [a] -> Int -> a
2022-10-01 09:02:22 +0200 <ksu> ok, thanks
2022-10-01 09:02:37 +0200 <ksu> so, is there a way to prevent it from silently happening?
2022-10-01 09:02:40 +0200jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-10-01 09:03:07 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 246 seconds)
2022-10-01 09:04:21 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-10-01 09:06:06 +0200bilegeek(~bilegeek@10.sub-174-208-237.myvzw.com) (Remote host closed the connection)
2022-10-01 09:06:28 +0200bilegeek(~bilegeek@10.sub-174-208-237.myvzw.com)
2022-10-01 09:13:08 +0200titibandit(~titibandi@xdsl-212-8-150-57.nc.de)
2022-10-01 09:14:06 +0200waldo(~waldo@user/waldo)
2022-10-01 09:16:35 +0200zxx7529(~Thunderbi@user/zxx7529) (Ping timeout: 252 seconds)
2022-10-01 09:16:51 +0200jrm(~jrm@user/jrm) (Quit: ciao)
2022-10-01 09:17:10 +0200jrm(~jrm@user/jrm)
2022-10-01 09:21:46 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-01 09:21:57 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-10-01 09:22:43 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 09:24:21 +0200Vajb(~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57) (Read error: Connection reset by peer)
2022-10-01 09:25:02 +0200adanwan_(~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 258 seconds)
2022-10-01 09:25:06 +0200lagash_(lagash@lagash.shelltalk.net)
2022-10-01 09:25:33 +0200Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
2022-10-01 09:25:52 +0200lagash(lagash@lagash.shelltalk.net) (Ping timeout: 260 seconds)
2022-10-01 09:26:19 +0200vglfr(~vglfr@145.224.100.164) (Remote host closed the connection)
2022-10-01 09:26:35 +0200vglfr(~vglfr@145.224.100.164)
2022-10-01 09:26:49 +0200vglfr(~vglfr@145.224.100.164) (Remote host closed the connection)
2022-10-01 09:26:54 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-01 09:27:21 +0200vglfr(~vglfr@145.224.100.164)
2022-10-01 09:34:41 +0200nate3(~nate@98.45.169.16)
2022-10-01 09:39:36 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
2022-10-01 09:39:49 +0200nate3(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-10-01 09:45:10 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 265 seconds)
2022-10-01 09:45:55 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2022-10-01 09:48:14 +0200greuben(~greuben@user/greuben) (Quit: WeeChat 3.6)
2022-10-01 09:49:34 +0200gmg(~user@user/gehmehgeh) (Ping timeout: 258 seconds)
2022-10-01 09:49:58 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-01 09:52:04 +0200gmg(~user@user/gehmehgeh)
2022-10-01 09:52:17 +0200paddymahoney(~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com)
2022-10-01 09:54:54 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 09:55:15 +0200elkcl(~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) (Ping timeout: 248 seconds)
2022-10-01 09:57:52 +0200elkcl(~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru)
2022-10-01 09:58:24 +0200CiaoSen(~Jura@p200300c957332e002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-10-01 09:59:11 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 244 seconds)
2022-10-01 09:59:37 +0200meinside(uid24933@id-24933.helmsley.irccloud.com)
2022-10-01 10:01:04 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2022-10-01 10:01:24 +0200 <probie> If you turn on warnings (:set -Wall in GHCi), you'll get warned about 2 ^ 81 defaulting both 2 and 81 to `Integer`, but never about them becoming `Int` if they only valid type they could be is `Int`
2022-10-01 10:01:31 +0200Guest9025(~Guest90@h-109-228-141-176.A980.priv.bahnhof.se)
2022-10-01 10:03:18 +0200 <tomjaguarpaw> Can anyone explain to me why, if I'm in a checkout of this directory and I 'cabal build lib:trial' it tries to build 'trial-example'? https://github.com/kowainik/trial/tree/main/trial
2022-10-01 10:03:27 +0200 <tomjaguarpaw> trial-example shouldn't be in the dependency tree at all
2022-10-01 10:04:51 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346)
2022-10-01 10:05:11 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 250 seconds)
2022-10-01 10:09:36 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346) (Ping timeout: 260 seconds)
2022-10-01 10:14:59 +0200bilegeek(~bilegeek@10.sub-174-208-237.myvzw.com) (Quit: Leaving)
2022-10-01 10:15:50 +0200Guest9025(~Guest90@h-109-228-141-176.A980.priv.bahnhof.se) (Quit: Client closed)
2022-10-01 10:17:43 +0200ircbrowse_tom(~ircbrowse@2a01:4f8:1c1c:9319::1)
2022-10-01 10:17:44 +0200Server+Cnt
2022-10-01 10:18:33 +0200razetime(~quassel@117.254.34.169) (Ping timeout: 252 seconds)
2022-10-01 10:21:55 +0200ozkutuk(~ozkutuk@176.240.173.153) (Ping timeout: 265 seconds)
2022-10-01 10:30:43 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 244 seconds)
2022-10-01 10:35:08 +0200razetime(~quassel@117.254.34.169)
2022-10-01 10:35:28 +0200jmdaemon(~jmdaemon@user/jmdaemon)
2022-10-01 10:37:24 +0200Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-10-01 10:38:32 +0200Vajb(~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57)
2022-10-01 10:46:47 +0200raym(~aritra@user/raym) (Ping timeout: 252 seconds)
2022-10-01 11:00:10 +0200the-coot[m](~the-cootm@2001:470:69fc:105::95f) (Quit: You have been kicked for being idle)
2022-10-01 11:06:26 +0200ozkutuk(~ozkutuk@176.240.173.153)
2022-10-01 11:06:58 +0200Tuplanolla(~Tuplanoll@91-159-69-34.elisa-laajakaista.fi)
2022-10-01 11:07:45 +0200raym(~aritra@user/raym)
2022-10-01 11:09:56 +0200L29Ah(~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
2022-10-01 11:14:33 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-10-01 11:18:42 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-10-01 11:20:39 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-01 11:21:28 +0200acidjnk(~acidjnk@p200300d6e7137a85945ed0a823b800bd.dip0.t-ipconnect.de)
2022-10-01 11:26:25 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2022-10-01 11:28:37 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
2022-10-01 11:48:35 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 11:53:16 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
2022-10-01 11:55:16 +0200chomwitt(~chomwitt@2a02:587:dc14:f500:f42c:42aa:75f3:5bbf)
2022-10-01 11:57:53 +0200whatsupdoc(uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2022-10-01 12:09:19 +0200meinside(uid24933@id-24933.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
2022-10-01 12:14:17 +0200zxx7529(~Thunderbi@user/zxx7529) (Quit: zxx7529)
2022-10-01 12:14:25 +0200notzmv(~zmv@user/notzmv)
2022-10-01 12:18:37 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-10-01 12:21:07 +0200nate3(~nate@98.45.169.16)
2022-10-01 12:23:59 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 12:25:47 +0200nate3(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-10-01 12:27:45 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 250 seconds)
2022-10-01 12:28:11 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 250 seconds)
2022-10-01 12:28:17 +0200titibandit(~titibandi@xdsl-212-8-150-57.nc.de) (Remote host closed the connection)
2022-10-01 12:29:44 +0200titibandit(~titibandi@xdsl-212-8-150-57.nc.de)
2022-10-01 12:30:30 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 12:33:51 +0200ellensol(~ellen@178-78-210-152.customers.ownit.se) (Ping timeout: 252 seconds)
2022-10-01 12:34:44 +0200mmhat(~mmh@p200300f1c7062333ee086bfffe095315.dip0.t-ipconnect.de)
2022-10-01 12:34:51 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
2022-10-01 12:42:51 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 12:43:09 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
2022-10-01 12:47:07 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 244 seconds)
2022-10-01 12:50:21 +0200 <ski> ksu : explicit type ascriptions ?
2022-10-01 12:50:24 +0200 <ski> there's also
2022-10-01 12:50:26 +0200 <ski> @type genericLength
2022-10-01 12:50:27 +0200 <lambdabot> Num i => [a] -> i
2022-10-01 12:50:30 +0200 <ski> @type genericIndex
2022-10-01 12:50:32 +0200 <lambdabot> Integral i => [a] -> i -> a
2022-10-01 12:55:00 +0200beteigeuze(~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df)
2022-10-01 12:56:34 +0200CiaoSen(~Jura@p200300c957332e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2022-10-01 13:03:29 +0200ellensol(~ellen@178-78-210-152.customers.ownit.se)
2022-10-01 13:04:12 +0200 <ski> hololeap : do you want backtrackable or non-backtrackable state ?
2022-10-01 13:07:30 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346)
2022-10-01 13:08:11 +0200ellensol(~ellen@178-78-210-152.customers.ownit.se) (Ping timeout: 265 seconds)
2022-10-01 13:08:46 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-01 13:11:55 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346) (Ping timeout: 244 seconds)
2022-10-01 13:13:30 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
2022-10-01 13:19:55 +0200razetime(~quassel@117.254.34.169) (Ping timeout: 268 seconds)
2022-10-01 13:21:08 +0200zebrag(~chris@user/zebrag)
2022-10-01 13:21:18 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-01 13:25:52 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 244 seconds)
2022-10-01 13:26:15 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.6)
2022-10-01 13:26:18 +0200razetime(~quassel@117.254.34.169)
2022-10-01 13:26:41 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 13:26:45 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2022-10-01 13:32:48 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 264 seconds)
2022-10-01 13:44:16 +0200lyle(~lyle@104.246.145.85)
2022-10-01 13:52:13 +0200talismanick(~talismani@2601:200:c100:c9e0::24ac) (Ping timeout: 244 seconds)
2022-10-01 14:02:35 +0200phma(phma@2001:5b0:210b:aca8:ecff:405c:745f:81a2) (Read error: Connection reset by peer)
2022-10-01 14:03:55 +0200phma(~phma@2001:5b0:211b:e328:5893:8a41:b371:1ef)
2022-10-01 14:11:00 +0200anon00(~anon@46.102.157.245)
2022-10-01 14:23:33 +0200 <fr33domlover[m]> Laziness question: I have `f :: Stuff -> URI -> IO ()` which encodes `Stuff` to JSON and sends over HTTP. I'd like to send the same `Stuff` to many URIs. If I partially apply just `x :: Stuff` to `f`, will it compute the conversion to JSON just once and remember it for all runs of the IO action? Or do I need to manually write `g :: BL.ByteString -> URI -> IO()` to make sure conversion is done once in advance?
2022-10-01 14:24:06 +0200 <fr33domlover[m]> (I know aeson has both strict and lazy versions, asking what the default for Haskell is)
2022-10-01 14:25:46 +0200 <hpc> if you write it so the bytestring is outside the \uri -> whatever expression, it will remember it
2022-10-01 14:27:18 +0200 <hpc> that's less of a laziness question and more of a how stuff is garbage-collected question too - you can generalize that if some subexpression only exists in a lambda, it gets forgotten when you leave it
2022-10-01 14:27:50 +0200 <hpc> so \x -> \y -> foo (expensive x computation) will always forget
2022-10-01 14:28:03 +0200 <ski> f stuff = \uri -> ..json..uri..
2022-10-01 14:28:05 +0200 <ski> where
2022-10-01 14:28:15 +0200 <ski> json = stuffToJSON stuff
2022-10-01 14:28:39 +0200 <hpc> \x -> let z = expensive x computation in \y -> foo z -- will remember z as long as the outer scope remembers (f x)
2022-10-01 14:28:54 +0200 <hpc> this is how the memoization libraries work, but at the top level
2022-10-01 14:29:22 +0200 <hpc> fibs = let fibslist = something in \n -> fibslist !! n
2022-10-01 14:29:35 +0200 <hpc> fibslist will be remembered as long as fibs is, which at the top-level means forever
2022-10-01 14:32:26 +0200 <probie> "which at the top-level means forever" - not so, top level terms can be GC-ed
2022-10-01 14:33:29 +0200ellensol(~ellen@178.78.210.152)
2022-10-01 14:34:42 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-10-01 14:34:43 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-10-01 14:35:35 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2022-10-01 14:35:36 +0200acidjnk(~acidjnk@p200300d6e7137a85945ed0a823b800bd.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2022-10-01 14:36:19 +0200td_(~td@94.134.91.190) (Ping timeout: 252 seconds)
2022-10-01 14:36:36 +0200 <hpc> probie: oh, neat
2022-10-01 14:37:41 +0200ellensol(~ellen@178.78.210.152) (Ping timeout: 244 seconds)
2022-10-01 14:38:55 +0200califax(~califax@user/califx)
2022-10-01 14:40:38 +0200td_(~td@94.134.91.190)
2022-10-01 14:41:13 +0200 <fr33domlover[m]> hpc: Thank you!
2022-10-01 14:41:28 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2022-10-01 14:43:14 +0200 <probie> hpc: CAFs (top level thunks) are treated somewhat specially in that they can be GC-ed if there are no "live" references to them (at least that's my understanding - someone with a better knowledge of GHC internals can probably be more precise)
2022-10-01 14:44:06 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-01 14:46:11 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 14:47:12 +0200 <hpc> ah, i will have to keep that in mind
2022-10-01 14:47:59 +0200 <hpc> i try to avoid those sorts of things just because i don't like globals, but nice to know it's not a memory leak waiting to happen
2022-10-01 14:48:59 +0200cdimitroulas(~cdimitrou@194.32.120.166)
2022-10-01 14:50:37 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-01 14:50:50 +0200 <ski> probie : they revert to thunk state ?
2022-10-01 14:52:01 +0200 <geekosaur> that's my recollection
2022-10-01 14:52:39 +0200 <geekosaur> special support was added for that some ghc versions back
2022-10-01 14:55:27 +0200ellensol(~ellen@178-78-210-152.customers.ownit.se)
2022-10-01 14:55:36 +0200waldo(~waldo@user/waldo) (Ping timeout: 264 seconds)
2022-10-01 14:58:08 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
2022-10-01 15:00:29 +0200ellensol_(~ellen@178-78-210-152.customers.ownit.se)
2022-10-01 15:01:02 +0200zer0bitz(~zer0bitz@2001:2003:f748:2000:493c:f2cd:d7ed:ecef)
2022-10-01 15:03:05 +0200ellensol(~ellen@178-78-210-152.customers.ownit.se) (Ping timeout: 252 seconds)
2022-10-01 15:05:25 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-10-01 15:08:17 +0200 <geekosaur> not finding the original MR but https://gitlab.haskell.org/ghc/ghc/-/merge_requests/1232 implies it by existence
2022-10-01 15:09:54 +0200 <HP-UX> Started to learn haskell
2022-10-01 15:10:10 +0200 <HP-UX> Frist thing I'm reading now: https://andrew.gibiansky.com/blog/haskell/haskell-syntax/ as the syntax was always confusing
2022-10-01 15:10:26 +0200 <HP-UX> Will consult the docs soon
2022-10-01 15:10:55 +0200 <fr33domlover[m]> > \x -> \y -> foo (expensive x computation) will always forget
2022-10-01 15:10:55 +0200 <fr33domlover[m]> hpc why does it always forget? You mean it will do the expensive computation every time and not memoize? I wonder why the compiler can't guess it can memoize because when I look at the code it seems like why not :P
2022-10-01 15:10:57 +0200 <lambdabot> error:
2022-10-01 15:10:57 +0200 <lambdabot> • Variable not in scope: foo :: t0 -> t2 -> t3 -> t4 -> t5
2022-10-01 15:10:57 +0200 <lambdabot> • Perhaps you meant ‘for’ (imported from Data.Traversable)error:
2022-10-01 15:11:29 +0200 <geekosaur> Haskell syntax is actually fairly "regular" (in the sense that pretty much everything has the same form: <declaration> [where <definitions>])
2022-10-01 15:12:21 +0200 <hpc> fr33domlover[m]: same reason things get recomputed in any other language - it's only in the function body and the references to it all go away
2022-10-01 15:12:36 +0200 <ski> fr33domlover[m] : each time you call the (inner) lambda (potentially getting a new value for `y'), `expensive x computation' will be evaluated anew
2022-10-01 15:13:29 +0200 <ski> there is no automatic memoizing
2022-10-01 15:13:51 +0200 <ski> HP-UX : feel free to ask any questions here
2022-10-01 15:16:19 +0200 <fr33domlover[m]> ski: but if the expensive computation is pure and doesn't depend on y (e.g. JSON-encoding x), wouldn't the compiler want to optimize by memoizing the computation result just in case the outer lambda is used again (even with a different y)?
2022-10-01 15:16:20 +0200causal(~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0e) (Quit: WeeChat 3.6)
2022-10-01 15:16:51 +0200 <geekosaur> you end up wasting a lot of memory that way
2022-10-01 15:16:52 +0200 <ski> that could cause space leaks
2022-10-01 15:17:15 +0200 <probie> geekosaur: I think it was added around GHC 4 (or something of that vintage), but my memory might be playing tricks on me
2022-10-01 15:17:39 +0200 <geekosaur> `reset CAFs` was a lot more recent. maybe we're talking about different things
2022-10-01 15:18:29 +0200 <ski> (and you mean "sharing" or maybe "caching", not "memoizing". memoizing refers to having a function remember computed input-output associations, for use in later calls, checking if input has been memoized for the function already)
2022-10-01 15:19:44 +0200 <fr33domlover[m]> ski, geekosaur : And if I rewrite `f` as `\x -> let j = encodeJSON x in \ y -> ...` why does it then cache the result of computing `j`? It seems like magic, but maybe means it only happens when I intend and not automatically in the original version of `f`?
2022-10-01 15:19:51 +0200 <geekosaur> actually hm, ISTR the one I'm thinking of was related to ghci
2022-10-01 15:20:27 +0200 <geekosaur> in general if you `let` something the compiler will take it as a request for sharing
2022-10-01 15:20:43 +0200waldo(~waldo@user/waldo)
2022-10-01 15:21:12 +0200 <geekosaur> (but only a request. depending on how it modifies the code, that request may be ignored)
2022-10-01 15:21:31 +0200 <geekosaur> that said, lets can be lifted, which increases sharing
2022-10-01 15:21:57 +0200 <ski> fr33domlover[m] : it only caches across a single invocation `f x0'. iow if you do `g = f x0' or `map (f x0)' or the like. if you later do `f x1' (whether `x1' is equivalent or even pointer-equal to `x0' or not), then that will still recompute `encodeJSON x1'
2022-10-01 15:25:27 +0200 <fr33domlover[m]> ski: So if I define `g = f x0`, it will memoize/share the result of `encodeJSON x0`? (and in the non-let version of `f` it won't?) That's good enough for me, was going to do the `g = f x0` thing ^\_^
2022-10-01 15:25:41 +0200 <ski> yes
2022-10-01 15:26:54 +0200 <ski> (but also passing `f x0' as an argument, e.g. to `map' or whatever should be fine)
2022-10-01 15:27:38 +0200 <fr33domlover[m]> Thank you :) Feels a bit weird to insert that peculiar `let` into the code and then have to add a comment to explain, because it's not clear that that's the purpose of it. But I suppose I can instead use meaningful function names to make it clear that there's a "prepare" step and "use" step, meant to allow the memoization
2022-10-01 15:28:04 +0200 <ski> of course, you could also probably use `where' as i indicated above
2022-10-01 15:28:16 +0200 <fr33domlover[m]> Years of haskelling, and somehow it wasn't clear to me until now "^_^
2022-10-01 15:29:14 +0200 <ski> this pattern is sometimes known as "serious (as opposed to trivial) currying", or "run-time compilation"
2022-10-01 15:31:14 +0200 <ski> (a typical example would be converting a description of a regular expression into a function that employs an efficient state-based algorithm. so you want to translate from the description to the state machine, before the function accepts an input string to match on)
2022-10-01 15:32:39 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 15:37:26 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
2022-10-01 15:47:13 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
2022-10-01 15:47:34 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-10-01 15:48:50 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2022-10-01 15:50:47 +0200jakalx(~jakalx@base.jakalx.net) ()
2022-10-01 15:55:24 +0200sinity(~ezo.dev@193.200.83.122)
2022-10-01 16:06:35 +0200lyle(~lyle@104.246.145.85) (Ping timeout: 250 seconds)
2022-10-01 16:12:24 +0200Guest|47(~Guest|47@1.156.128.208)
2022-10-01 16:12:44 +0200Guest|47(~Guest|47@1.156.128.208) (Client Quit)
2022-10-01 16:15:43 +0200lyle(~lyle@104.246.145.85)
2022-10-01 16:16:46 +0200k8yun(~k8yun@user/k8yun)
2022-10-01 16:22:38 +0200nate3(~nate@98.45.169.16)
2022-10-01 16:22:45 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 16:25:11 +0200kenran(~user@user/kenran)
2022-10-01 16:27:26 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-01 16:28:03 +0200nate3(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-10-01 16:28:41 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-10-01 16:29:35 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-10-01 16:30:37 +0200razetime(~quassel@117.254.34.169) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-10-01 16:33:53 +0200waldo(~waldo@user/waldo) (Ping timeout: 250 seconds)
2022-10-01 16:37:46 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
2022-10-01 16:41:41 +0200shapr(~user@68.54.166.125) (Ping timeout: 244 seconds)
2022-10-01 16:41:51 +0200jakalx(~jakalx@base.jakalx.net)
2022-10-01 16:42:51 +0200lyle(~lyle@104.246.145.85) (Ping timeout: 268 seconds)
2022-10-01 16:43:26 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-10-01 16:48:24 +0200ellensol_(~ellen@178-78-210-152.customers.ownit.se) (Ping timeout: 264 seconds)
2022-10-01 16:50:04 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 16:51:49 +0200kenran`(~user@user/kenran)
2022-10-01 16:54:07 +0200k8yun(~k8yun@user/k8yun) (Quit: Leaving)
2022-10-01 16:54:33 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
2022-10-01 16:55:39 +0200lyle(~lyle@104.246.145.85)
2022-10-01 16:57:16 +0200kenran`(~user@user/kenran) (Remote host closed the connection)
2022-10-01 16:59:46 +0200lyle(~lyle@104.246.145.85) (Ping timeout: 244 seconds)
2022-10-01 16:59:53 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 17:02:14 +0200nate3(~nate@98.45.169.16)
2022-10-01 17:04:30 +0200Guest2951(~Guest29@nmal-25-b2-v4wan-166405-cust169.vm24.cable.virginm.net)
2022-10-01 17:04:43 +0200Guest2951(~Guest29@nmal-25-b2-v4wan-166405-cust169.vm24.cable.virginm.net) ()
2022-10-01 17:08:32 +0200mvk(~mvk@2607:fea8:5ce3:8500::778c)
2022-10-01 17:09:21 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com)
2022-10-01 17:09:28 +0200waldo(~waldo@user/waldo)
2022-10-01 17:11:52 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-10-01 17:12:19 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 258 seconds)
2022-10-01 17:13:09 +0200ddellacosta(~ddellacos@89.45.224.100)
2022-10-01 17:14:09 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-10-01 17:15:08 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 17:16:32 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
2022-10-01 17:16:58 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2022-10-01 17:17:39 +0200lyle(~lyle@104.246.145.85)
2022-10-01 17:24:44 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2022-10-01 17:25:23 +0200 <fr33domlover[m]> Cool, the example really helps :)
2022-10-01 17:26:09 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2022-10-01 17:26:48 +0200ddellacosta(~ddellacos@89.45.224.100) (Ping timeout: 264 seconds)
2022-10-01 17:31:57 +0200lyle(~lyle@104.246.145.85) (Ping timeout: 252 seconds)
2022-10-01 17:38:51 +0200cdimitroulas(~cdimitrou@194.32.120.166) (Ping timeout: 265 seconds)
2022-10-01 17:42:14 +0200bb010g(~bb010g@2001:470:69fc:105::9a5)
2022-10-01 17:46:02 +0200kenran(~user@user/kenran) (Remote host closed the connection)
2022-10-01 17:49:27 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-01 17:51:17 +0200jero98772(~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c)
2022-10-01 17:51:36 +0200jespada_(~jespada@cpc121060-nmal24-2-0-cust249.19-2.cable.virginm.net) (Ping timeout: 260 seconds)
2022-10-01 17:51:47 +0200mmhat(~mmh@p200300f1c7062333ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.6)
2022-10-01 17:52:58 +0200kimjetwav(~user@2607:fea8:235e:b600:fded:756d:e09c:6c2d) (Remote host closed the connection)
2022-10-01 17:54:58 +0200jespada(~jespada@nmal-24-b2-v4wan-166357-cust1764.vm24.cable.virginm.net)
2022-10-01 18:00:07 +0200Bulby[m](~bulbyvrma@2001:470:69fc:105::1:fe0a) (Quit: You have been kicked for being idle)
2022-10-01 18:00:33 +0200mixphix(~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-01 18:03:59 +0200nate3(~nate@98.45.169.16) (Ping timeout: 265 seconds)
2022-10-01 18:05:12 +0200 <hololeap> ski, that's an interesting question. it doesn't matter to me in this case but I'm interested in what each would look like.
2022-10-01 18:06:52 +0200__monty__(~toonn@user/toonn)
2022-10-01 18:07:22 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 265 seconds)
2022-10-01 18:07:45 +0200nitr0gen(~nitr0gen@103.235.2.145)
2022-10-01 18:21:43 +0200cyphase(~cyphase@user/cyphase) (Ping timeout: 246 seconds)
2022-10-01 18:23:05 +0200johnw(~johnw@2600:1700:cf00:db0:dd60:bc61:a3c9:2dac) (Ping timeout: 250 seconds)
2022-10-01 18:23:36 +0200cyphase(~cyphase@user/cyphase)
2022-10-01 18:24:24 +0200jargon(~jargon@184.101.88.60)
2022-10-01 18:29:07 +0200nitr0gen(~nitr0gen@103.235.2.145) (Ping timeout: 265 seconds)
2022-10-01 18:29:34 +0200nitr0gen(~nitr0gen@2409:4040:e8f:1ec2:6a7:469b:8f63:5372)
2022-10-01 18:36:07 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:509f:aac5:1bc5:5910)
2022-10-01 18:38:57 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
2022-10-01 18:40:19 +0200kdaishi(~Thunderbi@mobile-access-5672fd-223.dhcp.inet.fi)
2022-10-01 18:40:58 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2022-10-01 18:41:37 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2022-10-01 18:43:36 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 264 seconds)
2022-10-01 18:46:35 +0200jinsun__(~jinsun@user/jinsun)
2022-10-01 18:46:35 +0200jinsunGuest4802
2022-10-01 18:46:35 +0200jinsun__jinsun
2022-10-01 18:48:04 +0200jinsun__(~jinsun@user/jinsun)
2022-10-01 18:48:04 +0200jinsunGuest8606
2022-10-01 18:48:04 +0200jinsun__jinsun
2022-10-01 18:50:20 +0200Guest4802(~jinsun@user/jinsun) (Ping timeout: 244 seconds)
2022-10-01 18:50:51 +0200Guest8606(~jinsun@user/jinsun) (Ping timeout: 244 seconds)
2022-10-01 18:55:13 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Quit: leaving)
2022-10-01 18:55:55 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 18:56:15 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2022-10-01 18:56:24 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Client Quit)
2022-10-01 18:57:10 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2022-10-01 18:58:28 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Client Quit)
2022-10-01 18:59:05 +0200acidjnk(~acidjnk@p200300d6e7137a32f90b84488ac8cf0c.dip0.t-ipconnect.de)
2022-10-01 19:02:56 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2022-10-01 19:03:03 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Client Quit)
2022-10-01 19:03:26 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 265 seconds)
2022-10-01 19:03:28 +0200 <EvanR> what is the rationale behind Show1
2022-10-01 19:03:28 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2022-10-01 19:03:49 +0200 <EvanR> I mean, intuitively, it involves being able to show * -> *'s, but on the surface that makes no sense
2022-10-01 19:04:00 +0200 <EvanR> to me
2022-10-01 19:05:03 +0200 <geekosaur> I understand it as more giving you a Show for an f a when you have only the f (with Show a being a prerequisite)
2022-10-01 19:06:49 +0200kdaishi(~Thunderbi@mobile-access-5672fd-223.dhcp.inet.fi) (Ping timeout: 265 seconds)
2022-10-01 19:06:51 +0200 <geekosaur> or, if you prefer, an assertion that this f does not prevent showing f a
2022-10-01 19:07:16 +0200 <EvanR> Show1 f => Show (Fix f) ...
2022-10-01 19:07:19 +0200 <EvanR> instance
2022-10-01 19:07:34 +0200 <EvanR> so the a is.....
2022-10-01 19:07:45 +0200 <geekosaur> hrm
2022-10-01 19:07:57 +0200geekosaurdoesn't understand Fix enough to say there
2022-10-01 19:09:05 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-10-01 19:09:40 +0200 <geekosaur> but it does seem to fit what I said, presuming Fix f can do something useful in some context
2022-10-01 19:10:14 +0200 <EvanR> somehow it makes sense now. It lets you show * -> *'s
2022-10-01 19:10:39 +0200 <EvanR> now about deriving it
2022-10-01 19:10:53 +0200dmwit(~dmwit@2600:4040:264a:df00:422e:910b:6593:d3fb)
2022-10-01 19:12:15 +0200 <dmwit> Does anybody know what (if anything) I have to be careful about when passing hasktorch Tensors between threads?
2022-10-01 19:14:18 +0200jakalx(~jakalx@base.jakalx.net)
2022-10-01 19:15:42 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 19:19:20 +0200Topsi(~Topsi@dyndsl-095-033-018-041.ewe-ip-backbone.de)
2022-10-01 19:21:50 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Quit: Lost terminal)
2022-10-01 19:22:43 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Quit: restarting computer, will come back soon)
2022-10-01 19:23:50 +0200dmwit(~dmwit@2600:4040:264a:df00:422e:910b:6593:d3fb) (Ping timeout: 252 seconds)
2022-10-01 19:28:12 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2022-10-01 19:32:55 +0200Midjak(~Midjak@82.66.147.146) (Ping timeout: 265 seconds)
2022-10-01 19:35:11 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-10-01 19:36:29 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-10-01 19:37:06 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-10-01 19:38:13 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2022-10-01 19:43:44 +0200 <EvanR> can't derive instance of Show1, it's not a stock class (Eq, Show, etc). Try enabling DeriveAnyClass
2022-10-01 19:44:30 +0200 <EvanR> it produces an instance with no liftShowsPrec what's the point
2022-10-01 19:44:53 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 258 seconds)
2022-10-01 19:45:06 +0200jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2022-10-01 19:45:33 +0200 <geekosaur> I think you have to go via Generics to get any of the *1 classes
2022-10-01 19:45:49 +0200 <geekosaur> although there might be a proposal for some of them
2022-10-01 19:46:11 +0200jinsun(~jinsun@user/jinsun)
2022-10-01 19:49:41 +0200 <geekosaur> meh, don't see it. unless it's been accepted but not implemented yet
2022-10-01 19:51:57 +0200leungbk(~user@2603-8000-1201-2dd2-d72d-d70e-f2fb-2233.res6.spectrum.com)
2022-10-01 19:56:45 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2022-10-01 19:59:49 +0200 <geekosaur> don't see it there either, sigh
2022-10-01 20:01:23 +0200mrianbloom(uid350277@id-350277.ilkley.irccloud.com) (Quit: Connection closed for inactivity)
2022-10-01 20:07:56 +0200 <EvanR> by the time I write the Show1 instance, it will be ready xD
2022-10-01 20:08:41 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-01 20:11:50 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:509f:aac5:1bc5:5910) (Remote host closed the connection)
2022-10-01 20:13:57 +0200archsinner(~archsinne@2603-9000-8708-30f2-0000-0000-0000-070f.inf6.spectrum.com)
2022-10-01 20:14:59 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 268 seconds)
2022-10-01 20:15:51 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:509f:aac5:1bc5:5910)
2022-10-01 20:19:57 +0200rockymarine(~rocky@user/rockymarine)
2022-10-01 20:29:28 +0200nitr0gen(~nitr0gen@2409:4040:e8f:1ec2:6a7:469b:8f63:5372) (Ping timeout: 246 seconds)
2022-10-01 20:34:24 +0200nitr0gen(~nitr0gen@103.235.2.145)
2022-10-01 20:35:32 +0200jinsunGuest7186
2022-10-01 20:35:32 +0200jinsun__(~jinsun@user/jinsun)
2022-10-01 20:35:32 +0200Guest7186(~jinsun@user/jinsun) (Killed (molybdenum.libera.chat (Nickname regained by services)))
2022-10-01 20:35:32 +0200jinsun__jinsun
2022-10-01 20:43:07 +0200jinsun__(~jinsun@user/jinsun)
2022-10-01 20:43:07 +0200jinsunGuest9672
2022-10-01 20:43:07 +0200jinsun__jinsun
2022-10-01 20:43:32 +0200justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.5)
2022-10-01 20:44:00 +0200Guest9672(~jinsun@user/jinsun) (Ping timeout: 244 seconds)
2022-10-01 20:44:00 +0200leungbk(~user@2603-8000-1201-2dd2-d72d-d70e-f2fb-2233.res6.spectrum.com) (Ping timeout: 244 seconds)
2022-10-01 20:45:49 +0200leungbk(~user@cpe-142-129-149-172.socal.res.rr.com)
2022-10-01 20:47:50 +0200nitr0gen(~nitr0gen@103.235.2.145) (Ping timeout: 265 seconds)
2022-10-01 20:48:36 +0200nitr0gen(~nitr0gen@2409:4040:e8f:1ec2:495b:6751:e4ab:2105)
2022-10-01 20:53:21 +0200edrx(~Eduardo@2804:18:580b:d1fe:c1d0:9f8d:e583:678c)
2022-10-01 20:53:55 +0200cyphase(~cyphase@user/cyphase) (Ping timeout: 248 seconds)
2022-10-01 20:55:24 +0200cyphase(~cyphase@user/cyphase)
2022-10-01 20:56:53 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Quit: Be back in a sec)
2022-10-01 20:57:59 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 265 seconds)
2022-10-01 20:58:33 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-10-01 20:58:41 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2022-10-01 20:59:58 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Client Quit)
2022-10-01 21:00:41 +0200docter_d(~docter_d@2001:9e8:33e6:2e00:2dee:1861:4e3d:6a1d)
2022-10-01 21:00:54 +0200sinity(~ezo.dev@193.200.83.122) ()
2022-10-01 21:01:20 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2022-10-01 21:09:03 +0200 <edrx> hi all! I am trying to understand classes, instances, and inheritance, and I wrote this to have a minimalistic example to work on:
2022-10-01 21:09:05 +0200 <edrx> http://angg.twu.net/HASKELL/Classes1.hs.html#class
2022-10-01 21:09:43 +0200 <edrx> when I try ":load Classes1.hs" GHC yields this error: `m1' is not a (visible) method of class `C2'
2022-10-01 21:10:43 +0200 <edrx> does that mean that if I make m1 visible in C2 I can override it? how do I make it visible?
2022-10-01 21:11:07 +0200 <geekosaur> you're trying to use typeclasses as OOP. they aren't
2022-10-01 21:11:20 +0200 <edrx> aaah
2022-10-01 21:11:41 +0200 <geekosaur> % :info Ord
2022-10-01 21:11:41 +0200 <yahb2> type Ord :: * -> Constraint ; class Eq a => Ord a where ; compare :: a -> a -> Ordering ; (<) :: a -> a -> Bool ; (<=) :: a -> a -> Bool ; (>) :: a -> a -> Bool ; (>=) :: a -> a -> Bool ;...
2022-10-01 21:11:47 +0200 <edrx> yes, I don't have a good mental model for them yet... I'm trying to build it
2022-10-01 21:11:51 +0200 <hololeap> can I pull in a library module as well as Main.hs when using runhaskell?
2022-10-01 21:13:58 +0200 <hololeap> I'm having trouble with getting NoBuffering to stick since I split my Main.hs into an executable and a library, controlled by cabal
2022-10-01 21:14:12 +0200raym(~aritra@user/raym) (Ping timeout: 264 seconds)
2022-10-01 21:14:19 +0200 <hololeap> so I would like to try again with runhaskell, but it needs to know about my library module
2022-10-01 21:14:25 +0200 <geekosaur> https://paste.tomsmeding.com/WReEoZJb seems to work
2022-10-01 21:15:32 +0200 <geekosaur> if it's a compiled library then you may need to use --ghc-arg=--package --ghc-arg=pkgnamehere
2022-10-01 21:16:30 +0200 <geekosaur> or if you;re using a cabal library then cabal exec runhaskell …
2022-10-01 21:16:56 +0200 <hololeap> ok, that works, great
2022-10-01 21:18:06 +0200cyphase(~cyphase@user/cyphase) (Ping timeout: 244 seconds)
2022-10-01 21:18:22 +0200 <geekosaur> edrx, so a "superclass" is better thought of as a prerequisite. above I showed you (part of) how Ord is declared. it has Eq as a prerequisite, so it can derive other comparison operators using (==), (/=), and either compare or (<)
2022-10-01 21:18:58 +0200 <geekosaur> you can't "override" things in the prerequisite, which is one reason the "superclass" terminology is bad
2022-10-01 21:21:53 +0200 <geekosaur> it's more correct to say that you can *use* things from the prerequisite. you can't redefine them, though.
2022-10-01 21:22:08 +0200 <hololeap> hm, yeah there is no buffering when I use runhaskell, but there is when the bin is compiled. I have `forM_ [stdout,stderr] (`hSetBuffering` NoBuffering)` at the top of my main function
2022-10-01 21:22:44 +0200 <geekosaur> do you want to include stdin there?
2022-10-01 21:23:10 +0200cyphase(~cyphase@user/cyphase)
2022-10-01 21:23:19 +0200coot(~coot@213.134.165.79)
2022-10-01 21:23:31 +0200 <c_wraith> I thought stderr defaulted to no buffering, too
2022-10-01 21:24:21 +0200 <geekosaur> edrx, one place that demonstrates why treating typeclasses as OOP is bad: when we added Applicative as a prerequisite for Monad, many programs backformed it by saying `instance Applicative MyMonad where { pure = return; (<*>) = ap }`
2022-10-01 21:24:49 +0200 <geekosaur> `return` is part of the Monad class, `ap` is defined for Monad instead of Applicative
2022-10-01 21:25:01 +0200 <geekosaur> so it works backwards from what you'd expect from OOP
2022-10-01 21:25:33 +0200 <geekosaur> we're defining the so-called "superclass" based on the "subclass" instead of the other way around!
2022-10-01 21:26:03 +0200 <edrx> geekosaur: aah, I had just stumbled on that by googling... https://itecnote.com/tecnote/haskell-defining-a-new-monad-in-haskell-raises-no-instance-for-applic…
2022-10-01 21:27:34 +0200kenran(~user@user/kenran)
2022-10-01 21:27:54 +0200 <hololeap> geekosaur: no, it's just supposed to use sourceProcessFromStreams from conduit-extra to move stdout/stderr from a subprocess directly to stdout/stderr for the main process
2022-10-01 21:27:55 +0200 <hololeap> http://sprunge.us/Ht4OLD
2022-10-01 21:28:14 +0200 <geekosaur> this does not, by the way, mean that the relationship is backwards; it means that it's not truly a superclass-subclass relationship but something entirely different
2022-10-01 21:28:44 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-10-01 21:29:17 +0200 <hololeap> so you can run a process that displays a real-time percentage or something and have it displayed in real-time through the haskell binary
2022-10-01 21:29:43 +0200 <geekosaur> did you also unbuffer the process's output?
2022-10-01 21:29:48 +0200 <hololeap> the problem is, when I compile the binary, it waits until the subprocess completes before showing any of the stdout/stderr
2022-10-01 21:30:01 +0200raym(~aritra@user/raym)
2022-10-01 21:30:27 +0200 <hololeap> hm, no I'm not sure where to get a reference to its handle if I'm using sourceProcessFromStreams, but that may be the answer
2022-10-01 21:30:41 +0200 <geekosaur> (note that this does not mean calling hSetBuffering on the handle for the other process! it makes its own decision as to buffering, so you have to use GNU stdbuf or use ptys instead of pipes or etc.)
2022-10-01 21:31:07 +0200kenran`(~user@user/kenran)
2022-10-01 21:31:09 +0200 <hololeap> oh, well it works correctly when I run it with `cabal exec runhaskell`
2022-10-01 21:31:36 +0200 <geekosaur> that doesn't really sound like it'd affect the other process
2022-10-01 21:32:06 +0200 <geekosaur> the forM_ looks correct to me so I don't know why it wouldn't be taking effect
2022-10-01 21:32:26 +0200 <geekosaur> unless something does output before you run it in which case, well, oops
2022-10-01 21:32:38 +0200 <hololeap> is there a flag to cabal/ghc to use the same buffering strategy that runhaskell uses?
2022-10-01 21:32:53 +0200 <geekosaur> I don't think so
2022-10-01 21:33:32 +0200 <hololeap> this might have something to do with whatever conduit is doing behind the scenes
2022-10-01 21:33:57 +0200 <edrx> well, I was trying to build a minimal example of classes and instances because the standard examples - the ones from the Prelude - come with tons of extras, like laws...
2022-10-01 21:34:59 +0200 <geekosaur> we prefer the ones with laws, yes. but that's just preference (try to figure out laws for Num and friends sometime)
2022-10-01 21:36:14 +0200 <geekosaur> I think the usual recommendation is to study Functor and replicate it without looking at the source
2022-10-01 21:37:16 +0200 <geekosaur> in practice, a class declaration declares a record that you can't see, and an instance declaration specifies a possible value for that record based on the type(s) the instance is declared for
2022-10-01 21:38:10 +0200 <geekosaur> when you have a function with a constraint `(Foo a) => …`, Haskell quietly passes the appropriate record value based on what type `a` represents to that function
2022-10-01 21:38:56 +0200fluxit-(~fluxit@techsmix.net) (Quit: Bye!)
2022-10-01 21:39:08 +0200 <geekosaur> when a class has a so-called "superclass", it means the instance record will (also) contain another instance record representing the appropriate "superclass" instance record
2022-10-01 21:39:51 +0200 <geekosaur> this is why you can't redefine "superclass" methods in a "subclass": the instance can only pass on the "superclass" record, it can't modify it
2022-10-01 21:40:26 +0200 <geekosaur> (I am describing how ghc does it. Some other Haskell compiler might do it differently, but at the moment the only real Haskell compiler is ghc.)
2022-10-01 21:40:30 +0200kenran`(~user@user/kenran) (Remote host closed the connection)
2022-10-01 21:40:50 +0200nitr0gen(~nitr0gen@2409:4040:e8f:1ec2:495b:6751:e4ab:2105) (Ping timeout: 244 seconds)
2022-10-01 21:41:10 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
2022-10-01 21:41:21 +0200nitr0gen(~nitr0gen@103.235.2.145)
2022-10-01 21:41:34 +0200 <geekosaur> technically all it should have to pass is a type witness (that is, proof of the type it's being used with), but the simplest such witness is just the dictionary for that type
2022-10-01 21:42:05 +0200 <kenran> geekosaur: thanks for the advice about not using named pipes and going the socket route instead. Just had to add one different effect interpreter, replace the read/write with socket operations and everthing immediately worked. No weird bugs anymore :)
2022-10-01 21:42:19 +0200 <geekosaur> np
2022-10-01 21:42:54 +0200 <kenran> I'd still love to know what's wrong with named pipes on macOS in Haskell, but alas... I can always dig up the program code and try it again another time.
2022-10-01 21:43:23 +0200 <edrx> is it common to have a class that defines the types of some methods but not default values for those methods? I tried to do that in my minimal example and got a warning - or error? - that said that I had to use a pragma if I really wanted to do that...
2022-10-01 21:43:34 +0200 <geekosaur> I'd be interested in knowing if FreeBSD has the same issue, since much of that code was taken from FreeBSD
2022-10-01 21:44:20 +0200 <geekosaur> edrx, usually we don't specify defaults, in fact. Can you show an example of a declaration that raises an error?
2022-10-01 21:44:24 +0200rockymarine(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-01 21:44:46 +0200 <edrx> sure, one min
2022-10-01 21:44:57 +0200docter_d(~docter_d@2001:9e8:33e6:2e00:2dee:1861:4e3d:6a1d) (Ping timeout: 268 seconds)
2022-10-01 21:45:10 +0200 <kenran> geekosaur: oh, was it? Yeah, that'd be interesting as well. One more datapoint I have is that it seems to happen on x86 and arm macOS.
2022-10-01 21:45:52 +0200 <geekosaur> that doesn't surprise me, the implementation of named pipes wouldn't be platform dependent beyond basics like page size which is probably the same for both
2022-10-01 21:47:43 +0200acidjnk_new(~acidjnk@p200300d6e7137a32a8f89e31b171299c.dip0.t-ipconnect.de)
2022-10-01 21:47:48 +0200acidjnk(~acidjnk@p200300d6e7137a32f90b84488ac8cf0c.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2022-10-01 21:49:52 +0200 <EvanR> edrx, often when you're thinking about default values, you're thinking about records of implementation/configuration instead of type classes
2022-10-01 21:50:15 +0200fef(~thedawn@user/thedawn)
2022-10-01 21:50:28 +0200 <EvanR> where the record type defines the interface and particular record values define the implementation, and can be mixed and matched for purposes
2022-10-01 21:50:38 +0200 <edrx> geekosaur: hm, I modified my test program and now I need to fix something else first... but your hint of "think that each type has a dictionary" has made many things clearer...
2022-10-01 21:50:39 +0200 <EvanR> then you can create a default record and customize it
2022-10-01 21:54:34 +0200tired(~tired@user/tired) (Quit: /)
2022-10-01 21:55:13 +0200tired(~tired@user/tired)
2022-10-01 21:56:02 +0200 <edrx> EvanR: you mean records in this sense? https://www.haskell.org/definition/haskell2010.pdf#page=46
2022-10-01 21:57:00 +0200 <edrx> (that looks like a good way to think about dictionaries of methods, btw)
2022-10-01 21:57:21 +0200 <EvanR> data Employee = Employee { name :: String, salary :: Int }
2022-10-01 21:57:27 +0200 <edrx> yep
2022-10-01 21:58:01 +0200 <EvanR> data Driver m = Driver { putChar :: Char -> m (), getChar :: m Char }
2022-10-01 22:01:14 +0200nate3(~nate@98.45.169.16)
2022-10-01 22:01:26 +0200pavonia(~user@user/siracusa)
2022-10-01 22:02:34 +0200anon00(~anon@46.102.157.245) (Quit: Konversation terminated!)
2022-10-01 22:04:03 +0200nitr0gen(~nitr0gen@103.235.2.145) (Quit: Quit)
2022-10-01 22:04:38 +0200 <geekosaur> I think it's actually a tuple in implementation, but you can think of a tuple as an anonymous record
2022-10-01 22:05:10 +0200 <geekosaur> ("anonymous product type" if we're being all theoretical about it)
2022-10-01 22:06:30 +0200tired(~tired@user/tired) (Quit: /)
2022-10-01 22:06:31 +0200nate3(~nate@98.45.169.16) (Ping timeout: 260 seconds)
2022-10-01 22:07:27 +0200 <edrx> =)
2022-10-01 22:07:54 +0200tired(~tired@user/tired)
2022-10-01 22:09:05 +0200Midjak(~Midjak@82.66.147.146)
2022-10-01 22:09:13 +0200ddellacosta(~ddellacos@143.244.47.90)
2022-10-01 22:10:37 +0200 <edrx> btw, this video about Core Haskell - <http://www.youtube.com/watch?v=fty9QL4aSRc>, "Vladislav Zavialov - Haskell to Core: Understanding Haskell Features Through Their Desugaring" has helped me a LOT
2022-10-01 22:11:57 +0200 <edrx> it explains classes starting on 20:12. I need to watch that part again
2022-10-01 22:12:04 +0200 <geekosaur> yes, it can be useful to trace a Haskell program through the desugarer to Core and then down to STG (which is even simpler)
2022-10-01 22:12:18 +0200 <edrx> what is STG?
2022-10-01 22:13:28 +0200 <geekosaur> it's the graph representing a Haskell program, which is simplified at runtime by the RTS's graph reduction machine
2022-10-01 22:13:43 +0200 <edrx> ok!
2022-10-01 22:13:45 +0200 <geekosaur> which is the simplest way to implement lazy evaluation
2022-10-01 22:13:55 +0200 <geekosaur> you can look "graph reduction" up on wikipedia
2022-10-01 22:14:34 +0200 <geekosaur> I do *not* recommend reading the STG papers for this; they're less about the why or the high level how than about the low level details of efficient graph reduction on a CPU
2022-10-01 22:16:51 +0200archsinner(~archsinne@2603-9000-8708-30f2-0000-0000-0000-070f.inf6.spectrum.com) (Quit: archsinner)
2022-10-01 22:17:09 +0200 <sclv> re graph reduction this video may be of interest as well https://www.youtube.com/watch?v=UPy7TXgrK1A
2022-10-01 22:17:15 +0200waldo(~waldo@user/waldo) (Quit: quit)
2022-10-01 22:17:25 +0200 <geekosaur> anyway the STG representation of a program is basically case and let
2022-10-01 22:17:40 +0200 <geekosaur> everything else has gone away
2022-10-01 22:17:54 +0200archsinner(~archsinne@35.136.124.156)
2022-10-01 22:18:16 +0200 <geekosaur> (or has become a value)
2022-10-01 22:18:59 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
2022-10-01 22:19:31 +0200 <edrx> sclv: thanks!
2022-10-01 22:21:08 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2022-10-01 22:22:02 +0200 <geekosaur> there's also
2022-10-01 22:22:06 +0200 <geekosaur> @hackage stgi
2022-10-01 22:22:06 +0200 <lambdabot> https://hackage.haskell.org/package/stgi
2022-10-01 22:22:17 +0200 <edrx> I was going to mention that! https://wiki.haskell.org/Ministg
2022-10-01 22:22:37 +0200 <geekosaur> which you can use to visually trace reduction of a graph which is a simplified form of the one ghc uses
2022-10-01 22:22:42 +0200 <edrx> it looks nice, but it is still a bit above my level...
2022-10-01 22:22:51 +0200 <edrx> (or a lot above =/)
2022-10-01 22:22:51 +0200leungbk(~user@cpe-142-129-149-172.socal.res.rr.com) (Ping timeout: 260 seconds)
2022-10-01 22:23:36 +0200 <geekosaur> yeh, at the very least make sure you understand the Core level, then start poking at how the Core representation becomes the STG representation
2022-10-01 22:23:50 +0200 <geekosaur> then you can use stgi to see how that is evaluated
2022-10-01 22:24:21 +0200 <geekosaur> sadly it's not quite complete enough that someone could hook it into ghc and produce a visual trace of actual ghc code
2022-10-01 22:31:15 +0200fef(~thedawn@user/thedawn) (Ping timeout: 258 seconds)
2022-10-01 22:31:37 +0200 <edrx> gosh =( this - https://0x0.st/o4DR.txt - gives me this error: No instance for (C1 DD2) arising from the superclasses of an instance declaration in the instance declaration for `C2 DD2'
2022-10-01 22:32:54 +0200 <edrx> building a good mental model of how classes work is turning out much harder than I expected ☹️
2022-10-01 22:33:12 +0200 <geekosaur> remember that I called it a prerequisite instead of a superclass
2022-10-01 22:33:36 +0200 <geekosaur> you have to declare the instance for C1 before you can declare the instance for C2
2022-10-01 22:33:44 +0200 <edrx> let me try
2022-10-01 22:33:46 +0200michalz(~michalz@185.246.207.203)
2022-10-01 22:33:48 +0200 <geekosaur> it does *not* do that for you
2022-10-01 22:34:10 +0200archsinner(~archsinne@35.136.124.156) (Quit: archsinner)
2022-10-01 22:34:59 +0200 <edrx> sorry, can you explain? my "instance C1 DD1" is two lines above "instance C2 DD2"...
2022-10-01 22:35:08 +0200archsinner(~archsinne@2603-9000-8708-30f2-0000-0000-0000-070f.inf6.spectrum.com)
2022-10-01 22:35:30 +0200 <geekosaur> but do you have an `instance C1 DD2`?
2022-10-01 22:35:39 +0200 <edrx> aaah! trying!
2022-10-01 22:36:07 +0200 <edrx> works! thanks! =)
2022-10-01 22:37:59 +0200 <edrx> wait =(
2022-10-01 22:38:06 +0200 <edrx> if I need these two lines:
2022-10-01 22:38:08 +0200 <edrx> instance C1 DD2
2022-10-01 22:38:08 +0200 <edrx> instance C2 DD2
2022-10-01 22:38:36 +0200 <edrx> then what is the role of the "C1 a =>" in "class C1 a => C2 a where ..."?
2022-10-01 22:39:33 +0200archsinner(~archsinne@2603-9000-8708-30f2-0000-0000-0000-070f.inf6.spectrum.com) (Client Quit)
2022-10-01 22:39:34 +0200 <geekosaur> "you must have a C1 instance in order to have a C2 instance"
2022-10-01 22:39:49 +0200 <geekosaur> which is why I called it prerequisite instead of superclass
2022-10-01 22:39:58 +0200 <edrx> aaaaahhhhh!!!!
2022-10-01 22:42:16 +0200 <geekosaur> I'll refer you back tyo the Ord class I showed you: in order to do Ordering operations on a type, you first need to be able to do equality (Eq typeclass) on it
2022-10-01 22:42:42 +0200 <geekosaur> this is different from OOP notions of "superclass", which is why I call it "prerequisite" instead
2022-10-01 22:43:12 +0200 <edrx> yes, now it's clear!
2022-10-01 22:47:15 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2022-10-01 22:48:11 +0200coot(~coot@213.134.165.79) (Quit: coot)
2022-10-01 22:48:55 +0200 <edrx> is there a syntax for joining "instance C1 DD2" and "instance C2 DD2" into a single "instance" declaration? is the "where" after it going to be able to define methods for both C1 and C2?
2022-10-01 22:49:11 +0200 <geekosaur> there is not and it cannot
2022-10-01 22:49:43 +0200 <edrx> ok, makes some sense
2022-10-01 22:49:59 +0200 <geekosaur> we don't normally relate things that way
2022-10-01 22:50:02 +0200 <edrx> it will make more sense after I understand more details, I think
2022-10-01 22:51:16 +0200 <ski> "you have to declare the instance for C1 before you can declare the instance for C2" -- well, you can actually do it syntactically later, in the source (because all declarations in a module can be mutually recursive, or out-of-order). but conceptually, it still holds that you need to declare the prerequisite/"superclass" instances, before you'll be allowed to declare the instance for the particular class
2022-10-01 22:51:16 +0200 <geekosaur> Applicative to Monad is close, but even there there's an exception: ZipLists are Appplicative but not Monad. but otherwise it *would* be convenient to combine them because not only do you need Applicative to get Monad, but they have to be related in a specific way to work properly
2022-10-01 22:52:03 +0200 <monochrom> EvanR: You may like to know that you can either go "instance Show1 f => Show (Fix f)" or turn on QuantifiedConstraints, UndecidableInstances and go "instance (forall a. Show a => Show (f a)) => Show (Fix f)"
2022-10-01 22:52:51 +0200 <EvanR> yeah the Show1 f is what I'm still working on
2022-10-01 22:52:56 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-10-01 22:53:18 +0200 <dolio> Show1 predates quantified constraints.
2022-10-01 22:53:49 +0200 <monochrom> Show1 is probably motivated by lacking QuantifiedConstraints back then.
2022-10-01 22:53:58 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Client Quit)
2022-10-01 22:54:02 +0200jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-10-01 22:54:04 +0200 <dolio> Right.
2022-10-01 22:54:23 +0200jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-10-01 22:54:25 +0200 <ski> (oh, a pet peeve of mine : when people have two classes (perhaps with a common superclass), and claim that when constraints for both are in force for a type, that means that the methods of the two classes are expected to interact in a certain way according to some laws. this does not make sense, imho. you could have party A make one instance, party B make another instance, and then party C try to use both
2022-10-01 22:54:31 +0200 <ski> instances, and get confused when they don't cohere. the proper way to solve this is to make a common subclass (possibly with zero methods), that specifies the intended interaction laws)
2022-10-01 22:54:44 +0200 <monochrom> You can almost read liftShowsPrec's type "(Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> f a -> ShowS" as "Show a => Int -> f a -> ShowS".
2022-10-01 22:55:28 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-01 22:57:14 +0200 <dolio> I think originally it was literally just a proxy for the quantified constraint, but it's somewhat more useful/flexible to lift a showing function than lift a Show instance (effectively).
2022-10-01 23:00:55 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 244 seconds)
2022-10-01 23:03:35 +0200chomwitt(~chomwitt@2a02:587:dc14:f500:f42c:42aa:75f3:5bbf) (Remote host closed the connection)
2022-10-01 23:03:48 +0200 <edrx> ...aha, and this explains how functor laws, monad laws, etc, work: https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/rewrite_rules.html =)
2022-10-01 23:05:20 +0200dmwit(~dmwit@2600:4040:264a:df00:422e:910b:6593:d3fb)
2022-10-01 23:05:28 +0200talismanick(~talismani@2601:200:c100:c9e0::24ac)
2022-10-01 23:05:42 +0200ellensol(~ellen@178-78-210-152.customers.ownit.se)
2022-10-01 23:08:16 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-10-01 23:08:17 +0200jargon(~jargon@184.101.88.60) (Remote host closed the connection)
2022-10-01 23:08:24 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-10-01 23:08:35 +0200LukeHoersten(~LukeHoers@user/lukehoersten)
2022-10-01 23:10:54 +0200Haematophage(~colere@about/linux/staff/sauvin) (Ping timeout: 265 seconds)
2022-10-01 23:10:59 +0200Colere(~colere@about/linux/staff/sauvin)
2022-10-01 23:13:09 +0200Furor(~colere@about/linux/staff/sauvin)
2022-10-01 23:13:42 +0200 <ski> hololeap : `StateT s (LogicT m) a' would not give you non-backtrackable state (being state that survives backtracking). not quite sure atm if `LogicT m (StateT s m) a' would, or if maybe you'd have to splice the `StateT s' inbetween the two `ContT's in `forall o. ContT () (ContT o m) a'
2022-10-01 23:13:51 +0200 <ski> (hololeap : and if the only difference between that and `LogicT o (StateT s m) a' is that the latter also produces the final state .. hm, i guess it depends on whether it (the inner `ContT') does nqCPSy things or not)
2022-10-01 23:14:08 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-01 23:14:08 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-01 23:14:08 +0200wroathe(~wroathe@user/wroathe)
2022-10-01 23:14:32 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2022-10-01 23:14:52 +0200 <ski> edrx : btw, "Interface-passing style" by Fare in 2010-02-17 at <https://fare.livejournal.com/155094.html> might be interesting
2022-10-01 23:16:15 +0200Colere(~colere@about/linux/staff/sauvin) (Ping timeout: 252 seconds)
2022-10-01 23:16:18 +0200dmwit(~dmwit@2600:4040:264a:df00:422e:910b:6593:d3fb) (Ping timeout: 252 seconds)
2022-10-01 23:19:50 +0200 <edrx> ski: it has lots of good links! thanks! =)
2022-10-01 23:21:08 +0200 <ski> edrx : no, laws associated with type class methods are not (necessarily) rewrite `RULES'
2022-10-01 23:21:57 +0200 <edrx> where can I find more about that?
2022-10-01 23:22:06 +0200 <geekosaur> edrx, rewrite rules are about optimization, not laws. they often *assume* law-abiding instances, but they are not in and of themselves laws
2022-10-01 23:22:35 +0200 <geekosaur> usually useful laws can't actually be written in Haskell
2022-10-01 23:23:40 +0200 <ski> edrx : anyway, a Java interface `Widget' more or less corresponds to `exists a. Widget a *> a' in Haskell, where `Widget a' would describe a type class where every method takes (exactly) one `a' as input (and otherwise does not reference `a') .. but to explain that more, i'd have to explain `exists' and `*>'
2022-10-01 23:23:41 +0200 <geekosaur> there are other languages where you *can* write out the laws, such as Agda and Idris. (at a different price: you must not only carry around proofs for the laws, but you may take a speed hit during compilation or sometimes runtime)
2022-10-01 23:24:08 +0200kenran(~user@user/kenran) (Remote host closed the connection)
2022-10-01 23:26:28 +0200 <ski> methods in Java classes & interfaces implicitly take an object (`this') as input (and can reach into its innards). methods in Haskell type classes don't. however, they may take multiple `a's as in put ("binary methods") or produce `a's as output ("clone methods") (possibly being overloaded *only* on the result type, e.g. `readsPrec :: Read a => Int -> String -> [(a,String)]',`minBound,maxBound :: Bounded a
2022-10-01 23:26:34 +0200 <ski> => a',`return :: Monad m => a -> m a',..)
2022-10-01 23:27:29 +0200leungbk(~user@cpe-142-129-149-172.socal.res.rr.com)
2022-10-01 23:28:02 +0200jargon(~jargon@184.101.88.60)
2022-10-01 23:28:09 +0200 <ski> (being able to take multiple `a's as input may make you think a little about multi-methods (although therey's no run-time dispatching based on the particular kind of arguments you get, with type classes). it should probably make you think more about Abstract Data Types, where you can have `merge'-operations that take multiple data structures, and are able to see through the abstraction for all of them
2022-10-01 23:28:15 +0200 <ski> (unlike in OO))
2022-10-01 23:30:30 +0200 <ski> edrx : did i already link you to the "On Understanding .." papers ?
2022-10-01 23:31:43 +0200 <edrx> if you did then I saved only the links, not the papers... can you send me them again?
2022-10-01 23:32:24 +0200 <ski> "On Understanding Types, Data Abstraction, and Polymorphism" by Luca Cardelli,Peter Wegner in 1985-12 at <http://lucacardelli.name/Papers/OnUnderstanding.A4.pdf> ; "On Understanding Data Abstraction, Revisited" by William R. Cook in 2009-10 at <https://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf>
2022-10-01 23:32:34 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-01 23:35:13 +0200 <edrx> thanks!
2022-10-01 23:35:50 +0200 <edrx> the paper by Cardelli and Wegner was one of the first papers on Type Theory that I stumbled on... but it didn't make any sense to me at that time =P
2022-10-01 23:36:01 +0200 <ski> first one talks about different notions of polymorphism, and also (iirc) talks a bit about abstract types, how they relate to existential quantification
2022-10-01 23:36:43 +0200 <ski> while later paper talks a bit more about OO objects, and possibly about how that (in a different way) relates to existential quantification
2022-10-01 23:36:53 +0200 <ski> TaPL also talks about these things, in some chapters
2022-10-01 23:37:05 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 244 seconds)
2022-10-01 23:37:34 +0200gnawk(~gnawk@76-196-232-104.lightspeed.sndgca.sbcglobal.net)
2022-10-01 23:37:55 +0200 <ski> @where TaPL
2022-10-01 23:37:55 +0200 <lambdabot> "Types and Programming Languages" by Benjamin C. Pierce in 2002-02-01 at <https://www.cis.upenn.edu/~bcpierce/tapl/>
2022-10-01 23:39:26 +0200vorpuni(~pvorp@2001:861:3881:c690:f9de:fbcb:2100:7597) (Remote host closed the connection)
2022-10-01 23:40:17 +0200 <ski> edrx : oh, you might also find "Polymorphic Type Inference" by Michael I. Schwartzbach in 1995-03 at <https://cs.au.dk/~amoeller/mis/typeinf.p(s|df)>,<https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.57.1493> helpful
2022-10-01 23:40:57 +0200 <edrx> totally unrelated question...
2022-10-01 23:42:16 +0200michalz(~michalz@185.246.207.203) (Remote host closed the connection)
2022-10-01 23:43:16 +0200 <edrx> thanks! =)
2022-10-01 23:43:25 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Quit: leaving)
2022-10-01 23:44:26 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2022-10-01 23:44:44 +0200 <edrx> in one of the courses that I teach I am experimenting with diagrams like the ones here, in pages 7 and 8 - http://angg.twu.net/LATEX/2022-1-C2-infs-e-sups.pdf#page=7
2022-10-01 23:46:13 +0200 <edrx> in which I do a set comprehensions and quantifications with some extra annotations - for example, instead of just ∀ x ∈ {7,8,9}. 2.5 ≤ f(x)
2022-10-01 23:47:03 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Client Quit)
2022-10-01 23:47:14 +0200gnawk(~gnawk@76-196-232-104.lightspeed.sndgca.sbcglobal.net) (Remote host closed the connection)
2022-10-01 23:47:41 +0200 <ski> i'm not sure what the `em's are intended to mean
2022-10-01 23:47:51 +0200 <edrx> the extra annotations can say things like "draw the result of 2.5 ≤ f(x) at the point (x,f(x)) using the colors that I use for truth-values"
2022-10-01 23:47:58 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2022-10-01 23:48:26 +0200 <edrx> "em" means "in", but I think that my explanation here is going to be clearer
2022-10-01 23:48:59 +0200 <ski> mhm
2022-10-01 23:49:58 +0200kdaishi(~Thunderbi@mobile-access-6df0e5-30.dhcp.inet.fi)
2022-10-01 23:50:59 +0200jpds1(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 258 seconds)
2022-10-01 23:51:04 +0200titibandit(~titibandi@xdsl-212-8-150-57.nc.de) (Remote host closed the connection)
2022-10-01 23:51:05 +0200 <edrx> suppose that we start with:
2022-10-01 23:51:10 +0200 <edrx> [(x,y) | x <- [1..3], y <- [x..3], x+y<6]
2022-10-01 23:51:51 +0200 <edrx> I would like to add a clause to it that means "plot (x,y)" - the code could look like this,
2022-10-01 23:52:19 +0200 <edrx> [(x,y) | x <- [1..3], y <- [x..3], x+y<6, _ <- plot x y]
2022-10-01 23:53:31 +0200jero98772(~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c) (Ping timeout: 246 seconds)
2022-10-01 23:53:34 +0200 <edrx> but to produce the diagrams that I need these plotting clauses would have to add plot information to an extra list... in other languages I could do things like
2022-10-01 23:54:00 +0200 <edrx> [(x,y) | x <- [1..3], y <- [x..3], x+y<6, _ <- table.insert(plotinfo, {x,y})]
2022-10-01 23:54:30 +0200 <edrx> where the table.insert would modify that array plotinfo
2022-10-01 23:55:41 +0200 <edrx> how would you do that in Haskell? in my beginner's view this seems to need several comprehensions running in parallel, or several "collect" clauses in a Common Lisp "loop"...
2022-10-01 23:57:19 +0200leungbk(~user@cpe-142-129-149-172.socal.res.rr.com) (Ping timeout: 252 seconds)
2022-10-01 23:58:47 +0200LukeHoersten(~LukeHoers@user/lukehoersten) (Quit: My MacBook has gone to sleep. ZZZzzz…)