Home liberachat/#haskell: Logs Calendar

Logs on 2022-10-14 (liberachat/#haskell)

00:00:17 × shapr quits (~user@68.54.166.125) (Ping timeout: 250 seconds)
00:00:19 <Clinton[m]> @ski ohh that instance already exists :) https://hackage.haskell.org/package/barbies-2.0.3.1/docs/Data-Functor-Barbie.html#t:FunctorB
00:00:19 <lambdabot> Maybe you meant: wiki src ask
00:00:28 <ski> it's usually not that good to make instances for `Compose f g', for more specific types (not tyvars) in place of `f' and `g', i think
00:01:01 <ski> because then someone else might want to have another instance for another `f' or another `g', or both .. when does it stop ?
00:01:14 <ski> better is to try to be general, if possible/reasonable
00:02:34 <ski> .. or, if you have `Compose F g', you could define `FOf g a' to be `F (g a)', and make an instance for `FOf g' .. or if you have `Compose f G', you could define `OfG f a' to be `f (G a)', and make an instance for `OfG f'
00:03:13 tomboy64 joins (~tomboy64@user/tomboy64)
00:04:54 <ski> this is, btw, what several of the monad transformers are. `ReaderT r m a' is `(r ->) (m a)', iow `Compose (Reader r) m'. `WriterT w m a' is `m (w,a)' (modulo annoying ordering), which is `Compose m (Writer w a)'
00:06:40 <ski> (i wsa thrown off by the naming of `x' earlier, i think)
00:08:22 <ski> .. hm, i guess what you want here is a monad transformer transformer ?
00:08:49 TonyStone joins (~TonyStone@cpe-74-76-51-197.nycap.res.rr.com)
00:09:51 × werneta quits (~werneta@137.78.30.207) (Ping timeout: 260 seconds)
00:11:48 <ski> you want a `ReaderTT r t m a' that amounts to `t (ReaderT r m) a. so given a monad transformer `t' (mapping arbitrary monads `m' to monads `t m'), you get another monad transformer `ReaderTT r t', which maps arbitrary monads `m' to `ReaderTT r t m', amounting to `t (ReaderT r m)', letting `t' decide on which monadic result type the monad `ReaderT r m' is applied
00:13:09 × VictorLandevos quits (~VictorLan@cpc142034-slou6-2-0-cust488.17-4.cable.virginm.net) (Remote host closed the connection)
00:13:48 <ski> hmm
00:15:57 × EvanR quits (~EvanR@user/evanr) (Quit: Leaving)
00:17:20 EvanR joins (~EvanR@user/evanr)
00:17:23 <ski> no, this isn't quite right
00:18:05 <Clinton[m]> ski I am still reading and thinking :)
00:18:15 <ski> `ReaderT r m' is a monad. `t' maps this to a concrete, not to a monad
00:18:47 <ski> this means that `ReaderTT' (if we should call it that), has kind `Type -> (Type -> Type) -> Type', not `Type -> (Type -> Type) -> (Type -> Type)'
00:19:05 <ski> hm .. need another naming
00:19:43 zebrag joins (~chris@user/zebrag)
00:20:15 <ski> (anyway, `t' doesn't accept a "monadic result type" to apply the monad transformer it takes as input to. it just applies it to some privately chosen type(s))
00:20:42 × Topsi quits (~Topsi@dyndsl-095-033-016-174.ewe-ip-backbone.de) (Read error: Connection reset by peer)
00:20:52 <ski> s/concrete/concrete type/
00:24:15 × Tuplanolla quits (~Tuplanoll@91-159-69-34.elisa-laajakaista.fi) (Quit: Leaving.)
00:31:27 × zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
00:32:56 zaquest joins (~notzaques@5.130.79.72)
00:33:57 <ski> hm .. not sure what to call it, let's say `OfReaderT r t m' for the time being .. being `t (ReaderT r m)'. so you want `instance FunctorB t => FunctorB (OfReaderT r t)'
00:37:44 <ski> so you go `bmap f (MkOfReaderT trm) = MkOfReaderT (bmap (hoist f) trm)'
00:40:23 <ski> `f' has type `forall a. m a -> n a', so `hoist f' has type `forall a. ReaderT r m a -> ReaderT r n a', so `bmap (hoist f)' has type `t (ReaderT r m) -> t (ReaderT r n)', and with `trm' of type `t (ReaderT r m)', `bmap (hoist f) trm' has type `t (ReaderT r n)', and so `bmap f' transforms `OfReaderT r t m' to `OfReaderT r t n' as required
00:41:56 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
00:42:26 × Me-me quits (~me-me@tunnel690570-pt.tunnel.tserv12.mia1.ipv6.he.net) (Quit: Disconnecting on purpose.)
00:42:46 <ski> one could wonder if we could use `mapReaderT' in place of `hoist' .. well, `mapReaderT f' would have type `ReaderT r m x -> ReaderT r n x' (with *no* `forall x.' ! .. `mapReaderT' isn't rank-2. so we have to pick a type (`x' before), choose `a' and `b' in the type of `f' to be this type `x', and then `mapReaderT f' is *not* polymorphic !)
00:43:23 <ski> .. and so we can't pass `mapReaderT f' to `bmap', since it *is* rank-2, demands a polymorphic argument
00:43:55 <ski> (at first i was thinking we could use either of them. but apparently only `hoist' works here)
00:44:37 Me-me joins (~me-me@v.working.name)
00:47:41 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614)
00:49:25 × Me-me quits (~me-me@v.working.name) (Client Quit)
00:51:31 Me-me joins (~me-me@tunnel690570-pt.tunnel.tserv12.mia1.ipv6.he.net)
00:51:33 MrsGenius joins (~MrsGenius@S01069050ca4e3573.cg.shawcable.net)
00:51:52 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614) (Ping timeout: 246 seconds)
00:53:36 <ski> (i guess you could phrase it as `bmap f = MkOfReaderT . bmap (hoist f) . runOfReaderT' .. assuming `newtype OfReaderT r t m = MkOfReaderT {runOfReaderT :: t (ReaderT r m)}')
00:53:46 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
00:54:01 <Clinton[m]> ski: I've got this:... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/fcf9bf1dbd0cc55f868a0ee83dfc89f039fb1e82>)
00:54:18 ec joins (~ec@gateway/tor-sasl/ec)
00:55:25 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
00:55:26 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
00:56:02 <ski> hmm .. anyway, since `mapReaderT' is out of the picture, we could try to generalize from `b (ReaderT r m)' to `b (t m)' (renamed `t' |-> `b', so i can use `t' for arbitrary monad transformer)
00:56:28 elbear joins (~lucian@188.24.138.239)
00:56:42 Lord_of_Life_ is now known as Lord_of_Life
00:56:55 <ski> so, we have a composition `b . t' where `b :: (Type -> Type) -> Type' and `t :: (Type -> Type) -> (Type -> Type)'
00:57:28 <Clinton[m]> Ah, I guess that could work...
00:59:54 <ski> i guess we could now have `instance (FunctorB b,MonadTrans t) => FunctorB (Compose b t)' .. now this is fully general, not a specialized version (apart from using `Compose :: ((Type -> Type) -> Type) -> ((Type -> Type) -> (Type -> Type)) -> ((Type -> Type) -> Type)', rather than the general `(k1 -> Type) -> (k0 -> k1) -> (k0 -> Type)')
01:00:34 <ski> so, this is actually `FunctorB (Compose @(Type -> Type) @(Type -> Type) b t)'
01:00:35 <Clinton[m]> ski: at some point I'll make a PR request to `barbies` so that you can `derive (Generic, FunctorB)` from a type like:... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/e64ea5d02680e7239b030c7e56a7d5fb912711eb>)
01:00:59 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 268 seconds)
01:01:59 <ski> @hoogle hoist
01:02:00 <lambdabot> Pipes hoist :: (MFunctor t, Monad m) => (forall a . () => m a -> n a) -> t m b -> t n b
01:02:00 <lambdabot> Control.Monad.Morph hoist :: (MFunctor t, Monad m) => (forall a . m a -> n a) -> t m b -> t n b
01:02:00 <lambdabot> Streaming hoist :: (MFunctor t, Monad m) => (forall a . () => m a -> n a) -> t m b -> t n b
01:03:10 <ski> Clinton[m] : your `TransformerFunctor' looks similar to `MFunctor' (except that one provides the implementor of `hoist' with evidence for `Monad m', while your `TransformerFunctor' doesn't do that for `tfmap')
01:03:52 <MrsGenius> Hello
01:03:53 <ski> hmm
01:03:58 <ski> hello MrsGenius
01:04:05 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
01:04:13 × gqplox quits (~textual@97e654ef.skybroadband.com) (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
01:04:19 ski 's still kinda distracted .. so's replying somewhat slowly
01:04:39 gqplox joins (~textual@97e654ef.skybroadband.com)
01:05:17 <ski> rethinking the previous, now i'm wondering if `mapReaderT' would work, anyway
01:05:48 × gqplox quits (~textual@97e654ef.skybroadband.com) (Client Quit)
01:05:52 <ski> mapReaderT :: forall a b. (m a -> n b) -> ReaderT r m a -> ReaderT r n b
01:06:02 <ski> f :: forall c. m c -> n c
01:06:11 <ski> f :: m d -> n d
01:06:23 <ski> mapReaderT :: (m d -> n d) -> ReaderT r m d -> ReaderT r n d
01:06:33 <ski> mapReaderT f :: ReaderT r m d -> ReaderT r n d
01:06:45 <ski> mapReaderT f :: forall d. ReaderT r m d -> ReaderT r n d
01:07:18 <ski> basically, we can go from `forall a. Foo a -> Bar a' to `(forall a. Foo a) -> (forall a. Bar a)'
01:07:41 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
01:08:30 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
01:09:35 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
01:09:35 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Client Quit)
01:09:51 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
01:09:52 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
01:09:52 wroathe joins (~wroathe@user/wroathe)
01:10:08 <ski> hm, right, not sure why i didn't realize `x' was generalizable before. we don't pick a particular `x', but rather "pick" the one that we're provided by `bmap :: (forall x. f x -> g x) -> b f -> b g' (the one we're calling) for it's argument (`hoist f' / `mapReaderT f')
01:10:53 <ski> so, the point is that, while `mapReaderT' is more general, we can get its type to look like the type of `hoist'
01:11:52 <ski> Clinton[m] : hm, do you have a record with multiple fields like that ?
01:15:15 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 250 seconds)
01:15:26 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Quit: Lost terminal)
01:15:58 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
01:17:10 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
01:18:06 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
01:18:19 × jmorris quits (uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
01:22:08 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Quit: au revoir)
01:24:01 × gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
01:30:01 × xff0x quits (~xff0x@ai071162.d.east.v6connect.net) (Ping timeout: 246 seconds)
01:37:52 zxx7529 joins (~Thunderbi@user/zxx7529)
01:39:54 dcoutts_ joins (~duncan@host86-163-164-210.range86-163.btcentralplus.com)
01:41:14 gqplox joins (~textual@97e654ef.skybroadband.com)
01:42:36 × dcoutts__ quits (~duncan@host86-163-164-210.range86-163.btcentralplus.com) (Ping timeout: 260 seconds)
01:44:18 × Feuermagier_ quits (~Feuermagi@213.149.82.60) (Quit: Leaving)
01:45:28 nate1 joins (~nate@98.45.169.16)
01:47:39 king_gs joins (~Thunderbi@2806:103e:29:c5:4fb1:a8c9:906f:c6e0)
01:48:03 elbear joins (~lucian@188.24.138.239)
01:52:47 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 268 seconds)
01:58:59 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
02:00:05 <Clinton[m]> ski: I'm not sure what you're getting at... are you addressing the issue about us not being about to use `hoist` because `bmap` doesn't require the transformation source to be a Monad?
02:03:49 bilegeek joins (~bilegeek@2600:1008:b018:1dfc:44e1:aaa5:595f:8e17)
02:03:55 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
02:04:48 rockystone joins (~rocky@user/rockymarine)
02:09:55 × MrsGenius quits (~MrsGenius@S01069050ca4e3573.cg.shawcable.net) (Quit: Client closed)
02:12:45 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
02:16:26 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 260 seconds)
02:18:11 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 248 seconds)
02:18:11 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 260 seconds)
02:19:22 × thegeekinside quits (~thegeekin@189.180.7.159) (Ping timeout: 246 seconds)
02:20:25 × king_gs quits (~Thunderbi@2806:103e:29:c5:4fb1:a8c9:906f:c6e0) (Ping timeout: 246 seconds)
02:20:53 frost joins (~frost@user/frost)
02:22:01 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
02:23:06 rockystone joins (~rocky@user/rockymarine)
02:23:51 king_gs joins (~Thunderbi@187.201.131.180)
02:27:49 × td_ quits (~td@83.135.9.55) (Ping timeout: 252 seconds)
02:29:36 td_ joins (~td@83.135.9.35)
02:29:54 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
02:31:01 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
02:33:19 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
02:33:19 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
02:33:19 finn_elija is now known as FinnElija
02:33:45 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
02:37:13 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
02:38:23 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
02:45:40 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
02:46:12 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
02:47:02 terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1)
02:48:46 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 246 seconds)
02:50:53 rockystone joins (~rocky@user/rockymarine)
02:52:19 × raym quits (~aritra@user/raym) (Ping timeout: 248 seconds)
02:52:51 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 248 seconds)
02:56:07 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
03:00:19 janus parts (janus@anubis.0x90.dk) ()
03:01:23 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 248 seconds)
03:03:54 ec_ joins (~ec@gateway/tor-sasl/ec)
03:05:36 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 258 seconds)
03:08:23 raym joins (~aritra@user/raym)
03:09:54 × king_gs quits (~Thunderbi@187.201.131.180) (Ping timeout: 268 seconds)
03:10:29 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 268 seconds)
03:11:15 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
03:13:29 rockystone joins (~rocky@user/rockymarine)
03:24:05 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
03:29:25 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 252 seconds)
03:32:48 × gqplox quits (~textual@97e654ef.skybroadband.com) (Remote host closed the connection)
03:36:01 × johnjaye quits (~pi@173.209.64.74) (Ping timeout: 252 seconds)
03:38:15 johnjaye joins (~pi@173.209.64.74)
03:40:29 rockystone joins (~rocky@user/rockymarine)
03:40:30 × Vajb quits (~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57) (Read error: Connection reset by peer)
03:40:55 Vajb joins (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
03:45:41 <chymera> hi guys, any idea how I can convert "%" characters in strings to "%25" or "&" to "%26"? This is needed for URIs apparently... is this the correct package? https://hackage.haskell.org/package/uri-encode-1.5.0.6/docs/Network-URI-Encode.html
03:46:41 × Vajb quits (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
03:46:49 <EvanR> you can try the functions in that package in ghci, like > encode "30% off"
03:47:52 Vajb joins (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
04:01:30 elbear joins (~lucian@188.24.138.239)
04:03:16 × Vajb quits (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
04:03:51 Vajb joins (~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57)
04:04:14 azimut joins (~azimut@gateway/tor-sasl/azimut)
04:05:59 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 268 seconds)
04:09:06 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds)
04:09:30 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
04:11:57 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614)
04:14:34 × caryhartline quits (~caryhartl@2600:1700:2d0:8d30:85ce:60ba:541:2d5a) (Quit: caryhartline)
04:20:23 × zxx7529 quits (~Thunderbi@user/zxx7529) (Ping timeout: 252 seconds)
04:21:24 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
04:25:56 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 260 seconds)
04:33:13 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
04:35:57 king_gs joins (~Thunderbi@187.201.131.180)
04:37:37 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
04:49:16 × DDR quits (~DDR@2604:3d08:4c7f:8250:90d1:8621:421c:69c0) (Ping timeout: 260 seconds)
04:49:38 elbear joins (~lucian@188.24.138.239)
04:50:41 <ski> Clinton[m] : well, i was addressing that you could after all use `mapReaderT' in place of `hoist' (although only the latter was generalizable). but then i wondered about your `Blah' record in your last "paste", with fields `blah1',`blah2', wondering what you'd use it for
04:50:47 rockystone joins (~rocky@user/rockymarine)
04:52:29 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
04:57:26 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 260 seconds)
04:57:37 tam-carre joins (~tam-carre@2a01cb088a83b300a322b3f387318318.ipv6.abo.wanadoo.fr)
05:00:40 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
05:03:58 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Quit: ZNC - https://znc.in)
05:04:44 azimut joins (~azimut@gateway/tor-sasl/azimut)
05:05:35 × bilegeek quits (~bilegeek@2600:1008:b018:1dfc:44e1:aaa5:595f:8e17) (Quit: Leaving)
05:08:15 <jonathanx> I spend way too much time removing imports suggested by --pedantic. Is there a way to quickly remove all redundant imports? I'm usin HLS/vscode
05:08:50 <probie> Doesn't HLS highlight them for you?
05:08:55 × johnjaye quits (~pi@173.209.64.74) (Ping timeout: 268 seconds)
05:09:40 codaraxis__ joins (~codaraxis@user/codaraxis)
05:10:37 johnjaye joins (~pi@173.209.64.74)
05:12:23 mbuf joins (~Shakthi@49.204.114.28)
05:13:19 × codaraxis___ quits (~codaraxis@user/codaraxis) (Ping timeout: 246 seconds)
05:15:21 <ski> hm, someone recently showed some script to maximize and minimize Haskell imports, in here ..
05:16:41 × fjMSX quits (~hypni2p@2.92.213.55) (Remote host closed the connection)
05:17:57 × king_gs quits (~Thunderbi@187.201.131.180) (Read error: Connection reset by peer)
05:18:44 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:18:59 king_gs joins (~Thunderbi@2806:103e:29:c5:4fb1:a8c9:906f:c6e0)
05:19:29 rockystone joins (~rocky@user/rockymarine)
05:20:41 chomwitt joins (~chomwitt@2a02:587:dc0c:c200:b1b7:d42d:7f9d:2308)
05:20:55 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
05:21:50 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
05:24:53 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
05:25:36 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 264 seconds)
05:27:51 fjMSX joins (~hypni2p@2.92.213.55)
05:27:52 <geekosaur> Sep 29 13:01:02 <DigitalKiwi> https://mostlyabsurd.com/posts/2019/06/03/minimal-imports-maximal-imports/
05:29:08 elbear joins (~lucian@188.24.138.239)
05:31:51 × raym quits (~aritra@user/raym) (Ping timeout: 260 seconds)
05:34:07 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
05:35:09 × jargon quits (~jargon@184.101.208.112) (Remote host closed the connection)
05:44:59 jargon joins (~jargon@184.101.208.112)
05:46:12 kenran joins (~user@user/kenran)
05:47:33 raym joins (~aritra@user/raym)
05:53:39 × raym quits (~aritra@user/raym) (Ping timeout: 248 seconds)
05:54:18 × ft quits (~ft@p3e9bc57b.dip0.t-ipconnect.de) (Quit: leaving)
05:55:00 × kenran quits (~user@user/kenran) (Remote host closed the connection)
05:59:26 raym joins (~aritra@user/raym)
06:06:16 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Ping timeout: 260 seconds)
06:08:20 whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com)
06:10:13 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
06:10:50 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
06:11:07 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
06:11:39 rockystone joins (~rocky@user/rockymarine)
06:13:48 × jargon quits (~jargon@184.101.208.112) (Remote host closed the connection)
06:16:25 kenran joins (~user@user/kenran)
06:16:30 razetime joins (~quassel@117.193.4.154)
06:17:07 × tam-carre quits (~tam-carre@2a01cb088a83b300a322b3f387318318.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
06:19:27 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 250 seconds)
06:20:03 × king_gs quits (~Thunderbi@2806:103e:29:c5:4fb1:a8c9:906f:c6e0) (Quit: king_gs)
06:20:19 king_gs joins (~Thunderbi@187.201.131.180)
06:22:01 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
06:23:44 rockystone joins (~rocky@user/rockymarine)
06:25:14 <ski> ty
06:26:51 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 258 seconds)
06:29:21 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
06:29:21 lortabac joins (~lortabac@2a01:e0a:541:b8f0:c6ca:2b6d:906a:6c9f)
06:30:51 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
06:33:22 × califax quits (~califax@user/califx) (Ping timeout: 258 seconds)
06:36:49 califax joins (~califax@user/califx)
06:38:34 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
06:41:55 × king_gs quits (~Thunderbi@187.201.131.180) (Read error: Connection reset by peer)
06:42:02 king_gs1 joins (~Thunderbi@2806:103e:29:c5:4fb1:a8c9:906f:c6e0)
06:44:21 king_gs1 is now known as king_gs
06:46:20 nate1 joins (~nate@98.45.169.16)
06:47:47 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 252 seconds)
06:50:23 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
06:50:37 <talismanick> Has anyone used the manifolds package? How is it?
06:51:24 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
06:51:32 paddymahoney joins (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com)
06:52:56 × mmaruseacph2 quits (~mihai@198.199.98.239) (Ping timeout: 260 seconds)
06:53:11 mmaruseacph2 joins (~mihai@198.199.98.239)
06:55:07 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 252 seconds)
06:57:45 × king_gs quits (~Thunderbi@2806:103e:29:c5:4fb1:a8c9:906f:c6e0) (Remote host closed the connection)
06:58:01 × fjMSX quits (~hypni2p@2.92.213.55) (Remote host closed the connection)
07:01:04 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
07:01:19 elbear joins (~lucian@188.24.138.239)
07:07:17 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 268 seconds)
07:08:07 × raym quits (~aritra@user/raym) (Ping timeout: 246 seconds)
07:14:05 raym joins (~aritra@user/raym)
07:14:12 × turlando quits (~turlando@user/turlando) (Remote host closed the connection)
07:14:18 nschoe joins (~q@141.101.51.197)
07:15:27 turlando joins (~turlando@user/turlando)
07:19:22 × califax quits (~califax@user/califx) (Ping timeout: 258 seconds)
07:19:55 elbear joins (~lucian@188.24.138.239)
07:20:14 × Sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Ping timeout: 268 seconds)
07:20:54 califax joins (~califax@user/califx)
07:24:19 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 248 seconds)
07:24:19 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
07:24:52 chele joins (~chele@user/chele)
07:25:44 <tomsmeding> EvanR: is the point of that 'Bag' to provide a data structure that can has O(1) append, O(1) fromList and O(n) toList? Because in that case I've reinvented it multiple times already :p
07:28:05 yuzhao joins (~yuzhao@36.112.45.73)
07:30:09 <tomsmeding> dminuoso: O.o lemme debug
07:30:51 MajorBiscuit joins (~MajorBisc@86-88-79-148.fixed.kpn.net)
07:32:22 CiaoSen joins (~Jura@p200300c95700eb002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
07:33:28 Major_Biscuit joins (~MajorBisc@c-001-015-051.client.tudelft.eduvpn.nl)
07:35:51 × califax quits (~califax@user/califx) (Ping timeout: 258 seconds)
07:37:13 elbear joins (~lucian@188.24.138.239)
07:37:30 × MajorBiscuit quits (~MajorBisc@86-88-79-148.fixed.kpn.net) (Ping timeout: 268 seconds)
07:40:51 califax joins (~califax@user/califx)
07:41:47 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 250 seconds)
07:43:26 × shriekingnoise quits (~shrieking@186.137.167.202) (Quit: Quit)
07:50:28 × acidjnk_new quits (~acidjnk@p200300d6e7137a99955eeb096340e161.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
07:52:04 fserucas joins (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
07:52:07 <talismanick> Bag, like a multiset?
07:53:32 × yahb2 quits (~yahb2@2a01:4f8:c0c:5c7b::2) (Remote host closed the connection)
07:53:44 yahb2 joins (~yahb2@2a01:4f8:c0c:5c7b::2)
07:53:53 <tomsmeding> talismanick: EvanR sent this link https://paste.tomsmeding.com/KaoyLc6x
07:54:51 <tomsmeding> % :set -XNoMonomorphismRestriction
07:54:51 <yahb2> <no output>
07:54:57 <tomsmeding> dminuoso: fixed
07:55:37 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
08:00:28 Katarushisu joins (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net)
08:00:52 acidjnk joins (~acidjnk@p200300d6e7137a99918d58bfa2347072.dip0.t-ipconnect.de)
08:00:55 <dminuoso> % f :: Num a => a -> a -> a; g :: Num a => a -> a -> a; (f,g) = ((+),(-)
08:00:55 <yahb2> <interactive>:30:71: error: ; parse error (possibly incorrect indentation or mismatched brackets)
08:01:00 <dminuoso> % f :: Num a => a -> a -> a; g :: Num a => a -> a -> a; (f,g) = ((+),(-))
08:01:00 <yahb2> <interactive>:32:1: error: ; Overloaded signature conflicts with monomorphism restriction ; f :: forall a. Num a => a -> a -> a
08:01:10 <dminuoso> Here we go. This is a fun and probably little known bit. :)
08:02:56 × razetime quits (~quassel@117.193.4.154) (Ping timeout: 260 seconds)
08:03:45 <tomsmeding> huh. So this is _without_ monores.
08:04:01 × mbuf quits (~Shakthi@49.204.114.28) (Quit: Leaving)
08:04:21 <tomsmeding> ah no, it's with monores
08:04:28 <dminuoso> Yeah
08:04:34 <dminuoso> Sorry, I had enabled it behind the scenes.
08:04:34 dr_merijn joins (~dr_merijn@86-86-29-250.fixed.kpn.net)
08:04:47 <dminuoso> The surprising bit is the restriction despite f and g being annotated.
08:05:05 <tomsmeding> funny, and it works when the bindings for f and g are simple function bindings instead of via a non-trivial pattern
08:05:27 <tomsmeding> yeah this is somewhat surprising
08:05:27 <dminuoso> Yup, its exactly that non-trivial pattern that makes the difference.
08:05:35 <dminuoso> There's good and subtle reasons for this
08:06:03 <tomsmeding> yeah it sort of makes sense after the fact, but I wouldn't have naively predicted it
08:06:07 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614) (Remote host closed the connection)
08:07:10 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
08:07:11 <tomsmeding> by the way the problem with yahb2 was that apparently ghc needs /tmp nowadays, and my container script gave it no /tmp
08:07:13 <tomsmeding> :p
08:07:19 <tomsmeding> not sure what changed
08:09:01 aliosablack joins (~chomwitt@2a02:587:dc0c:c200:b1b7:d42d:7f9d:2308)
08:09:14 elbear joins (~lucian@188.24.138.239)
08:09:34 × chomwitt quits (~chomwitt@2a02:587:dc0c:c200:b1b7:d42d:7f9d:2308) (Read error: Connection reset by peer)
08:11:00 Sciencentistguy joins (~sciencent@hacksoc/ordinary-member)
08:13:29 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
08:13:57 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 252 seconds)
08:14:09 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
08:19:16 × Sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Ping timeout: 260 seconds)
08:19:44 razetime joins (~quassel@117.193.4.154)
08:22:24 Sciencentistguy joins (~sciencent@hacksoc/ordinary-member)
08:22:26 __xor joins (~xor@74.215.182.83)
08:25:07 × yuzhao quits (~yuzhao@36.112.45.73) (Ping timeout: 250 seconds)
08:26:46 elbear joins (~lucian@188.24.138.239)
08:27:01 <dminuoso> https://hackage.haskell.org/package/bytestring-0.11.3.1/docs/Data-ByteString-Builder-Prim.html#t:FixedPrim
08:27:04 <dminuoso> This module is so lovely. :)
08:27:19 <dminuoso> data FixedPrim a = FP {-# UNPACK #-} !Int (a -> Ptr Word8 -> IO ())
08:27:20 mastarija joins (~mastarija@2a05:4f46:e03:6000:5956:8a4b:bcdb:bf92)
08:28:28 <dminuoso> Absolutely love this, as its incredibly reusable.
08:28:48 <tomsmeding> nice
08:28:58 <tomsmeding> very general
08:31:11 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 250 seconds)
08:31:32 <dminuoso> In the new Put monad Im building, Ill just unsafePerformIO myself a buffer via mallocForeignPtrBytes, and then just unpack these primitives from bytestring.
08:31:40 <dminuoso> And poke them directly in there
08:31:57 <dminuoso> And since each FixedPrim already has length available too, bound checking is trivial too
08:32:18 <dminuoso> And at the end Ill just unsafely construct a ByteString from the ForeignPtr directly
08:33:02 yuzhao joins (~yuzhao@36.112.45.73)
08:35:12 × talismanick quits (~talismani@2601:200:c100:c9e0::1b0b) (Ping timeout: 264 seconds)
08:41:53 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
08:42:11 <dr_merijn> dminuoso: High five!
08:42:58 <dr_merijn> dminuoso: Have you ever really lived until you abuse Haskell to type pun ByteString into vectors and vice versa? ;)
08:44:56 × loras quits (~loras@c-73-139-125-125.hsd1.fl.comcast.net) (Ping timeout: 260 seconds)
08:45:36 teo joins (~teo@user/teo)
08:51:26 × yuzhao quits (~yuzhao@36.112.45.73) (Read error: Connection reset by peer)
08:52:16 × Flow quits (~none@gentoo/developer/flow) (Ping timeout: 268 seconds)
08:52:19 × Katarushisu quits (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (Ping timeout: 248 seconds)
08:55:14 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
08:57:31 tam-carre joins (~tam-carre@2a01cb088a83b300a322b3f387318318.ipv6.abo.wanadoo.fr)
08:59:40 Flow joins (~none@gentoo/developer/flow)
09:00:08 elbear joins (~lucian@188.24.138.239)
09:00:12 Katarushisu joins (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net)
09:04:33 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 252 seconds)
09:05:40 yuzhao joins (~yuzhao@36.112.45.73)
09:06:37 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614)
09:11:30 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614) (Ping timeout: 264 seconds)
09:14:49 sagax joins (~sagax_nb@user/sagax)
09:15:32 tcard joins (~tcard@2400:4051:5801:7500:19ce:ed82:2ab7:90f9)
09:16:14 × dr_merijn quits (~dr_merijn@86-86-29-250.fixed.kpn.net) (Quit: leaving)
09:18:41 elbear joins (~lucian@188.24.138.239)
09:19:09 × yuzhao quits (~yuzhao@36.112.45.73) (Read error: Connection reset by peer)
09:21:52 merijn joins (~merijn@86.86.29.250)
09:28:39 yuzhao joins (~yuzhao@36.112.45.73)
09:32:10 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
09:32:25 × Kaiepi quits (~Kaiepi@142.68.249.28) (Ping timeout: 252 seconds)
09:32:49 × razetime quits (~quassel@117.193.4.154) (Ping timeout: 268 seconds)
09:35:31 Kaiepi joins (~Kaiepi@142.68.249.28)
09:38:07 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
09:45:25 × Batzy quits (~quassel@user/batzy) (Read error: Connection reset by peer)
09:46:18 Batzy joins (~quassel@user/batzy)
09:47:35 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
09:48:44 wonko joins (~wjc@2a0e:1c80:2:0:45:15:19:130)
09:49:05 × causal quits (~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0e) (Quit: WeeChat 3.6)
09:55:47 cfricke joins (~cfricke@user/cfricke)
09:55:59 ccapndave joins (~ccapndave@xcpe-62-167-164-44.cgn.res.adslplus.ch)
09:59:36 × Katarushisu quits (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (Ping timeout: 260 seconds)
10:02:45 Katarushisu joins (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net)
10:03:48 × yuzhao quits (~yuzhao@36.112.45.73) (Ping timeout: 268 seconds)
10:06:23 vn36 joins (~vn36@123.63.203.210)
10:09:39 × Kaiepi quits (~Kaiepi@142.68.249.28) (Ping timeout: 248 seconds)
10:09:51 razetime joins (~quassel@117.193.4.154)
10:11:16 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 260 seconds)
10:16:19 Haskelytic joins (~Haskelyti@118.179.211.17)
10:17:11 fjMSX joins (~hypni2p@2.92.213.55)
10:19:18 × mastarija quits (~mastarija@2a05:4f46:e03:6000:5956:8a4b:bcdb:bf92) (Ping timeout: 264 seconds)
10:20:49 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
10:21:41 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 268 seconds)
10:24:01 Kaiepi joins (~Kaiepi@142.68.249.28)
10:24:16 elbear joins (~lucian@188.24.138.239)
10:28:53 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 252 seconds)
10:30:05 titibandit joins (~titibandi@xdsl-78-34-208-230.nc.de)
10:30:56 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
10:30:57 × __xor quits (~xor@74.215.182.83) (Quit: brb)
10:42:02 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 268 seconds)
10:47:41 nate1 joins (~nate@98.45.169.16)
10:52:59 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
10:53:23 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds)
10:53:45 × CiaoSen quits (~Jura@p200300c95700eb002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
10:53:48 × raym quits (~aritra@user/raym) (Ping timeout: 264 seconds)
10:54:33 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
10:54:36 raym joins (~aritra@user/raym)
10:58:07 elbear joins (~lucian@188.24.138.239)
11:06:43 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 248 seconds)
11:10:51 xff0x joins (~xff0x@2405:6580:b080:900:b67d:8bf9:8e64:c723)
11:11:09 × ccapndave quits (~ccapndave@xcpe-62-167-164-44.cgn.res.adslplus.ch) (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:11:48 Guest6 joins (~Guest6@2a01cb0408ee99001bcd18dfc58a6927.ipv6.abo.wanadoo.fr)
11:16:48 kuribas joins (~user@ptr-17d51emi970ix5xwkf4.18120a2.ip6.access.telenet.be)
11:19:43 <Guest6> Hello. I'm facing an issue, if somebody can help :
11:19:44 <Guest6> I use this function from a library :
11:19:44 <Guest6> access :: MonadIO m => Pipe -> AccessMode -> Database -> Action m a -> m a
11:19:45 <Guest6> I would like to pass some of its parameters, then passing the result to another functions so they can pass the last parameter themselves :
11:19:45 <Guest6> example =
11:19:46 <Guest6>   let access_ = access pipe UnconfirmedWrites "dbName"
11:19:46 <Guest6>   someOtherFunc access_
11:19:47 <Guest6> someOtherFunc :: (Action m a -> m a) -> IO ()
11:19:47 <Guest6> someOtherFunc access_ = access_ something
11:19:48 <Guest6> But i dont achieve to type someOtherFunc signature properly.
11:19:48 <Guest6> the compiler want me to replace "a" by a specific type which would not work on every access_ usages
11:20:12 <Guest6>  Couldn't match type ‘a’ with ‘Value’
11:20:13 <Guest6>       Expected: Action m a
11:20:13 <Guest6>         Actual: Action m Value
11:20:14 <Guest6>       ‘a’ is a rigid type variable bound by
11:22:20 × titibandit quits (~titibandi@xdsl-78-34-208-230.nc.de) (Remote host closed the connection)
11:22:22 rockystone joins (~rocky@user/rockymarine)
11:22:57 <kuribas> Guest6: use a pastebin
11:25:27 × nschoe quits (~q@141.101.51.197) (Quit: Switching off)
11:29:10 mastarija joins (~mastarija@2a05:4f46:e03:6000:a9d8:5076:9112:988e)
11:30:40 <Guest6> kuribas https://pastebin.com/ZeaECyZD
11:32:38 <kuribas> Guest6: maybe you want a RankN function?
11:32:52 <kuribas> for example (forall a. Action m a - > m a)
11:33:57 <kuribas> normally the a is scoped to the function signature, so it is bound to a single value.
11:34:15 <kuribas> with a forall it is scoped to the passed function, so you can pass it different values.
11:34:57 Feuermagier joins (~Feuermagi@user/feuermagier)
11:35:50 <kuribas> https://wiki.haskell.org/Rank-N_types
11:38:30 Topsi joins (~Topsi@dyndsl-095-033-095-014.ewe-ip-backbone.de)
11:41:05 × vn36 quits (~vn36@123.63.203.210) (Ping timeout: 268 seconds)
11:43:26 <Guest6> kuribas it seems that is solving my issue indeed, thanks !
11:44:46 jinsun joins (~jinsun@user/jinsun)
11:44:48 × Haskelytic quits (~Haskelyti@118.179.211.17) (Quit: Client closed)
11:47:21 <kuribas> you're welcome :)
11:51:54 Everything joins (~Everythin@37.115.210.35)
11:56:35 <dminuoso> Error: bytecode compiler can't handle unboxed tuples and sums.
11:56:38 <dminuoso> Nooo!
11:56:47 <dminuoso> My evil cunning plans all collapsed.
11:58:53 vn36 joins (~vn36@123.63.203.210)
11:59:06 <tomsmeding> dminuoso: wasn't that improved in one of the later ghc releases
12:00:29 <dminuoso> Mmm Im on 9.0.2 already
12:00:44 <dminuoso> It would definitely be nice, as the cabal build/test flow is just a bit cumbersome
12:00:48 × TonyStone quits (~TonyStone@cpe-74-76-51-197.nycap.res.rr.com) (Read error: Connection reset by peer)
12:00:53 <dminuoso> `cabal repl` is really nice
12:02:26 <Axman6> Guest6: Welcome to the world of RankNTypes!
12:02:41 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 260 seconds)
12:03:25 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 258 seconds)
12:04:17 <Guest6> Axman6 the more i learn about haskell the more my language extension lists grow !
12:04:56 <Axman6> This is the way
12:05:18 <Axman6> I kinda want a t-shirt that says "Today is a Good Day to Learn About RankNTypes"
12:05:29 <tomsmeding> dminuoso: "later" meaning 9.4 or so, do you have a small test case?
12:05:32 <Axman6> but instead, I need to go to sleep
12:06:11 × Kaiepi quits (~Kaiepi@142.68.249.28) (Remote host closed the connection)
12:06:30 <tomsmeding> dminuoso: seems to work in 9.2.3
12:06:36 Kaiepi joins (~Kaiepi@142.68.249.28)
12:06:41 <dminuoso> tomsmeding: a = (# 'a' #)
12:06:41 <tomsmeding> % :set -XUnboxedTuples
12:06:41 <yahb2> <no output>
12:06:52 <tomsmeding> % f :: (# Int, Int #) -> () ; f _ = ()
12:06:52 <yahb2> Error: bytecode compiler can't handle unboxed tuples and sums. ; Possibly due to foreign import/export decls in source. ; Workaround: use -fobject-code, or compile this module to .o separately.
12:06:54 <tomsmeding> :(
12:07:01 <dminuoso> What version does yahb2 run on?
12:07:25 justsomeguy joins (~justsomeg@user/justsomeguy)
12:07:31 <dminuoso> Its interesting that (# Int #) is accepted by the way. :p
12:07:42 <dminuoso> Heck, even unboxed unit is admissable
12:07:53 <tomsmeding> dminuoso: yahb2 is 8.10.7
12:07:54 <dminuoso> % f :: (# #) -> (); f _ = ()
12:07:54 <yahb2> <no output>
12:08:12 <dminuoso> Im unsure why an unboxed unit is useful, but it feels symmetric.
12:08:22 <tomsmeding> 🤔
12:08:32 <dminuoso> WEll I guess it allows things like IO to be compiled to something without overhead
12:08:57 <tomsmeding> isn't the point of unboxed unit that it takes _zero_ space instead of constant space?
12:09:01 <Guest6> Axman6 are rankntypes particularly important ?
12:09:05 <dminuoso> But that uses State#, which we could pretend to be (##) with a phantom type
12:09:12 <dminuoso> tomsmeding: well guaranteed zero space.
12:09:25 <dminuoso> I suppose unit might be elided in some cases too
12:09:31 <hpc> it's like a void-returning function in C
12:09:41 <tomsmeding> probably, but in a data type it's I think a full pointer
12:10:10 <dminuoso> hpc: How would you construct `f :: Int -> (# #)` then?
12:10:19 <dminuoso> Im not sure the comparison really holds, because you cant do that
12:11:06 <dminuoso> `newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #))`
12:11:23 <dminuoso> In this it makes sense, as its just a vehicle to drag a phantom type through, and provide some magical tokens that have no runtime representation
12:11:32 <dminuoso> But State# is apparently deeply magical
12:11:43 <dminuoso> (Isomorphic to (##) though as far as I can tell)
12:11:48 × Kaiepi quits (~Kaiepi@142.68.249.28) (Ping timeout: 264 seconds)
12:13:06 <tomsmeding> is it useful for yahb2 to be on a more recent compiler
12:13:50 <dminuoso> Sure, how else could I procastinate with unboxed tuples on IRC?
12:14:01 <tomsmeding> oh hey 9.2.4 is now recommended in ghcup!!!
12:14:22 elbear joins (~lucian@188.24.138.239)
12:16:41 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
12:19:15 <merijn> Guest6: Not super, but OTOH, it's also not super complex
12:19:47 × acidjnk quits (~acidjnk@p200300d6e7137a99918d58bfa2347072.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
12:20:31 spacenautx joins (~spacenaut@user/spacenautx)
12:20:53 <tomsmeding> % :q
12:20:53 <yahb2> <no output>
12:20:58 <tomsmeding> % :set -XUnboxedTuples
12:20:58 <yahb2> <no output>
12:21:05 <tomsmeding> % f :: (# Int, Int #) -> () ; f _ = ()
12:21:05 <yahb2> <no output>
12:21:12 <tomsmeding> dminuoso: 9.2.4 now :)
12:23:01 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 268 seconds)
12:23:42 zxx7529 joins (~Thunderbi@user/zxx7529)
12:24:01 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
12:24:53 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
12:25:08 <dminuoso> Sweet, thank you
12:26:40 × drlkf quits (~drlkf@chat.drlkf.net) (Quit: drlkf)
12:26:58 drlkf joins (~drlkf@chat.drlkf.net)
12:27:34 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 258 seconds)
12:27:36 × drlkf quits (~drlkf@chat.drlkf.net) (Client Quit)
12:27:53 drlkf joins (~drlkf@chat.drlkf.net)
12:28:05 × yahb2 quits (~yahb2@2a01:4f8:c0c:5c7b::2) (Remote host closed the connection)
12:28:49 yahb2 joins (~yahb2@2a01:4f8:c0c:5c7b::2)
12:30:00 ircbrowse_tom joins (~ircbrowse@2a01:4f8:1c1c:9319::1)
12:30:01 Server sets mode +Cnt
12:31:12 Kaiepi joins (~Kaiepi@142.68.249.28)
12:32:36 × drlkf quits (~drlkf@chat.drlkf.net) (Client Quit)
12:32:53 drlkf joins (~drlkf@chat.drlkf.net)
12:37:05 rockystone joins (~rocky@user/rockymarine)
12:37:31 × mastarija quits (~mastarija@2a05:4f46:e03:6000:a9d8:5076:9112:988e) (Quit: Leaving)
12:38:40 edrx joins (~Eduardo@2804:56c:d2cf:4c00:4e88:4940:415:b08a)
12:39:34 × drlkf quits (~drlkf@chat.drlkf.net) (Quit: drlkf)
12:39:51 drlkf joins (~drlkf@chat.drlkf.net)
12:40:38 <edrx> hi all! anyone knows/remembers any recent paper that uses box diagrams like the one at the bottom of this file? http://angg.twu.net/HASKELL/State1.hs.html
12:41:28 <edrx> oops, I forgot to mention: on arxiv, or in some other place that makes the sources available...
12:42:31 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 258 seconds)
12:43:00 <edrx> I finally found a way to change Tikz diagrams bit by bit from a REPL, and I would like to see if I can start with the source in Tikz for a box diagram like that an modify it
12:43:02 ccapndave joins (~ccapndave@xcpe-62-167-164-44.cgn.res.adslplus.ch)
12:43:11 × ccapndave quits (~ccapndave@xcpe-62-167-164-44.cgn.res.adslplus.ch) (Client Quit)
12:43:51 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
12:44:30 × drlkf quits (~drlkf@chat.drlkf.net) (Client Quit)
12:44:47 drlkf joins (~drlkf@chat.drlkf.net)
12:47:33 ircbrowse_tom joins (~ircbrowse@static.162.49.55.162.clients.your-server.de)
12:47:38 Server sets mode +Cnt
12:49:19 <edrx> aah, there's one in Fong & Spivak: https://arxiv.org/pdf/1803.05316.pdf#page=4
12:49:23 <edrx> sorry for the noise =)
12:49:24 × finsternis quits (~X@23.226.237.192) (Read error: Connection reset by peer)
12:50:47 × Guest6 quits (~Guest6@2a01cb0408ee99001bcd18dfc58a6927.ipv6.abo.wanadoo.fr) (Quit: Client closed)
12:52:16 <edrx> even better: https://github.com/appliedcategorytheory/TikZWD
12:55:07 ircbrowse_tom joins (~ircbrowse@2a01:4f8:1c1c:9319::1)
12:55:12 Server sets mode +Cnt
12:57:45 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.5)
13:00:28 zero joins (~z@user/zero)
13:02:11 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
13:03:24 × zzz quits (~z@user/zero) (Ping timeout: 264 seconds)
13:03:36 __monty__ joins (~toonn@user/toonn)
13:04:07 × tomsmeding quits (~tomsmedin@2a01:4f8:c0c:5e5e::2) (Quit: ZNC 1.8.2 - https://znc.in)
13:04:22 × spacenautx quits (~spacenaut@user/spacenautx) (Quit: WeeChat 3.0)
13:04:49 tomsmeding joins (~tomsmedin@static.21.109.88.23.clients.your-server.de)
13:07:56 × frost quits (~frost@user/frost) (Ping timeout: 244 seconds)
13:08:16 × wonko quits (~wjc@2a0e:1c80:2:0:45:15:19:130) (Ping timeout: 246 seconds)
13:08:39 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
13:10:13 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614)
13:13:00 Kaipei joins (~Kaiepi@142.68.249.28)
13:14:04 Kaipii joins (~Kaiepi@142.68.249.28)
13:14:43 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614) (Ping timeout: 248 seconds)
13:15:34 thegeekinside joins (~thegeekin@189.180.7.159)
13:16:51 × Kaiepi quits (~Kaiepi@142.68.249.28) (Ping timeout: 248 seconds)
13:17:56 × Kaipei quits (~Kaiepi@142.68.249.28) (Ping timeout: 268 seconds)
13:19:01 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Remote host closed the connection)
13:20:16 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
13:21:26 emad joins (~emad@156.214.189.113)
13:22:21 rockystone joins (~rocky@user/rockymarine)
13:25:51 elbear joins (~lucian@188.24.138.239)
13:26:34 × son0p quits (~ff@181.136.122.143) (Quit: leaving)
13:27:27 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
13:31:01 ccapndave joins (~ccapndave@xcpe-62-167-164-44.cgn.res.adslplus.ch)
13:31:48 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
13:32:37 ll joins (~ll@atoulouse-258-1-7-21.w90-16.abo.wanadoo.fr)
13:33:19 × zxx7529 quits (~Thunderbi@user/zxx7529) (Quit: zxx7529)
13:34:27 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Quit: Leaving)
13:36:12 son0p joins (~ff@181.136.122.143)
13:39:06 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
13:46:00 × razetime quits (~quassel@117.193.4.154) (Ping timeout: 264 seconds)
13:51:17 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
13:54:44 wroathe joins (~wroathe@user/wroathe)
13:55:19 rockystone joins (~rocky@user/rockymarine)
13:56:06 × hololeap quits (~quassel@user/hololeap) (Quit: Bye)
13:58:01 hololeap joins (~quassel@user/hololeap)
14:01:26 nschoe joins (~q@141.101.51.197)
14:03:26 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
14:05:09 × emad quits (~emad@156.214.189.113) (Quit: Leaving)
14:06:21 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 260 seconds)
14:08:54 rockystone joins (~rocky@user/rockymarine)
14:10:26 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
14:12:31 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:c6ca:2b6d:906a:6c9f) (Quit: WeeChat 2.8)
14:13:07 geekosaur joins (~geekosaur@xmonad/geekosaur)
14:15:08 <ski> edrx : (not papers, but) possibly Bartosz Milewski uses such diagrams, not sure. there's also the somewhat related "railroad" diagrams, for `Maybe'/`Either'
14:18:19 Sgeo joins (~Sgeo@user/sgeo)
14:18:48 shriekingnoise joins (~shrieking@186.137.167.202)
14:21:29 acidjnk joins (~acidjnk@p54ad5adb.dip0.t-ipconnect.de)
14:22:04 × kenran quits (~user@user/kenran) (Remote host closed the connection)
14:26:24 <edrx> ski: where can I find examples of these railroad diagrams?
14:27:41 Guest|60 joins (~Guest|60@137.155.240.225)
14:28:22 <Guest|60> sorry i am confused how do i start the download of Haskell?
14:28:46 <Guest|60> i copy and paste the command line prompt from the website but it gives me an error
14:31:19 × edrx quits (~Eduardo@2804:56c:d2cf:4c00:4e88:4940:415:b08a) (Ping timeout: 268 seconds)
14:31:46 razetime joins (~quassel@117.193.4.154)
14:32:35 <[exa]> Guest|60: what is your system and from which website do you copypaste the command?
14:32:54 <[exa]> (also, ideally, what is the error :D )
14:33:12 <Guest|60> https://www.haskell.org/downloads/
14:33:24 <Guest|60> Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;Invoke-Command -ScriptBlock ([ScriptBlock]::Create((Invoke-WebRequest https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -ArgumentList $true
14:33:55 × ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
14:33:56 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
14:34:10 <[exa]> that's some kind of windows and powershell?
14:34:26 <Guest|60> 'Set-ExecutionPolicy' is not recognized as an internal or external command,
14:34:26 <Guest|60> operable program or batch file.
14:34:33 ec_ joins (~ec@gateway/tor-sasl/ec)
14:34:33 <Guest|60> yes windows
14:34:34 azimut joins (~azimut@gateway/tor-sasl/azimut)
14:34:53 <Guest|60> i typed it into the command prompt
14:35:44 <ski> you probably need to open a PowerShell, not an ordinary Command window (or `<Windows>-r')
14:36:24 × elkcl quits (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) (Ping timeout: 264 seconds)
14:36:27 elkcl_ joins (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru)
14:36:34 elkcl_ is now known as elkcl
14:36:57 <[exa]> Guest|60: I didn't touch windows for like 15 years now so I really don't know, but there are many windows users around, so if you wait they will surely give some advice
14:37:02 <Guest|60> thank you that was the issue
14:37:07 <[exa]> ah nice. :]
14:38:55 × jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 246 seconds)
14:39:56 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:41:56 burnsidesLlama joins (~burnsides@client-8-80.eduroam.oxuni.org.uk)
14:45:49 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
14:45:55 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
14:46:15 azimut joins (~azimut@gateway/tor-sasl/azimut)
14:49:13 nate1 joins (~nate@98.45.169.16)
14:49:55 × Guest|60 quits (~Guest|60@137.155.240.225) (Quit: Connection closed)
14:54:08 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
14:59:03 mikoto-chan joins (~mikoto-ch@193.185.223.3)
15:02:44 × nschoe quits (~q@141.101.51.197) (Ping timeout: 268 seconds)
15:03:53 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 252 seconds)
15:06:16 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 258 seconds)
15:06:57 ChaiTRex joins (~ChaiTRex@user/chaitrex)
15:07:15 × Ram-Z quits (~Ram-Z@li1814-254.members.linode.com) (Ping timeout: 250 seconds)
15:07:49 ft joins (~ft@p3e9bc57b.dip0.t-ipconnect.de)
15:14:11 CiaoSen joins (~Jura@p200300c95700eb002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
15:18:11 × kuribas quits (~user@ptr-17d51emi970ix5xwkf4.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
15:19:36 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 264 seconds)
15:26:07 × hgolden quits (~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection)
15:26:59 × acidjnk quits (~acidjnk@p54ad5adb.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
15:29:21 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
15:31:39 rockystone joins (~rocky@user/rockymarine)
15:31:47 × teo quits (~teo@user/teo) (Ping timeout: 248 seconds)
15:32:58 × burnsidesLlama quits (~burnsides@client-8-80.eduroam.oxuni.org.uk) (Remote host closed the connection)
15:34:03 × ccapndave quits (~ccapndave@xcpe-62-167-164-44.cgn.res.adslplus.ch) (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:34:39 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.7)
15:35:37 shapr joins (~user@144.163.4.141)
15:37:24 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
15:39:03 elbear joins (~lucian@188.24.138.239)
15:44:43 vn36 joins (~vn36@123.63.203.210)
15:44:57 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 252 seconds)
15:45:46 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
15:46:58 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Client Quit)
15:47:09 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614)
15:52:21 vn36 parts (~vn36@123.63.203.210) ()
15:52:41 × euandreh quits (~euandreh@179.214.113.107) (Ping timeout: 268 seconds)
15:53:13 jakalx parts (~jakalx@base.jakalx.net) ()
16:08:29 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614) (Remote host closed the connection)
16:09:57 elbear joins (~lucian@188.24.138.239)
16:12:01 × shapr quits (~user@144.163.4.141) (Remote host closed the connection)
16:12:20 × Kaipii quits (~Kaiepi@142.68.249.28) (Remote host closed the connection)
16:12:44 Kaipii joins (~Kaiepi@142.68.249.28)
16:17:23 × chele quits (~chele@user/chele) (Remote host closed the connection)
16:17:39 × Kaipii quits (~Kaiepi@142.68.249.28) (Ping timeout: 248 seconds)
16:17:48 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 264 seconds)
16:18:35 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
16:22:29 Ram-Z joins (~Ram-Z@li1814-254.members.linode.com)
16:22:43 × califax quits (~califax@user/califx) (Remote host closed the connection)
16:23:31 califax joins (~califax@user/califx)
16:24:12 hgolden joins (~hgolden@cpe-172-251-233-141.socal.res.rr.com)
16:24:32 acidjnk joins (~acidjnk@p200300d6e7137a40c4feba2158f796a3.dip0.t-ipconnect.de)
16:29:05 rockystone joins (~rocky@user/rockymarine)
16:32:40 × fserucas quits (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Ping timeout: 246 seconds)
16:35:28 × merijn quits (~merijn@86.86.29.250) (Ping timeout: 246 seconds)
16:36:02 × Everything quits (~Everythin@37.115.210.35) (Quit: leaving)
16:36:30 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
16:38:59 titibandit joins (~titibandi@xdsl-78-34-208-230.nc.de)
16:40:42 euandreh joins (~euandreh@179.214.113.107)
16:41:49 rockystone joins (~rocky@user/rockymarine)
16:43:41 Kaipii joins (~Kaiepi@142.68.249.28)
16:45:23 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 248 seconds)
16:46:23 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
16:46:33 × Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection)
16:46:58 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
16:56:35 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
16:59:47 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614)
16:59:48 × CiaoSen quits (~Jura@p200300c95700eb002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
17:01:14 caryhartline joins (~caryhartl@2600:1700:2d0:8d30:85ce:60ba:541:2d5a)
17:01:35 × ll quits (~ll@atoulouse-258-1-7-21.w90-16.abo.wanadoo.fr) (Ping timeout: 252 seconds)
17:02:12 merijn joins (~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl)
17:02:31 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
17:02:42 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:03:32 ll joins (~ll@atoulouse-258-1-7-21.w90-16.abo.wanadoo.fr)
17:04:15 × aliosablack quits (~chomwitt@2a02:587:dc0c:c200:b1b7:d42d:7f9d:2308) (Ping timeout: 268 seconds)
17:07:32 jakalx joins (~jakalx@base.jakalx.net)
17:07:48 econo joins (uid147250@user/econo)
17:20:02 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Remote host closed the connection)
17:20:16 × n8chan quits (~nate@98.45.169.16) (Quit: WeeChat 2.9)
17:21:13 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
17:25:21 × drlkf quits (~drlkf@chat.drlkf.net) (Quit: drlkf)
17:25:41 drlkf joins (~drlkf@chat.drlkf.net)
17:25:55 × Major_Biscuit quits (~MajorBisc@c-001-015-051.client.tudelft.eduvpn.nl) (Ping timeout: 250 seconds)
17:27:54 elbear joins (~lucian@188.24.138.239)
17:28:03 × titibandit quits (~titibandi@xdsl-78-34-208-230.nc.de) (Remote host closed the connection)
17:31:17 × Digit quits (~user@user/digit) (Ping timeout: 252 seconds)
17:31:33 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 258 seconds)
17:31:38 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
17:32:01 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 252 seconds)
17:32:18 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
17:32:29 × razetime quits (~quassel@117.193.4.154) (Remote host closed the connection)
17:34:03 zebrag joins (~chris@user/zebrag)
17:34:11 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Quit: Leaving)
17:40:23 zxx7529 joins (~Thunderbi@user/zxx7529)
17:42:16 zmt00 joins (~zmt00@user/zmt00)
17:44:25 geekosaur joins (~geekosaur@xmonad/geekosaur)
17:50:43 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 258 seconds)
17:51:53 azimut joins (~azimut@gateway/tor-sasl/azimut)
17:52:18 beteigeuze joins (~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df)
17:53:52 Digitteknohippie joins (~user@27.53.200.146.dyn.plus.net)
17:54:50 finsternis joins (~X@23.226.237.192)
17:57:22 <geekosaur> if I do this again, will I end up with three bugs, or four? 😛
17:57:32 <geekosaur> oh, wrong channel
17:57:51 × zxx7529 quits (~Thunderbi@user/zxx7529) (Remote host closed the connection)
18:05:28 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
18:09:31 ccapndave joins (~ccapndave@xcpe-62-167-164-44.cgn.res.adslplus.ch)
18:10:26 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Remote host closed the connection)
18:11:25 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 258 seconds)
18:12:02 × ccapndave quits (~ccapndave@xcpe-62-167-164-44.cgn.res.adslplus.ch) (Client Quit)
18:12:46 <EvanR> tomsmeding, I'm guessing it's mainly for claiming to have O(1) ++
18:12:54 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
18:12:55 <tomsmeding> EvanR: right
18:13:07 <tomsmeding> though O(1) fromList is kinda necessary for the O(1) ++ to be useful ;)
18:13:48 <EvanR> I see line 5 does that, cool.
18:14:04 <EvanR> I found this after not being able to remember where I saw some whole thing about the data type
18:14:25 <EvanR> data Bag a = Nil | Node a | Bag a :<> Bag a, or something
18:14:31 ChaiTRex joins (~ChaiTRex@user/chaitrex)
18:14:34 <EvanR> and how it's so great it's used in ghc
18:14:41 <tomsmeding> right, same idea but without the ListBag
18:14:56 <tomsmeding> in my usecases for the type I've not yet needed the listbag constructor
18:17:09 <EvanR> did you mean O(1) toList
18:17:14 <EvanR> because that would be interesting
18:17:34 <tomsmeding> it's impossible to have O(1) (++) _and_ O(1) toList
18:17:36 <tomsmeding> :p
18:17:41 × Digitteknohippie quits (~user@27.53.200.146.dyn.plus.net) (Changing host)
18:17:42 Digitteknohippie joins (~user@user/digit)
18:17:42 Digitteknohippie is now known as Digit
18:18:02 <tomsmeding> O(n) toList is the best you're going to get I think
18:18:06 <EvanR> cetacean needed
18:18:11 <tomsmeding> yeah
18:18:20 <tomsmeding> classical difference lists also have O(n) toList
18:18:37 <EvanR> or just push onto a list and reverse it
18:18:46 <tomsmeding> but I'm not sure O(n) toList is so bad; after all, you also needed to do n work to build the thing :)
18:20:05 <EvanR> so no idea where the OG paper on Bag is? xD
18:20:14 <tomsmeding> does there need to be a paper on Bag?
18:20:18 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
18:20:22 <tomsmeding> as I said, I independently reinvented it multiple times :p
18:21:12 <EvanR> is it understandable, yes. Does it work, yes. What's the history, etymology, where was it used or first used with this name, other details, it's not obvious just from looking at the paste xD
18:21:24 <tomsmeding> right :p
18:21:45 <tomsmeding> "where was it first used" is bound to be a question that some people are working on to make easier to answer
18:22:00 <tomsmeding> recently I learned of the existence of a conference called "Mining Software Repositories"
18:22:15 × Digit quits (~user@user/digit) (Ping timeout: 252 seconds)
18:22:18 <tomsmeding> if that exists, research to code "etymology" is bound to also exist
18:22:53 <EvanR> I guess mainly I thought I might run into the article I may have remembered
18:23:13 <EvanR> seems like something you'd see in a functional hacker zine
18:23:39 <tomsmeding> it's also something that wouldn't be out of place in a functional pearl about something
18:23:49 <tomsmeding> but probably not the main point :p
18:24:15 <EvanR> light weight stupid functional tricks
18:24:35 <tomsmeding> they're the best though
18:25:27 AlexNoo_ joins (~AlexNoo@178.34.163.70)
18:26:55 Digitteknohippie joins (~user@user/digit)
18:28:29 × Alex_test quits (~al_test@178.34.161.92) (Ping timeout: 252 seconds)
18:28:31 × AlexNoo quits (~AlexNoo@178.34.161.92) (Ping timeout: 246 seconds)
18:28:42 × AlexZenon quits (~alzenon@178.34.161.92) (Ping timeout: 268 seconds)
18:29:07 kenran joins (~user@user/kenran)
18:29:14 <tomsmeding> difference may be more "elegant" in some sense, but Bag is easier to understand
18:29:18 <tomsmeding> *difference lists
18:30:13 <tomsmeding> actually I can argue that they're both elegant in their own way
18:30:18 <EvanR> DList has more blind faith xD
18:30:31 <tomsmeding> difference lists is Cayley-transformation, Bag is mapping into the free monoid
18:30:40 <EvanR> Bag has the flaws made obvious
18:31:24 <EvanR> what's "the math" for cons onto a list and finally reversing it xD
18:31:53 <tomsmeding> you mean wanting to construct a list front-to-back, and instead constructing the reverse back-to-front and then reversing it?
18:32:09 <tomsmeding> ¯\_(ツ)_/¯
18:32:21 <EvanR> "the math" name to make it sound better xD
18:32:27 justHaunted is now known as ffffffradiofree
18:32:44 elbear joins (~lucian@188.24.138.239)
18:32:46 <tomsmeding> not sure this has a nice algebraic generalisation
18:32:48 ffffffradiofree is now known as jusFffffffradiof
18:32:58 AlexZenon joins (~alzenon@178.34.163.70)
18:33:09 nate1 joins (~nate@98.45.169.16)
18:33:53 × Digitteknohippie quits (~user@user/digit) (Read error: Connection reset by peer)
18:33:55 Alex_test joins (~al_test@178.34.163.70)
18:34:48 <EvanR> the problem itself doesn't seem very algebraic at first. Because it involves the technical difficulties of haskell not being able to (easily?) remember the end of an unfinished list and append to it
18:34:57 `2jt joins (~jtomas@90.red-88-17-81.dynamicip.rima-tde.net)
18:35:25 <tomsmeding> it's not quite that you're not able to _remember_ the end
18:35:31 <tomsmeding> you can: you can just keep a reference to it
18:35:41 <tomsmeding> but that doesn't help you, because you'd like to mutate it in place
18:35:49 <tomsmeding> in a sense
18:36:14 <EvanR> which is what the usual evaluation of a list does behind the scenes, and dlist is one way to manage it
18:36:28 <tomsmeding> what, the mutation?
18:36:33 <tomsmeding> there's no mutation in dlist :p
18:36:39 <EvanR> expressing "the end of this list"
18:36:41 <tomsmeding> no
18:36:51 <tomsmeding> you know that newtype DList a = DList ([a] -> [a]) ?
18:36:54 <EvanR> the rest of this list
18:37:08 <EvanR> yeah I got that, my words are just messed up
18:37:15 <EvanR> which will happen if you mix levels in haskell
18:37:20 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 268 seconds)
18:37:27 <tomsmeding> instead of keeping a _reference_ to the end of the list, you're kind of not having an end at all -- you're producing a function that _takes_ the end and then tucks it in place
18:37:42 <EvanR> references to thunks being overwritten with new references to the answer
18:37:55 <tomsmeding> oh in that sense
18:38:05 <tomsmeding> still, untrue, I think
18:38:11 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 260 seconds)
18:38:15 <tomsmeding> it's not that the end is a thunk that's later replaced with the rest
18:38:15 <c_wraith> nah, it's true enough
18:38:33 <tomsmeding> though I guess everything in haskell can be seen in that light if you squint hard enough :P
18:38:34 <EvanR> for the task of appending to the end of a list, whether it mutates like that or explicitly really doens't matter
18:38:37 <c_wraith> Once you realize it with toList, anyway, you get a huge pile of thunks
18:38:45 <tomsmeding> yeah sure
18:38:46 <davean> Its actually the target that is rewritten
18:39:04 <EvanR> makes more sense
18:39:11 <EvanR> so you don't need to update all the references
18:39:58 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:40:40 <davean> Look up "blackholing"
18:41:20 <davean> This is critical to understanding how GHC performance and non-strictness behaves
18:41:28 <EvanR> another way to get the same effect is unsafePerformIOing each node onto the end of a list, which reads from a Var somewhere, that some thread is writing to xD
18:41:39 <c_wraith> Here's the funny thing about DList: I've re-invented it myself, before I even knew it was a common thing. "Huh, if I pass around a function that applies a prefix to a list, I don't need a separate reverse step"
18:42:12 <c_wraith> EvanR: if you leave out the unsafePerformIO part, that's essentially what Chan gives you
18:42:39 <EvanR> yeah reading from a Char is great
18:42:46 <EvanR> Chan
18:43:03 <EvanR> though it requires IO
18:43:04 <c_wraith> ... also, toList on Chan actually does do the unsafeInterleaveIO stuff
18:43:15 <davean> EvanR: It doesn't!
18:43:25 <EvanR> :thonk:
18:43:30 <davean> You can access it as a lazy list
18:43:42 <c_wraith> you still need IO to write to it
18:43:58 <davean> To write, not read
18:44:04 <EvanR> that's fine. Actually that's a drop in replacement for my stupid idea
18:44:21 <c_wraith> that's why I brought it up. :P
18:44:30 <c_wraith> let someone else write all that fragile code!
18:45:17 <EvanR> now to race that wild scheme with Bag or DList or cons-onto-list-backwards-then-reverse-it
18:45:24 <EvanR> for the same purpose
18:45:42 <EvanR> (which Bag devolves into)
18:46:21 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
18:48:42 Digit joins (~user@user/digit)
18:48:49 × beteigeuze quits (~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df) (Ping timeout: 246 seconds)
18:50:56 × kenran quits (~user@user/kenran) (Remote host closed the connection)
18:51:14 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
18:51:19 kenran joins (~user@user/kenran)
18:53:09 × kenran quits (~user@user/kenran) (Remote host closed the connection)
18:53:13 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
18:57:26 × mikoto-chan quits (~mikoto-ch@193.185.223.3) (Ping timeout: 260 seconds)
18:58:15 odnes joins (~odnes@5-203-243-27.pat.nym.cosmote.net)
18:58:33 × odnes quits (~odnes@5-203-243-27.pat.nym.cosmote.net) (Remote host closed the connection)
18:59:58 × raym quits (~aritra@user/raym) (Remote host closed the connection)
19:04:22 × tam-carre quits (~tam-carre@2a01cb088a83b300a322b3f387318318.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
19:04:39 tam-carre joins (~tam-carre@2a01cb088a83b300a322b3f387318318.ipv6.abo.wanadoo.fr)
19:05:49 raym joins (~aritra@user/raym)
19:11:16 chomwitt joins (~chomwitt@80.106.160.196)
19:14:21 elbear joins (~lucian@188.24.138.239)
19:14:24 wootehfoot joins (~wootehfoo@user/wootehfoot)
19:14:52 ccapndave joins (~ccapndave@xcpe-62-167-164-44.cgn.res.adslplus.ch)
19:16:45 × ccapndave quits (~ccapndave@xcpe-62-167-164-44.cgn.res.adslplus.ch) (Client Quit)
19:17:53 jusFffffffradiof is now known as justThumbs
19:19:07 <dminuoso> Does quickcheck have some way to express `a === b === c`?
19:19:48 Guest69 joins (~Guest69@uwyo-129-72-137-144.uwyo.edu)
19:20:09 justThumbs is now known as justVain
19:22:08 <dminuoso> Oh well, I guess I can just conjure this up with `counterexample`
19:23:21 <[exa]> surprisingly not many
19:23:30 <[exa]> (ways to express that)
19:23:54 <dminuoso> Well, `counterexample` seems general enough to let you build most arbitrary things.
19:24:25 <dminuoso> (===) is just a convenience wrapper for it
19:25:22 <ski> express transitivity ? "all equal" ?
19:25:30 <dminuoso> Yes
19:25:30 × Guest69 quits (~Guest69@uwyo-129-72-137-144.uwyo.edu) (Quit: Client closed)
19:25:35 <ski> (which ? :)
19:25:41 <[exa]> I'm slightly more concerned about the multicomparison, naive `shrink` will be super biased
19:26:00 <dminuoso> For my case it wont be, its rather a sort of roundtrip comparison
19:26:18 <dminuoso> ski: all equal
19:26:46 <ski> assuming transitivity of the equivalence relation, presumably
19:27:18 <dminuoso> I consider transitivity to be a requirement for Eq as per Haskell 2010 report.
19:29:08 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds)
19:33:32 coot parts (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) ()
19:34:37 <ski> @type Test.QuickCheck.conjoin . (zipWith (Test.QuickCheck.===) `ap` tail) -- dminuoso ?
19:34:39 <lambdabot> (Eq a, Show a) => [a] -> Test.QuickCheck.Property.Property
19:35:55 × gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
19:36:00 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
19:37:32 wonko joins (~wjc@2a0e:1c80:2:0:45:15:19:130)
19:38:06 kenran joins (~user@user/kenran)
19:39:53 michalz joins (~michalz@185.246.207.217)
19:42:17 × tam-carre quits (~tam-carre@2a01cb088a83b300a322b3f387318318.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
19:42:27 × Digit quits (~user@user/digit) (Ping timeout: 248 seconds)
19:42:34 tam-carre joins (~tam-carre@2a01cb088a83b300a322b3f387318318.ipv6.abo.wanadoo.fr)
19:43:42 pavonia joins (~user@user/siracusa)
19:43:55 Digit joins (~user@user/digit)
19:45:59 × kenran quits (~user@user/kenran) (Read error: Connection reset by peer)
19:49:36 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
19:54:45 LukeHoersten joins (~LukeHoers@user/lukehoersten)
19:57:31 AlexNoo_ is now known as AlexNoo
19:59:47 <tomsmeding> ski: sneakily throwing in the (->) monad
20:01:31 fserucas joins (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
20:04:59 <dminuoso> ski: Ah that's neat.
20:05:12 vorpuni joins (~pvorp@2001:861:3881:c690:f50d:140:1a73:58b4)
20:08:01 × elbear quits (~lucian@188.24.138.239) (Ping timeout: 260 seconds)
20:09:40 TonyStone joins (~TonyStone@cpe-74-76-51-197.nycap.res.rr.com)
20:09:52 emmanuelux joins (~emmanuelu@user/emmanuelux)
20:14:14 <ski> (of course, you could also just compare every element to the first one)
20:14:31 <ski> tomsmeding : fastest way to derive it, for me :)
20:15:49 × tam-carre quits (~tam-carre@2a01cb088a83b300a322b3f387318318.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
20:16:06 tam-carre joins (~tam-carre@2a01cb088a83b300a322b3f387318318.ipv6.abo.wanadoo.fr)
20:20:35 × ubert quits (~Thunderbi@178.165.199.63.wireless.dyn.drei.com) (Quit: ubert)
20:23:25 ss4 joins (~wootehfoo@user/wootehfoot)
20:26:30 × haritz quits (~hrtz@user/haritz) (Ping timeout: 264 seconds)
20:26:41 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds)
20:28:45 wootehfoot joins (~wootehfoo@user/wootehfoot)
20:30:33 talismanick joins (~talismani@2601:200:c100:c9e0::1b0b)
20:31:26 × ss4 quits (~wootehfoo@user/wootehfoot) (Ping timeout: 268 seconds)
20:35:48 × wonko quits (~wjc@2a0e:1c80:2:0:45:15:19:130) (Ping timeout: 264 seconds)
20:38:44 kenran joins (~user@user/kenran)
20:45:26 nate1 joins (~nate@98.45.169.16)
20:45:27 haritz joins (~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220)
20:45:27 × haritz quits (~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) (Changing host)
20:45:27 haritz joins (~hrtz@user/haritz)
20:47:33 × kenran quits (~user@user/kenran) (Remote host closed the connection)
20:48:24 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614) (Remote host closed the connection)
20:50:03 × hololeap quits (~quassel@user/hololeap) (Quit: Bye)
20:50:58 causal joins (~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0e)
20:50:59 hololeap joins (~quassel@user/hololeap)
20:58:16 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:657b:163b:3e09:9614)
20:58:27 × biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer)
20:59:10 wonko joins (~wjc@2a0e:1c80:2:0:45:15:19:130)
21:04:01 × acidjnk quits (~acidjnk@p200300d6e7137a40c4feba2158f796a3.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
21:06:32 loras joins (~loras@c-73-139-125-125.hsd1.fl.comcast.net)
21:07:08 biberu joins (~biberu@user/biberu)
21:09:12 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
21:10:46 jmdaemon joins (~jmdaemon@user/jmdaemon)
21:12:06 × Taneb quits (~Taneb@runciman.hacksoc.org) (Ping timeout: 264 seconds)
21:13:30 Lycurgus joins (~juan@user/Lycurgus)
21:18:47 × LukeHoersten quits (~LukeHoers@user/lukehoersten) (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:19:48 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
21:20:05 LukeHoersten joins (~LukeHoers@user/lukehoersten)
21:20:48 × wonko quits (~wjc@2a0e:1c80:2:0:45:15:19:130) (Ping timeout: 264 seconds)
21:22:46 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
21:25:10 beteigeuze joins (~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df)
21:26:08 × LukeHoersten quits (~LukeHoers@user/lukehoersten) (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:27:42 × fserucas quits (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Quit: Leaving)
21:27:48 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
21:29:51 × beteigeuze quits (~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df) (Remote host closed the connection)
21:30:10 beteigeuze joins (~Thunderbi@2001:8a0:61b5:6101:9233:19e9:6537:6e73)
21:33:05 × zebrag quits (~chris@user/zebrag) (Ping timeout: 268 seconds)
21:33:35 zebrag joins (~chris@user/zebrag)
21:35:12 × tam-carre quits (~tam-carre@2a01cb088a83b300a322b3f387318318.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
21:46:37 × talismanick quits (~talismani@2601:200:c100:c9e0::1b0b) (Ping timeout: 246 seconds)
21:48:41 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds)
21:50:05 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt juan@acm.org)
21:51:26 × michalz quits (~michalz@185.246.207.217) (Remote host closed the connection)
21:53:01 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:56:33 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:57:54 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
22:06:39 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
22:07:00 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
22:07:36 × `2jt quits (~jtomas@90.red-88-17-81.dynamicip.rima-tde.net) (Ping timeout: 260 seconds)
22:09:04 Tuplanolla joins (~Tuplanoll@91-159-69-34.elisa-laajakaista.fi)
22:09:15 <juri_> if i'm in a function that's being called in a typeclass, and i'm given an argument, is there a ways i can separate the constructor of that argument, and use the same constructor in my return value?
22:09:42 rockystone joins (~rocky@user/rockymarine)
22:12:05 × tinwood quits (~tinwood@canonical/tinwood) (Remote host closed the connection)
22:13:18 tinwood joins (~tinwood@general.default.akavanagh.uk0.bigv.io)
22:13:18 × tinwood quits (~tinwood@general.default.akavanagh.uk0.bigv.io) (Changing host)
22:13:18 tinwood joins (~tinwood@canonical/tinwood)
22:14:59 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 248 seconds)
22:15:36 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 258 seconds)
22:16:45 v0rpun1 joins (~pvorp@185.212.69.251)
22:16:56 × vorpuni quits (~pvorp@2001:861:3881:c690:f50d:140:1a73:58b4) (Ping timeout: 260 seconds)
22:18:57 <geekosaur> only if you can do it via e.g. fmap
22:19:08 <geekosaur> if I understand what you're asking
22:19:36 <juri_> so, i've found a hack, wondering if it can be made more-safe-sane.
22:19:55 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
22:20:18 <juri_> in a function which accepts argument a, which is of typeclass b, i want to return a value which is constructed with the same constructor as a.
22:20:31 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
22:21:28 <juri_> so, i just implemented consLikeA a -> (value -> c), and made it part of the typeclass. now the implementations will resolve a, and consLikeA will return a constructor.
22:22:55 <hpc> how many constructors are we talking about here?
22:23:12 <juri_> just two, in this case.
22:23:21 <juri_> hmm. ghc doesn't like my answer.
22:23:58 <hpc> maybe just make it a "law" of that type class?
22:23:59 <geekosaur> this fails to surprise me
22:24:28 × hololeap quits (~quassel@user/hololeap) (Quit: Bye)
22:24:29 <juri_> oh, typo.
22:24:34 <juri_> it likes that.
22:26:03 <juri_> so yeah, that's how you solve it. i was just looking for a better method of constructor mirroring.
22:27:35 <juri_> and GHC is satisfied that the input and output types are the same. win!
22:28:09 `2jt joins (~jtomas@90.red-88-17-81.dynamicip.rima-tde.net)
22:29:56 <EvanR> I wonder if "being called from a typeclass" matters at all
22:30:41 <geekosaur> sounds like it needed to be defined within the typeclass so each instance could provide an appropriate instantiation?
22:30:49 <juri_> yep.
22:31:15 <juri_> EvanR: sorry, i've been a C programmer for 30 years. i'm still recovering. ;)
22:31:32 <EvanR> if it's more than 2 constructors there's always Generics
22:32:07 juri_ nods.
22:32:30 <juri_> for my application, it'll always be two constructors. normallized, and not-normallized. writing an algebra engine.
22:34:36 alecs joins (~alecs@host-62-211-49-5.retail.telecomitalia.it)
22:38:06 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
22:40:28 × ll quits (~ll@atoulouse-258-1-7-21.w90-16.abo.wanadoo.fr) (Remote host closed the connection)
22:41:05 <[Leary]> juri_: It's hard to say what you should do without seeing the code. If you're dealing with something like `data FooBar a = Normed (Bar a) | Raw (Bar a)`, you can factor into `data Norm = Normed | Raw; data Foo bar a = Foo{ norm :: Norm, bar :: bar a }`. Then even if `bar` varies by instance, you can always share `Foo` and see `norm`.
22:43:20 <EvanR> if it's data NormedRaw a = Normed a | Raw a you can derive Functor...
22:43:36 <EvanR> and use fmap
22:44:56 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 260 seconds)
22:45:01 wonko joins (~wjc@2a0e:1c80:2:0:45:15:19:130)
22:45:01 <juri_> i'm dealing with both the painless and the painful way. tl;dr: i'm rewriting a 3500 line diff, and using typeclasses this time. i had two types in the 'old' branch, then moved to one type in the 'new' branch.. and now am just implementing three typeclasses, and migrating both branches through.
22:45:06 <juri_> its working out.
22:45:46 <juri_> and i don't have a million case statements to do dumb pattern matches. so, win.
22:46:09 <juri_> haskell is doing a good job of making this pain-free. i'm deep in a mess, and impressed.
22:47:48 <monochrom> My question would be "what if there is no such thing as a constructor? for example it's a lambda" but I guess the stated question is never the real question.
22:49:00 <monochrom> Or more sinisterly it's "newtype X = X (Int -> Bool)" so it "has" a "constructor" but no it doesn't.
22:51:39 <geekosaur> I think it still has one from the standpoint of the second. the first means a function instance can't be used unless (->) is allowed to be the "constructor"
22:54:38 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
23:00:06 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 260 seconds)
23:00:23 <ski> "haskell is doing a good job of making this pain-free. i'm deep in a mess, and impressed." -- those two things aren't a bit at odds with each other ?
23:00:53 <ski> (.. hm, unless you mean that Haskell helps resolve, or ameliorate, the mess)
23:01:16 × gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
23:01:38 <monochrom> Yes.
23:01:57 <monochrom> And also programmers are not known to be particularly coherent writers. :)
23:02:07 <ski> juri_ : anyway, your talk about "constructor" is pretty vague, hard to get a feel for what you're really doing / wanting to do
23:02:28 <ski> perhaps sometimes they're known not to be :)
23:06:22 <EvanR> you got your known knowns, and you got your not knowns, then you got your known nots
23:08:18 <EvanR> rumsfeld was enumering something isomorphic to sierpinsky space
23:08:51 <EvanR> *Sierpiński
23:12:21 × alecs quits (~alecs@host-62-211-49-5.retail.telecomitalia.it) (Ping timeout: 260 seconds)
23:14:00 alecs joins (~alecs@151.68.55.160)
23:14:41 × alecs quits (~alecs@151.68.55.160) (Client Quit)
23:15:22 <dolio> Sierpinski has at most two points, though.
23:16:55 <EvanR> points shmoints we really care about the opens
23:17:16 rockystone joins (~rocky@user/rockymarine)
23:18:40 <dolio> Seems a little more like Σ².
23:18:41 ski . o O ( unknown knowns )
23:19:45 <dolio> Oh, actually, not that one.
23:21:05 <EvanR> type Rumsfeld = Maybe (Maybe ())
23:21:16 <dolio> Σ[ p ∈ 𝕊 ] (p → 2), switching up my notation.
23:21:19 × Tuplanolla quits (~Tuplanoll@91-159-69-34.elisa-laajakaista.fi) (Quit: Leaving.)
23:22:23 <juri_> ski: the mess is my own: three plus months of developing without breaking into small commits. now i'm writing small commits, in a new tree, using the previous tree for reference.
23:22:24 <dolio> Subsingletons of 2.
23:23:28 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds)
23:26:28 ski . o O ( "First Steps in Synthetic Computability Theory" by Andrej Bauer in 2004 at <https://math.andrej.com/2005/05/08/first-steps-in-synthetic-computability-theory/> )
23:28:45 <ski> juri_ : mhm, i see
23:31:19 k8yun joins (~k8yun@user/k8yun)
23:31:31 <ski> dolio : element of Sierpiński construed as a type ?
23:32:09 <dolio> Yes, it's a subtype of the propositions.
23:32:36 <ski> which ? Sierpiński, or what you wrote (which i don't understand) ?
23:32:41 <EvanR> In the synthetic universe, the computable functions are simply all the functions, the computably enumerable sets are all the enumerable sets, etc. So we may just speak about ordinary sets and functions and never worry about which ones are computable. So Andre is basically using haskell xD
23:33:38 <dolio> 𝕊 is. In the computability setting, it the subtype of propositions that are equivalent to ∃ n. α n, where α : ℕ -> 2.
23:34:39 <dolio> What I wrote is the monad of subsingletons of a type, if you generalize 2 to an arbitrary type. Which subsingletons it is are determined by the subtype of propositions in the first part.
23:34:51 <dolio> So, in this case, it's the semidecidable subsingletons of 2.
23:36:35 <dolio> If you use Ω, it's all subsingletons, and `A → Σ[ p ∈ Ω ] (p → B)` are the partial functions.
23:36:47 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
23:37:31 <dolio> Because that type is equivalent to a predicate on A, and a function well defined on the subset of A given by the predicate.
23:37:39 × rockystone quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
23:38:45 rockystone joins (~rocky@user/rockymarine)
23:39:39 <dolio> If you use the decidable propositions, 2, you get the equivalent of A -> Maybe B.
23:41:13 <dolio> The `∃ n. α n` thing is like being equivalent to a Σ₁ statement, but synthetically.
23:41:15 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
23:42:15 × Sgeo quits (~Sgeo@user/sgeo) (Quit: Leaving)
23:45:28 <dolio> So, what I wrote is like what you'd use to model the partial recursive functions in a total language.
23:45:32 <ski> dolio : oh, now i see. the Sierpiński element is interpreted as a subobject of the singleton (which i guess you alluded to)
23:45:38 <dolio> As a Kleisli category.
23:45:53 nate1 joins (~nate@98.45.169.16)
23:46:10 <ski> (treating ⌜𝕊⌝ as a mini-universe of encodings of types, perhaps)
23:46:16 <dolio> Yeah.
23:48:31 <dolio> The partial order on it is just function spaces between its decodings.
23:49:22 × `2jt quits (~jtomas@90.red-88-17-81.dynamicip.rima-tde.net) (Ping timeout: 268 seconds)
23:50:36 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
23:52:36 × wonko quits (~wjc@2a0e:1c80:2:0:45:15:19:130) (Ping timeout: 260 seconds)
23:55:15 × v0rpun1 quits (~pvorp@185.212.69.251) (Ping timeout: 248 seconds)
23:55:18 vorpuni joins (~pvorp@195.200.221.43)
23:56:07 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
23:56:47 Sgeo joins (~Sgeo@user/sgeo)
23:57:49 `2jt joins (~jtomas@90.red-88-17-81.dynamicip.rima-tde.net)

All times are in UTC on 2022-10-14.