Logs: freenode/#haskell
| 2020-11-17 10:24:13 | × | toorevitimirp quits (~tooreviti@117.182.180.118) (Remote host closed the connection) |
| 2020-11-17 10:24:17 | → | sveit joins (~sveit@2001:19f0:ac01:247:5400:ff:fe5c:689f) |
| 2020-11-17 10:26:13 | → | toorevitimirp joins (~tooreviti@117.182.180.118) |
| 2020-11-17 10:27:32 | × | chaosmasttter quits (~chaosmast@p200300c4a73c52013d9d8982c174fa36.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 2020-11-17 10:31:50 | → | mananamenos joins (~mananamen@84.122.202.215.dyn.user.ono.com) |
| 2020-11-17 10:32:20 | × | Kaeipi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Quit: Leaving) |
| 2020-11-17 10:32:22 | → | acidjnk_new joins (~acidjnk@p200300d0c719ff874cf537f47d61e6af.dip0.t-ipconnect.de) |
| 2020-11-17 10:32:38 | → | Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) |
| 2020-11-17 10:33:43 | × | tomboy64 quits (~tomboy64@gateway/tor-sasl/tomboy64) (Ping timeout: 240 seconds) |
| 2020-11-17 10:34:33 | → | tomboy64 joins (~tomboy64@gateway/tor-sasl/tomboy64) |
| 2020-11-17 10:34:50 | → | ubert joins (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) |
| 2020-11-17 10:36:33 | × | PacoV quits (~pcoves@16.194.31.93.rev.sfr.net) (Quit: leaving) |
| 2020-11-17 10:45:02 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-11-17 10:47:06 | × | raichoo quits (~raichoo@213.240.178.58) (Quit: Lost terminal) |
| 2020-11-17 10:48:46 | × | mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 260 seconds) |
| 2020-11-17 10:49:16 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 2020-11-17 10:50:42 | × | ubert quits (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Remote host closed the connection) |
| 2020-11-17 10:55:08 | → | ubert joins (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) |
| 2020-11-17 10:57:54 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@cm-171-98-79-192.revip7.asianet.co.th) (Ping timeout: 265 seconds) |
| 2020-11-17 10:59:30 | hackage | haskoin-core 0.17.2 - Bitcoin & Bitcoin Cash library for Haskell https://hackage.haskell.org/package/haskoin-core-0.17.2 (jprupp) |
| 2020-11-17 10:59:30 | × | alp quits (~alp@88.126.45.36) (Ping timeout: 260 seconds) |
| 2020-11-17 11:03:06 | → | nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 2020-11-17 11:03:30 | <nut> | is bytestring a list of word8? |
| 2020-11-17 11:03:43 | <nut> | in the bytestring package |
| 2020-11-17 11:03:50 | <merijn> | nut: Define "is" |
| 2020-11-17 11:04:56 | <merijn> | Conceptually? Maybe. Is it implemented as a list? Definitely not. |
| 2020-11-17 11:04:56 | <nut> | well, i have a utf-8 string and i want to keep until it sees a \n |
| 2020-11-17 11:05:24 | <nut> | I don't know how to represent \n in Word8 |
| 2020-11-17 11:05:25 | <merijn> | nut: Pretend the "String" part of ByteString doesn't exist |
| 2020-11-17 11:05:28 | <merijn> | ByteString = Bytes |
| 2020-11-17 11:05:50 | <merijn> | If you have unicode text, then you don't want ByteString |
| 2020-11-17 11:06:02 | → | alp joins (~alp@2a01:e0a:58b:4920:8024:df57:dcb5:b452) |
| 2020-11-17 11:06:20 | <nut> | then I check the bytestring APIs, and I realize that conceptually a Bytestring is a list of Word8 |
| 2020-11-17 11:06:33 | <nut> | Which would you recommend? |
| 2020-11-17 11:06:47 | <merijn> | nut: You probably want "decodeUtf8' :: ByteString -> Either UnicodeException Text" :) |
| 2020-11-17 11:06:50 | <merijn> | https://hackage.haskell.org/package/text-1.2.4.0/docs/Data-Text-Encoding.html#v:decodeUtf8-39- |
| 2020-11-17 11:07:11 | <merijn> | Alternatively, you can use decodeUtf8With to explicitly specify how to handle decoding errors |
| 2020-11-17 11:07:16 | Unhammerd | is now known as Unhammer |
| 2020-11-17 11:07:30 | <nut> | But I see there's also the Data.ByteString.Lazy.Char8 |
| 2020-11-17 11:07:56 | <merijn> | https://github.com/quchen/articles/blob/master/fbut.md#bytestringchar8-is-bad |
| 2020-11-17 11:07:58 | <nut> | I thought that's supposed to be useful for mixed texual and binary data |
| 2020-11-17 11:08:12 | <nut> | Ok let me dig in |
| 2020-11-17 11:08:16 | <merijn> | nut: Char8 is a great way to silently corrupt your data! :) |
| 2020-11-17 11:09:06 | <nut> | So go with the text package right? |
| 2020-11-17 11:09:34 | <merijn> | nut: Text is almost always the right choice when you're, well, dealing with text :p |
| 2020-11-17 11:10:14 | × | acidjnk_new quits (~acidjnk@p200300d0c719ff874cf537f47d61e6af.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 2020-11-17 11:10:21 | <merijn> | Plus conversion to/from String (via pack/unpack) and to/from ByteString (via Data.Text.Encoding) is easy and well-defined |
| 2020-11-17 11:10:21 | <nut> | thx for the tip |
| 2020-11-17 11:11:04 | <merijn> | :t Data.Text.takeWhile |
| 2020-11-17 11:11:05 | <lambdabot> | (Char -> Bool) -> Data.Text.Internal.Text -> Data.Text.Internal.Text |
| 2020-11-17 11:11:11 | <merijn> | :t Data.Text.takeWhile (=='\n') |
| 2020-11-17 11:11:12 | <lambdabot> | Data.Text.Internal.Text -> Data.Text.Internal.Text |
| 2020-11-17 11:11:23 | <merijn> | nut: That solves your problem right away ;) |
| 2020-11-17 11:11:32 | <merijn> | eh |
| 2020-11-17 11:11:41 | <merijn> | takeWhile (/='\n'), of course :p |
| 2020-11-17 11:11:53 | <nut> | nice |
| 2020-11-17 11:14:49 | × | solonarv quits (~solonarv@astrasbourg-653-1-156-155.w90-6.abo.wanadoo.fr) (Read error: Connection reset by peer) |
| 2020-11-17 11:15:23 | → | solonarv joins (~solonarv@astrasbourg-653-1-156-155.w90-6.abo.wanadoo.fr) |
| 2020-11-17 11:15:47 | → | zenzike joins (uid257060@gateway/web/irccloud.com/x-ekbwjbhyjbwovlhi) |
| 2020-11-17 11:26:41 | × | alp quits (~alp@2a01:e0a:58b:4920:8024:df57:dcb5:b452) (Ping timeout: 272 seconds) |
| 2020-11-17 11:27:36 | <zenzike> | I was looking at `RandomGen` and saw that `next` is deprecated due to poor performance. That makes sense if the default naive definition is used. However, it seems that `splitmix` provides its own `nextInt` which seems fine and is used in the instance of `StdGen` (which is `SMGen`). Am I missing something obvious? |
| 2020-11-17 11:28:25 | → | invaser joins (~Thunderbi@31.148.23.125) |
| 2020-11-17 11:30:28 | → | raichoo joins (~raichoo@213.240.178.58) |
| 2020-11-17 11:31:07 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2020-11-17 11:33:02 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:bab2:cd00:4d2d:7b87) (Ping timeout: 264 seconds) |
| 2020-11-17 11:35:16 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 2020-11-17 11:36:33 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 2020-11-17 11:37:00 | hackage | haskoin-store-data 0.38.1 - Data for Haskoin Store https://hackage.haskell.org/package/haskoin-store-data-0.38.1 (jprupp) |
| 2020-11-17 11:38:00 | hackage | haskoin-store 0.38.1 - Storage and index for Bitcoin and Bitcoin Cash https://hackage.haskell.org/package/haskoin-store-0.38.1 (jprupp) |
| 2020-11-17 11:38:59 | <dminuoso> | nut: Just to show how ByteString <> String confusion can be very surprising. Do you know how ByteString has an IsString instance, such that you can use OverloadedStrings for ByteString? |
| 2020-11-17 11:40:24 | → | LKoen joins (~LKoen@9.253.88.92.rev.sfr.net) |
| 2020-11-17 11:42:00 | <kuribas> | do you have a stragegy for versioning data? |
| 2020-11-17 11:42:43 | <kuribas> | an easy way I came up with was: simply update the data type, but pass a version number to functions. |
| 2020-11-17 11:42:57 | → | chaosmasttter joins (~chaosmast@p200300c4a73c52013d9d8982c174fa36.dip0.t-ipconnect.de) |
| 2020-11-17 11:43:31 | <kuribas> | so for sum types I could simply add clauses. |
| 2020-11-17 11:43:33 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2020-11-17 11:43:38 | × | Guest48480 quits (~luka@217.146.82.202) (Remote host closed the connection) |
| 2020-11-17 11:44:03 | <kuribas> | then each function has a "rest clause" that raises an error: myFun _ = error "unsupported field." |
| 2020-11-17 11:44:36 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:d6bc:df2c:ba38:451b) |
| 2020-11-17 11:46:36 | × | tput quits (~tput@S0106a84e3fe54613.ed.shawcable.net) (Read error: Connection reset by peer) |
| 2020-11-17 11:46:48 | <kuribas> | but then the burden to not break previous code is on the programmer. |
| 2020-11-17 11:47:30 | hackage | microlens 0.4.12.0 - A tiny lens library with no dependencies https://hackage.haskell.org/package/microlens-0.4.12.0 (Artyom) |
| 2020-11-17 11:48:31 | hackage | microlens-platform 0.4.2, microlens-ghc 0.4.13, microlens-th 0.4.3.7 (Artyom): https://qbin.io/came-wage-exrj |
| 2020-11-17 11:50:23 | hekkaidekapus_ | is now known as hekkaidekapus |
| 2020-11-17 11:50:50 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 2020-11-17 11:52:03 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2020-11-17 11:52:33 | → | drbean joins (~drbean@TC210-63-209-36.static.apol.com.tw) |
| 2020-11-17 11:53:55 | × | drbean quits (~drbean@TC210-63-209-36.static.apol.com.tw) (Client Quit) |
| 2020-11-17 11:55:11 | × | Ariakenom quits (~Ariakenom@h-82-196-111-82.NA.cust.bahnhof.se) (Ping timeout: 272 seconds) |
| 2020-11-17 11:55:28 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 256 seconds) |
| 2020-11-17 12:00:02 | × | hardaker quits (~hardaker@193.56.252.12) () |
| 2020-11-17 12:00:50 | → | FreeBirdLjj joins (~freebirdl@101.228.42.108) |
| 2020-11-17 12:01:46 | × | nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 256 seconds) |
| 2020-11-17 12:04:17 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection) |
| 2020-11-17 12:04:50 | × | Alleria_ quits (~AllahuAkb@2604:2000:1484:26:b962:7f95:ab02:6d5a) (Ping timeout: 264 seconds) |
| 2020-11-17 12:05:22 | × | FreeBirdLjj quits (~freebirdl@101.228.42.108) (Ping timeout: 246 seconds) |
| 2020-11-17 12:08:01 | → | Ariakenom joins (~Ariakenom@h-158-174-22-49.NA.cust.bahnhof.se) |
| 2020-11-17 12:08:10 | × | sdx32 quits (~sdx23@unaffiliated/sdx23) (Ping timeout: 256 seconds) |
| 2020-11-17 12:14:03 | → | Alleria_ joins (~AllahuAkb@2604:2000:1484:26:217f:16b3:ceaa:d387) |
| 2020-11-17 12:15:34 | → | p0a joins (~user@unaffiliated/p0a) |
All times are in UTC.