Logs: freenode/#haskell
| 2021-03-12 01:23:33 | <monochrom> | Well then take it up to the authors of hledger-lib? |
| 2021-03-12 01:23:48 | → | idhugo joins (~idhugo@80-62-117-241-mobile.dk.customer.tdc.net) |
| 2021-03-12 01:24:11 | <sm[m]> | well that's me. Somebody wants to change it and I must Decide |
| 2021-03-12 01:24:18 | × | frozenErebus quits (~frozenEre@94.128.82.20) (Ping timeout: 260 seconds) |
| 2021-03-12 01:24:28 | <monochrom> | Then it's your call. |
| 2021-03-12 01:24:38 | <sm[m]> | yup |
| 2021-03-12 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. |
| 2021-03-12 01:25:23 | <sm[m]> | dolio: that sounds good, I was wondering |
| 2021-03-12 01:25:26 | <monochrom> | Much more people understand "asum . map f . toList" readily, yes. |
| 2021-03-12 01:25:58 | × | idhugo_ quits (~idhugo@80-62-117-241-mobile.dk.customer.tdc.net) (Ping timeout: 260 seconds) |
| 2021-03-12 01:27:08 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 245 seconds) |
| 2021-03-12 01:27:32 | <sm[m]> | this is going to be dealing with a list of items countable with your fingers, I'm pretty sure |
| 2021-03-12 01:27:51 | <sm[m]> | but just out of interest, is the second one indeed more efficient ? |
| 2021-03-12 01:27:55 | <monochrom> | @type asum |
| 2021-03-12 01:27:56 | <lambdabot> | (Foldable t, Alternative f) => t (f a) -> f a |
| 2021-03-12 01:28:04 | × | idhugo quits (~idhugo@80-62-117-241-mobile.dk.customer.tdc.net) (Ping timeout: 256 seconds) |
| 2021-03-12 01:29:46 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 256 seconds) |
| 2021-03-12 01:30:29 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 2021-03-12 01:30:48 | <monochrom> | I think yes. |
| 2021-03-12 01:30:58 | <monochrom> | The getAlt costs nothing, to begin with. |
| 2021-03-12 01:31:48 | <monochrom> | foldMap (Alt . f) should also be just like foldMap f but it knows to use <|> instead of <> |
| 2021-03-12 01:32:25 | × | jdt quits (~jdt@38.77.195.50) (Ping timeout: 276 seconds) |
| 2021-03-12 01:33:12 | × | conal quits (~conal@66.115.157.67) (Quit: Computer has gone to sleep.) |
| 2021-03-12 01:33:31 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 265 seconds) |
| 2021-03-12 01:34:53 | → | erisco joins (~erisco@d24-57-249-233.home.cgocable.net) |
| 2021-03-12 01:34:54 | <monochrom> | Eh, is there any problem with foldMap f ? |
| 2021-03-12 01:35:18 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 260 seconds) |
| 2021-03-12 01:35:21 | → | ezrakilty joins (~ezrakilty@75-172-115-167.tukw.qwest.net) |
| 2021-03-12 01:35:28 | <monochrom> | % data MonoType = X | Y deriving (Eq, Show) |
| 2021-03-12 01:35:28 | <yahb> | monochrom: |
| 2021-03-12 01:35:46 | <monochrom> | % Maybe Y <> Maybe X |
| 2021-03-12 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 |
| 2021-03-12 01:36:18 | <monochrom> | Oh haha |
| 2021-03-12 01:36:26 | <monochrom> | % Just Y <> Just X |
| 2021-03-12 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 |
| 2021-03-12 01:36:38 | <monochrom> | % Just Y <|> Just X |
| 2021-03-12 01:36:38 | <yahb> | monochrom: Just Y |
| 2021-03-12 01:37:11 | → | jdt joins (~jdt@38.77.195.50) |
| 2021-03-12 01:37:33 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 2021-03-12 01:37:37 | <monochrom> | I wonder if I can talk you into s/Maybe/First/ :) |
| 2021-03-12 01:37:58 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 2021-03-12 01:38:47 | → | APugNamedPugsley joins (~13052@2601:58a:8300:f6a0:b0f3:7fc2:6f5f:380c) |
| 2021-03-12 01:39:27 | × | gabiruh_ quits (~gabiruh@vps19177.publiccloud.com.br) (Quit: ZNC 1.7.5 - https://znc.in) |
| 2021-03-12 01:40:32 | <monochrom> | @free phi :: a |
| 2021-03-12 01:40:32 | <lambdabot> | f phi = phi |
| 2021-03-12 01:40:49 | <monochrom> | I have been meditating on the profoundness of that. :) |
| 2021-03-12 01:42:33 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 264 seconds) |
| 2021-03-12 01:45:27 | → | gabiruh joins (~gabiruh@vps19177.publiccloud.com.br) |
| 2021-03-12 01:46:36 | × | kupi quits (uid212005@gateway/web/irccloud.com/x-opxyvcrmwhvgrwjf) (Quit: Connection closed for inactivity) |
| 2021-03-12 01:47:24 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Ping timeout: 246 seconds) |
| 2021-03-12 01:48:51 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 2021-03-12 01:51:43 | panda_man | is now known as koala_man |
| 2021-03-12 01:51:45 | × | koala_man quits (~vidar@157.146.251.23.bc.googleusercontent.com) (Changing host) |
| 2021-03-12 01:51:45 | → | koala_man joins (~vidar@unaffiliated/koala-man/x-2491903) |
| 2021-03-12 01:52:10 | × | mirrorbird quits (dwsjeid911@gateway/vpn/mullvad/dwsjeid911) (Quit: Leaving) |
| 2021-03-12 01:52:43 | <minoru_shiraeesh> | slack1256: "I love Alt. It with STM helped me implement a `epoll` like interface for threads :-P ." |
| 2021-03-12 01:53:19 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a) (Remote host closed the connection) |
| 2021-03-12 01:53:30 | <minoru_shiraeesh> | can you give a link to it? |
| 2021-03-12 01:53:55 | <minoru_shiraeesh> | I mean, a link to the code |
| 2021-03-12 01:54:14 | <slack1256> | Let me search it. |
| 2021-03-12 01:58:31 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 2021-03-12 02:01:52 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 2021-03-12 02:03:23 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 245 seconds) |
| 2021-03-12 02:03:50 | → | conal joins (~conal@192.145.118.143) |
| 2021-03-12 02:06:36 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 256 seconds) |
| 2021-03-12 02:07:21 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 265 seconds) |
| 2021-03-12 02:08:08 | <minoru_shiraeesh> | reading about epoll |
| 2021-03-12 02:08:26 | <minoru_shiraeesh> | so that's how servers actually work, right? |
| 2021-03-12 02:08:51 | <minoru_shiraeesh> | they register themselves as listeners using epoll |
| 2021-03-12 02:10:35 | × | Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer) |
| 2021-03-12 02:11:32 | <minoru_shiraeesh> | the vm could add a level of indirection, but eventually it will call epoll |
| 2021-03-12 02:11:36 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 2021-03-12 02:11:47 | <minoru_shiraeesh> | if I understood it correctly |
| 2021-03-12 02:11:49 | <Axman6> | I'm not sure servers have anything to do with it |
| 2021-03-12 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 |
| 2021-03-12 02:12:20 | <Axman6> | low* |
| 2021-03-12 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 . |
| 2021-03-12 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 |
| 2021-03-12 02:15:24 | <minoru_shiraeesh> | slack1256: thanks! gonna take a look |
| 2021-03-12 02:15:56 | → | nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com) |
| 2021-03-12 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 |
| 2021-03-12 02:16:51 | <slack1256> | Woah, nice. |
| 2021-03-12 02:17:01 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 265 seconds) |
| 2021-03-12 02:17:18 | Axman6 | wonders if his glirc client understands that we're talking about its implementation, using itself |
| 2021-03-12 02:17:27 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a) |
| 2021-03-12 02:17:58 | × | m0rphism quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 260 seconds) |
| 2021-03-12 02:18:01 | <liyang> | Have you implemented the self-conscious trait? |
| 2021-03-12 02:18:20 | <slack1256> | yeah, look out for the `fix` calls. |
| 2021-03-12 02:18:28 | <Axman6> | No, I'd need rust to do that :( |
| 2021-03-12 02:18:41 | <minoru_shiraeesh> | Axman6, there are other system calls that we could use instead of epoll to implement a server? |
| 2021-03-12 02:19:01 | slack1256 | something somethin io-uring |
| 2021-03-12 02:19:04 | <Axman6> | minoru_shiraeesh: yes, select and poll IIRC |
| 2021-03-12 02:19:44 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 2021-03-12 02:20:00 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:dc3f:d8f8:3e53:f67a) (Remote host closed the connection) |
| 2021-03-12 02:20:08 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 2021-03-12 02:20:08 | → | stree joins (~stree@68.36.8.116) |
| 2021-03-12 02:21:28 | × | conal quits (~conal@192.145.118.143) (Ping timeout: 260 seconds) |
| 2021-03-12 02:22:33 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:8580:920a:628b:ceb2) |
| 2021-03-12 02:23:33 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
| 2021-03-12 02:24:44 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
All times are in UTC.