Logs on 2021-03-12 (freenode/#haskell)
| 00:00:17 | × | acidjnk_new quits (~acidjnk@p200300d0c72b95695d3c722039acad7c.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 00:01:17 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a) |
| 00:01:33 | × | smol quits (b0259152@host-176-37-145-82.b025.la.net.ua) (Quit: Connection closed) |
| 00:02:26 | → | elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) |
| 00:02:26 | → | ezrakilty joins (~ezrakilty@75-172-115-167.tukw.qwest.net) |
| 00:03:11 | × | ezrakilty quits (~ezrakilty@75-172-115-167.tukw.qwest.net) (Remote host closed the connection) |
| 00:04:25 | × | Alex4 quits (~Alex@185.204.1.185) (Remote host closed the connection) |
| 00:05:37 | → | mirrorbird joins (dwsjeid911@gateway/vpn/mullvad/dwsjeid911) |
| 00:05:53 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 245 seconds) |
| 00:07:19 | → | Tario joins (~Tario@201.192.165.173) |
| 00:07:50 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:ac7b:d5c9:2180:6a41) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 00:10:33 | × | usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving) |
| 00:10:35 | → | CoconutCrab joins (~Cua@unaffiliated/coconutcrab) |
| 00:10:45 | × | elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 264 seconds) |
| 00:11:34 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 256 seconds) |
| 00:11:49 | → | acidjnk_new joins (~acidjnk@p200300d0c72b956934e83b974e1e2a7d.dip0.t-ipconnect.de) |
| 00:13:35 | → | acidjnk_new2 joins (~acidjnk@p200300d0c72b9569d92adbcad5e9416b.dip0.t-ipconnect.de) |
| 00:15:57 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
| 00:16:24 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 00:17:47 | × | acidjnk_new quits (~acidjnk@p200300d0c72b956934e83b974e1e2a7d.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 00:17:54 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 00:20:19 | → | blackjid joins (~blackjid@178.239.168.171) |
| 00:21:35 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 00:22:57 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 00:26:27 | → | bennofs__ joins (~quassel@dslb-188-106-247-127.188.106.pools.vodafone-ip.de) |
| 00:30:33 | × | bennofs_ quits (~quassel@dslb-094-222-060-049.094.222.pools.vodafone-ip.de) (Ping timeout: 264 seconds) |
| 00:32:52 | → | swarmcollective joins (~joseph@cpe-24-208-140-96.insight.res.rr.com) |
| 00:34:13 | → | conal joins (~conal@66.115.157.67) |
| 00:38:07 | × | Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
| 00:39:07 | × | Neuromancer quits (~Neuromanc@unaffiliated/neuromancer) (Ping timeout: 276 seconds) |
| 00:40:04 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 00:40:09 | × | mrchampion_ quits (~mrchampio@38.18.109.23) (Ping timeout: 264 seconds) |
| 00:43:55 | → | mrchampion joins (~mrchampio@38.18.109.23) |
| 00:45:13 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds) |
| 00:45:39 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 00:46:43 | → | elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) |
| 00:47:55 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 00:54:58 | → | xsperry joins (~as@unaffiliated/xsperry) |
| 00:57:44 | × | finn_elija quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Remote host closed the connection) |
| 00:58:38 | <sm[m]> | hey all. Today I came across Alt for the first time. https://hackage.haskell.org/package/base-4.14.1.0/docs/Data-Monoid.html#g:5 . Why does it exist ? |
| 00:58:51 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:ac7b:d5c9:2180:6a41) |
| 01:00:00 | → | curiousgay joins (~gay@178.217.208.8) |
| 01:01:50 | → | finn_elija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) |
| 01:03:01 | <monochrom> | Let F be an Alternative instance, X be a type. Then F X is conceptually a Monoid instance in an obvious way: foo <> bar = foo <|> bar, mempty = empty. |
| 01:04:00 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 01:04:16 | <monochrom> | But writing "instance Alternative f => Monoid (f a)" is problematic in many ways. Since "f a" contains no type constructor at all, this is going to be a hell of an overlapping instance. |
| 01:04:26 | <monochrom> | So, need a newtype wrapper again. |
| 01:08:33 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds) |
| 01:08:53 | <sm[m]> | thanks monochrom . That takes some work for a learner to unpack. Out of interest, do you think this can be explained in a single beginner friendly sentence ? |
| 01:10:04 | <sm[m]> | "A wrapper that makes it easier to combine arbitrary types monoidally" ? |
| 01:10:53 | → | rajivr joins (uid269651@gateway/web/irccloud.com/x-xljhenfdjyrbvgti) |
| 01:11:03 | <monochrom> | A beginner would not know Alternative in the first place, and by extension would not worry about Alt. |
| 01:11:43 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds) |
| 01:11:46 | <monochrom> | But the illegality of "instance ... => Monoid (f a)" can be chalked up to just Haskell 2010 rules. |
| 01:12:03 | <sm[m]> | I'm trying to envision that happy future world where the haddock is more explanatory |
| 01:12:16 | <sm[m]> | all the haddocks |
| 01:12:19 | <monochrom> | The rationale for the draconian rules would be a long story though. |
| 01:13:39 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 01:15:11 | <monochrom> | I don't envision that everything in every doc makes sense to every beginner. |
| 01:15:36 | <monochrom> | I only envision that everything in every doc makes sense to those who have the necessary prerequisite. |
| 01:16:03 | <sm[m]> | we're envisioning different kinds of doc I think |
| 01:16:36 | <sayola> | is there a lib that has a ready debug type with Num/Fractional instance for logging ops? |
| 01:16:55 | <monochrom> | The sentence I would write for Alt is "Monoid operations of Alt f a are Alternative operations of f.". which is just an explicit version of the current "Monoid under <|>.". Enuf said. |
| 01:17:24 | × | robotmay quits (~beepboop@2001:8b0:7af0:2580:2c2a:5a7f:e21d:de48) (Quit: Be excellent to each other) |
| 01:18:16 | <monochrom> | There is no one single sentence that teaches Monoid and Alternative. Not even two sentences. |
| 01:18:21 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds) |
| 01:18:33 | <monochrom> | And if the job of the doc of Alt is to teach both, that's just absurd. |
| 01:20:56 | × | thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds) |
| 01:21:05 | <slack1256> | I love Alt. It with STM helped me implement a `epoll` like interface for threads :-P . |
| 01:21:19 | <sm[m]> | somebody wants to change: |
| 01:21:19 | <sm[m]> | finds :: (Foldable t) => (a -> Maybe b) -> t a -> Maybe b |
| 01:21:19 | <sm[m]> | finds f = asum . map f . toList |
| 01:21:21 | <sm[m]> | to: |
| 01:21:21 | <sm[m]> | finds f = getAlt . foldMap (Alt . f) |
| 01:21:33 | <sm[m]> | is it clearer ? if you already know what it means, sure |
| 01:21:43 | → | robotmay joins (~beepboop@80.172.187.81.in-addr.arpa) |
| 01:21:50 | <sm[m]> | like most haskell docs, I guess |
| 01:22:06 | <sm[m]> | s/docs/haddocks/ |
| 01:22:40 | <monochrom> | Where is this "finds"? |
| 01:22:51 | <monochrom> | Not in base, at least. |
| 01:23:11 | <sm[m]> | no, it's some random helper in hledger-lib |
| 01:23:33 | <monochrom> | Well then take it up to the authors of hledger-lib? |
| 01:23:48 | → | idhugo joins (~idhugo@80-62-117-241-mobile.dk.customer.tdc.net) |
| 01:24:11 | <sm[m]> | well that's me. Somebody wants to change it and I must Decide |
| 01:24:18 | × | frozenErebus quits (~frozenEre@94.128.82.20) (Ping timeout: 260 seconds) |
| 01:24:28 | <monochrom> | Then it's your call. |
| 01:24:38 | <sm[m]> | yup |
| 01:24:58 | <dolio> | It seems like the point would be to avoid allocating an intermediate data structure, not make it clearer to people learning Haskell. |
| 01:25:23 | <sm[m]> | dolio: that sounds good, I was wondering |
| 01:25:26 | <monochrom> | Much more people understand "asum . map f . toList" readily, yes. |
| 01:25:58 | × | idhugo_ quits (~idhugo@80-62-117-241-mobile.dk.customer.tdc.net) (Ping timeout: 260 seconds) |
| 01:27:08 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 245 seconds) |
| 01:27:32 | <sm[m]> | this is going to be dealing with a list of items countable with your fingers, I'm pretty sure |
| 01:27:51 | <sm[m]> | but just out of interest, is the second one indeed more efficient ? |
| 01:27:55 | <monochrom> | @type asum |
| 01:27:56 | <lambdabot> | (Foldable t, Alternative f) => t (f a) -> f a |
| 01:28:04 | × | idhugo quits (~idhugo@80-62-117-241-mobile.dk.customer.tdc.net) (Ping timeout: 256 seconds) |
| 01:29:46 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 256 seconds) |
| 01:30:29 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 01:30:48 | <monochrom> | I think yes. |
| 01:30:58 | <monochrom> | The getAlt costs nothing, to begin with. |
| 01:31:48 | <monochrom> | foldMap (Alt . f) should also be just like foldMap f but it knows to use <|> instead of <> |
| 01:32:25 | × | jdt quits (~jdt@38.77.195.50) (Ping timeout: 276 seconds) |
| 01:33:12 | × | conal quits (~conal@66.115.157.67) (Quit: Computer has gone to sleep.) |
| 01:33:31 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 265 seconds) |
| 01:34:53 | → | erisco joins (~erisco@d24-57-249-233.home.cgocable.net) |
| 01:34:54 | <monochrom> | Eh, is there any problem with foldMap f ? |
| 01:35:18 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 260 seconds) |
| 01:35:21 | → | ezrakilty joins (~ezrakilty@75-172-115-167.tukw.qwest.net) |
| 01:35:28 | <monochrom> | % data MonoType = X | Y deriving (Eq, Show) |
| 01:35:28 | <yahb> | monochrom: |
| 01:35:46 | <monochrom> | % Maybe Y <> Maybe X |
| 01:35:47 | <yahb> | monochrom: ; <interactive>:214:1: error:; * Data constructor not in scope: Maybe :: MonoType -> a; * Perhaps you meant one of these: `MaybeT' (imported from Control.Monad.Trans.Maybe), variable `maybe' (imported from Data.Maybe); <interactive>:214:12: error:; * Data constructor not in scope: Maybe :: MonoType -> a; * Perhaps you meant one of these: `MaybeT' (imported from Control.Monad.Trans.Maybe |
| 01:36:18 | <monochrom> | Oh haha |
| 01:36:26 | <monochrom> | % Just Y <> Just X |
| 01:36:26 | <yahb> | monochrom: ; <interactive>:215:8: error:; * No instance for (Semigroup MonoType) arising from a use of `<>'; * In the expression: Just Y <> Just X; In an equation for `it': it = Just Y <> Just X |
| 01:36:38 | <monochrom> | % Just Y <|> Just X |
| 01:36:38 | <yahb> | monochrom: Just Y |
| 01:37:11 | → | jdt joins (~jdt@38.77.195.50) |
| 01:37:33 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 01:37:37 | <monochrom> | I wonder if I can talk you into s/Maybe/First/ :) |
| 01:37:58 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 01:38:47 | → | APugNamedPugsley joins (~13052@2601:58a:8300:f6a0:b0f3:7fc2:6f5f:380c) |
| 01:39:27 | × | gabiruh_ quits (~gabiruh@vps19177.publiccloud.com.br) (Quit: ZNC 1.7.5 - https://znc.in) |
| 01:40:32 | <monochrom> | @free phi :: a |
| 01:40:32 | <lambdabot> | f phi = phi |
| 01:40:49 | <monochrom> | I have been meditating on the profoundness of that. :) |
| 01:42:33 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 264 seconds) |
| 01:45:27 | → | gabiruh joins (~gabiruh@vps19177.publiccloud.com.br) |
| 01:46:36 | × | kupi quits (uid212005@gateway/web/irccloud.com/x-opxyvcrmwhvgrwjf) (Quit: Connection closed for inactivity) |
| 01:47:24 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Ping timeout: 246 seconds) |
| 01:48:51 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 01:51:43 | panda_man | is now known as koala_man |
| 01:51:45 | × | koala_man quits (~vidar@157.146.251.23.bc.googleusercontent.com) (Changing host) |
| 01:51:45 | → | koala_man joins (~vidar@unaffiliated/koala-man/x-2491903) |
| 01:52:10 | × | mirrorbird quits (dwsjeid911@gateway/vpn/mullvad/dwsjeid911) (Quit: Leaving) |
| 01:52:43 | <minoru_shiraeesh> | slack1256: "I love Alt. It with STM helped me implement a `epoll` like interface for threads :-P ." |
| 01:53:19 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a) (Remote host closed the connection) |
| 01:53:30 | <minoru_shiraeesh> | can you give a link to it? |
| 01:53:55 | <minoru_shiraeesh> | I mean, a link to the code |
| 01:54:14 | <slack1256> | Let me search it. |
| 01:58:31 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 02:01:52 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 02:03:23 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 245 seconds) |
| 02:03:50 | → | conal joins (~conal@192.145.118.143) |
| 02:06:36 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 256 seconds) |
| 02:07:21 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 265 seconds) |
| 02:08:08 | <minoru_shiraeesh> | reading about epoll |
| 02:08:26 | <minoru_shiraeesh> | so that's how servers actually work, right? |
| 02:08:51 | <minoru_shiraeesh> | they register themselves as listeners using epoll |
| 02:10:35 | × | Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer) |
| 02:11:32 | <minoru_shiraeesh> | the vm could add a level of indirection, but eventually it will call epoll |
| 02:11:36 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 02:11:47 | <minoru_shiraeesh> | if I understood it correctly |
| 02:11:49 | <Axman6> | I'm not sure servers have anything to do with it |
| 02:12:14 | <Axman6> | like, it's a lot level function for awaiting events on file descriptors, it's applicable to most applications that do any sort of IO |
| 02:12:20 | <Axman6> | low* |
| 02:13:51 | <slack1256> | minoru_shiraeesh: The code has changed sighly and now uses `asum` directly over STM. Check line 83 on https://github.com/glguy/irc-core/blob/v2/src/Client/EventLoop.hs . |
| 02:14:39 | <Axman6> | the app says to the OS "hey, I am interested if anything happens to these files descriptors, let me know when that happens" and then OS does that - those descriptios could be sockets so you can wait for network traffic, or files so you can respond to changes/when data becomes available to read. using those facts, you can of course implement servers which respond to multiple sockets' events |
| 02:15:24 | <minoru_shiraeesh> | slack1256: thanks! gonna take a look |
| 02:15:56 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 02:16:22 | <Axman6> | slack1256: fyi, you can link directly to a particular line on github by clicking its line number and then copying the url for the page from the browser: https://github.com/glguy/irc-core/blob/v2/src/Client/EventLoop.hs#L83 |
| 02:16:51 | <slack1256> | Woah, nice. |
| 02:17:01 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 265 seconds) |
| 02:17:18 | Axman6 | wonders if his glirc client understands that we're talking about its implementation, using itself |
| 02:17:27 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a) |
| 02:17:58 | × | m0rphism quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 260 seconds) |
| 02:18:01 | <liyang> | Have you implemented the self-conscious trait? |
| 02:18:20 | <slack1256> | yeah, look out for the `fix` calls. |
| 02:18:28 | <Axman6> | No, I'd need rust to do that :( |
| 02:18:41 | <minoru_shiraeesh> | Axman6, there are other system calls that we could use instead of epoll to implement a server? |
| 02:19:01 | slack1256 | something somethin io-uring |
| 02:19:04 | <Axman6> | minoru_shiraeesh: yes, select and poll IIRC |
| 02:19:44 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 02:20:00 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:dc3f:d8f8:3e53:f67a) (Remote host closed the connection) |
| 02:20:08 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 02:20:08 | → | stree joins (~stree@68.36.8.116) |
| 02:21:28 | × | conal quits (~conal@192.145.118.143) (Ping timeout: 260 seconds) |
| 02:22:33 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:8580:920a:628b:ceb2) |
| 02:23:33 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
| 02:24:44 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 02:25:00 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 02:25:10 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 02:25:18 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
| 02:25:22 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 02:26:54 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 02:27:21 | → | conal joins (~conal@64.71.133.70) |
| 02:29:45 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 246 seconds) |
| 02:33:38 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 02:34:17 | <curiousgay> | Axman6: minoru_shiraeesh: select and poll are slower than linux's epoll and bsd's kqueue, also depending on use case you might want to use libevent https://libevent.org/ to abstract useage of these platform-specific interfaces |
| 02:37:33 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds) |
| 02:37:45 | × | cheater quits (~user@unaffiliated/cheater) (Ping timeout: 264 seconds) |
| 02:37:46 | → | drbean joins (~drbean@TC210-63-209-174.static.apol.com.tw) |
| 02:38:19 | → | cheater joins (~user@unaffiliated/cheater) |
| 02:38:30 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 246 seconds) |
| 02:39:16 | × | tomku quits (~tomku@unaffiliated/tomku) (Quit: Lost terminal) |
| 02:41:07 | × | zangi quits (~azure@103.154.230.250) (Ping timeout: 256 seconds) |
| 02:42:07 | → | Tario joins (~Tario@201.192.165.173) |
| 02:42:48 | <infinisil> | Alternative instances are awesome |
| 02:43:01 | → | zangi joins (~azure@103.154.230.242) |
| 02:43:16 | <infinisil> | Recently was able to use Concurrently's Alternative instance to run threads in parallel |
| 02:43:17 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 02:43:54 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:ac7b:d5c9:2180:6a41) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:44:00 | <infinisil> | And via slack1256 I learned about STM's Alternative instance, which is just empty = retry and <|> = orElse |
| 02:44:05 | <infinisil> | Which is pretty cool |
| 02:44:21 | <slack1256> | Yep, makes eventloop real neat. |
| 02:44:48 | × | redmp_ quits (~redmp@172.58.19.17) (Ping timeout: 260 seconds) |
| 02:45:45 | <infinisil> | Though looking at Alternative, I have no idea what `some` and `many` do |
| 02:46:12 | <infinisil> | The docs just say "One or more." and "Zero or more.", which is as vague as can be |
| 02:46:14 | <monochrom> | They make most sense for parsers. |
| 02:46:16 | <slack1256> | In terms of regexes, some is * and many is +. |
| 02:46:34 | → | Lord_of_Life_ joins (~Lord@unaffiliated/lord-of-life/x-0885362) |
| 02:47:18 | <infinisil> | > some (Just 1) |
| 02:47:20 | <lambdabot> | *Exception: <<loop>> |
| 02:47:33 | × | xff0x_ quits (~xff0x@2001:1a81:53d2:5300:7d58:fd61:d678:3ab7) (Ping timeout: 272 seconds) |
| 02:47:35 | <infinisil> | > some [1] |
| 02:47:38 | <lambdabot> | *Exception: <<loop>> |
| 02:47:44 | <monochrom> | But you can also have an STM action that if you run repeatedly, it succeeds for the first few times, and fails once. Then many and some stops there and returns the list of the answers you got from the successes. |
| 02:47:57 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 264 seconds) |
| 02:48:12 | → | tomku joins (~tomku@unaffiliated/tomku) |
| 02:48:23 | × | Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 245 seconds) |
| 02:48:23 | Lord_of_Life_ | is now known as Lord_of_Life |
| 02:48:29 | → | redmp joins (~redmp@172.58.30.171) |
| 02:48:30 | <monochrom> | It makes no sense for Maybe. Or generally actions that always succeeds or always fails. |
| 02:48:45 | <monochrom> | Well, many is OK with always fails. But that's all. |
| 02:48:49 | <infinisil> | Hmm.. |
| 02:48:54 | <monochrom> | > many Nothing |
| 02:48:55 | <lambdabot> | Just [] |
| 02:49:02 | → | xff0x_ joins (~xff0x@2001:1a81:520c:1100:8f7b:fec1:f600:70b) |
| 02:49:14 | <infinisil> | Whaaa |
| 02:50:08 | <monochrom> | Generally, with "many foo" or "some foo", you expect to run foo several times, it succeeds the first few times, then fails. |
| 02:50:08 | <infinisil> | Oh, so it relies on the Applicative instance |
| 02:50:24 | × | zangi quits (~azure@103.154.230.242) (Ping timeout: 246 seconds) |
| 02:50:25 | <infinisil> | I kind of see |
| 02:50:56 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:ac7b:d5c9:2180:6a41) |
| 02:52:10 | <infinisil> | So `some` repeatedly runs the `f a` until it's `empty`? |
| 02:52:17 | <monochrom> | The whole of Alternative was inspired by parsing. The notation shows. |
| 02:52:24 | → | zangi joins (~azure@103.154.230.250) |
| 02:52:32 | <infinisil> | Or what does "failure" mean? |
| 02:52:42 | <monochrom> | some wants at least one success, and repeats until empty. |
| 02:52:58 | <monochrom> | many is OK with 0 successes, empty right away. |
| 02:53:06 | <monochrom> | failure = empty |
| 02:53:59 | <monochrom> | Both want to hit empty after a finite number of times, so they can stop and return a finite list of answers. |
| 02:54:37 | <infinisil> | I see, and from the implementation I can see that it uses `<|>` to decide whether the result is empty or not |
| 02:54:47 | <monochrom> | If always successful, they become unproductive infinite loops hoping for an empty that will never come. |
| 02:54:57 | <monochrom> | Yeah. |
| 02:55:03 | <infinisil> | Though laziness |
| 02:55:17 | <infinisil> | > take 10 $ some (Just 1) |
| 02:55:19 | <lambdabot> | error: |
| 02:55:19 | <lambdabot> | • Couldn't match type ‘Maybe’ with ‘[]’ |
| 02:55:19 | <lambdabot> | Expected type: [[a]] |
| 02:55:22 | <infinisil> | > take 10 <$> some (Just 1) |
| 02:55:25 | <lambdabot> | *Exception: <<loop>> |
| 02:55:27 | → | azure1 joins (~azure@103.154.230.242) |
| 02:55:30 | <infinisil> | Oor not |
| 02:55:36 | <monochrom> | Naw, you're betting on <*> being lazy then. But <*> is not lazy for most instances. |
| 02:56:21 | <monochrom> | "liftA2 (:) foo bar" will very much want to resolve foo at the very least, and most often bar too. |
| 02:57:36 | <infinisil> | Hmm |
| 02:58:06 | × | zangi quits (~azure@103.154.230.250) (Ping timeout: 265 seconds) |
| 02:58:22 | <infinisil> | > seq (some (Just 1)) 0 |
| 02:58:25 | <lambdabot> | *Exception: <<loop>> |
| 02:58:51 | <infinisil> | So `some (Just 1)` is `Just [1..]`, except that not even the `Just` can be evaluated? |
| 02:59:23 | <monochrom> | I'm afraid you don't even get to see the Just. |
| 03:00:03 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 03:00:49 | <infinisil> | Ah looking at Maybe's Applicative I see |
| 03:00:51 | <infinisil> | liftA2 f (Just x) (Just y) = Just (f x y) |
| 03:00:56 | <infinisil> | liftA2 _ _ _ = Nothing |
| 03:01:04 | <monochrom> | Roughly: some (Just 1) = liftA2 (:) (Just 1) (some (Just 1)) = liftA2 (:) (Just 1) (liftA2 (:) (Just 1) (some (Just 1))) = ... |
| 03:01:39 | <infinisil> | I see |
| 03:02:27 | × | redmp quits (~redmp@172.58.30.171) (Ping timeout: 265 seconds) |
| 03:02:40 | <infinisil> | Is there a separate type class hidden in there? Something between Applicative and Alternative that doesn't have some/many because you can't ever evaluate them? |
| 03:04:03 | <monochrom> | some and many are codable by Applicative and <|> and empty and recursion. If Alternative didn't have them, you can still always have them outside and the constraint is merely "Alternative f =>". |
| 03:04:45 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds) |
| 03:04:54 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 260 seconds) |
| 03:05:05 | <infinisil> | Ah makes sense |
| 03:05:06 | <monochrom> | Oh but they're bottom for many instances? Well that's just too bad. |
| 03:05:27 | × | CrazyPyt_ quits (~crazypyth@98.122.164.118) (Ping timeout: 246 seconds) |
| 03:05:33 | <infinisil> | I guess they're part of Alternative in case you can provide a more efficient version? |
| 03:06:00 | <monochrom> | But if you admit them into Alternative, then you save a mental vocab burden, and you enable hand-optimizations for those instances that could use the help. |
| 03:06:07 | <monochrom> | yeah. |
| 03:06:37 | <monochrom> | But I think reducing vocab burden is more valuable. |
| 03:06:51 | <monochrom> | People already do too many bikesheds. |
| 03:07:34 | <infinisil> | Checking the instances in base at least, none of them have a custom many/some implementation |
| 03:07:58 | <monochrom> | You will have to look into parser libraries. |
| 03:08:50 | <infinisil> | megaparsec nope |
| 03:09:05 | <monochrom> | I think I heard that in parsers, "manyTill" has an efficient algorithm and is more fundamental, and then "many" is better off expressed as a use of manyTill. |
| 03:09:24 | → | FinnElija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) |
| 03:09:24 | finn_elija | is now known as Guest45740 |
| 03:09:24 | FinnElija | is now known as finn_elija |
| 03:10:24 | <infinisil> | I see, though nope for parsec and aeson |
| 03:10:44 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving) |
| 03:11:15 | <infinisil> | Would be cool if hoogle/hackage could show all instances of Alternative of all libraries |
| 03:13:39 | × | Guest45740 quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 268 seconds) |
| 03:16:19 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 03:19:40 | × | urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna) |
| 03:21:12 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds) |
| 03:25:03 | × | jespada quits (~jespada@90.254.243.187) (Ping timeout: 245 seconds) |
| 03:29:21 | → | jespada joins (~jespada@90.254.243.187) |
| 03:29:39 | → | forgottenone joins (~forgotten@176.42.24.172) |
| 03:30:49 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 03:34:38 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 03:35:46 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 03:35:57 | × | theDon quits (~td@94.134.91.64) (Ping timeout: 264 seconds) |
| 03:36:17 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 265 seconds) |
| 03:37:36 | → | theDon joins (~td@muedsl-82-207-238-185.citykom.de) |
| 03:38:07 | × | barnowl_ quits (~barnowl@gateway/tor-sasl/barnowl) (Remote host closed the connection) |
| 03:38:23 | × | slack1256 quits (~slack1256@dvc-186-186-101-190.movil.vtr.net) (Remote host closed the connection) |
| 03:38:33 | → | barnowl_ joins (~barnowl@gateway/tor-sasl/barnowl) |
| 03:40:45 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 264 seconds) |
| 03:41:11 | × | Wuzzy quits (~Wuzzy@p5b0df7c2.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 03:41:53 | × | alx741 quits (~alx741@186.178.108.206) (Quit: alx741) |
| 03:41:59 | → | dansho joins (~dansho@ec2-52-194-244-43.ap-northeast-1.compute.amazonaws.com) |
| 03:47:06 | × | JokerAscensionEx quits (~egp_@2.95.74.168) (Remote host closed the connection) |
| 03:49:06 | × | erisco quits (~erisco@d24-57-249-233.home.cgocable.net) (Quit: Leaving) |
| 03:52:07 | → | Tario joins (~Tario@201.192.165.173) |
| 03:58:52 | × | acidjnk_new2 quits (~acidjnk@p200300d0c72b9569d92adbcad5e9416b.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 04:00:53 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 04:01:04 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 256 seconds) |
| 04:02:37 | × | denisse quits (~spaceCat@gateway/tor-sasl/alephzer0) (Remote host closed the connection) |
| 04:02:57 | → | denisse joins (~spaceCat@gateway/tor-sasl/alephzer0) |
| 04:03:27 | → | conal joins (~conal@64.71.133.70) |
| 04:03:33 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 04:08:27 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds) |
| 04:08:48 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 04:09:53 | <edwardk> | infinisil: hackage itself doesn't actually know anything about what is in the libraries you give it. it gets a rough index of modules it uses to spew out the front page and maybe some user generated haddocks |
| 04:11:51 | <edwardk> | infinisil: not just more efficient versions , but for some cps'd overly-strict alternatives using some/many from the class can make the difference between termination and not. |
| 04:12:01 | <edwardk> | (re some/many) |
| 04:12:31 | <infinisil> | Ah neat |
| 04:12:43 | <infinisil> | I do like things that terminate! |
| 04:12:57 | → | fresheyeball joins (~isaac@c-71-237-105-37.hsd1.co.comcast.net) |
| 04:13:16 | <fresheyeball> | I think there is a way to take a quasi quote in ghci |
| 04:13:22 | <fresheyeball> | and get the Exp for it |
| 04:13:23 | × | minoru_shiraeesh quits (~shiraeesh@46.34.206.154) (Ping timeout: 245 seconds) |
| 04:13:27 | <fresheyeball> | but I don't remember how |
| 04:13:39 | <fresheyeball> | anyone know this trick? |
| 04:14:50 | <edwardk> | infinisil: re base nothing in base looks like a parser except ReadP, and ReadP is sufficiently lazy the defaults for some/many work. |
| 04:16:08 | <fresheyeball> | I tried [e|x=3|] in ghci, bit to throws a parse error instead of showing the Exp |
| 04:16:11 | <edwardk> | some/many became important as members when parsec moved to a cps'd encoding iirc. at that point they stop working off of separate definitions |
| 04:16:21 | <edwardk> | x=3 isn't an expression |
| 04:16:27 | <edwardk> | that sounds like a statement |
| 04:16:31 | <edwardk> | x==3 |
| 04:16:33 | <glguy> | it's a quasiquoter |
| 04:16:35 | <glguy> | oh |
| 04:16:36 | <glguy> | no |
| 04:16:36 | <edwardk> | that looks like an expression |
| 04:16:39 | <fresheyeball> | I mean it as a top level declaration |
| 04:16:41 | <glguy> | [e| is not, it's an actual expression quote |
| 04:16:47 | → | JokerAscensionEx joins (~egp_@2.95.74.168) |
| 04:16:54 | <edwardk> | [e| quotes expressions, not statements |
| 04:16:58 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 04:17:05 | <glguy> | Anyway, that's beside the point |
| 04:17:15 | <glguy> | the question is just how to look at the Exp if you did have good syntax |
| 04:17:28 | → | justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311) |
| 04:17:37 | <fresheyeball> | what I am trying to build is a top level value |
| 04:17:42 | <glguy> | Prelude Language.Haskell.TH> $(stringE . show =<< [e| '1' |]) |
| 04:17:42 | <glguy> | "LitE (CharL '1')" |
| 04:17:47 | <fresheyeball> | so if Exp is the wrong thing, then I am wrong |
| 04:17:57 | <glguy> | you can do that, but I remember there being a cuter way to look at the expr |
| 04:18:04 | <glguy> | For a top-level declaration you use a [d| |
| 04:18:57 | × | elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 246 seconds) |
| 04:19:05 | <edwardk> | ghci> $(stringE . show =<< [d| x = '1' |]) |
| 04:19:05 | <edwardk> | "[ValD (VarP x_6989586621679035191) (NormalB (LitE (CharL '1'))) []]" |
| 04:19:19 | <edwardk> | mind you it defined with a fresh 'x' |
| 04:19:35 | <glguy> | I don't think there's such a thing as a fresh, top-level x |
| 04:19:39 | <fresheyeball> | there we go |
| 04:19:42 | <fresheyeball> | this will work for me |
| 04:20:06 | <glguy> | Prelude Language.Haskell.TH Language.Haskell.TH.Syntax> [d| x = 1 |] ; |
| 04:20:06 | <glguy> | Prelude Language.Haskell.TH Language.Haskell.TH.Syntax> x |
| 04:20:10 | <fresheyeball> | oh interesting |
| 04:20:22 | <fresheyeball> | the generated Name funkadelic |
| 04:21:12 | <edwardk> | glguy: was it happy with your x? |
| 04:21:18 | <glguy> | yeah |
| 04:21:18 | × | ixlun` quits (~user@213.205.241.136) (Read error: Connection reset by peer) |
| 04:21:26 | <glguy> | I meant to paste the resulting 1 |
| 04:21:28 | <edwardk> | $(let x = varP (mkName "x") in stringE . show =<< [d| $(x) = '1' |]) |
| 04:21:28 | <edwardk> | "[ValD (VarP x) (NormalB (LitE (CharL '1'))) []]" |
| 04:21:31 | <edwardk> | k |
| 04:21:43 | <edwardk> | ^- that will let you generate the name from a string if you must |
| 04:22:31 | <edwardk> | without the funkadelic x in the splice =) |
| 04:22:49 | <glguy> | [d| $(varP (mkName "x")) = 2 |] ; |
| 04:22:52 | <glguy> | if you don't want the let binding |
| 04:23:21 | <glguy> | if you want to do a function with a dynamic name you end up with: [d| $(varP (mkName "x")) = \x y z -> 2 |] ; |
| 04:23:42 | <edwardk> | mkName or newName? |
| 04:23:54 | <glguy> | For a top-level thing I don't think you can tell the difference |
| 04:23:56 | <edwardk> | oh, not _that_ dynamic =) |
| 04:24:03 | <fresheyeball> | I see |
| 04:24:35 | <glguy> | right, not dynamic binding, just a name that isn't quoted syntax |
| 04:25:06 | → | ddellaco_ joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 04:25:57 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 04:27:09 | <glguy> | like > (do x1 <- newName "x"; x2 <- newName "x"; [d| $(varP x1) = 1; $(varP x2) = 2 |]); |
| 04:27:11 | <glguy> | <interactive>:20:1: error: Multiple declarations of ‘x’ |
| 04:27:58 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 245 seconds) |
| 04:28:14 | <glguy> | to my point about newName not doing anything for top-level decls |
| 04:28:32 | → | plutoniix joins (~q@184.82.214.51) |
| 04:28:34 | <edwardk> | ah yes, that was a fix at one point, wasn't it |
| 04:28:51 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 04:28:54 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds) |
| 04:28:54 | <glguy> | I don't know, but I wish we had them |
| 04:29:06 | <glguy> | I don't remember if we used to have them |
| 04:29:10 | <edwardk> | i've definitely exported horribleness by using newname in the distant past |
| 04:29:27 | <glguy> | You used to be able to name things reserved keywords, with spaces, etc |
| 04:29:31 | <edwardk> | yeah |
| 04:29:35 | × | ep1ctetus quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer) |
| 04:29:36 | <glguy> | then definitely "fixed" that |
| 04:29:38 | Axman6 | looks at singletons |
| 04:29:38 | <edwardk> | that was around the same time |
| 04:29:53 | <edwardk> | i'm sad about losing keywords |
| 04:29:56 | <edwardk> | those were useful |
| 04:30:10 | <edwardk> | Foo.type was nice =) |
| 04:30:28 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 245 seconds) |
| 04:33:33 | → | ep1ctetus joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 04:33:48 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds) |
| 04:34:28 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 04:37:05 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:8580:920a:628b:ceb2) (Remote host closed the connection) |
| 04:37:26 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:8580:920a:628b:ceb2) |
| 04:37:30 | × | MVQq quits (~anja@198.254.199.42) (Quit: q) |
| 04:38:02 | → | toorevitimirp joins (~tooreviti@117.182.180.50) |
| 04:38:04 | → | MarcelineVQ joins (~anja@198.254.199.42) |
| 04:38:23 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 04:38:51 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 04:39:15 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 246 seconds) |
| 04:40:46 | → | stree joins (~stree@68.36.8.116) |
| 04:41:41 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 04:43:05 | → | okeuday_bak joins (~okeuday@24-113-18-65.wavecable.com) |
| 04:43:14 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: Lost terminal) |
| 04:43:45 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 264 seconds) |
| 04:43:46 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 04:43:50 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 260 seconds) |
| 04:45:15 | <okeuday_bak> | Hi, I was wondering why https://hackage.haskell.org/package/cabal-install-3.4.0.0/cabal-install-3.4.0.0.tar.gz doesn't have ./bootstrap.sh as the README.md file describes. How should cabal-install be built otherwise? |
| 04:49:42 | <glguy> | okeuday_bak, generally you don't build cabal-install, you install it via ghcup as a binary |
| 04:51:45 | <okeuday_bak> | glguy: I would prefer to compile it, to ensure I have the source code that created it. |
| 04:52:07 | <glguy> | the bootstrap.sh is in the git repository |
| 04:52:36 | <glguy> | you can download a normal binary and then recompile your own using it; that'd be the simplest |
| 04:52:43 | <glguy> | you'll be using a GHC you didn't compile along the way |
| 04:53:10 | × | plutoniix quits (~q@184.82.214.51) (Ping timeout: 260 seconds) |
| 04:53:56 | <okeuday_bak> | glguy: I already have different GHC versions I have compiled, I have normally compiled cabal-install in the past, though I know one release had version problems in the bootstrap.sh file |
| 04:54:42 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 04:55:55 | <okeuday_bak> | glguy: it looks like bootstrap.sh needs to be generated based on https://github.com/haskell/cabal/tree/master/bootstrap , right? |
| 04:58:36 | <okeuday_bak> | glguy: will the next cabal-install package have a way to build it? |
| 04:59:11 | → | redmp joins (~redmp@172.58.30.171) |
| 04:59:26 | × | polyphem quits (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Ping timeout: 264 seconds) |
| 05:00:00 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 256 seconds) |
| 05:01:50 | × | jespada quits (~jespada@90.254.243.187) (Ping timeout: 265 seconds) |
| 05:02:16 | × | dfeuer quits (~dfeuer@pool-173-79-253-62.washdc.fios.verizon.net) (Ping timeout: 256 seconds) |
| 05:04:22 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 05:05:21 | → | jespada joins (~jespada@90.254.243.187) |
| 05:13:23 | <okeuday_bak> | yeah, it is weird because https://github.com/haskell/cabal/ branch 3.4 has ./travis-bootstrap.sh break because ./bootstrap.sh is missing there too |
| 05:15:59 | <okeuday_bak> | specifically, I was attempting to get cabal-install 3.4 working with ghc 9.0.1 |
| 05:16:26 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 256 seconds) |
| 05:21:45 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:8580:920a:628b:ceb2) (Remote host closed the connection) |
| 05:22:46 | × | drbean quits (~drbean@TC210-63-209-174.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in) |
| 05:24:53 | <sclv> | okeuday_bak: they swapped release managers and didn’t do everything right |
| 05:24:57 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:697d:9bfb:3507:4a9d) |
| 05:25:03 | <sclv> | its a process |
| 05:25:54 | <okeuday_bak> | sclv: I tried the bootstrap/bootstrap.py (3.4 branch) with 8.10.1 since that config file was there and that didn't work, I can always wait for the next cabal-install release, that seems best |
| 05:27:23 | <okeuday_bak> | (thought it might generate with 8.10.1, to possibly be used with 9.0.1, but that was wishful thinking) |
| 05:30:02 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 05:30:07 | <okeuday_bak> | anyway, thanks for the info, will try the next release |
| 05:30:27 | ← | okeuday_bak parts (~okeuday@24-113-18-65.wavecable.com) () |
| 05:31:02 | → | plutoniix joins (~q@184.82.214.51) |
| 05:34:14 | × | fresheyeball quits (~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9) |
| 05:34:33 | → | fresheyeball joins (~isaac@c-71-237-105-37.hsd1.co.comcast.net) |
| 05:35:19 | <fresheyeball> | how does overloaded strings and TH interact |
| 05:35:21 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 264 seconds) |
| 05:35:21 | Axman6 | was about to recommend okeuday_bak look into participating in BDSM, it sounds less painful |
| 05:35:47 | <fresheyeball> | I thought I could use LitE . StringL to make Text if overloaded strings is on |
| 05:35:50 | <fresheyeball> | but ghci says no |
| 05:37:21 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:697d:9bfb:3507:4a9d) (Remote host closed the connection) |
| 05:39:08 | <Axman6> | can you make an expression for fromString applied to the string literal? |
| 05:39:20 | <fresheyeball> | yes |
| 05:39:20 | <Axman6> | (preferably fromStringN) |
| 05:39:28 | <fresheyeball> | what is fromStringN? |
| 05:40:34 | <Axman6> | oh, I thought there was an equivalent of IsList's fromListN :: Int -> [Item l] -> l |
| 05:41:01 | <Axman6> | useful for more efficient instances of Vector etc. |
| 05:43:21 | → | jonathanx joins (~jonathan@h-176-109.A357.priv.bahnhof.se) |
| 05:43:31 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:44:28 | × | JokerAscensionEx quits (~egp_@2.95.74.168) (Quit: EXIT) |
| 05:47:23 | × | ezrakilty quits (~ezrakilty@75-172-115-167.tukw.qwest.net) (Remote host closed the connection) |
| 05:55:46 | → | shellin joins (bab726a6@186.183.38.166) |
| 05:56:43 | <fresheyeball> | Axman6:++ |
| 06:02:20 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 256 seconds) |
| 06:05:11 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 06:05:16 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 06:05:26 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 06:06:07 | × | plutoniix quits (~q@184.82.214.51) (Ping timeout: 265 seconds) |
| 06:09:00 | ← | shellin parts (bab726a6@186.183.38.166) () |
| 06:10:03 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds) |
| 06:12:24 | → | aqd joins (~aqd@84.20.147.33) |
| 06:13:28 | × | Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer) |
| 06:17:52 | → | graf_blutwurst joins (~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) |
| 06:18:17 | × | xff0x_ quits (~xff0x@2001:1a81:520c:1100:8f7b:fec1:f600:70b) (Ping timeout: 260 seconds) |
| 06:19:14 | → | xff0x_ joins (~xff0x@2001:1a81:520c:1100:ac8b:f992:eea7:f98a) |
| 06:20:10 | × | carlomagno quits (~cararell@148.87.23.9) (Quit: Leaving.) |
| 06:22:40 | <nshepperd2> | huh, apparently Data.Map.keysSet is not productive |
| 06:22:48 | → | plutoniix joins (~q@184.82.214.51) |
| 06:23:14 | <nshepperd2> | i had just sort of assumed that it was, but of course it can't be because the definition of Data.Set.Set is fully strict |
| 06:24:26 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 06:24:51 | <nshepperd2> | so something like Set.lookupLT x (Map.keysSet mymap) is actually O(n) |
| 06:27:28 | → | ezrakilty joins (~ezrakilty@75-172-115-167.tukw.qwest.net) |
| 06:27:51 | × | Jd007 quits (~Jd007@162.156.11.151) (Quit: Jd007) |
| 06:30:03 | × | stree quits (~stree@68.36.8.116) (Quit: Caught exception) |
| 06:30:12 | × | Khisanth quits (~Khisanth@24.sub-174-244-147.myvzw.com) (Ping timeout: 246 seconds) |
| 06:30:29 | → | stree joins (~stree@68.36.8.116) |
| 06:31:36 | × | ezrakilty quits (~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 246 seconds) |
| 06:31:45 | → | skdjnsdfknkjn joins (4962725d@c-73-98-114-93.hsd1.nm.comcast.net) |
| 06:32:04 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 06:32:42 | <curiousgay> | monochrom: I didn't expect that learning Haskell will help me better understand object-oriented programming o_O |
| 06:33:09 | × | ep1ctetus quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer) |
| 06:33:23 | <siraben> | curiousgay: in what regard? |
| 06:35:26 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 06:35:32 | × | fresheyeball quits (~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9) |
| 06:35:44 | <curiousgay> | siraben: it's just Haskell has polymorphism and inheritance, I thought inheritance is specific to OO and thought it's a harmful feature, but now I realize Haskell has the same kind of inheritance as Go - interface inheritance, the existence of which I didn't realize until now |
| 06:36:12 | <siraben> | multiple inheritance would be the harmful feature, right? |
| 06:36:26 | <curiousgay> | no |
| 06:36:40 | <siraben> | What's interface inheritance |
| 06:36:52 | <siraben> | oh it's like subtype polymorphism |
| 06:37:18 | <curiousgay> | both Go and Haskell support multiple inheritance, but in terms of interfaces |
| 06:37:46 | <curiousgay> | I guess you'll understand better if I say type classes in Haskell are interfaces |
| 06:38:09 | <siraben> | Right. |
| 06:38:35 | × | _Alleria quits (~AllahuAkb@2603-7000-3040-0000-84d6-f6e9-5a5d-a878.res6.spectrum.com) (Ping timeout: 240 seconds) |
| 06:38:58 | <nshepperd2> | interface inheritance as opposed to datatype inheritance |
| 06:39:17 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 06:39:30 | <curiousgay> | well yeah, I still consider datatype inheritance being harmful, instead I prefer composition |
| 06:39:44 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 06:39:49 | <siraben> | Hm I'm not familiar with OOP terms, what's datatype inheritance? |
| 06:40:21 | <nshepperd2> | the OOP term would be 'class' inheritance |
| 06:40:28 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds) |
| 06:40:30 | <siraben> | Oh ok. |
| 06:40:46 | <nshepperd2> | making a new class my smooshing together all fields and methods from an old class with new stuff |
| 06:41:05 | <siraben> | Does newtype solve the problem of having overlapping instances (e.g. additive or multiplicative monoid on Int) |
| 06:41:49 | <c_wraith> | > mappend 3 4 :: Sum Int |
| 06:41:52 | <lambdabot> | Sum {getSum = 7} |
| 06:41:52 | → | Alleria_ joins (~AllahuAkb@2603-7000-3040-0000-ac9e-148c-2486-fb78.res6.spectrum.com) |
| 06:41:55 | <c_wraith> | > mappend 3 4 :: Product Int |
| 06:41:57 | <lambdabot> | Product {getProduct = 12} |
| 06:42:15 | <siraben> | Right, yes. Just wondering about what the specific problem is called in OOP |
| 06:42:18 | <curiousgay> | nshepperd2: I've seen terms implementation/code inheritance https://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) |
| 06:43:03 | <curiousgay> | siraben: well, when there are multiple terms used to mean the same thing, it becomes confusing to explain |
| 06:43:07 | → | arrowsvc_ joins (~arr@2.93.163.35) |
| 06:43:23 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds) |
| 06:43:28 | → | Khisanth joins (~Khisanth@24.sub-174-244-147.myvzw.com) |
| 06:43:48 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 245 seconds) |
| 06:44:13 | <siraben> | confusingly I've seen "covariant" in an OO context o.O |
| 06:44:37 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:ac7b:d5c9:2180:6a41) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 06:45:21 | <nshepperd2> | the type of inheritance that haskell typeclasses have makes sense, because it has a rational interpretation as logical implication |
| 06:46:24 | <nshepperd2> | ie. considered as logical propositions, 'class Foo a => Bar a' just means that Bar a implies Foo a |
| 06:48:06 | <nshepperd2> | which in turn makes sense because there can only ever be one instance for a given type (there's never any question about 'which' Foo a is implied) |
| 06:48:08 | × | jneira quits (5127adbf@gateway/web/cgi-irc/kiwiirc.com/ip.81.39.173.191) (Quit: Connection closed) |
| 06:48:09 | <curiousgay> | but now I'm confused what is object-oriented programming if Haskell is not one |
| 06:48:42 | <curiousgay> | to my brain Haskell feels like functional and object-oriented at the same time |
| 06:48:48 | <siraben> | nshepperd2: yeah |
| 06:49:07 | <nshepperd2> | whereas implementation/datatype/class inheritance is bad because it doesn't mean anything, it's just mashing things together to make new things |
| 06:51:23 | → | dyeplexer joins (~lol@unaffiliated/terpin) |
| 06:51:27 | → | danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
| 06:52:04 | <siraben> | class inheritance isn't the same as subtyping? |
| 06:52:07 | × | waleee-cl quits (uid373333@gateway/web/irccloud.com/x-jncmlyhymogdqmtq) (Quit: Connection closed for inactivity) |
| 06:52:10 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 06:54:32 | <nshepperd2> | well, subtyping is a rather general term |
| 06:54:54 | <nshepperd2> | you might say that class inheritance is a subtype of subtyping |
| 06:55:50 | <nshepperd2> | something like "class Foo : public Bar { ... }" in C++ means that Foo is a subtype of Bar, but that doesn't necessarily tell you anything useful |
| 06:56:15 | → | [exa] joins (exa@unaffiliated/exa/x-5381537) |
| 06:56:28 | × | redmp quits (~redmp@172.58.30.171) (Quit: leaving) |
| 06:56:51 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 06:57:04 | → | johannes joins (~johannes@i577BCD21.versanet.de) |
| 06:57:09 | <sshine_> | siraben, subtyping is a more general concept, as far as I understand. |
| 06:57:19 | johannes | is now known as kenran |
| 06:57:48 | <siraben> | I see. I guess I should read the object calculus in TAPL or something, OOP is just so weird sometimes :P |
| 06:57:49 | × | kenran quits (~johannes@i577BCD21.versanet.de) (Remote host closed the connection) |
| 06:58:13 | <sshine_> | siraben, yeah, it seems like the OO concepts weren't made for formal rigor, so those who attempt it are in for a treat. |
| 06:58:13 | → | johannes joins (~johannes@i577BCD21.versanet.de) |
| 06:58:35 | <siraben> | sshine_: yeah it's just like a compatibility relation ≤ on the set of types, I forget what kind of algebraic structure it induces |
| 06:59:03 | <siraben> | Ah, a lattice |
| 06:59:29 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 07:01:29 | → | idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 07:01:38 | <sshine_> | what are you up to lately, siraben? |
| 07:01:43 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds) |
| 07:01:44 | × | zymurgy1 quits (~zymurgy@li607-220.members.linode.com) (Quit: WeeChat 1.4) |
| 07:01:59 | → | zymurgy joins (~zymurgy@li607-220.members.linode.com) |
| 07:02:23 | <siraben> | sshine_: might be better to go to #haskell-offtopic |
| 07:02:44 | → | investing joins (676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) |
| 07:04:40 | → | jumper149 joins (~jumper149@ip185225.wh.uni-hannover.de) |
| 07:10:20 | × | idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 256 seconds) |
| 07:11:21 | × | Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 264 seconds) |
| 07:13:11 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 07:13:33 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 07:14:39 | → | knupfer joins (~Thunderbi@200116b82c66870084b49eef325535f8.dip.versatel-1u1.de) |
| 07:16:17 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 07:17:58 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds) |
| 07:18:55 | → | ezrakilty joins (~ezrakilty@75-172-115-167.tukw.qwest.net) |
| 07:19:37 | → | idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 07:23:23 | × | ezrakilty quits (~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 245 seconds) |
| 07:24:30 | × | Khisanth quits (~Khisanth@24.sub-174-244-147.myvzw.com) (Ping timeout: 256 seconds) |
| 07:27:51 | investing | is now known as creamking |
| 07:31:06 | × | johannes quits (~johannes@i577BCD21.versanet.de) (Ping timeout: 246 seconds) |
| 07:31:41 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 07:31:56 | × | skdjnsdfknkjn quits (4962725d@c-73-98-114-93.hsd1.nm.comcast.net) (Quit: Connection closed) |
| 07:33:38 | creamking | is now known as cream |
| 07:36:57 | → | Khisanth joins (~Khisanth@24.sub-174-244-147.myvzw.com) |
| 07:37:09 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 264 seconds) |
| 07:39:37 | × | tfl^ quits (tfl@ip98-184-89-2.mc.at.cox.net) () |
| 07:40:45 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
| 07:43:14 | → | CodeAlways joins (uid272474@gateway/web/irccloud.com/x-joqrqepywiyvdqbk) |
| 07:45:29 | × | dansho quits (~dansho@ec2-52-194-244-43.ap-northeast-1.compute.amazonaws.com) (Quit: Leaving) |
| 07:45:34 | → | michalz joins (~user@185.246.204.112) |
| 07:46:12 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 07:47:13 | → | frozenErebus joins (~frozenEre@94.128.82.20) |
| 07:48:34 | × | PragCypher_ quits (~cypher@li1507-98.members.linode.com) (Quit: ZNC 1.7.5 - https://znc.in) |
| 07:48:49 | → | PragCypher joins (~cypher@li1507-98.members.linode.com) |
| 07:51:48 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 07:56:53 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 07:57:46 | × | haritz quits (~hrtz@unaffiliated/haritz) (Ping timeout: 265 seconds) |
| 07:58:14 | × | perrier-jouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Ping timeout: 264 seconds) |
| 07:59:33 | → | haritz joins (~hrtz@62.3.70.206) |
| 07:59:34 | × | haritz quits (~hrtz@62.3.70.206) (Changing host) |
| 07:59:34 | → | haritz joins (~hrtz@unaffiliated/haritz) |
| 08:00:09 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 08:00:23 | × | hiroaki quits (~hiroaki@2a02:8108:8c40:2bb8:7bb5:9401:98a2:564d) (Ping timeout: 265 seconds) |
| 08:00:27 | → | Yumasi joins (~guillaume@2a01cb0506313c00e14be01ac4a050f7.ipv6.abo.wanadoo.fr) |
| 08:04:03 | → | perrier-jouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 08:10:10 | × | howdoi quits (uid224@gateway/web/irccloud.com/x-sqjdgtmozwssawhg) (Quit: Connection closed for inactivity) |
| 08:12:22 | → | hiroaki joins (~hiroaki@2a02:8108:8c40:2bb8:ca74:2b42:54ac:7ebf) |
| 08:13:17 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 08:22:13 | → | kuribas joins (~user@ptr-25vy0iacnrjbfn1sihk.18120a2.ip6.access.telenet.be) |
| 08:24:17 | × | knupfer quits (~Thunderbi@200116b82c66870084b49eef325535f8.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 08:26:48 | → | ezrakilty joins (~ezrakilty@75-172-115-167.tukw.qwest.net) |
| 08:29:02 | → | timCF joins (~i.tkachuk@m91-129-99-43.cust.tele2.ee) |
| 08:29:55 | × | graf_blutwurst quits (~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) (Read error: Connection reset by peer) |
| 08:30:31 | <ukari> | @lortabac thanks, finally I got to know what is the ConstraintKinds way https://gist.github.com/ukari/527531c4e23de7ad5d6d94613bbed9d2#file-constraintkinds-hs |
| 08:30:31 | <lambdabot> | Unknown command, try @list |
| 08:31:45 | × | ezrakilty quits (~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 264 seconds) |
| 08:31:45 | → | fendor joins (~fendor@77.119.131.133.wireless.dyn.drei.com) |
| 08:32:30 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 256 seconds) |
| 08:32:49 | <timCF> | Hello! Let's say I have a type `data Foo = Foo (Maybe A) (Maybe B) (Maybe C)`. Is there any way to express on type level that at least one field should be `Just`? Of cource, I can declare big sum type like `data Foo = Foo0 A (Maybe B) (Maybe C) | Foo1 A B (Maybe C) | ...` but it does not look pretty or convenient to use |
| 08:34:17 | → | gitgood joins (~gitgood@82-132-217-25.dab.02.net) |
| 08:34:52 | <tomsmeding> | timCF: currently those three fields are values; whether they are Just or not is not reflected at all on the type level, so you can't force anything via types: Haskell isn't (yet?) a dependently-typed language |
| 08:35:19 | <tomsmeding> | so to get what you want, you'd have to reflect Just-ness on the type level; at that point you can do filtering |
| 08:36:18 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 08:36:26 | × | blackjid quits (~blackjid@178.239.168.171) (Remote host closed the connection) |
| 08:36:35 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 08:36:38 | → | graf_blutwurst joins (~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) |
| 08:37:38 | <timCF> | tomsmeding: thanks! |
| 08:38:57 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 264 seconds) |
| 08:40:07 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 08:40:19 | <tomsmeding> | timCF: for example like this: https://paste.tomsmeding.com/OxhKFSTl |
| 08:40:26 | × | makergrl quits (~ident@29.201.4.46.bc.googleusercontent.com) (Ping timeout: 260 seconds) |
| 08:40:39 | <tomsmeding> | but whether that's what you want is a different question :p |
| 08:40:45 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 08:41:08 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 08:41:21 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
| 08:41:34 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 256 seconds) |
| 08:41:46 | <tomsmeding> | to prevent even being able to construct a Foo with three Nothings, you'll have to use a type with three constructors I'm afraid |
| 08:42:04 | <tomsmeding> | as in data Foo = Foo1 A (Maybe B) (Maybe C) | Foo2 (Maybe A) B (Maybe C) | Foo3 (Maybe A) (Maybe B) C |
| 08:42:16 | <tomsmeding> | or put it in a module and export only smart constructors? |
| 08:42:43 | → | kritzefitz joins (~kritzefit@fw-front.credativ.com) |
| 08:43:47 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 08:44:29 | <timCF> | tomsmeding: smart constructor seems the easiest solution. I don't understand type families (yet) :) |
| 08:44:45 | <tomsmeding> | then please don't use them! It was also a nice exercise for me :p |
| 08:44:50 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a) (Remote host closed the connection) |
| 08:45:19 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 276 seconds) |
| 08:46:40 | × | poscat quits (~poscat@123.116.89.28) (Ping timeout: 256 seconds) |
| 08:46:41 | × | Sigyn quits (sigyn@freenode/utility-bot/sigyn) (*.net *.split) |
| 08:46:42 | → | poscat1 joins (~poscat@123.116.89.28) |
| 08:47:38 | × | graf_blutwurst quits (~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) (Read error: Connection reset by peer) |
| 08:47:48 | × | timCF quits (~i.tkachuk@m91-129-99-43.cust.tele2.ee) (Quit: leaving) |
| 08:48:38 | → | secdragon joins (~secdragon@185.204.1.185) |
| 08:48:51 | <lortabac> | ukari: if you only define a synonym for the context you can reuse it and compose it with other constraints |
| 08:48:56 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 256 seconds) |
| 08:49:42 | <lortabac> | whereas 'type Signal a = forall t m . ...' can only be used for that exact type signature |
| 08:49:46 | → | mouseghost joins (~draco@87-206-9-185.dynamic.chello.pl) |
| 08:49:46 | × | mouseghost quits (~draco@87-206-9-185.dynamic.chello.pl) (Changing host) |
| 08:49:46 | → | mouseghost joins (~draco@wikipedia/desperek) |
| 08:49:47 | × | APugNamedPugsley quits (~13052@2601:58a:8300:f6a0:b0f3:7fc2:6f5f:380c) (Read error: Connection reset by peer) |
| 08:51:09 | → | chele joins (~chele@ip5b40237d.dynamic.kabel-deutschland.de) |
| 08:51:44 | → | stree joins (~stree@68.36.8.116) |
| 08:52:37 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 08:53:33 | → | dsrt^ joins (dsrt@ip98-184-89-2.mc.at.cox.net) |
| 08:53:43 | × | zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving) |
| 08:54:20 | → | Boomerang joins (~Boomerang@2a05:f6c7:2179:0:ccd0:d305:d616:ff16) |
| 08:54:36 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 256 seconds) |
| 08:55:00 | × | Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Remote host closed the connection) |
| 08:55:19 | → | aggin joins (~ecm@103.88.87.123) |
| 08:55:46 | → | Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer) |
| 08:57:40 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 276 seconds) |
| 08:58:43 | → | zaquest joins (~notzaques@5.128.210.178) |
| 08:59:25 | → | borne joins (~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f) |
| 09:00:06 | × | the_1_[m] quits (the1matrix@gateway/shell/matrix.org/x-fxqrujvorjgfkzsc) (Quit: Idle for 30+ days) |
| 09:01:21 | × | evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Read error: Connection reset by peer) |
| 09:03:10 | → | evanjs joins (~evanjs@075-129-098-007.res.spectrum.com) |
| 09:03:23 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 245 seconds) |
| 09:03:27 | → | usr25 joins (~usr25@unaffiliated/usr25) |
| 09:03:58 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 09:05:04 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 09:05:26 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 09:08:09 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 09:10:01 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 09:12:41 | <bahamas> | anyone know if there is a library that will generate types from an openapi schems definition? |
| 09:12:44 | × | gitgood quits (~gitgood@82-132-217-25.dab.02.net) (Read error: Connection reset by peer) |
| 09:12:47 | × | aggin quits (~ecm@103.88.87.123) (Quit: WeeChat 3.0.1) |
| 09:12:48 | → | gitgoood joins (~gitgood@82-132-217-25.dab.02.net) |
| 09:13:16 | <bahamas> | I don't care about the whole http client. I just care about the types, and the JSON serialization |
| 09:16:06 | → | Gurkenglas_ joins (~Gurkengla@unaffiliated/gurkenglas) |
| 09:17:06 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 09:17:55 | <bahamas> | this seems to give me what I want https://hackage.haskell.org/package/openapi3-code-generator-0.1.0.6/docs/OpenAPI-Generate-Model.html |
| 09:20:05 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 09:20:28 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 09:20:43 | → | graf_blutwurst joins (~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) |
| 09:21:11 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 09:22:22 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 276 seconds) |
| 09:25:50 | × | shutdown_-h_now quits (~arjan@2001:1c06:2d0b:2312:d07:73d7:6ea:cc71) (Ping timeout: 264 seconds) |
| 09:29:54 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:30:03 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 09:34:24 | → | dunj3 joins (~dunj3@p200300f61714a62572ae6a6bffb9249a.dip0.t-ipconnect.de) |
| 09:34:50 | × | frozenErebus quits (~frozenEre@94.128.82.20) (Ping timeout: 256 seconds) |
| 09:37:41 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 09:38:42 | × | graf_blutwurst quits (~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) (Remote host closed the connection) |
| 09:41:53 | → | shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:84fd:19e6:b34a:aa93) |
| 09:43:19 | → | DavidEichmann joins (~david@234.109.45.217.dyn.plus.net) |
| 09:44:28 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 276 seconds) |
| 09:45:48 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) |
| 09:45:50 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 09:46:28 | gitgoood | is now known as gitgood |
| 09:49:32 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Remote host closed the connection) |
| 09:49:34 | → | LKoen joins (~LKoen@185.61.176.203) |
| 09:49:49 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 09:50:26 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Ping timeout: 264 seconds) |
| 09:51:55 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
| 09:52:16 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 09:52:26 | × | xff0x_ quits (~xff0x@2001:1a81:520c:1100:ac8b:f992:eea7:f98a) (Quit: xff0x_) |
| 09:52:35 | → | xff0x joins (~xff0x@2001:1a81:520c:1100:ac8b:f992:eea7:f98a) |
| 09:52:49 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Remote host closed the connection) |
| 09:53:07 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 09:55:28 | → | m0rphism joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) |
| 09:57:28 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 276 seconds) |
| 09:59:43 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Remote host closed the connection) |
| 10:00:04 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 10:00:31 | × | gitgood quits (~gitgood@82-132-217-25.dab.02.net) (Read error: Connection reset by peer) |
| 10:00:52 | → | ubert joins (~Thunderbi@p200300ecdf25d9cae6b318fffe838f33.dip0.t-ipconnect.de) |
| 10:04:52 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 256 seconds) |
| 10:05:10 | × | ubert quits (~Thunderbi@p200300ecdf25d9cae6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 10:05:55 | → | thc202 joins (~thc202@unaffiliated/thc202) |
| 10:08:07 | → | frozenErebus joins (~frozenEre@94.128.82.20) |
| 10:11:52 | → | Rudd0 joins (~Rudd0@185.189.115.108) |
| 10:14:20 | × | nf quits (~n@monade.li) (Quit: Fairfarren.) |
| 10:16:58 | × | frozenErebus quits (~frozenEre@94.128.82.20) (Ping timeout: 276 seconds) |
| 10:16:58 | → | gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh) |
| 10:17:18 | → | Zialus joins (~RMF@2001:818:de63:c300:211:32ff:fe8d:ad29) |
| 10:17:42 | × | Zialus_PT quits (~RMF@199.125.37.188.rev.vodafone.pt) (Ping timeout: 246 seconds) |
| 10:18:39 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 10:19:22 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection) |
| 10:19:38 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 245 seconds) |
| 10:22:18 | → | acidjnk_new2 joins (~acidjnk@p200300d0c72b95698494132ffc54748c.dip0.t-ipconnect.de) |
| 10:24:18 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 10:24:50 | → | gitgood joins (~gitgood@82-132-217-25.dab.02.net) |
| 10:29:16 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 10:31:24 | → | SIben joins (~siben@ns3106586.ip-5-135-191.eu) |
| 10:33:40 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 10:34:00 | → | nf joins (~n@monade.li) |
| 10:34:18 | × | nf quits (~n@monade.li) (Client Quit) |
| 10:34:31 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 276 seconds) |
| 10:36:36 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 10:37:15 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 10:37:26 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 10:38:14 | → | nf joins (~n@monade.li) |
| 10:38:57 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 264 seconds) |
| 10:41:26 | × | nf quits (~n@monade.li) (Client Quit) |
| 10:41:26 | → | frozenErebus joins (~frozenEre@94.128.82.20) |
| 10:41:40 | → | Sigyn joins (sigyn@freenode/utility-bot/sigyn) |
| 10:41:40 | ChanServ | sets mode +o Sigyn |
| 10:41:59 | → | ubert1 joins (~Thunderbi@p200300ecdf25d9cae6b318fffe838f33.dip0.t-ipconnect.de) |
| 10:42:02 | × | st8less quits (~st8less@inet-167-224-197-181.isp.ozarksgo.net) (Quit: WeeChat 2.9) |
| 10:42:08 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 245 seconds) |
| 10:42:58 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 276 seconds) |
| 10:43:03 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 10:43:44 | → | ixlun` joins (~user@213.205.241.136) |
| 10:43:50 | → | son0p joins (~son0p@181.58.39.182) |
| 10:44:05 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 10:44:26 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 10:44:35 | × | lambda quits (~xiretza@mail.xiretza.xyz) (Ping timeout: 240 seconds) |
| 10:45:08 | → | nf joins (~n@monade.li) |
| 10:46:12 | → | Franciman joins (~francesco@host-82-49-79-189.retail.telecomitalia.it) |
| 10:46:46 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) |
| 10:47:00 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 10:47:37 | × | petersen quits (~petersen@redhat/juhp) (Quit: petersen) |
| 10:48:35 | → | petersen joins (~petersen@redhat/juhp) |
| 10:49:56 | → | ixlun`` joins (~user@109.249.184.132) |
| 10:51:38 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Ping timeout: 264 seconds) |
| 10:52:09 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 264 seconds) |
| 10:52:33 | × | ixlun` quits (~user@213.205.241.136) (Ping timeout: 245 seconds) |
| 10:54:44 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Read error: Connection reset by peer) |
| 10:56:51 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection) |
| 10:57:28 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 10:57:28 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 10:58:08 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 10:59:07 | × | LKoen quits (~LKoen@185.61.176.203) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”) |
| 10:59:50 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 256 seconds) |
| 11:00:23 | → | lambda joins (~xiretza@mail.xiretza.xyz) |
| 11:02:28 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 276 seconds) |
| 11:03:04 | × | glguy quits (x@freenode/staff/haskell.developer.glguy) (Read error: Connection reset by peer) |
| 11:03:33 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds) |
| 11:04:30 | → | graf_blutwurst joins (~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) |
| 11:04:54 | → | glguy joins (x@freenode/staff/haskell.developer.glguy) |
| 11:06:26 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 11:06:54 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded) |
| 11:07:14 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 11:07:53 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded) |
| 11:08:03 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 11:08:11 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 11:08:28 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 11:10:25 | → | ezrakilty joins (~ezrakilty@75-172-115-167.tukw.qwest.net) |
| 11:11:06 | × | usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving) |
| 11:12:23 | → | stree joins (~stree@68.36.8.116) |
| 11:12:58 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 245 seconds) |
| 11:13:07 | × | ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
| 11:13:48 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 11:14:00 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 256 seconds) |
| 11:14:04 | → | ukari joins (~ukari@unaffiliated/ukari) |
| 11:14:38 | × | ezrakilty quits (~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 245 seconds) |
| 11:14:57 | × | kritzefitz quits (~kritzefit@fw-front.credativ.com) (Ping timeout: 264 seconds) |
| 11:15:07 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 11:16:49 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 11:17:08 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 11:17:10 | <Gurkenglas_> | What the heck is this :D https://easyupload.io/x1ye0b reproducible in powershell |
| 11:18:36 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds) |
| 11:19:31 | <Gurkenglas_> | requires no lub. Reproduction: 1. open cmd.exe 2. stack ghci 3. let x = x in x 4. Ctrl-C 5. stack ghci 6. 2+2 |
| 11:20:42 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 11:21:43 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 245 seconds) |
| 11:21:58 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:23:31 | × | subttle quits (~anonymous@unaffiliated/subttle) (Quit: leaving) |
| 11:26:01 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 11:26:07 | <tomsmeding> | Gurkenglas_: please fix powershell :p |
| 11:26:17 | <Gurkenglas_> | tomsmeding, reproducible in cmd.exe |
| 11:26:43 | <tomsmeding> | that "parse error on input '+'" is _very_ suspicious |
| 11:27:03 | <tomsmeding> | and makes me think the terminal state is broken somehow |
| 11:27:18 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 11:27:36 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 11:27:46 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:28:05 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 11:28:09 | <tomsmeding> | does not reproduce on linux :p |
| 11:28:27 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 11:28:35 | <Gurkenglas_> | more generally: |
| 11:28:57 | <Gurkenglas_> | 1. stack ghci 2. Ctrl-C 3. uh oh im in the shell but also in ghci |
| 11:29:20 | <Gurkenglas_> | aka, i expect it's because ghci uses Ctrl-C to abort the current calculation and stack ghci uses it to send you back to the shell |
| 11:29:26 | <tomsmeding> | that makes me shudder and be happy I'm not on windows |
| 11:29:43 | <tomsmeding> | is there still a ghc process running after that Ctrl-C? |
| 11:29:49 | <tomsmeding> | what if you kill that process |
| 11:29:57 | <tomsmeding> | (not the one run by your language client if any) |
| 11:30:13 | <Gurkenglas_> | uhh how do i order processes by time of creation |
| 11:30:32 | <tomsmeding> | can you show the command line of processes on windows? |
| 11:30:37 | <tomsmeding> | or a process tree |
| 11:30:53 | <tomsmeding> | you can also just kill all ghc processes, the language server will recover :p |
| 11:31:05 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Remote host closed the connection) |
| 11:31:15 | × | son0p quits (~son0p@181.58.39.182) (Quit: Lost terminal) |
| 11:31:20 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 11:31:25 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 11:32:56 | → | knupfer joins (~Thunderbi@i59F7FFFF.versanet.de) |
| 11:34:15 | → | rdd joins (~user@c-2983e555.012-81-73746f39.cust.ownit.se) |
| 11:35:26 | <Gurkenglas_> | Ah, process monitor can enable a start time column, then sort by that. Indeed, there remains a ghc process newer than the powershell |
| 11:35:40 | <tomsmeding> | Gurkenglas_: what if you kill that one after the Ctrl-C? |
| 11:35:56 | → | augustine joins (~irfan@59.88.26.41) |
| 11:36:33 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 264 seconds) |
| 11:36:33 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 264 seconds) |
| 11:37:10 | <Gurkenglas_> | that works sanely. every stack ghci invocation without killing em spawns another ghc |
| 11:37:37 | <Gurkenglas_> | closing the powershell kills the ghc too. |
| 11:37:49 | <tomsmeding> | Gurkenglas_: so if you kill the spawned ghc process all is fine, but if you don't do that explicitly it lingers and you get madness? |
| 11:37:58 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 245 seconds) |
| 11:38:13 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 276 seconds) |
| 11:38:17 | <tomsmeding> | is there a proper terminal for windows in which things do work? |
| 11:38:55 | <Gurkenglas_> | ah https://github.com/commercialhaskell/stack/issues/4737 knows of this |
| 11:39:22 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:40:14 | tomsmeding | is scared |
| 11:40:21 | <Gurkenglas_> | at least both cmd and powershell capture keyboard input to themselves rather than passing them on to ghc - the only effect outside the shell i see so far is Prelude > getting printed after PS C:\Users\Gurkenglas> |
| 11:40:49 | <Gurkenglas_> | you get something closer to madness only after launching stack ghci again |
| 11:42:03 | <Gurkenglas_> | the first time this popped up i remember characters changing above the prompt line so i killed that terminal before the corruption starts spreading across vscode :D |
| 11:42:12 | <tomsmeding> | :D |
| 11:43:07 | <Gurkenglas_> | fortunately there are a number of fourth walls between chaos and meatspace, for now. |
| 11:44:48 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 11:47:21 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 11:47:42 | ← | augustine parts (~irfan@59.88.26.41) () |
| 11:47:43 | × | plutoniix quits (~q@184.82.214.51) (Read error: Connection reset by peer) |
| 11:48:56 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 11:49:13 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 245 seconds) |
| 11:49:32 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 11:50:09 | × | graf_blutwurst quits (~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) (Remote host closed the connection) |
| 11:51:49 | × | lemmih quits (~lemmih@2406:3003:2072:44:5504:1a40:9c9:89a5) (Remote host closed the connection) |
| 11:52:10 | → | lemmih joins (~lemmih@2406:3003:2072:44:5ef0:b049:fd85:f050) |
| 11:53:48 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds) |
| 11:53:49 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 276 seconds) |
| 11:54:13 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 245 seconds) |
| 11:54:52 | → | alx741 joins (~alx741@186.178.108.206) |
| 11:57:29 | × | hexfive quits (~hexfive@50.35.83.177) (Quit: i must go. my people need me.) |
| 11:57:44 | → | marinelli joins (~marinelli@gateway/tor-sasl/marinelli) |
| 12:00:54 | × | Gurkenglas_ quits (~Gurkengla@unaffiliated/gurkenglas) (Remote host closed the connection) |
| 12:03:41 | × | ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
| 12:04:13 | <mniip> | huuh |
| 12:04:13 | → | Gurkenglas_ joins (~Gurkengla@unaffiliated/gurkenglas) |
| 12:04:23 | <mniip> | if I have an associated data family |
| 12:04:39 | <mniip> | then suddenly declaring an instance and deriving Eq for it |
| 12:04:41 | → | ukari joins (~ukari@unaffiliated/ukari) |
| 12:04:44 | <mniip> | is an orphan instance? |
| 12:07:08 | → | gitgoood joins (~gitgood@82-132-216-167.dab.02.net) |
| 12:08:16 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 12:08:18 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Ping timeout: 246 seconds) |
| 12:08:33 | × | sm2n_ quits (~sm2n@bras-base-hmtnon143hw-grc-15-70-54-78-219.dsl.bell.ca) (Quit: Leaving) |
| 12:08:37 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 12:08:41 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded) |
| 12:09:00 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 12:09:46 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 12:09:50 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded) |
| 12:09:54 | × | gitgood quits (~gitgood@82-132-217-25.dab.02.net) (Read error: Connection reset by peer) |
| 12:10:09 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 12:12:29 | × | pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!) |
| 12:12:37 | → | dhouthoo joins (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) |
| 12:13:23 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 245 seconds) |
| 12:13:42 | → | kritzefitz joins (~kritzefit@fw-front.credativ.com) |
| 12:14:10 | → | ezrakilty joins (~ezrakilty@75-172-115-167.tukw.qwest.net) |
| 12:14:38 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 245 seconds) |
| 12:15:55 | × | frozenErebus quits (~frozenEre@94.128.82.20) (Ping timeout: 276 seconds) |
| 12:17:23 | × | gitgoood quits (~gitgood@82-132-216-167.dab.02.net) (Read error: Connection reset by peer) |
| 12:19:10 | × | ezrakilty quits (~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 276 seconds) |
| 12:19:54 | × | ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
| 12:21:05 | → | ukari joins (~ukari@unaffiliated/ukari) |
| 12:30:11 | → | drbean joins (~drbean@TC210-63-209-63.static.apol.com.tw) |
| 12:30:15 | → | mirrorbird joins (dwsjeid911@gateway/vpn/mullvad/dwsjeid911) |
| 12:30:43 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 12:32:18 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 12:32:43 | × | denisse quits (~spaceCat@gateway/tor-sasl/alephzer0) (Remote host closed the connection) |
| 12:33:04 | → | denisse joins (~spaceCat@gateway/tor-sasl/alephzer0) |
| 12:33:45 | → | jpds_ joins (~jpds@gateway/tor-sasl/jpds) |
| 12:34:18 | × | fryguybo1 quits (~fryguybob@cpe-74-65-31-113.rochester.res.rr.com) (Remote host closed the connection) |
| 12:34:21 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 12:34:39 | jpds_ | is now known as jpds |
| 12:35:00 | → | raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 12:35:27 | → | sm2n joins (~sm2n@bras-base-hmtnon143hw-grc-15-70-54-78-219.dsl.bell.ca) |
| 12:35:35 | <nshepperd> | i don't see why the Eq instance would be an orphan, if it's defined together with the data family instance it is for |
| 12:36:54 | <nshepperd> | the data instance itself could be an orphan though, couldn't it? |
| 12:37:56 | → | fryguybob joins (~fryguybob@cpe-74-65-31-113.rochester.res.rr.com) |
| 12:37:58 | × | ixlun`` quits (~user@109.249.184.132) (Remote host closed the connection) |
| 12:38:03 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds) |
| 12:38:08 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 12:38:25 | → | ixlun joins (~user@109.249.184.132) |
| 12:38:45 | × | ixlun quits (~user@109.249.184.132) (Remote host closed the connection) |
| 12:39:00 | → | ixlun joins (~user@109.249.184.132) |
| 12:39:51 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 12:42:24 | × | mirrorbird quits (dwsjeid911@gateway/vpn/mullvad/dwsjeid911) (Quit: Leaving) |
| 12:42:58 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 256 seconds) |
| 12:43:45 | → | dfeuer joins (~dfeuer@pool-173-79-253-62.washdc.fios.verizon.net) |
| 12:44:22 | → | minoru_shiraeesh joins (~shiraeesh@46.34.206.154) |
| 12:46:26 | → | tinhatcat joins (~tsranso@108-91-101-161.lightspeed.gnvlsc.sbcglobal.net) |
| 12:48:09 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) |
| 12:48:56 | → | maxxe-testing joins (~maxxe@unaffiliated/maxxe) |
| 12:50:36 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 12:50:38 | × | tinhatcat quits (~tsranso@108-91-101-161.lightspeed.gnvlsc.sbcglobal.net) (Client Quit) |
| 12:52:50 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Ping timeout: 264 seconds) |
| 12:53:54 | × | Boomerang quits (~Boomerang@2a05:f6c7:2179:0:ccd0:d305:d616:ff16) (Quit: Leaving) |
| 12:54:36 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 12:55:28 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds) |
| 12:59:42 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Read error: No route to host) |
| 13:00:02 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 13:00:45 | → | urodna joins (~urodna@unaffiliated/urodna) |
| 13:01:48 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
| 13:02:05 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 13:02:26 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 13:04:18 | × | knupfer quits (~Thunderbi@i59F7FFFF.versanet.de) (Quit: knupfer) |
| 13:04:50 | → | knupfer joins (~Thunderbi@200116b82c668700c9527be50386a639.dip.versatel-1u1.de) |
| 13:06:16 | → | Tario joins (~Tario@201.192.165.173) |
| 13:09:47 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 13:14:54 | × | gxt quits (~gxt@gateway/tor-sasl/gxt) (Ping timeout: 268 seconds) |
| 13:16:25 | → | geowiesnot_bis joins (~user@87-89-181-157.abo.bbox.fr) |
| 13:16:29 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 13:20:28 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 245 seconds) |
| 13:20:30 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 13:21:04 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 13:21:07 | → | Pickchea joins (~private@unaffiliated/pickchea) |
| 13:23:41 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 13:24:01 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 13:24:04 | → | Lycurgus joins (~niemand@98.4.114.199) |
| 13:24:24 | × | Athas quits (athas@2a01:7c8:aaac:1cf:f7dd:80de:d3d3:680b) (Quit: ZNC - http://znc.sourceforge.net) |
| 13:25:39 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds) |
| 13:25:45 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
| 13:27:19 | → | Athas joins (~athas@2a01:7c8:aaac:1cf:b3d0:9cdc:5978:262a) |
| 13:27:50 | → | mirrorbird joins (dwsjeid911@gateway/vpn/mullvad/dwsjeid911) |
| 13:28:06 | → | ep1ctetus joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 13:28:31 | × | sh9 quits (~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8) |
| 13:28:45 | × | geowiesnot_bis quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 264 seconds) |
| 13:30:52 | → | CrazyPython joins (~crazypyth@98.122.164.118) |
| 13:30:58 | → | joseph joins (~joseph@cpe-24-208-140-96.insight.res.rr.com) |
| 13:31:08 | × | cream quits (676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) (Ping timeout: 256 seconds) |
| 13:31:22 | joseph | is now known as Guest76930 |
| 13:31:45 | → | epicte7us joins (~epictetus@152.89.204.159) |
| 13:32:30 | → | graf_blutwurst joins (~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) |
| 13:32:59 | → | stree joins (~stree@68.36.8.116) |
| 13:33:56 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 13:34:09 | × | swarmcollective quits (~joseph@cpe-24-208-140-96.insight.res.rr.com) (Ping timeout: 264 seconds) |
| 13:34:23 | → | investing joins (676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) |
| 13:35:52 | × | ep1ctetus quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Ping timeout: 276 seconds) |
| 13:37:52 | → | tv- joins (~tv@unaffiliated/tv-) |
| 13:38:45 | × | investing quits (676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) (Client Quit) |
| 13:38:56 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 13:39:15 | → | Sheilong joins (uid293653@gateway/web/irccloud.com/x-lslonovgjxgqvcfu) |
| 13:39:16 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 13:39:45 | → | investing joins (676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) |
| 13:41:20 | × | Pickchea quits (~private@unaffiliated/pickchea) (Ping timeout: 256 seconds) |
| 13:41:42 | → | investing69 joins (676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) |
| 13:42:00 | × | investing69 quits (676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) (Max SendQ exceeded) |
| 13:42:15 | × | investing quits (676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) (Client Quit) |
| 13:42:34 | → | investing joins (676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) |
| 13:42:34 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Read error: Connection reset by peer) |
| 13:42:43 | × | Lycurgus quits (~niemand@98.4.114.199) (Quit: Exeunt) |
| 13:43:13 | × | investing quits (676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) (Max SendQ exceeded) |
| 13:44:15 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) |
| 13:44:21 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds) |
| 13:47:05 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 13:47:22 | → | carlomagno joins (~cararell@148.87.23.12) |
| 13:47:27 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 13:48:02 | × | aarvar quits (~foewfoiew@2601:602:a080:fa0:f5c0:50eb:5dcd:a8d4) (Ping timeout: 264 seconds) |
| 13:48:19 | × | ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
| 13:48:33 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 13:48:57 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) |
| 13:49:00 | × | drbean quits (~drbean@TC210-63-209-63.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in) |
| 13:49:05 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 13:49:05 | × | ixlun quits (~user@109.249.184.132) (Read error: Connection reset by peer) |
| 13:49:37 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 13:49:56 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 13:50:16 | → | ixlun joins (~user@109.249.184.132) |
| 13:50:24 | → | ADG1089__ joins (~aditya@223.226.229.230) |
| 13:51:33 | × | idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 264 seconds) |
| 13:53:26 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Ping timeout: 264 seconds) |
| 13:54:13 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 13:54:21 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 246 seconds) |
| 13:54:21 | × | maxxe-testing quits (~maxxe@unaffiliated/maxxe) (Ping timeout: 246 seconds) |
| 13:58:42 | × | graf_blutwurst quits (~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) (Remote host closed the connection) |
| 14:01:34 | × | pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Quit: gone to sleep. ZZZzzz…) |
| 14:03:02 | × | xff0x quits (~xff0x@2001:1a81:520c:1100:ac8b:f992:eea7:f98a) (Ping timeout: 264 seconds) |
| 14:03:54 | → | xff0x joins (~xff0x@2001:1a81:520c:1100:aa08:8f09:5c11:60cb) |
| 14:05:38 | × | thecoffemaker_ quits (~thecoffem@125-121-245-190.fibertel.com.ar) (Quit: So long and thanks for all the fish!) |
| 14:05:39 | → | Guest_88 joins (4bba29ee@cpe-75-186-41-238.cinci.res.rr.com) |
| 14:06:07 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 14:06:24 | <Guest_88> | Hi everyone, how is Haskell on apple silicon? |
| 14:06:28 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 14:06:43 | <maerwald> | Guest_88: you need to run in arch -x86_64 compat mode via rosetta |
| 14:07:08 | <maerwald> | a native release is planned https://www.haskell.org/ghc/blog/20210309-apple-m1-story.html |
| 14:08:31 | <Guest_88> | Thank you for the blog post! That is great |
| 14:08:34 | <Guest_88> | I can't wait |
| 14:12:07 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 14:12:28 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 14:12:52 | → | thecoffemaker joins (~thecoffem@unaffiliated/thecoffemaker) |
| 14:13:06 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 14:13:29 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 14:14:46 | × | Guest_88 quits (4bba29ee@cpe-75-186-41-238.cinci.res.rr.com) (Quit: Connection closed) |
| 14:15:07 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 14:15:10 | × | aqd quits (~aqd@84.20.147.33) (Quit: Textual IRC Client: www.textualapp.com) |
| 14:15:31 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 14:16:06 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 14:16:17 | × | Athas quits (~athas@2a01:7c8:aaac:1cf:b3d0:9cdc:5978:262a) (Quit: ZNC - http://znc.sourceforge.net) |
| 14:16:28 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 14:17:48 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 14:18:06 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 14:18:31 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 14:18:34 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded) |
| 14:18:53 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 14:19:07 | × | gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
| 14:19:42 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded) |
| 14:19:54 | × | ADG1089__ quits (~aditya@223.226.229.230) (Remote host closed the connection) |
| 14:20:01 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 14:21:33 | × | azure1 quits (~azure@103.154.230.242) (Ping timeout: 264 seconds) |
| 14:22:24 | → | azure1 joins (~azure@103.154.230.130) |
| 14:22:43 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 14:23:17 | × | thecoffemaker quits (~thecoffem@unaffiliated/thecoffemaker) (Remote host closed the connection) |
| 14:23:57 | <Gurkenglas_> | Can I dump all current thunks when https://github.com/haskell/haskell-language-server/blob/master/ghcide/session-loader/Development/IDE/Session.hs#L823 is (first?) called, or maybe when the call is forced? |
| 14:24:52 | → | thecoffemaker joins (~thecoffem@unaffiliated/thecoffemaker) |
| 14:25:29 | × | hiroaki quits (~hiroaki@2a02:8108:8c40:2bb8:ca74:2b42:54ac:7ebf) (Ping timeout: 272 seconds) |
| 14:26:46 | <geekosaur> | I don't think the notion of "all current thunks" exists |
| 14:27:08 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 245 seconds) |
| 14:27:42 | × | acidjnk_new2 quits (~acidjnk@p200300d0c72b95698494132ffc54748c.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 14:27:50 | <geekosaur> | unless you mean "the current pattern stack" or something like that |
| 14:27:52 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 276 seconds) |
| 14:29:02 | <Gurkenglas_> | geekosaur, doesn't the RAM of any Haskell-compiled executable look like a big list of thunks? If not, what does it look like? |
| 14:29:20 | <geekosaur> | it mostly does, but you assume there's a list of them somewhere |
| 14:29:46 | <geekosaur> | note "mostly" |
| 14:30:15 | <Gurkenglas_> | the nonthunk parts are the same in all haskell-compiled executables, right? |
| 14:30:18 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Read error: Connection reset by peer) |
| 14:30:20 | <geekosaur> | nope |
| 14:30:30 | <Gurkenglas_> | what is an example of such an exotic nonthunk part? |
| 14:30:34 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 14:30:40 | <geekosaur> | the nonthunk parts are actual values, pinned arrays, etc. |
| 14:30:45 | <geekosaur> | not so exotic |
| 14:30:58 | <geekosaur> | (pinned arrays are most commonly bytestrings) |
| 14:31:43 | <Gurkenglas_> | what makes dumping the thunks technically hard? |
| 14:31:59 | → | ADG1089__ joins (~aditya@223.226.229.230) |
| 14:32:25 | → | joseph joins (~joseph@cpe-24-208-140-96.insight.res.rr.com) |
| 14:32:27 | <Gurkenglas_> | couldnt one "just" pause the process, look over its ram, and dump every thunks? |
| 14:32:38 | <geekosaur> | I doubt it |
| 14:32:50 | joseph | is now known as Guest61892 |
| 14:33:14 | <Gurkenglas_> | (so i can figure out the path by which that linked string gets onto my screen) |
| 14:33:25 | <geekosaur> | you still have this assumption that you can reliably identify a thunk just by looking at it |
| 14:33:32 | Guest61892 | is now known as swarmcollective |
| 14:33:47 | <Gurkenglas_> | hmm. can i compile everything such that the thunks stay recognizable? |
| 14:33:51 | <geekosaur> | sorry, just by looking at a random memory address, whether it's a thunk or not |
| 14:35:18 | × | Guest76930 quits (~joseph@cpe-24-208-140-96.insight.res.rr.com) (Ping timeout: 246 seconds) |
| 14:35:39 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Ping timeout: 246 seconds) |
| 14:35:53 | <geekosaur> | do remember that the "shape" of a value is not described anywhere but in code related to that value, so you can't "just" scan through memory and take the things that "look like" thunks — they may well be values |
| 14:36:32 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 14:36:47 | × | Natch quits (~natch@c-b471e255.014-297-73746f25.bbcust.telenor.se) (Remote host closed the connection) |
| 14:37:09 | <Gurkenglas_> | what thunk might be not part of the "current pattern stack"? |
| 14:37:20 | → | hiroaki joins (~hiroaki@2a02:8108:8c40:2bb8:4b06:962b:f728:a206) |
| 14:37:27 | <geekosaur> | any thunk not currently being evaluated |
| 14:38:43 | <geekosaur> | or for that matter any evaluated value not currently in use somewhere |
| 14:40:11 | <geekosaur> | when your program starts, the pattern stack has "main" on it. if you want to trace through evaluation of thunks, there might be some way to instrument STG but I'd expect it to be fairly slow. |
| 14:40:30 | <geekosaur> | but that won't let you scan, it'd just track evaluation of thunks |
| 14:40:40 | <Gurkenglas_> | in "let x = [id] in fix (x !! 1)", x would leave the pattern stack before long, yes? |
| 14:41:40 | <Gurkenglas_> | but any function that will ever be called again can be found somewhere in the pattern stack, right? |
| 14:41:51 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 14:42:07 | → | Natch joins (~Natch@c-b471e255.014-297-73746f25.bbcust.telenor.se) |
| 14:42:41 | → | Pickchea joins (~private@unaffiliated/pickchea) |
| 14:42:43 | <geekosaur> | no? the stack gets stuff pushed onto it as needed. that may cause some previously evaluated value to come back into the stack |
| 14:43:01 | → | sh9 joins (~sh9@softbank060116136158.bbtec.net) |
| 14:43:15 | <geekosaur> | you seem to want the stack to be a tree instead of a stack? |
| 14:43:43 | → | Athas joins (athas@sigkill.dk) |
| 14:44:14 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 14:44:26 | × | geekosaur quits (82650c7a@130.101.12.122) (Quit: Connection closed) |
| 14:45:12 | × | berberman_ quits (~berberman@unaffiliated/berberman) (Ping timeout: 260 seconds) |
| 14:45:15 | <Gurkenglas_> | ah so there's an implicit pattern tree and the stack is a path through that tree |
| 14:45:48 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
| 14:46:23 | <Gurkenglas_> | and all thunks in ram are somewhere on that tree |
| 14:46:28 | <merijn> | Gurkenglas_: Haskell expressions are graphs |
| 14:46:51 | <Gurkenglas_> | sure, replace tree with graph |
| 14:47:42 | <merijn> | Gurkenglas_: The stack isn't really "a path through the graph". Evaluation causes (parts of) the graph to simplified/reduced |
| 14:48:11 | → | Jd007 joins (~Jd007@162.156.11.151) |
| 14:48:12 | <merijn> | The stack is to keep track of "how to continue when the current evaluation finishes" |
| 14:48:18 | × | Jd007 quits (~Jd007@162.156.11.151) (Client Quit) |
| 14:49:04 | × | ixlun quits (~user@109.249.184.132) (Read error: Connection reset by peer) |
| 14:49:19 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 276 seconds) |
| 14:49:40 | <Gurkenglas_> | and when that stack actually loops, that prints <loop>, but stacks depicting recursion are more of a spiral on that graph that would only become a loop if each node were projected onto the identifier that was unpacked to spawn that node |
| 14:49:58 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 276 seconds) |
| 14:50:08 | → | ixlun joins (~user@109.249.184.132) |
| 14:50:48 | <Gurkenglas_> | (or rather it returns a bottom that shows as "<loop>") |
| 14:51:51 | × | mouseghost quits (~draco@wikipedia/desperek) (Quit: mew wew) |
| 14:52:20 | <epicte7us> | guys guys, I just wrote my first Haskell program that uses the STM TChan, it's SO COOL. I've never done any multi-threaded progrmaming before -- SO COOL |
| 14:52:28 | × | secdragon quits (~secdragon@185.204.1.185) (Remote host closed the connection) |
| 14:53:55 | <merijn> | \o/ |
| 14:53:59 | × | xff0x quits (~xff0x@2001:1a81:520c:1100:aa08:8f09:5c11:60cb) (Ping timeout: 272 seconds) |
| 14:54:49 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 14:55:15 | → | xff0x joins (xff0x@gateway/vpn/mullvad/xff0x) |
| 14:57:00 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 14:57:25 | <Gurkenglas_> | alright so what i asked for is the spine of the Spineless Tagless G-machine. Would a spineful, tagful variant be more than a constant factor more expensive? |
| 14:57:34 | → | bergey` joins (~user@107.181.19.30) |
| 14:57:36 | → | Psybur joins (~user@unaffiliated/psybur) |
| 14:57:56 | <Psybur> | How would I get stack to tell ghc to use --no-pie instead of -no-pie during linking? |
| 14:59:02 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 14:59:08 | <Psybur> | Running into weird stuff on archlinux. I had to manually specify the linker path with -pgml just to get this far. Something doesnt seem right heh |
| 14:59:32 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 256 seconds) |
| 15:00:09 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 246 seconds) |
| 15:00:22 | × | xff0x quits (xff0x@gateway/vpn/mullvad/xff0x) (Ping timeout: 276 seconds) |
| 15:01:28 | → | xff0x joins (~xff0x@2001:1a81:520c:1100:aa08:8f09:5c11:60cb) |
| 15:01:59 | <Gurkenglas_> | I've found lub to not fall to the counterexample I constructed yesterday. Just undefined `lub` fix (fmap (const 2)) actually comes out to Just hangs, not Just 2. |
| 15:06:16 | → | idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 15:07:17 | <nshepperd> | what's this lub |
| 15:07:18 | × | marinelli quits (~marinelli@gateway/tor-sasl/marinelli) (Quit: marinelli) |
| 15:07:48 | → | graf_blutwurst joins (~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) |
| 15:08:13 | → | ketas1 joins (~ketas@37.120.211.188) |
| 15:08:16 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 15:09:04 | <siraben> | nshepperd: least upper bound, probably. |
| 15:09:18 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 15:10:24 | <merijn> | Psybur: You are using the arch packages? |
| 15:10:34 | <Psybur> | yes |
| 15:11:16 | → | Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
| 15:11:28 | <Gurkenglas_> | the least defined value that's more defined than both - lub ((),undefined) (undefined,()) = ((),()). I think the api deliberately doesnt say what it does on lub 1 2 |
| 15:11:29 | <merijn> | Psybur: Yeah...those are entirely broken |
| 15:11:58 | <merijn> | Psybur: Arch maintainers insist on installing a GHC that's broken when used "normally" |
| 15:12:28 | <Psybur> | Strange. So I should uninstall stack and ghc and manually install stack? |
| 15:12:46 | <merijn> | Psybur: The recommended solution is "don't use GHC installed by Arch" ;) |
| 15:12:56 | <merijn> | Psybur: Stack *should* probably work |
| 15:12:58 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds) |
| 15:13:19 | <Psybur> | Ok thanks |
| 15:13:41 | <merijn> | Psybur: Because stack fetches and installs its own copy/copies of GHC |
| 15:14:03 | <merijn> | Psybur: There's a section on the Arch wiki on Haskell |
| 15:14:16 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 256 seconds) |
| 15:14:59 | <merijn> | Psybur: Which should have more info. But the short summary is: GHC's default linking mode is static. Arch maintainers only install dynamic libraries for ideological reasons. So default invocations of GHC fail due to static libs not being installed/available. |
| 15:15:31 | <nshepperd> | oh so lub is like race but recursively |
| 15:16:32 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 256 seconds) |
| 15:18:10 | <nshepperd> | lub seems like a dubious name given that there technically isn't always an upper bound |
| 15:19:19 | × | xff0x quits (~xff0x@2001:1a81:520c:1100:aa08:8f09:5c11:60cb) (Ping timeout: 272 seconds) |
| 15:19:40 | → | xff0x joins (~xff0x@2001:1a81:520c:1100:5e31:893b:56c2:ee10) |
| 15:20:21 | × | idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 264 seconds) |
| 15:23:13 | × | graf_blutwurst quits (~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) (Remote host closed the connection) |
| 15:23:18 | → | frozenErebus joins (~frozenEre@94.128.82.20) |
| 15:24:50 | <Psybur> | Right so the only ghc lib that Arch has installed is local/ghc-libs 8.10.4-1 - The Glasgow Haskell Compiler - Dynamic Libraries |
| 15:24:55 | <Psybur> | ghc itself isnt installed |
| 15:25:01 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 15:25:18 | <Psybur> | So do I just remove this library and let stack figure it out? |
| 15:25:51 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 15:25:54 | <Psybur> | Ill read the arch wiki in the meantime ;p |
| 15:26:11 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 15:26:24 | Gurkenglas_ | is now known as Gurkenglas |
| 15:27:22 | <Psybur> | The wiki is answering my questions. Thanks |
| 15:27:51 | → | Jd007 joins (~Jd007@162.156.11.151) |
| 15:28:24 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 15:30:05 | × | Yumasi quits (~guillaume@2a01cb0506313c00e14be01ac4a050f7.ipv6.abo.wanadoo.fr) (Ping timeout: 272 seconds) |
| 15:30:49 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded) |
| 15:31:08 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 15:31:22 | → | elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) |
| 15:34:02 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 15:38:04 | × | minoru_shiraeesh quits (~shiraeesh@46.34.206.154) (Ping timeout: 276 seconds) |
| 15:40:02 | → | chisui joins (58829866@88.130.152.102) |
| 15:40:09 | → | dima__ joins (~dima@178-167-125-110.dynvpn.flex.ru) |
| 15:40:15 | → | hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net) |
| 15:40:28 | <Psybur> | Got it working using stack-static/ghc-static etc thanks |
| 15:40:52 | <chisui> | Hey, what was this FP introduction course that is posted here all the time again? |
| 15:40:54 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 256 seconds) |
| 15:41:05 | <dima__> | fg |
| 15:41:18 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:1df8:1a68:20b5:2763) |
| 15:41:19 | × | dima__ quits (~dima@178-167-125-110.dynvpn.flex.ru) (Client Quit) |
| 15:41:51 | <merijn> | CIS194 ? |
| 15:41:54 | <merijn> | chisui: ^^ |
| 15:42:36 | <chisui> | merijn that's the one. Wasn't there even a bot that posts a link? |
| 15:42:36 | × | elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 256 seconds) |
| 15:42:39 | <chisui> | !CIS194 |
| 15:42:44 | <chisui> | @CIS194 |
| 15:42:44 | <lambdabot> | Unknown command, try @list |
| 15:42:46 | <merijn> | @where CIS194 |
| 15:42:46 | <lambdabot> | https://www.seas.upenn.edu/~cis194/spring13/lectures.html |
| 15:42:50 | <chisui> | ahhh |
| 15:46:30 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:948b:9d7e:1b3d:4c5c) |
| 15:49:48 | → | idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 15:50:13 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) |
| 15:50:25 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 15:50:25 | → | joebobjoe joins (~joebobjoe@unaffiliated/joebobjoe) |
| 15:51:05 | × | chisui quits (58829866@88.130.152.102) (Quit: Connection closed) |
| 15:52:01 | × | MidAutumnHotaru quits (~MidAutumn@unaffiliated/midautumnhotaru) (Quit: Quit 啾) |
| 15:52:41 | → | MidAutumnHotaru joins (~MidAutumn@unaffiliated/midautumnhotaru) |
| 15:53:19 | × | notzmv quits (~zmv@unaffiliated/zmv) (Ping timeout: 256 seconds) |
| 15:53:37 | → | stree joins (~stree@68.36.8.116) |
| 15:55:14 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Ping timeout: 264 seconds) |
| 15:55:29 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:1df8:1a68:20b5:2763) (Remote host closed the connection) |
| 15:55:45 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 264 seconds) |
| 15:57:45 | → | kayvan joins (~user@52-119-115-185.PUBLIC.monkeybrains.net) |
| 15:58:29 | × | kritzefitz quits (~kritzefit@fw-front.credativ.com) (Remote host closed the connection) |
| 15:58:49 | × | swarmcollective quits (~joseph@cpe-24-208-140-96.insight.res.rr.com) (Ping timeout: 245 seconds) |
| 16:00:06 | → | polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) |
| 16:02:07 | → | swarmcollective joins (~joseph@cpe-24-208-140-96.insight.res.rr.com) |
| 16:02:20 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection) |
| 16:03:09 | × | CoconutCrab quits (~Cua@unaffiliated/coconutcrab) (Ping timeout: 246 seconds) |
| 16:03:09 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 16:04:42 | × | Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 256 seconds) |
| 16:07:00 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 16:07:32 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 256 seconds) |
| 16:08:32 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 16:08:47 | → | usr25 joins (~usr25@unaffiliated/usr25) |
| 16:08:51 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 16:09:08 | × | Guest34870 quits (~textual@mskresolve-a.mskcc.org) (Remote host closed the connection) |
| 16:09:27 | × | nf quits (~n@monade.li) (Quit: Fairfarren.) |
| 16:10:02 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 16:10:43 | → | Tops2 joins (~Tobias@dyndsl-095-033-024-175.ewe-ip-backbone.de) |
| 16:11:26 | × | xff0x quits (~xff0x@2001:1a81:520c:1100:5e31:893b:56c2:ee10) (Ping timeout: 264 seconds) |
| 16:11:53 | → | xff0x joins (~xff0x@2001:1a81:520c:1100:b717:e343:40b1:857a) |
| 16:12:08 | × | idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 245 seconds) |
| 16:12:15 | × | ADG1089__ quits (~aditya@223.226.229.230) (Remote host closed the connection) |
| 16:12:43 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 16:13:18 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds) |
| 16:15:07 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 16:15:38 | → | nf joins (~n@monade.li) |
| 16:15:44 | → | Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck) |
| 16:17:08 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 245 seconds) |
| 16:17:14 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 16:17:14 | → | FortuneZero joins (3223b878@50.35.184.120) |
| 16:17:17 | → | Alleria joins (~textual@zrcout.mskcc.org) |
| 16:17:40 | Alleria | is now known as Guest64155 |
| 16:20:26 | × | Alleria_ quits (~AllahuAkb@2603-7000-3040-0000-ac9e-148c-2486-fb78.res6.spectrum.com) (Ping timeout: 264 seconds) |
| 16:21:16 | → | vicfred joins (vicfred@gateway/vpn/mullvad/vicfred) |
| 16:22:58 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 245 seconds) |
| 16:23:40 | → | Alleria_ joins (~AllahuAkb@2603-7000-3040-0000-49c8-a343-3d41-8b5a.res6.spectrum.com) |
| 16:23:55 | × | borne quits (~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f) (Ping timeout: 272 seconds) |
| 16:25:56 | → | notzmv joins (~zmv@unaffiliated/zmv) |
| 16:26:31 | × | nf quits (~n@monade.li) (Quit: Fairfarren.) |
| 16:27:21 | → | nf joins (~n@monade.li) |
| 16:27:38 | × | shutdown_-h_now quits (~arjan@2001:1c06:2d0b:2312:84fd:19e6:b34a:aa93) (Ping timeout: 264 seconds) |
| 16:27:58 | × | michalz quits (~user@185.246.204.112) (Remote host closed the connection) |
| 16:29:47 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 16:31:08 | <tomjagua1paw> | Can I put a type signature of a let-bound thing in pattern guards? |
| 16:31:19 | → | conal joins (~conal@64.71.133.70) |
| 16:31:40 | tomjagua1paw | is now known as tomjaguarpaw |
| 16:32:24 | × | ddellaco_ quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Remote host closed the connection) |
| 16:32:29 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 16:32:55 | <lyxia> | > let f | let b :: Bool ; b = True , b = 0 in f |
| 16:32:56 | <lambdabot> | 0 |
| 16:35:52 | <tomjaguarpaw> | Interesting, thanks! One day I may understand Haskell's syntax |
| 16:37:34 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 16:38:42 | × | frozenErebus quits (~frozenEre@94.128.82.20) (Ping timeout: 256 seconds) |
| 16:39:54 | × | joebobjoe quits (~joebobjoe@unaffiliated/joebobjoe) (Ping timeout: 246 seconds) |
| 16:39:58 | → | ukari joins (~ukari@unaffiliated/ukari) |
| 16:40:32 | → | joebobjoe joins (~joebobjoe@unaffiliated/joebobjoe) |
| 16:40:41 | → | shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:84fd:19e6:b34a:aa93) |
| 16:40:56 | × | vchlup_ quits (~vchlup@nat.brnet.cz) (Read error: Connection reset by peer) |
| 16:41:23 | → | vchlup_ joins (~vchlup@nat.brnet.cz) |
| 16:45:35 | → | ezrakilty joins (~ezrakilty@75-172-115-167.tukw.qwest.net) |
| 16:45:40 | × | joebobjoe quits (~joebobjoe@unaffiliated/joebobjoe) (Ping timeout: 276 seconds) |
| 16:47:42 | → | crobbins joins (~crobbins@2601:2c1:200:ec50:e447:130a:d760:fb15) |
| 16:49:04 | × | ixlun quits (~user@109.249.184.132) (Read error: Connection reset by peer) |
| 16:50:36 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Ping timeout: 256 seconds) |
| 16:50:53 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) |
| 16:51:41 | → | ep1ctetus_ joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 16:51:44 | → | ixlun joins (~user@109.249.184.132) |
| 16:51:50 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 16:52:10 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
| 16:52:30 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 16:52:42 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection) |
| 16:53:04 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 16:54:26 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 16:54:35 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 16:55:45 | × | epicte7us quits (~epictetus@152.89.204.159) (Ping timeout: 264 seconds) |
| 16:55:53 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 17:01:44 | × | toorevitimirp quits (~tooreviti@117.182.180.50) (Remote host closed the connection) |
| 17:02:29 | × | nyaomin quits (~naomi@cpe-74-75-6-125.maine.res.rr.com) (Ping timeout: 265 seconds) |
| 17:03:27 | × | ph88_ quits (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de) (Ping timeout: 265 seconds) |
| 17:04:13 | → | borne joins (~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f) |
| 17:05:42 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 17:06:12 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Remote host closed the connection) |
| 17:06:29 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 17:07:36 | × | hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 256 seconds) |
| 17:10:41 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 17:11:00 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 17:11:24 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded) |
| 17:11:43 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 17:12:13 | × | mrus quits (~mrus@128.199.8.231) (Ping timeout: 260 seconds) |
| 17:12:28 | → | sparsity joins (5ce955fb@gateway/web/cgi-irc/kiwiirc.com/ip.92.233.85.251) |
| 17:12:30 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded) |
| 17:12:34 | <sparsity> | hi |
| 17:12:49 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 17:14:41 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 17:15:33 | ← | jakalx parts (~jakalx@base.jakalx.net) ("Error from remote client") |
| 17:18:06 | × | chele quits (~chele@ip5b40237d.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 17:25:34 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 17:26:09 | → | conal joins (~conal@64.71.133.70) |
| 17:26:39 | → | michaelh joins (~user@ip-109-42-114-163.web.vodafone.de) |
| 17:28:56 | × | thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds) |
| 17:29:08 | × | notzmv quits (~zmv@unaffiliated/zmv) (Ping timeout: 256 seconds) |
| 17:29:27 | × | stree quits (~stree@68.36.8.116) (Quit: Caught exception) |
| 17:29:37 | → | conal_ joins (~conal@64.71.133.70) |
| 17:29:53 | → | thc202 joins (~thc202@unaffiliated/thc202) |
| 17:29:53 | → | stree joins (~stree@68.36.8.116) |
| 17:30:18 | × | conal quits (~conal@64.71.133.70) (Ping timeout: 246 seconds) |
| 17:31:36 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 3.0.1) |
| 17:33:18 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 17:35:17 | <michaelh> | Hi, Haskell beginner here. A state monad question, which I am just learning about. We'll see if I can explain it properly... So I have something like `do xs <- (takeWhile (> 0)) <$> mapM f [1..]`, where f has type `Int -> State (Map Int Int) Int`. Its a function which memoizes the calculations it does into a Map. This works as far as only the values are concerned, I get the list of Ints. But when I want to retrieve the state with `s <- |
| 17:35:17 | <michaelh> | get`, it hangs. I suppose that's because the `mapM` operation works on an infinite list, and I'll never get the finished state. |
| 17:35:32 | × | rajivr quits (uid269651@gateway/web/irccloud.com/x-xljhenfdjyrbvgti) (Quit: Connection closed for inactivity) |
| 17:36:01 | <michaelh> | My question is: Is there a simple way to obtain the last state? That is the state after the caluclation of the last value of my finite list. |
| 17:36:59 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 17:37:13 | → | bahamas joins (~lucian@188.27.48.99) |
| 17:37:13 | × | bahamas quits (~lucian@188.27.48.99) (Changing host) |
| 17:37:13 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 17:37:15 | → | f-a joins (~f-a@151.36.221.225) |
| 17:39:19 | <sm[m]> | michaelh: you say finite list, but your example shows an infinite one ? |
| 17:40:56 | → | joebobjoe joins (~joebobjoe@unaffiliated/joebobjoe) |
| 17:41:00 | × | Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Quit: WeeChat 1.9.1) |
| 17:41:26 | <koz_> | michaelh: If you're dealing with infinite lists + monads, you have to be _very_ careful. |
| 17:41:32 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 17:41:46 | <michaelh> | sm[m]: The (takeWhile (> 0)) will give me a finite list, no? |
| 17:41:50 | <koz_> | michaelh: No. |
| 17:41:56 | <michaelh> | Oh |
| 17:42:00 | <koz_> | The mapM has to drag its way through the _entire_ list first. |
| 17:42:09 | <sm[m]> | as you suspected, the mapM tries to process the whole list |
| 17:42:10 | <koz_> | Once you're in a monad, lists no longer stream. |
| 17:42:25 | <koz_> | There was a question on this like, a few days ago. |
| 17:42:34 | <sm[m]> | sequentiality is enforced, by this monad at least |
| 17:42:42 | <koz_> | If you need this kind of behaviour (aka, streaming in a monad), you want something like pipes. |
| 17:43:23 | <koz_> | sm[m]: This has nothing to do with sequentiality and everything to do with monads forcing full evaluation of said list. |
| 17:43:23 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 17:43:31 | <koz_> | Because bind is a real pain. |
| 17:43:37 | <koz_> | (or rather, a necessary evil) |
| 17:43:47 | <fendor> | does haskell have a state of the art mutation testing framework? |
| 17:43:56 | <koz_> | fendor: What's 'mutation testing'? |
| 17:44:40 | <fendor> | koz_, you introduce small changes in your source-code programmatically, and run your test-suite against your changed code-base |
| 17:44:42 | → | vavagee joins (~vavagee@122.172.247.204) |
| 17:44:53 | ← | f-a parts (~f-a@151.36.221.225) () |
| 17:45:00 | <michaelh> | Hehe okay. Well, then this was a lot harder than I thought. Still have some difficulty wrapping my head around just the state monad, so this obviously was a too hard a problem I chose for myself. |
| 17:45:04 | <fendor> | if one of your test-case fails, the "mutation" has been killed, thus judging a bit your tests quality/coverage |
| 17:45:06 | <michaelh> | Thanks sm[m] and koz_ |
| 17:45:25 | <koz_> | michaelh: I would say this much - this is a problem with monads more generally. It's not specific to State. |
| 17:45:32 | <koz_> | Finitize the list and it should go away. |
| 17:45:50 | <koz_> | Basically, for now, keep in your head that 'once lists touch a monad, they no longer stream'. |
| 17:46:00 | <koz_> | Once you're more comfortable, read the pipes tutorial. |
| 17:46:03 | <fendor> | if your test-suite succeeded, than there is a semi-random change your test-suite would not protext you against |
| 17:46:09 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 17:46:13 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 17:46:17 | <michaelh> | koz_: Cool, got it |
| 17:46:32 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 17:46:46 | <koz_> | fendor: Are you talking about property testing? |
| 17:46:55 | <koz_> | Because that's the closest analogy I can think of to what you're describing. |
| 17:47:54 | <sm[m]> | I guess "forces full evaluation (before the next step in the do block)" is what I meant by sequentiality |
| 17:48:07 | <sparsity> | the basic problem with monadic streaming (the lack of commutativity between the monad and the applicative during traversal) can be avoided by using a "scanner" which does the mapAccumL part of traverse, ie, the State monad part, but without trying to commute this Applicative with the list monad |
| 17:48:19 | <koz_> | sm[m]: Yeah, in _that_ case, sure. |
| 17:48:33 | <koz_> | sparsity: Or you can just use pipes and never have to think about this ever again. |
| 17:48:38 | × | borne quits (~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f) (Ping timeout: 264 seconds) |
| 17:48:39 | <sparsity> | ie scanners, by restricting the applicative during traversal to State, can manage to do the streaming that is impossible in monadic lists using traverse |
| 17:48:43 | <koz_> | (like, you're not wrong, but why make your own life harder) |
| 17:49:01 | <sparsity> | i would argue a scanner is orders of magnitude more somple than conduit |
| 17:49:04 | × | vavagee quits (~vavagee@122.172.247.204) () |
| 17:49:04 | × | ixlun quits (~user@109.249.184.132) (Read error: Connection reset by peer) |
| 17:49:22 | × | ezrakilty quits (~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 276 seconds) |
| 17:49:42 | <koz_> | sparsity: Can you kindly read what I wrote? I didn't mention conduit anywhere. |
| 17:49:43 | <sparsity> | it also follows the cannonical formalism of the classes of the Haskell Prelude |
| 17:49:53 | <koz_> | sparsity: YMMV. |
| 17:49:54 | <sparsity> | sorry, i confuse pipes and conduit |
| 17:50:04 | → | ixlun joins (~user@109.249.184.132) |
| 17:50:05 | × | carlomagno quits (~cararell@148.87.23.12) (Remote host closed the connection) |
| 17:50:11 | <koz_> | I don't think I agree, and arguments from canonicity don't persuade me. |
| 17:50:17 | <fendor> | koz_, no, property testing does not modify the initial source-coude |
| 17:50:18 | <koz_> | The Prelude is not so brilliant that we should constantly ape it. |
| 17:50:20 | <fendor> | *code |
| 17:50:25 | <koz_> | fendor: Then I dunno. |
| 17:50:47 | <koz_> | And having to detect the condition you describe _manually_ is annoying and manual labour of exactly the kind I never want to engage in. |
| 17:50:48 | <sparsity> | koz_: the fundamental classes of the haskell prelude are very solid foundations |
| 17:50:57 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds) |
| 17:51:00 | <koz_> | sparsity: You mean like Alternative, whose laws are _still_ under debate? |
| 17:51:02 | <sparsity> | the fact they dont extend to the monadic setting is what your discussing |
| 17:51:04 | <fendor> | A library I found was https://hackage.haskell.org/package/MuCheck which is old and it seems not really easy to use |
| 17:51:14 | <koz_> | Or MonadPlus, which only exists because of hysterical raisins now? |
| 17:51:14 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 17:51:21 | <koz_> | Or MonadZip which is pointlessly over-constrained? |
| 17:51:26 | <sparsity> | just Traverse |
| 17:51:33 | <koz_> | You mean Traversable? |
| 17:51:39 | <sparsity> | yes |
| 17:51:50 | <sparsity> | thats where the Applicative and the Monad which dont commute in monadic streaming occur |
| 17:52:05 | <koz_> | Yes, Traversable is good. No, I don't think this is a suitable solution, or any simpler. |
| 17:52:08 | <koz_> | YMMV. |
| 17:52:19 | → | carlomagno joins (~cararell@148.87.23.12) |
| 17:52:22 | <koz_> | You're literally asking for people to think this through _every time thye encounter it_ with no compiler assistance. |
| 17:52:29 | <koz_> | As opposed to 'use a library and never think about this again'. |
| 17:52:35 | <sparsity> | which is what is solved using a scanner, which just does the State applicative traversal for implementing MapAccumL which bares resemblance to scan, hence "scanner" |
| 17:52:38 | <koz_> | I find this creates pointless effort, and is needlessly a trap. |
| 17:52:47 | <koz_> | Again though, YMMV. |
| 17:52:56 | <koz_> | If you wanna create work for yourself, you do that. |
| 17:53:01 | <koz_> | I won't, nor will I recommend it to anyone. |
| 17:53:39 | → | vavagee_ joins (~vavagee@122.172.247.204) |
| 17:54:07 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 17:54:24 | <sparsity> | the idea is that the classes of the Haskell Prelude are *not* written for monads, eg FunctorM which has an instance for monadic lists. so you never encounter this lack of commutativity between the applicative and the monad, in the non-monadic setting |
| 17:54:38 | → | borne joins (~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f) |
| 17:54:48 | <sparsity> | as soon as you try to traverse the monadic list, you run into the problem, and scanners become motivated |
| 17:54:57 | <sparsity> | its quite natural |
| 17:55:09 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Ping timeout: 264 seconds) |
| 17:55:44 | <sparsity> | the only reason Scanner isnt already part of the Prelude, is beacuse it lacks these monadic variants |
| 17:55:55 | × | usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving) |
| 17:55:56 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 17:56:12 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 17:56:19 | <sparsity> | when you go to the monadic setting, Scanner appears between Functor and Traversable |
| 17:57:08 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 17:57:28 | <sparsity> | really, traversable is totally hampered in the monadic setting by the lack of commutativity of the applicative used in traversal, and the monad in the monadic list-like thing being traversed |
| 17:58:00 | <sparsity> | so that in the monadic setting scanning, or only using the State monad for Traverse, becomes a reasonable alternative |
| 17:58:22 | <sparsity> | the user can implement this, while they would not be able to implement TraversableM |
| 17:58:34 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 17:58:45 | × | alx741 quits (~alx741@186.178.108.206) (Ping timeout: 264 seconds) |
| 17:58:55 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) |
| 17:59:01 | → | Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas) |
| 17:59:09 | × | zgrep quits (~zgrep@ircpuzzles/2015/april-fools/sixth/zgrep) (Quit: It's a quitter's world.) |
| 17:59:18 | <sparsity> | scannerM :: Monad m => (s -> a -> m (b,s)) -> s -> t m a -> m (t m b,s) |
| 18:00:05 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 18:00:19 | <sparsity> | implementing (and understanding) one class seems much easier than contending with the whole of the Pipes or Conduit source code |
| 18:00:37 | → | zgrep joins (~zgrep@ircpuzzles/2015/april-fools/sixth/zgrep) |
| 18:01:11 | <sparsity> | though i think obviously its more limmeted in utility, i struggle to understand how, I think perhaps it is due to branching combinators |
| 18:02:24 | × | vavagee_ quits (~vavagee@122.172.247.204) () |
| 18:02:38 | → | psygate joins (~psygate@unaffiliated/psygate) |
| 18:05:15 | × | dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection) |
| 18:06:57 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) |
| 18:07:01 | <koz_> | I have foo :: [Int] and gap :: Int. Furthermore, foo is non-empty, positive and increasing. I wanna do something like this: grab first element of foo (let's call it x), then drop all subsequent elements that are smaller than (x + gap), then 'send out' x, grab the next element, and keep doing that for the whole list. |
| 18:07:17 | <koz_> | What's an idiomatic way of writing this without resorting to manual recursion? |
| 18:08:50 | <sparsity> | seems almost like a builder... folding with reconstructions functions, but including the possibility to discard values |
| 18:10:11 | <sparsity> | you cant use anything over Foldable for your idomaticness, since traversable is shape preserving i think |
| 18:11:03 | → | alx741 joins (~alx741@186.178.108.206) |
| 18:11:04 | × | gentauro quits (~gentauro@unaffiliated/gentauro) (Read error: Connection reset by peer) |
| 18:11:56 | → | gentauro joins (~gentauro@unaffiliated/gentauro) |
| 18:12:02 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Ping timeout: 264 seconds) |
| 18:12:11 | <sparsity> | i guess you could traverse using Maybe and then do catMaybes after and hope for fusion |
| 18:14:16 | <sparsity> | which is nice idiomatically as it allows for the use of a "carry" from traverse using State (mapAccum) |
| 18:14:26 | → | xelxebar_ joins (~xelxebar@gateway/tor-sasl/xelxebar) |
| 18:15:41 | kaletaa_ | is now known as kaletaa |
| 18:15:50 | × | xelxebar quits (~xelxebar@gateway/tor-sasl/xelxebar) (Ping timeout: 268 seconds) |
| 18:17:16 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) |
| 18:17:17 | × | borne quits (~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f) (Ping timeout: 272 seconds) |
| 18:19:32 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 18:21:14 | <monochrom> | The sequence is increasing, so dropWhile is as good as filter. |
| 18:21:23 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 18:22:24 | <monochrom> | I think if you write the manual recursion, it is recognizable as a foldr. |
| 18:23:03 | <monochrom> | Err oops no. |
| 18:23:13 | × | crobbins quits (~crobbins@2601:2c1:200:ec50:e447:130a:d760:fb15) (Remote host closed the connection) |
| 18:23:13 | <kuribas> | how do you force a trace inside a monad? |
| 18:23:38 | → | hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net) |
| 18:23:50 | <monochrom> | go (x:xs) = x : go (dropWhile (\y -> y < x+gap)) |
| 18:23:58 | → | crobbins joins (~crobbins@c-73-76-34-113.hsd1.tx.comcast.net) |
| 18:24:10 | <monochrom> | err, go (x:xs) = x : go (dropWhile (\y -> y < x+gap) xs) |
| 18:24:24 | <int-e> | kuribas: do you want something like `trace "foo" (return ())`? |
| 18:24:28 | <kuribas> | yeah |
| 18:24:42 | × | geekosaur quits (82650c7a@130.101.12.122) (Ping timeout: 240 seconds) |
| 18:24:47 | <monochrom> | traceM |
| 18:25:11 | <int-e> | Oh, that exists... didn't know. In any case, monads tend to be strict in the monad operations, and then this works. |
| 18:25:20 | <kuribas> | ah nice |
| 18:25:25 | <monochrom> | traceIO, traceM, traceShowM |
| 18:25:36 | <int-e> | I knew about traceIO |
| 18:26:07 | <monochrom> | "traceM string = trace string $ pure ()" you are not missing anything except more names :) |
| 18:26:56 | × | Pickchea quits (~private@unaffiliated/pickchea) (Ping timeout: 256 seconds) |
| 18:26:58 | <int-e> | traceM is new-ish, only 7 years old |
| 18:27:57 | → | hololeap joins (~hololeap@unaffiliated/hololeap) |
| 18:28:41 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 18:29:01 | × | crobbins quits (~crobbins@c-73-76-34-113.hsd1.tx.comcast.net) (Ping timeout: 276 seconds) |
| 18:30:15 | → | gitgood joins (~gitgood@82-132-216-167.dab.02.net) |
| 18:30:18 | → | frozenErebus joins (~frozenEre@94.128.82.20) |
| 18:30:20 | <int-e> | traceM string = trace string $ pure () -- at least it does exactly what I proposed :)... modulo the obvious AMP change. |
| 18:31:13 | <monochrom> | koz_: I think manual recursion is the easiest to follow. I know how to get foldr involved for example, but it is obfuscating. |
| 18:31:30 | <koz_> | monochrom: OK, that makes sense. I was just wondering if I was missing something. |
| 18:31:32 | → | ADG1089__ joins (~aditya@223.226.229.230) |
| 18:31:59 | <monochrom> | But dropWhile is going to simplify it a lot. |
| 18:32:07 | → | waleee-cl joins (uid373333@gateway/web/irccloud.com/x-ztluuxltoyaaemrx) |
| 18:32:12 | <koz_> | Agreed - that's a really good suggestion, thanks! |
| 18:32:29 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 18:32:48 | <monochrom> | "go (x:xs) = x : go (dropWhile (\y -> y < x+gap) xs)" is basically a direct transcription of your English description. |
| 18:34:07 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 18:34:46 | × | FortuneZero quits (3223b878@50.35.184.120) (Quit: Connection closed) |
| 18:35:08 | <kuribas> | traceM "foo" is still only executed once |
| 18:37:13 | → | gitgoood joins (~gitgood@82-132-218-210.dab.02.net) |
| 18:38:52 | → | crobbins joins (~crobbins@2600:1700:48eb:8490:64e8:fb97:6b55:2a25) |
| 18:39:42 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 18:39:56 | × | gitgood quits (~gitgood@82-132-216-167.dab.02.net) (Read error: Connection reset by peer) |
| 18:40:03 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 18:40:10 | × | DTZUZU quits (~DTZUZO@205.ip-149-56-132.net) (Quit: WeeChat 3.1) |
| 18:41:14 | <hyiltiz> | Anyone else enjoyed playing https://wwwf.imperial.ac.uk/~buzzard/xena/natural_number_game? |
| 18:42:30 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:44:57 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds) |
| 18:44:58 | × | psygate quits (~psygate@unaffiliated/psygate) (Read error: Connection reset by peer) |
| 18:46:16 | × | mirrorbird quits (dwsjeid911@gateway/vpn/mullvad/dwsjeid911) (Quit: Leaving) |
| 18:46:36 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 18:47:40 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Read error: Connection reset by peer) |
| 18:48:59 | → | DTZUZU joins (~DTZUZO@205.ip-149-56-132.net) |
| 18:50:21 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 18:51:02 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds) |
| 18:51:20 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 18:51:39 | × | kuribas quits (~user@ptr-25vy0iacnrjbfn1sihk.18120a2.ip6.access.telenet.be) (Remote host closed the connection) |
| 18:53:27 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 18:54:43 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded) |
| 18:54:43 | → | borne joins (~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f) |
| 18:55:02 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 18:55:55 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded) |
| 18:56:15 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 19:00:19 | → | dunj4 joins (~dunj3@p200300f61714a678d85584dd45edd0a4.dip0.t-ipconnect.de) |
| 19:00:35 | × | dunj4 quits (~dunj3@p200300f61714a678d85584dd45edd0a4.dip0.t-ipconnect.de) (Client Quit) |
| 19:01:50 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:948b:9d7e:1b3d:4c5c) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 19:02:07 | → | pavonia joins (~user@unaffiliated/siracusa) |
| 19:03:02 | × | dunj3 quits (~dunj3@p200300f61714a62572ae6a6bffb9249a.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 19:03:29 | → | berberman_ joins (~berberman@unaffiliated/berberman) |
| 19:03:38 | × | berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 264 seconds) |
| 19:04:50 | × | Khisanth quits (~Khisanth@24.sub-174-244-147.myvzw.com) (Read error: Connection reset by peer) |
| 19:05:10 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 19:05:53 | → | Solid joins (~blyat@unaffiliated/solid-) |
| 19:06:02 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Ping timeout: 256 seconds) |
| 19:07:34 | → | nbloomf joins (~nbloomf@76.217.43.73) |
| 19:07:42 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 19:08:21 | <Solid> | so I entered `1 = 2` in ghci and pressed enter and ghci was like "okay sure" |
| 19:08:38 | <Solid> | afaik functions can't start with a number, so what's happening here? |
| 19:08:54 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 19:09:21 | → | nyaomi joins (~naomi@2603-7080-c43e-59ad-c878-29ff-fedf-ce89.res6.spectrum.com) |
| 19:09:37 | <monochrom> | You're looking at the more general: <pattern> = <expr> |
| 19:10:04 | <monochrom> | For example "(x,y) = (3,'x')" is OK. |
| 19:10:15 | <monochrom> | For example "Just x = Just 3" is OK. |
| 19:10:41 | <Solid> | a single number can be part of a pattern? :o |
| 19:10:53 | <Solid> | s/part of// |
| 19:10:59 | <geekosaur> | but something like 1 = 2 is never tested, since it has no bindings |
| 19:11:11 | <monochrom> | Now add laziness. "<pattern> = <expr>" doesn't do the necessary pattern matching right away. So "Nothing = Just 3" and "Just x = Nothing" are also OK. |
| 19:11:45 | <monochrom> | And lastly, number literals and string literals are also patterns. |
| 19:11:56 | <Solid> | oooooh that makes sense |
| 19:11:58 | <Solid> | thanks :) |
| 19:12:05 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 19:12:19 | <Solid> | indeed, let !1 = 2 in 1 makes it blow up |
| 19:12:27 | <monochrom> | :) |
| 19:12:36 | × | average quits (uid473595@gateway/web/irccloud.com/x-ccphdwzehpjwbayw) (Quit: Connection closed for inactivity) |
| 19:13:13 | <hololeap> | what is the point of WrappedMonad. is that from before Applicative was a superclass of Monad? |
| 19:14:55 | <monochrom> | Looks like so. |
| 19:15:10 | <monochrom> | And carrying MonadPlus to Alternative |
| 19:15:17 | × | nyaomi quits (~naomi@2603-7080-c43e-59ad-c878-29ff-fedf-ce89.res6.spectrum.com) (Ping timeout: 260 seconds) |
| 19:15:24 | <hololeap> | i'm trying to find some kind of wrapper that gives a Monad a Bind instance, but i'm not seeing one here |
| 19:15:26 | <hololeap> | https://hackage.haskell.org/package/semigroupoids-5.1/docs/Data-Functor-Bind.html |
| 19:16:43 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 19:19:39 | <hololeap> | oh, nvm, it's literally using the thing i just asked about, Control.Applicative.WrappedMonad :p |
| 19:19:59 | <hololeap> | funky business |
| 19:22:06 | → | Khisanth joins (~Khisanth@24.sub-174-244-147.myvzw.com) |
| 19:22:48 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 19:25:30 | × | jumper149 quits (~jumper149@ip185225.wh.uni-hannover.de) (Quit: WeeChat 3.0.1) |
| 19:26:31 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 265 seconds) |
| 19:26:39 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Remote host closed the connection) |
| 19:27:43 | → | notzmv joins (~zmv@unaffiliated/zmv) |
| 19:28:07 | × | knupfer quits (~Thunderbi@200116b82c668700c9527be50386a639.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 19:29:29 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 19:31:24 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 19:31:44 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 19:33:42 | × | geekosaur quits (82650c7a@130.101.12.122) (Ping timeout: 240 seconds) |
| 19:33:45 | ← | Solid parts (~blyat@unaffiliated/solid-) ("WeeChat 3.1") |
| 19:33:48 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 245 seconds) |
| 19:34:37 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 19:35:28 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:36:18 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 245 seconds) |
| 19:36:38 | × | Tops2 quits (~Tobias@dyndsl-095-033-024-175.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
| 19:37:58 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 245 seconds) |
| 19:44:46 | <hololeap> | which is considered the best style? `(\f -> bar . f) . foo` or `(bar .) . foo` or `fmap bar . foo` |
| 19:46:44 | <hololeap> | it's kind of funny because they go in order from most visual overhead to least, but also in order from least mental overhead to most |
| 19:48:05 | → | ezrakilty joins (~ezrakilty@75-172-115-167.tukw.qwest.net) |
| 19:48:57 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 19:49:06 | × | ixlun quits (~user@109.249.184.132) (Read error: Connection reset by peer) |
| 19:50:01 | → | ixlun joins (~user@109.249.184.132) |
| 19:50:19 | <monochrom> | Depends on the audience? Someone who's crazy about homset functors will love "fmap bar . foo", but how many people are like that? |
| 19:50:19 | × | crobbins quits (~crobbins@2600:1700:48eb:8490:64e8:fb97:6b55:2a25) (Remote host closed the connection) |
| 19:50:23 | → | stree joins (~stree@68.36.8.116) |
| 19:51:34 | <ephemient> | isn't this the same as \x -> bar . foo x? that expression makes more sense to me than any of the previous 3 |
| 19:51:51 | <monochrom> | Yeah. |
| 19:52:03 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 19:52:07 | × | kayvan quits (~user@52-119-115-185.PUBLIC.monkeybrains.net) (Remote host closed the connection) |
| 19:52:19 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 19:52:52 | × | ezrakilty quits (~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 276 seconds) |
| 19:53:44 | <hololeap> | ok, well my example should have been `(\f -> bar . f) . foo . baz` |
| 19:54:39 | <hololeap> | IRL: runFilters = (\f -> runMaybeT . f) . runKleisli . getEndomorphism . fold |
| 19:55:09 | × | Guest64155 quits (~textual@zrcout.mskcc.org) (Ping timeout: 264 seconds) |
| 19:56:07 | → | knupfer joins (~Thunderbi@200116b82c66870055c2ea10e2e0e610.dip.versatel-1u1.de) |
| 19:56:15 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds) |
| 19:56:15 | <hololeap> | runKleisli is the only thing that takes an argument (Kleisli m a) and returns a function |
| 19:56:28 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 256 seconds) |
| 19:57:58 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 245 seconds) |
| 19:58:04 | <hololeap> | i'll just go with the first option for least mental overhead |
| 19:58:59 | <monochrom> | How bad is \x y -> runMT (runK (getE (fold x))) y ? |
| 19:59:03 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
| 19:59:14 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 19:59:32 | <monochrom> | or \x y -> runMT ((runK . getE . fold) x) y |
| 20:00:07 | → | crobbins joins (~crobbins@2601:2c1:200:ec50:2da1:91bc:2113:a3e2) |
| 20:00:09 | → | average joins (uid473595@gateway/web/irccloud.com/x-syihsbtugiothwsv) |
| 20:00:47 | <monochrom> | See this is why people don't understand me when I say "I don't use (.) for pointfree, I use it for pipeline structure, and pointfree is so much more than (.) anyway" |
| 20:01:20 | <monochrom> | So they set up a strawman attack "so you write like \x -> (f . g) x?" to ridicule me. |
| 20:01:59 | <monochrom> | No, but I may write like \x y -> runMT ((runK . getE . fold) x) y or (\f -> runMaybeT . f) . runKleisli . getEndomorphism . fold |
| 20:02:17 | <monochrom> | I am not your strawman. |
| 20:02:21 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 20:02:35 | <hololeap> | i hope that's not directed at me |
| 20:02:54 | <monochrom> | Not you. Their nickname starts with "c". |
| 20:03:03 | <hololeap> | haha alright. |
| 20:04:36 | <hololeap> | monochrom: but you're right that it could also be written that way |
| 20:04:47 | <sparsity> | https://pastebin.com/raw/RmF5RnYq |
| 20:05:02 | × | ep1ctetus_ quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer) |
| 20:05:03 | × | petersen quits (~petersen@redhat/juhp) (Ping timeout: 245 seconds) |
| 20:05:44 | gitgoood | is now known as gitgood |
| 20:05:45 | <hololeap> | if i had started out with the type signature i probably would have written it that way |
| 20:05:58 | <monochrom> | :) |
| 20:06:08 | <monochrom> | I think your version shows interesting piping too. |
| 20:06:24 | <monochrom> | It's up to you. Both are explaining something. |
| 20:06:45 | → | ep1ctetus joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 20:07:15 | → | petersen joins (~petersen@redhat/juhp) |
| 20:07:56 | <sparsity> | im trying to convert the above code to a monadic streaming version, with ((Int,Int),) as the monad... not sure if it will work |
| 20:08:22 | × | frozenErebus quits (~frozenEre@94.128.82.20) (Ping timeout: 256 seconds) |
| 20:08:47 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 20:08:57 | <sparsity> | appearing at; instance Nonempty f => Shaped (Int,Int) (Zipper (Tree f)) where |
| 20:13:26 | <hololeap> | sparsity: which monad for ((Int,Int),) ? |
| 20:13:28 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds) |
| 20:13:52 | <hololeap> | @unmtl Writer (Int,Int) a |
| 20:13:52 | <lambdabot> | (a, Int, Int) |
| 20:14:03 | <hololeap> | but Writer needs a Monoid |
| 20:15:42 | <sparsity> | I just mean that instead of obtaining eg. (IO a,ListM IO a) on doing monadic uncons on an IO List, which is monadic (IO), here geti returns (((Int,Int),a),Tree f a), so instead of `IO a' its ((Int,Int),a) |
| 20:16:56 | → | Deide joins (~Deide@217.155.19.23) |
| 20:17:31 | <sparsity> | ie. capturing "shaped" traversals within monadic traversals |
| 20:18:01 | <sparsity> | not sure if ListT actually needs its parameter to be Monadic... |
| 20:19:33 | <hololeap> | not gonna lie, i find the code you pasted very confusing. but you might be looking for LogicT instead of ListT ... ? |
| 20:20:12 | <sparsity> | the ListT i mean is defined here; https://github.com/fog-hs/clock-scanner/blob/master/ListT.hs |
| 20:20:46 | <sparsity> | it isnt used in the paste above |
| 20:21:13 | <sparsity> | that just uses ((Int,Int),) directly via the Shaped class instance for Tree |
| 20:21:49 | × | ep1ctetus quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Quit: Leaving) |
| 20:22:06 | <sparsity> | but I wonder if i can capture that in the LinearM framework of implemented by ListT above |
| 20:22:46 | <sparsity> | so that just as I can have streaming in IO, i could instead have the shape index as the context |
| 20:23:31 | → | Alleria joins (~textual@2603-7000-3040-0000-b05d-e0a9-84ee-9eef.res6.spectrum.com) |
| 20:23:47 | <sparsity> | so that streaming over the tree is possible, where the "shape" is stored in this wrapper to the `a' retrived at the head (which is `m a' when using ListT m) |
| 20:23:54 | Alleria | is now known as Guest48052 |
| 20:25:05 | <sparsity> | getM :: Monad m => StateM m (f m a) a |
| 20:25:44 | <sparsity> | type StateM m s a = s -> m (Maybe (a, s)) |
| 20:26:21 | <sparsity> | comparing with the type of geti gives m~(,) i |
| 20:27:24 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) |
| 20:29:27 | → | pera joins (~pera@unaffiliated/pera) |
| 20:30:35 | <sparsity> | seems almost like setting m as a State monad, with the shape index `i' as the state |
| 20:31:42 | <sparsity> | the resulting carry during traversal is provided with these indexes, eg so that a carried copy can be updated and used to replace the values to give the comonad |
| 20:32:07 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 20:32:17 | <sparsity> | (since State during traverse gives mapAccum which has the carry) |
| 20:32:21 | × | arrowsvc_ quits (~arr@2.93.163.35) (Ping timeout: 264 seconds) |
| 20:32:26 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Ping timeout: 264 seconds) |
| 20:33:40 | <hololeap> | sparsity: many people need to nail things down to a concrete example (like, why would i ever use this) before they can get a mental model of the problem |
| 20:33:42 | × | geekosaur quits (82650c7a@130.101.12.122) (Ping timeout: 240 seconds) |
| 20:34:19 | <sparsity> | the idea is that the comonad for a pointer should be immidiate from an implementation of Shaped, ie writing geti and seti |
| 20:34:27 | × | Franciman quits (~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving) |
| 20:34:36 | <hololeap> | but why would i ever use this? |
| 20:34:39 | <sparsity> | it extends over get and set, as generics for pattern matching cons |
| 20:34:57 | <sparsity> | oh, you need the comonad for doing convolutions among other things |
| 20:35:46 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 20:36:01 | <sparsity> | the pointer is set up as a zipper on a tree, the nested thing from the comonad is the pointer where each value in the container is a copy of the whole container with pointer to that value |
| 20:36:12 | <hololeap> | why are you going to use it? is it purely theoretical or are you trying to create something will actually be used? |
| 20:36:28 | <sparsity> | convolutions are ubiquitous in scientific computing |
| 20:36:49 | → | Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck) |
| 20:36:51 | <sparsity> | eg for covnets or finite difference schemes for fluid solvers |
| 20:37:09 | → | Franciman joins (~francesco@host-82-49-79-189.retail.telecomitalia.it) |
| 20:37:23 | <sparsity> | i want convolutions on graphs for implementing message passing algorithms |
| 20:37:54 | <sparsity> | but have trouble syntactically explicating cyclic references |
| 20:38:08 | <hololeap> | ok, that's still way over my head, but thanks for pinning it down. i'm sure that will help others help you |
| 20:38:18 | <sparsity> | cheers |
| 20:38:51 | <dmj`> | Had a haskell interview today, only question I asked was, "what's wrong with this code: avg xs = sum xs / length xs" |
| 20:39:20 | <koz_> | dmj`: That it traverses the list twice or something? |
| 20:39:33 | <Uniaika> | dmj`: it's not a weighted sum |
| 20:39:34 | <Uniaika> | :P |
| 20:39:40 | <dmj`> | koz_: that's one of a few things yes, can you spot more problems? |
| 20:39:50 | <koz_> | dmj`: Yeah, it's monomorphic to Int. |
| 20:39:56 | <Uniaika> | maybe the now-former laziness of sum? |
| 20:39:58 | <koz_> | (which means it will probably not give the answer you think) |
| 20:40:10 | <dmj`> | koz_: yes, needs a fromIntegral in there on the call to length |
| 20:40:17 | <dmj`> | nice |
| 20:40:25 | <koz_> | Even with that, it's _still_ not really poly enough. |
| 20:40:39 | <dmj`> | koz_: just assume it's [Double] -> Double |
| 20:40:42 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 20:40:43 | <koz_> | Since now you're fixed to (Integral a) => a which is probably _still_ not gonna give you the answer you think. |
| 20:41:02 | <koz_> | If it's [Double] -> Double, you're fuxxored by IEEE754. |
| 20:41:06 | <dmj`> | koz_: (/) ensures its not Integral |
| 20:41:09 | <koz_> | Because floats are special. |
| 20:41:28 | <dmj`> | koz_: ok tell me what the heap looks like |
| 20:41:38 | × | ubert1 quits (~Thunderbi@p200300ecdf25d9cae6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 20:41:39 | <koz_> | dmj`: That's outside of my realm of knowledge. |
| 20:41:40 | <Uniaika> | yeah I think it should have been 'sum' xs `div` length xs' ? |
| 20:41:50 | <koz_> | Haskell perf is something I don't know enough about. |
| 20:41:57 | <koz_> | Uniaika: That's wrong answer territory. |
| 20:42:22 | <Uniaika> | dangit |
| 20:42:23 | <dmj`> | koz_: that's very common I'd say |
| 20:42:36 | <dmj`> | koz_: this code, believe it or not, causes heap exhaustion for sufficiently large xs |
| 20:42:37 | <koz_> | dmj`: Yeah, fair enough, it's not straightforward. |
| 20:42:46 | <koz_> | dmj`: Is it due to laziness of sum? |
| 20:42:48 | <dmj`> | koz_: well it shows me a deeper understanding |
| 20:43:09 | <dmj`> | koz_: no, not entirely, you were right about the double pass over xs, but what does that mean from the heap's perspective? |
| 20:43:21 | <koz_> | dmj`: Yeah, that's absolutely fair. I'm just being honest about waht I do or don't know. |
| 20:43:25 | <koz_> | And in this case, I don't know. |
| 20:43:31 | Uniaika | is pretty relieved they didn't interview with dmj` |
| 20:43:34 | <koz_> | I would avoid it just for the double-pass reasons if nothing else. |
| 20:43:52 | <hololeap> | dmj`: it holds the entire list in memory because it is going to pass over it twice? |
| 20:43:54 | <geekosaur> | xs is kept live through the whole computation instead of being consumed as it goes along |
| 20:43:58 | <dmj`> | koz_: the call to length forces the entire spine of the list in memory |
| 20:44:01 | <dmj`> | hololeap: now we're talking |
| 20:44:07 | <koz_> | Ah, I see. |
| 20:44:09 | <dmj`> | geekosaur: bingo |
| 20:44:11 | <koz_> | TIL. |
| 20:44:34 | <dmj`> | koz_: there is one final problem with the code, along with lack of `fromIntegral`, lack of a type signature, heap exhaustion |
| 20:44:50 | <dmj`> | koz_: can you spot it |
| 20:44:51 | <koz_> | dmj`: OK, what's that? |
| 20:44:53 | <koz_> | No. |
| 20:45:04 | <dmj`> | koz_: what is length [] ? |
| 20:45:12 | <koz_> | Ah, lol. |
| 20:45:15 | <dmj`> | division by zero |
| 20:45:17 | <koz_> | Nice one, should have spotted that. |
| 20:45:33 | <dmj`> | Uniaika: just because someone doesn't spot all of it doesn't mean they're disqualified |
| 20:46:04 | <hololeap> | dmj`: good job. that's pretty clever. |
| 20:46:11 | <dmj`> | But it shows that you've some familiarity with Haskell's convoluted Numerical hierarchy, you have some knowledge of laziness, the heap and call by need. You have a keen eye for exceptions. |
| 20:46:24 | <dmj`> | hololeap: thanks :) |
| 20:46:42 | <hololeap> | it deceives with its apparent simplicity |
| 20:46:44 | <Uniaika> | dmj`: I don't know man, I'm just a junior web developer :P |
| 20:46:45 | <dmj`> | Also, I didn't make this up ! It's the final chapter of Real World Haskell :P that apparently nobody read :) |
| 20:46:55 | Uniaika | goes back to making this goddamn webapp |
| 20:47:11 | <dmj`> | hololeap: yes ! 99% of the time Haskell people resort to a strict eval way of thinking, but this is one of those 1%'ers of the time you can't do that, and you get punished. |
| 20:47:48 | <Gurkenglas> | Aha! The counterexample to the lub library I wanted to construct yesterday relied on an imagined rewrite rule "fix f `lub` fix g ~> fix (f `lub` g)", which rewrite rule would increase definedness. Just undefined `lub` fix (fmap (const ())) is Just hangs, but fix (const (Just undefined) `lub` fmap (const ())) is Just (). |
| 20:47:52 | <dmj`> | hololeap: avg xs = uncurry (/) $ foldl (\(sum',len') n -> (sum' + n, len' + 1)) (0,0) xs |
| 20:48:02 | <dmj`> | it's the difference between 98% time spent in GC and 0% in GC |
| 20:48:37 | × | knupfer quits (~Thunderbi@200116b82c66870055c2ea10e2e0e610.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 20:48:51 | <hololeap> | wouldn't foldl' be better there? |
| 20:49:17 | <Uniaika> | on arbitrary Foldables, no, but on lists yes |
| 20:49:38 | <dmj`> | hololeap: you'd need more becuase foldl' will force the tuple to WHNF and won't stop thunk build up within the accumulators |
| 20:50:06 | <dmj`> | hololeap: I did +RTS -s -RTS on both, and GHC is able to optimize it away somehow such that you only need foldl and no bang patterns (when compiling with -O2) |
| 20:50:15 | <hololeap> | hm ok makes sense |
| 20:50:21 | × | joebobjoe quits (~joebobjoe@unaffiliated/joebobjoe) (Ping timeout: 264 seconds) |
| 20:50:44 | <dmj`> | hololeap: that's another classic space leak, storing a boxed tuple in an IORef, modifying it strictly but still allowing for thunk build up |
| 20:50:54 | <dmj`> | of the values inside the tuple |
| 20:51:10 | <dmj`> | That's why a strict data type is better data StrictTuple a b = StrictTuple !a !b |
| 20:51:12 | × | jess quits (jess@freenode/staff/jess) (Remote host closed the connection) |
| 20:51:19 | <dmj`> | then you don't have to worry about bangs |
| 20:51:40 | → | j joins (jess@freenode/staff/jess) |
| 20:52:16 | <dmj`> | During the naive avg there ends up being nothing to GC but the rapid allocations force the GC to run anyways. The GC threshold is hit, it goes back to allocating, more GC w/o collecting, until heap exhaustion |
| 20:52:34 | × | crobbins quits (~crobbins@2601:2c1:200:ec50:2da1:91bc:2113:a3e2) (Remote host closed the connection) |
| 20:53:13 | → | crobbins joins (~crobbins@2601:2c1:200:ec50:c8cd:d394:be82:ebad) |
| 20:54:59 | × | danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds) |
| 20:55:16 | × | j quits (jess@freenode/staff/jess) (Quit: K-Lined) |
| 20:55:36 | → | Lycurgus joins (~niemand@98.4.114.199) |
| 20:57:15 | → | aarvar joins (~foewfoiew@2601:602:a080:fa0:6cfb:c91f:3c9a:a8cb) |
| 20:57:51 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 20:58:00 | × | Alleria_ quits (~AllahuAkb@2603-7000-3040-0000-49c8-a343-3d41-8b5a.res6.spectrum.com) (Quit: Textual IRC Client: www.textualapp.com) |
| 20:58:34 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 20:58:45 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 264 seconds) |
| 20:58:55 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) |
| 20:59:49 | × | Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Quit: WeeChat 1.9.1) |
| 21:00:44 | <dmj`> | whatever happened to the haskellers of yore |
| 21:01:05 | <geekosaur> | hired, mostly :) |
| 21:01:10 | → | Pickchea joins (~private@unaffiliated/pickchea) |
| 21:01:52 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 21:02:10 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 21:03:12 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 21:03:33 | × | michaelh quits (~user@ip-109-42-114-163.web.vodafone.de) (Ping timeout: 264 seconds) |
| 21:03:57 | → | Alleria_ joins (~AllahuAkb@2603-7000-3040-0000-258c-2a70-8204-6956.res6.spectrum.com) |
| 21:04:13 | × | tomku quits (~tomku@unaffiliated/tomku) (Quit: Lost terminal) |
| 21:04:19 | × | jonathanx quits (~jonathan@h-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 21:04:57 | × | borne quits (~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f) (Ping timeout: 260 seconds) |
| 21:06:19 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 276 seconds) |
| 21:06:54 | → | borne joins (~fritjof@200116b86456970065fd8eaafdc5f06e.dip.versatel-1u1.de) |
| 21:07:32 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 21:07:52 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 21:08:23 | → | fendor_ joins (~fendor@178.115.131.242.wireless.dyn.drei.com) |
| 21:10:48 | × | fendor quits (~fendor@77.119.131.133.wireless.dyn.drei.com) (Ping timeout: 246 seconds) |
| 21:10:57 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) |
| 21:11:55 | × | Lycurgus quits (~niemand@98.4.114.199) (Quit: Exeunt) |
| 21:13:07 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 21:14:26 | atk | is now known as tak |
| 21:14:31 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded) |
| 21:14:50 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 21:15:17 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 21:15:26 | → | joebobjoe joins (~joebobjoe@unaffiliated/joebobjoe) |
| 21:15:29 | <dmj`> | geekosaur: that or rust ;) |
| 21:15:48 | <dmj`> | or professional JIRA ticket managers |
| 21:15:48 | × | ixlun quits (~user@109.249.184.132) (Ping timeout: 256 seconds) |
| 21:15:49 | → | Nahra joins (~Nahra@unaffiliated/nahra) |
| 21:16:48 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 21:18:50 | → | redmp joins (~redmp@172.58.35.49) |
| 21:18:57 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 21:19:05 | → | tomku joins (~tomku@unaffiliated/tomku) |
| 21:19:16 | → | ixlun joins (~user@109.249.184.132) |
| 21:19:29 | × | geekosaur quits (82650c7a@130.101.12.122) (Quit: Connection closed) |
| 21:19:43 | → | __minoru__shirae joins (~shiraeesh@109.166.56.60) |
| 21:21:14 | → | howdoi joins (uid224@gateway/web/irccloud.com/x-fbxhtxpvbmlflnip) |
| 21:21:39 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds) |
| 21:22:14 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Remote host closed the connection) |
| 21:23:18 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 21:23:37 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 21:24:13 | × | ixlun quits (~user@109.249.184.132) (Ping timeout: 245 seconds) |
| 21:25:45 | × | joebobjoe quits (~joebobjoe@unaffiliated/joebobjoe) (Ping timeout: 264 seconds) |
| 21:26:26 | × | xff0x quits (~xff0x@2001:1a81:520c:1100:b717:e343:40b1:857a) (Ping timeout: 264 seconds) |
| 21:27:15 | → | xff0x joins (~xff0x@2001:1a81:520c:1100:e227:e5f8:bb4c:3b9b) |
| 21:28:16 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds) |
| 21:28:21 | → | ixlun joins (~user@109.249.184.132) |
| 21:31:03 | × | rj quits (~x@gateway/tor-sasl/rj) (Remote host closed the connection) |
| 21:31:13 | × | ADG1089__ quits (~aditya@223.226.229.230) (Remote host closed the connection) |
| 21:31:25 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 21:32:56 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) |
| 21:33:37 | × | ixlun quits (~user@109.249.184.132) (Ping timeout: 276 seconds) |
| 21:35:17 | → | kam1 joins (~kam1@83.123.154.198) |
| 21:35:52 | × | kam1 quits (~kam1@83.123.154.198) (Read error: Connection reset by peer) |
| 21:36:23 | × | dsrt^ quits (dsrt@ip98-184-89-2.mc.at.cox.net) () |
| 21:37:26 | → | ixlun joins (~user@109.249.184.132) |
| 21:38:02 | → | joebobjoe joins (~joebobjoe@unaffiliated/joebobjoe) |
| 21:38:11 | <sparsity> | I was wanting to discuss Sum Trees |
| 21:38:42 | × | Nahra quits (~Nahra@unaffiliated/nahra) (Quit: leaving) |
| 21:38:43 | <sparsity> | these can be introduced as indexes over Trees |
| 21:39:37 | <wz1000> | dmj`: wouldn't your solution involving foldl also leak? even though the function is strict, its result is never forced. You have to use foldl' still |
| 21:39:47 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:b401:41f7:a4d0:94d7) |
| 21:41:10 | <wz1000> | oh, you are relying on the magic of the demand analyser |
| 21:41:10 | × | xff0x quits (~xff0x@2001:1a81:520c:1100:e227:e5f8:bb4c:3b9b) (Remote host closed the connection) |
| 21:41:17 | <sparsity> | and extending Trees to higher dimensional Trees of Hinz, by having n dimensional trees as branches to n+1 dimensional trees, again their Sum versions can be used as indexes |
| 21:41:20 | <wz1000> | but you can trip it up often though |
| 21:41:28 | → | xff0x joins (~xff0x@2001:1a81:520c:1100:a1d8:2af1:7428:6b99) |
| 21:41:43 | <wz1000> | using a simple condition so the result of the foldl isn't always guaranteed to be evaluated |
| 21:41:49 | → | redmp_ joins (~redmp@172.58.30.247) |
| 21:43:11 | <sparsity> | eg Int as an index over list is a choice between *lists* of () of different lengths, equivalent to the Sum choice of one of the values |
| 21:43:18 | <dmj`> | wz1000: It should yea, but when compiling with -O2 it doesn't seem to be a problem for some reason. But I'd tend to agree. |
| 21:43:36 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Remote host closed the connection) |
| 21:44:14 | <dmj`> | @def avg = \xs -> uncurry (/) $ foldl' (\(!x,!y) n -> (x + n, y + 1)) (0,0) xs |
| 21:44:16 | <lambdabot> | Defined. |
| 21:44:24 | <dmj`> | > avg [0..1e6] |
| 21:44:27 | <lambdabot> | 500000.0 |
| 21:44:45 | × | redmp quits (~redmp@172.58.35.49) (Ping timeout: 246 seconds) |
| 21:45:16 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 256 seconds) |
| 21:45:18 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 21:45:27 | × | Franciman quits (~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving) |
| 21:45:57 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded) |
| 21:46:17 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 21:46:29 | → | blueonyx joins (b9d4ab4b@unaffiliated/blueonyx) |
| 21:46:43 | <dmj`> | wz1000: going to try foldl w/o optimizations |
| 21:46:50 | <dmj`> | see if I can oom |
| 21:47:21 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 21:47:55 | × | ixlun quits (~user@109.249.184.132) (Ping timeout: 276 seconds) |
| 21:47:56 | <wz1000> | dmj`: if you replace `uncurry (/)` with a function that doesn't always strictly eval the tuple, no level of optimisation will get ghc to fix it |
| 21:48:55 | <wz1000> | I'm pretty sure even with `uncurry (/)` it won't work if the function isn't monomorphic and GHC doesn't/can't specialise |
| 21:49:43 | <wz1000> | So try defining a polymorphic version in module A with {-# NOINLINE #-} and then using it in module B, and it will OOM |
| 21:50:08 | <wz1000> | In my haskell interview I was asked what the problem with this bit of code was: `f (xs :: [Int]) = sum . filter (==1) <$> traverse (\x -> if cond then Just x else Nothing) xs` |
| 21:52:08 | × | alx741 quits (~alx741@186.178.108.206) (Ping timeout: 245 seconds) |
| 21:52:52 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 21:53:44 | <blueonyx> | hi, i'm learning lenses to use with aeson. so i was wondering if there is a more consise/pointfree version for f in https://friendpaste.com/1JmADDcGOj7hEn7CtCwbXl? |
| 21:53:46 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 21:54:00 | <sm[m]> | wz1000: dang, that's work for computers |
| 21:54:05 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 21:55:07 | <dmj`> | wz1000: ah yea, because GHC only optimizes on a per module basis |
| 21:55:11 | <wz1000> | sm[m]: how so? It compiles, and it seems to work |
| 21:55:16 | <dmj`> | wz1000: that's cool, will try |
| 21:55:33 | <wz1000> | sm[m]: I can't think of a computer smart enough to solve it |
| 21:55:49 | <sm[m]> | wz1000: really, then I'll have to study it more |
| 21:56:24 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded) |
| 21:56:43 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 21:57:08 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 21:58:06 | <wz1000> | sm[m]: the intent of the code was to check if every element in a list satisfies a condition, and if so return a Just <number of 1s in the list>, else return Nothing |
| 21:58:23 | <wz1000> | the problem was to figure out why this is not optimal |
| 21:58:34 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 21:58:37 | → | usr25 joins (~usr25@unaffiliated/usr25) |
| 21:58:56 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) |
| 21:58:58 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 276 seconds) |
| 22:00:24 | <Gurkenglas> | > (let f ~(Just x) = Just () in fix f, let g (Just x) = Just () in fix g) -- neat |
| 22:00:27 | <lambdabot> | (Just (),*Exception: <<loop>> |
| 22:00:48 | <infinisil> | Is there something like `class RecLimitShow a where recLimitShow :: Int -> a -> String` with a default for `Generic a`, which works like `show`, but it only recurses into the structure as deep as the given Int? |
| 22:01:24 | <dolio> | f = const (Just ()) |
| 22:01:28 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 22:01:32 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 22:01:39 | <infinisil> | This could e.g. then print an infinite list to a limited depth |
| 22:01:52 | <Gurkenglas> | hmm youre right maybe ill come up with a better example |
| 22:02:29 | <sparsity> | infinisil: Foldable? |
| 22:03:04 | <sparsity> | recLimitShow :: Foldable f => Int -> f a -> String |
| 22:03:06 | <infinisil> | This should also work for e.g. records and sum types |
| 22:03:17 | <sparsity> | erg |
| 22:03:49 | <sparsity> | well, i would just define your "generic" structure as basically a tree, and then deconstruct those |
| 22:04:40 | <infinisil> | That's basically what Generics allow you to do, and I think I could implement this |
| 22:04:45 | <sparsity> | https://gist.github.com/fog-hs/19abbf2ee8cf1f9f0c39abf0772da34e |
| 22:04:48 | <infinisil> | But I don't want to implement it if it already exists :) |
| 22:04:51 | <sparsity> | thats an implementation of it |
| 22:05:03 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 22:05:21 | <sparsity> | it doesnt have the Traversable that your after though. yet, i suppose... |
| 22:05:36 | <Gurkenglas> | > both . _Just %~ take 3 $ (let f ~(Just x) = Just $ ():x in fix f, let g (Just x) = Just (():x) in fix g) |
| 22:05:38 | <lambdabot> | (Just [(),(),()],*Exception: <<loop>> |
| 22:05:47 | <infinisil> | sparsity: That doesn't really look like what I'm after at all? |
| 22:06:00 | <infinisil> | Maybe I just don't get it |
| 22:06:06 | <sparsity> | well its an implementation of Datatype using Lists and Sums... |
| 22:06:23 | <sparsity> | so you should be able to traverse over it like you want |
| 22:06:32 | <sparsity> | i just havent written that |
| 22:06:33 | → | alx741 joins (~alx741@181.196.69.27) |
| 22:07:06 | <sparsity> | not sure about translating to it from Generics either... |
| 22:07:39 | <sparsity> | its nice that its extensible though |
| 22:08:09 | <infinisil> | Well, I'm looking for something that works with Generics, and that has the recursive thing implemented |
| 22:08:18 | <Gurkenglas> | or "f ~(Just x) = Just x", thats less baggage around the neat thing, though it would have ended the print early |
| 22:08:19 | <infinisil> | So I guess that's not really it :P |
| 22:08:42 | <infinisil> | sparsity: Going through a different Tree type also seems like an unnecessary indirection |
| 22:09:00 | <sparsity> | i think there is probably a complete implementation of it in the Vinyl package |
| 22:09:20 | <sparsity> | sum of products done right... |
| 22:09:38 | × | CrazyPython quits (~crazypyth@98.122.164.118) (Remote host closed the connection) |
| 22:09:38 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 245 seconds) |
| 22:09:39 | × | nbloomf quits (~nbloomf@76.217.43.73) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 22:10:00 | <sparsity> | oh, the tree thing is totally fundamental to its traversability to some depth - everything is isomorphic to these Sum Product trees |
| 22:10:18 | → | CrazyPython joins (~crazypyth@98.122.164.118) |
| 22:10:20 | <sparsity> | thats the whole point of generics |
| 22:10:57 | <sparsity> | but you can write it as an actual datatype as above, instead of using generics you just use that instead of datatypes |
| 22:11:36 | → | stree joins (~stree@68.36.8.116) |
| 22:11:36 | <infinisil> | That sounds way more complicated than I think it has to be.. |
| 22:11:43 | <monochrom> | dmj`: I'm late to the party. I think that "sum xs / length xs" has a type error, probably two type errors actually. Then again after fixing the type errors, everything you and other said is true too. |
| 22:12:15 | <infinisil> | sparsity: I have like 100 data types from third-party libraries I want to use with this, I can't just switch them all to extensible records just to make this work |
| 22:12:20 | <sparsity> | well its not really, you would have to basically use generics to translate it into that kind of structure for traversing over anyway |
| 22:12:37 | <sparsity> | infinisil: ah, ok |
| 22:12:50 | <monochrom> | I do use this to explain to my students fromIntegral and realToFrac. |
| 22:13:14 | <infinisil> | sparsity: I don't think so, I think a Generic implementation of this could just recurse with a function call to show the subfields |
| 22:13:51 | <infinisil> | Essentially deriving Show, but with an integer that gets passed down and decreased at every level, resulting it "..." if it's 0 without further recursion |
| 22:14:08 | × | Techcable quits (~Techcable@168.235.93.147) (Quit: ZNC - https://znc.in) |
| 22:14:44 | × | CrazyPython quits (~crazypyth@98.122.164.118) (Ping timeout: 256 seconds) |
| 22:15:02 | × | ericsagnes quits (~ericsagne@2405:6580:0:5100:ff67:b2c7:65c7:54f0) (Ping timeout: 264 seconds) |
| 22:15:22 | <sparsity> | all of these nestings are isomorphic to trees, its just a big datatype'esque tree thing, and thats what the code above does, the only problem is translating to it and using it, i think if you just want a library you can use, it might be worth looking at Vinyl |
| 22:15:59 | <infinisil> | Yeah no I don't think that's what I want |
| 22:16:10 | <dmj`> | monochrom: yes, the (/) :: Fractional a => a -> a -> a doesn't mix well with the `Int` returned by `sum`, necessitating `fromIntegral`. I'd view the lack of a type signature altogether as another problem to be pointed out. |
| 22:16:23 | <sparsity> | surely lenses must have generic traversals |
| 22:16:31 | × | conal_ quits (~conal@64.71.133.70) (Ping timeout: 276 seconds) |
| 22:16:31 | <dmj`> | monochrom: it's a good juicy question, seemingly innocuous code heap exhausts |
| 22:17:01 | → | Techcable joins (~Techcable@168.235.93.147) |
| 22:17:08 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 245 seconds) |
| 22:17:09 | justan0theruser | is now known as justanotheruser |
| 22:17:51 | <sparsity> | im not sure you can do it *without* translating to an extensible datatype.... unless Generics gives this traversable directly, which im not sure it does |
| 22:17:53 | → | ericsagnes joins (~ericsagne@2405:6580:0:5100:1715:de72:a1c7:dcd1) |
| 22:18:59 | <sparsity> | vinyl should probably have a way to spin something up from a derived Generic |
| 22:19:14 | × | spoonm quits (~spoonm@tokyo.spoonm.org) (Ping timeout: 246 seconds) |
| 22:19:19 | <sparsity> | and then you should be able to traverse over it |
| 22:19:55 | <monochrom> | infinisil: I think you have to roll your own. But you can copy someone else's code and modify it. http://hackage.haskell.org/package/generic-deriving has code using Generics to reinvent Show. You can steal that code and add your depth parameter. |
| 22:20:06 | × | hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 246 seconds) |
| 22:20:09 | → | conal joins (~conal@184.170.243.131) |
| 22:20:59 | <infinisil> | Ah that sounds promising |
| 22:23:27 | × | Pickchea quits (~private@unaffiliated/pickchea) (Quit: Leaving) |
| 22:23:27 | → | CrazyPython joins (~crazypyth@98.122.164.118) |
| 22:26:37 | × | sparsity quits (5ce955fb@gateway/web/cgi-irc/kiwiirc.com/ip.92.233.85.251) (Quit: Connection closed) |
| 22:27:49 | × | Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer) |
| 22:27:49 | <dmj`> | monochrom: interesting to note too, I don't believe the entire list is actually forced onto the heap during the call to (/), just the spine from length. Each cons cell progressively gets forced to a Double (when pattern-matched in sum), added, and then GC'd after the next recursive call. So if someone said, "The entire list is present on the heap" I'd say that might not be entirely accurate. |
| 22:28:08 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 22:28:47 | <monochrom> | Right. |
| 22:29:22 | × | CrazyPython quits (~crazypyth@98.122.164.118) (Remote host closed the connection) |
| 22:29:34 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:985d:1221:bd5b:d5dd) |
| 22:29:57 | <Gurkenglas> | Can I make an irrefutable pattern match with a custom error? |
| 22:30:37 | × | ericsagnes quits (~ericsagne@2405:6580:0:5100:1715:de72:a1c7:dcd1) (Ping timeout: 272 seconds) |
| 22:32:49 | <wz1000> | dmj`: I was finally able to defeat the demand analyser using `f = foldl (\ (!x,!y) n -> (x + n, y + 1)) (0,0); avg = uncurry (/) . f` |
| 22:33:00 | <wz1000> | no amount of optimisation could fix that |
| 22:33:29 | <wz1000> | inlining the f doesn't sort of arcane magic I haven't been able to figure out |
| 22:33:34 | <wz1000> | *does |
| 22:33:40 | <dmj`> | wz1000: this ooms? |
| 22:33:43 | <wz1000> | yes |
| 22:33:56 | → | cfvnhtsp^ joins (cfvnhtsp@ip98-184-89-2.mc.at.cox.net) |
| 22:34:21 | <monochrom> | That's very strange. |
| 22:35:10 | <Gurkenglas> | mwahaha when your line starts with "let ~(Left l)=x; ~(Right r)=x;" |
| 22:35:15 | <dmj`> | wz1000: are you positive, can you check your code and ensure it's ooming w/ the bangs present |
| 22:35:22 | <wz1000> | dmj`: yes |
| 22:36:13 | <wz1000> | dmj`: only if you call avg from another module though |
| 22:36:37 | <monochrom> | Is this []'s foldl? |
| 22:36:44 | <wz1000> | Or you can use {-# NOINLINE avg #-} |
| 22:36:46 | <wz1000> | yes |
| 22:36:46 | <dmj`> | wz1000: ah, okay. Can you confirm that foldl' still OOMs it? |
| 22:37:21 | <wz1000> | dmj`: no OOM with foldl' |
| 22:37:51 | → | spoonm joins (~spoonm@tokyo.spoonm.org) |
| 22:38:05 | × | redmp_ quits (~redmp@172.58.30.247) (Quit: leaving) |
| 22:38:21 | <dmj`> | That doesn't really make too much sense to me tbh then. The foldl vs. foldl' shouldn't really matter as long as you're strictly pattern matching on the tuple and forcing the Double inside. The foldl' is just going to force the tuple to WHNF and that's not where the thunk accumulation is happening anyways (rather its inside the tuple). |
| 22:38:26 | <monochrom> | Oh nevermind, s/foldl/foldl'/ is O(1) space, foldl is meant to be linear space. |
| 22:38:26 | <monochrom> | foldl op z (x:xs) = foldl (op z x) xs see how it doesn't even care how strict op is. |
| 22:38:51 | <wz1000> | yeah |
| 22:39:12 | <wz1000> | but the demand analyser is able to figure it out and rewrite it to foldl' if you inline f |
| 22:39:13 | <monochrom> | But if you can get f to inline, probably some rewrite rule changes foldl to something else entirely. |
| 22:39:38 | <Gurkenglas> | Aww only one @ per pattern? |
| 22:39:58 | <dmj`> | wz1000: how do you explain the oom if you're banging the Doubles, what's not getting forced? |
| 22:40:06 | <Gurkenglas> | I wanted to write x@~(Left l)@~(Right r) but it only works without the x@ |
| 22:40:22 | <wz1000> | dmj`: the result of the lambda is not getting forced |
| 22:40:53 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 245 seconds) |
| 22:40:56 | <dmj`> | wz1000: ah, I see. That makes sense. Sweet. |
| 22:41:00 | × | Psybur quits (~user@unaffiliated/psybur) (Remote host closed the connection) |
| 22:41:04 | <monochrom> | :) |
| 22:41:16 | <wz1000> | dmj`: this is also why foldl (+) leaks |
| 22:41:25 | <wz1000> | since (+) is also strict |
| 22:41:31 | <wz1000> | like your lambda |
| 22:41:47 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 22:41:48 | <wz1000> | so the strictness of the function doesn't matter |
| 22:43:56 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 22:44:00 | <shapr> | Hm, looks like debian/buster has libffi7 but not libffi6, so ghcup doesn't install ghc for me |
| 22:44:12 | <dmj`> | so the foldl' is ensuring in this case the result of the lambda is being forced during the fold's recursion, otherwise the expression just builds up. The tuple has to be forced. |
| 22:44:42 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 22:45:24 | <wz1000> | monochrom: I'm pretty sure its not a rewrite rule, -ddump-rule-rewrites shows nothing interesting: http://78.47.113.11/rules |
| 22:45:32 | <wz1000> | it is the demand analyser |
| 22:45:45 | <wz1000> | since uncurry is strict in its second argument |
| 22:45:48 | <wz1000> | I think |
| 22:46:15 | <dmj`> | @src uncurry |
| 22:46:15 | <lambdabot> | uncurry f p = f (fst p) (snd p) |
| 22:46:21 | <wz1000> | oh, its not |
| 22:47:01 | <wz1000> | some other magic going on |
| 22:47:06 | <wz1000> | I still don't understand this |
| 22:47:08 | × | jespada quits (~jespada@90.254.243.187) (Ping timeout: 245 seconds) |
| 22:47:33 | <wz1000> | yes, `uncurry' f ~(a,b) = f a b` still doesn't oom if f is inlined |
| 22:48:22 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 22:49:09 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 264 seconds) |
| 22:50:03 | <Gurkenglas> | Has anyone proven that for x less defined than y, every finest-grained sequence of steps to make x as defined as y has the same length? |
| 22:50:43 | → | CrazyPython joins (~crazypyth@98.122.164.118) |
| 22:50:53 | → | jespada joins (~jespada@90.254.243.187) |
| 22:51:01 | <wz1000> | as usual, GHC is simulataneously smarter and dumber than I expect |
| 22:52:19 | <monochrom> | Can x be made as defined as y at all? |
| 22:52:34 | <wz1000> | maybe this would be easier to understand if I learned how to read the demand signatures |
| 22:52:51 | <monochrom> | More meta-ly I'm afraid the question mixes up denotational semantics and operational semantics. |
| 22:52:59 | <Gurkenglas> | monochrom, what i mean is that every finest-grained chain of values, each of which is more defined than the last, with the same start and end has the same length |
| 22:54:00 | → | ezrakilty joins (~ezrakilty@75-172-115-167.tukw.qwest.net) |
| 22:54:06 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 22:54:10 | <monochrom> | "() : bottom" can be refined to "() : []" but also to "() : () : () : []". They have different heights. |
| 22:54:29 | <Gurkenglas> | yea but ():[] is not the same as ():():():[] |
| 22:54:49 | <Gurkenglas> | (bottom,bottom) can be made into ((),()) in two ways, both of length 2 |
| 22:55:14 | <monochrom> | If you know ():bottom is detined to be only () : () : () : [], then there is only one chain. |
| 22:55:23 | <monochrom> | Oh, that. |
| 22:56:12 | <Gurkenglas> | no, there's one through ():bottom:():[] and one through ():():bottom:[] |
| 22:56:49 | <monochrom> | Yeah sorry. |
| 22:57:00 | × | fendor_ quits (~fendor@178.115.131.242.wireless.dyn.drei.com) (Remote host closed the connection) |
| 22:58:25 | → | j joins (jess@freenode/staff/jess) |
| 22:58:34 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 22:58:46 | × | ezrakilty quits (~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 276 seconds) |
| 22:58:56 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) |
| 22:58:57 | <monochrom> | ooooo interesting, I'm sure it's true, but I have no idea how to prove it |
| 23:01:57 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:b401:41f7:a4d0:94d7) (Remote host closed the connection) |
| 23:03:13 | j | is now known as jess |
| 23:03:48 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 245 seconds) |
| 23:04:44 | <dmj`> | wz1000: maybe GHC has savant syndrome |
| 23:04:45 | × | bergey` quits (~user@107.181.19.30) (Ping timeout: 264 seconds) |
| 23:06:34 | × | pera quits (~pera@unaffiliated/pera) (Ping timeout: 276 seconds) |
| 23:06:51 | → | pera joins (~pera@unaffiliated/pera) |
| 23:06:54 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 23:07:15 | <infinisil> | monochrom: That worked really well in fact! |
| 23:07:40 | <monochrom> | :) |
| 23:07:41 | <infinisil> | Other than passing the recursion depth around, I only needed to change the K1 implementation |
| 23:09:19 | × | forgottenone quits (~forgotten@176.42.24.172) (Quit: Konversation terminated!) |
| 23:09:31 | <monochrom> | Gurkenglas: I think I know how to prove it. E.g., "4 : (5 : [])" is a tree of 5 nodes. Do structural induction on such trees, or natural number strong induction on the number of nodes. |
| 23:09:38 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:5883:2b2b:203d:3c57) |
| 23:10:07 | <Gurkenglas> | monochrom, function types can have inf nodes |
| 23:11:03 | <infinisil> | Actually infinite lists can't be printed yet, those need special handling |
| 23:11:33 | → | mouseghost joins (~draco@87-206-9-185.dynamic.chello.pl) |
| 23:11:33 | × | mouseghost quits (~draco@87-206-9-185.dynamic.chello.pl) (Changing host) |
| 23:11:33 | → | mouseghost joins (~draco@wikipedia/desperek) |
| 23:11:42 | <Gurkenglas> | (function |
| 23:11:48 | <Gurkenglas> | s can have inf nodes, i should say) |
| 23:11:55 | <hololeap> | :t take |
| 23:11:57 | <lambdabot> | Int -> [a] -> [a] |
| 23:12:25 | <hololeap> | @hoogle Foldable t => Int -> t a -> t a |
| 23:12:27 | <lambdabot> | Data.Vector.Generic take :: Vector v a => Int -> v a -> v a |
| 23:12:27 | <lambdabot> | Data.Vector.Generic drop :: Vector v a => Int -> v a -> v a |
| 23:12:27 | <lambdabot> | Data.Vector.Generic unsafeTake :: Vector v a => Int -> v a -> v a |
| 23:12:55 | <infinisil> | hololeap: Where I'm going I don't need take :P |
| 23:13:23 | <infinisil> | Limiting recursion depth while printing using Generic's |
| 23:14:11 | <Gurkenglas> | (where "number of nodes" is the length of each chain from bottom, of course :) ) |
| 23:14:25 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:9d6d:f5b3:4e2:6d89) |
| 23:14:36 | <hololeap> | ok, but if the data structure supports some cutoff to lazy evaluation, then you could just use Show, or am i missing something? |
| 23:14:54 | <monochrom> | OK, infinitely many nodes may be infinite height or infinite breadth or both. |
| 23:15:25 | <monochrom> | For finite height, do induction on height. For infinite height, oo = oo done. |
| 23:15:32 | hololeap | feels the impending poke of a thorn |
| 23:15:45 | <infinisil> | hololeap: How would that work? How would Show know it should not print further? |
| 23:16:12 | <Gurkenglas> | i doubt that the shape of the values ought to be relevant. i agree that the proof should proceed by some sort of induction |
| 23:16:35 | <hololeap> | it wouldn't because that responsibility would be pushed onto something that passes to show |
| 23:16:42 | <monochrom> | And the tree just has to be y in tree form, which can still has a few bottoms and that's why it can still be finite height. We are just evolving x towards y, not towards normal form. |
| 23:16:58 | × | joebobjoe quits (~joebobjoe@unaffiliated/joebobjoe) (Ping timeout: 276 seconds) |
| 23:17:20 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:9d6d:f5b3:4e2:6d89) (Client Quit) |
| 23:17:23 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) |
| 23:17:23 | <Gurkenglas> | i'd be interested whether the proof depends on some other statements that are true for haskell types but not every pointed algebraic domain with arbitrary meets |
| 23:17:26 | × | mouseghost quits (~draco@wikipedia/desperek) (Quit: mew wew) |
| 23:18:02 | → | usr25_tm joins (~usr25@unaffiliated/usr25) |
| 23:18:28 | <infinisil> | hololeap: Ah yeah but I don't want to do that in my case |
| 23:18:45 | <monochrom> | I think you need computability-related assumptions, such as "no continuum between two values, ever". |
| 23:18:53 | × | gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving) |
| 23:18:59 | <monochrom> | In fact, no Zeno paradox either. |
| 23:19:08 | <infinisil> | hololeap: I have like 100 data types that I want to log, and some of them can get arbitrarily large in size. Using show would print arbitrarily long log lines |
| 23:19:29 | <infinisil> | I'm creating a class like Show, but which allows limiting the recursion depth generically |
| 23:19:30 | → | elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) |
| 23:20:17 | × | borne quits (~fritjof@200116b86456970065fd8eaafdc5f06e.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 23:21:04 | × | elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Client Quit) |
| 23:21:08 | <hololeap> | i wonder if there is a typeclass for any recursive data structure that can count its depth |
| 23:21:37 | <hololeap> | that sounds more useful than a specialized Show, IMO |
| 23:21:43 | × | usr25 quits (~usr25@unaffiliated/usr25) (Ping timeout: 245 seconds) |
| 23:21:54 | <infinisil> | Hmm yeah it does |
| 23:22:03 | <Gurkenglas> | (huh i didnt even notice till now but there exist infinite descending chains, such as iterate (bottom:) (repeat ())) |
| 23:22:06 | <monochrom> | I think this is a requirement you need and it's a well-established extra condition in domain theory to acknowledge that we're talking about computing. |
| 23:22:11 | <infinisil> | hololeap: Though that wouldn't work, because `countDepth [1..] = \infty` |
| 23:22:39 | × | dhouthoo quits (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) (Quit: WeeChat 3.0) |
| 23:22:54 | martin02_ | is now known as martin02 |
| 23:23:02 | × | blueonyx quits (b9d4ab4b@unaffiliated/blueonyx) (Ping timeout: 240 seconds) |
| 23:23:03 | <monochrom> | There is a definition of "finite element". It's very technical, but the idea is that, e.g., 4 : 4 : bottom is finite, 4 : 4 : 4 : ... (to no end) is not finite. |
| 23:23:06 | × | DataComputist quits (~lumeng@50.43.26.251) (Ping timeout: 246 seconds) |
| 23:23:38 | <monochrom> | And the extra requirement is this: Every x equals the lub of all finite elements below x. |
| 23:23:57 | × | __minoru__shirae quits (~shiraeesh@109.166.56.60) (Ping timeout: 264 seconds) |
| 23:24:09 | → | DataComputist joins (~lumeng@50.43.26.251) |
| 23:24:27 | <hololeap> | i'm thinking something along the lines of `takeR :: Recursive t => Int -> r a -> r a` and `showUntil :: (Show1 t, Recursive t) => Int -> r a -> String` |
| 23:24:48 | <hololeap> | oops s/t/r/ |
| 23:25:46 | → | pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net) |
| 23:26:21 | <hololeap> | infinisil: i'm not saying it's better than your idea, just a bit more general perhaps |
| 23:26:40 | <Gurkenglas> | finite x are exactly compact x, yes? aka every chain with lub x includes x |
| 23:27:09 | <Gurkenglas> | then "every x equals the lub of all finite elements below x" is exactly "algebraic" |
| 23:27:10 | → | borne joins (~fritjof@200116b86456970065fd8eaafdc5f06e.dip.versatel-1u1.de) |
| 23:27:18 | <infinisil> | hololeap: Hmm yeah that does sound interesting |
| 23:27:52 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 23:28:09 | <infinisil> | hololeap: Though what would it replace the values that it cuts off with? |
| 23:28:10 | <Gurkenglas> | (assuming meets, i think) |
| 23:28:39 | × | xsperry quits (~as@unaffiliated/xsperry) (Remote host closed the connection) |
| 23:29:04 | <Gurkenglas> | (nevermind should work without meets) |
| 23:29:25 | <hololeap> | i know that someone here has refered to recursion-schemes as "a joke." not sure why; probably something to do with performance |
| 23:29:53 | <hololeap> | i've always thought that abstracting out the recursive part of recursive data types was a neat idea |
| 23:30:06 | infinisil | agrees |
| 23:30:35 | <infinisil> | Would it maybe be something like `takeR :: Recursive r => Int -> r a -> r (Maybe a)`? |
| 23:31:17 | → | usr256 joins (~usr25@unaffiliated/usr25) |
| 23:31:18 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 23:31:34 | × | pera quits (~pera@unaffiliated/pera) (Read error: Connection reset by peer) |
| 23:32:35 | <infinisil> | hololeap: monochrom: Oh the Data class kind of looks very relevant: https://hackage.haskell.org/package/base-4.11.0.0/docs/Data-Data.html#t:Data |
| 23:32:43 | <hololeap> | that depends on if the functor you're recursing over has some sort of "nullary constructor" |
| 23:32:46 | <infinisil> | I have a feeling such a recursion-limiting print could be implemented with this |
| 23:32:47 | <Gurkenglas> | https://hackage.haskell.org/package/free-5.1.6/docs/Control-Monad-Free.html#v:cutoff :) |
| 23:33:13 | <infinisil> | Gurkenglas: Oh nice! |
| 23:33:33 | × | notzmv quits (~zmv@unaffiliated/zmv) (Ping timeout: 264 seconds) |
| 23:33:40 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 23:33:48 | <Gurkenglas> | ekmett got there a decade ago |
| 23:33:49 | <monochrom> | compact and finite coincide for complete lattices. But I'm afraid compactness doesn't make sense for most domains. Most domains refuse to be complete lattices. |
| 23:34:16 | <hololeap> | some subset of Recursive woudld be data types that recurse over a functor that can short circuit the recursion |
| 23:35:07 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 23:35:21 | × | usr25_tm quits (~usr25@unaffiliated/usr25) (Ping timeout: 264 seconds) |
| 23:35:44 | <Gurkenglas> | monochrom, lemme guess finite will end up being "the length of each finest chain from bottom to x is finite" |
| 23:36:54 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 256 seconds) |
| 23:37:11 | <Gurkenglas> | (aka the most defined [()] -> () wouldn't be finite) |
| 23:37:51 | <hololeap> | so, Fix (a,) is isomorphic to an infinite stream and the recursion will go on as long as we are willing to consume it, but Fix (Compose Maybe (a,)) is isomorphic to a list (did i get that right?) and it could end at any moment |
| 23:38:02 | <monochrom> | I hope it's true. But the definition I know doesn't say it directly (pun intended, just you wait), and I don't have any idea what it means except when applied to ADTs for example it does come out as "finite tree height". |
| 23:39:13 | <monochrom> | Here is the definition: k is finite iff for every directed set D, if k is below the join of D, then k is below someone in D. |
| 23:40:08 | <Gurkenglas> | yep thats compact. is my version different? |
| 23:41:21 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 264 seconds) |
| 23:41:42 | <monochrom> | compactness removes "directed". and it s/someone in D/some finite subset of D/ |
| 23:41:43 | <hololeap> | infinisil: actually, no, you don't need to return `r (Maybe a)`, even if your recursive type may be finite, just like `take` doesn't return [Maybe a] |
| 23:41:51 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 23:41:58 | <monochrom> | err, s/someone in D/join of some finite subset of D/ |
| 23:42:11 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 23:42:21 | <hololeap> | it either returns the structure up to the depth you specified, or up to the end of the structure. whichever is shortest. |
| 23:43:23 | <monochrom> | I would play safe and not use compactness per se because it presumes arbitrary joins exist, which is false for the actually useful domains. |
| 23:43:33 | <hololeap> | infinisil: but how would you handle rose trees, for instance, where the possible inifinty is in two dimensions? |
| 23:43:33 | <Gurkenglas> | oh man i really hope im just confused and everyone doesnt actually override the same terminology |
| 23:43:37 | → | bergey` joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 23:43:43 | <monochrom> | In terms of intuition it's OK to analogize them of course. |
| 23:43:45 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 23:44:23 | <infinisil> | hololeap: Not sure |
| 23:44:31 | <infinisil> | But the Generic approach works well :) |
| 23:44:35 | → | blueonyx joins (b9d4ab4b@unaffiliated/blueonyx) |
| 23:44:49 | <hololeap> | i'm not sure it would in the case of rose trees, would it? |
| 23:45:32 | <Logio> | Gurkenglas: coming from math, people always seem to use the least general definition of compactness that happens to work in their problem domain |
| 23:46:14 | <hololeap> | didn't there used to be a Data.Tree in base? |
| 23:46:54 | <Gurkenglas> | now i get why this guy linked me a book as old as me, he wanted me to learn the same flavor of terminology he did |
| 23:46:59 | <hololeap> | nvm, it's in containers |
| 23:47:21 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds) |
| 23:47:39 | <hololeap> | infinisil: you can test your implementation on this: https://hackage.haskell.org/package/containers/docs/Data-Tree.html |
| 23:48:22 | <hololeap> | that has two dimensions of possibly infinite recursion |
| 23:49:39 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 245 seconds) |
| 23:50:28 | <hololeap> | so every level may need to be stopped at some level of recursion, and there can be infinite levels |
| 23:50:32 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 23:51:12 | <hololeap> | or maybe that's a corner case that you don't want to touch... understandably :) |
| 23:51:31 | <infinisil> | hololeap: I've already tested it with my own tree type (data MyTree = Leaf Int | Node MyTree MyTree) |
| 23:51:37 | <infinisil> | recursiveTree = Node recursiveTree recursiveTree |
| 23:51:53 | <infinisil> | gshow 1 recursiveTree gives `Node {left = Node {left = ..., right = ...}, right = Node {left = ..., right = ...}}` |
| 23:51:58 | → | notzmv joins (~zmv@unaffiliated/zmv) |
| 23:52:12 | <hololeap> | i get that, but your tree has one dimension of recursion and Data.Tree, aka rose trees, have two |
| 23:52:44 | <infinisil> | It does? |
| 23:52:54 | <hololeap> | since each level of the tree is a (possibly infinite) list of more subtrees |
| 23:53:02 | <infinisil> | Ahh |
| 23:53:06 | <infinisil> | lemme try |
| 23:53:40 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 23:54:10 | <infinisil> | data MyTree = Leaf | Node [MyTree] |
| 23:54:14 | <infinisil> | recursiveTree = Node (repeat recursiveTree) |
| 23:54:30 | <infinisil> | `gshow 4 recursiveTree` => `Node [Node [Node [Node [...],...],Node [...],...],Node [Node [...],...],Node [...],...]` |
| 23:54:52 | <infinisil> | Works great :D |
| 23:55:55 | <hololeap> | fair, although was that the result you were expecting? |
| 23:55:55 | × | Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer) |
| 23:56:10 | × | bergey` quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 256 seconds) |
| 23:56:13 | → | xsperry joins (~as@unaffiliated/xsperry) |
| 23:56:15 | <infinisil> | Yea |
| 23:56:30 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 23:56:48 | <infinisil> | I should probably share the implementation |
| 23:57:04 | <hololeap> | i'm just trying to point out possible corner cases |
| 23:57:33 | <hololeap> | if it works the way you want, then great |
| 23:58:45 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 264 seconds) |
All times are in UTC on 2021-03-12.