Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-22 21:26:57 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-11-22 21:27:02 asnyx joins (~asnyx@brettgilio.com)
2020-11-22 21:27:22 × fxg quits (~fxg@unaffiliated/fxg) (Ping timeout: 260 seconds)
2020-11-22 21:28:02 brettgilio joins (~brettgili@brettgilio.com)
2020-11-22 21:28:09 <maerwald> "A National Public Radio report in 2013 stated that about 20% of all U.S. computer programmers are female.[39] In open source fields, only 10% of programmers are women."
2020-11-22 21:28:17 × coot quits (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2020-11-22 21:29:02 × funkatron quits (~funkatron@178.239.168.171) (Remote host closed the connection)
2020-11-22 21:29:08 <maerwald> Haskell scores 3%
2020-11-22 21:29:25 boxscape joins (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55)
2020-11-22 21:29:48 <maerwald> Could be an objective for the haskell foundation
2020-11-22 21:31:16 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-11-22 21:31:50 × larou quits (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) (Ping timeout: 256 seconds)
2020-11-22 21:31:50 × fen quits (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) (Ping timeout: 256 seconds)
2020-11-22 21:32:19 larou joins (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145)
2020-11-22 21:33:35 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
2020-11-22 21:34:25 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection)
2020-11-22 21:35:30 <merijn> maerwald: Well, there's confounding factors too, like "where is the survey circulated"
2020-11-22 21:35:31 <maerwald> "I think that Haskell libraries provide a stable API." -- 42% agree, wat?
2020-11-22 21:35:47 <merijn> maerwald: That depends which libraries you depend on :p
2020-11-22 21:35:57 <maerwald> The only stable library must be Aeson
2020-11-22 21:36:17 <maerwald> even servant constantly changes API
2020-11-22 21:37:35 <maerwald> cabal hell, stack, nix-style builds etc are all because of this
2020-11-22 21:38:27 incertia joins (~incertia@d4-50-42-33.try.wideopenwest.com)
2020-11-22 21:39:55 christo joins (~chris@81.96.113.213)
2020-11-22 21:42:09 × larou quits (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) (Quit: Connection closed)
2020-11-22 21:44:07 × christo quits (~chris@81.96.113.213) (Ping timeout: 246 seconds)
2020-11-22 21:48:22 × czwartyeon quits (~czwartyeo@77-45-55-99.sta.asta-net.com.pl) (Remote host closed the connection)
2020-11-22 21:50:15 × alp quits (~alp@2a01:e0a:58b:4920:2897:b6df:8696:52ed) (Ping timeout: 272 seconds)
2020-11-22 21:50:21 jneira joins (02896ac0@gateway/web/cgi-irc/kiwiirc.com/ip.2.137.106.192)
2020-11-22 21:52:24 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection)
2020-11-22 21:53:02 phaul joins (~phaul@ruby/staff/phaul)
2020-11-22 21:53:35 <dminuoso> Let's say you have some ADT which can be serialized `data D = T Text | ...`, where serialization encodes Text into UTF8. The protocol format puts an upper limit of say 251 bytes of the resulting ByteString - is there even a point to having a separate validation routine here, or should I just add exceptions to my serializer?
2020-11-22 21:53:36 × gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 240 seconds)
2020-11-22 21:54:13 <koz_> dminuoso: 'Resulting bytestring' means the whole thing, ro just the Text part?
2020-11-22 21:54:53 <dminuoso> The Text part. All other things I can analyze beforehand (almost all other things have fixed size, and ByteString is easy enough to check its length)
2020-11-22 21:55:33 <koz_> The only other thing I can think of is making some kind of 'BoundedText' newtype wrapper (or a builder I guess) to check the size in UTF-8 bytes as you go.
2020-11-22 21:55:41 <koz_> But that sounds much more annoying.
2020-11-22 21:55:52 <dminuoso> Well an UTF-8 backed string would be ideal :p
2020-11-22 21:56:02 <koz_> dminuoso: There's a UTF-8 rope package I think?
2020-11-22 21:56:09 <koz_> And short-text exists.
2020-11-22 21:56:10 <dminuoso> https://hackage.haskell.org/package/text-utf8
2020-11-22 21:56:14 <koz_> (though both have limited APIs)
2020-11-22 21:56:24 <dminuoso> https://hackage.haskell.org/package/text-short
2020-11-22 21:56:24 <koz_> s/short-text/ShortText/
2020-11-22 21:56:26 <dminuoso> Mmm
2020-11-22 21:56:29 <koz_> Yeah dat one.
2020-11-22 21:56:37 <dminuoso> Actually, text-short might actually be interesting to look at
2020-11-22 21:56:46 <koz_> It depends how much text manip you require.
2020-11-22 21:56:53 <koz_> Its API for that is _much_ more limited.
2020-11-22 21:57:01 <koz_> (though not necessarily out of necessity)
2020-11-22 21:57:06 <monochrom> If the serializer throws exception, it will be hard to catch unless the serializer is in IO and pretty eager about text-too-long.
2020-11-22 21:57:13 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 264 seconds)
2020-11-22 21:57:17 f-a parts (~f-a@151.68.159.209) ()
2020-11-22 21:57:23 <koz_> monochrom: Yeah, that's a valid point actually.
2020-11-22 21:57:31 <koz_> (I've been bitten by similar issues in the past)
2020-11-22 21:57:52 <dminuoso> monochrom: what do you mean by "hard to catch"? If this is some ExceptT (possibly as a ContT variant), then that seems easy to catch in pure code
2020-11-22 21:58:14 <monochrom> Oh, then that one is easy to catch. I keep forgetting ExceptT.
2020-11-22 21:58:16 feliocrat joins (~feliocrat@95.70.154.29)
2020-11-22 21:58:21 siwica joins (~user@p200300f6171ea70026a3ceac3db524b2.dip0.t-ipconnect.de)
2020-11-22 21:58:32 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 260 seconds)
2020-11-22 21:59:22 <dminuoso> I'd write this with my own `newtype ExceptT e m a = ExceptT { runExceptT :: forall o. (e -> m o) -> (a -> m o) -> m o) }`
2020-11-22 21:59:22 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
2020-11-22 21:59:48 <koz_> 'e -> m o' made me lol.
2020-11-22 22:00:30 Rudd0 joins (~Rudd0@185.189.115.108)
2020-11-22 22:01:03 × gxt quits (~gxt@gateway/tor-sasl/gxt) (Ping timeout: 240 seconds)
2020-11-22 22:01:30 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection)
2020-11-22 22:01:43 <monochrom> I normally don't separate out "isValid :: X -> Bool" and "useItAssumeValid :: X -> Y". I simply have one single "use :: X -> Maybe Y".
2020-11-22 22:01:47 <dminuoso> So the idea of ShortText is not bad, but since this is a library it could annoy users with dealing yet-another-text data type
2020-11-22 22:02:14 dminuoso wishes Text was UTF-8 backed
2020-11-22 22:02:20 <koz_> dminuoso: You can always do a newtype wrapper which tracks the byte length as UTF-8 over Text, but it sounds annoying AF.
2020-11-22 22:02:52 <dminuoso> I guess, deferring validation to serialization is my best bet.
2020-11-22 22:03:03 <dminuoso> Unless I want to encode twice
2020-11-22 22:03:09 <dminuoso> Or find elaborate tricks to memoize and reuse the result
2020-11-22 22:03:18 <dminuoso> But that seems a bit more challenging
2020-11-22 22:03:38 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-11-22 22:03:41 gxt joins (~gxt@gateway/tor-sasl/gxt)
2020-11-22 22:04:29 × boxscape quits (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Quit: Connection closed)
2020-11-22 22:05:03 <Uniaika> What was the rationale for Text to be UTF-16 backed?
2020-11-22 22:05:34 <Uniaika> also, how are we supposed to write "name-that-contains-hyphens"-adjective?
2020-11-22 22:05:45 <Uniaika> do we remove the last hyphen?
2020-11-22 22:05:51 <maerwald> "We're currently investigating the feasibility of changing Text's internal representation to UTF-8 and if you need such a Text type right now you might be interested in using the spin-off packages text-utf8 and text-short."
2020-11-22 22:06:03 <Uniaika> maerwald: 👍
2020-11-22 22:06:12 <koz_> maerwald: They've been investigating this feasibility for precisely this end of forever now.
2020-11-22 22:08:14 <monochrom> You can meaningful create a betting pool for: Which one of the following will happen first? The next Haskell standard? Text concluding its study of using UTF-8?
2020-11-22 22:08:29 <koz_> monochrom: I think your best bet in such is not to play at all.
2020-11-22 22:08:41 <monochrom> Yeah hehe
2020-11-22 22:08:52 <Uniaika> haha
2020-11-22 22:08:56 × fendor quits (~fendor@078132052150.public.t-mobile.at) (Ping timeout: 240 seconds)
2020-11-22 22:09:06 <maerwald> we'll have linear and dependent types way before that and still deal with String as default text type, yes
2020-11-22 22:09:16 Tario joins (~Tario@201.192.165.173)
2020-11-22 22:09:20 <monochrom> Here, I think this one is really worth playing: The next Haskell standard? Text concluding its study of using UTF-8? Physicists unifying quantum mechanics and gravity?
2020-11-22 22:09:33 <koz_> monochrom: My money is on that last one.
2020-11-22 22:09:36 <Uniaika> same
2020-11-22 22:09:42 <koz_> The first two involve considerably more cat-herding.
2020-11-22 22:09:52 fendor joins (~fendor@078132052150.public.t-mobile.at)
2020-11-22 22:10:35 <dminuoso> My money is on the impossibility of a GUT.
2020-11-22 22:10:52 <koz_> dminuoso: IANAP (I Am Not A Physicist).
2020-11-22 22:11:17 <dminuoso> Neither am I, which is why I'm betting money.
2020-11-22 22:11:32 <maerwald> Use your money for something useful instead
2020-11-22 22:11:40 <monochrom> My experience with computer people is this. They talked about "I wish for a LaTeX plugin for IRC" for 30 years.

All times are in UTC.