Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,803,621 events total
2021-07-26 18:19:32 <DigitalKiwi> there are 4 lights
2021-07-26 18:19:48 <mastarija> roboguy__, right
2021-07-26 18:20:02 <mastarija> Thought of that, but it kind of felt cheaty :D
2021-07-26 18:20:27 <roboguy__> There's unfortunately no non-cheating solution, hah. That might be the best among them
2021-07-26 18:20:32 <catern> roboguy__: hm, yes, but that's opposite of what I'm talking about though, that's generating Haskell from C headers/XML
2021-07-26 18:20:35 × pbrisbin quits (~patrick@162.210.105.197) (Ping timeout: 255 seconds)
2021-07-26 18:20:39 <mastarija> Yes
2021-07-26 18:20:59 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-07-26 18:21:10 <mastarija> Well, off I go experimenting some more. I kind of want to avoid extra libraries, because I'm doing so well without dependencies right now.
2021-07-26 18:22:00 <mastarija> And I kind of like my libraries to have as few dependencies as possible.
2021-07-26 18:22:04 vk3wtf_ joins (~doc@207.134.220.203.dial.dynamic.acc01-carp-beg.comindico.com.au)
2021-07-26 18:22:27 <roboguy__> It is worth mentioning, though, that the Validated_ type will have different Functor instances, etc, from the original
2021-07-26 18:23:07 <roboguy__> If you can get away with just having a Monoid instance instead of an Alternative instance, I would probably go for just the Monoid instance myself
2021-07-26 18:23:17 × vk3wtf quits (~doc@59-102-26-152.tpgi.com.au) (Ping timeout: 255 seconds)
2021-07-26 18:23:47 × LukeHoersten quits (~LukeHoers@user/lukehoersten) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-07-26 18:23:59 <[exa]> mastarija: btw, what does the Monoid instance look like for your Validated?
2021-07-26 18:24:32 <mastarija> [exa], `mempty = Inert mempty
2021-07-26 18:24:32 <mastarija> ; mappend = (<>)`
2021-07-26 18:24:38 <roboguy__> catern: Ah. Hmm, well I am not sure in that case. I'm sure it's possible, but I don't know if it's been automated
2021-07-26 18:25:45 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2021-07-26 18:25:51 × sedeki quits (~textual@user/sedeki) (Quit: Textual IRC Client: www.textualapp.com)
2021-07-26 18:26:08 geekosaur joins (~geekosaur@xmonad/geekosaur)
2021-07-26 18:26:22 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 272 seconds)
2021-07-26 18:27:06 <mastarija> [exa], why do you ask?
2021-07-26 18:27:09 <[exa]> mastarija: how does that work? mappend doesn't kinda typecheck for me
2021-07-26 18:27:55 <mastarija> [exa], Validated e also has a Semigroup instance
2021-07-26 18:28:07 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
2021-07-26 18:28:10 <mastarija> That's where <> is coming from
2021-07-26 18:28:18 <mastarija> If that's what confuses you
2021-07-26 18:28:27 <monochrom> At some point I would doubt that Validate is supposed to be an Alternative instance.
2021-07-26 18:29:19 <roboguy__> (<>) is the default implementation for mappend in newer versions of `base`
2021-07-26 18:29:39 × Null_A quits (~null_a@2601:645:8700:2290:98e5:42b9:7e41:db99) (Remote host closed the connection)
2021-07-26 18:30:04 <mastarija> monochrom, I think I'll just add another "Inert" value without an argument e.g. `data Validated e = Neutral | Inert e | Wrong e`
2021-07-26 18:30:10 <mastarija> I think this will solve the problem
2021-07-26 18:30:28 berberman joins (~berberman@user/berberman)
2021-07-26 18:30:42 × berberman_ quits (~berberman@user/berberman) (Ping timeout: 240 seconds)
2021-07-26 18:31:54 × jolly quits (~jolly@208.180.97.158) (Quit: Connection closed)
2021-07-26 18:32:03 <roboguy__> mastarija: Would it work to use Maybe (Validated e) when you need to use an Alternative instance? That would let you avoid adding a new constructor
2021-07-26 18:32:05 <mastarija> Yep, that pretty much solves it
2021-07-26 18:32:51 <mastarija> roboguy__, I'd have to think about it. Validated is supposed to be internal type anyway, so it might be ok since users won't see it anyway.
2021-07-26 18:33:03 <mastarija> roboguy__, But it might make my code less pretty :D
2021-07-26 18:34:25 <[exa]> mastarija: ah so
2021-07-26 18:36:11 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-07-26 18:37:12 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-07-26 18:39:11 Null_A joins (~null_a@2601:645:8700:2290:98e5:42b9:7e41:db99)
2021-07-26 18:43:45 fef joins (~thedawn@user/thedawn)
2021-07-26 18:44:07 <maerwald> https://hackage.haskell.org/package/conduit-1.3.4.1/docs/Conduit.html#v:concatMapMC who knows what this does
2021-07-26 18:44:08 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: Lost terminal)
2021-07-26 18:44:41 × dunkeln quits (~dunkeln@94.129.69.87) (Ping timeout: 265 seconds)
2021-07-26 18:45:55 lavaman joins (~lavaman@98.38.249.169)
2021-07-26 18:45:57 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-07-26 18:46:20 deejaytee joins (~deejaytee@cpc91196-cmbg18-2-0-cust215.5-4.cable.virginm.net)
2021-07-26 18:46:49 × enoq quits (~enoq@194-208-179-35.lampert.tv) (Quit: enoq)
2021-07-26 18:46:58 <monochrom> Perhaps you can instantiate mono = [a], Element mono = a.
2021-07-26 18:47:20 <monochrom> Then you have: Monad m => (a -> m [a]) -> ConduitT a a m ()
2021-07-26 18:47:24 slack1256 joins (~slack1256@181.203.14.134)
2021-07-26 18:48:11 <monochrom> err perhaps mono = [b], Element mono = b.
2021-07-26 18:48:24 <monochrom> Monad m => (a -> m [b]) -> ConduitT a b m ()
2021-07-26 18:49:03 <monochrom> Recall vanilla concatMap :: (a -> [b]) -> [a] -> [b].
2021-07-26 18:49:38 <monochrom> So suppose you generalize a->[b] to a -> m [b], and [a]->[b] to ConduitT a b m ()
2021-07-26 18:51:03 <maerwald> mono is `Maybe a` I think in my case and the whole conduit run seems to process the input in reverse and then short-circuit on the first Nothing
2021-07-26 18:51:11 <maerwald> it's rather odd
2021-07-26 18:52:04 <maerwald> https://github.com/commercialhaskell/stack/blob/7927a3aec32e2b2e5e4fb5be76d0d50eddcc197f/src/Stack/Setup.hs#L629-L632
2021-07-26 18:52:29 <monochrom> I would not be surprised at short-circuting Nothing. >>= does it. Everyone does it.
2021-07-26 18:52:48 <maerwald> the expected behavior would be to process list in order and then short-circuit on the first Just
2021-07-26 18:52:52 <maerwald> so this is all upside down
2021-07-26 18:53:00 <maerwald> s/list/stream/
2021-07-26 18:53:34 arkho joins (~ccc@dynamic-acs-24-112-153-241.zoominternet.net)
2021-07-26 18:54:04 dunkeln joins (~dunkeln@94.129.69.87)
2021-07-26 18:58:15 LukeHoersten joins (~LukeHoers@user/lukehoersten)
2021-07-26 19:02:07 × phma quits (~phma@host-67-44-209-47.hnremote.net) (Read error: Connection reset by peer)
2021-07-26 19:03:24 drd joins (~drd@93-39-151-19.ip76.fastwebnet.it)
2021-07-26 19:03:42 × son0p quits (~ff@181.136.122.143) (Ping timeout: 250 seconds)
2021-07-26 19:04:48 × zeenk quits (~zeenk@2a02:2f04:a008:d600:18f2:3421:bac6:8f38) (Quit: Konversation terminated!)
2021-07-26 19:08:50 <Hecate> tdammers: how much do I need to bribe you to give life to this extension? https://gitlab.haskell.org/ghc/ghc/-/wikis/intrinsic-superclasses
2021-07-26 19:08:54 <Hecate> :P
2021-07-26 19:09:20 × curiousgay quits (~curiousga@77-120-186-48.kha.volia.net) (Ping timeout: 265 seconds)
2021-07-26 19:11:20 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-07-26 19:11:57 savask parts (~savask@Powder/Developer/savask) ()
2021-07-26 19:13:13 <DigitalKiwi> how can we overthrow the capitalists if you create super classes!
2021-07-26 19:13:44 <monochrom> Actually I think that's how to overthrow the capitalists.
2021-07-26 19:13:46 jolly joins (~jolly@208.180.97.158)
2021-07-26 19:15:00 jeetelongname joins (~jeet@host-89-241-98-229.as13285.net)
2021-07-26 19:15:38 <maerwald> but they all invested in bitcoin already
2021-07-26 19:17:09 <Hecate> DigitalKiwi: fortunately, typeclasses are not marxist superstructures :P
2021-07-26 19:17:54 pera joins (~pera@user/pera)
2021-07-26 19:18:11 × shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 255 seconds)
2021-07-26 19:18:21 justsomeguy joins (~justsomeg@user/justsomeguy)
2021-07-26 19:19:23 <DigitalKiwi> https://twitter.com/ArchKiwi/status/1414030295318282241
2021-07-26 19:19:55 × roboguy__ quits (~roboguy_@2605:a601:ac0e:ae00:f433:8617:e8c3:dcbe) (Remote host closed the connection)
2021-07-26 19:20:14 roboguy_ joins (~roboguy_@2605:a601:ac0e:ae00:f433:8617:e8c3:dcbe)
2021-07-26 19:20:53 <monochrom> I think I don't know what OH and c mean there.
2021-07-26 19:21:12 <DigitalKiwi> overheard
2021-07-26 19:21:39 <Hecate> c's => cease, monochrom
2021-07-26 19:21:42 <monochrom> I guess "c's" is meant to be pronounced like "seize"
2021-07-26 19:22:25 <monochrom> @quote monochrom faster.than.
2021-07-26 19:22:25 <lambdabot> monochrom says: einstein's theory implies that haskell cannot be faster than c
2021-07-26 19:22:35 <DigitalKiwi> yeah, "seize" = "c is" = "c's"
2021-07-26 19:23:14 phma joins (phma@2001:0:c38c:c38c:2470:b89:bcd3:2fcf)
2021-07-26 19:23:27 <monochrom> memes of production

All times are in UTC.