Logs on 2024-11-13 (liberachat/#haskell)
| 00:04:06 | → | yuzu joins (~yuzu@2800:484:2482:7000:8185:93f7:e30f:cb00) |
| 00:04:20 | × | yuzu quits (~yuzu@2800:484:2482:7000:8185:93f7:e30f:cb00) (Client Quit) |
| 00:04:52 | → | yuzu joins (~yuzu@2800:484:2482:7000:8185:93f7:e30f:cb00) |
| 00:07:31 | × | sprotte24 quits (~sprotte24@p200300d16f2cc30041d9df5443f92151.dip0.t-ipconnect.de) (Quit: Leaving) |
| 00:12:50 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
| 00:13:02 | → | ljdarj1 joins (~Thunderbi@user/ljdarj) |
| 00:13:07 | × | yuzu quits (~yuzu@2800:484:2482:7000:8185:93f7:e30f:cb00) (Quit: Client closed) |
| 00:14:23 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 00:16:50 | × | ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 248 seconds) |
| 00:16:50 | ljdarj1 | is now known as ljdarj |
| 00:17:21 | × | Everything quits (~Everythin@178-133-145-205.mobile.vf-ua.net) (Quit: leaving) |
| 00:18:12 | × | KicksonButt quits (~quassel@187.21.174.221) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 00:27:07 | ← | L29Ah parts (~L29Ah@wikipedia/L29Ah) () |
| 00:27:54 | × | xff0x quits (~xff0x@2405:6580:b080:900:50c5:d80f:bb7d:df5c) (Ping timeout: 260 seconds) |
| 00:31:04 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 00:35:56 | × | Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
| 00:43:37 | × | EvanR quits (~EvanR@user/evanr) (Remote host closed the connection) |
| 00:43:56 | → | EvanR joins (~EvanR@user/evanr) |
| 00:44:49 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds) |
| 01:03:08 | <Axman6> | bailsman: that feels like you're reinventing https://hackage.haskell.org/package/vector-0.13.2.0/docs/Data-Vector.html#v:imap? or something else? I think what you've written will have to repeatedly freeze and copy the vector so it's going to be very slow. |
| 01:03:45 | → | Square joins (~Square@user/square) |
| 01:04:15 | × | remexre quits (~remexre@user/remexre) (Remote host closed the connection) |
| 01:04:37 | → | remexre joins (~remexre@user/remexre) |
| 01:04:47 | <Axman6> | uh, actually, isn't that just map? |
| 01:06:53 | <Axman6> | Even if things aren't being copied, you're incurring a bounds check for every index. mapM (pure . f) v would be much more efficient, and more idomatic (it took me ages to figure out what that code was actually doing) |
| 01:07:47 | × | comonad quits (~comonad@p200300d027186300edf824b7b80a34ff.dip0.t-ipconnect.de) (Ping timeout: 244 seconds) |
| 01:07:56 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
| 01:09:59 | → | comonad joins (~comonad@p200300d0270bcb00d2bd35ff80c069c9.dip0.t-ipconnect.de) |
| 01:26:33 | <haskellbridge> | <zwro> > [0..] !! maxBound |
| 01:27:43 | <haskellbridge> | <zwro> come on |
| 01:27:44 | <haskellbridge> | > [0..] !! maxBound |
| 01:27:49 | <lambdabot> | mueval-core: Time limit exceeded |
| 01:28:58 | <Rembane> | Wouldn't that be maxBound +/- 1? |
| 01:29:01 | <Rembane> | > maxBound |
| 01:29:03 | <lambdabot> | () |
| 01:29:04 | <Rembane> | :D |
| 01:29:40 | <jackdk> | > [0..] !! fromEnum (maxBound) |
| 01:29:42 | <lambdabot> | error: |
| 01:29:42 | <lambdabot> | • Could not deduce (Enum a0) arising from a use of ‘fromEnum’ |
| 01:29:42 | <lambdabot> | from the context: (Num a, Enum a) |
| 01:29:50 | <jackdk> | darn I was hoping it'd default |
| 01:29:57 | <monochrom> | @type [0..] !! maxBound |
| 01:29:58 | <lambdabot> | (Num a, Enum a) => a |
| 01:30:17 | <monochrom> | > maxBound :: Integer |
| 01:30:19 | <lambdabot> | error: |
| 01:30:19 | <lambdabot> | • No instance for (Bounded Integer) |
| 01:30:19 | <lambdabot> | arising from a use of ‘maxBound’ |
| 01:30:29 | <Rembane> | > maxBound :: Int |
| 01:30:30 | <lambdabot> | 9223372036854775807 |
| 01:30:36 | <Rembane> | That's a big number. |
| 01:31:33 | <monochrom> | > [maxBound] `asTypeOf` [0..] !! maxBound |
| 01:31:34 | <lambdabot> | error: |
| 01:31:34 | <lambdabot> | • Ambiguous type variable ‘a0’ arising from a use of ‘show_M452416577057... |
| 01:31:34 | <lambdabot> | prevents the constraint ‘(Show a0)’ from being solved. |
| 01:32:01 | <monochrom> | Ah maybe parens |
| 01:32:06 | <monochrom> | > [maxBound] `asTypeOf` ([0..] !! maxBound) |
| 01:32:07 | <lambdabot> | error: |
| 01:32:07 | <lambdabot> | • No instance for (Num [()]) arising from a use of ‘e_10’ |
| 01:32:07 | <lambdabot> | • In the expression: e_10 |
| 01:32:19 | <monochrom> | Oh oops I am a type error |
| 01:32:26 | <monochrom> | > maxBound `asTypeOf` ([0..] !! maxBound) |
| 01:32:28 | <lambdabot> | error: |
| 01:32:28 | <lambdabot> | • Ambiguous type variable ‘a0’ arising from a use of ‘show_M414883925847... |
| 01:32:28 | <lambdabot> | prevents the constraint ‘(Show a0)’ from being solved. |
| 01:32:31 | → | xff0x joins (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) |
| 01:33:16 | <monochrom> | Haha I guess I fail at type inference. |
| 01:33:56 | <yin> | what are you trying to do? |
| 01:34:36 | <geekosaur> | this sounds like someone put in the Num instance for () again? |
| 01:34:38 | <monochrom> | I am trying to understand what [0..] !! maxBound defaults to. |
| 01:34:51 | <yin> | :t [0..] !! maxBound |
| 01:34:52 | <lambdabot> | (Num a, Enum a) => a |
| 01:35:00 | <yin> | Integer probably |
| 01:35:10 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
| 01:35:13 | <monochrom> | > ([0..] !! maxBound) :: Integer |
| 01:35:19 | <lambdabot> | mueval-core: Time limit exceeded |
| 01:35:20 | <yin> | [0 :: Integer] !! (maxBound :: Int) |
| 01:35:49 | <monochrom> | Ooohhhh I am a moron. x!!y forces y :: Int. |
| 01:35:57 | <yin> | yes :) |
| 01:36:16 | <yin> | i mean not that you're a moron. the second part |
| 01:36:38 | <monochrom> | haha |
| 01:36:56 | <monochrom> | I somehow had [0..maxBound] stuck in my mind. |
| 01:37:16 | <yin> | intuitively makes sense |
| 01:42:03 | × | ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 245 seconds) |
| 01:47:34 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 01:47:53 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 02:02:17 | → | tomku joins (~tomku@user/tomku) |
| 02:11:18 | × | Square quits (~Square@user/square) (Remote host closed the connection) |
| 02:13:24 | × | ph88 quits (~ph88@2a02:8109:9e26:c800:b27:4ecf:926d:786) (Remote host closed the connection) |
| 02:15:12 | → | Square joins (~Square@user/square) |
| 02:17:05 | <haskellbridge> | <zwro> ghci defaulting to () for constrained polymorphic types happens because it's the simplest thing you can print. ghc would complain |
| 02:18:16 | <haskellbridge> | <zwro> it's the most sensible thing to print |
| 02:18:16 | <haskellbridge> | > :t mempty |
| 02:18:17 | <lambdabot> | <hint>:1:1: error: parse error on input ‘:’ |
| 02:18:32 | <haskellbridge> | <zwro> er |
| 02:18:32 | <haskellbridge> | :t mempty |
| 02:18:33 | <lambdabot> | Monoid a => a |
| 02:18:52 | <haskellbridge> | <zwro> there we go |
| 02:18:52 | <haskellbridge> | > mempty |
| 02:18:54 | <lambdabot> | () |
| 02:21:00 | → | weary-traveler joins (~user@user/user363627) |
| 02:30:42 | × | ZLima12 quits (~zlima12@user/meow/ZLima12) (Ping timeout: 276 seconds) |
| 02:31:07 | → | ZLima12 joins (~zlima12@user/meow/ZLima12) |
| 02:40:09 | × | glguy quits (glguy@libera/staff/glguy) (Quit: Quit) |
| 02:46:33 | × | weary-traveler quits (~user@user/user363627) (Quit: Konversation terminated!) |
| 02:47:33 | × | machinedgod quits (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 252 seconds) |
| 02:49:48 | × | alp quits (~alp@2001:861:e3d6:8f80:46dd:be45:db8:fbc7) (Ping timeout: 272 seconds) |
| 02:51:01 | → | weary-traveler joins (~user@user/user363627) |
| 02:53:04 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
| 02:58:07 | → | glguy joins (glguy@libera/staff/glguy) |
| 03:20:48 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 03:30:49 | × | td_ quits (~td@i5387092B.versanet.de) (Ping timeout: 252 seconds) |
| 03:32:38 | → | td_ joins (~td@i53870901.versanet.de) |
| 03:36:41 | × | alphazone quits (~alphazone@2.219.56.221) (Ping timeout: 252 seconds) |
| 03:44:42 | → | alp joins (~alp@2001:861:e3d6:8f80:a847:8724:8ab7:c88b) |
| 03:47:09 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 03:50:03 | <EvanR> | inany case [0..] !! maxBound, maxBound +1, maxBound - 1 all make sense, it's infinite. Other than maxBound + 1 not being a thing |
| 03:50:39 | <EvanR> | :t (!!) |
| 03:50:40 | <lambdabot> | [a] -> Int -> a |
| 03:53:15 | <EvanR> | this type signature for this operation is so disappoint |
| 03:53:44 | <EvanR> | more like [a] -> Int -> a or crash, who knows |
| 04:15:03 | <dibblego> | @type ix |
| 04:15:04 | <lambdabot> | (Ixed m, Applicative f) => Index m -> (IxValue m -> f (IxValue m)) -> m -> f m |
| 04:15:27 | <dibblego> | @type view . ix |
| 04:15:27 | <lambdabot> | (MonadReader s m, Ixed s, Monoid (IxValue s)) => Index s -> m (IxValue s) |
| 04:18:36 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
| 04:25:01 | × | pointlessslippe1 quits (~pointless@62.106.85.17) (Read error: Connection reset by peer) |
| 04:25:33 | → | pointlessslippe1 joins (~pointless@62.106.85.17) |
| 04:40:06 | → | aforemny_ joins (~aforemny@i59F4C560.versanet.de) |
| 04:40:48 | × | aforemny quits (~aforemny@2001:9e8:6cde:dd00:e907:b368:5aa5:db2) (Ping timeout: 245 seconds) |
| 04:44:55 | × | superbil quits (~superbil@114-32-231-70.hinet-ip.hinet.net) (Ping timeout: 240 seconds) |
| 04:46:44 | → | superbil joins (~superbil@114-32-231-70.hinet-ip.hinet.net) |
| 04:50:56 | → | notzmv joins (~daniel@user/notzmv) |
| 04:53:38 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 05:08:05 | → | mange joins (~user@user/mange) |
| 05:12:53 | <Axman6> | @type view . ix `asAppliedTo` undefined |
| 05:12:54 | <lambdabot> | (MonadReader s m, Ixed s, Monoid (IxValue s)) => Index s -> m (IxValue s) |
| 05:16:11 | <jackdk> | @type asAppliedTo |
| 05:16:12 | <lambdabot> | (a -> b) -> a -> a -> b |
| 05:16:25 | <jackdk> | huh? |
| 05:16:34 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 05:16:58 | <Axman6> | it's just const with a resticted type, like all the things in lens which are just id |
| 05:17:20 | <Axman6> | I was trying to get it to expand the m to a function |
| 05:17:36 | <Axman6> | @type \x -> view (ix x) `asAppliedTo` undefined |
| 05:17:37 | <lambdabot> | (Ixed s, Monoid (IxValue s)) => Index s -> s -> IxValue s |
| 05:18:45 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 05:51:42 | → | michalz joins (~michalz@185.246.207.201) |
| 06:24:26 | × | foul_owl quits (~kerry@185.216.231.181) (Ping timeout: 255 seconds) |
| 06:26:22 | → | alphazone joins (~alphazone@2.219.56.221) |
| 06:26:58 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:31:13 | → | Square2 joins (~Square4@user/square) |
| 06:34:19 | × | Square quits (~Square@user/square) (Ping timeout: 264 seconds) |
| 06:36:11 | × | rvalue quits (~rvalue@user/rvalue) (Read error: Connection reset by peer) |
| 06:36:42 | → | rvalue joins (~rvalue@user/rvalue) |
| 06:38:53 | → | foul_owl joins (~kerry@185.216.231.180) |
| 06:49:43 | × | hughjfchen quits (~hughjfche@vmi556545.contaboserver.net) (Quit: WeeChat 4.2.2) |
| 06:50:08 | → | hughjfchen joins (~hughjfche@vmi556545.contaboserver.net) |
| 06:51:34 | × | hughjfchen quits (~hughjfche@vmi556545.contaboserver.net) (Client Quit) |
| 06:52:19 | → | acidjnk_new3 joins (~acidjnk@p200300d6e7283f71e1b1d5072338b10c.dip0.t-ipconnect.de) |
| 06:53:31 | × | notzmv quits (~daniel@user/notzmv) (Ping timeout: 264 seconds) |
| 06:54:05 | → | hughjfchen joins (~hughjfche@vmi556545.contaboserver.net) |
| 07:11:25 | <carbolymer> | > putStrLn "" |
| 07:11:27 | <lambdabot> | <hint>:1:11: error: |
| 07:11:27 | <lambdabot> | lexical error in string/character literal at character '\989599' |
| 07:11:36 | <carbolymer> | how do I put unicode into the source code? |
| 07:13:14 | <probie> | By just putting it in the source |
| 07:13:23 | <probie> | That's not a unicode character |
| 07:14:05 | <carbolymer> | ok that's utf-16 |
| 07:15:41 | <EvanR> | um |
| 07:16:01 | <EvanR> | is that glyph showing 0F199F because that's out of range |
| 07:16:27 | <EvanR> | > maxBound :: Char |
| 07:16:28 | <lambdabot> | '\1114111' |
| 07:16:41 | <EvanR> | though 989599 isn't |
| 07:17:36 | <EvanR> | I'm lost |
| 07:18:32 | <mauke> | > chr 1114112 |
| 07:18:34 | <lambdabot> | *Exception: Prelude.chr: bad argument: 1114112 |
| 07:18:39 | <EvanR> | > generalCategory '' |
| 07:18:40 | <lambdabot> | <hint>:1:18: error: |
| 07:18:40 | <lambdabot> | lexical error in string/character literal at character '\989599' |
| 07:18:43 | <mauke> | > chr 989599 |
| 07:18:45 | <lambdabot> | '\989599' |
| 07:18:55 | <EvanR> | > generalCategory '\989599' |
| 07:18:56 | <lambdabot> | PrivateUse |
| 07:19:18 | <probie> | I'm 80% sure 0F 11 9F isn't a valid utf-16 encoding either |
| 07:19:19 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 264 seconds) |
| 07:19:33 | <probie> | s/11/19/ |
| 07:19:41 | <EvanR> | it's a private use character |
| 07:19:51 | <EvanR> | maybe it's lexically illegal |
| 07:20:53 | <EvanR> | % putStrLn "🦟" |
| 07:20:53 | <yahb2> | 🦟 |
| 07:20:57 | <EvanR> | carbolymer, ^ |
| 07:21:16 | <Maxdamantus> | ghci's readlive thing messes up when you try to write it. |
| 07:21:16 | <carbolymer> | > chr 0xf199f |
| 07:21:18 | <lambdabot> | '\989599' |
| 07:21:22 | <Maxdamantus> | readline* |
| 07:21:25 | <carbolymer> | > putStr $ chr 0xf199f |
| 07:21:26 | <lambdabot> | error: |
| 07:21:26 | <lambdabot> | • Couldn't match type ‘Char’ with ‘[Char]’ |
| 07:21:26 | <lambdabot> | Expected type: String |
| 07:21:33 | <carbolymer> | > putStr $ [chr 0xf199f] |
| 07:21:35 | <lambdabot> | <IO ()> |
| 07:21:39 | <carbolymer> | uh |
| 07:21:42 | <Maxdamantus> | silly people doing silly things with Unicode, imo. |
| 07:21:52 | <EvanR> | lambdabot doesn't run IO but yahb2 does |
| 07:22:09 | <EvanR> | > text "🦟" |
| 07:22:11 | <lambdabot> | 🦟 |
| 07:22:26 | <Maxdamantus> | (Haskell/ghci, that is, not sure which fails to handle it) |
| 07:22:56 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 07:24:33 | <Maxdamantus> | probably Haskell, since it happens outside of ghci, though it's weird that ghci fails to even accept it from the terminal. |
| 07:29:15 | <Maxdamantus> | probie: U+F199F is a valid Unicode Scalar Value, so it can be encoded in all the UTFs, including UTF-16. |
| 07:31:32 | <Maxdamantus> | <DB86 DD9F> is the UTF-16 encoding. |
| 07:38:16 | → | briandaed joins (~root@185.234.210.211) |
| 07:48:42 | → | athostFI joins (~Atte@176-93-56-50.bb.dnainternet.fi) |
| 07:51:45 | <probie> | Maxdamantus: That depends on your definition of "valid". It's in supplementary private use area A. I should probably have said "doesn't refer to a valid character" |
| 07:57:34 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 08:00:00 | × | caconym quits (~caconym@user/caconym) (Quit: bye) |
| 08:00:36 | → | caconym joins (~caconym@user/caconym) |
| 08:04:15 | → | misterfish joins (~misterfis@84.53.85.146) |
| 08:11:01 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 08:25:31 | → | falafel joins (~falafel@2600:1700:99f4:2050:240e:dd91:8d35:c628) |
| 08:26:44 | × | rachelambda quits (~rachelamb@cust-95-80-25-71.csbnet.se) (Ping timeout: 272 seconds) |
| 08:26:54 | × | ThePenguin quits (~ThePengui@cust-95-80-24-166.csbnet.se) (Ping timeout: 276 seconds) |
| 08:28:32 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 08:35:49 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 08:36:03 | → | robobub joins (uid248673@id-248673.uxbridge.irccloud.com) |
| 08:42:45 | → | kuribas joins (~user@2a02:1808:8:e4a6:661f:8d8f:33db:fb5b) |
| 08:45:10 | × | ft quits (~ft@p4fc2a216.dip0.t-ipconnect.de) (Quit: leaving) |
| 08:46:58 | → | CrunchyFlakes joins (~CrunchyFl@ip1f13e94e.dynamic.kabel-deutschland.de) |
| 08:52:10 | → | Smiles joins (uid551636@id-551636.lymington.irccloud.com) |
| 08:54:01 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
| 08:56:21 | × | CrunchyFlakes quits (~CrunchyFl@ip1f13e94e.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 08:57:53 | → | machinedgod joins (~machinedg@d108-173-18-100.abhsia.telus.net) |
| 09:01:15 | → | random-jellyfish joins (~developer@2a02:2f04:11e:c600:1fd7:7df7:7f21:530f) |
| 09:01:15 | × | random-jellyfish quits (~developer@2a02:2f04:11e:c600:1fd7:7df7:7f21:530f) (Changing host) |
| 09:01:15 | → | random-jellyfish joins (~developer@user/random-jellyfish) |
| 09:01:17 | → | CrunchyFlakes joins (~CrunchyFl@31.19.233.78) |
| 09:02:24 | × | kuribas quits (~user@2a02:1808:8:e4a6:661f:8d8f:33db:fb5b) (Ping timeout: 252 seconds) |
| 09:14:58 | × | Alecs quits (~textual@nat16.software.imdea.org) (Quit: Textual IRC Client: www.textualapp.com) |
| 09:26:56 | → | hellwolf joins (~user@2001:1530:70:545:6a17:ff75:1fc9:4603) |
| 09:28:47 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.4.2) |
| 09:35:17 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection) |
| 09:35:45 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 09:47:46 | gehmehgeh | is now known as gmg |
| 09:49:02 | → | lxsameer joins (~lxsameer@Serene/lxsameer) |
| 09:54:49 | × | tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
| 09:56:40 | → | chele joins (~chele@user/chele) |
| 10:03:29 | × | falafel quits (~falafel@2600:1700:99f4:2050:240e:dd91:8d35:c628) (Ping timeout: 260 seconds) |
| 10:03:33 | × | infinity0 quits (~infinity0@pwned.gg) (Remote host closed the connection) |
| 10:03:51 | → | infinity0 joins (~infinity0@pwned.gg) |
| 10:07:05 | → | ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) |
| 10:07:07 | × | ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Client Quit) |
| 10:09:02 | → | agent314 joins (~quassel@static-198-44-129-53.cust.tzulo.com) |
| 10:09:50 | → | lortabac joins (~lortabac@37.165.74.196) |
| 10:10:51 | × | xff0x quits (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 246 seconds) |
| 10:11:33 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 10:17:24 | × | agent314 quits (~quassel@static-198-44-129-53.cust.tzulo.com) (Ping timeout: 276 seconds) |
| 10:18:37 | → | agent314 joins (~quassel@static-198-44-129-53.cust.tzulo.com) |
| 10:18:57 | × | housemate quits (~housemate@146.70.66.228) (Ping timeout: 248 seconds) |
| 10:19:44 | → | mari-estel joins (~mari-este@user/mari-estel) |
| 10:25:21 | → | mari33141 joins (~mari-este@user/mari-estel) |
| 10:27:42 | × | mari-estel quits (~mari-este@user/mari-estel) (Ping timeout: 272 seconds) |
| 10:32:01 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 10:33:01 | → | pavonia joins (~user@user/siracusa) |
| 10:44:35 | × | alp quits (~alp@2001:861:e3d6:8f80:a847:8724:8ab7:c88b) (Ping timeout: 252 seconds) |
| 10:49:12 | × | SlackCoder quits (~SlackCode@64-94-63-8.ip.weststar.net.ky) (Quit: Leaving) |
| 10:49:34 | × | lortabac quits (~lortabac@37.165.74.196) (Quit: WeeChat 4.4.2) |
| 11:02:31 | × | youthlic quits (~Thunderbi@user/youthlic) (Quit: youthlic) |
| 11:05:18 | → | youthlic joins (~Thunderbi@user/youthlic) |
| 11:11:13 | × | Smiles quits (uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 11:12:03 | → | ThePenguin joins (~ThePengui@cust-95-80-24-166.csbnet.se) |
| 11:12:48 | → | housemate joins (~housemate@146.70.66.228) |
| 11:14:10 | → | xff0x joins (~xff0x@2405:6580:b080:900:ca42:e655:d7e4:ec2b) |
| 11:18:00 | → | alp joins (~alp@2001:861:e3d6:8f80:1d14:b56d:a21c:ca06) |
| 11:20:09 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 11:21:53 | × | Teacup quits (~teacup@user/teacup) (Quit: No Ping reply in 180 seconds.) |
| 11:23:12 | → | Teacup joins (~teacup@user/teacup) |
| 11:42:54 | × | tomboy64 quits (~tomboy64@user/tomboy64) (Ping timeout: 252 seconds) |
| 11:44:56 | → | Everything joins (~Everythin@46.211.114.113) |
| 11:54:47 | × | weary-traveler quits (~user@user/user363627) (Remote host closed the connection) |
| 11:56:25 | → | tomboy64 joins (~tomboy64@user/tomboy64) |
| 11:57:05 | × | mari33141 quits (~mari-este@user/mari-estel) (Quit: bye) |
| 11:57:41 | → | weary-traveler joins (~user@user/user363627) |
| 12:04:33 | × | acidjnk_new3 quits (~acidjnk@p200300d6e7283f71e1b1d5072338b10c.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 12:05:38 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 12:20:51 | → | mari-estel joins (~mari-este@user/mari-estel) |
| 12:22:30 | × | Natch quits (~natch@c-92-34-7-158.bbcust.telenor.se) (Ping timeout: 252 seconds) |
| 12:25:26 | → | Natch joins (~natch@c-92-34-7-158.bbcust.telenor.se) |
| 12:26:59 | → | acidjnk_new3 joins (~acidjnk@p200300d6e7283f718455f4c967233051.dip0.t-ipconnect.de) |
| 12:49:49 | × | random-jellyfish quits (~developer@user/random-jellyfish) (Quit: Leaving) |
| 12:51:12 | → | turlando joins (~turlando@user/turlando) |
| 12:54:59 | × | flow quits (~none@gentoo/developer/flow) (Ping timeout: 260 seconds) |
| 12:59:43 | × | mange quits (~user@user/mange) (Quit: Zzz...) |
| 13:01:31 | → | Flow joins (~none@gentoo/developer/flow) |
| 13:13:56 | × | mari-estel quits (~mari-este@user/mari-estel) (Quit: battery) |
| 13:20:11 | → | Digitteknohippie joins (~user@user/digit) |
| 13:20:25 | × | Digit quits (~user@user/digit) (Ping timeout: 252 seconds) |
| 13:32:31 | × | alp quits (~alp@2001:861:e3d6:8f80:1d14:b56d:a21c:ca06) (Ping timeout: 252 seconds) |
| 13:34:47 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 13:39:02 | × | acidjnk_new3 quits (~acidjnk@p200300d6e7283f718455f4c967233051.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 13:39:20 | → | acidjnk_new3 joins (~acidjnk@p200300d6e7283f718455f4c967233051.dip0.t-ipconnect.de) |
| 13:42:57 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer) |
| 13:43:07 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 13:51:12 | → | alp joins (~alp@2001:861:e3d6:8f80:483c:b8c6:93d5:82bd) |
| 13:52:47 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 13:53:38 | × | agent314 quits (~quassel@static-198-44-129-53.cust.tzulo.com) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 13:53:53 | → | ash3en joins (~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) |
| 13:53:53 | → | cstml joins (~user@94.125.135.250) |
| 13:54:04 | → | img joins (~img@user/img) |
| 13:55:08 | × | ash3en quits (~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) (Client Quit) |
| 13:57:06 | × | cstml quits (~user@94.125.135.250) (Quit: bye) |
| 14:00:19 | × | Digitteknohippie quits (~user@user/digit) (Ping timeout: 260 seconds) |
| 14:03:19 | × | ircbrowse_tom quits (~ircbrowse@user/tomsmeding/bot/ircbrowse-tom) (ZNC 1.9.0+deb2build3 - https://znc.in) |
| 14:05:44 | → | ircbrowse_tom joins (~ircbrowse@user/tomsmeding/bot/ircbrowse-tom) |
| 14:05:45 | Server | sets mode +Cnt |
| 14:05:53 | → | tomsmeding joins (~tomsmedin@2a01:4f8:c0c:5e5e::2) |
| 14:13:08 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer) |
| 14:14:06 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 14:15:30 | <tomsmeding> | Hecate: not replying to the email because I'm not a ghc expert but iirc GHC uses a bumping allocator, so if you allocate a bunch of heap nodes right after each other, they will end up adjacently in memory. So you get memory locality, but still pointers. |
| 14:16:43 | <tomsmeding> | Furthermore, if there aren't any pointers into tail elements of your list, the GC will always traverse the list from head to tail. If you use the copying GC (i.e. not --nonmoving-gc), then it will (I think!) copy values in order of visiting them, so even if the list wasn't packed beforehand, they will be anyway after a GC pass. |
| 14:17:01 | <tomsmeding> | I think this is what you were referring to in your original email |
| 14:18:40 | <tomsmeding> | % putStr [Data.Char.chr 0xf1991] -- carbolymer: yahb allows you to run IO |
| 14:18:40 | <yahb2> | |
| 14:25:27 | → | mari-estel joins (~mari-este@user/mari-estel) |
| 14:28:08 | <Hecate> | tomsmeding: thanks |
| 14:29:05 | <yin> | what is this exceptional character that my terminal renders correctly but not the Element app? |
| 14:32:47 | <yin> | |
| 14:37:19 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 264 seconds) |
| 14:41:04 | → | alexherbo2 joins (~alexherbo@2a02:8440:3117:f07c:59a9:a91e:4d8c:de8d) |
| 14:47:17 | → | ash3en joins (~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) |
| 14:53:01 | × | gorignak quits (~gorignak@user/gorignak) (Quit: quit) |
| 14:53:32 | → | gorignak joins (~gorignak@user/gorignak) |
| 15:02:45 | × | alexherbo2 quits (~alexherbo@2a02:8440:3117:f07c:59a9:a91e:4d8c:de8d) (Remote host closed the connection) |
| 15:03:08 | → | alexherbo2 joins (~alexherbo@2a02-8440-3117-f07c-59a9-a91e-4d8c-de8d.rev.sfr.net) |
| 15:03:12 | × | gorignak quits (~gorignak@user/gorignak) (Quit: quit) |
| 15:03:43 | → | gorignak joins (~gorignak@user/gorignak) |
| 15:04:18 | × | hellwolf quits (~user@2001:1530:70:545:6a17:ff75:1fc9:4603) (Quit: rcirc on GNU Emacs 29.4) |
| 15:04:37 | → | hellwolf joins (~user@2001:1530:70:545:6a17:ff75:1fc9:4603) |
| 15:06:35 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 15:09:17 | → | Smiles joins (uid551636@id-551636.lymington.irccloud.com) |
| 15:09:45 | → | Digit joins (~user@user/digit) |
| 15:19:20 | × | mesaoptimizer quits (~mesaoptim@user/PapuaHardyNet) (Quit: mesaoptimizer) |
| 15:26:51 | → | mesaoptimizer joins (~mesaoptim@user/PapuaHardyNet) |
| 15:29:37 | × | mulk quits (~mulk@pd95146e9.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
| 15:37:37 | × | gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer) |
| 15:38:10 | × | Everything quits (~Everythin@46.211.114.113) (Quit: leaving) |
| 15:40:50 | → | e-snail joins (~pete@user/e-snail) |
| 15:43:29 | → | gentauro joins (~gentauro@user/gentauro) |
| 15:43:40 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 15:48:13 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 15:50:24 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 15:55:56 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.4.2) |
| 15:58:53 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 16:00:07 | → | mulk joins (~mulk@pd95146e9.dip0.t-ipconnect.de) |
| 16:19:23 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 16:19:49 | <EvanR> | private use area |
| 16:22:54 | × | Square2 quits (~Square4@user/square) (Ping timeout: 246 seconds) |
| 16:23:16 | → | rvalue- joins (~rvalue@user/rvalue) |
| 16:23:25 | × | Pixi` quits (~Pixi@user/pixi) (Quit: Leaving) |
| 16:24:07 | × | rvalue quits (~rvalue@user/rvalue) (Ping timeout: 264 seconds) |
| 16:25:21 | × | acidjnk_new3 quits (~acidjnk@p200300d6e7283f718455f4c967233051.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 16:29:18 | rvalue- | is now known as rvalue |
| 16:36:08 | <EvanR> | according to wikipedia "code points in the Private Use Areas are not noncharacters, reserved, or unassigned". By classical logic, not non-characters implies "character" xD. Later it quotes standard talking about characters which are assigned code points in the private use area. So there might actually be characters involved, but haskell has no way to know what they are |
| 16:36:51 | × | mari-estel quits (~mari-este@user/mari-estel) (Quit: on the move) |
| 16:36:58 | <EvanR> | it just seems the lexical stage rejects these Chars entirely |
| 16:47:40 | <EvanR> | > generalCategory 'A' |
| 16:47:43 | <lambdabot> | UppercaseLetter |
| 16:49:01 | <EvanR> | they're referring to codepoint type and not general category though, which we don't seem to have a function for out of the box |
| 16:52:48 | <geekosaur> | yes, the lexer hates PUA characters. I hit that several years ago |
| 16:53:04 | <geekosaur> | I think I brought it up in #ghc and ended up not bothering to file a bug |
| 17:04:08 | → | acidjnk_new3 joins (~acidjnk@p200300d6e7283f71b028663737269d4f.dip0.t-ipconnect.de) |
| 17:05:22 | <EvanR> | rivate-use code points are considered to be assigned characters, but the abstract characters associated with them have no interpretation specified by this standard |
| 17:05:31 | <EvanR> | prepend P |
| 17:08:24 | <geekosaur> | (Ubuntu ships a font with nice PUA chars in it which can be useful in XMonad configs 🙂 ) |
| 17:09:00 | × | euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.) |
| 17:13:16 | × | machinedgod quits (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 252 seconds) |
| 17:14:49 | → | euphores joins (~SASL_euph@user/euphores) |
| 17:18:18 | × | ash3en quits (~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) (Quit: ash3en) |
| 17:21:57 | × | AlexZenon quits (~alzenon@5.139.233.174) (Ping timeout: 248 seconds) |
| 17:22:57 | × | AlexNoo quits (~AlexNoo@5.139.233.174) (Ping timeout: 248 seconds) |
| 17:24:52 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 17:26:51 | <hellwolf> | �PNG |
| 17:26:51 | <hellwolf> | |
| 17:26:51 | <hellwolf> | y��p��w��t��p�mKGEѥ�h\Tȟ�A@@ګ�xxr�Ϳ���������JJIҦ�eYR��r�ziqbX\TNΣ��|k��ul^U�l_Ҧ�FDB^UNi\TĜ�{i]̢�tdYIIH����������˽ssm�}l[RMaWPԨ�Ф�̡��m`ޯ�^UOޮ�n`W��n��rqql�ʼ���cc`�´���SSQWPK��p��mcXQk^Ul_VeZR��|����µdd`BBB������z�uf��y`VP��{QLHj]T֩�fZR��o��t��w��oܭ�Ϥ�HEC~~x���CCBUURcc_NJG��|�}k֨�paWwf[\SMJGE |
| 17:26:51 | <hellwolf> | ��z���z�rc��|�xhש�ECBbb_UUSݮ�HFDPKGGECRMI�oag[S��vVOK���u�j |
| 17:26:52 | <hellwolf> | P |
| 17:26:52 | <hellwolf> | (�,�4���B�98�$7/?�! ��`Ӆ@,a��0�k�je�B\��R�(�����30((*)���0��khji3�i��j:�z��F��&�f���V�6@�m��l���]\��=f{zy� |
| 17:26:53 | <hellwolf> | �)+���^YU |
| 17:26:54 | <hellwolf> | ���mE%�4(E��ɰˠ�q�8(m���u_�����Zk�M?P��Ь�G��y�)��|�ޏ��hج |
| 17:27:11 | <haskellbridge> | <hellwolf> sorry, my bad. |
| 17:28:14 | <tomsmeding> | how did that even happen O.o |
| 17:28:38 | <tomsmeding> | how do you accidentally paste a png and send it |
| 17:28:51 | <hellwolf> | emacs <-- |
| 17:29:37 | tomsmeding | is happy to not use emacs, then :p |
| 17:30:37 | × | statusbot6 quits (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (Remote host closed the connection) |
| 17:30:46 | → | statusbot joins (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) |
| 17:34:20 | <systemfault> | Blame the user of the OS, not the OS itself :P |
| 17:37:02 | → | Guest|73 joins (~Guest|73@eduroam-int-pat-8-252.ucl.ac.uk) |
| 17:37:09 | × | Guest|73 quits (~Guest|73@eduroam-int-pat-8-252.ucl.ac.uk) (Client Quit) |
| 17:48:38 | <EvanR> | says "systemfault" |
| 17:48:52 | <systemfault> | EvanR: I'm definitely faulty :) |
| 17:49:00 | × | acidjnk_new3 quits (~acidjnk@p200300d6e7283f71b028663737269d4f.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 18:01:13 | → | acidjnk_new3 joins (~acidjnk@p200300d6e7283f7100fa0b96aa6639bf.dip0.t-ipconnect.de) |
| 18:01:15 | → | Pixi joins (~Pixi@user/pixi) |
| 18:02:22 | → | tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
| 18:05:07 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 18:05:37 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 18:06:51 | → | ft joins (~ft@p4fc2a216.dip0.t-ipconnect.de) |
| 18:13:54 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 18:18:17 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:20:25 | × | alexherbo2 quits (~alexherbo@2a02-8440-3117-f07c-59a9-a91e-4d8c-de8d.rev.sfr.net) (Remote host closed the connection) |
| 18:21:36 | → | alexherbo2 joins (~alexherbo@2a02-8440-3117-f07c-156a-8e41-bb43-7316.rev.sfr.net) |
| 18:25:12 | × | alexherbo2 quits (~alexherbo@2a02-8440-3117-f07c-156a-8e41-bb43-7316.rev.sfr.net) (Remote host closed the connection) |
| 18:27:54 | × | red-snail1 quits (~snail@static.151.210.203.116.clients.your-server.de) (Quit: ZNC 1.8.2 - https://znc.in) |
| 18:28:48 | → | red-snail joins (~snail@static.151.210.203.116.clients.your-server.de) |
| 18:37:42 | × | athostFI quits (~Atte@176-93-56-50.bb.dnainternet.fi) (Ping timeout: 252 seconds) |
| 18:40:02 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 18:40:03 | <bailsman> | Can it make sense to encapsulate a mutable vector in a state transformer monad whose version of runState internally does something with runST? That way the 'pure world' doesn't really need to know or care how you implemented things internally. You just get an interface against which you can do defined operations on the monad. |
| 18:40:31 | <bailsman> | The one thing I find "concerning" is that this means every function that operates on your data is inside your monad, but maybe that's just good and proper and how things are done. |
| 18:40:42 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 18:41:04 | <tomsmeding> | bailsman: also consider `newtype LinearState s a = LinearState (s %1-> (s, a))` with -XLinearTypes |
| 18:41:22 | <tomsmeding> | (and https://hackage.haskell.org/package/linear-base-0.4.0/docs/Data-Array-Mutable-Linear.html ) |
| 18:41:59 | <tomsmeding> | bailsman: but yes, having a monad over ST, where the ST part is hidden, is perfectly fine and sensible haskell |
| 18:42:38 | <tomsmeding> | whether it makes sense to encapsulate access to the vector in a monad if you could also just have the vector as a separate object that you can manipulate in ST, depends on your application |
| 18:42:45 | → | Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) |
| 18:43:29 | <bailsman> | Well presumably putting your entire codebase in an IO monad would be missing some kind of point. But I wonder if making your own monad with a very clearly defined set of operations is not as bad. |
| 18:43:50 | <tomsmeding> | that design is essentially behind ~every effects library in haskell |
| 18:44:07 | <tomsmeding> | which are ~all monads over IO, but the only methods you can use are the ones from the effects you're handling |
| 18:44:15 | <tomsmeding> | which may _optionall_ include IO, as an explicit effect |
| 18:47:49 | → | mari-estel joins (~mari-este@user/mari-estel) |
| 18:53:25 | <EvanR> | having an App monad which extends / is based on IO is popular, presumably not missing that point you refer to. But it's also not IO-less |
| 18:53:38 | <EvanR> | and definitely not monad-less |
| 18:54:32 | → | ljdarj joins (~Thunderbi@user/ljdarj) |
| 18:54:36 | <EvanR> | you're right to question every function in the program returning an IO type, that sounds ridiculous |
| 18:54:41 | <EvanR> | many operations don't need IO |
| 18:55:03 | <EvanR> | but when you are thinking in OOP terms and everything is based on a mutable object, you can get into an IO trap |
| 18:55:23 | <EvanR> | this is where immutable IntMap can clean things up a lot |
| 18:55:54 | <EvanR> | in lieu of a mutable vector |
| 19:00:10 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 19:16:30 | <lxsameer> | is there any way to ask GHC to automatically derive Applicative and Monad for a type like `Foo a`? |
| 19:16:32 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 272 seconds) |
| 19:17:19 | <tomsmeding> | lxsameer: if Foo is a newtype over a thing that already has Applicative and Monad, -XGeneralisedNewtypeDeriving |
| 19:17:37 | <tomsmeding> | if not: no, there may be multiple valid Applicative and/or Monad instances and GHC has no way of knowing which you intended |
| 19:17:40 | <lxsameer> | tomsmeding: oh coool |
| 19:17:52 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 19:17:53 | <lxsameer> | tomsmeding: yeah it is a newtype |
| 19:18:49 | <haskellbridge> | <zwro> tbf ghc derives some classes wich could have multiple valid instances |
| 19:19:11 | <haskellbridge> | <zwro> but it's sensible about it |
| 19:19:29 | <tomsmeding> | sure, Ord takes constructor ordering |
| 19:19:52 | <tomsmeding> | that's indeed making a choice, but it's a much less surprising choice than choosing an Applicative instance, I think |
| 19:19:57 | <tomsmeding> | (compare [] and ZipList) |
| 19:21:19 | × | hellwolf quits (~user@2001:1530:70:545:6a17:ff75:1fc9:4603) (Ping timeout: 260 seconds) |
| 19:21:50 | <haskellbridge> | <zwro> Show, Read (cof), Enum, Functor, Foldable, Traversable... |
| 19:21:59 | <tomsmeding> | Functor too? |
| 19:22:16 | <haskellbridge> | <zwro> oh yes |
| 19:23:25 | <haskellbridge> | <zwro> Tuples are the trivial example |
| 19:24:15 | <tomsmeding> | % :set -XDeriveFunctor |
| 19:24:15 | <yahb2> | <no output> |
| 19:24:21 | <tomsmeding> | % data Foo a = Foo (a, a, Int) deriving (Functor) |
| 19:24:21 | <yahb2> | <no output> |
| 19:24:30 | <tomsmeding> | % fmap succ (Foo (1, 2, 3)) |
| 19:24:30 | <yahb2> | <interactive>:21:1: error: [GHC-39999] ; • No instance for ‘Show (Foo Integer)’ ; arising from a use of ‘Yahb2Defs.limitedPrint’ ; • In a stmt of an interactive GHCi command: ; ... |
| 19:24:33 | <tomsmeding> | % data Foo a = Foo (a, a, Int) deriving (Functor, Show) |
| 19:24:33 | <yahb2> | <no output> |
| 19:24:36 | <tomsmeding> | % fmap succ (Foo (1, 2, 3)) |
| 19:24:36 | <yahb2> | Foo (2,3,3) |
| 19:24:46 | <tomsmeding> | zwro: I'm not sure what alternatives to this you see |
| 19:27:45 | <haskellbridge> | <zwro> This is an opinionated: |
| 19:27:45 | <haskellbridge> | ... long message truncated: https://kf8nh.com/_heisenbridge/media/kf8nh.com/HSmXMIbpQghlwNZFkYjjTngB/VRxH3eG4CT4 (3 lines) |
| 19:27:58 | <haskellbridge> | <zwro> come on, matrix |
| 19:28:14 | <haskellbridge> | <zwro> here |
| 19:28:14 | <haskellbridge> | > fmap succ (0,0) |
| 19:28:16 | <lambdabot> | (0,1) |
| 19:28:24 | <haskellbridge> | <zwro> there |
| 19:28:24 | <haskellbridge> | fmap succ (0,0,0) |
| 19:28:36 | <haskellbridge> | <zwro> er |
| 19:28:36 | <haskellbridge> | > fmap succ (0,0,0) |
| 19:28:38 | <lambdabot> | (0,0,1) |
| 19:28:52 | <tomsmeding> | that's the Functor instance for tuples, not the rules GHC uses for automatically deriving Functor |
| 19:28:57 | <tomsmeding> | I was talking about the deriving machinery |
| 19:29:25 | <haskellbridge> | <zwro> my point is that there is no obvious way, and the deriving mechanism is opinionated |
| 19:29:40 | <tomsmeding> | no, the deriving mechanism does the right thing for a data type |
| 19:29:50 | <tomsmeding> | the only sensible Functor instance for that Foo is the one it derives |
| 19:30:06 | <tomsmeding> | the only sensible Functor instance for (a, b, c) is indeed the one GHC defines for tuples, because it's ((,,) a b c) |
| 19:30:14 | <tomsmeding> | and Functor, by its kind, maps over the last type-argument |
| 19:30:28 | <tomsmeding> | it may look weird, but by the types it must be this |
| 19:32:03 | <haskellbridge> | <zwro> point taken |
| 19:32:14 | <tomsmeding> | similarly for Foldable on tuples |
| 19:32:20 | <haskellbridge> | <zwro> but what about trees? |
| 19:32:25 | <tomsmeding> | I would be the last one to say that `length (1,2,3) == 1` is intuitive |
| 19:32:25 | → | ash3en joins (~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) |
| 19:32:41 | <tomsmeding> | zwro: which class? Functor doesn't give one a lot of leeway |
| 19:33:02 | <tomsmeding> | for Ord, Foldable, Traversable you do definitely have a choice of ordering, which constructor does it visit in which order; GHC makes a choice here |
| 19:33:08 | <c_wraith> | that's not intuitive, but I'm not comfortable declaring tuples aren't foldable or that foldable provide length |
| 19:33:09 | <tomsmeding> | but I would argue it's a very sensible choice |
| 19:33:23 | <c_wraith> | Err. Or that foldable shouldn't provide length |
| 19:33:35 | <tomsmeding> | sure |
| 19:34:08 | <tomsmeding> | (my point was: I agree with your feelings, but the types imply this: "feels weird" =/=> "there are other choices for GHC's deriving mechanism") |
| 19:34:30 | <tomsmeding> | (one could of course design the _classes_ differently, but that's a separate topic) |
| 19:37:13 | × | ash3en quits (~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) (Client Quit) |
| 19:40:14 | → | alexherbo2 joins (~alexherbo@2a02-8440-3117-f07c-987b-fc29-77ee-addd.rev.sfr.net) |
| 19:40:38 | <haskellbridge> | <thirdofmay18081814goya> long time user of "List", now need to use arrays from performance-critical usecase (processing logs, text files of more than 3 million lines) |
| 19:40:51 | <haskellbridge> | <thirdofmay18081814goya> can I still think in terms of ana/cata/hylo or will this destroy the performance benefits? |
| 19:41:46 | <EvanR> | Vector is pretty good |
| 19:41:55 | <EvanR> | has a lot of instances like List does |
| 19:42:03 | <tomsmeding> | goya: how are they defined for Vector? |
| 19:42:14 | <EvanR> | but is implemented behind the scenes in a compact way |
| 19:42:42 | <EvanR> | and has a bunch of snazzy rewrite rules for fusion |
| 19:42:53 | × | abrar quits (~abrar@pool-72-78-199-167.phlapa.fios.verizon.net) (Ping timeout: 245 seconds) |
| 19:43:00 | <haskellbridge> | <thirdofmay18081814goya> what module for said "Vector"? |
| 19:43:11 | <EvanR> | vector package, Data.Vector |
| 19:43:28 | <tomsmeding> | it has a Foldable instance, and there are various methods |
| 19:43:35 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 19:43:43 | <tomsmeding> | there are no recursion schemes for the thing because, well, it's not a tree |
| 19:44:25 | <EvanR> | you can still treat it like a representable functor |
| 19:44:40 | <tomsmeding> | goya: if you point to the precise "ana/cata/hylo" methods that you mean (there are various packages defining them in various ways iirc), then we could see how compatible the type signatures would be |
| 19:44:55 | <haskellbridge> | <zwro> tomsmeding: you're absolutely correct. my examples were bad. i'm sure i had some kind of problem with driving Functor in the past but can't remember the exact case. maybe later it'll come to me |
| 19:45:05 | <EvanR> | had to review the log carefully to see who "goya" is xD |
| 19:45:05 | → | abrar joins (~abrar@pool-72-78-199-167.phlapa.fios.verizon.net) |
| 19:45:50 | <tomsmeding> | thirdofmay18081814goya: how should we properly mention you, because it's bridged (and not plumbed) your mxid is not a nick here, so we don't have autocomplete |
| 19:47:00 | <haskellbridge> | <thirdofmay18081814goya> uh well I'm mostly reasoning very loosely about cata/ana, wrt List the significant part in both cases is a pattern match on "cons" into some other datatype (cata very loosely) or a pattern match on some other type onto "List" (ana very loosely) |
| 19:47:07 | <haskellbridge> | <thirdofmay18081814goya> i.e. the general ability to pattern match |
| 19:47:21 | <tomsmeding> | you should not treat a Vector as a linked list |
| 19:47:25 | <tomsmeding> | but you can foldr |
| 19:47:30 | <haskellbridge> | <thirdofmay18081814goya> vs. the imperative representation of arrays as things you "for" loop over |
| 19:47:31 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 19:47:49 | <haskellbridge> | <thirdofmay18081814goya> tomsmeding: anything really i usually use my usernames as memory palaces |
| 19:47:54 | <tomsmeding> | and you can unfoldrN (unfoldr with a known target size) |
| 19:48:24 | <tomsmeding> | but really, just glance through https://hackage.haskell.org/package/vector-0.13.2.0/docs/Data-Vector.html |
| 19:49:04 | <haskellbridge> | <thirdofmay18081814goya> i'll have a look i was weary of just focusing on the existence of the "Foldable" instance by fear of the possibility it would just throw out the performance benefits |
| 19:49:17 | <tomsmeding> | no Foldable/Traversable are perfectly fine |
| 19:49:26 | <tomsmeding> | what you should be wary of is tail/cons |
| 19:49:51 | <tomsmeding> | read-only you can do essentially whatever you wish; for producing vectors, you should try to produce the whole thing in one go |
| 19:50:19 | × | weary-traveler quits (~user@user/user363627) (Remote host closed the connection) |
| 19:51:18 | <tomsmeding> | (so tail/init etc. are actually quite fine, they are O(1) and just produce views on the underlying data) |
| 19:52:31 | → | mantraofpie_ joins (~mantraofp@user/mantraofpie) |
| 19:52:36 | <haskellbridge> | <thirdofmay18081814goya> wait sorry I'm not fully understanding, what distinguishes tail/init vs. tail/cons? |
| 19:52:47 | <tomsmeding> | tail and init are read-only |
| 19:52:51 | → | hellwolf joins (~user@0e2f-3a3b-aecf-adb3-0f00-4d40-07d0-2001.sta.estpak.ee) |
| 19:52:52 | <tomsmeding> | cons creates a new vector |
| 19:53:46 | × | mantraofpie quits (~mantraofp@user/mantraofpie) (Ping timeout: 260 seconds) |
| 19:53:46 | <tomsmeding> | Data.Vector has GHC rewrite rules (RULEs) that try to make creating vectors fast even if you use multiple functions after each other (e.g. cons, append, fromList), but for best results, try to create the whole thing in one go |
| 19:54:03 | <tomsmeding> | as long as you're just reading into an existing immutable vector, almost anything sensible is fast |
| 19:54:09 | <haskellbridge> | <thirdofmay18081814goya> oh wow ok the package annotates each function's time complexity |
| 19:54:13 | <tomsmeding> | yes |
| 19:54:26 | <tomsmeding> | `containers` also does (Data.Map etc.) |
| 19:55:36 | <haskellbridge> | <thirdofmay18081814goya> ok i will spend a while reading these and their source, highly appreciate the comments tyvm |
| 19:55:56 | → | machinedgod joins (~machinedg@d108-173-18-100.abhsia.telus.net) |
| 19:56:13 | <tomsmeding> | reading the source here is not likely to be very enlightening :D |
| 19:56:23 | <tomsmeding> | vector tries a bit too hard to be generic with a bunch of stuff |
| 19:56:33 | <lxsameer> | in the following syntax `class Monad m => MonadReader r m | m -> r where` that pipe reads as MonadReader on r m OR m -> r, correct? |
| 19:56:42 | <tomsmeding> | no |
| 19:56:46 | <tomsmeding> | -XFunctionalDependencies |
| 19:56:53 | <tomsmeding> | https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/functional_dependencies.html#extension-FunctionalDependencies |
| 19:57:12 | × | ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 276 seconds) |
| 19:57:41 | <lxsameer> | tomsmeding: was that `no` for me? |
| 19:57:52 | <geekosaur> | in general a single vertical bar in Haskell is read as "where" or "such that" |
| 19:57:56 | <geekosaur> | not as "or" |
| 19:57:58 | <tomsmeding> | lxsameer: yes :) |
| 19:58:09 | <lxsameer> | ah got it, thanks folks |
| 19:58:11 | <tomsmeding> | the `|` is more like the `|` in a list comprehension, and the `->` is a bit like implication here |
| 19:58:14 | <tomsmeding> | but read the manual |
| 19:59:15 | <lxsameer> | tomsmeding: since I don't know the name of this concept, i don't know what to search in the manual |
| 19:59:18 | → | ljdarj joins (~Thunderbi@user/ljdarj) |
| 20:00:05 | × | caconym quits (~caconym@user/caconym) (Quit: bye) |
| 20:00:44 | → | caconym joins (~caconym@user/caconym) |
| 20:04:30 | × | mari-estel quits (~mari-este@user/mari-estel) (Quit: good night) |
| 20:07:45 | × | alexherbo2 quits (~alexherbo@2a02-8440-3117-f07c-987b-fc29-77ee-addd.rev.sfr.net) (Ping timeout: 256 seconds) |
| 20:08:26 | <yin> | functional dependencies |
| 20:08:42 | <yin> | it's a language extension |
| 20:08:43 | <lxsameer> | cheers |
| 20:10:20 | <dmj`> | haskell report, "Modules may be mutually recursive." |
| 20:12:15 | → | sprotte24 joins (~sprotte24@p200300d16f059400e8d39b8ffa006815.dip0.t-ipconnect.de) |
| 20:12:58 | → | CoolMa7 joins (~CoolMa7@ip5f5b8957.dynamic.kabel-deutschland.de) |
| 20:14:16 | <tomsmeding> | lxsameer: https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/functional_dependencies.html#extension-FunctionalDependencies |
| 20:14:18 | <tomsmeding> | :p |
| 20:16:00 | <lxsameer> | tomsmeding: thank you |
| 20:25:23 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 245 seconds) |
| 20:27:55 | <lxsameer> | I have a `Conext` type that basically is the state of my program, I pass it almost everywhere. At the moment it's just a record. Some functions will return a new context. Does it make sense to do something like `newtype Context a = Context (ReaderT State .... a) deriving (Monad, MonadReader, ....)`? |
| 20:32:49 | → | CrunchyFlakes_ joins (~CrunchyFl@ip1f13e94e.dynamic.kabel-deutschland.de) |
| 20:32:52 | × | CrunchyFlakes quits (~CrunchyFl@31.19.233.78) (Ping timeout: 244 seconds) |
| 20:32:55 | → | mestre joins (~mestre@192.145.217.7) |
| 20:34:16 | × | mestre quits (~mestre@192.145.217.7) (Client Quit) |
| 20:37:45 | <mauke> | sure, except Reader doesn't really let you modify the state |
| 20:37:55 | <mauke> | unless you put IORefs in your record or something |
| 20:38:22 | × | Smiles quits (uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 20:39:05 | × | briandaed quits (~root@185.234.210.211) (Remote host closed the connection) |
| 20:40:25 | × | alp quits (~alp@2001:861:e3d6:8f80:483c:b8c6:93d5:82bd) (Remote host closed the connection) |
| 20:40:43 | → | alp joins (~alp@2001:861:e3d6:8f80:8dec:7d0f:9187:87d0) |
| 20:43:21 | <yin> | lxsameer: if you want to take the opportunity to get fancy https://blog.csongor.co.uk/time-travel-in-haskell-for-dummies/ |
| 20:43:39 | <yin> | and fall in live with Haskell all over again |
| 20:43:47 | <yin> | s/live/love |
| 20:43:58 | <yin> | (laugh) |
| 20:45:52 | <lxsameer> | mauke: yin thanks folks |
| 20:50:14 | × | lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 255 seconds) |
| 20:55:16 | → | weary-traveler joins (~user@user/user363627) |
| 21:02:14 | → | cuteguest joins (~cuteguest@67-134-33-194.dia.static.qwest.net) |
| 21:02:17 | → | Everything joins (~Everythin@46.211.104.82) |
| 21:03:32 | × | cuteguest quits (~cuteguest@67-134-33-194.dia.static.qwest.net) (Client Quit) |
| 21:13:15 | ← | L29Ah parts (~L29Ah@wikipedia/L29Ah) () |
| 21:15:48 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 21:30:50 | × | michalz quits (~michalz@185.246.207.201) (Remote host closed the connection) |
| 21:31:10 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 21:34:18 | ← | L29Ah parts (~L29Ah@wikipedia/L29Ah) () |
| 21:53:04 | → | agent314 joins (~quassel@static-198-44-129-53.cust.tzulo.com) |
| 22:01:21 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 248 seconds) |
| 22:02:11 | × | ubert quits (~Thunderbi@178.165.164.236.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
| 22:03:53 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 22:07:07 | × | misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 265 seconds) |
| 22:08:33 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 265 seconds) |
| 22:16:29 | × | agent314 quits (~quassel@static-198-44-129-53.cust.tzulo.com) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 22:19:43 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 22:32:07 | → | Digitteknohippie joins (~user@user/digit) |
| 22:32:39 | × | Digit quits (~user@user/digit) (Ping timeout: 260 seconds) |
| 22:32:58 | → | ash3en joins (~Thunderbi@31.16.203.214) |
| 22:33:34 | × | ash3en quits (~Thunderbi@31.16.203.214) (Client Quit) |
| 22:34:07 | → | ash3en joins (~Thunderbi@31.16.203.214) |
| 22:38:38 | Digitteknohippie | is now known as Digit |
| 22:40:40 | → | alexherbo2 joins (~alexherbo@2a02-8440-3117-f07c-987b-fc29-77ee-addd.rev.sfr.net) |
| 22:44:13 | → | visilii_ joins (~visilii@85.172.76.118) |
| 22:45:08 | × | ash3en quits (~Thunderbi@31.16.203.214) (Quit: ash3en) |
| 22:45:19 | × | visilii quits (~visilii@213.24.132.178) (Ping timeout: 260 seconds) |
| 22:47:44 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 22:49:08 | × | visilii_ quits (~visilii@85.172.76.118) (Ping timeout: 252 seconds) |
| 22:51:23 | → | visilii joins (~visilii@213.24.133.209) |
| 23:01:51 | → | falafel joins (~falafel@2600:1700:99f4:2050:41b3:d17e:817a:4e83) |
| 23:02:55 | × | Everything quits (~Everythin@46.211.104.82) (Quit: leaving) |
| 23:28:22 | → | Xe_ joins (~Xe@perl/impostor/xe) |
| 23:29:11 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 23:29:57 | × | acidjnk_new3 quits (~acidjnk@p200300d6e7283f7100fa0b96aa6639bf.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 23:32:33 | → | acidjnk_new3 joins (~acidjnk@p200300d6e7283f717cba866c0fa9f7cd.dip0.t-ipconnect.de) |
| 23:47:47 | <jackdk> | I want to provide a type family-shaped helper that identifies the type of a record field, something like `FieldType "foo" MyRecord` reducing to `Bar`. I can get at the type of a field by looking at the fundep on the `HasField` class (GHC gives me in `instance HasField "foo" MyRecord Bar`, but is there a good idiom for binding and returning that type variable using a type family? |
| 23:48:23 | × | alexherbo2 quits (~alexherbo@2a02-8440-3117-f07c-987b-fc29-77ee-addd.rev.sfr.net) (Remote host closed the connection) |
| 23:49:22 | × | CoolMa7 quits (~CoolMa7@ip5f5b8957.dynamic.kabel-deutschland.de) (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 23:49:54 | → | athostFI joins (~Atte@176-93-56-50.bb.dnainternet.fi) |
| 23:50:52 | × | alp quits (~alp@2001:861:e3d6:8f80:8dec:7d0f:9187:87d0) (Remote host closed the connection) |
| 23:51:04 | <Axman6> | This feels like it might be easier with generics-sop, but it's been a long time since I looked at any of these things |
| 23:51:40 | → | alp joins (~alp@2001:861:e3d6:8f80:cd0a:c39d:37b7:c1a3) |
| 23:53:05 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 23:53:24 | × | alp quits (~alp@2001:861:e3d6:8f80:cd0a:c39d:37b7:c1a3) (Remote host closed the connection) |
| 23:54:14 | → | alp joins (~alp@2001:861:e3d6:8f80:c1d0:6a01:957c:3af2) |
| 23:55:56 | × | alp quits (~alp@2001:861:e3d6:8f80:c1d0:6a01:957c:3af2) (Remote host closed the connection) |
All times are in UTC on 2024-11-13.