2021-09-08 00:01:59 +0200 | <hexeme> | hmm, kind of annoying doctest requires all the tests as one homogenous comment |
2021-09-08 00:02:30 +0200 | <hexeme> | oh it doesn't nm |
2021-09-08 00:04:13 +0200 | <unit73e> | hexeme, conveniently called doctest lol I didn't know that existed |
2021-09-08 00:04:22 +0200 | dhouthoo | (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.2) |
2021-09-08 00:07:36 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 00:07:49 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 00:09:18 +0200 | <hexeme> | hehe yeah |
2021-09-08 00:09:25 +0200 | <hexeme> | it does the thing too |
2021-09-08 00:10:21 +0200 | <hexeme> | i wish i could somehow get it working in vscode, but that's not a big deal |
2021-09-08 00:10:40 +0200 | <hexeme> | i once learned how to do vscode extensions and built one for doing typescript->lua transpilation, but i've forgotten everything |
2021-09-08 00:12:40 +0200 | <hexeme> | entr is handy for this kind of thing |
2021-09-08 00:13:29 +0200 | <hexeme> | It's super wierd to me that Copilot is able to automatically write competent doctests for my functions |
2021-09-08 00:13:32 +0200 | hexeme | shivers |
2021-09-08 00:15:01 +0200 | <sm> | entr is awesome |
2021-09-08 00:15:09 +0200 | <sm> | hexeme, what do you mean by doctest working in vscode ? |
2021-09-08 00:16:30 +0200 | <hexeme> | sm, I guess there are a number of possibilities. It could run the tests in the background on change/save and give you squigglies. Or I suppose it could be as simple as an output pane. |
2021-09-08 00:16:38 +0200 | <dsal> | Oh hey, this code already has `maybeToRight` in its *prelude*. I learned this by trying to use that name and having it collide. |
2021-09-08 00:16:39 +0200 | <hexeme> | A tiling window manager and entr is just about as good though :D |
2021-09-08 00:16:43 +0200 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 252 seconds) |
2021-09-08 00:17:17 +0200 | <sm> | I see, yes squigglies would be kind of cool |
2021-09-08 00:17:20 +0200 | <hexeme> | sm: vscode also has the "Problems" pane that linters use |
2021-09-08 00:17:25 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
2021-09-08 00:17:33 +0200 | <sm> | I would love doctest more if it was fast |
2021-09-08 00:18:10 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-09-08 00:18:10 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-09-08 00:18:10 +0200 | wroathe | (~wroathe@user/wroathe) |
2021-09-08 00:18:22 +0200 | <hexeme> | Ah I only have a few functions so far so I didn't notice |
2021-09-08 00:18:22 +0200 | falafel | (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) (Ping timeout: 252 seconds) |
2021-09-08 00:18:27 +0200 | orhan89 | (~orhan89@151.91.188.35.bc.googleusercontent.com) (Ping timeout: 240 seconds) |
2021-09-08 00:19:31 +0200 | roboguy_ | (~roboguy_@cpe-98-156-4-161.kc.res.rr.com) |
2021-09-08 00:20:13 +0200 | orhan89 | (~orhan89@151.91.188.35.bc.googleusercontent.com) |
2021-09-08 00:22:08 +0200 | <dsal> | I don't think I got into doctest that much. It seems useful depending on the kind of thing you're writing. |
2021-09-08 00:23:05 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
2021-09-08 00:24:10 +0200 | <sm> | it's the quickest way to write tests, I think |
2021-09-08 00:25:05 +0200 | <sm> | and api examples |
2021-09-08 00:25:41 +0200 | <dsal> | Yeah, I think it's useful for api examples, but I'm not too confident in the test coverage I'd get. |
2021-09-08 00:26:23 +0200 | <sm> | well, it makes clear if a function is tested.. check the haddock |
2021-09-08 00:27:37 +0200 | <sm> | lots of tests could obscure the code though |
2021-09-08 00:32:08 +0200 | <hexeme> | yayy, by writing tests, I discovered the refactoring typo and now my program works again |
2021-09-08 00:32:10 +0200 | <hexeme> | \o/ |
2021-09-08 00:32:51 +0200 | <hexeme> | sm: the editor should be able to hide them! another feature for the vscode extension we'll collaborate on one day |
2021-09-08 00:32:56 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 00:33:09 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 00:33:12 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
2021-09-08 00:33:24 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 00:37:26 +0200 | <sm> | nice! #haskell-language-server will be the place |
2021-09-08 00:37:39 +0200 | <sm> | for the sake of other editor users, I'm inclined to move tests to the bottom of the file when they get long |
2021-09-08 00:39:15 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 00:41:00 +0200 | <hexeme> | ([x], xs) = splitAt 1 input' |
2021-09-08 00:41:02 +0200 | <hexeme> | (x:xs) = input' |
2021-09-08 00:41:04 +0200 | <hexeme> | are these the same |
2021-09-08 00:41:45 +0200 | <hexeme> | i think so |
2021-09-08 00:42:50 +0200 | ec_ | (~ec@gateway/tor-sasl/ec) (Quit: ec_) |
2021-09-08 00:42:59 +0200 | <hexeme> | they are! neat |
2021-09-08 00:43:09 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:51c9:9325:5764:1e14) (Remote host closed the connection) |
2021-09-08 00:43:13 +0200 | <geekosaur> | there might be a strictness difference |
2021-09-08 00:43:38 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
2021-09-08 00:46:57 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:51c9:9325:5764:1e14) |
2021-09-08 00:47:10 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds) |
2021-09-08 00:47:28 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-09-08 00:47:29 +0200 | Erutuon | (~Erutuon@user/erutuon) (Ping timeout: 252 seconds) |
2021-09-08 00:48:04 +0200 | favonia | (~favonia@user/favonia) (Ping timeout: 252 seconds) |
2021-09-08 00:50:48 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 00:52:56 +0200 | lavaman | (~lavaman@98.38.249.169) (Read error: Connection reset by peer) |
2021-09-08 00:52:56 +0200 | awschnap | (~lavaman@98.38.249.169) |
2021-09-08 00:53:02 +0200 | pzanco | (~Android@2804:14c:3ba1:42d:c022:dfe5:eb2e:987) |
2021-09-08 00:53:09 +0200 | pzanco | (~Android@2804:14c:3ba1:42d:c022:dfe5:eb2e:987) (Client Quit) |
2021-09-08 00:55:03 +0200 | favonia | (~favonia@user/favonia) |
2021-09-08 00:56:17 +0200 | TranquilEcho | (~grom@user/tranquilecho) (Quit: WeeChat 2.8) |
2021-09-08 00:58:38 +0200 | <roboguy_> | > let ([x], xs) = splitAt 1 ('a':undefined) in x |
2021-09-08 00:58:40 +0200 | <lambdabot> | 'a' |
2021-09-08 01:06:47 +0200 | dajoer | (~david@user/gvx) |
2021-09-08 01:08:18 +0200 | <hexeme> | Is there a HOF that takes a function, an initial argument, and a count, and continuously calls the function count times, passing each output back into the function? |
2021-09-08 01:08:36 +0200 | <hexeme> | guess I could try to write it |
2021-09-08 01:09:01 +0200 | <c_wraith> | you can do it with iterate and !! |
2021-09-08 01:09:12 +0200 | <c_wraith> | though that can have strictness issues |
2021-09-08 01:09:24 +0200 | favonia | (~favonia@user/favonia) (Ping timeout: 265 seconds) |
2021-09-08 01:09:35 +0200 | mcglk | (~mcglk@131.191.49.120) (Quit: (zzz)) |
2021-09-08 01:09:50 +0200 | <hexeme> | @hoogle iterate |
2021-09-08 01:09:50 +0200 | <lambdabot> | Prelude iterate :: (a -> a) -> a -> [a] |
2021-09-08 01:09:50 +0200 | <lambdabot> | Data.List iterate :: (a -> a) -> a -> [a] |
2021-09-08 01:09:50 +0200 | <lambdabot> | Data.List.NonEmpty iterate :: (a -> a) -> a -> NonEmpty a |
2021-09-08 01:11:33 +0200 | <c_wraith> | iterate' is better for that use case, though the function you pass in needs to cooperate |
2021-09-08 01:12:16 +0200 | <hexeme> | churn f a 0 = a |
2021-09-08 01:12:18 +0200 | <hexeme> | churn f a n = churn f (f a) (n - 1) |
2021-09-08 01:12:20 +0200 | <hexeme> | what about that |
2021-09-08 01:12:37 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-09-08 01:12:43 +0200 | <hexeme> | hi [itchyjunk] |
2021-09-08 01:13:28 +0200 | <c_wraith> | that's almost guaranteed to be a space leak. the exception is when f is constructor-like |
2021-09-08 01:13:37 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.) |
2021-09-08 01:14:30 +0200 | <hexeme> | c_wraith: f here is a function that basically rotates a string |
2021-09-08 01:14:38 +0200 | <hexeme> | "abcd" -> "bcda" |
2021-09-08 01:14:40 +0200 | <c_wraith> | definitely a space leak |
2021-09-08 01:14:43 +0200 | mc47 | (~mc47@xmonad/TheMC47) (Ping timeout: 265 seconds) |
2021-09-08 01:14:58 +0200 | <hexeme> | in the sense that if you run it 4 times it creates 4 strings? |
2021-09-08 01:15:43 +0200 | <c_wraith> | in the sense that if you run it n times on a string of length m, it uses space proportional to n+m, not just m |
2021-09-08 01:15:44 +0200 | <glguy> | hexeme: you should just write a function that does the rotation all at once |
2021-09-08 01:15:57 +0200 | <glguy> | iterating that will be unnecessarily slow, even if strictly evaluated |
2021-09-08 01:16:19 +0200 | <hpc> | > rotate "abcd" |
2021-09-08 01:16:19 +0200 | <hexeme> | i'm trying to write a unit test that shows running this function length times produces the same string |
2021-09-08 01:16:21 +0200 | <lambdabot> | error: |
2021-09-08 01:16:21 +0200 | <lambdabot> | Ambiguous occurrence ‘rotate’ |
2021-09-08 01:16:21 +0200 | <lambdabot> | It could refer to |
2021-09-08 01:16:42 +0200 | <hpc> | > rotate' "abcd" |
2021-09-08 01:16:44 +0200 | <lambdabot> | "p\891qe" |
2021-09-08 01:16:49 +0200 | <hpc> | noooo, lambdabot why |
2021-09-08 01:16:55 +0200 | vicfred | (~vicfred@user/vicfred) |
2021-09-08 01:17:02 +0200 | <hpc> | rotate' s = "pͻqe" |
2021-09-08 01:17:04 +0200 | <dsal> | @check (reverse.reverse) l === l |
2021-09-08 01:17:06 +0200 | <lambdabot> | error: |
2021-09-08 01:17:06 +0200 | <lambdabot> | • Couldn't match expected type ‘[a0]’ with actual type ‘Expr’ • In the first... |
2021-09-08 01:17:11 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
2021-09-08 01:17:20 +0200 | mikoto-chan | (~mikoto-ch@83.137.2.243) (Ping timeout: 260 seconds) |
2021-09-08 01:17:38 +0200 | <hexeme> | `churn cycleKey "ally" 4` should return "ally" |
2021-09-08 01:17:44 +0200 | <hexeme> | is what i'm trying to test |
2021-09-08 01:17:47 +0200 | <dsal> | @check \l -> (reverse.reverse) l === l |
2021-09-08 01:17:48 +0200 | <lambdabot> | +++ OK, passed 100 tests. |
2021-09-08 01:17:57 +0200 | <dsal> | Oh. I always forget how that works. |
2021-09-08 01:18:23 +0200 | <c_wraith> | @chwck \l -> l == reverse l |
2021-09-08 01:18:25 +0200 | <lambdabot> | +++ OK, passed 100 tests. |
2021-09-08 01:18:27 +0200 | drlkf | (~drlkf@2001:41d0:a:62bb::1) (Ping timeout: 240 seconds) |
2021-09-08 01:18:34 +0200 | <c_wraith> | that's the fun case. |
2021-09-08 01:19:33 +0200 | m1dnight | (~christoph@188.ip-51-91-158.eu) (Ping timeout: 265 seconds) |
2021-09-08 01:19:40 +0200 | <dsal> | Haha. It's good to describe the type, I guess. |
2021-09-08 01:20:01 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-09-08 01:20:08 +0200 | <hexeme> | c_wraith: http://logos.ldlework.com/caps/2021-09-07-23-19-59.png |
2021-09-08 01:20:12 +0200 | <hexeme> | this nearly killed my machine |
2021-09-08 01:20:16 +0200 | <hexeme> | what happened?! lol |
2021-09-08 01:20:36 +0200 | drlkf | (~drlkf@2001:41d0:a:62bb::1) |
2021-09-08 01:20:42 +0200 | <c_wraith> | you didn't enable multiline mode? |
2021-09-08 01:21:00 +0200 | <c_wraith> | it's missing the base case, because the recursive case shadowed it |
2021-09-08 01:21:00 +0200 | <hexeme> | oh i didn't know about that |
2021-09-08 01:21:00 +0200 | m1dnight | (~christoph@188.ip-51-91-158.eu) |
2021-09-08 01:21:06 +0200 | <hexeme> | i see |
2021-09-08 01:21:51 +0200 | <dsal> | ghci is a bit of a uncanny valley |
2021-09-08 01:22:50 +0200 | max22- | (~maxime@2a01cb08833598001355d88e505fa1ae.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
2021-09-08 01:24:45 +0200 | <[itchyjunk]> | hi hexeme |
2021-09-08 01:26:24 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:51c9:9325:5764:1e14) (Remote host closed the connection) |
2021-09-08 01:30:25 +0200 | alx741 | (~alx741@181.196.68.218) |
2021-09-08 01:32:24 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 01:33:31 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 01:33:55 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 01:34:03 +0200 | jtomas | (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 265 seconds) |
2021-09-08 01:35:28 +0200 | <monochrom> | This is why you should enter code into a file and use :load |
2021-09-08 01:35:48 +0200 | acidjnk_new | (~acidjnk@p5487d0ba.dip0.t-ipconnect.de) (Remote host closed the connection) |
2021-09-08 01:35:53 +0200 | <geekosaur> | this is about doctest, iirc |
2021-09-08 01:36:09 +0200 | <geekosaur> | which uses ghc butdoesn't use it in multiline mode by default |
2021-09-08 01:36:12 +0200 | acidjnk_new | (~acidjnk@p200300d0c72030924532c033362507d1.dip0.t-ipconnect.de) |
2021-09-08 01:36:32 +0200 | <geekosaur> | *ghci |
2021-09-08 01:39:11 +0200 | mikoto-chan | (~mikoto-ch@83.137.2.243) |
2021-09-08 01:39:45 +0200 | chomwitt | (~chomwitt@ppp-94-67-192-178.home.otenet.gr) (Remote host closed the connection) |
2021-09-08 01:40:17 +0200 | acidjnk_new3 | (~acidjnk@p200300d0c7203092bc4507ecfc2ab120.dip0.t-ipconnect.de) |
2021-09-08 01:40:41 +0200 | <koala_man> | acidjnk_new3! |
2021-09-08 01:42:31 +0200 | acidjnk_new | (~acidjnk@p200300d0c72030924532c033362507d1.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2021-09-08 01:46:53 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
2021-09-08 01:47:12 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-09-08 01:49:38 +0200 | Erutuon | (~Erutuon@user/erutuon) |
2021-09-08 01:52:20 +0200 | vysn | (~vysn@user/vysn) (Ping timeout: 260 seconds) |
2021-09-08 01:56:22 +0200 | forell | (~forell@user/forell) (Ping timeout: 250 seconds) |
2021-09-08 01:58:58 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 01:59:11 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 02:03:39 +0200 | forell | (~forell@user/forell) |
2021-09-08 02:06:19 +0200 | mestre | (~mestre@191.177.175.57) |
2021-09-08 02:06:41 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-09-08 02:08:09 +0200 | adam_ | (uid515807@id-515807.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2021-09-08 02:09:18 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 02:09:32 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 02:11:33 +0200 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
2021-09-08 02:19:49 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
2021-09-08 02:23:43 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:51c9:9325:5764:1e14) |
2021-09-08 02:24:19 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2021-09-08 02:31:08 +0200 | <dibblego> | omfg it's koala_man AND acidjnk_new3 !! |
2021-09-08 02:34:40 +0200 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2021-09-08 02:34:57 +0200 | forell | (~forell@user/forell) (Ping timeout: 265 seconds) |
2021-09-08 02:35:54 +0200 | <koala_man> | omg! |
2021-09-08 02:39:44 +0200 | <Axman6> | OMG! |
2021-09-08 02:39:47 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds) |
2021-09-08 02:40:06 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-09-08 02:41:22 +0200 | forell | (~forell@user/forell) |
2021-09-08 02:41:28 +0200 | <Axman6> | hexeme: I would also be inclined to make it churn f !a 0 = a |
2021-09-08 02:41:53 +0200 | amahl | (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Ping timeout: 252 seconds) |
2021-09-08 02:52:21 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds) |
2021-09-08 02:52:22 +0200 | forell | (~forell@user/forell) (Ping timeout: 252 seconds) |
2021-09-08 02:52:39 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-09-08 02:59:32 +0200 | dsrt^ | (~dsrt@68.101.54.227) |
2021-09-08 03:01:26 +0200 | forell | (~forell@user/forell) |
2021-09-08 03:02:07 +0200 | <iqubic> | You know what feels like a clumsy hack? Using fromEnum to do Word8 -> Int. Is there really no better way to do that? |
2021-09-08 03:02:26 +0200 | <monochrom> | I use fromIntegral |
2021-09-08 03:04:38 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 03:04:51 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 03:09:47 +0200 | neurocyte7 | (~neurocyte@94.16.90.216) |
2021-09-08 03:09:47 +0200 | neurocyte7 | (~neurocyte@94.16.90.216) (Changing host) |
2021-09-08 03:09:47 +0200 | neurocyte7 | (~neurocyte@user/neurocyte) |
2021-09-08 03:10:29 +0200 | forell | (~forell@user/forell) (Ping timeout: 252 seconds) |
2021-09-08 03:11:19 +0200 | favonia | (~favonia@user/favonia) |
2021-09-08 03:13:22 +0200 | neurocyte | (~neurocyte@user/neurocyte) (Ping timeout: 245 seconds) |
2021-09-08 03:13:22 +0200 | neurocyte7 | neurocyte |
2021-09-08 03:16:18 +0200 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Quit: Leaving) |
2021-09-08 03:16:57 +0200 | forell | (~forell@user/forell) |
2021-09-08 03:17:07 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds) |
2021-09-08 03:23:54 +0200 | awschnap | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-09-08 03:24:58 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 03:25:17 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 03:25:43 +0200 | jakalx | (~jakalx@base.jakalx.net) () |
2021-09-08 03:25:55 +0200 | xff0x | (~xff0x@2001:1a81:5244:5800:bebc:1a37:2a8f:4a9c) (Ping timeout: 252 seconds) |
2021-09-08 03:27:56 +0200 | xff0x | (~xff0x@2001:1a81:527e:a000:8410:b7cd:5783:45ad) |
2021-09-08 03:27:58 +0200 | aegon | (~mike@174.127.249.180) (Remote host closed the connection) |
2021-09-08 03:29:48 +0200 | jakalx | (~jakalx@base.jakalx.net) |
2021-09-08 03:33:55 +0200 | forell | (~forell@user/forell) (Ping timeout: 265 seconds) |
2021-09-08 03:39:17 +0200 | a6a45081-2b83 | (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507) |
2021-09-08 03:39:49 +0200 | <a6a45081-2b83> | does anyone know, what syntax is this? `lcons :: a -> Vector a %1-> Vector a` |
2021-09-08 03:40:00 +0200 | <a6a45081-2b83> | i.e. the `%1->` thing |
2021-09-08 03:40:13 +0200 | <awpr> | multiplicity syntax from the linear types changes |
2021-09-08 03:41:20 +0200 | pzanco | (~Android@187.104.158.159) |
2021-09-08 03:42:48 +0200 | rekahsoft | (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
2021-09-08 03:43:10 +0200 | <a6a45081-2b83> | any good tutorial on linear types? |
2021-09-08 03:45:31 +0200 | <roboguy_> | a6a45081-2b83: not sure off the top of my head (maybe someone else will), but essentially it means the function lcons can only use its `Vector a` argument exactly once (no more, no less) |
2021-09-08 03:46:03 +0200 | forell | (~forell@user/forell) |
2021-09-08 03:46:43 +0200 | <a6a45081-2b83> | so isn't this what it usually meant? for e.g. f :: Int -> Int; f x = x + 1 would consume only once right? |
2021-09-08 03:47:07 +0200 | <a6a45081-2b83> | I'm trying to think of an example of a function that would consume it's arguments multiple times... |
2021-09-08 03:48:10 +0200 | <enikar> | easy! Thinks to: double x = x + x |
2021-09-08 03:48:22 +0200 | Guest|51 | (~Guest|51@190.64.212.226) |
2021-09-08 03:49:53 +0200 | sleblanc | (~sleblanc@user/sleblanc) |
2021-09-08 03:50:10 +0200 | <Guest|51> | Hi, I just installed GHC on my Mac. Can I code on visual studio code now the Haskell language? Or I have to code on the terminal? |
2021-09-08 03:50:54 +0200 | <geekosaur> | vscode has several haskell support plugins |
2021-09-08 03:53:44 +0200 | vicfred | (~vicfred@user/vicfred) (Ping timeout: 265 seconds) |
2021-09-08 03:58:10 +0200 | pzanco | (~Android@187.104.158.159) (Quit: IRC for Android 2.1.59) |
2021-09-08 03:58:45 +0200 | <sm> | it's hard to visualise how that restriction on number of uses of an argument would be very useful for preventing errors, in practice. Is it more important as an annotation allowing the compiler to optimise more aggressively ? |
2021-09-08 03:59:49 +0200 | <geekosaur> | it doesn't currently |
2021-09-08 04:00:15 +0200 | <geekosaur> | Cale hates the new extension because he can't see how it'd actually be useful either |
2021-09-08 04:00:31 +0200 | forell | (~forell@user/forell) (Ping timeout: 265 seconds) |
2021-09-08 04:00:37 +0200 | <geekosaur> | he thinks any problem it would solve has a better solution |
2021-09-08 04:00:39 +0200 | <sm> | yes Guest|51, get the Haskell extension for vscode |
2021-09-08 04:01:56 +0200 | <sm> | I've been hearing forever that it enables better performance, removing the need for GC/unpredictable latency, in theory. I'm not quite seeing how |
2021-09-08 04:02:12 +0200 | <sm> | it = "linear types" |
2021-09-08 04:03:10 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 04:03:24 +0200 | <sm> | I can believe that, but I'm trying to imagine how it would look in practice |
2021-09-08 04:04:26 +0200 | finn_elija | (~finn_elij@user/finn-elija/x-0085643) |
2021-09-08 04:04:26 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Killed (erbium.libera.chat (Nickname regained by services))) |
2021-09-08 04:04:26 +0200 | finn_elija | FinnElija |
2021-09-08 04:04:36 +0200 | <sm> | annotating all my functions with how many times they use their arguments seems silly, more like computer work |
2021-09-08 04:04:40 +0200 | <Maxdamantus> | Presumably because if you know that an allocation is about to be dropped, you can reuse it instead of actually freeing it. |
2021-09-08 04:04:56 +0200 | <Maxdamantus> | So you generally avoid allocations. |
2021-09-08 04:05:38 +0200 | <monochrom> | sm: Suppose I chain up a lot of array transform functions, all of them of type ImmutableArray Int -> ImmutableArray Int for example. If I change "->" to the linear function type, it will be OK, and the compiler can firstly check that the initial array, the final array, and each intermediate array, are all use-once. |
2021-09-08 04:06:02 +0200 | hyiltiz | (~quassel@31.220.5.250) (Ping timeout: 252 seconds) |
2021-09-08 04:06:15 +0200 | wrengr | wrengr_away |
2021-09-08 04:06:29 +0200 | <monochrom> | Secondly, if the compiler also has the related optimization, it will replace my ImmutableArray by a mutable array and do in-place updates, no intermediate array. |
2021-09-08 04:07:08 +0200 | Guest|51 | (~Guest|51@190.64.212.226) (Ping timeout: 252 seconds) |
2021-09-08 04:07:31 +0200 | forell | (~forell@user/forell) |
2021-09-08 04:07:41 +0200 | <sm> | is this another way to say it (in naive language): after the line using xs, compiler can deallocate xs immediately (sooner than otherwise) because it knows xs won't be referenced again later in the function ? |
2021-09-08 04:07:47 +0200 | <monochrom> | You can firstly object that no one seems to be implementing that optimization any time soon. |
2021-09-08 04:08:03 +0200 | <monochrom> | You can secondly object that vector fusion already does the same optimization. |
2021-09-08 04:08:14 +0200 | cheater | (~Username@user/cheater) (Ping timeout: 265 seconds) |
2021-09-08 04:09:21 +0200 | <monochrom> | The only issue with the second objection is that what if I now have ImmutableArray Int -> (ImmutableArray Int, a) and do a state-monad thing. Linear typing can verify and green-light that optimization, currently vector fusion doesn't even recognize that kind of code. |
2021-09-08 04:09:52 +0200 | <monochrom> | I would s/deallocate/repurpose/ |
2021-09-08 04:10:22 +0200 | <sm> | ok |
2021-09-08 04:10:27 +0200 | <monochrom> | Converting purely-functional "xs2 = f xs" to imperative "xs := f xs" |
2021-09-08 04:10:50 +0200 | <monochrom> | See Wadler's "linear types can change the world!" |
2021-09-08 04:11:20 +0200 | <sm> | thanks, that sounds like it would make it clear |
2021-09-08 04:11:21 +0200 | <monochrom> | fully pun title, including the "change", the "world", and the "!" |
2021-09-08 04:11:30 +0200 | cheater | (~Username@user/cheater) |
2021-09-08 04:11:44 +0200 | <sm> | clearer |
2021-09-08 04:13:33 +0200 | <monochrom> | My objection to spending time on linear typing is that firstly no one seems to be implementing the related optimizations any time soon, and secondly the credibility of the safety is compromised by exceptions. |
2021-09-08 04:14:15 +0200 | <monochrom> | To be fair the 2nd point is hearsay, I haven't checked, I only heard other people stating it. |
2021-09-08 04:14:55 +0200 | <hexeme> | https://gist.github.com/dustinlacewell/ddabca4b0f1226683869db0e200abc29 |
2021-09-08 04:15:15 +0200 | <monochrom> | I do have my share of quota of retweeting without fact-checking, no? >:) |
2021-09-08 04:15:16 +0200 | <hexeme> | first actual thing i've made in haskell, a vigenere cipher |
2021-09-08 04:16:02 +0200 | <roboguy_> | I am not an expert, but linear types do enable some new type-level stuff. Like you can have non-trivial comonoids and nontrivial "cocategories" (if I'm using that term correctly), for instance |
2021-09-08 04:16:25 +0200 | acidjnk_new | (~acidjnk@p200300d0c7203092ad57924a0c526f2d.dip0.t-ipconnect.de) |
2021-09-08 04:16:42 +0200 | td_ | (~td@94.134.91.74) (Ping timeout: 245 seconds) |
2021-09-08 04:18:01 +0200 | acidjnk | (~acidjnk@p200300d0c7203092886436e542e4e0a8.dip0.t-ipconnect.de) |
2021-09-08 04:18:20 +0200 | hexeme | ldlework |
2021-09-08 04:18:35 +0200 | td_ | (~td@94.134.91.19) |
2021-09-08 04:19:49 +0200 | acidjnk_new3 | (~acidjnk@p200300d0c7203092bc4507ecfc2ab120.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2021-09-08 04:20:29 +0200 | hyiltiz | (~quassel@31.220.5.250) |
2021-09-08 04:20:55 +0200 | acidjnk_new | (~acidjnk@p200300d0c7203092ad57924a0c526f2d.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2021-09-08 04:25:03 +0200 | <roboguy_> | For instance, Chris Penner described a cocategory of logical proofs here: https://twitter.com/chrislpenner/status/1395242159410794496 . I had a go at implementing something based on that here (although I'm not 100% sure this is what he had in mind): https://github.com/roboguy13/cocategory-logic/tree/main/src |
2021-09-08 04:25:11 +0200 | <Cale> | sm: "it" being LinearHaskell doesn't do anything with regard to performance though. |
2021-09-08 04:25:37 +0200 | <Cale> | and I'm not entirely sure that this is even the substructural restriction you want if you care about performance... |
2021-09-08 04:25:42 +0200 | <roboguy_> | I realize that the non-totalness of Haskell breaks this for proving, but maybe something along those lines could still be useful. It's based on the "the argument definitely gets used" part, rather than the "it only gets used once" part |
2021-09-08 04:26:19 +0200 | <Cale> | Clean had uniqueness types, and that actually gave you what you wanted in order to be able to reuse memory. |
2021-09-08 04:27:14 +0200 | <Cale> | I wouldn't be massively opposed to adding uniqueness types to Haskell, but maybe mildly opposed. At least there's a clear story there for attaining a practical goal. |
2021-09-08 04:28:10 +0200 | <monochrom> | For now it's hype, yeah. |
2021-09-08 04:29:27 +0200 | <Cale> | It'd still complicate things at a time when I wish we could get the language's complexity down a bit if possible, and focus on improvements to tooling. |
2021-09-08 04:30:52 +0200 | <monochrom> | Tooling doesn't earn the currency which is academic publication opportunity. This is why even ghci's :doc command took so many years and is still in beta. |
2021-09-08 04:30:59 +0200 | <Cale> | LinearHaskell adds a lot of tricky nonsense to every part of GHC -- the linearity information is retained all the way through to core in order to be core-linted, even though it has no effect past typechecking. |
2021-09-08 04:31:13 +0200 | <monochrom> | Dragged on so much, I doubt any of you still know about :doc any more. |
2021-09-08 04:31:41 +0200 | <monochrom> | Ten years ago it was on everyone's wish list, when everyone hadn't given up hope. |
2021-09-08 04:31:48 +0200 | geekosaur | remembers it sorta |
2021-09-08 04:32:44 +0200 | <roboguy_> | wow, I actually never knew about it |
2021-09-08 04:34:17 +0200 | <Cale> | A dream of mine would be to have a GHC whose driver pipeline is factored into understandable parts, and where it's not a hopeless pipe-dream to build a server that runs 24/7 optimising stuff, and the compiler can just pull the latest simplified version of any given function based on its hash. |
2021-09-08 04:34:41 +0200 | alx741 | (~alx741@181.196.68.218) (Quit: alx741) |
2021-09-08 04:34:58 +0200 | <monochrom> | Ugh did you just pun on "pipe dream"? >:) |
2021-09-08 04:35:06 +0200 | <Cale> | haha, I suppose I did |
2021-09-08 04:35:34 +0200 | <Cale> | It would also be really cool to have GHCi-but-you're-in-the-driver |
2021-09-08 04:36:28 +0200 | <Cale> | (once it's in a form where it's not like, doStuff <18 hard-to-obtain-arguments> |
2021-09-08 04:36:35 +0200 | mcglk | (~mcglk@131.191.49.120) |
2021-09-08 04:36:35 +0200 | <Cale> | ) |
2021-09-08 04:37:43 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
2021-09-08 04:38:28 +0200 | <roboguy_> | hmm, not sure I fully know what you mean. GHCi sessions where you can access the GHC API? |
2021-09-08 04:39:37 +0200 | mikoto-chan | (~mikoto-ch@83.137.2.243) (Ping timeout: 252 seconds) |
2021-09-08 04:47:37 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-09-08 04:48:50 +0200 | forell | (~forell@user/forell) (Ping timeout: 265 seconds) |
2021-09-08 04:58:52 +0200 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 252 seconds) |
2021-09-08 05:01:53 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 05:02:58 +0200 | forell | (~forell@user/forell) |
2021-09-08 05:06:29 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Quit: Leaving) |
2021-09-08 05:06:32 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
2021-09-08 05:13:41 +0200 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 252 seconds) |
2021-09-08 05:15:42 +0200 | john2312 | (~user@114.250.137.142) |
2021-09-08 05:24:45 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
2021-09-08 05:25:17 +0200 | Guest|51 | (~Guest|51@190.64.212.226) |
2021-09-08 05:26:56 +0200 | <Cale> | roboguy_: Yeah, where you can go through the stages of compilation and inspect intermediate results and observe how your program is compiled, explicitly serialise intermediate outputs, or load them from disk |
2021-09-08 05:27:00 +0200 | rekahsoft | (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 260 seconds) |
2021-09-08 05:31:05 +0200 | sleblanc | (~sleblanc@user/sleblanc) (Ping timeout: 260 seconds) |
2021-09-08 05:44:38 +0200 | gnyeki | (~gnyeki@li578-216.members.linode.com) (Changing host) |
2021-09-08 05:44:38 +0200 | gnyeki | (~gnyeki@user/gnyeki) |
2021-09-08 05:49:22 +0200 | otto_s | (~user@p5de2f2c9.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2021-09-08 05:51:08 +0200 | otto_s | (~user@p5b044f3a.dip0.t-ipconnect.de) |
2021-09-08 05:51:38 +0200 | forell | (~forell@user/forell) (Ping timeout: 252 seconds) |
2021-09-08 05:51:49 +0200 | <roboguy_> | Cale: that would be interesting. HERMIT was a little bit like that, but not as sophisticated in that way (and somewhat bit rotted at the moment) |
2021-09-08 05:51:59 +0200 | oxide | (~lambda@user/oxide) |
2021-09-08 05:52:38 +0200 | Guest|51 | (~Guest|51@190.64.212.226) (Ping timeout: 265 seconds) |
2021-09-08 05:53:47 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-09-08 05:55:12 +0200 | <roboguy_> | I was one of the developers that made an interface to HERMIT that was actually built on top of GHCi (with all the usual GHCi features, though not generally "lifted" to work on the object program) |
2021-09-08 05:55:49 +0200 | forell | (~forell@user/forell) |
2021-09-08 05:55:53 +0200 | a6a45081-2b83 | (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507) (Remote host closed the connection) |
2021-09-08 05:56:59 +0200 | oxide | (~lambda@user/oxide) (Ping timeout: 265 seconds) |
2021-09-08 05:58:14 +0200 | oxide | (~lambda@user/oxide) |
2021-09-08 06:02:00 +0200 | myShoggoth | (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 260 seconds) |
2021-09-08 06:02:58 +0200 | neo1 | (~neo3@cpe-292712.ip.primehome.com) |
2021-09-08 06:07:06 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 06:10:18 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 06:10:32 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 06:11:26 +0200 | oxide | (~lambda@user/oxide) (Ping timeout: 252 seconds) |
2021-09-08 06:12:34 +0200 | shapr | (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 252 seconds) |
2021-09-08 06:13:28 +0200 | oxide | (~lambda@user/oxide) |
2021-09-08 06:13:48 +0200 | zebrag | (~chris@user/zebrag) (Quit: Konversation terminated!) |
2021-09-08 06:14:33 +0200 | vysn | (~vysn@user/vysn) |
2021-09-08 06:15:33 +0200 | slowButPresent | (~slowButPr@user/slowbutpresent) (Quit: leaving) |
2021-09-08 06:15:36 +0200 | lstor_ | (~lstor@user/lstor) (Remote host closed the connection) |
2021-09-08 06:20:38 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 06:20:51 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 06:20:51 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
2021-09-08 06:23:52 +0200 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-09-08 06:24:06 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 06:24:13 +0200 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-09-08 06:25:20 +0200 | neo1 | (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 260 seconds) |
2021-09-08 06:25:30 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 265 seconds) |
2021-09-08 06:26:13 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2021-09-08 06:30:41 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
2021-09-08 06:30:58 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 06:31:15 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 06:31:21 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
2021-09-08 06:31:35 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 06:33:39 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 06:33:52 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
2021-09-08 06:35:23 +0200 | <iqubic> | how does one use Data.Graph from containers? Why does each vertex need a node vaule and a key value? |
2021-09-08 06:36:06 +0200 | <iqubic> | Is this a Map like structure, except with some of the pieces of data are connected via edges? |
2021-09-08 06:36:13 +0200 | aarvar | (~aaron@2601:602:a080:fa0:18d6:e186:b364:ee0b) (Ping timeout: 252 seconds) |
2021-09-08 06:36:38 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) |
2021-09-08 06:37:09 +0200 | <iqubic> | And if I use "graphFromEdges :: Ord key => [(node, key, [key])] -> (Graph, Vertex -> (node, key, [key]), key -> Maybe Vertex)" will that create me a directed graph or an undirected graph? |
2021-09-08 06:38:10 +0200 | Everything | (~Everythin@37.115.210.35) |
2021-09-08 06:40:24 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-09-08 06:41:07 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
2021-09-08 06:47:08 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-09-08 06:47:09 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-09-08 06:47:09 +0200 | wroathe | (~wroathe@user/wroathe) |
2021-09-08 06:48:29 +0200 | <roboguy_> | iqubic: It looks like it uses an adjacency list representation for graphs |
2021-09-08 06:49:24 +0200 | <iqubic> | Yeah, that's fine, but will graphFromEdges give me a directed graph or not? |
2021-09-08 06:49:25 +0200 | <roboguy_> | also, regarding the type in general, it says that it represents a directed graph, so I imagine that function would construct a directed graph |
2021-09-08 06:49:25 +0200 | aarvar | (~aaron@2601:602:a080:fa0:83be:ab52:1765:c75c) |
2021-09-08 06:49:35 +0200 | <iqubic> | Alright, that's good to know. |
2021-09-08 06:50:26 +0200 | <iqubic> | So if I want all edges to be traversable in both directions, I need to add two entries per edge. That's fine. |
2021-09-08 06:52:05 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
2021-09-08 06:55:02 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 06:59:49 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
2021-09-08 07:03:05 +0200 | aman | (~aman@user/aman) |
2021-09-08 07:04:10 +0200 | jespada | (~jespada@90.254.245.194) (Ping timeout: 240 seconds) |
2021-09-08 07:06:10 +0200 | jespada | (~jespada@90.254.245.194) |
2021-09-08 07:08:05 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-09-08 07:09:50 +0200 | roboguy_ | (~roboguy_@cpe-98-156-4-161.kc.res.rr.com) () |
2021-09-08 07:09:57 +0200 | ubert | (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) |
2021-09-08 07:10:53 +0200 | awth13 | (~awth13@user/awth13) (Remote host closed the connection) |
2021-09-08 07:10:53 +0200 | ubert | (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) (Read error: Connection reset by peer) |
2021-09-08 07:11:05 +0200 | ubert | (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) |
2021-09-08 07:11:37 +0200 | ub | (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) |
2021-09-08 07:15:16 +0200 | acidjnk_new | (~acidjnk@p200300d0c7203092886436e542e4e0a8.dip0.t-ipconnect.de) |
2021-09-08 07:15:57 +0200 | falafel | (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) |
2021-09-08 07:17:37 +0200 | falafel | (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) (Client Quit) |
2021-09-08 07:18:34 +0200 | acidjnk | (~acidjnk@p200300d0c7203092886436e542e4e0a8.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2021-09-08 07:19:07 +0200 | falafel | (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) |
2021-09-08 07:20:16 +0200 | rekahsoft | (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
2021-09-08 07:22:33 +0200 | awth13 | (~awth13@user/awth13) |
2021-09-08 07:23:36 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-09-08 07:23:36 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-09-08 07:23:36 +0200 | wroathe | (~wroathe@user/wroathe) |
2021-09-08 07:26:33 +0200 | rekahsoft | (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Remote host closed the connection) |
2021-09-08 07:26:58 +0200 | rekahsoft | (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
2021-09-08 07:28:55 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
2021-09-08 07:32:42 +0200 | peterhil | (~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi) |
2021-09-08 07:32:48 +0200 | rekahsoft | (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Remote host closed the connection) |
2021-09-08 07:33:01 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2021-09-08 07:33:23 +0200 | rekahsoft | (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
2021-09-08 07:41:49 +0200 | mikoto-chan | (~mikoto-ch@83.137.2.243) |
2021-09-08 07:44:33 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2.1) |
2021-09-08 07:45:03 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
2021-09-08 07:45:52 +0200 | asivitz | (uid178348@id-178348.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
2021-09-08 07:47:09 +0200 | homarlone | (~homarlone@2804:14d:baa3:4341::1000) |
2021-09-08 07:49:22 +0200 | xff0x | (~xff0x@2001:1a81:527e:a000:8410:b7cd:5783:45ad) (Ping timeout: 252 seconds) |
2021-09-08 07:50:04 +0200 | xff0x | (~xff0x@2001:1a81:527e:a000:d157:28e0:13dd:1400) |
2021-09-08 07:51:01 +0200 | falafel | (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) (Ping timeout: 252 seconds) |
2021-09-08 07:51:32 +0200 | ub | (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) (Ping timeout: 265 seconds) |
2021-09-08 07:56:06 +0200 | michalz | (~michalz@185.246.204.41) |
2021-09-08 07:56:40 +0200 | john2312 | (~user@114.250.137.142) (Quit: ERC (IRC client for Emacs 26.3)) |
2021-09-08 07:57:04 +0200 | oxide | (~lambda@user/oxide) (Ping timeout: 252 seconds) |
2021-09-08 07:58:11 +0200 | nicbk | (~nicbk@user/nicbk) (Quit: nicbk) |
2021-09-08 07:59:52 +0200 | falafel | (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) |
2021-09-08 07:59:56 +0200 | <dsal> | ldlework: You should consider compiling with -Wall. You really want to have type definitions on all the toplevel declarations. Also, type aliases are useful for documenting intent and in a few other areas, but they often lead to regrets. Oh also, much of this code is partial, but doesn't have to be if you use NonEmpty lists for all the operations. |
2021-09-08 08:00:09 +0200 | <dsal> | Though lists are bad at most things. |
2021-09-08 08:00:22 +0200 | homarlone | (~homarlone@2804:14d:baa3:4341::1000) (Remote host closed the connection) |
2021-09-08 08:01:23 +0200 | <ldlework> | thanks for the feedback |
2021-09-08 08:03:51 +0200 | chele | (~chele@user/chele) |
2021-09-08 08:05:28 +0200 | <dsal> | `head` is partial function and this isn't actually any better, but you can grab the first character of that string and the string at the same time and then just let guards select a body. https://www.irccloud.com/pastebin/XnEuFSkH/guards.hs |
2021-09-08 08:05:47 +0200 | <dsal> | I have an irrational dislike of `if/then/else` though. |
2021-09-08 08:07:36 +0200 | <dsal> | Anyway, nothing actually terrible there. Just toplevel types because that's what makes life good. And maybe Seq or NonEmpty. Or… someone wrote a `Data.Sequence.NonEmpty`… |
2021-09-08 08:09:31 +0200 | <dsal> | @src otherwise |
2021-09-08 08:09:31 +0200 | <lambdabot> | otherwise = True |
2021-09-08 08:16:17 +0200 | mikoto-chan | (~mikoto-ch@83.137.2.243) (Ping timeout: 252 seconds) |
2021-09-08 08:19:06 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-09-08 08:24:30 +0200 | slavaqq | (~slavaqq@sdmail.sdserver.cz) |
2021-09-08 08:25:02 +0200 | <iqubic> | Man, using Data.Graph for Advent of Code 2017 Day 12 makes it super trivial. |
2021-09-08 08:25:09 +0200 | <iqubic> | https://adventofcode.com/2017/day/12 |
2021-09-08 08:25:28 +0200 | kenran | (~kenran@b2b-37-24-119-190.unitymedia.biz) |
2021-09-08 08:26:35 +0200 | <iqubic> | You are told the data will form a bidirectional graph. Part 1 is just "How many nodes are reachable from node 0?" Part 2 is just "How many disjoint groups exist in your given graph?" |
2021-09-08 08:27:45 +0200 | <iqubic> | This almost feels like cheating, because it's so easy. |
2021-09-08 08:28:01 +0200 | Akronymus | (~Akronymus@85.31.8.180) |
2021-09-08 08:33:20 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:81b7:59ef:d71d:f800) |
2021-09-08 08:34:43 +0200 | gehmehgeh | (~user@user/gehmehgeh) |
2021-09-08 08:35:41 +0200 | <c_wraith> | it's not like a transitive closure is hard anywayh |
2021-09-08 08:36:00 +0200 | <iqubic> | What does that mean? |
2021-09-08 08:36:24 +0200 | <iqubic> | c_wraith: Are you responding to my commentary on that problem? |
2021-09-08 08:36:49 +0200 | <c_wraith> | it's the graph algorithm for "compute all the sets that are reachable from each other" |
2021-09-08 08:37:08 +0200 | <c_wraith> | well. In an undirected graph that's what it does, anyway. |
2021-09-08 08:37:14 +0200 | <c_wraith> | It's like 1 line of code. |
2021-09-08 08:38:01 +0200 | <c_wraith> | ok, you probably put your base case on a second line. 2 lines. :) |
2021-09-08 08:38:30 +0200 | <iqubic> | Yeah. I know. I actually looked at how Data.Graph does it. |
2021-09-08 08:38:58 +0200 | <iqubic> | part 1 is just "\graph -> length (reachable graph 0)" |
2021-09-08 08:39:19 +0200 | <iqubic> | part 2 is just "\graph -> length (componenets graph)" |
2021-09-08 08:39:36 +0200 | <iqubic> | And then all you need to do is parse the input correctly. |
2021-09-08 08:40:17 +0200 | fendor | (~fendor@77.119.198.92.wireless.dyn.drei.com) |
2021-09-08 08:41:50 +0200 | <iqubic> | Where "reachable" and "components" come from Data.Graph |
2021-09-08 08:43:20 +0200 | jtomas | (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) |
2021-09-08 08:47:20 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:81b7:59ef:d71d:f800) (Quit: WeeChat 2.8) |
2021-09-08 08:47:53 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:81b7:59ef:d71d:f800) |
2021-09-08 08:48:36 +0200 | redderson | (~homereddy@79-76-28-67.dynamic.dsl.as9105.com) |
2021-09-08 08:49:46 +0200 | sander | (~sander@user/sander) (Ping timeout: 252 seconds) |
2021-09-08 08:50:48 +0200 | sander | (~sander@user/sander) |
2021-09-08 08:52:55 +0200 | rekahsoft | (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 265 seconds) |
2021-09-08 08:58:47 +0200 | dhouthoo | (~dhouthoo@178-117-36-167.access.telenet.be) |
2021-09-08 08:59:13 +0200 | falafel | (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) (Ping timeout: 252 seconds) |
2021-09-08 09:01:30 +0200 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2021-09-08 09:05:13 +0200 | cfricke | (~cfricke@user/cfricke) |
2021-09-08 09:05:33 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 09:07:12 +0200 | cjb | (~cjb@user/cjb) |
2021-09-08 09:10:10 +0200 | hiredman | (~hiredman@frontier1.downey.family) (Ping timeout: 240 seconds) |
2021-09-08 09:10:36 +0200 | zmt00 | (~zmt00@user/zmt00) |
2021-09-08 09:11:40 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:81b7:59ef:d71d:f800) (Quit: WeeChat 2.8) |
2021-09-08 09:13:06 +0200 | zmt01 | (~zmt00@user/zmt00) (Ping timeout: 256 seconds) |
2021-09-08 09:13:33 +0200 | zmt01 | (~zmt00@user/zmt00) |
2021-09-08 09:14:42 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 09:15:43 +0200 | zmt00 | (~zmt00@user/zmt00) (Ping timeout: 252 seconds) |
2021-09-08 09:17:02 +0200 | aman | (~aman@user/aman) (Quit: aman) |
2021-09-08 09:17:18 +0200 | cjb | (~cjb@user/cjb) (Quit: cjb) |
2021-09-08 09:17:43 +0200 | cjb | (~cjb@user/cjb) |
2021-09-08 09:19:30 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
2021-09-08 09:21:42 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 09:22:00 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 09:22:05 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
2021-09-08 09:22:18 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 09:22:52 +0200 | Gurkenglas | (~Gurkengla@dslb-002-207-014-195.002.207.pools.vodafone-ip.de) |
2021-09-08 09:23:08 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
2021-09-08 09:23:21 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 09:23:44 +0200 | kuribas | (~user@ptr-25vy0i94ndau7ucnb65.18120a2.ip6.access.telenet.be) |
2021-09-08 09:27:14 +0200 | hyiltiz | (~quassel@31.220.5.250) (Ping timeout: 265 seconds) |
2021-09-08 09:34:58 +0200 | Erutuon | (~Erutuon@user/erutuon) (Ping timeout: 252 seconds) |
2021-09-08 09:35:03 +0200 | <acidjnk_new> | omg it'd dibblego and koala_man! |
2021-09-08 09:38:57 +0200 | smitop | (~smitop@user/smitop) (Quit: Ping timeout (120 seconds)) |
2021-09-08 09:39:42 +0200 | smitop | (~smitop@user/smitop) |
2021-09-08 09:41:12 +0200 | <Hecate> | omg |
2021-09-08 09:41:19 +0200 | jmcantrell | (~jmcantrel@user/jmcantrell) () |
2021-09-08 09:42:31 +0200 | Jonno_FTW | (~come@user/jonno-ftw/x-0835346) (Ping timeout: 252 seconds) |
2021-09-08 09:43:02 +0200 | Jonno_FTW | (~come@api.carswap.me) |
2021-09-08 09:43:28 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 09:43:43 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 09:44:21 +0200 | <iqubic> | I'm not sure what that means. Heh. |
2021-09-08 09:44:50 +0200 | redderson | (~homereddy@79-76-28-67.dynamic.dsl.as9105.com) (Ping timeout: 260 seconds) |
2021-09-08 09:48:49 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 09:49:02 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 09:49:56 +0200 | Lycurgus | (~juan@98.4.112.204) |
2021-09-08 09:51:23 +0200 | max22- | (~maxime@2a01cb08833598002509ac2269711c4a.ipv6.abo.wanadoo.fr) |
2021-09-08 09:52:11 +0200 | zmt00 | (~zmt00@user/zmt00) |
2021-09-08 09:54:13 +0200 | zmt01 | (~zmt00@user/zmt00) (Ping timeout: 252 seconds) |
2021-09-08 09:54:36 +0200 | zer0bitz | (~zer0bitz@dsl-hkibng31-58c384-213.dhcp.inet.fi) |
2021-09-08 09:54:56 +0200 | kuribas | (~user@ptr-25vy0i94ndau7ucnb65.18120a2.ip6.access.telenet.be) (Remote host closed the connection) |
2021-09-08 09:55:13 +0200 | kuribas | (~user@ptr-25vy0i94ndau7ucnb65.18120a2.ip6.access.telenet.be) |
2021-09-08 09:57:08 +0200 | burnsidesLlama | (~burnsides@dhcp168-018.wadham.ox.ac.uk) |
2021-09-08 10:03:14 +0200 | <albet70> | how to do when I want more effects than two? |
2021-09-08 10:04:12 +0200 | <albet70> | still monad trans? |
2021-09-08 10:06:09 +0200 | hendursa1 | (~weechat@user/hendursaga) |
2021-09-08 10:08:20 +0200 | oxide | (~lambda@user/oxide) |
2021-09-08 10:09:36 +0200 | hendursaga | (~weechat@user/hendursaga) (Ping timeout: 276 seconds) |
2021-09-08 10:10:35 +0200 | <[exa]> | albet70: transformers will generally work until you hit some problems where 2 monads need to cast the side effects on each other |
2021-09-08 10:10:53 +0200 | mc47 | (~mc47@xmonad/TheMC47) |
2021-09-08 10:11:05 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
2021-09-08 10:11:34 +0200 | <[exa]> | (at that point you can either do a custom monad, spend a nice week or two with the advanced effect systems, or just layer the software better. :D ) |
2021-09-08 10:11:38 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
2021-09-08 10:13:38 +0200 | <albet70> | sorry I don't understand what "layer the software better " mean? my english isn't good |
2021-09-08 10:13:53 +0200 | amahl | (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) |
2021-09-08 10:14:07 +0200 | hyiltiz | (~quassel@31.220.5.250) |
2021-09-08 10:15:11 +0200 | <[exa]> | albet70: by that I meant basically "redesign", so that both monad transformers don't need to influence each other, keeping it nicely layered and unidirectional instead |
2021-09-08 10:15:54 +0200 | <albet70> | ok |
2021-09-08 10:16:21 +0200 | <[exa]> | anyway yeah the answer was "go with transformers until it grows too much, then probably write a custom monad" |
2021-09-08 10:17:45 +0200 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2021-09-08 10:17:45 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
2021-09-08 10:17:48 +0200 | allbery_b | geekosaur |
2021-09-08 10:18:30 +0200 | <albet70> | I haven't written a meaningful custom monad yet |
2021-09-08 10:18:45 +0200 | <albet70> | with multiple effects |
2021-09-08 10:19:14 +0200 | <kuribas> | I always write custom monads as a newtype on existing transformers. |
2021-09-08 10:19:21 +0200 | <kuribas> | Saves me from the plumbing. |
2021-09-08 10:19:57 +0200 | <kuribas> | And inspecting core shows me it's the same code anyway. |
2021-09-08 10:20:05 +0200 | <albet70> | could you share them? simple examples will be better |
2021-09-08 10:21:06 +0200 | <kuribas> | and recently I also started to do type MyInnerMonad = ..monadstack, then newtype MyMonad a = MyMonad (MyInnerMonad a) |
2021-09-08 10:21:16 +0200 | <merijn> | albet70: Something like: https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/src/Core.hs#L96-L99 |
2021-09-08 10:21:18 +0200 | <kuribas> | it makes it easier to write helpers for my monad. |
2021-09-08 10:21:35 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:81b7:59ef:d71d:f800) |
2021-09-08 10:21:56 +0200 | <kuribas> | albet70: https://hackage.haskell.org/package/hasqlator-mysql-0.0.8/docs/src/Database.MySQL.Hasqlator.Typed.… |
2021-09-08 10:23:00 +0200 | <kuribas> | albet70: also, I never derive MonadState, MonadReader, etc... I write my own functions to encapsulate them. |
2021-09-08 10:23:16 +0200 | <kuribas> | except MonadIO |
2021-09-08 10:23:36 +0200 | <kuribas> | because whatever state my stack is using, should be an implementation detail. |
2021-09-08 10:23:38 +0200 | <merijn> | ^^ that is the way |
2021-09-08 10:28:50 +0200 | cjb | (~cjb@user/cjb) (Quit: cjb) |
2021-09-08 10:29:31 +0200 | cjb | (~cjb@user/cjb) |
2021-09-08 10:31:25 +0200 | <Rembane> | kuribas: Are the derived transformers always available? |
2021-09-08 10:31:48 +0200 | <kuribas> | which derived transformers? |
2021-09-08 10:36:41 +0200 | <Rembane> | kuribas: I think I asked that question in the wrong way. You never derive MonadState et al, because you want the state of the stack to be an implementatoin detail, so how can someone else get to the state if e.g. MonadState is derived? |
2021-09-08 10:37:23 +0200 | <merijn> | Rembane: They can't, except through specific functions. That's the point |
2021-09-08 10:37:25 +0200 | <kuribas> | Rembane: they cannot, and should not. I'll have helper functions to get any state, if the business logic requires it. |
2021-09-08 10:37:40 +0200 | <merijn> | If you expose MonadState/MonadReader in your API, you're messing up |
2021-09-08 10:37:55 +0200 | <merijn> | The mtl classes are a terrible API and you should never expose them |
2021-09-08 10:38:17 +0200 | <Rembane> | merijn, kuribas: Got it! |
2021-09-08 10:38:24 +0200 | <kuribas> | Rembane: unless it's a library monad with an user defined internal stack. But in that case you need to write manual instances anyway. |
2021-09-08 10:38:45 +0200 | <kuribas> | Because the MonadState should target the user stack, not your stack. |
2021-09-08 10:38:53 +0200 | <merijn> | Rembane: The problem is you get people implementing MonadReader for Monad (or transformer) X and another for Y and now you can never combine the two ever |
2021-09-08 10:39:02 +0200 | <kuribas> | merijn: well, I find them ok for doing plumbing. |
2021-09-08 10:39:42 +0200 | <merijn> | mtl-style classes work well for exposing *specific* functionality that's unique within a program. The problem is that the mtl classes are too general to guarantee uniqueness |
2021-09-08 10:40:56 +0200 | <Rembane> | That sounds reasonable. |
2021-09-08 10:41:54 +0200 | <Hecate> | "yer mum's reasonable, Rembane" |
2021-09-08 10:41:59 +0200 | <Hecate> | (hello, good morning) |
2021-09-08 10:42:07 +0200 | <merijn> | Hecate: So's your face |
2021-09-08 10:42:25 +0200 | <Rembane> | Hecate: And your mum! :D |
2021-09-08 10:43:10 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
2021-09-08 10:43:26 +0200 | <merijn> | (I always read "yer" in a Scottish accent and if there's one thing I've learned in Scotland it is that "so's your face" is an appropriate retort to all remarks :p) |
2021-09-08 10:44:02 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-09-08 10:44:51 +0200 | <kuribas> | HecateyMcHcatyFace? |
2021-09-08 10:48:39 +0200 | <arahael> | Just finally looked at reflex-frp, I'd have to say that the "Comprehensive Reflex Documentation" really should be the first thing to look at. |
2021-09-08 10:49:11 +0200 | econo | (uid147250@user/econo) (Quit: Connection closed for inactivity) |
2021-09-08 10:51:41 +0200 | <Hecate> | merijn: that was absolutely the spirit :) |
2021-09-08 10:51:52 +0200 | <Hecate> | kuribas: :'D |
2021-09-08 10:56:03 +0200 | <merijn> | I should go to Scotland again...well, once we're done with all this covid nonsense >.> |
2021-09-08 10:56:11 +0200 | Akronymus | (~Akronymus@85.31.8.180) (Ping timeout: 256 seconds) |
2021-09-08 10:56:15 +0200 | <merijn> | So 5 years from now at the current rate >.> |
2021-09-08 10:56:27 +0200 | thyriaen | (~thyriaen@x4dbfb542.dyn.telefonica.de) |
2021-09-08 10:58:01 +0200 | amahl | (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Ping timeout: 252 seconds) |
2021-09-08 11:01:37 +0200 | GoodbyeVincent | (~GoodbyeVi@2a03:8600:1001:1337::2001) |
2021-09-08 11:01:44 +0200 | arahael | wants to visit scotland and check out his cousin's ancestry there. |
2021-09-08 11:01:53 +0200 | <arahael> | so much bloodthirsty history. |
2021-09-08 11:04:55 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:51c9:9325:5764:1e14) (Remote host closed the connection) |
2021-09-08 11:05:58 +0200 | <merijn> | arahael: And the Scotch Malt Whisky Society, while you're at it ;) |
2021-09-08 11:06:28 +0200 | <merijn> | Although that's probably more -offtopic material :p |
2021-09-08 11:08:33 +0200 | hnOsmium0001 | (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity) |
2021-09-08 11:10:40 +0200 | oxide | (~lambda@user/oxide) (Ping timeout: 252 seconds) |
2021-09-08 11:11:22 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
2021-09-08 11:11:34 +0200 | oxide | (~lambda@user/oxide) |
2021-09-08 11:17:15 +0200 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2021-09-08 11:20:47 +0200 | cjb | (~cjb@user/cjb) (Quit: cjb) |
2021-09-08 11:25:39 +0200 | hexfive | (~eric@50.35.83.177) |
2021-09-08 11:26:59 +0200 | slavaqq | (~slavaqq@sdmail.sdserver.cz) (Quit: Client closed) |
2021-09-08 11:27:59 +0200 | enoq | (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) |
2021-09-08 11:30:19 +0200 | hexfive | (~eric@50.35.83.177) (Client Quit) |
2021-09-08 11:33:23 +0200 | slep | (~slep@cpc150002-brnt4-2-0-cust437.4-2.cable.virginm.net) (Ping timeout: 265 seconds) |
2021-09-08 11:34:01 +0200 | amk | (~amk@109.255.169.126) (Remote host closed the connection) |
2021-09-08 11:36:49 +0200 | shriekingnoise | (~shrieking@186.137.144.80) (Quit: Quit) |
2021-09-08 11:37:50 +0200 | Guest59 | (~Guest59@108.109.220.111.sta.wbroadband.net.au) |
2021-09-08 11:38:45 +0200 | amk | (~amk@109.255.169.126) |
2021-09-08 11:39:08 +0200 | Guest59 | (~Guest59@108.109.220.111.sta.wbroadband.net.au) () |
2021-09-08 11:39:09 +0200 | Guest59 | (~Guest59@108.109.220.111.sta.wbroadband.net.au) |
2021-09-08 11:39:39 +0200 | mestre | (~mestre@191.177.175.57) (Quit: Lost terminal) |
2021-09-08 11:39:45 +0200 | Guest59 | (~Guest59@108.109.220.111.sta.wbroadband.net.au) () |
2021-09-08 11:41:38 +0200 | slep | (~slep@cpc150002-brnt4-2-0-cust437.4-2.cable.virginm.net) |
2021-09-08 11:42:01 +0200 | xff0x | (~xff0x@2001:1a81:527e:a000:d157:28e0:13dd:1400) (Ping timeout: 252 seconds) |
2021-09-08 11:42:57 +0200 | xff0x | (~xff0x@port-92-195-70-241.dynamic.as20676.net) |
2021-09-08 11:43:16 +0200 | GoodbyeVincent | (~GoodbyeVi@2a03:8600:1001:1337::2001) (Remote host closed the connection) |
2021-09-08 11:45:03 +0200 | amk | (~amk@109.255.169.126) (Remote host closed the connection) |
2021-09-08 11:45:10 +0200 | amk | (~amk@109.255.169.126) |
2021-09-08 11:45:36 +0200 | amk | (~amk@109.255.169.126) (Remote host closed the connection) |
2021-09-08 11:45:45 +0200 | amk | (~amk@109.255.169.126) |
2021-09-08 11:45:58 +0200 | amk | (~amk@109.255.169.126) (Remote host closed the connection) |
2021-09-08 11:46:06 +0200 | amk | (~amk@109.255.169.126) |
2021-09-08 11:57:05 +0200 | <tdammers> | merijn: we may be done with covid one day, but the nonsense is permanent |
2021-09-08 12:03:26 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-09-08 12:04:31 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 12:05:20 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
2021-09-08 12:07:54 +0200 | hololeap_ | (~hololeap@user/hololeap) (Ping timeout: 276 seconds) |
2021-09-08 12:07:56 +0200 | nattiestnate | (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) |
2021-09-08 12:09:37 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) (Ping timeout: 245 seconds) |
2021-09-08 12:10:07 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
2021-09-08 12:10:25 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 12:12:03 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds) |
2021-09-08 12:12:22 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-09-08 12:13:03 +0200 | <arahael> | And sadly predated covid. |
2021-09-08 12:13:26 +0200 | hololeap_ | (~hololeap@user/hololeap) |
2021-09-08 12:15:34 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-09-08 12:16:13 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 12:17:46 +0200 | aarvar | (~aaron@2601:602:a080:fa0:83be:ab52:1765:c75c) (Ping timeout: 252 seconds) |
2021-09-08 12:20:23 +0200 | glassy | (~glassy@user/glassy) |
2021-09-08 12:20:30 +0200 | <glassy> | hi |
2021-09-08 12:21:07 +0200 | <glassy> | is ARM better suited for functional (lazy?) languages with weak memory ordering? |
2021-09-08 12:21:25 +0200 | <glassy> | compared to x86 |
2021-09-08 12:21:45 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2021-09-08 12:22:22 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 12:23:26 +0200 | <glassy> | just because a functional compiler i think would have more liberty to put memory stores wherever it wants as the steps do not need to be executed imperatively |
2021-09-08 12:23:30 +0200 | azeem | (~azeem@2a00:801:23f:d6b0:3dc9:5843:deaf:1727) (Ping timeout: 256 seconds) |
2021-09-08 12:24:09 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 12:24:10 +0200 | azeem | (~azeem@2a00:801:23f:d6b0:3dc9:5843:deaf:1727) |
2021-09-08 12:24:24 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 12:24:30 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
2021-09-08 12:24:45 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 12:24:51 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
2021-09-08 12:25:12 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 12:25:25 +0200 | <maerwald> | I think we just got a native code generator for ARM and I'd be surprised if it outperforms x86 |
2021-09-08 12:29:14 +0200 | <glassy> | it is new and ARM isn't that popular though |
2021-09-08 12:29:18 +0200 | <glassy> | i just meant theoretically |
2021-09-08 12:29:25 +0200 | <gehmehgeh> | do you mean x86 or "amd64"? |
2021-09-08 12:29:30 +0200 | <glassy> | amd64 |
2021-09-08 12:29:32 +0200 | <gehmehgeh> | k |
2021-09-08 12:29:35 +0200 | <glassy> | my bad |
2021-09-08 12:32:21 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
2021-09-08 12:33:41 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 12:38:19 +0200 | nattiestnate | (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) (Quit: WeeChat 3.2) |
2021-09-08 12:39:13 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-09-08 12:39:31 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 12:44:43 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-09-08 12:45:40 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 12:54:34 +0200 | Morrow | (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 240 seconds) |
2021-09-08 12:56:31 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
2021-09-08 12:57:38 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 13:00:57 +0200 | pavonia | (~user@user/siracusa) |
2021-09-08 13:00:58 +0200 | alx741 | (~alx741@181.196.68.218) |
2021-09-08 13:10:06 +0200 | AlexNoo_ | (~AlexNoo@178.34.161.122) |
2021-09-08 13:11:40 +0200 | AlexZenon | (~alzenon@178.34.151.45) (Ping timeout: 240 seconds) |
2021-09-08 13:13:22 +0200 | Alex_test | (~al_test@178.34.151.45) (Ping timeout: 256 seconds) |
2021-09-08 13:13:22 +0200 | polyphem | (~polyphem@2a02:810d:640:776c:1bc:e34d:641e:231a) |
2021-09-08 13:13:50 +0200 | AlexNoo | (~AlexNoo@178.34.151.45) (Ping timeout: 252 seconds) |
2021-09-08 13:14:22 +0200 | hiredman | (~hiredman@frontier1.downey.family) |
2021-09-08 13:14:38 +0200 | <kuribas> | How do I print a utf8 bytestring? |
2021-09-08 13:14:44 +0200 | <kuribas> | Or do I need to convert to Text first? |
2021-09-08 13:15:18 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 13:15:32 +0200 | AlexZenon | (~alzenon@178.34.161.122) |
2021-09-08 13:15:35 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 13:16:08 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 13:17:23 +0200 | Alex_test | (~al_test@178.34.161.122) |
2021-09-08 13:17:56 +0200 | <hololeap_> | kuribas: you can just do Data.ByteString.putStr and the console should be able to handle it |
2021-09-08 13:18:01 +0200 | <merijn> | That's a category error |
2021-09-08 13:18:06 +0200 | hololeap_ | hololeap |
2021-09-08 13:18:14 +0200 | <merijn> | hololeap: That is...pretty terrible advice |
2021-09-08 13:18:35 +0200 | <hololeap> | is it false? |
2021-09-08 13:18:41 +0200 | <kuribas> | hololeap: yes |
2021-09-08 13:18:52 +0200 | <merijn> | hololeap: It depends on the locale configured for the console |
2021-09-08 13:19:05 +0200 | <kuribas> | at outputs ASCII |
2021-09-08 13:19:19 +0200 | <merijn> | The fact that you have mostly encountered consoles with utf-8 locales is a coincidence |
2021-09-08 13:19:34 +0200 | <merijn> | I wouldn't be surprised if asian locales did not default to utf-8 |
2021-09-08 13:19:58 +0200 | <merijn> | What you *should* do is check the configured locale and then convert based on that. Which is what text/string do in GHC |
2021-09-08 13:20:02 +0200 | <[exa]> | +1, utf-16 is pretty common |
2021-09-08 13:20:26 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
2021-09-08 13:20:33 +0200 | <merijn> | kuribas: The least headache, most correct way is to convert to Text and output that, yes |
2021-09-08 13:21:36 +0200 | <hololeap> | so, Text.putStr will do proper encoding depending on the locale of the console? |
2021-09-08 13:21:40 +0200 | <merijn> | Yes |
2021-09-08 13:21:47 +0200 | <hololeap> | ok, TIL |
2021-09-08 13:22:13 +0200 | <merijn> | Well, the locale specified in the environment variables. But unless you manually fucked it up, your console should set those correctly |
2021-09-08 13:23:11 +0200 | <merijn> | The odds of you printing so much text that copying it to convert to Text is problematic seems...unlikely and niche enough to postpone worrying about it until it's proven to be a problem :) |
2021-09-08 13:23:45 +0200 | <arahael> | ShiftJIS is also still used, I believe. |
2021-09-08 13:24:31 +0200 | <merijn> | kuribas: Decoding to text will also let you manually specify how to handle errors if you get incorrect utf8 |
2021-09-08 13:25:11 +0200 | <kuribas> | merijn: this comes from Aeson, but I found encodeToLazyText can encode directly to Text. |
2021-09-08 13:25:53 +0200 | akegalj | (~akegalj@89-172-127-119.adsl.net.t-com.hr) |
2021-09-08 13:25:58 +0200 | fendor_ | (~fendor@178.165.191.44.wireless.dyn.drei.com) |
2021-09-08 13:28:41 +0200 | fendor | (~fendor@77.119.198.92.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
2021-09-08 13:30:11 +0200 | ArctVaulMarsHMPJ | (~pjetcetal@2.95.102.85) (Quit: EXIT) |
2021-09-08 13:32:37 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-09-08 13:32:47 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2021-09-08 13:37:51 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
2021-09-08 13:38:10 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds) |
2021-09-08 13:38:33 +0200 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) |
2021-09-08 13:39:59 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-09-08 13:40:32 +0200 | sudden | (~cat@h-98-128-128-173.A351.priv.bahnhof.se) (Ping timeout: 250 seconds) |
2021-09-08 13:40:41 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 13:40:47 +0200 | sudden | (~cat@h-98-128-128-173.A351.priv.bahnhof.se) |
2021-09-08 13:40:55 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 13:42:53 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-09-08 13:45:47 +0200 | jakalx | (~jakalx@base.jakalx.net) () |
2021-09-08 13:45:51 +0200 | jakalx | (~jakalx@base.jakalx.net) |
2021-09-08 13:53:55 +0200 | max22- | (~maxime@2a01cb08833598002509ac2269711c4a.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds) |
2021-09-08 13:57:21 +0200 | vysn | (~vysn@user/vysn) (Quit: WeeChat 3.2) |
2021-09-08 13:57:37 +0200 | vysn | (~vysn@user/vysn) |
2021-09-08 13:59:02 +0200 | Unhammer | (~Unhammer@user/unhammer) |
2021-09-08 14:00:27 +0200 | infinity0 | (~infinity0@occupy.ecodis.net) (Ping timeout: 245 seconds) |
2021-09-08 14:00:56 +0200 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-09-08 14:01:37 +0200 | infinity0 | (~infinity0@occupy.ecodis.net) |
2021-09-08 14:04:16 +0200 | fryguybob | (~fryguybob@cpe-74-65-17-248.rochester.res.rr.com) (Remote host closed the connection) |
2021-09-08 14:04:49 +0200 | glassy | (~glassy@user/glassy) (Quit: Client closed) |
2021-09-08 14:05:21 +0200 | andre | (~andre@41.76.35.141) |
2021-09-08 14:06:35 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.2) |
2021-09-08 14:07:12 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
2021-09-08 14:07:49 +0200 | <Axman6> | On a related note, utf8 Text is so close! |
2021-09-08 14:08:36 +0200 | alx741 | (~alx741@181.196.68.218) (Quit: alx741) |
2021-09-08 14:10:54 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-09-08 14:10:55 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer) |
2021-09-08 14:11:42 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) (Ping timeout: 245 seconds) |
2021-09-08 14:12:01 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-09-08 14:12:31 +0200 | <tdammers> | I wonder if I'm the only one in the Haskell world who has absolutely no feelings either way about utf8-Text |
2021-09-08 14:13:59 +0200 | <hpc> | https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fmedia.giphy.com%2Fmedia%2F10j1ZRgKdcHIo… |
2021-09-08 14:16:05 +0200 | <lortabac> | tdammers: I don't care about which encoding is used in the implementation, but apparently there are performance improvements with UTF8 Text |
2021-09-08 14:16:17 +0200 | <merijn> | tdammers: I don't either |
2021-09-08 14:19:01 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-09-08 14:19:34 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 14:24:07 +0200 | <Cale> | It'll probably make the jank we end up doing to hack the text package under GHCJS to use Javascript strings directly a good deal simpler. |
2021-09-08 14:25:13 +0200 | <Cale> | (otoh, it'll also probably need to be redone...) |
2021-09-08 14:29:44 +0200 | gentauro | (~gentauro@user/gentauro) (Ping timeout: 252 seconds) |
2021-09-08 14:33:28 +0200 | enikar | (~enikar@user/enikar) (Quit: WeeChat 2.8) |
2021-09-08 14:35:29 +0200 | gentauro | (~gentauro@user/gentauro) |
2021-09-08 14:36:32 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Read error: Connection reset by peer) |
2021-09-08 14:36:59 +0200 | amahl | (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) |
2021-09-08 14:40:19 +0200 | luc03 | (~a@p200300ef970830a990422b88d9bc8098.dip0.t-ipconnect.de) |
2021-09-08 14:41:01 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 14:41:14 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 14:42:19 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-09-08 14:44:05 +0200 | kuribas | (~user@ptr-25vy0i94ndau7ucnb65.18120a2.ip6.access.telenet.be) (Ping timeout: 260 seconds) |
2021-09-08 14:45:05 +0200 | burnsidesLlama | (~burnsides@dhcp168-018.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-09-08 14:52:38 +0200 | Akronymus | (~Akronymus@85.31.8.180) |
2021-09-08 14:52:46 +0200 | ec_ | (~ec@gateway/tor-sasl/ec) |
2021-09-08 14:53:12 +0200 | lavaman | (~lavaman@98.38.249.169) (Read error: Connection reset by peer) |
2021-09-08 14:53:41 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 14:56:08 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
2021-09-08 14:56:26 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-09-08 14:56:41 +0200 | Pickchea | (~private@user/pickchea) |
2021-09-08 14:56:52 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
2021-09-08 15:03:30 +0200 | <arahael> | i dont understand how recursive do is evaluated. |
2021-09-08 15:04:16 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 15:04:27 +0200 | <arahael> | reading this a bit before bed: https://www.schoolofhaskell.com/school/to-infinity-and-beyond/pick-of-the-week/guide-to-ghc-extens… |
2021-09-08 15:06:01 +0200 | <arahael> | eh, |
2021-09-08 15:06:17 +0200 | <arahael> | perhaps i should read it in the new day. |
2021-09-08 15:07:41 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
2021-09-08 15:08:13 +0200 | MQ-17J | (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) |
2021-09-08 15:08:47 +0200 | sleblanc | (~sleblanc@user/sleblanc) |
2021-09-08 15:09:10 +0200 | vysn | (~vysn@user/vysn) (Ping timeout: 260 seconds) |
2021-09-08 15:09:20 +0200 | <shachaf> | arahael: I think I learned it from https://leventerkok.github.io/papers/erkok-thesis.pdf which was pretty readable if I remember correctly. |
2021-09-08 15:09:22 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-09-08 15:10:19 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 15:12:02 +0200 | <arahael> | shachaf: at a glance that looks pretty good, thanks! |
2021-09-08 15:13:12 +0200 | AlexNoo_ | AlexNoo |
2021-09-08 15:13:18 +0200 | cheater | (~Username@user/cheater) (Ping timeout: 265 seconds) |
2021-09-08 15:15:25 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-09-08 15:16:40 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 15:17:23 +0200 | phma | (~phma@host-67-44-209-108.hnremote.net) (Read error: Connection reset by peer) |
2021-09-08 15:19:07 +0200 | phma | (~phma@host-67-44-209-91.hnremote.net) |
2021-09-08 15:19:35 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
2021-09-08 15:22:01 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-09-08 15:22:43 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 15:26:05 +0200 | shapr | (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
2021-09-08 15:27:31 +0200 | sleblanc | (~sleblanc@user/sleblanc) (Ping timeout: 252 seconds) |
2021-09-08 15:29:40 +0200 | andre | (~andre@41.76.35.141) (Quit: WeeChat 3.2) |
2021-09-08 15:33:05 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2021-09-08 15:33:23 +0200 | jlamothe | (~jlamothe@104.158.48.100) (Quit: leaving) |
2021-09-08 15:34:39 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 15:36:25 +0200 | hendursa1 | (~weechat@user/hendursaga) (Quit: hendursa1) |
2021-09-08 15:38:29 +0200 | hendursaga | (~weechat@user/hendursaga) |
2021-09-08 15:38:53 +0200 | cheater | (~Username@user/cheater) |
2021-09-08 15:39:45 +0200 | Akronymus | (~Akronymus@85.31.8.180) (Quit: Client closed) |
2021-09-08 15:39:58 +0200 | infinity0 | (~infinity0@occupy.ecodis.net) (Remote host closed the connection) |
2021-09-08 15:39:58 +0200 | Akronymus | (~Akronymus@85.31.8.180) |
2021-09-08 15:41:19 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-09-08 15:41:20 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-09-08 15:41:20 +0200 | wroathe | (~wroathe@user/wroathe) |
2021-09-08 15:42:27 +0200 | shriekingnoise | (~shrieking@186.137.144.80) |
2021-09-08 15:42:54 +0200 | pleroma_ | (~pleroma@182.70.231.150) |
2021-09-08 15:46:16 +0200 | TranquilEcho | (~grom@user/tranquilecho) |
2021-09-08 15:49:32 +0200 | aman | (~aman@user/aman) |
2021-09-08 15:49:37 +0200 | jonathanx | (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
2021-09-08 15:53:26 +0200 | jonathanx | (~jonathan@dyn-8-sc.cdg.chalmers.se) |
2021-09-08 15:53:40 +0200 | max22- | (~maxime@2a01cb08833598003176d874852ce483.ipv6.abo.wanadoo.fr) |
2021-09-08 15:54:45 +0200 | MQ-17J | (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) (Read error: Connection reset by peer) |
2021-09-08 15:55:04 +0200 | MQ-17J | (~MQ-17J@35.50.7.10) |
2021-09-08 15:55:15 +0200 | dsrt^ | (~dsrt@68.101.54.227) (Ping timeout: 260 seconds) |
2021-09-08 15:56:27 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2021-09-08 15:59:36 +0200 | ec_ | (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
2021-09-08 16:00:44 +0200 | tinhatcat | (~manjaro-g@2620:103:a000:2201:8e4c:af6a:e11c:11a1) |
2021-09-08 16:04:55 +0200 | thyriaen | (~thyriaen@x4dbfb542.dyn.telefonica.de) (Quit: Leaving) |
2021-09-08 16:05:50 +0200 | burnsidesLlama | (~burnsides@dhcp168-018.wadham.ox.ac.uk) |
2021-09-08 16:06:21 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 16:06:34 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 16:06:35 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
2021-09-08 16:06:46 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 16:06:49 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
2021-09-08 16:07:03 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 16:07:09 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
2021-09-08 16:07:22 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 16:08:42 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
2021-09-08 16:12:35 +0200 | burnsidesLlama | (~burnsides@dhcp168-018.wadham.ox.ac.uk) (Ping timeout: 252 seconds) |
2021-09-08 16:13:10 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) (Ping timeout: 252 seconds) |
2021-09-08 16:13:18 +0200 | aman | (~aman@user/aman) (Quit: aman) |
2021-09-08 16:17:23 +0200 | justsomeguy | (~justsomeg@user/justsomeguy) |
2021-09-08 16:17:29 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 16:17:42 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 16:21:32 +0200 | enoq | (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq) |
2021-09-08 16:23:32 +0200 | nvmd | (~nvmd@user/nvmd) (Quit: Later, nerds.) |
2021-09-08 16:25:19 +0200 | acidjnk_new3 | (~acidjnk@p200300d0c7203089886436e542e4e0a8.dip0.t-ipconnect.de) |
2021-09-08 16:25:49 +0200 | gentauro | (~gentauro@user/gentauro) (Ping timeout: 252 seconds) |
2021-09-08 16:28:34 +0200 | acidjnk_new | (~acidjnk@p200300d0c7203092886436e542e4e0a8.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2021-09-08 16:30:00 +0200 | <kritzefitz> | Wow. I just had to document some perl code in POD. I never even realized how good haddock is in comparison. |
2021-09-08 16:33:10 +0200 | justsomeguy | (~justsomeg@user/justsomeguy) (Ping timeout: 260 seconds) |
2021-09-08 16:33:14 +0200 | slowButPresent | (~slowButPr@user/slowbutpresent) |
2021-09-08 16:35:10 +0200 | akegalj | (~akegalj@89-172-127-119.adsl.net.t-com.hr) (Ping timeout: 252 seconds) |
2021-09-08 16:36:49 +0200 | gentauro | (~gentauro@user/gentauro) |
2021-09-08 16:38:45 +0200 | <merijn> | kritzefitz: Haskell tools are as bad as everyone claims...until you try and use comparable tools in other languages #ChangeMyMind :p |
2021-09-08 16:42:21 +0200 | jlamothe | (~jlamothe@104.158.48.100) |
2021-09-08 16:42:59 +0200 | neo1 | (~neo3@cpe-292712.ip.primehome.com) |
2021-09-08 16:45:02 +0200 | cfricke | (~cfricke@user/cfricke) (Quit: WeeChat 3.2) |
2021-09-08 16:45:27 +0200 | aman | (~aman@user/aman) |
2021-09-08 16:45:28 +0200 | dyeplexer | (~dyeplexer@user/dyeplexer) |
2021-09-08 16:47:09 +0200 | <tdammers> | dependency hell is real in all language ecosystems; you just get different symptoms |
2021-09-08 16:47:50 +0200 | kenran | (~kenran@b2b-37-24-119-190.unitymedia.biz) (Quit: WeeChat info:version) |
2021-09-08 16:50:37 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) |
2021-09-08 16:52:24 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
2021-09-08 16:54:36 +0200 | Guest|67 | (~Guest|67@fs226-222.bard.edu) |
2021-09-08 16:55:31 +0200 | bontaq | (~user@ool-45779fe5.dyn.optonline.net) |
2021-09-08 16:57:02 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Quit: Leaving) |
2021-09-08 17:02:16 +0200 | myShoggoth | (~myShoggot@97-120-70-214.ptld.qwest.net) |
2021-09-08 17:03:32 +0200 | dajoer | (~david@user/gvx) (Quit: leaving) |
2021-09-08 17:05:55 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 265 seconds) |
2021-09-08 17:08:19 +0200 | jumper149 | (~jumper149@80.240.31.34) |
2021-09-08 17:09:23 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
2021-09-08 17:10:20 +0200 | xff0x | (~xff0x@port-92-195-70-241.dynamic.as20676.net) (Ping timeout: 252 seconds) |
2021-09-08 17:10:34 +0200 | pleroma_ | (~pleroma@182.70.231.150) (Quit: leaving) |
2021-09-08 17:12:51 +0200 | Akronymus | (~Akronymus@85.31.8.180) (Quit: workday is over.) |
2021-09-08 17:14:44 +0200 | hnOsmium0001 | (uid453710@id-453710.stonehaven.irccloud.com) |
2021-09-08 17:15:38 +0200 | xff0x | (~xff0x@2001:1a81:527e:a000:2ce2:bb46:8710:1c2a) |
2021-09-08 17:15:43 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:81b7:59ef:d71d:f800) (Quit: WeeChat 2.8) |
2021-09-08 17:23:36 +0200 | slack1256 | (~slack1256@12.0.89.245) |
2021-09-08 17:24:40 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Read error: Connection reset by peer) |
2021-09-08 17:26:55 +0200 | <slack1256> | On a imaginary dependent haskell, would there be a need for DataKinds ? |
2021-09-08 17:28:07 +0200 | MQ-17J | (~MQ-17J@35.50.7.10) (Read error: Connection reset by peer) |
2021-09-08 17:30:08 +0200 | <dminuoso> | Why are you asking whether there'd be need for a concrete specific extension in a completely unspecified imaginary language? |
2021-09-08 17:30:14 +0200 | <dminuoso> | The question doesn't seem to make sense |
2021-09-08 17:30:40 +0200 | justsomeguy | (~justsomeg@user/justsomeguy) |
2021-09-08 17:30:42 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-09-08 17:31:12 +0200 | vysn | (~vysn@user/vysn) |
2021-09-08 17:32:39 +0200 | <monochrom> | arahael: https://wiki.haskell.org/MonadFix desugars recursive-do to mfix. This reduces the question to: what does mfix do, and how, for each specific instance. |
2021-09-08 17:33:05 +0200 | <merijn> | slack1256: Nope |
2021-09-08 17:33:15 +0200 | <merijn> | slack1256: But dependent haskell is gonna be a mess, imo |
2021-09-08 17:33:27 +0200 | <merijn> | slack1256: If you're curious about this stuff, I'd highly recommend looking into idriss |
2021-09-08 17:34:15 +0200 | <monochrom> | Oh, Erkok's thesis is even better about mfix. But it predates do-rec. At that time we had at most mdo. |
2021-09-08 17:36:11 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2021-09-08 17:39:34 +0200 | MQ-17J | (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) |
2021-09-08 17:41:44 +0200 | <slack1256> | dminuoso: Well it's not that unspecified if Richards' ghc proposal are anything to go by. And sure, we can imagine worlds that don't actually exists, we have imagination. I just want to know if DataKinds would be redudant on that dependent version of haskell. |
2021-09-08 17:42:35 +0200 | fresheyeball | (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) |
2021-09-08 17:43:05 +0200 | <slack1256> | merijn: Gotcha, I think that will answer my doubts more throughly than anything I could ask. |
2021-09-08 17:43:13 +0200 | <maerwald> | slack1256: that's not even the actual DH proposal |
2021-09-08 17:45:11 +0200 | <slack1256> | https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0378-dependent-type-design.rst |
2021-09-08 17:45:29 +0200 | <slack1256> | I should have posted it sooner, sorry. |
2021-09-08 17:45:55 +0200 | <maerwald> | Yeah, it's more of a sketch |
2021-09-08 17:46:41 +0200 | <maerwald> | ""Do we want to have dependent types in GHC?" front and center. This proposal does just that, by putting forward a design sketch for what dependent types might look like in GHC." |
2021-09-08 17:46:51 +0200 | <maerwald> | "might look like" |
2021-09-08 17:47:02 +0200 | pzanco | (~pzanco@2804:14c:3ba1:42d:2204:fff:feff:44a0) |
2021-09-08 17:47:12 +0200 | <maerwald> | so this is an incremental effort |
2021-09-08 17:47:24 +0200 | <maerwald> | it's not an actual proposal for actual DT in GHC |
2021-09-08 17:47:33 +0200 | <slack1256> | Got it. |
2021-09-08 17:47:43 +0200 | hendursaga | (~weechat@user/hendursaga) (Remote host closed the connection) |
2021-09-08 17:48:07 +0200 | hendursaga | (~weechat@user/hendursaga) |
2021-09-08 17:49:01 +0200 | ub | (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) |
2021-09-08 17:49:09 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
2021-09-08 17:49:59 +0200 | vaibhavsagar[m] | (~vaibhavsa@2001:470:69fc:105::ffe) |
2021-09-08 17:50:01 +0200 | <slack1256> | merijn: By the way, do you know if it "doable" to integrate idris2 on certain parts of a haskell program? No IPC, but maybe a program/TH to translate between types of the two languages? |
2021-09-08 17:50:25 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
2021-09-08 17:50:54 +0200 | <merijn> | slack1256: no clue, more of a question for #idris? :p |
2021-09-08 17:51:18 +0200 | <merijn> | slack1256: On the bright side, most Idris docs are explicitly written for people coming from Haskell, so should be easy enough to get into :p |
2021-09-08 17:52:40 +0200 | <dminuoso> | slack1256: That wouldn't be imaginary, then. If you're wondering whether the current path of GHC would make DataKinds redundant, then yes. |
2021-09-08 17:52:43 +0200 | ubert | (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
2021-09-08 17:52:43 +0200 | ub | ubert |
2021-09-08 17:53:15 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 17:57:07 +0200 | cheater | (~Username@user/cheater) (Ping timeout: 252 seconds) |
2021-09-08 17:57:44 +0200 | <slack1256> | Maybe a more explicit framework would have helped from my part and a more caritative interpretation from yours would have been better. |
2021-09-08 17:58:03 +0200 | ubert1 | (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) |
2021-09-08 18:00:59 +0200 | ec_ | (~ec@gateway/tor-sasl/ec) |
2021-09-08 18:04:10 +0200 | bontaq | (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 260 seconds) |
2021-09-08 18:04:30 +0200 | fresheyeball | (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9) |
2021-09-08 18:04:38 +0200 | supersven | (sid501114@id-501114.ilkley.irccloud.com) (Ping timeout: 256 seconds) |
2021-09-08 18:05:00 +0200 | supersven | (sid501114@id-501114.ilkley.irccloud.com) |
2021-09-08 18:11:30 +0200 | MQ-17J | (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) (Read error: Connection reset by peer) |
2021-09-08 18:12:40 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-09-08 18:18:38 +0200 | cheater | (~Username@user/cheater) |
2021-09-08 18:22:12 +0200 | k`` | (~user@152.1.137.158) |
2021-09-08 18:22:57 +0200 | Pickchea | (~private@user/pickchea) (Remote host closed the connection) |
2021-09-08 18:23:18 +0200 | <k``> | Is there a way to bundle a constructor with a type alias like one can bundle a pattern synonym with a data type? |
2021-09-08 18:24:45 +0200 | <dminuoso> | "bundle"? |
2021-09-08 18:26:51 +0200 | <k``> | I've had to reorder the type parameters of a data type to write the right class instances. Now I want to export the original type as an alias with the original parameter order (for people who write type signatures), and export the alias with the constructors (for people who explicitly import `Type(..)` rather than just importing the whole module). |
2021-09-08 18:27:22 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2021-09-08 18:27:45 +0200 | <k``> | It's possible to bundle patterns with a type constructor using `TypeConstructor(pattern Pattern)` |
2021-09-08 18:28:07 +0200 | justsomeguy | (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2) |
2021-09-08 18:28:44 +0200 | <k``> | I'm wondering whether there's a way to bundle the constructor functions with the type alias in a similar way (e.g. `Alias(pattern Constructor)` ) |
2021-09-08 18:29:10 +0200 | Eoco | (~ian@x-160-94-179-157.acm.umn.edu) (Ping timeout: 240 seconds) |
2021-09-08 18:29:12 +0200 | _ht | (~quassel@82-169-194-8.biz.kpn.net) |
2021-09-08 18:29:35 +0200 | <dsal> | k``: are you sure you want a type alias? |
2021-09-08 18:29:48 +0200 | <k``> | As it stands, folks will be fine with the change as long as they haven't explicitly imported the data type. But I don't want to screw someone over just because they used an explicit import! |
2021-09-08 18:30:42 +0200 | <k``> | dsal: Yes. Does it seem like there's something else I should do? |
2021-09-08 18:31:39 +0200 | <dsal> | Probably a newtype. Type aliases aren't useful for much more than documentation. And just like documentation, I tend to ignore them and have quite bad results. |
2021-09-08 18:33:09 +0200 | <k``> | Making a newtype would be way more disruptive. Rather than just messing with folks who use explicit imports (likely very few), it would mess with absolutely everyone. |
2021-09-08 18:33:19 +0200 | pzanco | (~pzanco@2804:14c:3ba1:42d:2204:fff:feff:44a0) (Quit: Leaving) |
2021-09-08 18:33:23 +0200 | kuribas | (~user@ptr-25vy0i9dsqr9crcldit.18120a2.ip6.access.telenet.be) |
2021-09-08 18:33:24 +0200 | zebrag | (~chris@user/zebrag) |
2021-09-08 18:33:48 +0200 | <luc03> | I want to write a function `readEither :: forall a. Read a => String -> Either String a` that works like readMaybe but says what went wrong. I could write `case readMaybe @a myString of; Nothing -> Left "Parse error"; Just x -> Right x` but this is useless because just like readMaybe it does not give a useful error message. |
2021-09-08 18:33:49 +0200 | <luc03> | I would like to have an error message like "Impossible to parse a Bool from String \"foo\"" if I write `readEither @Bool "foo"`. |
2021-09-08 18:33:51 +0200 | <luc03> | But now I need to know what type @a is and I need its name as a String. |
2021-09-08 18:33:53 +0200 | <luc03> | Is it possible to write this function? |
2021-09-08 18:34:14 +0200 | <k``> | The order of the type parameters is irrelevant except for the definition of class instances as long as nobody is writing orphan instances. |
2021-09-08 18:35:53 +0200 | wonko | (~wjc@62.115.229.50) |
2021-09-08 18:37:52 +0200 | __monty__ | (~toonn@user/toonn) |
2021-09-08 18:38:15 +0200 | <pavonia> | luc03: Not in general, as Show doesn't provide context about a type. You could add another constraint that gives that information, e.g. Typeable |
2021-09-08 18:38:43 +0200 | slack1256 | (~slack1256@12.0.89.245) (Ping timeout: 265 seconds) |
2021-09-08 18:39:24 +0200 | <luc03> | pavonia: Something like readEither :: (Read a, Typeable a) => ... ? |
2021-09-08 18:39:32 +0200 | <pavonia> | Yes |
2021-09-08 18:40:01 +0200 | <k``> | luc03: I don't know if there's a way to show the type that you're trying to parse, but it seems like the simplest thing is to append the string you're trying to parse to the failure message. Could specifically extract the point of failure using the `ReadPrec` machinery. |
2021-09-08 18:41:57 +0200 | <tomsmeding> | % :m +Data.Typeable +Text.Read |
2021-09-08 18:41:57 +0200 | <yahb> | tomsmeding: syntax: :module [+/-] [*]M1 ... [*]Mn |
2021-09-08 18:42:07 +0200 | <tomsmeding> | % import Data.Typeable |
2021-09-08 18:42:07 +0200 | <yahb> | tomsmeding: |
2021-09-08 18:42:11 +0200 | <tomsmeding> | % import Text.Read |
2021-09-08 18:42:11 +0200 | <yahb> | tomsmeding: |
2021-09-08 18:42:16 +0200 | <tomsmeding> | % :set -XScopedTypeVariables |
2021-09-08 18:42:16 +0200 | <yahb> | tomsmeding: |
2021-09-08 18:42:17 +0200 | Erutuon | (~Erutuon@user/erutuon) |
2021-09-08 18:42:22 +0200 | <tomsmeding> | % readEither :: forall a. (Typeable a, Read a) => String -> Either String a ; readEither str = case readMaybe str of Just res -> Right res ; r@Nothing -> Left ("Cannot parse " ++ show (typeRep (Proxy :: Proxy a)) ++ " from " ++ show str) |
2021-09-08 18:42:22 +0200 | <yahb> | tomsmeding: |
2021-09-08 18:42:29 +0200 | <luc03> | pavonia: So this Typeable type class makes it possible to get some value level information about a type that has been applied using -XTypeApplications? |
2021-09-08 18:42:31 +0200 | <tomsmeding> | % readEither "a42" :: Either String Int |
2021-09-08 18:42:31 +0200 | <yahb> | tomsmeding: Left "Cannot parse Int from \"a42\"" |
2021-09-08 18:42:42 +0200 | <tomsmeding> | see https://hackage.haskell.org/package/base-4.14.1.0/docs/Data-Typeable.html#t:TypeRep |
2021-09-08 18:43:19 +0200 | <tomsmeding> | (oh the r@ is redundant) |
2021-09-08 18:43:22 +0200 | <k``> | That's beautiful. |
2021-09-08 18:43:38 +0200 | <tomsmeding> | you can even skip the Proxy by writing 'typeRep r' :p |
2021-09-08 18:43:50 +0200 | <tomsmeding> | because r :: Maybe a, and typeRep takes a 'proxy a' :p |
2021-09-08 18:43:51 +0200 | <luc03> | tomsmeding: thank you. looks perfect. |
2021-09-08 18:44:12 +0200 | <tomsmeding> | and then you don't need ScopedTypeVariables anymore either |
2021-09-08 18:44:20 +0200 | <tomsmeding> | but I thought this was most insightful |
2021-09-08 18:44:55 +0200 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2021-09-08 18:46:08 +0200 | __monty__ | (~toonn@user/toonn) |
2021-09-08 18:46:22 +0200 | <k``> | Is anything _not_ Typeable these days? |
2021-09-08 18:46:38 +0200 | jumper149 | (~jumper149@80.240.31.34) (Quit: WeeChat 3.2) |
2021-09-08 18:47:27 +0200 | <tomsmeding> | I believe a Typeable constraint is automatically solved by internal ghc magic for any type |
2021-09-08 18:47:33 +0200 | <sclv> | "Since GHC 7.10, all types automatically have Typeable instances derived. This is in contrast to previous releases where Typeable had to be explicitly derived using the DeriveDataTypeable language extension." |
2021-09-08 18:47:35 +0200 | <tomsmeding> | or, well, any monomorphic type |
2021-09-08 18:48:38 +0200 | __monty__ | (~toonn@user/toonn) (Client Quit) |
2021-09-08 18:49:20 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
2021-09-08 18:49:23 +0200 | <k``> | Nice, so your `readEither` is effectively just as general as `readMaybe` . |
2021-09-08 18:49:56 +0200 | <tomsmeding> | well, you do need to propagate that extra Typeable constraint upwards all the way until you know the actual monomorphic type |
2021-09-08 18:50:06 +0200 | <tomsmeding> | basically until can discharge the Read constraint |
2021-09-08 18:50:27 +0200 | <tomsmeding> | `type Read' a = (Read a, Typeable a)` using ConstraintKinds :p |
2021-09-08 18:51:17 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
2021-09-08 18:51:49 +0200 | <tomsmeding> | % readMaybe "Proxy" :: Maybe (Proxy a) |
2021-09-08 18:51:49 +0200 | <yahb> | tomsmeding: Just Proxy |
2021-09-08 18:51:58 +0200 | <tomsmeding> | % readEither "Proxy" :: Either String (Proxy a) |
2021-09-08 18:51:58 +0200 | <yahb> | tomsmeding: ; <interactive>:74:1: error:; * No instance for (Typeable a1) arising from a use of `readEither'; Possible fix:; add (Typeable a1) to the context of; an expression type signature:; forall {k1} (a1 :: k1). Either String (Proxy a1); * In the expression: readEither "Proxy" :: Either String (Proxy a); In an equation for `it': it = readEither "Proxy" :: Either |
2021-09-08 18:52:01 +0200 | <k``> | or use the old `class (Read a, Typeable a)=> Read' a ; instance (Read a, Typeable a)=> Read' a` trick with UndecidableInstances. |
2021-09-08 18:52:12 +0200 | <tomsmeding> | because 'Proxy a' is not monomorphic, while it _does_ have a Read instance |
2021-09-08 18:52:23 +0200 | <tomsmeding> | % readEither "Proxy" :: Either String (Proxy Int) |
2021-09-08 18:52:23 +0200 | <yahb> | tomsmeding: Right Proxy |
2021-09-08 18:52:39 +0200 | <k``> | Aah. |
2021-09-08 18:53:17 +0200 | <tomsmeding> | and it makes sense: what would the error message need to be upon a parse error if I wrote "Proxy a" |
2021-09-08 18:53:48 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
2021-09-08 18:54:55 +0200 | <k``> | I guess it has to be monomorphic or unification down the line could end up with mismatches on types that should be unified or matches on types that should not? |
2021-09-08 18:55:10 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 265 seconds) |
2021-09-08 18:56:12 +0200 | __monty__ | (~toonn@user/toonn) |
2021-09-08 18:56:15 +0200 | <tomsmeding> | well, what would the result of `readEtiher "abc" :: Either String (Proxy a)` be |
2021-09-08 18:56:45 +0200 | <tomsmeding> | given Typeable a, the answer is clear, but if you don't have Typeable a, you can't know |
2021-09-08 18:56:59 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-09-08 18:57:14 +0200 | <k``> | Because there could be an overlapping instance for `Proxy` of that specific type? |
2021-09-08 18:57:37 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-09-08 18:57:44 +0200 | <tomsmeding> | % foo1 :: String -> Either String (Proxy a) ; foo1 = readEither |
2021-09-08 18:57:44 +0200 | <yahb> | tomsmeding: ; <interactive>:76:52: error:; * No instance for (Typeable a) arising from a use of `readEither'; Possible fix:; add (Typeable a) to the context of; the type signature for:; foo1 :: forall {k} (a :: k). String -> Either String (Proxy a); * In the expression: readEither; In an equation for `foo1': foo1 = readEither |
2021-09-08 18:57:49 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 18:57:54 +0200 | <tomsmeding> | % foo2 :: Typeable a => String -> Either String (Proxy a) ; foo2 = readEither |
2021-09-08 18:57:54 +0200 | <yahb> | tomsmeding: ; <interactive>:77:66: error:; * Could not deduce (Typeable k) arising from a use of `readEither'; from the context: Typeable a; bound by the type signature for:; foo2 :: forall {k} (a :: k). Typeable a => String -> Either String (Proxy a); at <interactive>:77:1-55; * In the expression: readEither; In an equation for `foo2': foo2 = readEither |
2021-09-08 18:57:56 +0200 | <tomsmeding> | oh |
2021-09-08 18:58:11 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 18:58:14 +0200 | <k``> | Sorry, I'm thinking in terms of the requirements of Typeable rather than the `readEither` function specifically. |
2021-09-08 18:58:16 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
2021-09-08 18:58:28 +0200 | <tomsmeding> | ah right |
2021-09-08 18:58:31 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 18:58:47 +0200 | <tomsmeding> | well, in order to derive Typeable for something, you should be able to get a string representation of the type |
2021-09-08 18:59:08 +0200 | <tomsmeding> | because you need to support 'show (typeRep (Proxy @a))' |
2021-09-08 18:59:21 +0200 | <tomsmeding> | so you need to know what to, well, return there :p |
2021-09-08 18:59:35 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
2021-09-08 18:59:37 +0200 | <tomsmeding> | and you can only know that when the type is actually concrete and known |
2021-09-08 19:00:12 +0200 | <tomsmeding> | automatically solving Typeable involves magically constructing the dictionary necessary to implement typeRep; after that it's just normal typeclass dictionary passing |
2021-09-08 19:00:15 +0200 | tomsmeding | has to go now, sorry |
2021-09-08 19:00:29 +0200 | <k``> | Right, you don't want to print "forall a. Typeable a => Proxy a" in one place and "Proxy Int" in another place for the same value. |
2021-09-08 19:02:01 +0200 | amk | (~amk@109.255.169.126) (Ping timeout: 252 seconds) |
2021-09-08 19:13:18 +0200 | rekahsoft | (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
2021-09-08 19:14:36 +0200 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2021-09-08 19:14:45 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds) |
2021-09-08 19:16:10 +0200 | dsrt^ | (~dsrt@68.101.54.227) |
2021-09-08 19:16:15 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
2021-09-08 19:17:52 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds) |
2021-09-08 19:20:18 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-09-08 19:20:22 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-09-08 19:20:35 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
2021-09-08 19:21:52 +0200 | roboguy_ | (~roboguy_@cpe-98-156-4-161.kc.res.rr.com) |
2021-09-08 19:26:06 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-09-08 19:26:15 +0200 | Vajb | (~Vajb@n1xq4ni1adi29tefj-2.v6.elisa-mobile.fi) |
2021-09-08 19:26:45 +0200 | <teddyc> | https://hackage.haskell.org/package/req-3.9.0/docs/Network-HTTP-Req.html#t:HttpConfig I'm trying to use the defaultHttpConfig but I only want to change one field. Is this possible? |
2021-09-08 19:26:59 +0200 | <dminuoso> | Yes. |
2021-09-08 19:26:59 +0200 | Vajb | (~Vajb@n1xq4ni1adi29tefj-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer) |
2021-09-08 19:27:05 +0200 | <teddyc> | easily? |
2021-09-08 19:27:11 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
2021-09-08 19:27:12 +0200 | <dminuoso> | Yes. |
2021-09-08 19:27:16 +0200 | <geekosaur> | theDefault {field = val} |
2021-09-08 19:28:11 +0200 | sneedsfeed | (~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com) |
2021-09-08 19:28:24 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2021-09-08 19:29:17 +0200 | <tomsmeding> | (this is called record update syntax) |
2021-09-08 19:29:24 +0200 | <teddyc> | nice, thanks |
2021-09-08 19:29:41 +0200 | <teddyc> | haven't seen it that much |
2021-09-08 19:30:37 +0200 | <teddyc> | The library throws exception for every statuscode not in [200..300]. Isn't this a bit weird? |
2021-09-08 19:30:41 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-09-08 19:30:43 +0200 | econo | (uid147250@user/econo) |
2021-09-08 19:31:05 +0200 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-09-08 19:31:23 +0200 | abhixec | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
2021-09-08 19:31:24 +0200 | <geekosaur> | you'll find a lot of Haskell APIs use it |
2021-09-08 19:31:53 +0200 | <dminuoso> | teddyc: You can also write your own MonadHTTP implementation that does it differently |
2021-09-08 19:32:01 +0200 | <teddyc> | it said it would help with error handling. I guess it might, just seems to opinonated in my taste |
2021-09-08 19:32:08 +0200 | <teddyc> | dminuoso: aha |
2021-09-08 19:32:13 +0200 | <teddyc> | s/to/too/ |
2021-09-08 19:32:18 +0200 | <dminuoso> | https://hackage.haskell.org/package/req-3.9.0/docs/Network-HTTP-Req.html#v:handleHttpException |
2021-09-08 19:32:29 +0200 | <dminuoso> | oh hold on |
2021-09-08 19:32:33 +0200 | <dminuoso> | I might have talked too soon |
2021-09-08 19:33:08 +0200 | <maerwald> | If there's one thing that sucks across the board in haskell, it's error handling. I've just given up and instead try to memorize all the pitfalls. |
2021-09-08 19:33:37 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 19:33:48 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 19:33:51 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 19:34:13 +0200 | <teddyc> | yeah, i have been struggling with that |
2021-09-08 19:34:30 +0200 | <dminuoso> | maerwald: that's the one thing go has going for itself. |
2021-09-08 19:34:40 +0200 | <dminuoso> | at least its very clear how errors are communicated. |
2021-09-08 19:34:44 +0200 | <dminuoso> | usually, anyhow |
2021-09-08 19:34:46 +0200 | <maerwald> | dminuoso: weeell |
2021-09-08 19:35:00 +0200 | <dminuoso> | its just very easy to completely ignore and miss an error |
2021-09-08 19:35:02 +0200 | <dminuoso> | but oh well |
2021-09-08 19:35:07 +0200 | <maerwald> | when I worked with go the team actually tried to come up with a better error handling library |
2021-09-08 19:35:12 +0200 | <maerwald> | but no one could agree on anything |
2021-09-08 19:35:16 +0200 | rekahsoft | (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 265 seconds) |
2021-09-08 19:35:42 +0200 | <maerwald> | it's just no expressive enough to come up with... uh, anything |
2021-09-08 19:35:45 +0200 | <maerwald> | so just use what's there |
2021-09-08 19:35:54 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
2021-09-08 19:36:27 +0200 | <dminuoso> | Maybe error handling is a thing that nobody has gotten right |
2021-09-08 19:36:28 +0200 | <maerwald> | that, in an odd way, forces consistency throughout the ecosystem |
2021-09-08 19:36:56 +0200 | <dminuoso> | Java's attempt seems to have gotten close, but the ergonomics are shitty and there's backdoors that severely reduce the trust you can put in it. |
2021-09-08 19:37:10 +0200 | <maerwald> | and it's kind of a pleasure to pick a library in Go and not have to read a phd thesis to figure out how it works. Because everything is just the same |
2021-09-08 19:37:25 +0200 | <dminuoso> | maerwald: That's very much the intention of go. |
2021-09-08 19:37:37 +0200 | <dminuoso> | Being able to get people out of school into Google, and have them work with code with as little training as possible |
2021-09-08 19:37:45 +0200 | <dminuoso> | For whatever good that might be.. |
2021-09-08 19:38:47 +0200 | <maerwald> | maybe it's modern PHP... it doesn't feel like coding, actually |
2021-09-08 19:39:06 +0200 | <dminuoso> | PHP is completely unprincipled and invented by someone with absolutely no experience in language design or implementation. |
2021-09-08 19:39:17 +0200 | <dminuoso> | which is very different... :P |
2021-09-08 19:39:18 +0200 | Guest|67 | (~Guest|67@fs226-222.bard.edu) (Quit: Connection closed) |
2021-09-08 19:39:38 +0200 | <dminuoso> | Internally go is well designed. Whether I agree with many of those design decisions is a different matter |
2021-09-08 19:39:54 +0200 | <dminuoso> | But PHP wasnt even designed, it's just a lot of adhocness accumulated over time |
2021-09-08 19:39:58 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) (Remote host closed the connection) |
2021-09-08 19:40:29 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2021-09-08 19:41:56 +0200 | <k``> | What are the fundamental problems with errors in Haskell? That you can't really catch them outside of IO? That you have to worry about asynchronous errors? |
2021-09-08 19:42:21 +0200 | <k``> | Or just that folks don't really worry about handling them in the first place? |
2021-09-08 19:42:23 +0200 | <dminuoso> | k``: we have a multitude of largely incompatible error communication methods |
2021-09-08 19:42:49 +0200 | <monochrom> | I would put it in positive terms. |
2021-09-08 19:42:51 +0200 | <shapr> | I think the fundamental problem with Haskell is that it doesn't have the funding of golang, php, etc :-) |
2021-09-08 19:42:58 +0200 | <monochrom> | We recognize that one size doesn't fit all. |
2021-09-08 19:43:29 +0200 | <monochrom> | There are many error communication+handling schemes, and they look incompatible. That's because there are many incompatible contexts. |
2021-09-08 19:43:43 +0200 | oxide | (~lambda@user/oxide) (Quit: oxide) |
2021-09-08 19:44:04 +0200 | <monochrom> | In non-I/O, a sum type works best. |
2021-09-08 19:44:41 +0200 | <dminuoso> | But then there's dozens of different sum types encoding different failures |
2021-09-08 19:44:42 +0200 | phma | (~phma@host-67-44-209-91.hnremote.net) (Read error: Connection reset by peer) |
2021-09-08 19:44:58 +0200 | <maerwald> | monochrom: I went down the road of open sum types... I'm not convinced it's worth it, but I can't stop using it |
2021-09-08 19:45:01 +0200 | <maerwald> | I don't know why |
2021-09-08 19:45:03 +0200 | <dminuoso> | They simply dont compose |
2021-09-08 19:45:04 +0200 | <k``> | monochrom: Do you mean `Either MySpecialSumType` ? |
2021-09-08 19:45:13 +0200 | <monochrom> | In I/O, see my http://www.vex.net/~trebla/haskell/exception.xhtml for why you will end up reinventing exceptions, even if you start by avoiding exceptions. |
2021-09-08 19:45:21 +0200 | <dminuoso> | Personally, the best choice Ive seen is hierarchial IO exceptions. |
2021-09-08 19:45:25 +0200 | <dminuoso> | But this one is a forgotten art |
2021-09-08 19:45:31 +0200 | <maerwald> | k``: https://docs.haskus.org/variant/excepts.html |
2021-09-08 19:45:52 +0200 | kuribas | (~user@ptr-25vy0i9dsqr9crcldit.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
2021-09-08 19:46:03 +0200 | <maerwald> | that does compose |
2021-09-08 19:46:10 +0200 | <maerwald> | but you're doing `liftE` everywhere |
2021-09-08 19:46:12 +0200 | <Cale> | k``: I think monochrom just means something along the lines of Either itself by "sum type" |
2021-09-08 19:46:19 +0200 | <dminuoso> | And this one is actually quite annoying. If your library doesnt have its own hierarchy, then using things with IO in negative position become frustrating to use |
2021-09-08 19:46:26 +0200 | <monochrom> | Yeah Either is already a sum type. |
2021-09-08 19:46:48 +0200 | <maerwald> | and in the end... you have huge type level lists of possible errors that arealso kinda meaningless |
2021-09-08 19:47:08 +0200 | <maerwald> | but you can also nest errors with that approach |
2021-09-08 19:47:15 +0200 | <maerwald> | and then everything becomes more complicated |
2021-09-08 19:47:28 +0200 | <maerwald> | and then you reconsider your life choices |
2021-09-08 19:48:01 +0200 | <k``> | monochrom: So then, realistically, `Maybe` or `Either String` ? |
2021-09-08 19:48:19 +0200 | <monochrom> | Who said anything about String? |
2021-09-08 19:48:29 +0200 | <Cale> | k``: Yeah, that kind of thing covers a lot of cases |
2021-09-08 19:48:46 +0200 | <monochrom> | Every error is not a string. |
2021-09-08 19:49:16 +0200 | <Cale> | Yeah, doesn't have to be a String, but could be if that's all you care to know about the failure. |
2021-09-08 19:49:41 +0200 | <maerwald> | yeah, you can pattern match on strings too >:) |
2021-09-08 19:49:45 +0200 | <shapr> | I wish for a solid encoding of sum types in postgres |
2021-09-08 19:50:29 +0200 | <k``> | That's why I was asking whether you were recommending `Either MyCustomErrorType` . |
2021-09-08 19:50:33 +0200 | <monochrom> | The only sum type in SQL is nullable. That ship has sailed. |
2021-09-08 19:50:34 +0200 | themc47 | (~mc47@xmonad/TheMC47) |
2021-09-08 19:51:04 +0200 | <maerwald> | k``: did you check my link? |
2021-09-08 19:51:35 +0200 | <k``> | maerwald: Reading it now. |
2021-09-08 19:52:16 +0200 | <Cale> | shapr: Yeah, the fact that SQL databases practically force you to represent A + B using (1 + A)*(1 + B), and just endure the potential consequences of storing 1 or A*B really sucks. |
2021-09-08 19:52:38 +0200 | <shapr> | yeah :-( |
2021-09-08 19:53:09 +0200 | mc47 | (~mc47@xmonad/TheMC47) (Ping timeout: 265 seconds) |
2021-09-08 19:53:24 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 19:53:31 +0200 | <monochrom> | I would s/represent/encoding/ |
2021-09-08 19:53:42 +0200 | <monochrom> | There is a significant difference. |
2021-09-08 19:53:56 +0200 | justsomeguy | (~justsomeg@user/justsomeguy) |
2021-09-08 19:54:04 +0200 | <monochrom> | A representation doesn't obscure. An encoding does. |
2021-09-08 19:54:18 +0200 | <monochrom> | s/obscure/obfuscate/ |
2021-09-08 19:55:03 +0200 | abraham | (~textual@191.96.121.144) |
2021-09-08 19:55:09 +0200 | <monochrom> | The reason why we don't say "Church representation", we say "Church encoding". |
2021-09-08 19:59:57 +0200 | <k``> | maerwald: Are those type lists like ordinary lists (ordered, admitting duplicates)? Or are they effectively sets? |
2021-09-08 20:00:14 +0200 | <dminuoso> | k``: they are the same as ordinary lists. |
2021-09-08 20:00:38 +0200 | <dminuoso> | It's just that working with them is a bit more tricky as you cant use value level functions. |
2021-09-08 20:00:55 +0200 | <maerwald> | that's a type level list |
2021-09-08 20:00:59 +0200 | <dminuoso> | You can mostly re-implement list functions to work on type level lists |
2021-09-08 20:01:07 +0200 | <dminuoso> | But sometimes it takes a bit of creativity. :) |
2021-09-08 20:01:15 +0200 | <maerwald> | k``: that's also why, unfortunately, order matters |
2021-09-08 20:01:22 +0200 | slep | (~slep@cpc150002-brnt4-2-0-cust437.4-2.cable.virginm.net) (Ping timeout: 265 seconds) |
2021-09-08 20:02:08 +0200 | <maerwald> | `Excepts '[ParseError, HeadError] IO Integer` doesn't compose with `Excepts '[HeadError, ParseError] IO Integer` |
2021-09-08 20:02:19 +0200 | <maerwald> | not without `liftE` |
2021-09-08 20:02:28 +0200 | vysn | (~vysn@user/vysn) (Quit: WeeChat 3.2) |
2021-09-08 20:02:57 +0200 | <maerwald> | all random shenanigans that have nothing to do with business logic :p |
2021-09-08 20:03:39 +0200 | abhixec | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection) |
2021-09-08 20:04:24 +0200 | <maerwald> | you can try plucky instead |
2021-09-08 20:04:38 +0200 | <maerwald> | https://hackage.haskell.org/package/plucky |
2021-09-08 20:04:55 +0200 | <maerwald> | https://www.parsonsmatt.org/2020/01/03/plucking_constraints.html |
2021-09-08 20:05:13 +0200 | ec_ | (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
2021-09-08 20:05:16 +0200 | <k``> | maerwald: How do you check which type of error an `Excepts '[ParseError, HeadError]` yielded? |
2021-09-08 20:05:54 +0200 | <maerwald> | not sure I understand the question |
2021-09-08 20:06:13 +0200 | <maerwald> | you can run the action and get a VEither, similar like runExceptT |
2021-09-08 20:06:15 +0200 | <maerwald> | or you catch |
2021-09-08 20:06:16 +0200 | abhixec | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
2021-09-08 20:06:22 +0200 | aegon | (~mike@174.127.249.180) |
2021-09-08 20:07:35 +0200 | <maerwald> | https://hackage.haskell.org/package/haskus-utils-variant-3.1/docs/Haskus-Utils-Variant-Excepts.htm… |
2021-09-08 20:08:25 +0200 | azeem | (~azeem@2a00:801:23f:d6b0:3dc9:5843:deaf:1727) (Ping timeout: 260 seconds) |
2021-09-08 20:08:53 +0200 | <maerwald> | and then you pattern match like `VLeft (V (ParseError msg)) -> oops` |
2021-09-08 20:09:15 +0200 | sneedsfeed | (~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com) (Ping timeout: 256 seconds) |
2021-09-08 20:09:35 +0200 | shapr | (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Remote host closed the connection) |
2021-09-08 20:09:45 +0200 | abhixec | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection) |
2021-09-08 20:10:32 +0200 | abhixec | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
2021-09-08 20:10:55 +0200 | abraham | (~textual@191.96.121.144) (Quit: Textual IRC Client: www.textualapp.com) |
2021-09-08 20:11:24 +0200 | abraham | (~abraham@191.96.121.144) |
2021-09-08 20:12:15 +0200 | <k``> | So you have a case statement like `case mx of VLeft (V HeadError) -> doThis ; VLeft (V (ParseError s)) -> reparse s` ? |
2021-09-08 20:12:24 +0200 | <k``> | How does that work? |
2021-09-08 20:12:42 +0200 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-09-08 20:13:38 +0200 | <maerwald> | check the code https://hackage.haskell.org/package/haskus-utils-variant-3.1/docs/src/Haskus.Utils.Variant.VEither… |
2021-09-08 20:13:53 +0200 | benin0369323 | (~benin@183.82.178.253) |
2021-09-08 20:16:52 +0200 | dyeplexer | (~dyeplexer@user/dyeplexer) (Remote host closed the connection) |
2021-09-08 20:17:18 +0200 | shapr | (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
2021-09-08 20:18:27 +0200 | benin03693235 | (benin@gateway/vpn/protonvpn/benin) |
2021-09-08 20:18:28 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
2021-09-08 20:19:21 +0200 | benin0369323 | (~benin@183.82.178.253) (Read error: Connection reset by peer) |
2021-09-08 20:20:27 +0200 | MQ-17J | (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) |
2021-09-08 20:20:52 +0200 | jess | (~jess@libera/staff/jess) () |
2021-09-08 20:21:17 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
2021-09-08 20:21:21 +0200 | <k``> | maerwald: Oh, that's neat. |
2021-09-08 20:21:31 +0200 | benin0369323 | (~benin@183.82.178.253) |
2021-09-08 20:22:44 +0200 | vysn | (~vysn@user/vysn) |
2021-09-08 20:23:40 +0200 | nvmd | (~nvmd@user/nvmd) |
2021-09-08 20:23:55 +0200 | Lycurgus | (~juan@98.4.112.204) (Quit: Exeunt) |
2021-09-08 20:23:56 +0200 | benin03693235 | (benin@gateway/vpn/protonvpn/benin) (Ping timeout: 252 seconds) |
2021-09-08 20:24:07 +0200 | phma | (~phma@host-67-44-208-98.hnremote.net) |
2021-09-08 20:25:25 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 20:25:35 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2021-09-08 20:25:49 +0200 | ec_ | (~ec@gateway/tor-sasl/ec) |
2021-09-08 20:26:40 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
2021-09-08 20:33:45 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
2021-09-08 20:34:57 +0200 | abhixec | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Quit: leaving) |
2021-09-08 20:37:35 +0200 | max22- | (~maxime@2a01cb08833598003176d874852ce483.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds) |
2021-09-08 20:37:49 +0200 | vicfred | (~vicfred@user/vicfred) |
2021-09-08 20:44:34 +0200 | myShoggoth | (~myShoggot@97-120-70-214.ptld.qwest.net) (Read error: Connection reset by peer) |
2021-09-08 20:44:53 +0200 | myShoggoth | (~myShoggot@97-120-70-214.ptld.qwest.net) |
2021-09-08 20:45:53 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) (Remote host closed the connection) |
2021-09-08 20:47:31 +0200 | amk | (~amk@109.255.169.126) |
2021-09-08 20:47:32 +0200 | kayprish | (~kayprish@cable-188-2-153-140.dynamic.sbb.rs) |
2021-09-08 20:50:15 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) |
2021-09-08 20:51:57 +0200 | burnsidesLlama | (~burnsides@dhcp168-018.wadham.ox.ac.uk) |
2021-09-08 20:52:01 +0200 | abhixec | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
2021-09-08 20:52:53 +0200 | abhixec | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection) |
2021-09-08 20:54:17 +0200 | chele | (~chele@user/chele) (Remote host closed the connection) |
2021-09-08 20:55:00 +0200 | MQ-17J | (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) (Read error: Connection reset by peer) |
2021-09-08 20:55:34 +0200 | MQ-17J | (~MQ-17J@35.50.7.10) |
2021-09-08 20:57:05 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
2021-09-08 20:57:24 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2021-09-08 20:58:57 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 20:59:10 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 21:00:19 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-09-08 21:00:42 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 21:02:56 +0200 | max22- | (~maxime@2a01cb0883359800fdb5051cdabc89f4.ipv6.abo.wanadoo.fr) |
2021-09-08 21:04:06 +0200 | TranquilEcho | (~grom@user/tranquilecho) (Quit: WeeChat 2.8) |
2021-09-08 21:04:25 +0200 | wonko | (~wjc@62.115.229.50) (Ping timeout: 260 seconds) |
2021-09-08 21:04:43 +0200 | alx741 | (~alx741@186.178.109.214) |
2021-09-08 21:05:16 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-09-08 21:05:17 +0200 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-09-08 21:05:17 +0200 | wroathe | (~wroathe@user/wroathe) |
2021-09-08 21:05:39 +0200 | wonko | (~wjc@62.115.229.50) |
2021-09-08 21:05:44 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-09-08 21:05:47 +0200 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-09-08 21:06:20 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 21:06:22 +0200 | abraham | (~abraham@191.96.121.144) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2021-09-08 21:08:06 +0200 | aman | (~aman@user/aman) (Quit: aman) |
2021-09-08 21:08:36 +0200 | abraham | (~abraham@191.96.121.144) |
2021-09-08 21:08:39 +0200 | natechan | (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
2021-09-08 21:08:40 +0200 | myShoggoth | (~myShoggot@97-120-70-214.ptld.qwest.net) (Remote host closed the connection) |
2021-09-08 21:08:58 +0200 | myShoggoth | (~myShoggot@97-120-70-214.ptld.qwest.net) |
2021-09-08 21:09:17 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 21:09:31 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 21:09:43 +0200 | abraham | (~abraham@191.96.121.144) (Client Quit) |
2021-09-08 21:10:33 +0200 | abraham | (~abraham@191.96.121.144) |
2021-09-08 21:10:41 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
2021-09-08 21:12:25 +0200 | abraham | (~abraham@191.96.121.144) (Client Quit) |
2021-09-08 21:17:22 +0200 | abraham | (~abraham@191.96.121.37) |
2021-09-08 21:17:44 +0200 | kawpuh | (~kawpuh@097-082-066-236.res.spectrum.com) |
2021-09-08 21:22:16 +0200 | myShoggoth | (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 252 seconds) |
2021-09-08 21:23:16 +0200 | enikar | (~enikar@user/enikar) |
2021-09-08 21:24:57 +0200 | janat08 | (uid374565@id-374565.lymington.irccloud.com) |
2021-09-08 21:25:45 +0200 | abraham | (~abraham@191.96.121.37) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2021-09-08 21:26:39 +0200 | abraham | (~abraham@191.96.121.37) |
2021-09-08 21:27:24 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
2021-09-08 21:28:56 +0200 | myShoggoth | (~myShoggot@97-120-70-214.ptld.qwest.net) |
2021-09-08 21:29:13 +0200 | <janat08> | https://pastebin.com/peHkKKNM |
2021-09-08 21:29:40 +0200 | akegalj | (~akegalj@89-172-127-119.adsl.net.t-com.hr) |
2021-09-08 21:30:51 +0200 | <janat08> | I'd imagine there's a better way of doing this with just one query using IHP sql model. The gist of this is that I'm trying to pass domains that don't have usernames with a given name. |
2021-09-08 21:33:20 +0200 | agoraphobic | (~agoraphob@ip11-173.bon.riksnet.se) (Read error: Connection reset by peer) |
2021-09-08 21:33:27 +0200 | agoraphobic_ | (~agoraphob@ip11-173.bon.riksnet.se) |
2021-09-08 21:38:25 +0200 | aarvar | (~aaron@2601:602:a080:fa0:6eb5:629b:8150:a841) |
2021-09-08 21:39:01 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
2021-09-08 21:41:10 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
2021-09-08 21:44:43 +0200 | kawpuh | (~kawpuh@097-082-066-236.res.spectrum.com) (Quit: Client closed) |
2021-09-08 21:47:04 +0200 | kawpuh | (~kawpuh@097-082-066-236.res.spectrum.com) |
2021-09-08 21:47:35 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 21:50:30 +0200 | jtomas | (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 260 seconds) |
2021-09-08 21:52:55 +0200 | <janat08> | Hi? |
2021-09-08 21:53:09 +0200 | <shapr> | hi! |
2021-09-08 21:54:28 +0200 | nvmd | (~nvmd@user/nvmd) (Ping timeout: 265 seconds) |
2021-09-08 21:54:37 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 21:54:43 +0200 | jtomas | (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) |
2021-09-08 21:54:56 +0200 | <heath> | hello |
2021-09-08 21:55:00 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 21:55:25 +0200 | fendor_ | (~fendor@178.165.191.44.wireless.dyn.drei.com) (Remote host closed the connection) |
2021-09-08 21:55:29 +0200 | jinsun | (~quassel@user/jinsun) |
2021-09-08 21:55:41 +0200 | <shapr> | janat08: I don't know anything about IHP |
2021-09-08 21:59:29 +0200 | TranquilEcho | (~grom@user/tranquilecho) |
2021-09-08 21:59:47 +0200 | <janat08> | https://pastebin.com/peHkKKNM I'd imagine there's a better way of doing this with just one query using IHP sql model. The gist of this is that I'm trying to pass domains that don't have usernames with a given name |
2021-09-08 22:01:47 +0200 | <sm> | there's https://matrix.to/#/#digitallyinduced_ihp:gitter.im also |
2021-09-08 22:02:04 +0200 | abraham | (~abraham@191.96.121.37) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2021-09-08 22:03:15 +0200 | kawpuh | (~kawpuh@097-082-066-236.res.spectrum.com) (Quit: Client closed) |
2021-09-08 22:03:16 +0200 | kawpuh9 | (~kawpuh@66.42.81.80) |
2021-09-08 22:03:27 +0200 | kawpuh9 | kawpuh |
2021-09-08 22:03:48 +0200 | zmt00 | (~zmt00@user/zmt00) (Read error: Connection reset by peer) |
2021-09-08 22:05:18 +0200 | _ht | (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
2021-09-08 22:05:20 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) (Remote host closed the connection) |
2021-09-08 22:05:35 +0200 | juhp | (~juhp@128.106.188.220) (Ping timeout: 265 seconds) |
2021-09-08 22:06:04 +0200 | mikoto-chan | (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 265 seconds) |
2021-09-08 22:06:55 +0200 | juhp | (~juhp@128.106.188.220) |
2021-09-08 22:07:22 +0200 | shiraeeshi | (~shiraeesh@46.34.206.111) |
2021-09-08 22:12:17 +0200 | wonko | (~wjc@62.115.229.50) (Ping timeout: 252 seconds) |
2021-09-08 22:13:37 +0200 | infinity0 | (~infinity0@occupy.ecodis.net) |
2021-09-08 22:13:51 +0200 | abhixec | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
2021-09-08 22:15:04 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 22:15:18 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 22:18:22 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds) |
2021-09-08 22:19:40 +0200 | mikoto-chan | (~mikoto-ch@83.137.2.250) |
2021-09-08 22:21:27 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
2021-09-08 22:22:26 +0200 | mikoto-chan | (~mikoto-ch@83.137.2.250) (Client Quit) |
2021-09-08 22:22:41 +0200 | mikoto-chan | (~mikoto-ch@83.137.2.250) |
2021-09-08 22:27:10 +0200 | xff0x | (~xff0x@2001:1a81:527e:a000:2ce2:bb46:8710:1c2a) (Ping timeout: 252 seconds) |
2021-09-08 22:27:53 +0200 | xff0x | (~xff0x@port-92-195-70-241.dynamic.as20676.net) |
2021-09-08 22:30:24 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 22:30:38 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 22:33:32 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
2021-09-08 22:37:19 +0200 | akegalj | (~akegalj@89-172-127-119.adsl.net.t-com.hr) (Quit: leaving) |
2021-09-08 22:37:51 +0200 | slep | (~slep@cpc150002-brnt4-2-0-cust437.4-2.cable.virginm.net) |
2021-09-08 22:38:08 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2021-09-08 22:38:14 +0200 | wrengr_away | wrengr |
2021-09-08 22:40:02 +0200 | k`` | (~user@152.1.137.158) (Quit: bye) |
2021-09-08 22:40:44 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 22:40:58 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 22:44:07 +0200 | roboguy_ | (~roboguy_@cpe-98-156-4-161.kc.res.rr.com) () |
2021-09-08 22:44:10 +0200 | aegon | (~mike@174.127.249.180) (Remote host closed the connection) |
2021-09-08 22:44:33 +0200 | nvmd | (~nvmd@user/nvmd) |
2021-09-08 22:49:33 +0200 | gehmehgeh | (~user@user/gehmehgeh) (Quit: Leaving) |
2021-09-08 22:50:11 +0200 | <heath> | janat08: you probably want https://github.com/digitallyinduced/ihp/blob/28f3e825d107c31aeea2f57075664c9144e439ec/Guide/databa… |
2021-09-08 22:51:20 +0200 | MQ-17J | (~MQ-17J@35.50.7.10) (Ping timeout: 252 seconds) |
2021-09-08 22:52:51 +0200 | <heath> | you're not issuing db calls, nevermind |
2021-09-08 22:53:32 +0200 | qbt | (~edun@user/edun) (Ping timeout: 252 seconds) |
2021-09-08 22:54:14 +0200 | MQ-17J | (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) |
2021-09-08 22:54:47 +0200 | vicfred | (~vicfred@user/vicfred) (Quit: Leaving) |
2021-09-08 22:54:57 +0200 | beka | (~beka@104.193.170.240) |
2021-09-08 22:55:00 +0200 | <heath> | oh it is a db call. you probably do want transactions, though I don't know the best way to do this in ihp |
2021-09-08 22:55:12 +0200 | <janat08> | You think I should ask in stackoverflow with the solution that doesn't make 2 separate queries |
2021-09-08 22:55:13 +0200 | jtomas | (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 252 seconds) |
2021-09-08 22:55:54 +0200 | <janat08> | Yes search is also a db call |
2021-09-08 22:55:56 +0200 | <heath> | sm mentioned gitter. the team behind ihp seems to be active there |
2021-09-08 22:56:21 +0200 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) |
2021-09-08 22:57:23 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds) |
2021-09-08 22:57:35 +0200 | <janat08> | They introduced support subscription, that at least indicated they're weary of providing free support. I'll post it on stackoverflow and link it there. |
2021-09-08 22:58:41 +0200 | proofofkeags | (~proofofke@205.209.28.54) |
2021-09-08 22:58:48 +0200 | <janat08> | I kinda assumed I'm not doing monads right or something. How do you debug this? |
2021-09-08 22:58:59 +0200 | <janat08> | It takes issue with the beginning of filter statement |
2021-09-08 22:59:00 +0200 | Lord_of_Life_ | Lord_of_Life |
2021-09-08 22:59:28 +0200 | Everything | (~Everythin@37.115.210.35) (Quit: leaving) |
2021-09-08 23:00:11 +0200 | pzanco | (~pzanco@2804:14c:3ba1:42d:2204:fff:feff:44a0) |
2021-09-08 23:00:29 +0200 | pzanco | (~pzanco@2804:14c:3ba1:42d:2204:fff:feff:44a0) (Client Quit) |
2021-09-08 23:01:47 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-09-08 23:02:09 +0200 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-09-08 23:02:51 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 23:02:56 +0200 | <sm> | janat08: I would still try the official chat channel. Pretty sure you don't have to pay |
2021-09-08 23:03:12 +0200 | <sm> | there is no concentration of IHP users elsewhere yet |
2021-09-08 23:04:40 +0200 | <sm> | (I'm sitting in that channel, and have not paid. :) Element says ~80 users there right now - probably not that many, but still a good number.) |
2021-09-08 23:05:10 +0200 | ubert1 | (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) (Ping timeout: 260 seconds) |
2021-09-08 23:06:13 +0200 | ubert | (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
2021-09-08 23:06:54 +0200 | <sm> | also.. since I've come this far.. if you paste that with line numbers and the exact error including line number, there's more of a chance someone here might have some ideas. This is a good paste site: |
2021-09-08 23:06:54 +0200 | <sm> | @where paste |
2021-09-08 23:06:55 +0200 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
2021-09-08 23:07:10 +0200 | ablutor | (~quassel@wasscher.com) (Ping timeout: 240 seconds) |
2021-09-08 23:07:17 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
2021-09-08 23:07:19 +0200 | dhouthoo | (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.2) |
2021-09-08 23:08:56 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
2021-09-08 23:11:19 +0200 | burnsidesLlama | (~burnsides@dhcp168-018.wadham.ox.ac.uk) (Ping timeout: 265 seconds) |
2021-09-08 23:11:23 +0200 | sneedsfeed | (~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com) |
2021-09-08 23:13:44 +0200 | hannessteffenhag | (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 265 seconds) |
2021-09-08 23:14:35 +0200 | michalz | (~michalz@185.246.204.41) (Remote host closed the connection) |
2021-09-08 23:15:12 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 265 seconds) |
2021-09-08 23:18:29 +0200 | <ldlework> | Can someone remind me how you make a Point x y where the x y are constrained to Num ? |
2021-09-08 23:19:30 +0200 | <geekosaur> | you don't, you constrain the use sites |
2021-09-08 23:20:43 +0200 | <geekosaur> | there's some old syntax that has to be enabled, that could constrain creation; but you'd still have to constrain the use sites separately because it can't recover the constraint later |
2021-09-08 23:21:21 +0200 | <geekosaur> | there are also GADTs that can constrain both, but they introduce other complexities |
2021-09-08 23:21:37 +0200 | <awpr> | (GHC source code refers to that old feature as "stupid theta" because what it does is pretty useless and there's not really any reason to use it) |
2021-09-08 23:21:53 +0200 | ablutor | (~quassel@145.131.24.183) |
2021-09-08 23:23:53 +0200 | <ldlework> | i see |
2021-09-08 23:24:06 +0200 | wroathe | (~wroathe@96-88-30-181-static.hfc.comcastbusiness.net) |
2021-09-08 23:24:07 +0200 | wroathe | (~wroathe@96-88-30-181-static.hfc.comcastbusiness.net) (Changing host) |
2021-09-08 23:24:07 +0200 | wroathe | (~wroathe@user/wroathe) |
2021-09-08 23:24:49 +0200 | <monochrom> | This is a FAQ and gives the impression of much-requested "feature" because the querents are invariably writing code (vocal minority), not reading or using someone else's library (silent majority). |
2021-09-08 23:24:52 +0200 | rond_ | (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) |
2021-09-08 23:25:56 +0200 | <monochrom> | The truth is that, from the user's point of view, suppose you "promise" me your type sig is "foo :: a -> Point a a", then I try to use it as "foo True", then you tell me "no no, Bool is not an instance of Num". Well that's called false advertising. |
2021-09-08 23:26:12 +0200 | <monochrom> | The honest type sig is "foo :: Num a => a -> Point a a". |
2021-09-08 23:26:38 +0200 | <dsal> | You can have a Map without Ord keys depending on what you plan to do with it. |
2021-09-08 23:26:46 +0200 | <monochrom> | The conclusion is that any writer's hope of "I don't have to repeat 'Num a =>' at every function I provide" is a pipe dream. |
2021-09-08 23:27:30 +0200 | abhixec | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection) |
2021-09-08 23:28:28 +0200 | zmt00 | (~zmt00@user/zmt00) |
2021-09-08 23:28:37 +0200 | <awpr> | to be fair, you could have "data Point a = Num a => Point a a", but that a) only helps for types with Point in negative position and b) makes the allocation bigger and forces you to pass around Num instances for every individual Point, not to mention anything undesirable it might do to optimization |
2021-09-08 23:29:23 +0200 | <monochrom> | a pipe dream stemming from writer's selfish convenience ignoring user rights. |
2021-09-08 23:29:39 +0200 | <awpr> | normally the thing to do when you want Num constraints on all the functions involving Point is to put Num constraints on all the functions involving Point :) |
2021-09-08 23:31:04 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 23:31:18 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 23:31:27 +0200 | abraham | (~abraham@191.96.121.37) |
2021-09-08 23:31:38 +0200 | kayprish | (~kayprish@cable-188-2-153-140.dynamic.sbb.rs) (Read error: Connection reset by peer) |
2021-09-08 23:34:40 +0200 | bgamari | (~bgamari@72.65.101.163) (Ping timeout: 252 seconds) |
2021-09-08 23:35:23 +0200 | bgamari | (~bgamari@72.65.101.163) |
2021-09-08 23:35:53 +0200 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-09-08 23:36:22 +0200 | rond_ | (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) (Quit: Client closed) |
2021-09-08 23:36:24 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 23:36:43 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 23:40:19 +0200 | zebrag | (~chris@user/zebrag) (Ping timeout: 252 seconds) |
2021-09-08 23:40:42 +0200 | zebrag | (~chris@user/zebrag) |
2021-09-08 23:41:17 +0200 | neo1 | (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 265 seconds) |
2021-09-08 23:41:44 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
2021-09-08 23:41:58 +0200 | amitnjha | (~amit@024-216-124-116.res.spectrum.com) |
2021-09-08 23:44:06 +0200 | MQ-17J | (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) (Read error: Connection reset by peer) |
2021-09-08 23:44:39 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
2021-09-08 23:45:18 +0200 | harveypwca | (~harveypwc@2601:246:c180:a570:2435:ba7:e573:bc26) |
2021-09-08 23:48:19 +0200 | <ldlework> | OK I see that you can do `data Point = Point Int Int` but not `data Point = Point Num Num` |
2021-09-08 23:49:39 +0200 | lavaman | (~lavaman@98.38.249.169) |
2021-09-08 23:50:27 +0200 | <monochrom> | A moment of thought would reveal that it would make no sense even after you gave it a sense. |
2021-09-08 23:50:57 +0200 | <ldlework> | Well the compiler's reasoning is that a type is expected but Num is a Constraint |
2021-09-08 23:51:04 +0200 | <monochrom> | Similar to how Racket's contract "any? -> any?" does not mean Haskell's polymorphic type "a -> a". Far from it. |
2021-09-08 23:51:17 +0200 | MQ-17J | (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
2021-09-08 23:51:29 +0200 | <awpr> | oh, there's a bit more context needed than I assumed; Int is a type, while Num is a typeclass. data constructors' declarations have to have types, so putting Num there is a kind error -- Num is more like a property that types can have, not itself a type. |
2021-09-08 23:51:38 +0200 | infinity0 | (~infinity0@occupy.ecodis.net) (Remote host closed the connection) |
2021-09-08 23:51:50 +0200 | <ldlework> | monochrom: I'm mostly coming from a conceptualization of `type Point<T> { x: T, y: T }` |
2021-09-08 23:52:31 +0200 | <awpr> | if you want Points to be able to contain multiple different types, but to have Num functions available in functions that work with Points, then you want to define Point in a way that it can have any type for its coordinates, like "data Point a = Point a a", and then write functions like "subtract :: Num a => Point a -> Point a -> Point a" |
2021-09-08 23:52:38 +0200 | <monochrom> | That's clearly "data Point t = MkPoint t t" so why would Int or Num be brought up. |
2021-09-08 23:53:30 +0200 | <ldlework> | I appreciate that Haskell's way of doing it keeps the type as polymorphic as possible (if that's the right way to say it) |
2021-09-08 23:54:05 +0200 | <monochrom> | But "type Point<T> { x: T, y: T}" has the exact same polymorphism. |
2021-09-08 23:54:20 +0200 | <awpr> | just like in the example code with angle brackets, the type itself isn't where the constraint goes -- it's exactly the Haskell syntax for what you wrote |
2021-09-08 23:54:20 +0200 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
2021-09-08 23:54:21 +0200 | <monochrom> | You didn't even start with "type Point<T extends Num> { x: T, y: T}" |
2021-09-08 23:54:23 +0200 | cjbayliss | (~cjb@user/cjb) |
2021-09-08 23:54:28 +0200 | <ldlework> | monochrom: right |
2021-09-08 23:54:38 +0200 | <ldlework> | I meant to, sorry. |
2021-09-08 23:54:46 +0200 | cjbayliss | cjb |
2021-09-08 23:55:03 +0200 | infinity0 | (~infinity0@occupy.ecodis.net) |
2021-09-08 23:56:05 +0200 | <awpr> | right, so the Haskell approach is basically noticing that you don't need the Num constraint just to have the thing exist in memory or to build it, you only need it at the moment you start doing numerical stuff with the fields, i.e. in the relevant function definitions |
2021-09-08 23:56:28 +0200 | <iqubic> | Why does the "bits" Traversal from Lens in the Data.Bits.Lens module give me the least significant bits first and how can I reverse the order of the traversal? |
2021-09-08 23:56:57 +0200 | max22- | (~maxime@2a01cb0883359800fdb5051cdabc89f4.ipv6.abo.wanadoo.fr) (Quit: Leaving) |
2021-09-08 23:57:33 +0200 | <iqubic> | This specifically: "https://hackage.haskell.org/package/lens-5.0.1/docs/Data-Bits-Lens.html#v:bits" |
2021-09-08 23:58:01 +0200 | <ldlework> | monochrom: awpr thank you for the explanations |
2021-09-08 23:58:26 +0200 | justsomeguy | (~justsomeg@user/justsomeguy) (Ping timeout: 252 seconds) |