2021-08-27 00:03:28 +0200 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) |
2021-08-27 00:03:45 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 248 seconds) |
2021-08-27 00:04:31 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2) |
2021-08-27 00:10:02 +0200 | wagle_ | wagle |
2021-08-27 00:11:18 +0200 | vysn | (~vysn@user/vysn) (Remote host closed the connection) |
2021-08-27 00:17:19 +0200 | pavonia_ | (~user@user/siracusa) |
2021-08-27 00:17:40 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-08-27 00:18:12 +0200 | pavonia | (~user@user/siracusa) (Read error: Connection reset by peer) |
2021-08-27 00:18:35 +0200 | pavonia_ | pavonia |
2021-08-27 00:19:01 +0200 | <monochrom> | Oh w00t 8.10.7 |
2021-08-27 00:21:30 +0200 | skykanin | (~skykanin@115.81-166-221.customer.lyse.net) (Quit: WeeChat 3.2) |
2021-08-27 00:23:17 +0200 | reumeth | (~reumeth@user/reumeth) (Ping timeout: 250 seconds) |
2021-08-27 00:24:30 +0200 | Athas | (athas@2a01:7c8:aaac:1cf:21e7:9b03:b2c:cc0f) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-08-27 00:25:22 +0200 | Athas | (athas@2a01:7c8:aaac:1cf:21e7:9b03:b2c:cc0f) |
2021-08-27 00:26:07 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-08-27 00:27:01 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.2) |
2021-08-27 00:27:29 +0200 | gehmehgeh | (~user@user/gehmehgeh) (Quit: Leaving) |
2021-08-27 00:27:42 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 00:28:55 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-08-27 00:30:27 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
2021-08-27 00:31:57 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 250 seconds) |
2021-08-27 00:33:17 +0200 | bontaq | (~user@ool-45779fe5.dyn.optonline.net) |
2021-08-27 00:33:41 +0200 | favonia | (~favonia@user/favonia) (Ping timeout: 250 seconds) |
2021-08-27 00:33:43 +0200 | oxide | (~lambda@user/oxide) (Ping timeout: 252 seconds) |
2021-08-27 00:34:13 +0200 | sjb0 | (~stephen@1.145.57.172) |
2021-08-27 00:34:16 +0200 | Erutuon | (~Erutuon@user/erutuon) |
2021-08-27 00:34:47 +0200 | azeem | (~azeem@dynamic-adsl-78-13-253-103.clienti.tiscali.it) (Ping timeout: 240 seconds) |
2021-08-27 00:35:07 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.) |
2021-08-27 00:35:25 +0200 | azeem | (~azeem@176.201.2.169) |
2021-08-27 00:36:11 +0200 | dajoer | (~david@user/gvx) |
2021-08-27 00:40:54 +0200 | jtomas | (~jtomas@233.red-83-34-2.dynamicip.rima-tde.net) (Remote host closed the connection) |
2021-08-27 00:41:29 +0200 | acidjnk | (~acidjnk@p200300d0c72b9541c8d0619322fc5f47.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
2021-08-27 00:48:40 +0200 | BosonCollider | (~olofs@90-227-86-119-no542.tbcn.telia.com) (Ping timeout: 240 seconds) |
2021-08-27 00:48:47 +0200 | azeem | (~azeem@176.201.2.169) (Ping timeout: 240 seconds) |
2021-08-27 00:49:14 +0200 | azeem | (~azeem@176.200.209.130) |
2021-08-27 00:51:17 +0200 | neo1 | (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 245 seconds) |
2021-08-27 00:51:27 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2021-08-27 00:56:24 +0200 | ec_ | (~ec@gateway/tor-sasl/ec) (Quit: ec_) |
2021-08-27 00:57:55 +0200 | azeem | (~azeem@176.200.209.130) (Ping timeout: 252 seconds) |
2021-08-27 00:58:29 +0200 | azeem | (~azeem@176.200.209.130) |
2021-08-27 01:07:07 +0200 | azeem | (~azeem@176.200.209.130) (Ping timeout: 240 seconds) |
2021-08-27 01:07:24 +0200 | azeem | (~azeem@176.200.209.130) |
2021-08-27 01:09:52 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-08-27 01:11:19 +0200 | Cajun | (~Cajun@user/cajun) |
2021-08-27 01:11:19 +0200 | gambpang | (~ishipman@207.181.230.156) (Remote host closed the connection) |
2021-08-27 01:14:25 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 250 seconds) |
2021-08-27 01:16:07 +0200 | azeem | (~azeem@176.200.209.130) (Ping timeout: 240 seconds) |
2021-08-27 01:16:26 +0200 | azeem | (~azeem@176.200.209.130) |
2021-08-27 01:19:04 +0200 | <maralorn> | I know of a lot of alternative syntax languages that compile to javascript. Are there alternative syntax languages that compile to Haskell? |
2021-08-27 01:22:53 +0200 | roboguy_ | (~roboguy_@2605:a601:afe7:9f00:1cd3:839e:78c5:a38b) |
2021-08-27 01:23:46 +0200 | mei | (~mei@user/mei) (Ping timeout: 252 seconds) |
2021-08-27 01:24:51 +0200 | <aegon> | maralorn: haskell :P |
2021-08-27 01:25:28 +0200 | <geekosaur> | agda at least used to compile to haskell |
2021-08-27 01:25:50 +0200 | <hpc> | agda's haskell was pretty funny, every single expression was unsafeCoerced |
2021-08-27 01:26:05 +0200 | <geekosaur> | I don't know if liquid haskell counts as "alternative syntax" to you |
2021-08-27 01:26:15 +0200 | <hpc> | template haskell? :D |
2021-08-27 01:26:20 +0200 | wrengr | wrengr_away |
2021-08-27 01:30:32 +0200 | <maralorn> | I am more thinking along the lines of https://github.com/serras/hinc. But was wondering if there are other approaches. |
2021-08-27 01:32:07 +0200 | azeem | (~azeem@176.200.209.130) (Ping timeout: 240 seconds) |
2021-08-27 01:32:23 +0200 | sszark2 | (~sszark@h-155-4-128-59.NA.cust.bahnhof.se) |
2021-08-27 01:32:55 +0200 | azeem | (~azeem@176.200.209.130) |
2021-08-27 01:35:10 +0200 | sszark1 | (~sszark@h-155-4-128-59.NA.cust.bahnhof.se) (Ping timeout: 240 seconds) |
2021-08-27 01:37:10 +0200 | azeem | (~azeem@176.200.209.130) (Ping timeout: 240 seconds) |
2021-08-27 01:37:58 +0200 | azeem | (~azeem@176.200.209.130) |
2021-08-27 01:41:07 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
2021-08-27 01:42:57 +0200 | mikoto-c1 | (~mikoto-ch@83.137.2.244) (Ping timeout: 248 seconds) |
2021-08-27 01:43:15 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-08-27 01:44:54 +0200 | jeslie0 | (~user@108.162.150.9) |
2021-08-27 01:45:37 +0200 | Gurkenglas | (~Gurkengla@dslb-088-064-053-140.088.064.pools.vodafone-ip.de) (Ping timeout: 248 seconds) |
2021-08-27 01:51:15 +0200 | jeslie0 | (~user@108.162.150.9) (Ping timeout: 250 seconds) |
2021-08-27 01:51:16 +0200 | azeem | (~azeem@176.200.209.130) (Ping timeout: 252 seconds) |
2021-08-27 01:51:48 +0200 | azeem | (~azeem@176.200.209.130) |
2021-08-27 01:55:49 +0200 | stef204 | (~stef204@user/stef204) (Read error: Connection reset by peer) |
2021-08-27 02:03:40 +0200 | azeem | (~azeem@176.200.209.130) (Ping timeout: 240 seconds) |
2021-08-27 02:04:25 +0200 | azeem | (~azeem@176.200.209.130) |
2021-08-27 02:07:55 +0200 | <maralorn> | I am concretely thinking about a syntax sugar than unisonweb.org has and that I‘d love to try out in Haskell: |
2021-08-27 02:08:54 +0200 | <maralorn> | I am thinking about having something like `await` or simply `'` that you can use in a do block which has the fake type `Monad m => m a -> a`. |
2021-08-27 02:10:27 +0200 | <roboguy_> | maralorn: what would that do? |
2021-08-27 02:10:40 +0200 | <roboguy_> | oh, in a do-block |
2021-08-27 02:10:41 +0200 | <maralorn> | So e.g. `do {print ('getInt + 'getInt)}` would get desugared to `do {a0 <- getInt; b0 <- getInt; print (a0 + b0)}` |
2021-08-27 02:10:45 +0200 | <roboguy_> | like Idris's !? |
2021-08-27 02:11:08 +0200 | <maralorn> | Idris has that? |
2021-08-27 02:11:13 +0200 | <Axman6> | sounds a wee bit like the proposal for the foo (<- g) x (<- h) syntax... can't remember it's name |
2021-08-27 02:11:23 +0200 | <roboguy_> | I think Idris has it with ! |
2021-08-27 02:11:46 +0200 | <maralorn> | Axman6: Ah, yeah. I thought about using `<-` for that. |
2021-08-27 02:12:22 +0200 | chisui | (~chisui@200116b868eba000c7eca115e002477a.dip.versatel-1u1.de) (Quit: Client closed) |
2021-08-27 02:12:27 +0200 | roboguy__ | (~roboguy_@2605:a601:afe7:9f00:a00e:962b:3f01:b758) |
2021-08-27 02:12:53 +0200 | <monochrom> | In bash, "cmd (< cmd2) (> cmd3)" is called process substitution. Perhaps we can call that monadic substitution :) |
2021-08-27 02:13:57 +0200 | <maralorn> | Axman6: Do you think it was a ghc-proposal? |
2021-08-27 02:14:02 +0200 | chisui | (~chisui@200116b868eba000c7eca115e002477a.dip.versatel-1u1.de) |
2021-08-27 02:14:09 +0200 | <roboguy__> | there have been a few times where I was thinking it'd be nice to have that |
2021-08-27 02:14:21 +0200 | <yushyin> | even more syntax sugar? oO |
2021-08-27 02:14:32 +0200 | <monochrom> | https://ro-che.info/ccc/1 |
2021-08-27 02:14:35 +0200 | <geekosaur> | haskell is mostly syntax sugar] |
2021-08-27 02:14:39 +0200 | <roboguy__> | hah |
2021-08-27 02:14:47 +0200 | <roboguy__> | that is pretty accurate! |
2021-08-27 02:14:54 +0200 | <Axman6> | I think so. I believe it was rejected because ordering becomes a bit painful - if you f (<- g) (<- h) and you need h to execute before g then the syntax doesn't really work |
2021-08-27 02:15:00 +0200 | <roboguy__> | especially when you look at Core |
2021-08-27 02:15:10 +0200 | <maralorn> | yushyin: Yeah I know. People will hate it. |
2021-08-27 02:15:22 +0200 | <Axman6> | Everything is caasseee, everything is case when you look at the core... |
2021-08-27 02:15:49 +0200 | <roboguy__> | occasionally it is let |
2021-08-27 02:16:03 +0200 | <Axman6> | Let's just fancy case |
2021-08-27 02:16:06 +0200 | <Axman6> | (I know it's not) |
2021-08-27 02:16:07 +0200 | <roboguy__> | haha |
2021-08-27 02:16:23 +0200 | roboguy_ | (~roboguy_@2605:a601:afe7:9f00:1cd3:839e:78c5:a38b) (Ping timeout: 250 seconds) |
2021-08-27 02:16:27 +0200 | <c_wraith> | never a case without a let |
2021-08-27 02:16:33 +0200 | <maralorn> | Axman6: flip? |
2021-08-27 02:16:44 +0200 | <roboguy__> | let there be a case |
2021-08-27 02:16:44 +0200 | <Axman6> | that becomes gross very quickly |
2021-08-27 02:16:53 +0200 | <Axman6> | IMO flip is almost always a code smell |
2021-08-27 02:16:54 +0200 | <monochrom> | What if the syntax is "f (30 <- g) (20 <- h)" using ordinals 20 and 30 to indicate order? |
2021-08-27 02:17:09 +0200 | <c_wraith> | monochrom: are you reinventing BASIC intentionally? |
2021-08-27 02:17:16 +0200 | <Axman6> | -XBASICMonadicExecution |
2021-08-27 02:17:30 +0200 | <monochrom> | Haha I don't know. I am not free of BASIC influence. |
2021-08-27 02:17:47 +0200 | <roboguy__> | ah, you sorta run into the issues that you have with sequence points in C? |
2021-08-27 02:18:09 +0200 | <maralorn> | You can always do { let x = (<- h); f (<- g) x } if you really need the other order. |
2021-08-27 02:18:14 +0200 | <monochrom> | flip is also not very general. |
2021-08-27 02:18:58 +0200 | <monochrom> | Ugh that breaks how "let" is supposed to preserve equational reasoning. |
2021-08-27 02:19:04 +0200 | <maralorn> | idk, unisonlang has this feature (with their effect system) and I think writing code with it is really pleasant. |
2021-08-27 02:19:29 +0200 | <maralorn> | monochrom: That is a fair point. |
2021-08-27 02:19:57 +0200 | <maralorn> | do { x <- h; f (<- g) x} ? |
2021-08-27 02:20:56 +0200 | <maralorn> | otoh that kinda lessens the appeal since I have always been a little annoyed by <- and = being so different things … |
2021-08-27 02:21:49 +0200 | <monochrom> | 'getInt + 'getInt is a misleading example. |
2021-08-27 02:22:01 +0200 | <roboguy__> | it's more weird to me that = is often used in effectful ways |
2021-08-27 02:22:02 +0200 | <maralorn> | monochrom: Why? |
2021-08-27 02:23:01 +0200 | <monochrom> | 'getInt - 'getInt is a slightly better example that alerts you to the issue "what if my intetion is y<-getInt; x<-getInt; return (y-x), not (x-y)" |
2021-08-27 02:23:24 +0200 | Lycurgus | (~juan@cpe-45-46-140-49.buffalo.res.rr.com) |
2021-08-27 02:24:04 +0200 | <maralorn> | monochrom: Yeah, there needs to be some simple rule for that. |
2021-08-27 02:24:11 +0200 | <monochrom> | In general an honest example involves a non-commutative f (or even, if 3 parameters are involved, also non-associative) so that the order issue we were discussing is immediately self-evident. |
2021-08-27 02:24:28 +0200 | <maralorn> | Fair |
2021-08-27 02:24:54 +0200 | <monochrom> | Such an honest example also destroy the fantasy of believing that such a feature is nice. |
2021-08-27 02:25:13 +0200 | <monochrom> | This is why honest examples are never given. |
2021-08-27 02:25:18 +0200 | <maralorn> | but, but |
2021-08-27 02:25:25 +0200 | <maralorn> | I programmed with it. It was nice. |
2021-08-27 02:25:36 +0200 | <maralorn> | It was in a strict language though … |
2021-08-27 02:25:50 +0200 | <monochrom> | Haskell's IO is also a strict language. |
2021-08-27 02:26:56 +0200 | <monochrom> | Err I botched my example. I wanted "return (x-y)" and I wanted the user to enter y first. |
2021-08-27 02:28:05 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 250 seconds) |
2021-08-27 02:28:18 +0200 | <roboguy__> | :t print =<< (-) @Int <$> readLn <*> readLn |
2021-08-27 02:28:19 +0200 | <lambdabot> | error: |
2021-08-27 02:28:19 +0200 | <lambdabot> | Pattern syntax in expression context: (-)@Int |
2021-08-27 02:28:19 +0200 | <lambdabot> | Did you mean to enable TypeApplications? |
2021-08-27 02:28:43 +0200 | <roboguy__> | :t print =<< (-) <$> (readLn :: IO Int) <*> readLn |
2021-08-27 02:28:44 +0200 | <lambdabot> | IO () |
2021-08-27 02:31:34 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:c1b3:f9cf:5870:faa7) (Remote host closed the connection) |
2021-08-27 02:31:53 +0200 | <roboguy__> | I feel like between (=<<), (>>=), (<$>) and (<*>) you can get decently far (especially if you throw in an operator that is defined as \f x -> join (f <*> x)) |
2021-08-27 02:32:00 +0200 | epolanski | (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
2021-08-27 02:32:42 +0200 | <monochrom> | @type \f x -> join (f <*> x) |
2021-08-27 02:32:43 +0200 | <lambdabot> | Monad m => m (a1 -> m a2) -> m a1 -> m a2 |
2021-08-27 02:33:11 +0200 | <roboguy__> | I used that a lot when I worked with the z3 package, due to how it's EDSL types are |
2021-08-27 02:33:27 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-08-27 02:33:40 +0200 | azeem | (~azeem@176.200.209.130) (Ping timeout: 240 seconds) |
2021-08-27 02:33:47 +0200 | <maralorn> | roboguy__: Yeah, you can. But it feels far less intuitive. |
2021-08-27 02:34:18 +0200 | azeem | (~azeem@176.200.209.130) |
2021-08-27 02:34:40 +0200 | <maralorn> | There was at the minimum a year in my Haskell learning experience where <$> and <*> scared the shit out of me. |
2021-08-27 02:35:19 +0200 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection) |
2021-08-27 02:36:17 +0200 | <Axman6> | Extremely general things like that can be very difficult to grok |
2021-08-27 02:36:38 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 250 seconds) |
2021-08-27 02:37:12 +0200 | <Axman6> | I think for most people the understanding comes from seeing how they behave for specific choices of applicatives, and then fetting a feel for the general pattern. Eventually it just becomes "Oh this this is an applicative, I can do these things too, and have a good expectation of how they should behave) |
2021-08-27 02:37:16 +0200 | <Axman6> | s/)/" |
2021-08-27 02:37:47 +0200 | PinealGlandOptic | (~PinealGla@37.115.210.35) (Quit: leaving) |
2021-08-27 02:38:05 +0200 | alx741 | (~alx741@181.196.68.187) (Quit: alx741) |
2021-08-27 02:38:07 +0200 | <roboguy__> | that's exactly my recommendation for stuff like that, too. I think it's a pretty effective way to learn |
2021-08-27 02:38:09 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) |
2021-08-27 02:38:34 +0200 | NieDzejkob | (~quassel@195.149.98.3) (Ping timeout: 252 seconds) |
2021-08-27 02:38:36 +0200 | <haskl> | maerwald, I just read the bit about not being able to test code that isn't exported, basically. I'm having trouble with defining the type of something in an example as some type that doesn't get exported. It seems like there's no way around that fact besides changing my code so it *does* export that code. That's a major limitation of cabal-docspec if I'm not mistaken. |
2021-08-27 02:38:48 +0200 | <roboguy__> | some things can certainly still be tricky though (many category theory things immediately come to mind, for me personally) |
2021-08-27 02:39:04 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:c1b3:f9cf:5870:faa7) |
2021-08-27 02:40:41 +0200 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
2021-08-27 02:41:44 +0200 | NieDzejkob | (~quassel@195.149.98.3) |
2021-08-27 02:42:39 +0200 | <Axman6> | Like understanding Applicative with Maybe is pretty easy, generalise a function over arguments which might not exist, and the result only exists if they all did. Then generalising a function where each argument can be chosen from lists is the next step. Generalising a function over arguments that can come from IO. And eventually you get that feel for "generalise a funnction over..." |
2021-08-27 02:42:46 +0200 | chisui | (~chisui@200116b868eba000c7eca115e002477a.dip.versatel-1u1.de) (Ping timeout: 246 seconds) |
2021-08-27 02:43:44 +0200 | <maralorn> | Today for me most monad/applicative/category operators seem easy. Never the less I observe my self always bailing out to writing stuff in do notation because it is more intuitive and scales much better to more complicated expressions. |
2021-08-27 02:44:39 +0200 | <maralorn> | And then when I have working code I refactor it to use more operators because that feels prettier. |
2021-08-27 02:45:13 +0200 | <maralorn> | But I guess that’s bad because when it was hard for me to write quickly it’s probably hard for others to read quickly. |
2021-08-27 02:46:57 +0200 | <maralorn> | I feel that some await like syntax would help with that. |
2021-08-27 02:48:13 +0200 | <maralorn> | (and for people annoyed by Haskell syntax getting bigger and bigger. I can give you a list of syntax features that I would like to see dropped for balance. :-p) |
2021-08-27 02:48:22 +0200 | <c_wraith> | If there are top-level type signatures and you're not doing too much in one place, it tends to be easier to read code than write it |
2021-08-27 02:48:37 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-08-27 02:48:49 +0200 | <c_wraith> | Because you don't need to follow the plumbing details. You can just know the compiler enforced getting it correct |
2021-08-27 02:50:40 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds) |
2021-08-27 02:50:53 +0200 | favonia | (~favonia@user/favonia) |
2021-08-27 02:51:04 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-08-27 02:54:12 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-08-27 02:57:28 +0200 | roboguy_ | (~roboguy_@2605:a601:afe7:9f00:80b:4b4e:c456:3347) |
2021-08-27 02:59:03 +0200 | thyriaen | (~thyriaen@x4db77c74.dyn.telefonica.de) |
2021-08-27 03:00:40 +0200 | roboguy__ | (~roboguy_@2605:a601:afe7:9f00:a00e:962b:3f01:b758) (Ping timeout: 240 seconds) |
2021-08-27 03:05:56 +0200 | lbseale | (~lbseale@user/ep1ctetus) (Read error: Connection reset by peer) |
2021-08-27 03:06:20 +0200 | d0ku | (~d0ku@178.43.56.75.ipv4.supernova.orange.pl) |
2021-08-27 03:06:41 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 03:08:59 +0200 | neo1 | (~neo3@cpe-292712.ip.primehome.com) |
2021-08-27 03:10:57 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds) |
2021-08-27 03:13:14 +0200 | neurocyte8 | (~neurocyte@185.117.69.230) |
2021-08-27 03:13:14 +0200 | neurocyte8 | (~neurocyte@185.117.69.230) (Changing host) |
2021-08-27 03:13:14 +0200 | neurocyte8 | (~neurocyte@user/neurocyte) |
2021-08-27 03:15:19 +0200 | neurocyte | (~neurocyte@user/neurocyte) (Ping timeout: 250 seconds) |
2021-08-27 03:15:19 +0200 | neurocyte8 | neurocyte |
2021-08-27 03:16:54 +0200 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-08-27 03:17:22 +0200 | renzhi | (~xp@2607:fa49:6500:3d00::d986) |
2021-08-27 03:20:22 +0200 | azeem | (~azeem@176.200.209.130) (Ping timeout: 252 seconds) |
2021-08-27 03:20:38 +0200 | azeem | (~azeem@176.200.202.203) |
2021-08-27 03:21:54 +0200 | <lechner> | Hi, sorry it is a bit off-topic: Does anyone know of an extremely simple language/parser for logic expressions? i'm looking for symbols (but no math), conditionals and AND/OR/NOT. Would prefer not to write one. Thanks! |
2021-08-27 03:22:34 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-08-27 03:23:30 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-08-27 03:25:49 +0200 | <haskl> | Has anyone here used cabal-docspec? |
2021-08-27 03:25:50 +0200 | <roboguy_> | lechner: does it have to be certain symbols? |
2021-08-27 03:27:17 +0200 | <lechner> | they would have meaning (module names) |
2021-08-27 03:28:08 +0200 | <roboguy_> | lechner: I mean, do they have to be like certain specific symbols like \/ means AND, etc or does it not really matter what the text of the symbols are? |
2021-08-27 03:28:12 +0200 | <roboguy_> | if that makes sense |
2021-08-27 03:29:27 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 03:29:27 +0200 | sszark2 | (~sszark@h-155-4-128-59.NA.cust.bahnhof.se) (Ping timeout: 240 seconds) |
2021-08-27 03:30:34 +0200 | <lechner> | roboguy_: they represent exernal logic variables that come from elsewhere, and should be more or less arbitrary text (sans keywords, if needed) |
2021-08-27 03:30:41 +0200 | <roboguy_> | if it doesn't really matter, you could probably use Haskell's parser and define a datatype with some infix constructors, etc. You can specify the precendence |
2021-08-27 03:31:13 +0200 | <roboguy_> | and then use the derived Read instance |
2021-08-27 03:31:42 +0200 | sszark2 | (~sszark@h-155-4-128-59.na.cust.bahnhof.se) |
2021-08-27 03:33:01 +0200 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-08-27 03:33:35 +0200 | <roboguy_> | although, if it is external text that comes from elsewhere, that makes me think that it does need to be a certain format? Not sure I understand fully, though |
2021-08-27 03:33:35 +0200 | <lechner> | due to Haskell's executable size I probably have use a recursive parser (or maybe a language like rust). i just could not think of a place with more Ph.D.s in mathematics |
2021-08-27 03:33:53 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds) |
2021-08-27 03:34:02 +0200 | <lechner> | i am really looking for a specification, i think |
2021-08-27 03:34:47 +0200 | <lechner> | it has to be fast |
2021-08-27 03:34:49 +0200 | <roboguy_> | like, you could make a data type like: "data Expr = Expr :&&: Expr | Expr :||: Expr | ... deriving (Read)", specify the fixity and precedence and then the Read instance should parse those expressions for you |
2021-08-27 03:35:00 +0200 | <roboguy_> | ah |
2021-08-27 03:36:22 +0200 | <lechner> | not that haskell is slow, but this would be for a lower system component in linux dealing with authentication |
2021-08-27 03:38:10 +0200 | <roboguy_> | you probably need a specific language in mind to find a parser library for that |
2021-08-27 03:38:47 +0200 | xff0x | (~xff0x@2001:1a81:53a5:7900:930f:bdfe:83e3:2183) (Ping timeout: 240 seconds) |
2021-08-27 03:39:12 +0200 | <roboguy_> | searching for "precedence parser" might help you find some libraries (together with a programming language name), though |
2021-08-27 03:40:54 +0200 | xff0x | (~xff0x@2001:1a81:53dc:be00:b65c:39d2:8f04:a6df) |
2021-08-27 03:41:19 +0200 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 250 seconds) |
2021-08-27 03:41:37 +0200 | <lechner> | i am looking to replace the awful logic of Linux PAM https://serverfault.com/questions/134471/success-n-control-syntax-in-pam-conf-pam-d-files |
2021-08-27 03:48:07 +0200 | azeem | (~azeem@176.200.202.203) (Ping timeout: 240 seconds) |
2021-08-27 03:48:20 +0200 | azeem | (~azeem@176.200.202.203) |
2021-08-27 03:50:57 +0200 | d0ku | (~d0ku@178.43.56.75.ipv4.supernova.orange.pl) (Ping timeout: 248 seconds) |
2021-08-27 03:51:24 +0200 | <lechner> | maybe something like this https://jsonlogic.com/ |
2021-08-27 03:53:22 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
2021-08-27 03:59:27 +0200 | azeem | (~azeem@176.200.202.203) (Ping timeout: 240 seconds) |
2021-08-27 04:00:10 +0200 | azeem | (~azeem@176.200.202.203) |
2021-08-27 04:00:25 +0200 | <dsal> | In case anyone's looking to help someone out over on Quora: https://usercontent.irccloud-cdn.com/file/qxOZ9t9C/%CE%BB.png |
2021-08-27 04:03:46 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-08-27 04:06:34 +0200 | <monochrom> | lechner: https://wiki.haskell.org/Parsing_expressions_and_statements shows how to use parsec to parse expressions with very minimal coding as soon as you have decided on operator precedence and associativity. You only need to read up to and including "expression parser", i.e., you can skip "statement parser" (unless you also have statements/commands) |
2021-08-27 04:08:13 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
2021-08-27 04:10:40 +0200 | dadude | (~da1dude@112.201.99.74) (Quit: Leaving) |
2021-08-27 04:16:43 +0200 | <Clint> | lechner: i ended up switching to alex/happy for that type of thing, but there's stuff like https://hackage.haskell.org/package/parsers-0.12.10/docs/Text-Parser-Expression.html |
2021-08-27 04:17:14 +0200 | thyriaen_ | (~thyriaen@dynamic-089-012-236-255.89.12.pool.telefonica.de) |
2021-08-27 04:17:47 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 240 seconds) |
2021-08-27 04:18:19 +0200 | talismanick | (~user@2601:644:8500:8350::cc04) (Remote host closed the connection) |
2021-08-27 04:18:26 +0200 | <pavonia> | "approximate phone number" O.o |
2021-08-27 04:19:59 +0200 | Codaraxis_ | (~Codaraxis@user/codaraxis) |
2021-08-27 04:20:02 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2021-08-27 04:20:49 +0200 | thyriaen | (~thyriaen@x4db77c74.dyn.telefonica.de) (Ping timeout: 248 seconds) |
2021-08-27 04:21:18 +0200 | haykam | (~haykam@static.100.2.21.65.clients.your-server.de) (Remote host closed the connection) |
2021-08-27 04:21:31 +0200 | haykam | (~haykam@static.100.2.21.65.clients.your-server.de) |
2021-08-27 04:23:40 +0200 | Codaraxis | (~Codaraxis@user/codaraxis) (Ping timeout: 240 seconds) |
2021-08-27 04:26:13 +0200 | Codaraxis__ | (~Codaraxis@user/codaraxis) |
2021-08-27 04:26:33 +0200 | <lechner> | monochrom Clint: thanks for the pointers! |
2021-08-27 04:29:10 +0200 | td_ | (~td@94.134.91.22) (Ping timeout: 240 seconds) |
2021-08-27 04:30:13 +0200 | Codaraxis_ | (~Codaraxis@user/codaraxis) (Ping timeout: 252 seconds) |
2021-08-27 04:31:14 +0200 | td_ | (~td@94.134.91.64) |
2021-08-27 04:31:37 +0200 | <arahael> | pavonia: My approximate phone number, is +630000000000 :) Accurate to two significant figures! |
2021-08-27 04:33:32 +0200 | <pavonia> | That's on the Philippines? |
2021-08-27 04:37:49 +0200 | snicf | (~snicf@ip98-161-16-64.om.om.cox.net) |
2021-08-27 04:38:20 +0200 | snicf | t3hyoshi |
2021-08-27 04:41:49 +0200 | martin02 | (~silas@2001:4ca0:0:fe00:0:5efe:a96:1bc1) |
2021-08-27 04:43:08 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-08-27 04:47:29 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 248 seconds) |
2021-08-27 04:48:27 +0200 | azeem | (~azeem@176.200.202.203) (Ping timeout: 240 seconds) |
2021-08-27 04:48:39 +0200 | azeem | (~azeem@176.200.202.203) |
2021-08-27 04:51:05 +0200 | t3hyoshi | (~snicf@ip98-161-16-64.om.om.cox.net) (Quit: leaving) |
2021-08-27 04:51:57 +0200 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 250 seconds) |
2021-08-27 04:55:53 +0200 | slack1256 | (~slack1256@191.125.176.239) |
2021-08-27 04:59:08 +0200 | t3hyoshi | (~snicf@2600:8804:1b96:4900:a9b2:143c:7dd0:6ceb) |
2021-08-27 05:03:04 +0200 | <arahael> | australia. |
2021-08-27 05:03:20 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-08-27 05:03:20 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-08-27 05:03:20 +0200 | wroathe | (~wroathe@user/wroathe) |
2021-08-27 05:03:32 +0200 | <arahael> | don't know if it includes the phillipines, though. it might. |
2021-08-27 05:04:33 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds) |
2021-08-27 05:05:05 +0200 | <arahael> | uh? odd. the australian country code is +61, i should double check on the mobile numbers! always thought it was 63. (we rarely use them locally) |
2021-08-27 05:05:41 +0200 | <lechner> | it was only approximate anyway |
2021-08-27 05:06:17 +0200 | <arahael> | indeed. |
2021-08-27 05:06:31 +0200 | <nshepperd> | accurate to within two significant digits, plus or minus one |
2021-08-27 05:06:57 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-08-27 05:07:07 +0200 | arahael | <- won't make it through an interview for a statistics position, it seems! |
2021-08-27 05:07:18 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2021-08-27 05:09:03 +0200 | <lechner> | plus or minus one is a range of two |
2021-08-27 05:09:34 +0200 | arahael | tears up his fake statistics doctorate. |
2021-08-27 05:16:07 +0200 | azeem | (~azeem@176.200.202.203) (Ping timeout: 240 seconds) |
2021-08-27 05:17:01 +0200 | azeem | (~azeem@176.200.202.203) |
2021-08-27 05:17:31 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds) |
2021-08-27 05:17:47 +0200 | otto_s_ | (~user@p5de2f1e2.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
2021-08-27 05:19:30 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-08-27 05:19:46 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-08-27 05:19:51 +0200 | otto_s | (~user@p5de2f51d.dip0.t-ipconnect.de) |
2021-08-27 05:30:15 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 05:32:15 +0200 | azeem | (~azeem@176.200.202.203) (Ping timeout: 250 seconds) |
2021-08-27 05:33:01 +0200 | azeem | (~azeem@176.200.202.203) |
2021-08-27 05:34:34 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2021-08-27 05:41:47 +0200 | azeem | (~azeem@176.200.202.203) (Ping timeout: 250 seconds) |
2021-08-27 05:43:44 +0200 | azeem | (~azeem@176.200.202.203) |
2021-08-27 05:45:10 +0200 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) (Read error: Connection reset by peer) |
2021-08-27 05:46:23 +0200 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) |
2021-08-27 05:50:07 +0200 | azeem | (~azeem@176.200.202.203) (Ping timeout: 240 seconds) |
2021-08-27 05:53:03 +0200 | azeem | (~azeem@176.201.38.112) |
2021-08-27 05:53:40 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2021-08-27 05:54:48 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2021-08-27 05:55:27 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
2021-08-27 05:57:47 +0200 | nate1 | (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
2021-08-27 05:58:29 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-08-27 05:58:36 +0200 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
2021-08-27 05:58:48 +0200 | hongminhee | (sid295@id-295.tinside.irccloud.com) (Ping timeout: 256 seconds) |
2021-08-27 06:01:19 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-08-27 06:02:05 +0200 | hongminhee | (sid295@tinside.irccloud.com) |
2021-08-27 06:02:12 +0200 | markpythonicbtc | (~textual@2601:647:5a00:35:24b0:1b1:4e8f:2ae0) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-08-27 06:03:01 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 250 seconds) |
2021-08-27 06:04:40 +0200 | mikoto-c1 | (~mikoto-ch@83.137.2.244) |
2021-08-27 06:07:10 +0200 | dyeplexer | (~dyeplexer@user/dyeplexer) |
2021-08-27 06:08:41 +0200 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) |
2021-08-27 06:09:38 +0200 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
2021-08-27 06:10:06 +0200 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) |
2021-08-27 06:11:48 +0200 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
2021-08-27 06:16:10 +0200 | typetetris | (sid275937@tinside.irccloud.com) (Ping timeout: 240 seconds) |
2021-08-27 06:16:53 +0200 | azeem | (~azeem@176.201.38.112) (Ping timeout: 250 seconds) |
2021-08-27 06:17:27 +0200 | azeem | (~azeem@176.201.38.112) |
2021-08-27 06:19:39 +0200 | markpythonicbtc | (~textual@c-24-6-12-87.hsd1.ca.comcast.net) |
2021-08-27 06:21:03 +0200 | typetetris | (sid275937@tinside.irccloud.com) |
2021-08-27 06:24:47 +0200 | mikoto-c1 | (~mikoto-ch@83.137.2.244) (Ping timeout: 240 seconds) |
2021-08-27 06:25:27 +0200 | hyiltiz | (~quassel@31.220.5.250) (Ping timeout: 240 seconds) |
2021-08-27 06:26:40 +0200 | azeem | (~azeem@176.201.38.112) (Ping timeout: 240 seconds) |
2021-08-27 06:27:24 +0200 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) |
2021-08-27 06:27:55 +0200 | hyiltiz | (~quassel@31.220.5.250) |
2021-08-27 06:30:47 +0200 | azeem | (~azeem@176.201.38.112) |
2021-08-27 06:34:06 +0200 | hyiltiz | (~quassel@31.220.5.250) (Ping timeout: 250 seconds) |
2021-08-27 06:36:47 +0200 | nate1 | (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
2021-08-27 06:38:27 +0200 | renzhi | (~xp@2607:fa49:6500:3d00::d986) (Ping timeout: 240 seconds) |
2021-08-27 06:40:19 +0200 | <jle`> | can i hire someone on fiverr to remove all my unused imports |
2021-08-27 06:40:31 +0200 | <Axman6> | just use hls |
2021-08-27 06:40:44 +0200 | <jle`> | :o |
2021-08-27 06:40:52 +0200 | <Axman6> | ... I think |
2021-08-27 06:41:10 +0200 | <Axman6> | just realised that I may have only done that in DAML... but HLS should also have it |
2021-08-27 06:41:18 +0200 | <jle`> | i should probably figure out how to actually use/install |
2021-08-27 06:41:25 +0200 | <Axman6> | which editor? |
2021-08-27 06:41:48 +0200 | <jle`> | vim |
2021-08-27 06:42:58 +0200 | <Axman6> | Hmm, I'm sure I've heard of it working in vim |
2021-08-27 06:43:25 +0200 | <jle`> | hm, i'm not sure exactly what it has to offer, just that people say it's useful |
2021-08-27 06:43:42 +0200 | <jle`> | what is a gh cup? |
2021-08-27 06:44:05 +0200 | hyiltiz | (~quassel@31.220.5.250) |
2021-08-27 06:44:20 +0200 | <Axman6> | simplest way to manage the install of multiple GHCs and other tools like cabal, hls etc. |
2021-08-27 06:44:29 +0200 | <jle`> | oh that seems useful :) |
2021-08-27 06:44:35 +0200 | <jle`> | maybe i can replace my bash scripts |
2021-08-27 06:44:38 +0200 | <Axman6> | it has revolutionalised my experience managing GHC installs |
2021-08-27 06:44:54 +0200 | slowButPresent | (~slowButPr@user/slowbutpresent) (Quit: leaving) |
2021-08-27 06:44:55 +0200 | <Axman6> | yeah you definitely want to give it a go, and then run `ghcup tui` |
2021-08-27 06:45:05 +0200 | zebrag | (~chris@user/zebrag) (Remote host closed the connection) |
2021-08-27 06:45:31 +0200 | <jle`> | ty :) |
2021-08-27 06:47:30 +0200 | roboguy_ | (~roboguy_@2605:a601:afe7:9f00:80b:4b4e:c456:3347) (Remote host closed the connection) |
2021-08-27 06:47:48 +0200 | roboguy_ | (~roboguy_@2605:a601:afe7:9f00:80b:4b4e:c456:3347) |
2021-08-27 06:47:54 +0200 | roboguy_ | (~roboguy_@2605:a601:afe7:9f00:80b:4b4e:c456:3347) (Client Quit) |
2021-08-27 06:49:05 +0200 | falafel | (~falafel@72.174.188.210) |
2021-08-27 06:52:22 +0200 | falafel | (~falafel@72.174.188.210) (Remote host closed the connection) |
2021-08-27 06:54:03 +0200 | <Axman6> | As for setting up hls with vim, I'm not sure how that's done, but it should be apretty well trodden path by now. hls is pretty bloody amazing these days, and Sandy's tactic based code generation stuff should be a lot of fun to play with. I haven't had the chance yet |
2021-08-27 06:54:41 +0200 | falafel | (~falafel@72.174.188.210) |
2021-08-27 07:00:58 +0200 | azeem | (~azeem@176.201.38.112) (Ping timeout: 250 seconds) |
2021-08-27 07:01:42 +0200 | azeem | (~azeem@176.201.38.112) |
2021-08-27 07:05:37 +0200 | slack1256 | (~slack1256@191.125.176.239) (Ping timeout: 248 seconds) |
2021-08-27 07:09:10 +0200 | favonia | (~favonia@user/favonia) (Ping timeout: 240 seconds) |
2021-08-27 07:12:37 +0200 | _ht | (~quassel@82-169-194-8.biz.kpn.net) |
2021-08-27 07:21:20 +0200 | azeem | (~azeem@176.201.38.112) (Ping timeout: 250 seconds) |
2021-08-27 07:21:52 +0200 | azeem | (~azeem@176.201.38.112) |
2021-08-27 07:28:04 +0200 | favonia | (~favonia@user/favonia) |
2021-08-27 07:28:07 +0200 | azeem | (~azeem@176.201.38.112) (Ping timeout: 240 seconds) |
2021-08-27 07:29:08 +0200 | azeem | (~azeem@176.201.38.112) |
2021-08-27 07:33:37 +0200 | reumeth | (~reumeth@user/reumeth) |
2021-08-27 07:35:45 +0200 | azeem | (~azeem@176.201.38.112) (Ping timeout: 250 seconds) |
2021-08-27 07:38:34 +0200 | azeem | (~azeem@176.201.38.112) |
2021-08-27 07:41:22 +0200 | <Guest372> | what is CPS used for? |
2021-08-27 07:43:07 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
2021-08-27 07:45:20 +0200 | mei | (~mei@user/mei) |
2021-08-27 07:48:37 +0200 | <int-e> | Control flow. |
2021-08-27 07:48:53 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 07:49:32 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-08-27 07:51:24 +0200 | reumeth | (~reumeth@user/reumeth) (Quit: reumeth) |
2021-08-27 07:52:24 +0200 | <Axman6> | sometimes performance |
2021-08-27 07:52:34 +0200 | nilof | (~olofs@90-227-86-119-no542.tbcn.telia.com) |
2021-08-27 07:53:52 +0200 | slack1256 | (~slack1256@191.125.26.192) |
2021-08-27 07:54:09 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds) |
2021-08-27 07:54:49 +0200 | falafel | (~falafel@72.174.188.210) (Ping timeout: 252 seconds) |
2021-08-27 07:55:18 +0200 | falafel | (~falafel@72.174.188.210) |
2021-08-27 07:59:57 +0200 | slack1256 | (~slack1256@191.125.26.192) (Remote host closed the connection) |
2021-08-27 08:00:36 +0200 | qbt | (~edun@user/edun) |
2021-08-27 08:00:53 +0200 | <Guest372> | simple example for control fow? |
2021-08-27 08:04:21 +0200 | falafel | (~falafel@72.174.188.210) (Ping timeout: 250 seconds) |
2021-08-27 08:06:37 +0200 | jakalx | (~jakalx@base.jakalx.net) () |
2021-08-27 08:08:10 +0200 | jakalx | (~jakalx@base.jakalx.net) |
2021-08-27 08:14:45 +0200 | lortabac | (~lortabac@62.98.0.240) |
2021-08-27 08:16:57 +0200 | falafel | (~falafel@72.174.188.210) |
2021-08-27 08:19:34 +0200 | _ht | (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
2021-08-27 08:19:45 +0200 | azeem | (~azeem@176.201.38.112) (Ping timeout: 248 seconds) |
2021-08-27 08:20:22 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 08:20:46 +0200 | Lycurgus | (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt) |
2021-08-27 08:20:49 +0200 | nilof | (~olofs@90-227-86-119-no542.tbcn.telia.com) (Ping timeout: 250 seconds) |
2021-08-27 08:20:50 +0200 | <aegon> | Guest372: https://www.haskellforall.com/2012/12/the-continuation-monad.html |
2021-08-27 08:23:01 +0200 | azeem | (~azeem@176.201.20.14) |
2021-08-27 08:23:25 +0200 | <aegon> | Guest372: actually i think i remember this being easier to grok https://www.hacklewayne.com/callcc-in-haskell-and-my-ultimate-monad |
2021-08-27 08:23:27 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2021-08-27 08:24:19 +0200 | sjb0 | (~stephen@1.145.57.172) (Read error: Connection reset by peer) |
2021-08-27 08:24:51 +0200 | falafel | (~falafel@72.174.188.210) (Remote host closed the connection) |
2021-08-27 08:24:57 +0200 | <aegon> | afaik the performance case that Axman is talking about is a side effect of it being able to short circuit further computation when something goes wrong. With something like the Maybe monad, even though Nothing <> _ = Nothing it will still evaluate the entire logic chain. With ContT you can early out and skip the no-ops at runtime |
2021-08-27 08:25:03 +0200 | <aegon> | Guest372: ^ |
2021-08-27 08:25:15 +0200 | falafel | (~falafel@72.174.188.210) |
2021-08-27 08:25:54 +0200 | <int-e> | since we're filling an empty question with contents... there's also the codensity business, e.g. http://comonad.com/reader/2011/free-monads-for-less/ |
2021-08-27 08:26:53 +0200 | cheater | (~Username@user/cheater) (Ping timeout: 250 seconds) |
2021-08-27 08:27:31 +0200 | <int-e> | (the problem is that there's more to CPS than the continuation monad, but no context was provided) |
2021-08-27 08:28:07 +0200 | <aegon> | yeah, callbacks are continuations right? |
2021-08-27 08:28:11 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 250 seconds) |
2021-08-27 08:28:15 +0200 | <aegon> | or am i mixed up |
2021-08-27 08:28:50 +0200 | <int-e> | it also has a low-level manifestation which sits at the core of GHC's runtime model |
2021-08-27 08:28:52 +0200 | gehmehgeh | (~user@user/gehmehgeh) |
2021-08-27 08:29:27 +0200 | <int-e> | where it replaces what would otherwise be a control stack |
2021-08-27 08:29:57 +0200 | falafel | (~falafel@72.174.188.210) (Read error: Connection reset by peer) |
2021-08-27 08:30:11 +0200 | falafel | (~falafel@72.174.188.210) |
2021-08-27 08:30:49 +0200 | <Guest372> | ok |
2021-08-27 08:31:12 +0200 | Gurkenglas | (~Gurkengla@dslb-088-064-053-140.088.064.pools.vodafone-ip.de) |
2021-08-27 08:34:51 +0200 | falafel | (~falafel@72.174.188.210) (Read error: Connection reset by peer) |
2021-08-27 08:35:04 +0200 | falafel | (~falafel@72.174.188.210) |
2021-08-27 08:37:17 +0200 | favonia | (~favonia@user/favonia) (Ping timeout: 250 seconds) |
2021-08-27 08:38:32 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
2021-08-27 08:39:27 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2021-08-27 08:41:40 +0200 | falafel | (~falafel@72.174.188.210) (Ping timeout: 240 seconds) |
2021-08-27 08:42:36 +0200 | sjb0 | (~stephen@1.145.117.250) |
2021-08-27 08:42:37 +0200 | cheater | (~Username@user/cheater) |
2021-08-27 08:43:47 +0200 | NinjaTrappeur | (~ninja@user/ninjatrappeur) (Ping timeout: 240 seconds) |
2021-08-27 08:44:19 +0200 | NinjaTrappeur | (~ninja@user/ninjatrappeur) |
2021-08-27 08:46:35 +0200 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2021-08-27 08:49:00 +0200 | fendor | (~fendor@178.165.207.147.wireless.dyn.drei.com) |
2021-08-27 08:49:25 +0200 | nilof | (~olofs@90-227-86-119-no542.tbcn.telia.com) |
2021-08-27 08:52:41 +0200 | <aegon> | hmm, is there a way to derive generic outside of the data declaration? |
2021-08-27 08:53:12 +0200 | <tomsmeding> | aegon: StandaloneDeriving ? |
2021-08-27 08:53:46 +0200 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2021-08-27 08:56:07 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 08:58:36 +0200 | <nilof> | So, I've been thinking, can you actually embed Tarski's axioms for elementary euclidean geometry in Hindley-Milner type theory? |
2021-08-27 08:59:13 +0200 | <nilof> | They are written in such a way that they never need to use sets or second order logic, and all of the quantifiers in the (first order logic) axioms seem to just use let-quantifiers |
2021-08-27 09:03:25 +0200 | d0ku | (~d0ku@178.43.56.75.ipv4.supernova.orange.pl) |
2021-08-27 09:09:06 +0200 | kenran | (~kenran@200116b82b180400b489723c692b519e.dip.versatel-1u1.de) |
2021-08-27 09:11:42 +0200 | Guest55 | (~Guest55@182.64.179.3) |
2021-08-27 09:14:08 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-08-27 09:14:59 +0200 | Skyfire | (~pyon@user/pyon) (Ping timeout: 250 seconds) |
2021-08-27 09:15:18 +0200 | Skyfire | (~pyon@user/pyon) |
2021-08-27 09:16:17 +0200 | azeem | (~azeem@176.201.20.14) (Ping timeout: 248 seconds) |
2021-08-27 09:16:27 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 09:17:14 +0200 | azeem | (~azeem@176.201.20.14) |
2021-08-27 09:18:25 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
2021-08-27 09:19:13 +0200 | cfricke | (~cfricke@user/cfricke) |
2021-08-27 09:23:10 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 240 seconds) |
2021-08-27 09:23:27 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 09:23:40 +0200 | azeem | (~azeem@176.201.20.14) (Ping timeout: 240 seconds) |
2021-08-27 09:24:22 +0200 | azeem | (~azeem@176.201.20.14) |
2021-08-27 09:26:36 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2021-08-27 09:26:59 +0200 | acidjnk | (~acidjnk@p200300d0c72b9541c8d0619322fc5f47.dip0.t-ipconnect.de) |
2021-08-27 09:27:32 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2021-08-27 09:31:35 +0200 | <aegon> | tomsmeding: thanks! |
2021-08-27 09:33:53 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer) |
2021-08-27 09:34:25 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-08-27 09:34:37 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-08-27 09:34:49 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
2021-08-27 09:34:53 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2021-08-27 09:35:12 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-08-27 09:35:16 +0200 | vysn | (~vysn@user/vysn) |
2021-08-27 09:35:40 +0200 | lortabac | (~lortabac@62.98.0.240) (Read error: Connection reset by peer) |
2021-08-27 09:35:44 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2021-08-27 09:36:10 +0200 | azeem | (~azeem@176.201.20.14) (Ping timeout: 240 seconds) |
2021-08-27 09:38:03 +0200 | azeem | (~azeem@176.201.20.14) |
2021-08-27 09:38:23 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 09:39:40 +0200 | sjb0 | (~stephen@1.145.117.250) (Ping timeout: 240 seconds) |
2021-08-27 09:39:55 +0200 | lortabac | (~lortabac@151.73.200.217) |
2021-08-27 09:43:06 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-08-27 09:43:17 +0200 | Cajun | (~Cajun@user/cajun) (Quit: Client closed) |
2021-08-27 09:43:18 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
2021-08-27 09:44:07 +0200 | tsmc | (~tsmc@159.196.170.5) |
2021-08-27 09:44:40 +0200 | azeem | (~azeem@176.201.20.14) (Ping timeout: 240 seconds) |
2021-08-27 09:45:23 +0200 | azeem | (~azeem@176.201.20.14) |
2021-08-27 09:45:49 +0200 | arjun | (~Srain@user/arjun) |
2021-08-27 09:46:58 +0200 | shriekingnoise | (~shrieking@186.137.144.80) (Quit: Quit) |
2021-08-27 09:47:43 +0200 | hnOsmium0001 | (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity) |
2021-08-27 09:48:27 +0200 | bontaq | (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 240 seconds) |
2021-08-27 09:49:08 +0200 | nattiestnate | (~nate@103.2.146.186) |
2021-08-27 09:50:27 +0200 | mjs2600_ | (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Ping timeout: 240 seconds) |
2021-08-27 09:56:34 +0200 | sjb0 | (~stephen@2001:8004:2738:35de:a1a3:a1c1:6e62:ba62) |
2021-08-27 09:58:44 +0200 | Ananta-shesha | (~pjetcetal@128-71-152-79.broadband.corbina.ru) |
2021-08-27 10:00:26 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-08-27 10:01:44 +0200 | nattiestnate | (~nate@103.2.146.186) (Quit: WeeChat 3.2) |
2021-08-27 10:02:08 +0200 | amahl | (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) |
2021-08-27 10:05:28 +0200 | hendursa1 | (~weechat@user/hendursaga) |
2021-08-27 10:09:12 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 10:09:21 +0200 | hendursaga | (~weechat@user/hendursaga) (Ping timeout: 276 seconds) |
2021-08-27 10:09:56 +0200 | aman | (~aman@user/aman) |
2021-08-27 10:11:45 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:c1b3:f9cf:5870:faa7) (Remote host closed the connection) |
2021-08-27 10:13:56 +0200 | aegon | (~mike@174.127.249.180) (Remote host closed the connection) |
2021-08-27 10:17:39 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
2021-08-27 10:17:39 +0200 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2021-08-27 10:17:42 +0200 | allbery_b | geekosaur |
2021-08-27 10:18:22 +0200 | kayprish | (~kayprish@77.243.29.13) |
2021-08-27 10:18:40 +0200 | xff0x | (~xff0x@2001:1a81:53dc:be00:b65c:39d2:8f04:a6df) (Ping timeout: 240 seconds) |
2021-08-27 10:19:30 +0200 | xff0x | (~xff0x@2001:1a81:53dc:be00:da3f:ef74:f6f8:c86d) |
2021-08-27 10:19:38 +0200 | epolanski | (uid312403@id-312403.helmsley.irccloud.com) |
2021-08-27 10:23:56 +0200 | enoq | (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) |
2021-08-27 10:31:22 +0200 | burnside_ | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 10:31:22 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Read error: Connection reset by peer) |
2021-08-27 10:32:38 +0200 | mastarija | (~mastarija@78-3-210-70.adsl.net.t-com.hr) |
2021-08-27 10:34:50 +0200 | <mastarija> | What does this warning about extraneous version range for a dependency on "internal" library mean exactly, and how do I get rid of it? |
2021-08-27 10:34:53 +0200 | <mastarija> | https://paste.tomsmeding.com/Q9wfbZUl |
2021-08-27 10:35:16 +0200 | <mastarija> | My cabal file: https://paste.tomsmeding.com/6n6fShRZ |
2021-08-27 10:38:40 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 240 seconds) |
2021-08-27 10:39:46 +0200 | <fendor> | mastarija, I think that is a cabal bug and depending on your cabal version, I think not at all |
2021-08-27 10:40:39 +0200 | tsmc | (~tsmc@159.196.170.5) (Quit: Client closed) |
2021-08-27 10:40:41 +0200 | <mastarija> | fendor, cool. I suspected it might be, since it showed that same message when I fixed internal library version and it still showed. |
2021-08-27 10:41:20 +0200 | nschoe | (~quassel@178.251.84.79) |
2021-08-27 10:43:10 +0200 | amahl | (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Ping timeout: 240 seconds) |
2021-08-27 10:43:48 +0200 | jtomas | (~jtomas@233.red-83-34-2.dynamicip.rima-tde.net) |
2021-08-27 10:44:28 +0200 | juhp | (~juhp@128.106.188.220) (Quit: juhp) |
2021-08-27 10:44:42 +0200 | juhp | (~juhp@128.106.188.220) |
2021-08-27 10:44:59 +0200 | Guest|7 | (~Guest|7@138.229.117.11) |
2021-08-27 10:45:21 +0200 | Guest|7 | (~Guest|7@138.229.117.11) (Client Quit) |
2021-08-27 10:47:25 +0200 | vpan | (~vilius@212.117.1.172) |
2021-08-27 10:48:02 +0200 | <jtomas> | Hi, is there a way to write this `f (a, b, c) = W a b c` in a shorter way, without repeating all the parameters one by one? |
2021-08-27 10:50:30 +0200 | ubert | (~Thunderbi@91.141.37.164.wireless.dyn.drei.com) |
2021-08-27 10:51:50 +0200 | <Rembane_> | jtomas: You need to write a curry3 function first. You could also use lenses, but I doubt it will be any shorter. |
2021-08-27 10:52:10 +0200 | mastarija | (~mastarija@78-3-210-70.adsl.net.t-com.hr) (Ping timeout: 240 seconds) |
2021-08-27 10:53:07 +0200 | <jtomas> | thank Rembane_ |
2021-08-27 10:53:12 +0200 | <jtomas> | *thanks |
2021-08-27 10:53:53 +0200 | <Rembane_> | jtomas: No problem! |
2021-08-27 10:54:07 +0200 | juhp | (~juhp@128.106.188.220) (Ping timeout: 240 seconds) |
2021-08-27 10:56:07 +0200 | timCF | (~timCF@m91-129-108-244.cust.tele2.ee) |
2021-08-27 10:56:19 +0200 | <dminuoso> | unsafeCoerce! |
2021-08-27 10:56:37 +0200 | dminuoso | smiles |
2021-08-27 10:56:38 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2021-08-27 10:56:39 +0200 | <Rembane_> | dminuoso: What?! Show us! :D |
2021-08-27 10:56:46 +0200 | pfurla_ | (~pfurla@ool-182ed2e2.dyn.optonline.net) |
2021-08-27 10:56:47 +0200 | <dminuoso> | f = unsafeCoerce |
2021-08-27 10:56:47 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-08-27 10:56:58 +0200 | <Rembane_> | That is shorter. |
2021-08-27 10:57:19 +0200 | <dminuoso> | Should I include some warranty or liability notice? |
2021-08-27 10:57:41 +0200 | <Rembane_> | Isn't it included in the function name? |
2021-08-27 10:57:46 +0200 | <dminuoso> | I take no responsiblity if, as a result of random crashes, people or kittens die. |
2021-08-27 10:58:13 +0200 | <dminuoso> | I used to think unsafe was just a boring prefix and I knew better. |
2021-08-27 10:58:24 +0200 | <dminuoso> | And then unsafePerformIO did things I did not expect it to |
2021-08-27 10:58:40 +0200 | <dminuoso> | It's quite interesting how wrong ones intuition can be |
2021-08-27 10:59:03 +0200 | <Rembane_> | That's the thing about intuition right? |
2021-08-27 10:59:37 +0200 | pfurla | (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 252 seconds) |
2021-08-27 11:00:54 +0200 | Guest55 | (~Guest55@182.64.179.3) (Quit: Client closed) |
2021-08-27 11:01:49 +0200 | ubert | (~Thunderbi@91.141.37.164.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
2021-08-27 11:01:51 +0200 | idf | (~idf@198.23.223.146) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-08-27 11:01:52 +0200 | ubert1 | (~Thunderbi@91.141.37.164.wireless.dyn.drei.com) |
2021-08-27 11:01:52 +0200 | <dminuoso> | I reckon, you might be able to `coerce` from (,,) to W though |
2021-08-27 11:01:56 +0200 | <dminuoso> | jtomas: ^- |
2021-08-27 11:02:00 +0200 | idf | (~idf@198.23.223.146) |
2021-08-27 11:02:09 +0200 | <dminuoso> | Assuming that `W` takes only 3 arguments at most, of course. |
2021-08-27 11:02:23 +0200 | <dminuoso> | data W = W Int Char String |
2021-08-27 11:02:25 +0200 | <dminuoso> | % data W = W Int Char String |
2021-08-27 11:02:25 +0200 | <yahb> | dminuoso: |
2021-08-27 11:02:36 +0200 | gehmehgeh | (~user@user/gehmehgeh) (Quit: Leaving) |
2021-08-27 11:02:37 +0200 | <dminuoso> | % f :: (Int, Char, String) -> W; f = coerce |
2021-08-27 11:02:37 +0200 | <yahb> | dminuoso: ; <interactive>:16:36: error:; * Couldn't match representation of type `(Int, Char, String)' with that of `W' arising from a use of `coerce'; * In the expression: coerce; In an equation for `f': f = coerce |
2021-08-27 11:02:40 +0200 | <dminuoso> | Mmm |
2021-08-27 11:02:50 +0200 | <Taneb> | It has to be an unsafeCoerce |
2021-08-27 11:02:54 +0200 | <dminuoso> | Why is that? |
2021-08-27 11:02:55 +0200 | hueso | (~root@user/hueso) (Ping timeout: 252 seconds) |
2021-08-27 11:03:11 +0200 | <Taneb> | coerce only works for newtype wrappers, basically |
2021-08-27 11:03:28 +0200 | Megant | (megant@user/megant) (Ping timeout: 252 seconds) |
2021-08-27 11:03:29 +0200 | <dminuoso> | Ohh, because W and (,,) have a different representation. Of cours. |
2021-08-27 11:03:51 +0200 | hueso | (~root@user/hueso) |
2021-08-27 11:03:58 +0200 | <int-e> | Once upon a time, when intuitions worked and accursedUnutterablePerformIO was still called inlinePerformIO... |
2021-08-27 11:04:10 +0200 | ubert1 | ubert |
2021-08-27 11:04:11 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds) |
2021-08-27 11:04:12 +0200 | <timCF> | Hello! I have a question about organization of enterprise Haskell codebase. Once I've learned finally tagless, I always used this as a development pattern in my projects. In most apps there is some implicit environment `Env` used inside of `ReaderT` where stored techincal things like postgres connection pool, which are accessed through different classes for example `Storage`, `ServiceRpc` which are using |
2021-08-27 11:04:18 +0200 | <timCF> | `Env`, and main application monad `AppM` implements these classes. This way for example it's very easy to "mock" things in tests, just have `TestAppM` and implement these classes differently. This all works fine until some stuff inside `Env` needs to be mutable. At the moment I'm using `MVar` field as a workaround, but thinking maybe `StateT` instead of `ReaderT` will be better and more "pure" solution? |
2021-08-27 11:04:24 +0200 | <timCF> | But for some reason I have not seen much use of `StateT` in enterprise codebase. What do you think? |
2021-08-27 11:04:59 +0200 | Megant | (megant@user/megant) |
2021-08-27 11:05:13 +0200 | <dminuoso> | timCF: I generally prefer IORef/MVar/etc in the environment, because it lets me avoid things like MonadBaseControl. |
2021-08-27 11:05:29 +0200 | <dminuoso> | With just a ReaderT/LoggingT based stack, you get free access to MonadUnliftIO |
2021-08-27 11:06:02 +0200 | <dminuoso> | StateT has so many unexpected nuances with respect to exceptions if you ever need to unlift something (e.g. as with `bracket`) |
2021-08-27 11:07:59 +0200 | <dminuoso> | int-e: Heh, the best comment regarding accursedUnutterablePerformIO is the first one here: https://web.archive.org/web/20200111052206/https://www.reddit.com/r/haskell/comments/2cbgpz/flee_t… |
2021-08-27 11:09:25 +0200 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2021-08-27 11:09:46 +0200 | <timCF> | dminuoso: yeah, I'm unlifting a lot, because most of the libraries are using just IO, and if IO appears in negative position - it's game over without unlifting. |
2021-08-27 11:12:10 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:c1b3:f9cf:5870:faa7) |
2021-08-27 11:12:26 +0200 | Guest55 | (~Guest55@182.64.179.3) |
2021-08-27 11:15:49 +0200 | jakalx | (~jakalx@base.jakalx.net) |
2021-08-27 11:16:40 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:c1b3:f9cf:5870:faa7) (Ping timeout: 240 seconds) |
2021-08-27 11:16:47 +0200 | hegstal | (~hegstal@2a02:c7f:7604:8a00:16d:5419:a8cf:3833) |
2021-08-27 11:19:02 +0200 | retroid_ | (~retro@5ec19a54.skybroadband.com) |
2021-08-27 11:21:31 +0200 | retro_ | (~retro@5ec19a54.skybroadband.com) (Ping timeout: 258 seconds) |
2021-08-27 11:22:55 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
2021-08-27 11:24:24 +0200 | oxide | (~lambda@user/oxide) |
2021-08-27 11:26:01 +0200 | gehmehgeh | (~user@user/gehmehgeh) |
2021-08-27 11:33:07 +0200 | Erutuon | (~Erutuon@user/erutuon) (Ping timeout: 240 seconds) |
2021-08-27 11:34:25 +0200 | azeem | (~azeem@176.201.20.14) (Ping timeout: 248 seconds) |
2021-08-27 11:35:13 +0200 | azeem | (~azeem@176.201.20.14) |
2021-08-27 11:35:47 +0200 | Katarushisu | (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) |
2021-08-27 11:41:26 +0200 | lortabac | (~lortabac@151.73.200.217) (Read error: Connection reset by peer) |
2021-08-27 11:42:02 +0200 | lortabac | (~lortabac@151.70.200.251) |
2021-08-27 11:42:19 +0200 | nilof | (~olofs@90-227-86-119-no542.tbcn.telia.com) (Ping timeout: 250 seconds) |
2021-08-27 11:45:58 +0200 | nilof | (~olofs@90-227-86-119-no542.tbcn.telia.com) |
2021-08-27 11:50:57 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds) |
2021-08-27 11:52:41 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-08-27 11:55:22 +0200 | <Guest55> | I have a function `next:: (Int, Hashtable s k v) -> ST s (Int, Hashtable s k v)` I want to do something like `(!! 10) $ iterate (>>= next) (1,mybook)` where `mybook :: Hashtable s k v` (this is inside a `do` block). But this gives me an error saying `type variable s would escape its scope`. Why is this happening? |
2021-08-27 11:57:15 +0200 | burnside_ | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-08-27 11:58:48 +0200 | <Guest55> | Umm I made an error in the question. Ignore the question, sorry |
2021-08-27 12:06:10 +0200 | azeem | (~azeem@176.201.20.14) (Ping timeout: 252 seconds) |
2021-08-27 12:06:45 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 12:07:10 +0200 | Kaiepi | (~Kaiepi@156.34.44.192) (Ping timeout: 240 seconds) |
2021-08-27 12:07:24 +0200 | azeem | (~azeem@176.201.20.14) |
2021-08-27 12:11:08 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2021-08-27 12:12:32 +0200 | pfurla | (~pfurla@ool-182ed2e2.dyn.optonline.net) |
2021-08-27 12:13:54 +0200 | zer0bitz | (~zer0bitz@dsl-hkibng31-58c384-213.dhcp.inet.fi) |
2021-08-27 12:15:25 +0200 | hendursa1 | (~weechat@user/hendursaga) (Remote host closed the connection) |
2021-08-27 12:15:31 +0200 | pfurla_ | (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 252 seconds) |
2021-08-27 12:15:48 +0200 | hendursa1 | (~weechat@user/hendursaga) |
2021-08-27 12:18:50 +0200 | <siers> | Ollie[m], I didn't get to the :~: part yet, but it's a very nice paper in other regards as well, thanks! |
2021-08-27 12:19:03 +0200 | <Gurkenglas> | absurd (error "asd") prints asd, but hasnt absurd no pattern match? |
2021-08-27 12:19:22 +0200 | kayprish | (~kayprish@77.243.29.13) (Remote host closed the connection) |
2021-08-27 12:20:05 +0200 | <Gurkenglas> | (I tried to ghci debug, but :set -fbreak-on-exception into :trace absurd (error "asd") into :back into :list just recommends the same rerun o.o |
2021-08-27 12:20:42 +0200 | <Guest55> | I have an inf list `[ST s (Int, Int)]` I want to extract the first element of this list that satisfies a condition. I initially tried using `sequence` and then `head . dropWhile` but sequence does not work with infinite lists I guess. What are the alternatives? |
2021-08-27 12:20:57 +0200 | <Ollie[m]> | siers: Good stuff! All Richard's papers are worth a read, probably! |
2021-08-27 12:24:01 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 12:26:27 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2021-08-27 12:28:10 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds) |
2021-08-27 12:30:21 +0200 | __monty__ | (~toonn@user/toonn) |
2021-08-27 12:32:14 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 12:32:34 +0200 | Kaiepi | (~Kaiepi@156.34.44.192) |
2021-08-27 12:36:27 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 240 seconds) |
2021-08-27 12:37:58 +0200 | oxide | (~lambda@user/oxide) (Quit: oxide) |
2021-08-27 12:39:07 +0200 | kenran | (~kenran@200116b82b180400b489723c692b519e.dip.versatel-1u1.de) (Quit: WeeChat info:version) |
2021-08-27 12:40:05 +0200 | jippiedoe | (~david@2a02-a44c-e14e-1-3bcd-b242-4a98-4bde.fixed6.kpn.net) |
2021-08-27 12:41:28 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 12:42:12 +0200 | sciencentistguy | (~sciencent@hacksoc/ordinary-member) |
2021-08-27 12:45:46 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2021-08-27 12:47:42 +0200 | vysn | (~vysn@user/vysn) (Quit: WeeChat 3.2) |
2021-08-27 12:49:00 +0200 | mastarija | (~mastarija@78-3-210-70.adsl.net.t-com.hr) |
2021-08-27 12:49:00 +0200 | pfurla_ | (~pfurla@53.15.195.173.client.static.strong-in52.as13926.net) |
2021-08-27 12:51:40 +0200 | pfurla | (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 240 seconds) |
2021-08-27 12:51:56 +0200 | <Gurkenglas> | Ahh, absurd does pattern match its argument; this simply means that the argument is reduced to WHNF and then the result is fully matched against all patterns. Shouldn't https://hackage.haskell.org/package/base-4.15.0.0/docs/src/Data-Void.html#absurd without the `absurd a = case a of {}` line not throw the "lacks an accompanying binding" error because all patterns are matched :)? |
2021-08-27 12:54:28 +0200 | kuribas | (~user@ptr-25vy0i9k5kxqroisf0f.18120a2.ip6.access.telenet.be) |
2021-08-27 12:54:57 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2021-08-27 12:55:24 +0200 | trcc | (~trcc@users-1190.st.net.au.dk) |
2021-08-27 12:55:30 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2021-08-27 12:56:28 +0200 | <kuribas> | is http://dev.stephendiehl.com/ down? |
2021-08-27 12:56:45 +0200 | <kuribas> | Or better question, is Stephen Diehl down? |
2021-08-27 12:57:31 +0200 | <Guest55> | https://www.stephendiehl.com/ is working fine for me |
2021-08-27 12:57:39 +0200 | <Guest55> | dev is not |
2021-08-27 12:57:53 +0200 | <kuribas> | right, so google is showing me the wrong link? |
2021-08-27 12:58:08 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 12:58:25 +0200 | nilof | (~olofs@90-227-86-119-no542.tbcn.telia.com) (Ping timeout: 252 seconds) |
2021-08-27 12:58:50 +0200 | <kuribas> | erm, it just got up :) |
2021-08-27 12:59:07 +0200 | martin02 | (~silas@2001:4ca0:0:fe00:0:5efe:a96:1bc1) (Ping timeout: 240 seconds) |
2021-08-27 13:01:00 +0200 | alx741 | (~alx741@181.196.68.187) |
2021-08-27 13:03:42 +0200 | jonathanx | (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
2021-08-27 13:03:59 +0200 | jonathanx | (~jonathan@dyn-8-sc.cdg.chalmers.se) |
2021-08-27 13:04:10 +0200 | jippiedoe | (~david@2a02-a44c-e14e-1-3bcd-b242-4a98-4bde.fixed6.kpn.net) (Ping timeout: 240 seconds) |
2021-08-27 13:06:59 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 13:07:33 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-08-27 13:09:17 +0200 | AlexNoo_ | (~AlexNoo@94.233.240.82) |
2021-08-27 13:09:35 +0200 | nilof | (~olofs@90-227-86-119-no542.tbcn.telia.com) |
2021-08-27 13:10:58 +0200 | <trcc> | I am trying to develop my first haskell library, and I am getting in a bit over my head. It concerns using the Writer Monad and wrapping it in IO. https://paste.tomsmeding.com/TiBDgd9f maybe someone has a minute to help me :) |
2021-08-27 13:11:09 +0200 | AlexZenon | (~alzenon@178.34.150.125) (Ping timeout: 250 seconds) |
2021-08-27 13:11:35 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 250 seconds) |
2021-08-27 13:11:45 +0200 | <dminuoso> | % :t writer |
2021-08-27 13:11:45 +0200 | <yahb> | dminuoso: MonadWriter w m => (a, w) -> m a |
2021-08-27 13:12:13 +0200 | <dminuoso> | trcc: What's the type of `doStepResult`? |
2021-08-27 13:12:26 +0200 | AlexZenon | (~alzenon@94.233.240.82) |
2021-08-27 13:12:33 +0200 | Alex_test | (~al_test@178.34.150.125) (Ping timeout: 248 seconds) |
2021-08-27 13:12:34 +0200 | <dminuoso> | Oh hold on, I mixed up left and right here. |
2021-08-27 13:12:38 +0200 | <trcc> | https://paste.tomsmeding.com/TiBDgd9f |
2021-08-27 13:12:39 +0200 | <trcc> | sorry |
2021-08-27 13:12:43 +0200 | AlexNoo | (~AlexNoo@178.34.150.125) (Ping timeout: 252 seconds) |
2021-08-27 13:12:44 +0200 | AlexNoo_ | AlexNoo |
2021-08-27 13:12:46 +0200 | <trcc> | I though it did not matter |
2021-08-27 13:12:56 +0200 | <trcc> | dminuoso: data DoStepResult x = DoStepResult {dsrStatus :: Status, dsrSvs :: SVs, dsrState :: UserState x } |
2021-08-27 13:13:15 +0200 | Alex_test | (~al_test@94.233.240.82) |
2021-08-27 13:13:32 +0200 | <dminuoso> | This all looks a bit weird, let me look at it again |
2021-08-27 13:13:47 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:c1b3:f9cf:5870:faa7) |
2021-08-27 13:14:46 +0200 | <trcc> | hehe I am not surprised by that |
2021-08-27 13:15:44 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-08-27 13:16:01 +0200 | <trcc> | dminuoso: the actual source is here: https://github.com/HFMU/ex_water-tank/blob/master/src/FMU.hs and related HaskellFMU is here: https://github.com/HFMU/HaskellFmu if it helps... |
2021-08-27 13:17:03 +0200 | <dminuoso> | What's the point of `output` here? |
2021-08-27 13:17:24 +0200 | <dminuoso> | Also, you seem to have a monad confusion going on here. |
2021-08-27 13:17:36 +0200 | <trcc> | dminuoso: The oerall idea is that I want to "EASILY" append to a list of log messages. So the idea of output is just to append log messages to the list of logentries |
2021-08-27 13:17:45 +0200 | <trcc> | Based on this originally https://kseo.github.io/posts/2017-01-21-writer-monad.html |
2021-08-27 13:17:59 +0200 | <dminuoso> | First off, generally `Writer` monad is a code smell already. |
2021-08-27 13:18:17 +0200 | <dminuoso> | For logging output, something like LoggingT (or other solutions) is a better fit. |
2021-08-27 13:18:24 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:c1b3:f9cf:5870:faa7) (Ping timeout: 250 seconds) |
2021-08-27 13:18:34 +0200 | <trcc> | the messages are later to be outputtet via a function pointer |
2021-08-27 13:18:35 +0200 | <dminuoso> | So before I address this further, do you do this to explore Writer, or is your need just to have logging? |
2021-08-27 13:19:15 +0200 | <trcc> | The doStep function is called from within a library. Once it finishes, the library outputs each log message via a function pointer |
2021-08-27 13:19:29 +0200 | <trcc> | The doStep function is called from within a library. Once it finishes, the library outputs each log message *in [T.LogEntry]* via a function pointer |
2021-08-27 13:19:32 +0200 | <dminuoso> | I dont know what you mean by function pointer. |
2021-08-27 13:19:45 +0200 | <trcc> | ia ctually mean a C function pointer |
2021-08-27 13:20:09 +0200 | <dminuoso> | So one quirky thing is that you're not using `WriterT` |
2021-08-27 13:20:16 +0200 | <dminuoso> | And there's several other quirks here. |
2021-08-27 13:20:25 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
2021-08-27 13:20:26 +0200 | <dminuoso> | But really, I'd just drop `WriterT` and use `LoggingT` |
2021-08-27 13:20:40 +0200 | <dminuoso> | You can feed your log into a C foreign library via LoggingT too |
2021-08-27 13:21:40 +0200 | <trcc> | Okay, I will try and see if I can figure this part out |
2021-08-27 13:21:48 +0200 | <trcc> | thank you |
2021-08-27 13:21:57 +0200 | <Guest55> | I'm applying a function over and over inside state. Doing it manually (line 8 - 11) gives a different result from doing it using `iterate` (line 7). What is happening? https://paste.tomsmeding.com/RxaaJ0nB I'd guess it has something to do with updation of the HashTable, but I'm not sure |
2021-08-27 13:32:24 +0200 | <int-e> | Guest55: the iterate thing does return (3,6) >>= next mybook, then return (3,6) >>= next mybook >>= next mybook, ... so 15 `>>= next mybook` in total... |
2021-08-27 13:33:30 +0200 | <trcc> | hehe dminuoso I found a way: although 16 -> 20 is not pretty: https://paste.tomsmeding.com/fgHaFy76 |
2021-08-27 13:33:49 +0200 | <Guest55> | int-e why 15 |
2021-08-27 13:33:57 +0200 | <int-e> | Guest55: 1+2+3+4+5 = 15 |
2021-08-27 13:34:16 +0200 | <dminuoso> | trcc: At the very least use WriterT. |
2021-08-27 13:34:20 +0200 | <int-e> | gioh the 5 is too much, so it's 10, my bad |
2021-08-27 13:34:26 +0200 | <dminuoso> | Instead of manually using Writer and IO. |
2021-08-27 13:34:37 +0200 | <dminuoso> | trcc: But really, at the end, use LoggingT. |
2021-08-27 13:34:54 +0200 | pfurla | (~pfurla@ool-182ed2e2.dyn.optonline.net) |
2021-08-27 13:34:55 +0200 | <Guest55> | oh.... I thought iterate reused the previous output |
2021-08-27 13:34:56 +0200 | <dminuoso> | Writer has a way of stabbing you in the back in terms of space leaks. |
2021-08-27 13:35:02 +0200 | <trcc> | dminuoso: ya, I will try and switch it alter on. But it is a big thing, and I would like to see it working first.. I will try with writerT some time |
2021-08-27 13:35:06 +0200 | enoq | (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq) |
2021-08-27 13:35:52 +0200 | <Drew[m]> | dminuoso: umm isn't Control.Monad.Trans.Writer.CPS a fix for that? |
2021-08-27 13:36:28 +0200 | <Drew[m]> | trcc: are you using Control.Monad.Trans.Writer.CPS as your source of `Writer`? |
2021-08-27 13:36:42 +0200 | <int-e> | Guest55: yes, but it's only building monadic actions here, not running them |
2021-08-27 13:37:01 +0200 | <trcc> | Drew[m]: no, I never heard of that before |
2021-08-27 13:37:10 +0200 | <dminuoso> | Drew[m]: Maybe yeah, but you still accumulate a log. |
2021-08-27 13:37:15 +0200 | <dminuoso> | Unnecessarily |
2021-08-27 13:37:29 +0200 | <Guest55> | int-e but it's running it only 4 times in total? |
2021-08-27 13:37:40 +0200 | pfurla_ | (~pfurla@53.15.195.173.client.static.strong-in52.as13926.net) (Ping timeout: 240 seconds) |
2021-08-27 13:37:57 +0200 | <dminuoso> | With LoggingT you never keep anything around, as it's essentially just some pretty wrapper around (in simplified terms) `ReaderT (String -> IO ()) ...`. There's nothing to "append" to a log. |
2021-08-27 13:38:17 +0200 | <dminuoso> | With Writer you have the additional problem of unlifting and working with bracket. |
2021-08-27 13:38:27 +0200 | <dminuoso> | You just get headaches |
2021-08-27 13:38:38 +0200 | juhp | (~juhp@bb116-14-48-29.singnet.com.sg) |
2021-08-27 13:38:45 +0200 | <int-e> | Guest55: the argument to `sequence` is [return (3,6), return (3,6) >>= next mybook, return (3,6) >>= next mybook >>= next mybook, ...] |
2021-08-27 13:38:46 +0200 | juhp | (~juhp@bb116-14-48-29.singnet.com.sg) (Read error: Connection reset by peer) |
2021-08-27 13:38:54 +0200 | <trcc> | Thanks dminuoso and Drew[m] |
2021-08-27 13:38:58 +0200 | <trcc> | got some input for later :) |
2021-08-27 13:39:32 +0200 | <int-e> | Guest55: and sequence runs each of these actions, with 0, 1, 2, 3, and finally 4 calls to `next mybook`. |
2021-08-27 13:39:42 +0200 | <Guest55> | ohhh.... I get it. So when it evaluates, it does not use the previous values, it recomputes from start |
2021-08-27 13:40:04 +0200 | <Guest55> | So how can I change this behavior? |
2021-08-27 13:40:18 +0200 | juhp_ | (~juhp@bb116-14-48-29.singnet.com.sg) |
2021-08-27 13:41:00 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 13:42:24 +0200 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) |
2021-08-27 13:43:00 +0200 | <int-e> | Guest55: you can't use iterate+sequence to accomplish this; I'd write a manual recursion. (but there's bound to be a library that has a monadic version of unfoldr that abstracts from this) |
2021-08-27 13:43:06 +0200 | jippiedoe | (~david@2a02-a44c-e14e-1-ff47-c45c-287d-42e8.fixed6.kpn.net) |
2021-08-27 13:43:38 +0200 | <Guest55> | great! Thanks int-e |
2021-08-27 13:43:39 +0200 | <int-e> | Guest55: I'm assuming you want to capture the intermediate results |
2021-08-27 13:44:00 +0200 | trcc | (~trcc@users-1190.st.net.au.dk) () |
2021-08-27 13:44:04 +0200 | <Guest55> | I want to find the first result that satisfies a condition |
2021-08-27 13:44:21 +0200 | burnside_ | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 13:44:25 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Read error: Connection reset by peer) |
2021-08-27 13:44:37 +0200 | neo1 | (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 252 seconds) |
2021-08-27 13:44:37 +0200 | <Guest55> | I'll write a recursion myself, thanks again! |
2021-08-27 13:46:39 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 13:46:39 +0200 | burnside_ | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Read error: Connection reset by peer) |
2021-08-27 13:46:42 +0200 | egoist | (~egoist@186.235.82.117) |
2021-08-27 13:46:54 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Read error: Connection reset by peer) |
2021-08-27 13:47:09 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 13:47:13 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Read error: Connection reset by peer) |
2021-08-27 13:47:31 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 13:47:46 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Read error: Connection reset by peer) |
2021-08-27 13:47:59 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 13:48:37 +0200 | burnside_ | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 13:48:37 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Read error: Connection reset by peer) |
2021-08-27 13:49:45 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 13:49:45 +0200 | burnside_ | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Read error: Connection reset by peer) |
2021-08-27 13:52:39 +0200 | lua | (~ed@101.100.135.46) |
2021-08-27 13:54:15 +0200 | burnside_ | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 13:54:15 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Read error: Connection reset by peer) |
2021-08-27 13:57:08 +0200 | oxide | (~lambda@user/oxide) |
2021-08-27 13:58:40 +0200 | markpythonicbtc | (~textual@c-24-6-12-87.hsd1.ca.comcast.net) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-08-27 14:02:57 +0200 | Codaraxis_ | (~Codaraxis@user/codaraxis) |
2021-08-27 14:03:09 +0200 | xff0x | (~xff0x@2001:1a81:53dc:be00:da3f:ef74:f6f8:c86d) (Ping timeout: 250 seconds) |
2021-08-27 14:04:13 +0200 | xff0x | (~xff0x@2001:1a81:53dc:be00:a2ac:ecf7:da22:1207) |
2021-08-27 14:06:40 +0200 | Codaraxis__ | (~Codaraxis@user/codaraxis) (Ping timeout: 240 seconds) |
2021-08-27 14:09:14 +0200 | <Drew[m]> | dminuoso: There's no reason to accumulate a log, from what I can tell. You can consume it piecewise so it is garbage collected as you go |
2021-08-27 14:11:01 +0200 | <Drew[m]> | I wrote a little demo to convince myself the log was still produced lazily |
2021-08-27 14:11:11 +0200 | acidjnk_new | (~acidjnk@p200300d0c72b95925da55fe159cc0756.dip0.t-ipconnect.de) |
2021-08-27 14:11:27 +0200 | <Drew[m]> | https://paste.tomsmeding.com/gOFJYdLg |
2021-08-27 14:12:03 +0200 | <dminuoso> | Drew[m]: And you need MonadBaseControl for unlifting. What about log entries produced in `catch`? |
2021-08-27 14:12:36 +0200 | <dminuoso> | Drew[m]: And that doesnt prove something. |
2021-08-27 14:13:00 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) |
2021-08-27 14:13:02 +0200 | <dminuoso> | lazily producing is something different from streaming |
2021-08-27 14:13:15 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
2021-08-27 14:13:17 +0200 | <Gurkenglas> | They say you can't have ((a -> Void) -> Void) -> a. But you can do ((a -> Void) -> Void) -> IO a by catch . ($throw). Does this unlock great powers? :) |
2021-08-27 14:13:17 +0200 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2021-08-27 14:13:20 +0200 | allbery_b | geekosaur |
2021-08-27 14:13:30 +0200 | <dminuoso> | Using lazyness to stream logs, while perhaps it can work, it's just not worth the headaches you get in debugging when it doesnt work |
2021-08-27 14:14:01 +0200 | <dminuoso> | With LoggingT you *know* you have no space leaks, and that logging happens *exactly* when you want it. |
2021-08-27 14:14:07 +0200 | <dminuoso> | With WriterT you have no clue when logging actually happens. |
2021-08-27 14:14:25 +0200 | acidjnk | (~acidjnk@p200300d0c72b9541c8d0619322fc5f47.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
2021-08-27 14:14:38 +0200 | <dminuoso> | It happens separate, later. |
2021-08-27 14:14:49 +0200 | <dminuoso> | WriterT is just not a good fit for logs for so many reasons. |
2021-08-27 14:15:21 +0200 | Ananta-shesha | ArcticVaultETMar |
2021-08-27 14:15:38 +0200 | ArcticVaultETMar | ArcticVauETMarsH |
2021-08-27 14:15:38 +0200 | <dminuoso> | Consider something like: |
2021-08-27 14:15:48 +0200 | ArcticVauETMarsH | ArcticVauMarsHel |
2021-08-27 14:15:51 +0200 | ArcticVauMarsHel | ArcticVauMarsHPJ |
2021-08-27 14:16:03 +0200 | ArcticVauMarsHPJ | ArctVaultMarsHMP |
2021-08-27 14:16:33 +0200 | ArctVaultMarsHMP | ArctVaulMarsHMPJ |
2021-08-27 14:16:49 +0200 | <dminuoso> | `tell "Deleting file" >> deleteFile "someFile"` |
2021-08-27 14:17:04 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds) |
2021-08-27 14:17:23 +0200 | <dminuoso> | When will the outside consumer of this log pop that entry? You dont know and cant control it. |
2021-08-27 14:18:52 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-08-27 14:23:18 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-08-27 14:23:37 +0200 | slowButPresent | (~slowButPr@user/slowbutpresent) |
2021-08-27 14:27:26 +0200 | chisui | (~chisui@200116b868a14e009fa6896fe3af5cba.dip.versatel-1u1.de) |
2021-08-27 14:28:49 +0200 | hyiltiz | (~quassel@31.220.5.250) (Ping timeout: 248 seconds) |
2021-08-27 14:28:54 +0200 | markpythonicbtc | (~textual@50.228.44.6) |
2021-08-27 14:30:10 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
2021-08-27 14:31:27 +0200 | neo1 | (~neo3@cpe-292712.ip.primehome.com) |
2021-08-27 14:31:40 +0200 | mastarija | (~mastarija@78-3-210-70.adsl.net.t-com.hr) (Ping timeout: 240 seconds) |
2021-08-27 14:32:25 +0200 | hyiltiz | (~quassel@31.220.5.250) |
2021-08-27 14:38:35 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-08-27 14:38:49 +0200 | favonia | (~favonia@user/favonia) |
2021-08-27 14:38:56 +0200 | <Drew[m]> | fair |
2021-08-27 14:44:45 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 250 seconds) |
2021-08-27 14:45:52 +0200 | azeem | (~azeem@176.201.20.14) (Ping timeout: 245 seconds) |
2021-08-27 14:46:42 +0200 | renzhi | (~xp@2607:fa49:6500:3d00::d986) |
2021-08-27 14:47:47 +0200 | azeem | (~azeem@176.201.20.14) |
2021-08-27 14:49:52 +0200 | shriekingnoise | (~shrieking@186.137.144.80) |
2021-08-27 14:57:38 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds) |
2021-08-27 14:59:07 +0200 | aman | (~aman@user/aman) (Ping timeout: 240 seconds) |
2021-08-27 14:59:27 +0200 | cheater | (~Username@user/cheater) (Ping timeout: 240 seconds) |
2021-08-27 15:03:58 +0200 | derelict | (~derelict@user/derelict) (Quit: WeeChat 3.2) |
2021-08-27 15:05:45 +0200 | Codaraxis_ | (~Codaraxis@user/codaraxis) (Remote host closed the connection) |
2021-08-27 15:06:10 +0200 | Codaraxis_ | (~Codaraxis@user/codaraxis) |
2021-08-27 15:08:08 +0200 | burnside_ | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-08-27 15:09:16 +0200 | cheater | (~Username@user/cheater) |
2021-08-27 15:09:53 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 15:10:09 +0200 | nschoe | (~quassel@178.251.84.79) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
2021-08-27 15:12:02 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-08-27 15:15:32 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:c1b3:f9cf:5870:faa7) |
2021-08-27 15:16:13 +0200 | lua | (~ed@101.100.135.46) (Quit: WeeChat 2.8) |
2021-08-27 15:19:40 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:c1b3:f9cf:5870:faa7) (Ping timeout: 240 seconds) |
2021-08-27 15:21:32 +0200 | Guest55 | (~Guest55@182.64.179.3) (Quit: Client closed) |
2021-08-27 15:22:09 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 15:22:31 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-08-27 15:22:57 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 15:27:02 +0200 | FragByte | (~christian@user/fragbyte) (Quit: Quit) |
2021-08-27 15:27:10 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 240 seconds) |
2021-08-27 15:28:52 +0200 | FragByte | (~christian@user/fragbyte) |
2021-08-27 15:29:07 +0200 | azeem | (~azeem@176.201.20.14) (Ping timeout: 240 seconds) |
2021-08-27 15:29:54 +0200 | azeem | (~azeem@176.201.20.14) |
2021-08-27 15:30:22 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-08-27 15:32:39 +0200 | t3hyoshi | (~snicf@2600:8804:1b96:4900:a9b2:143c:7dd0:6ceb) (Quit: Konversation terminated!) |
2021-08-27 15:33:35 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2021-08-27 15:34:22 +0200 | hololeap | (~hololeap@user/hololeap) |
2021-08-27 15:37:51 +0200 | Neuromancer | (~Neuromanc@user/neuromancer) |
2021-08-27 15:38:22 +0200 | haykam | (~haykam@static.100.2.21.65.clients.your-server.de) (Remote host closed the connection) |
2021-08-27 15:38:35 +0200 | haykam | (~haykam@static.100.2.21.65.clients.your-server.de) |
2021-08-27 15:44:01 +0200 | qbt | (~edun@user/edun) (Ping timeout: 248 seconds) |
2021-08-27 15:45:50 +0200 | <kuribas> | When do you use a list comprehension, instead of list monad? |
2021-08-27 15:46:06 +0200 | <kuribas> | maybe to avoid the extra "pure"? |
2021-08-27 15:46:24 +0200 | <Hecate> | kuribas: list comprehensions are implemented with list monad |
2021-08-27 15:47:02 +0200 | <dminuoso> | kuribas: Mmm, hard to say. |
2021-08-27 15:47:13 +0200 | <dminuoso> | I tend to prefer do-notation actually |
2021-08-27 15:47:32 +0200 | <kuribas> | then it's mostly redundant syntactic sugar? |
2021-08-27 15:49:01 +0200 | <[exa]> | kuribas: list comprehension removes `guard`, do-syntax is better if there's more conditions or complicated return that's best "explained" at the end instead of at the beginning |
2021-08-27 15:49:18 +0200 | <dminuoso> | [exa]: they dont remove guard. |
2021-08-27 15:49:27 +0200 | Guest48 | (~Guest48@2606:54c0:5bc0:8::49:64) |
2021-08-27 15:49:31 +0200 | dhouthoo | (~dhouthoo@178-117-36-167.access.telenet.be) |
2021-08-27 15:49:44 +0200 | <[exa]> | well you don't need to type `guard` in there right? |
2021-08-27 15:49:52 +0200 | <dminuoso> | % [ x | x <- [1,2,3], x > 2 ] |
2021-08-27 15:49:53 +0200 | <yahb> | dminuoso: [3] |
2021-08-27 15:49:58 +0200 | <dminuoso> | @undo [ x | x <- [1,2,3], x > 2 ] |
2021-08-27 15:49:58 +0200 | <lambdabot> | concatMap (\ x -> if x > 2 then [x] else []) [1, 2, 3] |
2021-08-27 15:50:01 +0200 | <Hecate> | kuribas: is it redundant if it improves readability? ;) |
2021-08-27 15:50:08 +0200 | <dminuoso> | Mmm, well. |
2021-08-27 15:50:10 +0200 | <dminuoso> | This is just guard. |
2021-08-27 15:50:14 +0200 | <[exa]> | dminuoso: yeah |
2021-08-27 15:50:19 +0200 | <kuribas> | Hecate: no, but it's debatable... |
2021-08-27 15:50:45 +0200 | Guest48 | (~Guest48@2606:54c0:5bc0:8::49:64) (Quit: Client closed) |
2021-08-27 15:50:48 +0200 | <[exa]> | kuribas: one difference is that with `do` syntax you might get a Monad constraint with polymorphic type, which in cases might not be the way you want |
2021-08-27 15:51:06 +0200 | <[exa]> | ie when relying on memoization |
2021-08-27 15:51:32 +0200 | <[exa]> | (s/ie/eg/ whoops) |
2021-08-27 15:52:13 +0200 | ArctVaulMarsHMPJ | (~pjetcetal@128-71-152-79.broadband.corbina.ru) (Quit: EXIT) |
2021-08-27 15:52:14 +0200 | <kuribas> | [exa]: how so? |
2021-08-27 15:52:49 +0200 | <[exa]> | if you don't explicitly bind a list, the monad type may stay undecided |
2021-08-27 15:53:13 +0200 | <kuribas> | hmm, right |
2021-08-27 15:53:45 +0200 | <kuribas> | perhaps do notation came after comprehensions? |
2021-08-27 15:54:32 +0200 | <Drew[m]> | Comprehensions predate the whole language IIRC |
2021-08-27 15:54:49 +0200 | <[exa]> | not sure but likely, given the original haskell had lazy lists for IO |
2021-08-27 15:55:06 +0200 | <kuribas> | if you think of set notation as comprehensions... |
2021-08-27 15:55:08 +0200 | <dminuoso> | at the end, list comprehensions are just an adaption of set builder syntax in math |
2021-08-27 15:55:31 +0200 | <dminuoso> | If you squint a bit, <- even looks similar to ∈ |
2021-08-27 15:55:44 +0200 | <[exa]> | kuribas: also check out MonadComprehensions |
2021-08-27 15:56:07 +0200 | arjun | (~Srain@user/arjun) (Ping timeout: 240 seconds) |
2021-08-27 15:56:17 +0200 | <[exa]> | isn't there any SQL package that would build SQL queries from this? |
2021-08-27 15:56:41 +0200 | fendor_ | (~fendor@77.119.210.198.wireless.dyn.drei.com) |
2021-08-27 15:56:52 +0200 | <Rembane_> | Sounds a bit like Selda. |
2021-08-27 15:57:33 +0200 | <[exa]> | we actually used selda, but never reached that far |
2021-08-27 15:57:38 +0200 | <kuribas> | [exa]: my query builder is a monad, so it would work with monad comprehensions :) |
2021-08-27 15:58:17 +0200 | <[exa]> | good, good, more set notation! (*laughs in godel numerals*) |
2021-08-27 15:58:21 +0200 | <Hecate> | https://github.com/tchoutri/pg-entity <- my query builder is a bit simpler |
2021-08-27 15:59:10 +0200 | fendor | (~fendor@178.165.207.147.wireless.dyn.drei.com) (Ping timeout: 240 seconds) |
2021-08-27 15:59:39 +0200 | <Drew[m]> | kuribas: You don't even need to go back to set builder notation. Miranda had list comprehensions, and Haskell was heavily inspired by that. |
2021-08-27 16:00:35 +0200 | <kuribas> | [exa]: I cannot see much reason motivate using monad comprehensions. |
2021-08-27 16:00:40 +0200 | mastarija | (~mastarija@78-3-210-70.adsl.net.t-com.hr) |
2021-08-27 16:00:45 +0200 | <kuribas> | Hecate: you query builder is just SQL :) |
2021-08-27 16:00:57 +0200 | <kuribas> | Hecate: but then, does it compose? |
2021-08-27 16:01:29 +0200 | <kuribas> | Hecate: "It is my personal belief, firmly rooted in experience, that we should not aim to produce statically-checked SQL and have it "verified" by the compiler. " |
2021-08-27 16:01:34 +0200 | <kuribas> | Hecate: I very much agree :) |
2021-08-27 16:01:43 +0200 | <Hecate> | :) |
2021-08-27 16:02:34 +0200 | <Hecate> | you can't arbitrarily compose it, because it's made for capturing wider patterns, rather than spewing SQL from an eDSL |
2021-08-27 16:02:37 +0200 | <Hecate> | :D |
2021-08-27 16:02:46 +0200 | <Hecate> | (which makes it simpler to develop and test) |
2021-08-27 16:02:52 +0200 | <[exa]> | kuribas: what about: [(userID x, tweet x) | x <- tweets, y <- friendsOf user, userId x `in` userId y] |
2021-08-27 16:03:13 +0200 | <kuribas> | Hecate: I find being able to type check the types of columns and table very useful though. |
2021-08-27 16:04:35 +0200 | <kuribas> | [exa]: do x <- tweets; y <- friendsOf user; guard $ userId x `in` userId y; pure (userID x, tweet x) |
2021-08-27 16:05:13 +0200 | <[exa]> | kuribas: yeah ofcourse, but reads less like SELECT ... FROM ... WHERE ... |
2021-08-27 16:05:25 +0200 | <kuribas> | ah right... |
2021-08-27 16:05:31 +0200 | <[exa]> | not that it would be wrong tho |
2021-08-27 16:07:07 +0200 | <kuribas> | doesn't f# has this kind of syntax? |
2021-08-27 16:07:12 +0200 | <kuribas> | or C# even... |
2021-08-27 16:08:06 +0200 | <kuribas> | ah f# has query expressions, C# linq |
2021-08-27 16:09:23 +0200 | <kuribas> | https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/query-expressions |
2021-08-27 16:13:28 +0200 | zaquest | (~notzaques@5.128.210.178) (Remote host closed the connection) |
2021-08-27 16:13:40 +0200 | azeem | (~azeem@176.201.20.14) (Ping timeout: 252 seconds) |
2021-08-27 16:16:30 +0200 | zaquest | (~notzaques@5.128.210.178) |
2021-08-27 16:16:58 +0200 | vpan | (~vilius@212.117.1.172) (Ping timeout: 252 seconds) |
2021-08-27 16:18:27 +0200 | <hololeap> | shouldn't this short-circuit when i==6 ? foldMap (\i -> if i > 5 then Just (First i) else Nothing) [0..] |
2021-08-27 16:18:35 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 16:20:10 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-08-27 16:20:10 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-08-27 16:20:10 +0200 | wroathe | (~wroathe@user/wroathe) |
2021-08-27 16:20:23 +0200 | <janus> | > foldMap (\i -> if i > 5 then Just (First i) else Nothing) [0..] |
2021-08-27 16:20:25 +0200 | <lambdabot> | error: |
2021-08-27 16:20:25 +0200 | <lambdabot> | Ambiguous occurrence ‘First’ |
2021-08-27 16:20:25 +0200 | <lambdabot> | It could refer to |
2021-08-27 16:20:31 +0200 | <[exa]> | hololeap: you seem to imply that all numbers that come after 5 are larger than 5 |
2021-08-27 16:20:35 +0200 | <[exa]> | :] |
2021-08-27 16:21:12 +0200 | <int-e> | > First 1 |
2021-08-27 16:21:13 +0200 | <hololeap> | [exa]: it's more that I expected First to short-circuit it somehow when it hits its first `Just (First Int)` result |
2021-08-27 16:21:14 +0200 | <lambdabot> | error: |
2021-08-27 16:21:14 +0200 | <lambdabot> | • No instance for (Num (Maybe ())) arising from a use of ‘e_11’ |
2021-08-27 16:21:14 +0200 | <lambdabot> | • In the expression: e_11 |
2021-08-27 16:21:14 +0200 | <janus> | aaah |
2021-08-27 16:21:20 +0200 | <janus> | so you'd need to map first in first ? |
2021-08-27 16:21:22 +0200 | <int-e> | > First (Just 1) |
2021-08-27 16:21:23 +0200 | <lambdabot> | First {getFirst = Just 1} |
2021-08-27 16:21:27 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 240 seconds) |
2021-08-27 16:21:35 +0200 | <hololeap> | (this is Data.Semigroup.First, btw) |
2021-08-27 16:21:37 +0200 | <[exa]> | hololeap: ah so I see that now |
2021-08-27 16:21:40 +0200 | <janus> | then foldMap wouldn't need to know about monotonic properties of the sequence |
2021-08-27 16:21:41 +0200 | <kuribas> | :t First |
2021-08-27 16:21:42 +0200 | <lambdabot> | Maybe a -> First a |
2021-08-27 16:22:04 +0200 | <kuribas> | > foldMap (\i -> if i > 5 then Just (First i) else Nothing) [0::Int..] |
2021-08-27 16:22:06 +0200 | <lambdabot> | <hint>:1:63: error: Operator applied to too few arguments: Int.. |
2021-08-27 16:22:14 +0200 | martin02 | (~silas@141.84.69.76) |
2021-08-27 16:22:28 +0200 | <kuribas> | Looks like a type error... |
2021-08-27 16:22:34 +0200 | <hololeap> | % f = foldMap (\i -> if i > 5 then Just (Data.Semigroup.First i) else Nothing) |
2021-08-27 16:22:36 +0200 | <yahb> | hololeap: |
2021-08-27 16:22:41 +0200 | <hololeap> | % :t f |
2021-08-27 16:22:41 +0200 | <yahb> | hololeap: (Foldable t, Ord a, Num a) => t a -> Maybe (Data.Semigroup.First a) |
2021-08-27 16:22:49 +0200 | <hololeap> | % f [0..] |
2021-08-27 16:22:52 +0200 | <yahb> | hololeap: *** Exception: heap overflow |
2021-08-27 16:23:07 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 250 seconds) |
2021-08-27 16:23:13 +0200 | <janus> | % f [0..10] |
2021-08-27 16:23:15 +0200 | <yahb> | janus: Just (First {getFirst = 6}) |
2021-08-27 16:23:48 +0200 | <geekosaur> | beware of that, "Int.." is parsed as operator (.) in module Int |
2021-08-27 16:24:08 +0200 | <kuribas> | > foldMap (\i -> if i > 5 then Just (Data.Semigroup.First i) else Nothing) [0::Expr .. 6] |
2021-08-27 16:24:10 +0200 | <lambdabot> | error: |
2021-08-27 16:24:10 +0200 | <lambdabot> | Not in scope: data constructor ‘Data.Semigroup.First’ |
2021-08-27 16:24:10 +0200 | <lambdabot> | No module named ‘Data.Semigroup’ is imported. |
2021-08-27 16:24:27 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds) |
2021-08-27 16:24:36 +0200 | <janus> | bummer that yahb doesn't have Expr |
2021-08-27 16:24:47 +0200 | nilof | (~olofs@90-227-86-119-no542.tbcn.telia.com) (Ping timeout: 240 seconds) |
2021-08-27 16:24:49 +0200 | <[exa]> | hololeap: don't you need foldMap' ? |
2021-08-27 16:25:19 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 16:25:23 +0200 | <[exa]> | foldMap doc says it's left-associative, so it looks to me that it can't short-circuit |
2021-08-27 16:26:04 +0200 | <[exa]> | oh no I'm reading the wrong docs :D |
2021-08-27 16:26:26 +0200 | <hololeap> | % f' = foldMap' (\i -> if i > 5 then Just (Data.Semigroup.First i) else Nothing) |
2021-08-27 16:26:27 +0200 | <yahb> | hololeap: |
2021-08-27 16:26:33 +0200 | <hololeap> | % f' [0..] |
2021-08-27 16:26:35 +0200 | <yahb> | hololeap: *** Exception: heap overflow |
2021-08-27 16:27:20 +0200 | mikoto-c1 | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Quit: mikoto-c1) |
2021-08-27 16:27:40 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-08-27 16:28:46 +0200 | <int-e> | hololeap: Just (First 0) <> undefined doesn't short-cut, at which point you've lost already. The reason being, the Monoid instance for Maybe doesn't know that the inner monoid has short-cutting capabilities. |
2021-08-27 16:29:17 +0200 | <int-e> | > Just [1] <> Nothing <> Just [2] -- you can't stop at Nothing |
2021-08-27 16:29:19 +0200 | <lambdabot> | Just [1,2] |
2021-08-27 16:29:53 +0200 | <Taneb> | > First 0 <> undefined |
2021-08-27 16:29:54 +0200 | <lambdabot> | error: |
2021-08-27 16:29:55 +0200 | <lambdabot> | • No instance for (Num (Maybe ())) arising from a use of ‘e_10’ |
2021-08-27 16:29:55 +0200 | <lambdabot> | • In the expression: e_10 |
2021-08-27 16:30:01 +0200 | <hololeap> | % Data.Monoid.First (Just 4) <> undefined |
2021-08-27 16:30:02 +0200 | <yahb> | hololeap: *** Exception: heap overflow |
2021-08-27 16:30:26 +0200 | <hololeap> | % 4 |
2021-08-27 16:30:27 +0200 | <yahb> | hololeap: 4 |
2021-08-27 16:30:36 +0200 | <int-e> | @let import qualified Data.Semigroup |
2021-08-27 16:30:37 +0200 | <lambdabot> | Defined. |
2021-08-27 16:30:39 +0200 | <int-e> | > Data.Semigroup.First 1 <> undefined |
2021-08-27 16:30:41 +0200 | <lambdabot> | First {getFirst = 1} |
2021-08-27 16:31:13 +0200 | <janus> | > foldMap (\i -> if i > 5 then Just (Data.Semigroup.First i) else Nothing) [0::Expr .. 6] |
2021-08-27 16:31:14 +0200 | <lambdabot> | Just (First {getFirst = 6}) |
2021-08-27 16:31:16 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 252 seconds) |
2021-08-27 16:31:40 +0200 | <hololeap> | well, it looks like First from Data.Monoid is what I want, then |
2021-08-27 16:31:47 +0200 | <int-e> | Oh I misread the test (i > 5), my bad. |
2021-08-27 16:31:50 +0200 | <jippiedoe> | Ah, I think I know! The Monoid instance for Maybe forces the right element |
2021-08-27 16:32:20 +0200 | <jippiedoe> | ..and while I checked that int-e already said so too :) |
2021-08-27 16:32:28 +0200 | <[exa]> | sneaky how First is supposed to contain the Maybe inside. |
2021-08-27 16:32:52 +0200 | <hololeap> | int-e: thanks for pointing that out. Data.Monoid.First doesn't have this behavior, this returns First (Just 4): Data.Maybe.First (Just 4) <> undefined |
2021-08-27 16:33:13 +0200 | <janus> | so if one used a naive Maybe and made a First for that, it would work? |
2021-08-27 16:33:28 +0200 | <int-e> | [exa]: yeah but this question explains why that is, really. |
2021-08-27 16:34:01 +0200 | markpythonicbtc | (~textual@50.228.44.6) (Ping timeout: 252 seconds) |
2021-08-27 16:34:10 +0200 | <[exa]> | yeah |
2021-08-27 16:34:52 +0200 | derelict | (~derelict@user/derelict) |
2021-08-27 16:35:38 +0200 | nilof | (~olofs@90-227-86-119-no542.tbcn.telia.com) |
2021-08-27 16:35:43 +0200 | <janus> | why does Maybe force the right argument? |
2021-08-27 16:35:58 +0200 | <janus> | (for mappend) ? |
2021-08-27 16:36:02 +0200 | <int-e> | janus: because Just x <> Just y = Just (x <> y) |
2021-08-27 16:36:14 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) |
2021-08-27 16:36:19 +0200 | <int-e> | you can't get that without inspecting the right argument |
2021-08-27 16:36:54 +0200 | <int-e> | (generically, without knowing anything about the inner <>) |
2021-08-27 16:36:55 +0200 | <janus> | oh, i thought there was some strictness hack. but it actually needs the value |
2021-08-27 16:37:07 +0200 | notzmv | (~zmv@user/notzmv) (Ping timeout: 240 seconds) |
2021-08-27 16:38:45 +0200 | <hololeap> | int-e, so it seems like this behavior would also arise for other types that "inherit" their contents' Semigroup instance, such as (,) |
2021-08-27 16:39:45 +0200 | <hololeap> | (x1,y1) <> (x2,y2) = (x1<>x2, y1<>y2) -- it has to inspect the right argument here, too |
2021-08-27 16:40:12 +0200 | azeem | (~azeem@62.19.187.81) |
2021-08-27 16:41:11 +0200 | <janus> | hmmm, if Ord was written with a max/min interface instead of relying on its own types, i wonder if the example with Expr could be illustrative |
2021-08-27 16:41:12 +0200 | <int-e> | hololeap: Right, the actual implementation (from GHC.Base of all places... interesting) is (a,b) <> (a',b') = (a<>a',b<>b') |
2021-08-27 16:41:38 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 16:41:46 +0200 | <int-e> | hololeap: one /could/ get away with ~(a,b) <> ~(a',b') = (a<>a',b<>b') here, but it's probably a bad trade-off (performance for extra laziness) |
2021-08-27 16:42:31 +0200 | <janus> | surely an interface "class Ord where min :: (a,a) -> a" should be equivalent to what standard Ord provides? |
2021-08-27 16:42:42 +0200 | <int-e> | And in any case this use of irrefutable patterns only works for single constructor types. |
2021-08-27 16:42:43 +0200 | <hololeap> | ultimately, I'm running a fold that accumulates something like (Maybe X, Maybe Y), and I want it to short-circuit as soon as the accumulator hits (Just X, Just Y) |
2021-08-27 16:43:13 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 248 seconds) |
2021-08-27 16:43:17 +0200 | <hololeap> | and I thought maybe I could glue something together out of pieces from Data.Monoid and Data.Semigroup |
2021-08-27 16:43:22 +0200 | acidjnk_new | (~acidjnk@p200300d0c72b95925da55fe159cc0756.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
2021-08-27 16:43:46 +0200 | <int-e> | janus: that's... horrible. |
2021-08-27 16:44:00 +0200 | <int-e> | :t min |
2021-08-27 16:44:01 +0200 | <lambdabot> | Ord a => a -> a -> a |
2021-08-27 16:44:07 +0200 | azeem | (~azeem@62.19.187.81) (Ping timeout: 240 seconds) |
2021-08-27 16:44:39 +0200 | <int-e> | the thought of computing x <= y as min x y == x makes me cringe. |
2021-08-27 16:44:52 +0200 | <janus> | int-e: but it works better with Expr , no ? ;) |
2021-08-27 16:45:07 +0200 | <int-e> | > let xs = [1..]; ys = [2..] in xs < ys |
2021-08-27 16:45:08 +0200 | <lambdabot> | True |
2021-08-27 16:45:16 +0200 | <int-e> | > let xs = [1..]; ys = [2..] in min xs ys == xs |
2021-08-27 16:45:22 +0200 | <lambdabot> | mueval-core: Time limit exceeded |
2021-08-27 16:45:29 +0200 | <int-e> | so that's a hard no |
2021-08-27 16:45:51 +0200 | <sszark2> | What does c signify in this expression? `c <- [1..10], b <- [1..c]` |
2021-08-27 16:45:57 +0200 | <janus> | i made no claim about infinite lists ;) |
2021-08-27 16:46:07 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2021-08-27 16:46:10 +0200 | sszark2 | sszark |
2021-08-27 16:46:10 +0200 | <dminuoso> | sszark2: This is not a full expression. |
2021-08-27 16:46:11 +0200 | <int-e> | sszark2: that's not an expression. it's probably part of a list comprehension |
2021-08-27 16:46:11 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
2021-08-27 16:46:35 +0200 | cfricke | (~cfricke@user/cfricke) (Quit: WeeChat 3.2) |
2021-08-27 16:46:43 +0200 | <int-e> | sszark: where intuitively, c <- [1..10] makes c (a fresh variable at that point) range over the elements of [1..10] |
2021-08-27 16:47:04 +0200 | <janus> | i really just wanted to ponder whether an alternate ord could be defined such that it would work for the [0::Expr .. 6] example above |
2021-08-27 16:47:58 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 16:48:26 +0200 | <int-e> | janus: well, no. you don't even get out of that problem, because you'll still need (==), and (==) :: Expr -> Expr -> Bool runs into the same problem that you wanted to avoid. |
2021-08-27 16:48:38 +0200 | <mastarija> | Do we have some kind of reader monad in base or is it necessary to use transformers package? |
2021-08-27 16:48:45 +0200 | <sszark> | So c just makes the range for b the same length as c here? |
2021-08-27 16:49:19 +0200 | <mastarija> | I want to use doctest, and write an example with a reader monad, but I don't want to include transformers package just for that. |
2021-08-27 16:49:29 +0200 | <int-e> | sszark: yes. it's enumerating c,b with 1 <= b <= c <= 10 |
2021-08-27 16:49:41 +0200 | <janus> | int-e: damn, gotta make a continuation based Eq also then... :P |
2021-08-27 16:49:47 +0200 | <maerwald> | mastarija: yes ((->) r) |
2021-08-27 16:50:09 +0200 | <janus> | purge all bools |
2021-08-27 16:50:12 +0200 | <mastarija> | oh.. right, function is monad |
2021-08-27 16:50:24 +0200 | <int-e> | janus: This may be too high a price to pay for solving the Expr.. problem. |
2021-08-27 16:50:35 +0200 | <janus> | there are no limits to my masochism |
2021-08-27 16:50:57 +0200 | <int-e> | > map fromIntegral [1..6] :: [Expr] |
2021-08-27 16:50:59 +0200 | <lambdabot> | [1,2,3,4,5,6] |
2021-08-27 16:51:55 +0200 | azeem | (~azeem@176.201.15.153) |
2021-08-27 16:53:22 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 16:53:32 +0200 | notzmv | (~zmv@user/notzmv) |
2021-08-27 16:53:58 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-08-27 16:55:55 +0200 | gehmehgeh | (~user@user/gehmehgeh) (Quit: Leaving) |
2021-08-27 16:56:47 +0200 | peterhil | (~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi) (Ping timeout: 240 seconds) |
2021-08-27 16:57:37 +0200 | epolanski | (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
2021-08-27 16:57:57 +0200 | jippiedoe | (~david@2a02-a44c-e14e-1-ff47-c45c-287d-42e8.fixed6.kpn.net) (Quit: Leaving) |
2021-08-27 17:00:47 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-08-27 17:01:50 +0200 | hnOsmium0001 | (uid453710@id-453710.stonehaven.irccloud.com) |
2021-08-27 17:02:52 +0200 | vpan | (~vilius@212.117.1.172) |
2021-08-27 17:03:47 +0200 | xff0x | (~xff0x@2001:1a81:53dc:be00:a2ac:ecf7:da22:1207) (Ping timeout: 240 seconds) |
2021-08-27 17:04:57 +0200 | xff0x | (~xff0x@2001:1a81:53dc:be00:a197:89df:f531:cbff) |
2021-08-27 17:05:07 +0200 | notzmv | (~zmv@user/notzmv) (Ping timeout: 240 seconds) |
2021-08-27 17:07:01 +0200 | notzmv | (~zmv@user/notzmv) |
2021-08-27 17:08:05 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer) |
2021-08-27 17:08:06 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2021-08-27 17:08:16 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 17:08:40 +0200 | ziman | (~ziman@user/ziman) |
2021-08-27 17:10:20 +0200 | <ziman> | hello! I have a typeclass (Serialise metadata a), where I'd like instances to depend only on `a`, i.e. make it impossible that `metadata` could affect the serialisation procedure. |
2021-08-27 17:10:42 +0200 | <ziman> | i'd like to mark `metadata` as irrelevant in some way but is that possible in Haskell? |
2021-08-27 17:10:58 +0200 | <ziman> | fundeps don't do what i want because i want instances to work for arbitrary `metadata` for any single `a` |
2021-08-27 17:11:12 +0200 | <timCF> | ziman: why it's needed in class definition then? |
2021-08-27 17:12:31 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 250 seconds) |
2021-08-27 17:13:15 +0200 | <ziman> | no behaviour depends on it, it is only used to express that this typeclass is not available for some `metadata`, so not all instances are universally quantified over `metadata`; some instances exist only for one `metadata` value |
2021-08-27 17:15:10 +0200 | <c_wraith> | Well then, the type *does* affect the process, in that it's just not available for some types. |
2021-08-27 17:15:37 +0200 | <c_wraith> | Haskell makes classes open. It's always assumed another module could add another instance |
2021-08-27 17:16:18 +0200 | <ziman> | the typeclass contains a method called toBS, which converts the type to bytestring |
2021-08-27 17:16:24 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 17:16:26 +0200 | <c_wraith> | So the compiler has to assume the type does impact the functionality |
2021-08-27 17:16:28 +0200 | <ziman> | i'd like to express that the result of toBS cannot depend on the metadata |
2021-08-27 17:16:32 +0200 | hendursa1 | (~weechat@user/hendursaga) (Quit: hendursa1) |
2021-08-27 17:16:42 +0200 | <c_wraith> | But you've just said it can |
2021-08-27 17:17:03 +0200 | hendursaga | (~weechat@user/hendursaga) |
2021-08-27 17:17:05 +0200 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2021-08-27 17:17:05 +0200 | <c_wraith> | In that if the metadata type is wrong, you can't call it |
2021-08-27 17:17:15 +0200 | <c_wraith> | that is a dependency |
2021-08-27 17:17:15 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:b5b4:3a1f:2123:21ea) |
2021-08-27 17:18:30 +0200 | <c_wraith> | Maybe you want to split the class in two? One class without the metadata type involved, one class with? |
2021-08-27 17:19:09 +0200 | <c_wraith> | You could have the class with the metadata depend on the one without, so you'd only need to write that one in type signatures |
2021-08-27 17:19:39 +0200 | <ziman> | hmmm |
2021-08-27 17:19:40 +0200 | dsrt^ | (~dsrt@12.16.129.111) (Ping timeout: 240 seconds) |
2021-08-27 17:20:56 +0200 | <hololeap> | @hoogle (Maybe a, Maybe b) -> Maybe (a,b) |
2021-08-27 17:20:57 +0200 | <lambdabot> | No results found |
2021-08-27 17:21:40 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:b5b4:3a1f:2123:21ea) (Ping timeout: 240 seconds) |
2021-08-27 17:21:47 +0200 | <c_wraith> | :t uncurry $ liftA2 (,) |
2021-08-27 17:21:48 +0200 | neo2 | (~neo3@cpe-292712.ip.primehome.com) |
2021-08-27 17:21:48 +0200 | <lambdabot> | Applicative f => (f a, f b) -> f (a, b) |
2021-08-27 17:21:55 +0200 | <ziman> | thanks, i'll think about it |
2021-08-27 17:22:12 +0200 | <ziman> | maybe one just can't do it in haskell |
2021-08-27 17:22:34 +0200 | <c_wraith> | Haskell makes assumptions about instances that makes restricting them difficult |
2021-08-27 17:22:58 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
2021-08-27 17:23:15 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 17:23:55 +0200 | doyougnu | (~user@c-73-25-202-122.hsd1.or.comcast.net) |
2021-08-27 17:24:31 +0200 | nilof | (~olofs@90-227-86-119-no542.tbcn.telia.com) (Read error: Connection reset by peer) |
2021-08-27 17:24:48 +0200 | nilof | (~olofs@90-227-86-119-no542.tbcn.telia.com) |
2021-08-27 17:25:10 +0200 | neo1 | (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 252 seconds) |
2021-08-27 17:28:28 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-08-27 17:29:10 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:b5b4:3a1f:2123:21ea) |
2021-08-27 17:29:18 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 250 seconds) |
2021-08-27 17:33:15 +0200 | hexfive | (~eric@50.35.83.177) |
2021-08-27 17:34:51 +0200 | glider_ | glider |
2021-08-27 17:39:51 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:b5b4:3a1f:2123:21ea) (Remote host closed the connection) |
2021-08-27 17:40:17 +0200 | martin02 | (~silas@141.84.69.76) (Ping timeout: 248 seconds) |
2021-08-27 17:40:45 +0200 | asthasr | (~asthasr@162.210.28.151) |
2021-08-27 17:41:48 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-08-27 17:44:47 +0200 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-08-27 17:44:51 +0200 | jakalx | (~jakalx@base.jakalx.net) () |
2021-08-27 17:45:32 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 17:46:59 +0200 | jakalx | (~jakalx@base.jakalx.net) |
2021-08-27 17:47:13 +0200 | Skyfire | (~pyon@user/pyon) (Quit: WeeChat 3.2) |
2021-08-27 17:48:55 +0200 | dajoer | (~david@user/gvx) (Quit: leaving) |
2021-08-27 17:50:09 +0200 | hexfive | (~eric@50.35.83.177) (Quit: WeeChat 3.0.1) |
2021-08-27 17:50:14 +0200 | argento | (~argent0@168-227-96-26.ptr.westnet.com.ar) |
2021-08-27 17:51:05 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 250 seconds) |
2021-08-27 17:51:36 +0200 | Guest55 | (~Guest55@188.64.207.213) |
2021-08-27 17:51:44 +0200 | egoist | (~egoist@186.235.82.117) (Quit: WeeChat 3.2) |
2021-08-27 17:51:51 +0200 | hendursaga | (~weechat@user/hendursaga) (Remote host closed the connection) |
2021-08-27 17:51:52 +0200 | <Guest55> | hey |
2021-08-27 17:52:18 +0200 | hendursaga | (~weechat@user/hendursaga) |
2021-08-27 17:52:47 +0200 | lortabac | (~lortabac@151.70.200.251) (Quit: WeeChat 2.8) |
2021-08-27 17:53:00 +0200 | cheater | (~Username@user/cheater) (Remote host closed the connection) |
2021-08-27 17:53:51 +0200 | <Guest55> | i wanna find the longest truthiness sequence [False, False, True, True, False, True, False, False, True, True, True, True, False, False, True, True]. |
2021-08-27 17:54:04 +0200 | <Guest55> | the starting point and length of it |
2021-08-27 17:54:26 +0200 | <Guest55> | everything i come up with looks messy. any ideas? |
2021-08-27 17:55:01 +0200 | <c_wraith> | are you allowed to use stuff from Data.List? |
2021-08-27 17:55:09 +0200 | <Guest55> | ye sure |
2021-08-27 17:55:22 +0200 | <c_wraith> | > group [False, False, True, True, False, True, False, False, True, True, True, True, False, False, True, True] |
2021-08-27 17:55:23 +0200 | <lambdabot> | [[False,False],[True,True],[False],[True],[False,False],[True,True,True,True... |
2021-08-27 17:55:40 +0200 | <Guest55> | well yea lol. but look at what im trying to achive |
2021-08-27 17:55:58 +0200 | <Guest55> | i know how to group. just pulling the indexes after that is messy af |
2021-08-27 17:56:05 +0200 | <c_wraith> | that's just step one |
2021-08-27 17:56:06 +0200 | <mastarija> | Index first |
2021-08-27 17:56:18 +0200 | <mastarija> | and then use "groupOn snd" |
2021-08-27 17:56:22 +0200 | <c_wraith> | > map (head &&& length) $ group [False, False, True, True, False, True, False, False, True, True, True, True, False, False, True, True] |
2021-08-27 17:56:23 +0200 | <mastarija> | or something like that |
2021-08-27 17:56:24 +0200 | <lambdabot> | [(False,2),(True,2),(False,1),(True,1),(False,2),(True,4),(False,2),(True,2)] |
2021-08-27 17:56:24 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:b5b4:3a1f:2123:21ea) |
2021-08-27 17:56:26 +0200 | <Guest55> | ok then assume im way past step 1 now |
2021-08-27 17:56:38 +0200 | <Guest55> | ive tryied everything you're saying |
2021-08-27 17:56:42 +0200 | <Guest55> | tried* |
2021-08-27 17:57:42 +0200 | <c_wraith> | and then at that point, it's probably easiest to go to to explicit recursion |
2021-08-27 17:58:01 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 250 seconds) |
2021-08-27 17:58:14 +0200 | <Guest55> | can you show how? that's the exact place im stuck at |
2021-08-27 17:58:32 +0200 | aegon | (~mike@174.127.249.180) |
2021-08-27 17:59:24 +0200 | cheater | (~Username@user/cheater) |
2021-08-27 18:02:43 +0200 | <hololeap> | is there another way to accomplish this using premade monoids/semigroups/alternatives ... ? http://sprunge.us/0xuc7T |
2021-08-27 18:03:03 +0200 | <c_wraith> | Guest55: what should it do if there is no True? |
2021-08-27 18:03:40 +0200 | <Guest55> | umm maybe (0,0) idk |
2021-08-27 18:03:49 +0200 | lbseale | (~lbseale@user/ep1ctetus) |
2021-08-27 18:03:58 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 250 seconds) |
2021-08-27 18:04:01 +0200 | <Guest55> | less of an issue. just an exercise ive come up with |
2021-08-27 18:07:18 +0200 | <hololeap> | (fixed it so that it behaves how I actually want: http://sprunge.us/W2QrRQ) |
2021-08-27 18:09:12 +0200 | <hololeap> | basically, the folding function doesn't care about previous values, but if they are Just, the first one is kept. the whole thing short circuits when all the Maybes are Just |
2021-08-27 18:09:25 +0200 | <c_wraith> | Guest55: https://paste.tomsmeding.com/BAq8Rd3s works. Maybe not ideal (it should probably return a Maybe (Int, Int)), but solid |
2021-08-27 18:10:15 +0200 | pgib | (~textual@173.38.117.82) |
2021-08-27 18:12:30 +0200 | <hololeap> | the overall idea is that it tries to gather all the pieces for building a product type from a list, and once all those pieces have been collected, it stops reading from the list |
2021-08-27 18:13:33 +0200 | <hololeap> | I feel like this would be common enough that I wouldn't have to roll my own function for this |
2021-08-27 18:14:24 +0200 | phma | (~phma@host-67-44-208-131.hnremote.net) (Read error: Connection reset by peer) |
2021-08-27 18:15:51 +0200 | phma | (~phma@host-67-44-208-218.hnremote.net) |
2021-08-27 18:16:36 +0200 | <sclv> | hololeap: i'd just say `find (\(x,y) -> isJust x && isJust y)` or something for that? |
2021-08-27 18:18:41 +0200 | <sclv> | but what you may want is something like `concatMap (\(x,y) -> liftM2 (,) x y)` and then pattern match out the head |
2021-08-27 18:18:53 +0200 | <sclv> | or er not concatMap, but mapMaybe |
2021-08-27 18:19:36 +0200 | _ht | (~quassel@82-169-194-8.biz.kpn.net) |
2021-08-27 18:21:21 +0200 | azeem | (~azeem@176.201.15.153) (Ping timeout: 248 seconds) |
2021-08-27 18:22:33 +0200 | <c_wraith> | there are so many silly ways to do this: |
2021-08-27 18:22:34 +0200 | <c_wraith> | :t \f -> getFirst . foldMap (First . uncurry (liftA2 (,)) . f) |
2021-08-27 18:22:35 +0200 | <lambdabot> | Foldable t => (a1 -> (Maybe a2, Maybe b)) -> t a1 -> Maybe (a2, b) |
2021-08-27 18:23:28 +0200 | <Guest55> | c_wraith thanks. ill try to understand what you wrote |
2021-08-27 18:23:49 +0200 | <c_wraith> | Ah, that version isn't quite right. To really be right you'd want to bimap over the pair, which gets uglier |
2021-08-27 18:24:18 +0200 | <byorgey> | what's an easy way to get a function Map k (Maybe a) -> Map k a which deletes the Nothing values from the map? |
2021-08-27 18:24:36 +0200 | <c_wraith> | :t \f -> bimap getFirst getFirst . foldMap (bimap First First . f) |
2021-08-27 18:24:37 +0200 | <lambdabot> | (Bifunctor p, Foldable t, Monoid (p (First a1) (First a2))) => (a3 -> p (Maybe a1) (Maybe a2)) -> t a3 -> p (Maybe a1) (Maybe a2) |
2021-08-27 18:24:40 +0200 | <hololeap> | c_wraith: that would discard an intermediate value like (Just x, Nothing) ... the `uncurry (liftA2 (,))` would transform that into Nothing and you would lose `Just x` |
2021-08-27 18:24:42 +0200 | <c_wraith> | enjoy that type signature |
2021-08-27 18:24:48 +0200 | <c_wraith> | hololeap: yes, I just fixed that |
2021-08-27 18:25:05 +0200 | <Guest55> | the problem btw was to find longest increasing&following number subsequence |
2021-08-27 18:25:11 +0200 | <sclv> | byorgey: the easiest way is to use witherable :-) |
2021-08-27 18:25:44 +0200 | <Guest55> | i just converted it to a lists of booleans indicating if one is a successor of the previous |
2021-08-27 18:26:06 +0200 | <byorgey> | sclv: ah, perfect! |
2021-08-27 18:26:57 +0200 | <byorgey> | Yes, exactly. I used to have a list and used catMaybes. But now the list is changing to a map, and... I can still use catMaybes! \o/ |
2021-08-27 18:29:29 +0200 | azeem | (~azeem@176.200.202.67) |
2021-08-27 18:29:35 +0200 | <dminuoso> | byorgey: traverseMaybeWithKey is a thing in new versions of container |
2021-08-27 18:29:43 +0200 | <dminuoso> | Avoids the dependency on witherable |
2021-08-27 18:29:47 +0200 | <c_wraith> | hololeap: though.. I'm not sure that's appropriately lazy anymore, since the Firsts are inside the tuple. Better off going with one of sclv's suggestsions |
2021-08-27 18:30:24 +0200 | Morrow_ | (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 250 seconds) |
2021-08-27 18:31:29 +0200 | <dminuoso> | Though catMaybes from witherable might be a better exact fit. But traverseMaybeWithKey is still useful in case this is the output of a traverse already. |
2021-08-27 18:33:59 +0200 | <byorgey> | dminuoso: oh, good to know, thanks, that's actually an even better fit, because I do a traverse right before the catMaybes |
2021-08-27 18:35:54 +0200 | markpythonicbtc | (~textual@2601:647:5a00:35:f814:103:43a8:3466) |
2021-08-27 18:39:24 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2) |
2021-08-27 18:41:25 +0200 | arjun | (~Srain@user/arjun) |
2021-08-27 18:47:40 +0200 | azeem | (~azeem@176.200.202.67) (Ping timeout: 252 seconds) |
2021-08-27 18:48:25 +0200 | Guest55 | (~Guest55@188.64.207.213) (Ping timeout: 246 seconds) |
2021-08-27 18:50:01 +0200 | Boomerang | (~Boomerang@xd520f68c.cust.hiper.dk) (Ping timeout: 250 seconds) |
2021-08-27 18:51:59 +0200 | martin02 | (~silas@141.84.69.76) |
2021-08-27 18:52:15 +0200 | azeem | (~azeem@176.200.202.67) |
2021-08-27 18:53:03 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:b5b4:3a1f:2123:21ea) (Remote host closed the connection) |
2021-08-27 18:55:02 +0200 | arjun | (~Srain@user/arjun) (Remote host closed the connection) |
2021-08-27 18:59:51 +0200 | <maerwald> | is there an easy way to make the Map fromJSON instance of aeson more permissive without redefining it? As in: if it can't parse a key, I want it to just skip that element |
2021-08-27 19:00:47 +0200 | <sclv> | https://hackage.haskell.org/package/aeson-1.5.6.0/docs/Data-Aeson.html#v:defaultOptions is all i know of? |
2021-08-27 19:01:03 +0200 | <maerwald> | the instance is here https://hackage.haskell.org/package/aeson-1.5.6.0/docs/src/Data.Aeson.Types.FromJSON.html#line-1896 |
2021-08-27 19:01:09 +0200 | <maerwald> | I'm sure I could just overwrite it, but |
2021-08-27 19:01:45 +0200 | <maerwald> | it seems like a common use case, isn't it? |
2021-08-27 19:02:07 +0200 | <sclv> | i'm not sure i see where that errors -- as in the key can't be parsed because its malformed as json? |
2021-08-27 19:02:11 +0200 | mc47 | (~mc47@xmonad/TheMC47) |
2021-08-27 19:02:15 +0200 | <dminuoso> | Dunno, the the protocol interactions we have are very strict. |
2021-08-27 19:02:18 +0200 | mastarija | (~mastarija@78-3-210-70.adsl.net.t-com.hr) (Read error: Connection reset by peer) |
2021-08-27 19:02:26 +0200 | <dminuoso> | Simply dropping keys could induce a lot of bizarre failure |
2021-08-27 19:02:29 +0200 | <maerwald> | well, `FromJSONKey k` will fail |
2021-08-27 19:02:36 +0200 | <maerwald> | it would have to catch it |
2021-08-27 19:02:54 +0200 | Morrow_ | (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
2021-08-27 19:03:35 +0200 | <sclv> | oh uh i'd just parse into a map from string keys in that case |
2021-08-27 19:05:43 +0200 | elf_fortrez | (~elf_fortr@adsl-72-50-7-8.prtc.net) |
2021-08-27 19:05:43 +0200 | <maerwald> | that's gonna be a little annoyong, because those are several nested maps, which then have to be translated to something not-stringy :p |
2021-08-27 19:06:13 +0200 | <maerwald> | I guess I'll just make an overlapping instance |
2021-08-27 19:06:15 +0200 | <sclv> | ok then newtype wrap the maps and write your own instance? |
2021-08-27 19:07:07 +0200 | vpan | (~vilius@212.117.1.172) (Quit: Leaving.) |
2021-08-27 19:08:01 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
2021-08-27 19:08:04 +0200 | smitop | (~smitop@user/smitop) (Remote host closed the connection) |
2021-08-27 19:10:14 +0200 | <aegon> | i'm trying to grok arrow syntax better / when its good to use anyone got a favorite tutorial / overview? I've got 6 open |
2021-08-27 19:10:25 +0200 | nilof | (~olofs@90-227-86-119-no542.tbcn.telia.com) (Ping timeout: 248 seconds) |
2021-08-27 19:12:06 +0200 | fef | (~thedawn@user/thedawn) |
2021-08-27 19:12:24 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:b5b4:3a1f:2123:21ea) |
2021-08-27 19:13:37 +0200 | <maerwald> | in 8 years of haskell or so I've never used arrows |
2021-08-27 19:13:51 +0200 | <maerwald> | although I've read several papers that make use of them |
2021-08-27 19:14:18 +0200 | <maerwald> | then they usually end up doing something similar with monads |
2021-08-27 19:15:57 +0200 | <aegon> | i did something with wire a while back. It seems like the intent is that arrows can be paralellized but I don't see any parallelization happening unless ghc is doing that when it sees they aren't dependent on eachother |
2021-08-27 19:16:07 +0200 | <maerwald> | whenever I try to build an intuition about them, I simply can't find enough use cases |
2021-08-27 19:16:30 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 19:17:12 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
2021-08-27 19:17:12 +0200 | tput | (~tim@S0106a84e3fe54613.ed.shawcable.net) (Ping timeout: 250 seconds) |
2021-08-27 19:17:33 +0200 | <maerwald> | and then I wonder why I spent 2 hours reading about something I don't need :p |
2021-08-27 19:18:33 +0200 | <aegon> | lol |
2021-08-27 19:18:50 +0200 | <hololeap> | sclv, c_wraith: the best solution I've come up with so far is to roll a First2 monoid: http://sprunge.us/9RSGe0 |
2021-08-27 19:18:53 +0200 | <aegon> | i want all that sugar at my disposal when planning |
2021-08-27 19:19:23 +0200 | <maerwald> | except for making an impression at the next haskell meetup |
2021-08-27 19:19:30 +0200 | <maerwald> | where ppl will go "omg, that arrow dude" |
2021-08-27 19:20:09 +0200 | smitop | (~smitop@user/smitop) |
2021-08-27 19:20:35 +0200 | nilof | (~olofs@90-227-86-119-no542.tbcn.telia.com) |
2021-08-27 19:20:48 +0200 | <hololeap> | but it would be cool to find a solution that could do this with any number of arguments |
2021-08-27 19:21:36 +0200 | <maerwald> | also, 'arrow' is a hell of a nickname |
2021-08-27 19:24:56 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-08-27 19:26:33 +0200 | <[exa]> | hololeap: take `both First` (with `both` from tuple extras) and generalize over `both` ? |
2021-08-27 19:28:22 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
2021-08-27 19:29:38 +0200 | <[exa]> | (and well, unzip) |
2021-08-27 19:29:47 +0200 | nilof | (~olofs@90-227-86-119-no542.tbcn.telia.com) (Quit: Leaving) |
2021-08-27 19:29:55 +0200 | dyeplexer | (~dyeplexer@user/dyeplexer) (Quit: Leaving) |
2021-08-27 19:30:49 +0200 | <hololeap> | hm, no both needs the tuple to look like (a,a), which isn't the case here... the tuple here is (Maybe a, Maybe b) |
2021-08-27 19:31:38 +0200 | <[exa]> | ah so that would make a higher-order-polymorphic `both` |
2021-08-27 19:33:04 +0200 | dsrt^ | (~dsrt@12.16.129.111) |
2021-08-27 19:33:48 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:b5b4:3a1f:2123:21ea) (Remote host closed the connection) |
2021-08-27 19:34:13 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 250 seconds) |
2021-08-27 19:36:07 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 19:39:57 +0200 | chris | (~chris@81.96.113.213) |
2021-08-27 19:40:00 +0200 | chris | Guest1015 |
2021-08-27 19:40:10 +0200 | notzmv | (~zmv@user/notzmv) (Ping timeout: 240 seconds) |
2021-08-27 19:41:31 +0200 | Skyfire | (~pyon@user/pyon) |
2021-08-27 19:43:27 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 240 seconds) |
2021-08-27 19:45:41 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 19:47:07 +0200 | neo2 | (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 240 seconds) |
2021-08-27 19:47:55 +0200 | Erutuon | (~Erutuon@user/erutuon) |
2021-08-27 19:50:44 +0200 | thyriaen_ | (~thyriaen@dynamic-089-012-236-255.89.12.pool.telefonica.de) (Quit: Leaving) |
2021-08-27 19:54:49 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2021-08-27 19:56:03 +0200 | vysn | (~vysn@user/vysn) |
2021-08-27 19:57:50 +0200 | bgamari | (~bgamari@2001:470:e438::1) (Quit: ZNC 1.8.1 - https://znc.in) |
2021-08-27 19:58:12 +0200 | bgamari | (~bgamari@72.65.101.163) |
2021-08-27 19:58:47 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2021-08-27 19:59:29 +0200 | Guest1015 | (~chris@81.96.113.213) (Ping timeout: 248 seconds) |
2021-08-27 20:00:27 +0200 | <Cale> | maerwald: They have some good use cases for things like building state machines, FRP, that sort of thing, but the details of how the class is defined and the stuff it leaves out tends to also undermine those use cases quite a bit. |
2021-08-27 20:02:15 +0200 | <Cale> | It ought to be fixed up so that it fits the definition of a symmetric monoidal category a bit more closely. The extra operations that explicitly reassociate and swap tuples, introduce an eliminate units, actually become quite important, because they let you do some static analysis of your computation to simplify it before running, which is a trick that monads struggle with. |
2021-08-27 20:03:36 +0200 | <Cale> | Currently, if you use the proc/do syntax, it will shove a black box "arr" in between every pair of arrows in your computation, which destroys any hope of simplifying things. |
2021-08-27 20:05:05 +0200 | <Cale> | It's possible to get that down to basically just the cases where you have a complex (non-tuple-like) construction on the right of a -< or where you're doing a fancier pattern match on the left of a <- |
2021-08-27 20:05:45 +0200 | chris | (~chris@81.96.113.213) |
2021-08-27 20:05:48 +0200 | chris | Guest5790 |
2021-08-27 20:06:18 +0200 | <Cale> | But that said, even if it were improved to the point that it didn't undermine its best use cases, those use cases are still probably pretty rare :) |
2021-08-27 20:07:34 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:b5b4:3a1f:2123:21ea) |
2021-08-27 20:09:25 +0200 | doyougnu | (~user@c-73-25-202-122.hsd1.or.comcast.net) (Remote host closed the connection) |
2021-08-27 20:10:11 +0200 | Guest5790 | (~chris@81.96.113.213) (Ping timeout: 250 seconds) |
2021-08-27 20:11:38 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-08-27 20:12:07 +0200 | hyiltiz | (~quassel@31.220.5.250) (Ping timeout: 240 seconds) |
2021-08-27 20:12:36 +0200 | doyougnu | (~user@c-73-25-202-122.hsd1.or.comcast.net) |
2021-08-27 20:12:57 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 20:14:25 +0200 | <sm> | interesting! |
2021-08-27 20:14:26 +0200 | hyiltiz | (~quassel@31.220.5.250) |
2021-08-27 20:14:57 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 248 seconds) |
2021-08-27 20:16:02 +0200 | sm | has been missing the Cale insight drops in here |
2021-08-27 20:16:32 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 20:18:09 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 248 seconds) |
2021-08-27 20:18:44 +0200 | <maerwald> | yeah, I still have to get into FRP as well, but the same thing applies as well: can't find a use case :p |
2021-08-27 20:18:54 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer) |
2021-08-27 20:19:31 +0200 | zebrag | (~chris@user/zebrag) |
2021-08-27 20:19:59 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 20:20:52 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 20:21:10 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Ping timeout: 252 seconds) |
2021-08-27 20:21:39 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-08-27 20:22:49 +0200 | argento | (~argent0@168-227-96-26.ptr.westnet.com.ar) (Ping timeout: 252 seconds) |
2021-08-27 20:24:01 +0200 | Morrow_ | (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 248 seconds) |
2021-08-27 20:27:01 +0200 | <srid[m]> | web apps |
2021-08-27 20:27:19 +0200 | <srid[m]> | or cli apps |
2021-08-27 20:27:44 +0200 | <srid[m]> | https://github.com/reflex-frp/reflex-ghci for instance |
2021-08-27 20:27:53 +0200 | <maerwald> | for web apps I don't use haskell |
2021-08-27 20:28:10 +0200 | <maerwald> | for cli, I use brick, which isn't FRP and much simple |
2021-08-27 20:29:26 +0200 | argento | (~argent0@168-227-96-26.ptr.westnet.com.ar) |
2021-08-27 20:30:02 +0200 | <maerwald> | I think I only tried to get reflex-vty working once and gave up pretty early |
2021-08-27 20:32:07 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 240 seconds) |
2021-08-27 20:32:25 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 20:34:53 +0200 | pavonia | (~user@user/siracusa) |
2021-08-27 20:36:47 +0200 | azeem | (~azeem@176.200.202.67) (Ping timeout: 240 seconds) |
2021-08-27 20:37:01 +0200 | azeem | (~azeem@176.200.202.67) |
2021-08-27 20:37:33 +0200 | fef | (~thedawn@user/thedawn) (Remote host closed the connection) |
2021-08-27 20:39:32 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:b5b4:3a1f:2123:21ea) (Remote host closed the connection) |
2021-08-27 20:41:38 +0200 | carbolymer | (~carbolyme@dropacid.net) (Quit: carbolymer) |
2021-08-27 20:41:51 +0200 | carbolymer | (~carbolyme@dropacid.net) |
2021-08-27 20:42:37 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
2021-08-27 20:42:54 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 20:43:10 +0200 | sszark | (~sszark@h-155-4-128-59.na.cust.bahnhof.se) (Ping timeout: 252 seconds) |
2021-08-27 20:43:49 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-08-27 20:44:16 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-08-27 20:44:16 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-08-27 20:44:16 +0200 | wroathe | (~wroathe@user/wroathe) |
2021-08-27 20:45:03 +0200 | sszark | (~sszark@h-155-4-128-59.NA.cust.bahnhof.se) |
2021-08-27 20:45:39 +0200 | qbt | (~edun@user/edun) |
2021-08-27 20:50:26 +0200 | tput | (~tim@199-7-159-34.eng.wind.ca) |
2021-08-27 20:51:45 +0200 | sciencentistguy | (~sciencent@hacksoc/ordinary-member) (Ping timeout: 248 seconds) |
2021-08-27 20:53:44 +0200 | tput | (~tim@199-7-159-34.eng.wind.ca) (Read error: Connection reset by peer) |
2021-08-27 20:55:51 +0200 | tput | (~tim@24.244.29.189) |
2021-08-27 20:57:21 +0200 | qbt | (~edun@user/edun) (Remote host closed the connection) |
2021-08-27 20:59:43 +0200 | Morrow_ | (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
2021-08-27 21:00:51 +0200 | tfeb | (~tfb@88.98.95.237) |
2021-08-27 21:03:44 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:b5b4:3a1f:2123:21ea) |
2021-08-27 21:08:00 +0200 | qbt | (~edun@user/edun) |
2021-08-27 21:08:28 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
2021-08-27 21:08:41 +0200 | <aegon> | cli apps i use ansii-term its simple |
2021-08-27 21:08:45 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 21:09:00 +0200 | fresheyeball | (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) |
2021-08-27 21:09:17 +0200 | <aegon> | web apps i've been using scotty-web |
2021-08-27 21:09:25 +0200 | <aegon> | srid[m]: ^ |
2021-08-27 21:11:29 +0200 | argento | (~argent0@168-227-96-26.ptr.westnet.com.ar) (Ping timeout: 248 seconds) |
2021-08-27 21:11:35 +0200 | <maerwald> | who's building web apps still, so 90s |
2021-08-27 21:12:13 +0200 | <maerwald> | have login, a database and customer support |
2021-08-27 21:14:17 +0200 | <aegon> | i assume webapps meant api consumed by something like react |
2021-08-27 21:14:17 +0200 | <maerwald> | after 20 years this nonsense should be abstracted out so hard that you shouldn't know about it anymore |
2021-08-27 21:14:17 +0200 | <maerwald> | but for some reason we haven't managed |
2021-08-27 21:14:17 +0200 | argento | (~argent0@191.81.228.237) |
2021-08-27 21:14:17 +0200 | <aegon> | the browser is a crazy land and javascript along with it. blows my mind javascript is the most used language today |
2021-08-27 21:14:17 +0200 | <aegon> | no one thought that through |
2021-08-27 21:14:17 +0200 | <aegon> | :P |
2021-08-27 21:14:17 +0200 | <maerwald> | I don't think js is the problem here, or even languages at all |
2021-08-27 21:14:17 +0200 | <monochrom> | Blew DIjkstra's mind BASIC was the most learned language, too. |
2021-08-27 21:14:35 +0200 | <maerwald> | it's the complete lack of *engineering* |
2021-08-27 21:14:44 +0200 | <monochrom> | Yes I'm now comparing you with Dijkstra. >:) |
2021-08-27 21:16:17 +0200 | <maerwald> | why can't you build your startup platform web app in 10 clicks via a GUI? I'm pretty sure there's nothing *technically* new about your idea, use case, database constraints etc etc |
2021-08-27 21:16:50 +0200 | <maerwald> | it has been done a million times and yet we still do it from scratch again |
2021-08-27 21:16:54 +0200 | <maerwald> | because it pays well? |
2021-08-27 21:16:54 +0200 | tfeb | (~tfb@88.98.95.237) (Quit: died) |
2021-08-27 21:17:09 +0200 | <aegon> | :O |
2021-08-27 21:17:10 +0200 | <monochrom> | I think it's called WordPress and FourSquare etc. |
2021-08-27 21:17:17 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
2021-08-27 21:17:22 +0200 | aegon | DJ |
2021-08-27 21:17:29 +0200 | DJ | DJ_Ikstra |
2021-08-27 21:17:29 +0200 | kayprish | (~kayprish@185.37.26.225) |
2021-08-27 21:18:14 +0200 | <monochrom> | But I do not object to the possibilities that most programmers are scammers. |
2021-08-27 21:18:20 +0200 | kayprish | (~kayprish@185.37.26.225) (Remote host closed the connection) |
2021-08-27 21:19:09 +0200 | <DJ_Ikstra> | maerwald: we must all fight django for at least 2 years in our career before noticing how silly it is and vowing never again |
2021-08-27 21:19:09 +0200 | <maerwald> | I wonder if you could apply unix principles to web development |
2021-08-27 21:19:26 +0200 | <maerwald> | oh no, I believe ppl will interpret this as microservices |
2021-08-27 21:19:30 +0200 | <maerwald> | ok, I didn't say anything |
2021-08-27 21:19:32 +0200 | <maerwald> | forget it |
2021-08-27 21:22:00 +0200 | <monochrom> | Functional programming is the closest to realizing unix principles without unix flaws (such as "everything is a string" and "there is only one input source and only one output destination"). |
2021-08-27 21:22:41 +0200 | burnsidesLlama | (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Ping timeout: 248 seconds) |
2021-08-27 21:23:13 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 248 seconds) |
2021-08-27 21:23:19 +0200 | <monochrom> | John Hughes paper is almost "why unix but strongly statically typed matters" |
2021-08-27 21:24:43 +0200 | <maerwald> | I ultimately believe in coding via moving pictures around my screen and connecting them with lines |
2021-08-27 21:25:05 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 21:26:04 +0200 | <monochrom> | Arrow is almost like that, but trapped in plain text files. |
2021-08-27 21:27:10 +0200 | Logio_ | Logio |
2021-08-27 21:28:30 +0200 | Codaraxis__ | (~Codaraxis@user/codaraxis) |
2021-08-27 21:31:47 +0200 | Codaraxis_ | (~Codaraxis@user/codaraxis) (Ping timeout: 240 seconds) |
2021-08-27 21:38:09 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 250 seconds) |
2021-08-27 21:40:50 +0200 | Codaraxis_ | (~Codaraxis@user/codaraxis) |
2021-08-27 21:41:22 +0200 | orhan89 | (~orhan89@151.91.188.35.bc.googleusercontent.com) (Ping timeout: 240 seconds) |
2021-08-27 21:41:40 +0200 | elf_fortrez | (~elf_fortr@adsl-72-50-7-8.prtc.net) (Quit: Client closed) |
2021-08-27 21:42:40 +0200 | dsrt^ | (~dsrt@12.16.129.111) (Ping timeout: 240 seconds) |
2021-08-27 21:42:48 +0200 | notzmv | (~zmv@user/notzmv) |
2021-08-27 21:42:56 +0200 | <byorgey> | Does lens provide a combinator of type (something like) MonadState s m => Lens' s a -> (a -> m a) -> m s ? |
2021-08-27 21:43:16 +0200 | dsrt^ | (~dsrt@12.16.129.111) |
2021-08-27 21:43:28 +0200 | <byorgey> | I can do it with get >>= theLens f where f :: a -> m a , but wondered if there was already an operator to do this |
2021-08-27 21:43:35 +0200 | orhan89 | (~orhan89@151.91.188.35.bc.googleusercontent.com) |
2021-08-27 21:44:07 +0200 | <byorgey> | :t \lens f -> get >>= lens f |
2021-08-27 21:44:08 +0200 | <lambdabot> | MonadState a m => (t -> a -> m b) -> t -> m b |
2021-08-27 21:44:10 +0200 | Codaraxis__ | (~Codaraxis@user/codaraxis) (Ping timeout: 240 seconds) |
2021-08-27 21:46:26 +0200 | <hololeap> | I found a solution to my problem that seems ok: make a new typeclass for semigroups/monoids that have a "short-circuit state", so that wrappers can know whether or not to evaluate the second argument to `sappend`: http://sprunge.us/hYNINa |
2021-08-27 21:47:36 +0200 | <byorgey> | In other words, I want to apply an update to the component of the monadic state targeted by the lens, but the update may itself have some effects in the monad |
2021-08-27 21:48:10 +0200 | hyiltiz | (~quassel@31.220.5.250) (Ping timeout: 240 seconds) |
2021-08-27 21:48:47 +0200 | hyiltiz | (~quassel@31.220.5.250) |
2021-08-27 21:52:16 +0200 | <byorgey> | wait, I'm not even sure get >>= lens f does what I want, because I think that throws out the returned state which has the updated thing in it. Maybe it should be get >>= lens f >>= put. |
2021-08-27 21:55:10 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-08-27 21:57:13 +0200 | azeem | (~azeem@176.200.202.67) (Ping timeout: 250 seconds) |
2021-08-27 21:57:28 +0200 | azeem | (~azeem@176.200.202.67) |
2021-08-27 21:58:32 +0200 | <byorgey> | oh, that doesn't work because the put overwrites any changes to the state made by the 'lens f' part! Never mind, maybe there's no concise, lawful way to do this, because what if the effects of the 'lens f' part modify the part of the state the lens is targeting? |
2021-08-27 21:59:38 +0200 | <byorgey> | In my situation that's not the case, but anyway, I will stick with something like do { a <- use lens; a' <- f a; lens %= a' } |
2021-08-27 22:01:10 +0200 | _ht | (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
2021-08-27 22:01:28 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-08-27 22:04:58 +0200 | Hanicef | (~gustaf@81-229-9-108-no92.tbcn.telia.com) |
2021-08-27 22:06:13 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
2021-08-27 22:06:25 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 22:09:07 +0200 | oxide | (~lambda@user/oxide) (Ping timeout: 240 seconds) |
2021-08-27 22:10:39 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 250 seconds) |
2021-08-27 22:10:47 +0200 | azeem | (~azeem@176.200.202.67) (Ping timeout: 240 seconds) |
2021-08-27 22:10:56 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 22:11:31 +0200 | azeem | (~azeem@176.200.202.67) |
2021-08-27 22:12:49 +0200 | argento | (~argent0@191.81.228.237) (Ping timeout: 248 seconds) |
2021-08-27 22:18:53 +0200 | Morrow_ | (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 250 seconds) |
2021-08-27 22:20:13 +0200 | Athas | (athas@2a01:7c8:aaac:1cf:21e7:9b03:b2c:cc0f) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-08-27 22:20:23 +0200 | Athas | (athas@sigkill.dk) |
2021-08-27 22:23:25 +0200 | <shachaf> | byorgey: I guess the odd thing about that type is that the (a -> m a) function knows about both a and s. |
2021-08-27 22:29:10 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds) |
2021-08-27 22:29:16 +0200 | chisui | (~chisui@200116b868a14e009fa6896fe3af5cba.dip.versatel-1u1.de) (Ping timeout: 246 seconds) |
2021-08-27 22:30:54 +0200 | azeem | (~azeem@176.200.202.67) (Ping timeout: 250 seconds) |
2021-08-27 22:31:07 +0200 | sszark | (~sszark@h-155-4-128-59.NA.cust.bahnhof.se) (Ping timeout: 240 seconds) |
2021-08-27 22:31:13 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Quit: FinnElija) |
2021-08-27 22:32:26 +0200 | azeem | (~azeem@176.200.202.67) |
2021-08-27 22:33:22 +0200 | sszark | (~sszark@h-155-4-128-59.NA.cust.bahnhof.se) |
2021-08-27 22:34:16 +0200 | jumper149 | (~jumper149@80.240.31.34) |
2021-08-27 22:35:06 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2021-08-27 22:35:37 +0200 | wysteriary[m] | (~wysteriar@2001:470:69fc:105::a42e) |
2021-08-27 22:38:07 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 240 seconds) |
2021-08-27 22:38:25 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 22:40:47 +0200 | qbt | (~edun@user/edun) (Ping timeout: 240 seconds) |
2021-08-27 22:45:53 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Ping timeout: 248 seconds) |
2021-08-27 22:47:03 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 250 seconds) |
2021-08-27 22:47:20 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-08-27 22:48:00 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-08-27 22:48:01 +0200 | azeem | (~azeem@176.200.202.67) (Ping timeout: 252 seconds) |
2021-08-27 22:48:55 +0200 | azeem | (~azeem@176.200.202.67) |
2021-08-27 22:51:52 +0200 | pbrisbin | (~patrick@174-081-116-011.res.spectrum.com) (Ping timeout: 252 seconds) |
2021-08-27 22:52:43 +0200 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2021-08-27 22:53:07 +0200 | azeem | (~azeem@176.200.202.67) (Ping timeout: 240 seconds) |
2021-08-27 22:55:23 +0200 | azeem | (~azeem@176.200.202.67) |
2021-08-27 22:58:19 +0200 | ubert | (~Thunderbi@91.141.37.164.wireless.dyn.drei.com) (Ping timeout: 250 seconds) |
2021-08-27 22:59:34 +0200 | tput | (~tim@24.244.29.189) (Ping timeout: 252 seconds) |
2021-08-27 23:02:00 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) |
2021-08-27 23:02:53 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
2021-08-27 23:04:49 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 250 seconds) |
2021-08-27 23:05:23 +0200 | dhouthoo | (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.2) |
2021-08-27 23:11:13 +0200 | argento | (~argent0@191.81.228.237) |
2021-08-27 23:14:45 +0200 | fendor_ | (~fendor@77.119.210.198.wireless.dyn.drei.com) (Remote host closed the connection) |
2021-08-27 23:15:01 +0200 | elf_fortrez | (~elf_fortr@adsl-72-50-4-145.prtc.net) |
2021-08-27 23:20:01 +0200 | acidjnk_new | (~acidjnk@p200300d0c72b95925da55fe159cc0756.dip0.t-ipconnect.de) |
2021-08-27 23:20:26 +0200 | Pickchea | (~private@user/pickchea) |
2021-08-27 23:20:27 +0200 | azeem | (~azeem@176.200.202.67) (Ping timeout: 240 seconds) |
2021-08-27 23:20:48 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2021-08-27 23:21:12 +0200 | azeem | (~azeem@176.200.202.67) |
2021-08-27 23:21:38 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-08-27 23:29:12 +0200 | mc47 | (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
2021-08-27 23:32:22 +0200 | doors | (~a@p200300ef970830a645b8de8f8152bf35.dip0.t-ipconnect.de) |
2021-08-27 23:33:07 +0200 | azeem | (~azeem@176.200.202.67) (Ping timeout: 252 seconds) |
2021-08-27 23:33:11 +0200 | minimario | (~minimario@2603:900a:1600:ba00:a4f2:2ae3:8f32:437f) |
2021-08-27 23:33:16 +0200 | <doors> | Can I make this a valid type alias? type Foo a = Applicative f => a -> f a |
2021-08-27 23:33:28 +0200 | <doors> | Right now the compiler says "f not in scope". |
2021-08-27 23:33:40 +0200 | azeem | (~azeem@5.168.199.98) |
2021-08-27 23:34:00 +0200 | <minimario> | i tried to install something with "runhaskell Setup.hs install" (ik i should use cabal, just trying this out), and getting the error "/usr/local/share/doc/x86_64-linux-ghc-8.10.4: createDirectory: permission denied", is there a way to manually install packages like this? |
2021-08-27 23:35:12 +0200 | <geekosaur> | I think you want to pass --user, the default was --global |
2021-08-27 23:35:13 +0200 | <dsal> | doors: You're mixing up types and constraints. |
2021-08-27 23:35:24 +0200 | <hpc> | it depends on what you want |
2021-08-27 23:35:39 +0200 | <hpc> | if you want a higher-ranked type, with extensions you can do type Foo a = forall f. Applicative f => a -> f a |
2021-08-27 23:36:00 +0200 | hegstal | (~hegstal@2a02:c7f:7604:8a00:16d:5419:a8cf:3833) (Remote host closed the connection) |
2021-08-27 23:36:01 +0200 | gehmehgeh | (~user@user/gehmehgeh) |
2021-08-27 23:36:07 +0200 | <minimario> | runhaskell Setup.hs install --user also didn't work |
2021-08-27 23:36:21 +0200 | <hpc> | if you want f to be whatever has the name f wherever you use Foo, you can use... i forget the extension but then you name it ?f and do a bunch of weird stuff |
2021-08-27 23:36:34 +0200 | <doors> | hpc: I had RankNTypes but the forall was missing. Thank you. |
2021-08-27 23:36:36 +0200 | <hpc> | (but you definitely don't want that one, even if you think you do) |
2021-08-27 23:36:44 +0200 | <hpc> | ah, cool |
2021-08-27 23:37:53 +0200 | <monochrom> | Refining "didn't work" to the exact verbatim error message would be more helpful. |
2021-08-27 23:38:04 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
2021-08-27 23:38:09 +0200 | d0ku | (~d0ku@178.43.56.75.ipv4.supernova.orange.pl) (Ping timeout: 248 seconds) |
2021-08-27 23:38:22 +0200 | <minimario> | oh same as before, "/usr/local/share/doc/x86_64-linux-ghc-8.10.4: createDirectory: permission denied" |
2021-08-27 23:38:25 +0200 | <geekosaur> | minimario, I think you also havw to configure with --user, but what monochrom said |
2021-08-27 23:38:34 +0200 | <minimario> | oh i see |
2021-08-27 23:38:36 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-08-27 23:38:47 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
2021-08-27 23:38:48 +0200 | <monochrom> | Ah yeah, "... configure --user" |
2021-08-27 23:38:56 +0200 | mikoto-chan | (~mikoto-ch@83.137.2.251) |
2021-08-27 23:38:59 +0200 | <minimario> | can you explain why that fixed it |
2021-08-27 23:39:02 +0200 | <minimario> | (it works) |
2021-08-27 23:39:53 +0200 | <monochrom> | Setup's way is that most configurations and choices are set in stone at "Setup configure <options>" time. The remaining commands don't change anything. |
2021-08-27 23:40:15 +0200 | <minimario> | er like, why --user instead of global |
2021-08-27 23:40:38 +0200 | <geekosaur> | most users don't have permission to install into /usr/local |
2021-08-27 23:40:38 +0200 | <monochrom> | --global means /usr/local, --user means $HOME |
2021-08-27 23:40:56 +0200 | <monochrom> | Why --global is the default? Because Setup.hs is for linux distro people. |
2021-08-27 23:41:32 +0200 | <monochrom> | Note how Setup.hs does not audo-download-build dependencies. Because linux distro people already do that manually. |
2021-08-27 23:42:44 +0200 | <monochrom> | (and linux distro people will have to add --prefix=/usr) |
2021-08-27 23:43:32 +0200 | <hpc> | or because they want to pull down build dependencies some other way (like if they're making .debs) |
2021-08-27 23:44:20 +0200 | <minimario> | gotcha |
2021-08-27 23:44:21 +0200 | <minimario> | makes sense |
2021-08-27 23:44:35 +0200 | <minimario> | didn't know --global meant /usr/local and --user meant $HOME |
2021-08-27 23:44:44 +0200 | <minimario> | but that helps |
2021-08-27 23:44:45 +0200 | kuribas | (~user@ptr-25vy0i9k5kxqroisf0f.18120a2.ip6.access.telenet.be) (ERC (IRC client for Emacs 26.3)) |
2021-08-27 23:45:08 +0200 | AWizzArd | (~code@gehrels.uberspace.de) (Changing host) |
2021-08-27 23:45:08 +0200 | AWizzArd | (~code@user/awizzard) |
2021-08-27 23:46:52 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) |
2021-08-27 23:51:27 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-08-27 23:51:40 +0200 | azeem | (~azeem@5.168.199.98) (Ping timeout: 240 seconds) |
2021-08-27 23:52:18 +0200 | azeem | (~azeem@5.168.199.98) |
2021-08-27 23:52:22 +0200 | hannessteffenhag | (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2021-08-27 23:55:55 +0200 | micro | (~micro@user/micro) (Ping timeout: 268 seconds) |
2021-08-27 23:56:41 +0200 | micro | (~micro@user/micro) |
2021-08-27 23:59:57 +0200 | gehmehgeh | (~user@user/gehmehgeh) (Quit: Leaving) |