Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,017 events total
2021-08-07 17:09:38 × noddy quits (~user@user/noddy) (Read error: Connection reset by peer)
2021-08-07 17:10:12 noddy joins (~user@user/noddy)
2021-08-07 17:15:05 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-08-07 17:19:40 MQ-17J joins (~MQ-17J@8.21.10.94)
2021-08-07 17:20:16 retroid_ joins (~retro@5ec19a54.skybroadband.com)
2021-08-07 17:20:24 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-08-07 17:23:28 <dsal> I had written all this code for collapsing folding newlines into spaces and making sure that duplicate spaces were removed when logging potentially large errors from a remote API and it turned out my code wasn't doing anything more than `unwords . words`
2021-08-07 17:23:59 × peterhil quits (~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi) (Ping timeout: 252 seconds)
2021-08-07 17:24:06 <geekosaur> heh
2021-08-07 17:24:36 × kor1 quits (~kor1@user/kor1) (Quit: Leaving.)
2021-08-07 17:26:23 <c_wraith> > "the first\n\none" & worded %~ id -- lens has an improper optic for this!
2021-08-07 17:26:24 <lambdabot> "the first one"
2021-08-07 17:26:41 × fef quits (~thedawn@user/thedawn) (Remote host closed the connection)
2021-08-07 17:26:55 <dsal> `%~ id` looks funny.
2021-08-07 17:27:02 <c_wraith> because it is :)
2021-08-07 17:27:21 <c_wraith> it would do exactly nothing with a lawful optic
2021-08-07 17:28:29 <dsal> Oh, that's neat. That might be useful if my function weren't `String -> String`
2021-08-07 17:31:38 <c_wraith> > "the first\n\none" & worded %~ map toUpper
2021-08-07 17:31:39 <lambdabot> "THE FIRST ONE"
2021-08-07 17:32:07 <c_wraith> works properly with some String -> String functions
2021-08-07 17:34:16 hrnz joins (~ulli@irc.plumbing)
2021-08-07 17:37:02 <raehik> I'm trying to parse a UTF-8 CSV, and Cassava appears not to accept UTF-8. is that the case or is my config broke
2021-08-07 17:37:32 <monochrom> cassava accepts UTF-8 for me.
2021-08-07 17:37:35 <raehik> very confused that they use Chars and Text but fall over on *any* non-ASCII
2021-08-07 17:38:02 <geekosaur> "falls over" how?
2021-08-07 17:38:04 <raehik> could I run things on lambdabot here (or would the pkg not be here)
2021-08-07 17:38:24 <monochrom> lambdabot doesn't have cassava.
2021-08-07 17:38:57 <raehik> geekosaur: I get unusual "conversion error, cannot decode byte" msgs, telling me invalid UTF-8 stream
2021-08-07 17:39:17 <raehik> > Data.Csv.decode Data.Csv.NoHeader "テスト"
2021-08-07 17:39:19 <lambdabot> error:
2021-08-07 17:39:19 <lambdabot> Not in scope: ‘Data.Csv.decode’
2021-08-07 17:39:19 <lambdabot> No module named ‘Data.Csv’ is imported.error:
2021-08-07 17:39:22 <Hecate> raehik: any chance you could provide a repro?
2021-08-07 17:39:41 <c_wraith> raehik: cassava claims that it only works with UTF-8
2021-08-07 17:39:51 <tomsmeding> raehik: try running 'iconv -f utf8 -t utf8 your_file.csv' and see if that gives an error; if so, the file has invalid utf8
2021-08-07 17:39:58 <c_wraith> raehik: is there any chance your data *isn't* UTF-8?
2021-08-07 17:40:16 <raehik> I haven't actually tested any files yet, only Bytestrings and Text
2021-08-07 17:40:30 <raehik> urgh maybe that's why, b/c they're not UTF-8?
2021-08-07 17:40:46 <c_wraith> that would fit the error message you're reporting
2021-08-07 17:40:50 <Athas> Does anyone know of a Haskell implementation of the bfloat16 format? I can't find one on Hackage.
2021-08-07 17:41:02 fef joins (~thedawn@user/thedawn)
2021-08-07 17:42:08 <raehik> gah what a weird error. So I'm unable to test in GHCi, but regular files will work fine
2021-08-07 17:42:21 <raehik> thanks for the assistance, that's very unintuitive
2021-08-07 17:42:29 <c_wraith> is your terminal set to a different encoding?
2021-08-07 17:42:38 <c_wraith> that matters when you're typing things in interactively
2021-08-07 17:42:42 <monochrom> Is this Windows? Is your code page not 65001?
2021-08-07 17:42:51 <raehik> Linux, LANG=en_US.UTF-8
2021-08-07 17:42:59 <raehik> Use UTF-8 (CJK) regularly in terminal
2021-08-07 17:43:31 <c_wraith> wait. cassava uses bytestrings for input.
2021-08-07 17:43:55 <tomsmeding> perhaps post the actual byte contents of a failing bytestring?
2021-08-07 17:44:04 <c_wraith> how are you converting? OverloadedStrings doesn't really do the right thing for bytestring
2021-08-07 17:44:09 <raehik> OH so thaaat's why. I got the typevars the wrong way round
2021-08-07 17:44:12 <monochrom> Oh right, OverloadedString for ByteString is flawed.
2021-08-07 17:44:20 <tomsmeding> OverloadedStrings is evil
2021-08-07 17:44:30 <raehik> hahahaha thank you everyone
2021-08-07 17:44:32 <c_wraith> yeah, I never use it.
2021-08-07 17:44:50 <raehik> I did confirm it was sth to do with that, wrapping in (BL.fromStrict . Text.encodeUtf8) fixed it
2021-08-07 17:45:02 <monochrom> I use it when it's "abc123" not my Chinese name.
2021-08-07 17:45:03 <c_wraith> yep, that sounds right
2021-08-07 17:45:41 AnselmSchler[m] joins (~schuelerm@2001:470:69fc:105::d032)
2021-08-07 17:45:47 <c_wraith> honestly, turning on OverloadedStrings breaks things anyway.
2021-08-07 17:45:54 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-07 17:47:36 <davean> OverloadedStrings with ByteString is scary
2021-08-07 17:47:53 <AnselmSchler[m]> why?
2021-08-07 17:48:05 <davean> AnselmSchler[m]: Because its an invalid instance
2021-08-07 17:48:24 schuelermine joins (~anselmsch@user/schuelermine)
2021-08-07 17:48:43 <AnselmSchler[m]> davean: How so?
2021-08-07 17:48:49 <geekosaur> feed it utf8 and it will corrupt it
2021-08-07 17:48:50 <monochrom> You have literally just seen why.
2021-08-07 17:48:54 × schuelermine quits (~anselmsch@user/schuelermine) (Client Quit)
2021-08-07 17:49:00 <geekosaur> no, they joined too late to see it
2021-08-07 17:49:02 <monochrom> Err nevermind.
2021-08-07 17:49:04 <AnselmSchler[m]> monochrom: no I haven’ŧ
2021-08-07 17:49:11 <tomsmeding> The docs even say it :) https://hackage.haskell.org/package/bytestring-0.10.12.0/docs/Data-ByteString.html#t:ByteString
2021-08-07 17:49:16 <AnselmSchler[m]> I guess
2021-08-07 17:49:40 <tomsmeding> AnselmSchler[m]: https://ircbrowse.tomsmeding.com/day/lchaskell/today?id=129487#trid129487
2021-08-07 17:49:41 <davean> Theres no prescribed relation between ByteString and String
2021-08-07 17:49:42 <AnselmSchler[m]> but I wouldn’t consider that scary, since it’s a literal and you can just not put Unicode in there
2021-08-07 17:49:53 <davean> So it can't have a correct instance
2021-08-07 17:49:56 <tomsmeding> except someone did :)
2021-08-07 17:50:13 <AnselmSchler[m]> tomsmeding: ooh, I didn’t know that sort of website existed! Thanks for the link.
2021-08-07 17:50:39 <davean> AnselmSchler[m]: So if I put in code 200 in there, what is it?
2021-08-07 17:51:07 <AnselmSchler[m]> davean: what do you mean by that?
2021-08-07 17:51:32 <AnselmSchler[m]> U+00C8?
2021-08-07 17:51:33 <davean> If I have code point 200 in my string, and you use OverloadedStrings to ByteString, what is it?
2021-08-07 17:51:58 <AnselmSchler[m]> an error, I’d assume
2021-08-07 17:52:10 <davean> No, that instance never errors
2021-08-07 17:52:13 <davean> thats whats so scary about it
2021-08-07 17:52:16 <davean> it just does SOMETHING
2021-08-07 17:52:21 <davean> often, who the fuck knows what
2021-08-07 17:52:36 <AnselmSchler[m]> oh
2021-08-07 17:52:39 <AnselmSchler[m]> hm
2021-08-07 17:52:50 <AnselmSchler[m]> does it just do UTF8 encoding?
2021-08-07 17:53:01 <tomsmeding> no, it puts a byte with value 200 in the bytestring
2021-08-07 17:53:13 <tomsmeding> which is not what you want if you expect valid utf8 to come out
2021-08-07 17:53:17 <tomsmeding> (the docs say it! :p)
2021-08-07 17:53:19 <davean> tomsmeding: sure, once you know its that, but getting it there involves locals
2021-08-07 17:53:27 <tomsmeding> locals?
2021-08-07 17:53:29 <AnselmSchler[m]> tomsmeding: how does it do that?
2021-08-07 17:53:53 <davean> tomsmeding: *locales

All times are in UTC.