2026/02/23

Newest at the top

2026-02-23 15:02:10 +0100 <c_wraith> I guess you could do some TH stuff to wrap unsafePackAddressLen at compile time, so it's O(1) at runtime
2026-02-23 15:01:03 +0100 <int-e> (And I believe `unpackCString` exists because the amount of code generated for large string literals would otherwise be quite substantial.)
2026-02-23 15:00:19 +0100 <c_wraith> see https://hackage-content.haskell.org/package/bytestring-0.12.2.0/docs/Data-ByteString-Unsafe.html#v…
2026-02-23 15:00:15 +0100forell(~forell@user/forell) forell
2026-02-23 14:59:57 +0100forell(~forell@user/forell) (Server closed connection)
2026-02-23 14:59:50 +0100 <Milan_Vanca> If I were...
2026-02-23 14:59:35 +0100 <c_wraith> You can use Addr# literals with -XMagicHash, and then use them with unsafePackAddress
2026-02-23 14:59:10 +0100raincomplex(~rain@user/raincomplex) raincomplex
2026-02-23 14:58:57 +0100 <Milan_Vanca> __monty__: It is something that could theoretically be done. But had I been developer of GHC I would not do it.
2026-02-23 14:58:56 +0100 <int-e> (`unpackCstring#` is used by GHC to compile string literals)
2026-02-23 14:58:36 +0100 <int-e> __monty__: kind of, because of https://github.com/haskell/bytestring/blob/master/Data/ByteString/Internal/Type.hs#L423-L426
2026-02-23 14:57:15 +0100raincomplex(~rain@user/raincomplex) (Read error: Connection reset by peer)
2026-02-23 14:56:45 +0100 <__monty__> Are there any that are converted at compile time?
2026-02-23 14:55:57 +0100 <Milan_Vanca> Question... even with using OverloadedStrings there are still String instances that are converted to ByteString in runtime right? Compiler is not smart enough to "bake" ByteStrings to executable right?
2026-02-23 14:54:42 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2026-02-23 14:54:33 +0100 <Milan_Vanca> Yes I know, but isn't problem about Wai/Warp using ByteStrings? SO I have to provide ByteString. So Either I create my own function String -> ByteString, and use it everywhere. Or I use OverloadedStrings and use default implementation of IsString instance. (Which don't work for all UTF8 chars that could be specified in String)
2026-02-23 14:51:32 +0100DragonMaus(~DragonMau@user/dragonmaus) DragonMaus
2026-02-23 14:51:17 +0100DragonMaus(~DragonMau@user/dragonmaus) (Server closed connection)
2026-02-23 14:50:45 +0100 <merijn> You're not required to use that
2026-02-23 14:50:41 +0100 <merijn> I mean, that's just an example
2026-02-23 14:49:55 +0100 <Milan_Vanca> merijn: If you look here https://www.stackage.org/package/wai it uses OverloadedStrings
2026-02-23 14:42:20 +0100 <merijn> Milan_Vanca: What are you using the IsString for bytestring for anyway?
2026-02-23 14:38:52 +0100CloneOfNone(~CloneOfNo@user/CloneOfNone) CloneOfNone
2026-02-23 14:38:37 +0100CloneOfNone(~CloneOfNo@user/CloneOfNone) (Server closed connection)
2026-02-23 14:30:37 +0100dyniec(~dyniec@dybiec.info) dyniec
2026-02-23 14:28:21 +0100califax(~califax@user/califx) califx
2026-02-23 14:27:02 +0100dyniec(~dyniec@dybiec.info) (Remote host closed the connection)
2026-02-23 14:26:58 +0100tromp(~textual@2001:1c00:3487:1b00:309d:e3b0:b1c4:2c66) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-02-23 14:26:12 +0100califax_(~califax@user/califx) (Ping timeout: 252 seconds)
2026-02-23 14:25:06 +0100califax(~califax@user/califx) (Ping timeout: 252 seconds)
2026-02-23 14:24:52 +0100GoldsteinQ(~goldstein@goldstein.lol)
2026-02-23 14:24:37 +0100GoldsteinQ(~goldstein@goldstein.lol) (Server closed connection)
2026-02-23 14:20:54 +0100califax_(~califax@user/califx) califx
2026-02-23 14:19:42 +0100dyniec(~dyniec@dybiec.info)
2026-02-23 14:15:47 +0100merijn(~merijn@77.242.116.146) merijn
2026-02-23 14:15:00 +0100mrvdb(~mrvdb@2001:19f0:5000:8582:5400:ff:fe07:3df5) mrvdb
2026-02-23 14:14:46 +0100mrvdb(~mrvdb@185.92.221.186) (Server closed connection)
2026-02-23 14:12:26 +0100 <int-e> . o O ( Not only is this a truly astonishing insight, it's also absolutely brilliant! )
2026-02-23 14:11:29 +0100philopsos1(~caecilius@user/philopsos) philopsos
2026-02-23 14:10:10 +0100dibblego(~dibblego@haskell/developer/dibblego) dibblego
2026-02-23 14:10:10 +0100dibblego(~dibblego@116-255-1-119.ip4.superloop.au) (Changing host)
2026-02-23 14:10:10 +0100dibblego(~dibblego@116-255-1-119.ip4.superloop.au)
2026-02-23 14:09:57 +0100dibblego(~dibblego@haskell/developer/dibblego) (Server closed connection)
2026-02-23 14:07:52 +0100tromp(~textual@2001:1c00:3487:1b00:309d:e3b0:b1c4:2c66)
2026-02-23 14:06:57 +0100 <kuribas> I liked it much better when interactive with AI felt more like a conversation.
2026-02-23 14:05:38 +0100 <kaol> I hate it when the text generation box compliments me. "Absolutely brilliant leap to make" yeah right.
2026-02-23 14:05:31 +0100comerijn(~merijn@77.242.116.146) (Ping timeout: 268 seconds)
2026-02-23 14:04:18 +0100 <kaol> I just asked Gemini to explain EBMs and after staring at some code I asked that isn't this a comonad and it spouted an instance for it then. I haven't tried any of it yet.
2026-02-23 14:02:48 +0100tromp(~textual@2001:1c00:3487:1b00:309d:e3b0:b1c4:2c66) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-02-23 13:58:29 +0100L29Ah(~L29Ah@wikipedia/L29Ah) L29Ah