Logs on 2024-07-19 (liberachat/#haskell)
| 00:01:51 | × | xff0x quits (~xff0x@2405:6580:b080:900:71aa:4bc6:5c8f:1add) (Ping timeout: 246 seconds) |
| 00:10:57 | × | mrmr155334346 quits (~mrmr@user/mrmr) (Ping timeout: 276 seconds) |
| 00:15:56 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 00:21:36 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 00:33:10 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 00:33:11 | → | xff0x joins (~xff0x@2405:6580:b080:900:71aa:4bc6:5c8f:1add) |
| 00:35:53 | <Unicorn_Princess> | how can i specify that a type in a nested signature is the same as the type in the class declaration? example: https://paste.tomsmeding.com/xbrjE1uC |
| 00:36:18 | × | machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 276 seconds) |
| 00:37:43 | <c_wraith> | Unicorn_Princess: enable ScopedTypeVariables. In that specific case, that's all you need to do. (unlike top-level type declarations, it doesn't need a forall to bring the variable into scope) |
| 00:38:57 | <c_wraith> | (More specifically - when ScopedTypeVariables is enabled, type variables appearing in a class definition's head are available to all declarations inside the class) |
| 00:41:36 | <Unicorn_Princess> | thanks, thought it would be something like that |
| 00:45:45 | → | ystael joins (~ystael@user/ystael) |
| 00:54:13 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 248 seconds) |
| 01:03:34 | × | euleritian quits (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) (Remote host closed the connection) |
| 01:03:42 | → | euleritian joins (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) |
| 01:07:33 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 248 seconds) |
| 01:07:57 | × | puke quits (~puke@user/puke) (Ping timeout: 244 seconds) |
| 01:38:23 | → | RedFlamingos joins (~RedFlamin@user/RedFlamingos) |
| 01:54:24 | → | monochrom joins (trebla@216.138.220.146) |
| 02:03:54 | × | Digit quits (~user@user/digit) (Ping timeout: 260 seconds) |
| 02:04:05 | → | dehsou^ joins (dehsou@c-98-242-74-66.hsd1.ga.comcast.net) |
| 02:09:23 | × | xff0x quits (~xff0x@2405:6580:b080:900:71aa:4bc6:5c8f:1add) (Ping timeout: 252 seconds) |
| 02:09:28 | × | econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
| 02:12:46 | → | puke joins (~puke@user/puke) |
| 02:21:26 | × | td_ quits (~td@i53870925.versanet.de) (Ping timeout: 255 seconds) |
| 02:22:52 | → | Square2 joins (~Square@user/square) |
| 02:23:03 | → | td_ joins (~td@i53870905.versanet.de) |
| 02:43:40 | × | terrorjack quits (~terrorjac@2a01:4f8:c17:87f8::) (Quit: The Lounge - https://thelounge.chat) |
| 02:46:34 | → | terrorjack joins (~terrorjac@2a01:4f8:c17:87f8::) |
| 02:49:50 | × | waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 272 seconds) |
| 02:52:36 | × | CrunchyFlakes quits (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 02:55:00 | → | CrunchyFlakes joins (~CrunchyFl@146.52.130.128) |
| 03:02:24 | → | xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
| 03:11:20 | → | aforemny joins (~aforemny@2001:9e8:6cce:bb00:2341:5bbb:f743:b389) |
| 03:12:44 | × | aforemny_ quits (~aforemny@2001:9e8:6cef:4a00:69ef:e68:92a5:4086) (Ping timeout: 260 seconds) |
| 03:17:35 | × | Square2 quits (~Square@user/square) (Ping timeout: 252 seconds) |
| 03:19:57 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
| 03:46:21 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 03:56:30 | × | tomku quits (~tomku@user/tomku) (Ping timeout: 276 seconds) |
| 04:01:45 | → | tomku joins (~tomku@user/tomku) |
| 04:01:57 | × | ddellacosta quits (~ddellacos@ool-44c73d29.dyn.optonline.net) (Ping timeout: 248 seconds) |
| 04:35:42 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 04:53:42 | × | sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 276 seconds) |
| 04:55:37 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 05:26:16 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 260 seconds) |
| 05:28:08 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 05:30:26 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 05:40:34 | → | rvalue- joins (~rvalue@user/rvalue) |
| 05:41:16 | × | rvalue quits (~rvalue@user/rvalue) (Ping timeout: 244 seconds) |
| 05:43:33 | → | ach_ol joins (~ach_ol@c-71-62-230-245.hsd1.va.comcast.net) |
| 05:44:40 | rvalue- | is now known as rvalue |
| 05:53:15 | → | Digit joins (~user@user/digit) |
| 06:15:36 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 276 seconds) |
| 06:19:20 | → | acidjnk joins (~acidjnk@2003:d6:e72c:fb96:64ac:4517:a3be:c0ce) |
| 06:25:54 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 06:28:50 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 06:29:51 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 06:31:28 | → | rosco joins (~rosco@175.136.155.137) |
| 06:34:28 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 06:34:30 | × | ft quits (~ft@p4fc2ab80.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 06:36:20 | → | ft joins (~ft@p3e9bc4e7.dip0.t-ipconnect.de) |
| 06:36:33 | → | ash3en joins (~Thunderbi@2a01:c23:8c5f:2400:1193:86f7:2ef5:3d84) |
| 06:36:47 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 06:45:19 | → | __monty__ joins (~toonn@user/toonn) |
| 06:47:24 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 07:06:18 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 276 seconds) |
| 07:06:57 | × | ft quits (~ft@p3e9bc4e7.dip0.t-ipconnect.de) (Ping timeout: 276 seconds) |
| 07:20:59 | × | emmanuelux quits (~emmanuelu@user/emmanuelux) (Quit: au revoir) |
| 07:34:13 | <albet70> | 🟢albet70 :monad is parametric polymorphism or adhoc polymorphism? |
| 07:38:04 | <ghodawalaaman> | what is that green circle lol |
| 07:40:50 | <albet70> | sorry, I copied it from some else |
| 07:41:02 | <albet70> | I forgot to remove it |
| 07:41:19 | × | vgtw quits (~vgtw@user/vgtw) (Quit: ZNC - https://znc.in) |
| 07:43:03 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 07:44:52 | → | misterfish joins (~misterfis@ip-185-104-138-30.ptr.icomera.net) |
| 07:47:26 | <ncf> | albet70: can you ask a more precise question? |
| 07:53:50 | <Maxdamantus> | it's both. |
| 07:54:31 | <albet70> | ok |
| 07:55:37 | <tomsmeding> | a monad is a structure, it's not inherently a polymorphic thing |
| 07:56:06 | <Maxdamantus> | the implementations of the members of the class (`return`, `(>>=)` and `fmap` or whatever they are) are selected based on ad-hoc polymorphism, but each implementation of one of those members is parametricalli polymorphic. |
| 07:56:10 | <tomsmeding> | now, Monad is of course a type class, and type classes can be seen as both |
| 07:56:22 | <tomsmeding> | what Maxdamantus says |
| 07:56:47 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 07:56:57 | → | cpressey joins (~weechat@176.254.71.203) |
| 07:58:47 | <Maxdamantus> | `return` happens to have one type parameter, and `(>>=)` and `fmap` happen to have two type parameters. |
| 07:59:37 | <albet70> | whats the function name of (flip const)? |
| 08:02:22 | <ncf> | doesn't have one, but it's equal to const id |
| 08:02:36 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Quit: Leaving) |
| 08:02:51 | tomsmeding | . o O ( constantly the identity ) |
| 08:04:00 | <Maxdamantus> | @pl filp const |
| 08:04:00 | <lambdabot> | filp const |
| 08:04:09 | <Maxdamantus> | @pl flip const |
| 08:04:09 | <lambdabot> | const id |
| 08:05:51 | → | kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 08:06:11 | → | chele joins (~chele@user/chele) |
| 08:13:06 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 08:16:28 | → | vpan joins (~vpan@212.117.1.172) |
| 08:23:43 | × | ach_ol quits (~ach_ol@c-71-62-230-245.hsd1.va.comcast.net) (Quit: Leaving.) |
| 08:23:48 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 08:35:49 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 08:36:56 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 08:38:50 | → | Square2 joins (~Square@user/square) |
| 08:47:58 | × | tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
| 08:54:33 | × | misterfish quits (~misterfis@ip-185-104-138-30.ptr.icomera.net) (Ping timeout: 252 seconds) |
| 08:59:44 | → | Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) |
| 09:04:45 | → | CiaoSen joins (~Jura@2a05:5800:225:1a00:e6b9:7aff:fe80:3d03) |
| 09:12:05 | <bwe> | Hi, I am converting a html file as BL.ByteString to Text and run into *** Exception: Cannot decode byte '\xa0': Data.Text.Internal.Encoding: Invalid UTF-8 stream. It's a non-breaking space that creates the headache. |
| 09:13:06 | <geekosaur> | that means you are reading a Latin-1 file as UTF-8 |
| 09:13:22 | <bwe> | Am I using the wrong BS variant, should I replace it on BS level without changing the BS variant or do you recommend me to address at conversion time. |
| 09:13:30 | <bwe> | geekosaur: let me check |
| 09:14:01 | <geekosaur> | ByteString neither knows nor cares; it's at the place where you convert to Text that you need to tell Text to expect Latin-1 |
| 09:14:31 | × | mulk quits (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 09:15:29 | <bwe> | it's weird, the html file has <meta charset="utf-8">, however I am reading saving it to SQLite using selda and reading it back before conversion. |
| 09:15:46 | → | mulk joins (~mulk@p5b112b2e.dip0.t-ipconnect.de) |
| 09:16:34 | <geekosaur> | but a byte '\xa0' is not valid utf8 |
| 09:16:53 | <geekosaur> | it is a non-breaking space in Latin-1 |
| 09:17:21 | <geekosaur> | https://hackage.haskell.org/package/text-2.1.1/docs/Data-Text-Encoding.html#v:decodeLatin1 may be of interest |
| 09:18:05 | × | euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.) |
| 09:18:12 | <bwe> | I believe you :) |
| 09:18:15 | <geekosaur> | (do not trust random html to be what it claims to be) |
| 09:19:01 | <bwe> | will look into that - and check the source I get with req first |
| 09:19:16 | <bwe> | so, it's most likely latin1 stuff that claims to be utf-8 |
| 09:19:25 | <geekosaur> | the utf8 version is C2 A0 |
| 09:19:37 | <bwe> | what is that? |
| 09:19:54 | <geekosaur> | two bytes, because that's how the utf8 encoding works |
| 09:20:07 | <geekosaur> | (for non-breaking space) |
| 09:20:26 | <bwe> | thanks for clarifying |
| 09:21:36 | <geekosaur> | utf8 can't just read latin-1 characters as is, because that would leave it with no way to handle characters above \xff. so anything above \x80 is encoded in multiple bytes |
| 09:21:57 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Ping timeout: 248 seconds) |
| 09:22:33 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 09:23:26 | <geekosaur> | (also, don't confuse utf-8 representations with unicode codepoints. the codepoint for non-breaking space is indeed U+A0. utf-8 has to represent it in multiple bytes becuase you can't squeeze a 21-bit codepoint into a byte-oriented stream otherwise) |
| 09:23:58 | <geekosaur> | (I think it's 21-bit) |
| 09:24:24 | → | mreh joins (~matthew@host86-160-168-12.range86-160.btcentralplus.com) |
| 09:25:40 | → | euphores joins (~SASL_euph@user/euphores) |
| 09:27:57 | × | driib3 quits (~driib@vmi931078.contaboserver.net) (Quit: The Lounge - https://thelounge.chat) |
| 09:28:35 | → | driib3 joins (~driib@vmi931078.contaboserver.net) |
| 09:28:56 | bwe | figures out what req tells the incoming lbs to be. |
| 09:31:35 | → | JamesMowery8 joins (~JamesMowe@ip98-167-207-182.ph.ph.cox.net) |
| 09:32:44 | × | JamesMowery quits (~JamesMowe@ip98-167-207-182.ph.ph.cox.net) (Ping timeout: 244 seconds) |
| 09:32:51 | JamesMowery8 | is now known as JamesMowery |
| 09:41:52 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 09:42:46 | <bwe> | It doesn't. I fear that I cannot really determine what the HTML is. While it says it's utf8, it might be latin1 and the other way around. -- I don't understand it enough yet. Can I throw decodeLatin1 at any input, even UTF8 (I don't think so, but what would be a solution?). |
| 09:44:04 | gehmehgeh | is now known as gmg |
| 09:47:50 | <geekosaur> | browsers, and many other programs that need to be lenient (including the IRC client I'm using), generally attempt to decode as UTF-8 and if it fails retry as Latin-1 (which will always succeed but may produce nonsense) |
| 09:49:05 | <probie> | You can always fallback to latin1 if it's not valid utf8, but if somehow you've got a html document which is both valid utf8 and latin1 and contains no <meta charset=...>, there's not much you can do unless you know what language it is meant to be (in which case you can just pick whichever a spellchecker is happiest with) |
| 09:49:17 | <geekosaur> | (since any byte is guaranteed to be compatible with Latin-1, but there's no way for the decoder to know if it actually represents the intended character) |
| 09:49:58 | <geekosaur> | well, the problem here is that it has <meta charset=utf-8> but it has a Latin-1-encoded non-breaking space in it |
| 09:50:18 | <geekosaur> | (\xa0 instead of \xc2 \xa0) |
| 09:51:47 | <bwe> | geekosaur: latin1 comes in without non-utf8 chars. I try to decode it as utf8. what will happen? |
| 09:52:19 | <geekosaur> | if it's chatracters below \x80 then it will decode successfully |
| 09:52:54 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 09:53:10 | <bwe> | fine. then my approach is decodeUtf8' :: ByteString -> Either UnicodeException Text and if it fails I'll do a decodeLatin1. |
| 09:53:30 | <geekosaur> | above \x80 it must follow utf-8 encoding or it will fail to decode; Latin-1 \x80-\xff will generally fail, since even if it's in the range for utf-8 multibyte initiators the following byte probably won't be right |
| 10:03:01 | × | xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 248 seconds) |
| 10:04:13 | × | pavonia quits (~user@user/siracusa) (Ping timeout: 252 seconds) |
| 10:10:39 | <bwe> | geekosaur: the chaining of decodeUtf8' and if that fails doing decodeLatin1 works for me for my data set. Thanks! |
| 10:19:05 | × | ash3en quits (~Thunderbi@2a01:c23:8c5f:2400:1193:86f7:2ef5:3d84) (Quit: ash3en) |
| 10:19:07 | → | pavonia joins (~user@user/siracusa) |
| 10:26:29 | → | ash3en joins (~Thunderbi@2a01:c23:8c5f:2400:1193:86f7:2ef5:3d84) |
| 10:29:14 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 10:37:14 | × | Miroboru quits (~myrvoll@178-164-114.82.3p.ntebredband.no) (Quit: Lost terminal) |
| 10:39:52 | × | CrunchyFlakes quits (~CrunchyFl@146.52.130.128) (Read error: Connection reset by peer) |
| 10:41:58 | → | CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) |
| 11:01:03 | × | CiaoSen quits (~Jura@2a05:5800:225:1a00:e6b9:7aff:fe80:3d03) (Ping timeout: 252 seconds) |
| 11:11:31 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Quit: Leaving) |
| 11:11:35 | × | puke quits (~puke@user/puke) (Remote host closed the connection) |
| 11:11:54 | → | puke joins (~puke@user/puke) |
| 11:23:18 | → | CiaoSen joins (~Jura@2a05:5800:225:1a00:e6b9:7aff:fe80:3d03) |
| 11:33:03 | × | CrunchyFlakes quits (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 11:35:16 | → | CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) |
| 11:40:36 | × | mreh quits (~matthew@host86-160-168-12.range86-160.btcentralplus.com) (Ping timeout: 276 seconds) |
| 11:48:37 | × | cpressey quits (~weechat@176.254.71.203) (Ping timeout: 248 seconds) |
| 11:50:00 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 11:51:47 | × | rosco quits (~rosco@175.136.155.137) (Quit: Lost terminal) |
| 11:54:30 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 12:08:21 | × | tomku quits (~tomku@user/tomku) (Ping timeout: 248 seconds) |
| 12:08:35 | → | tomku joins (~tomku@user/tomku) |
| 12:09:56 | × | dehsou^ quits (dehsou@c-98-242-74-66.hsd1.ga.comcast.net) (Remote host closed the connection) |
| 12:19:02 | → | xff0x joins (~xff0x@2405:6580:b080:900:85a4:92a4:ce3d:c612) |
| 12:23:28 | × | ash3en quits (~Thunderbi@2a01:c23:8c5f:2400:1193:86f7:2ef5:3d84) (Quit: ash3en) |
| 12:29:57 | → | ash3en joins (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) |
| 12:33:27 | × | euleritian quits (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) (Ping timeout: 252 seconds) |
| 12:33:51 | → | mreh joins (~matthew@host86-160-168-12.range86-160.btcentralplus.com) |
| 12:33:55 | → | euleritian joins (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) |
| 12:37:08 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 12:49:35 | → | cpressey joins (~weechat@176.254.71.203) |
| 12:50:24 | × | sprout quits (~quassel@2a02:a448:3a80:0:810b:4b98:1cc4:7d07) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 12:50:46 | → | sprout joins (~quassel@2a02:a448:3a80:0:990c:9f27:85e3:92f7) |
| 12:52:03 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 12:53:51 | × | ash3en quits (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) (Quit: ash3en) |
| 12:54:21 | × | cpressey quits (~weechat@176.254.71.203) (Ping timeout: 252 seconds) |
| 12:56:39 | → | ash3en joins (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) |
| 13:00:28 | zero | is now known as zzz |
| 13:02:24 | × | vpan quits (~vpan@212.117.1.172) (Quit: Leaving.) |
| 13:04:16 | → | cpressey joins (~weechat@176.254.71.203) |
| 13:07:08 | → | thefoxcry joins (~thefoxcry@195.135.246.201) |
| 13:08:39 | × | CiaoSen quits (~Jura@2a05:5800:225:1a00:e6b9:7aff:fe80:3d03) (Ping timeout: 252 seconds) |
| 13:22:33 | → | ystael joins (~ystael@user/ystael) |
| 13:22:39 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Ping timeout: 276 seconds) |
| 13:23:22 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 13:57:35 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Quit: Leaving) |
| 14:11:26 | × | kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection) |
| 14:12:09 | × | ash3en quits (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) (Quit: ash3en) |
| 14:18:32 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 14:21:19 | × | destituion quits (~destituio@2a02:2121:6b6:b142:8d9d:8eb3:8da8:98dd) (Read error: Connection reset by peer) |
| 14:59:21 | → | vgtw joins (~vgtw@user/vgtw) |
| 15:03:27 | × | Katarushisu1 quits (~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net) (Ping timeout: 246 seconds) |
| 15:06:40 | → | Katarushisu1 joins (~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net) |
| 15:07:05 | × | tomboy64 quits (~tomboy64@user/tomboy64) (Ping timeout: 252 seconds) |
| 15:09:20 | <bwe> | to what should I parse a decimal like 3.99 with megaparsec (https://hackage.haskell.org/package/megaparsec-9.6.1/docs/Text-Megaparsec-Char-Lexer.html) so it actually can be cast to Data.Decimal.Decimal https://hackage.haskell.org/package/Decimal-0.5.2/docs/Data-Decimal.html#t:Decimal ? |
| 15:10:40 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 15:12:39 | → | tomboy64 joins (~tomboy64@user/tomboy64) |
| 15:16:53 | <mauke> | obvious answer: Decimal |
| 15:17:57 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 15:18:38 | <monochrom> | Perhaps go through Scientific first. Perhaps, even, go with Scientific and forget Decimal. |
| 15:19:11 | × | euleritian quits (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) (Ping timeout: 252 seconds) |
| 15:19:53 | → | euleritian joins (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) |
| 15:22:49 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 15:22:52 | <bwe> | mauke: decimal parser (of megaparsec) seems to parse into Double; so what's the right parser to do it directly? |
| 15:23:14 | <bwe> | monochrom: well, how then I'd translate Scientific into Decimal? |
| 15:23:36 | → | aforemny_ joins (~aforemny@2001:9e8:6cd6:d600:9028:bc24:7dc9:b4c1) |
| 15:23:41 | <monochrom> | realToFrac? Don't translate, stick to Scientific? |
| 15:23:58 | → | MadeleineSydney joins (~Thunderbi@c-71-229-185-228.hsd1.co.comcast.net) |
| 15:24:19 | <mauke> | this one? https://hackage.haskell.org/package/megaparsec-9.6.1/docs/Text-Megaparsec-Char-Lexer.html#v:decimal |
| 15:24:27 | <mauke> | it's polymorphic in Num |
| 15:24:34 | <mauke> | older versions return Integer, not Double |
| 15:24:51 | × | aforemny quits (~aforemny@2001:9e8:6cce:bb00:2341:5bbb:f743:b389) (Ping timeout: 276 seconds) |
| 15:24:57 | <mauke> | but you probably want float anyway |
| 15:25:59 | <monochrom> | decimal does integer only. The 3 in 3.99 |
| 15:29:13 | → | Midjak joins (~MarciZ@82.66.147.146) |
| 15:30:15 | → | misterfish joins (~misterfis@178.225.133.120) |
| 15:30:41 | <bwe> | hm, so how can I get 3.99 :: Decimal then? with the float inbetween, directly or with Scientific as transition? |
| 15:32:19 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 15:32:37 | <mauke> | I don't understand the question |
| 15:32:49 | <mauke> | what do you mean by "float inbetween"? |
| 15:34:22 | <monochrom> | It means going through the `float` parser there first, the issue being RealFloat and Decimal is not an instance. |
| 15:34:42 | × | Rembane quits (~Rembane@user/Rembane) (Quit: WeeChat 4.1.1) |
| 15:34:46 | <monochrom> | Who ordered Decimal anyway?! >:) |
| 15:35:14 | → | irssi joins (~Rembane@user/Rembane) |
| 15:35:29 | <monochrom> | My impression is that aeson cassava etc have basically settled on Scientific so its much more de facto standard. |
| 15:35:43 | <mauke> | oh, I see |
| 15:35:49 | irssi | is now known as Rembane |
| 15:35:56 | <mauke> | I missed the RealFloat part. why does it need that? |
| 15:36:25 | <bwe> | will Scientific show for short numbers up like Decimal or Double? |
| 15:36:53 | × | misterfish quits (~misterfis@178.225.133.120) (Ping timeout: 248 seconds) |
| 15:36:58 | <monochrom> | Perhaps the bliss of just needing to call encodeFloat :) |
| 15:38:03 | <monochrom> | RealFloat expresses that "mantissa and exponent" makes sense for your number type. |
| 15:39:21 | <monochrom> | Unfortunately it is a subclass of Floating so you also have to support like trig functions... |
| 15:39:31 | <pie_> | did haskell lose a lot of steam or have i just not been paying much attention the past two years |
| 15:39:41 | <monochrom> | Maybe now we see a reason why that's a bad idea. |
| 15:39:42 | <mauke> | ah, it goes through Scientific, which is ass for fixed precision |
| 15:39:48 | <pie_> | i mean the ecosystem, not the irc channel |
| 15:43:06 | <haskellbridge> | <sm> it's maturing |
| 15:44:10 | <pie_> | are there any arguments that rust didnt eat everything? :P |
| 15:44:52 | <mauke> | DecimalRaw{ decimalMantissa = coefficient sci, decimalPlaces = negate (base10Exponent sci) } |
| 15:44:53 | × | euleritian quits (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) (Read error: Connection reset by peer) |
| 15:45:01 | <mauke> | modulo type errors and overflow checks |
| 15:45:20 | → | euleritian joins (~euleritia@77.22.252.56) |
| 15:47:01 | <monochrom> | I am still teaching a C-and-Unix course so Rust didn't eat that. |
| 15:47:52 | <mauke> | in particular, decimalPlaces is a Word8, but base10Exponent an Int |
| 15:48:06 | <pie_> | to be a bit snarky, yeah but noone that actually wants to build anything that doesnt such cares about that |
| 15:48:08 | <pie_> | *suck |
| 15:48:21 | × | smalltalkman quits (uid545680@id-545680.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 15:48:29 | <pie_> | (i am a clown trying my best, fwiw) |
| 15:48:45 | <mauke> | speaking of, TIL I learned that execvp will fall back to /bin/sh if there's no #! line, but execv will not |
| 15:48:51 | <monochrom> | OK then I won't answer. |
| 15:49:08 | <monochrom> | Hrm that's interesting. |
| 15:49:15 | <pie_> | clown not as in joking but as in i am not a Good programmer |
| 15:49:18 | <mauke> | what am I even typing |
| 15:49:28 | <mauke> | s/ I learned// |
| 15:49:38 | <pie_> | mauke: I guess thats a glibc thing? |
| 15:49:50 | <pie_> | also, wat |
| 15:50:14 | <mauke> | I doubt it's a gnu invention |
| 15:50:22 | <monochrom> | Oh right, the man page already has sufficient information for deducing that. |
| 15:50:34 | <bwe> | almost done: https://paste.tomsmeding.com/qjIAShgy |
| 15:50:45 | <monochrom> | Hey "automatic ATM teller machine" is not so bad >:) |
| 15:51:14 | <Rembane> | mauke: Is that reasonable or an exciting footgun? |
| 15:51:14 | → | hiecaq joins (~hiecaq@user/hiecaq) |
| 15:51:27 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Ping timeout: 252 seconds) |
| 15:51:33 | <mauke> | :shrug: |
| 15:51:59 | <pie_> | "footguns are toolsg" |
| 15:52:04 | <pie_> | s/g// |
| 15:52:12 | <monochrom> | Oh yeah why did they not make it the opposite? |
| 15:53:01 | <monochrom> | Seems to me one wants to be more conservative if random things on PATH are involved. |
| 15:53:07 | <pie_> | (the national rifle association maintains that everyone has a right to their footguns) |
| 15:53:24 | <Rembane> | pie_: That's why we don't let them code in anything but C |
| 15:53:40 | <pie_> | I dont know if self-selection is working |
| 15:53:53 | <pie_> | sometimes I get pangs for writing C |
| 15:54:58 | <mauke> | it's the basis of https://justine.lol/ape.html |
| 15:57:03 | <haskellbridge> | <sm> rust didn't and won't eat everything, it's good for certain things but not everything |
| 15:59:31 | <pie_> | (unlike me, I am not good at anything, haha :') ) |
| 15:59:31 | <pie_> | Ok, I'm going to go back to watching some talks, get some alcohol in my system, and keep writing documentation. |
| 16:00:00 | <pie_> | (You'd think this would be *after* getting alcohol in one's system.) |
| 16:00:21 | × | euleritian quits (~euleritia@77.22.252.56) (Ping timeout: 248 seconds) |
| 16:00:38 | → | euleritian joins (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) |
| 16:07:51 | <bwe> | monochrom: it's a mess: Exception: fromRational has been applied to a repeating decimal which can't be represented as a Scientific! It's better to avoid performing fractional operations on Scientifics and convert them to other fractional types like Double as early as possible. |
| 16:08:12 | <bwe> | (I've solved the explicit parser type requirement) |
| 16:11:22 | <bwe> | monochrom: https://www.reddit.com/r/haskell/comments/12unrjs/comment/jh84yuc/ |
| 16:12:06 | × | euleritian quits (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) (Read error: Connection reset by peer) |
| 16:12:25 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 16:15:35 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 258 seconds) |
| 16:16:44 | <monochrom> | How is 1/3 in ghci relevant to parsing 3.99. (Rhetorical question.) |
| 16:17:43 | <monochrom> | I don't imagine 1/3 makes sense for Decimal either. |
| 16:18:18 | → | cyphase joins (~cyphase@user/cyphase) |
| 16:22:42 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 276 seconds) |
| 16:22:51 | → | euleritian joins (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) |
| 16:24:39 | × | euphores quits (~SASL_euph@user/euphores) (Ping timeout: 276 seconds) |
| 16:27:07 | <geekosaur> | re execvp: hysterical raisins |
| 16:27:54 | × | euleritian quits (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) (Read error: Connection reset by peer) |
| 16:27:58 | <bwe> | monochrom: I do some calculations (multiplication and division) with the Scientific type. |
| 16:28:11 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 16:29:45 | <monochrom> | I suppose things on PATH were actually less error-prone back then. |
| 16:30:56 | → | euphores joins (~SASL_euph@user/euphores) |
| 16:32:12 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 16:32:35 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Remote host closed the connection) |
| 16:33:00 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 16:33:15 | <bwe> | monochrom: the error messages of Decimal are more helpful: Exception: Ratio has zero denominator |
| 16:33:25 | <bwe> | so I need to catch those |
| 16:34:57 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Remote host closed the connection) |
| 16:36:21 | × | cpressey quits (~weechat@176.254.71.203) (Ping timeout: 276 seconds) |
| 16:36:56 | × | TonyStone quits (~TonyStone@user/TonyStone) (Ping timeout: 252 seconds) |
| 16:39:04 | × | oo_miguel quits (~Thunderbi@78.10.207.46) (Remote host closed the connection) |
| 16:39:23 | → | oo_miguel joins (~Thunderbi@78.10.207.46) |
| 16:40:58 | × | MadeleineSydney quits (~Thunderbi@c-71-229-185-228.hsd1.co.comcast.net) (Quit: MadeleineSydney) |
| 16:47:27 | → | ft joins (~ft@p3e9bc4e7.dip0.t-ipconnect.de) |
| 16:54:53 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 252 seconds) |
| 16:56:03 | → | danza joins (~francesco@151.37.225.56) |
| 16:59:05 | <monochrom> | Double is much less disruptive when it comes to division by zero, if that's what you want. |
| 17:00:09 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 17:00:45 | × | Square2 quits (~Square@user/square) (Ping timeout: 252 seconds) |
| 17:01:00 | <bwe> | monochrom: well, I moved away from Double to avoid rounding errors… |
| 17:01:20 | <bwe> | now, this throws me into the debugging experience. |
| 17:01:39 | <monochrom> | Rational has no rounding errors. |
| 17:03:09 | <bwe> | how does it behave on division by zero? |
| 17:03:27 | <monochrom> | undefined |
| 17:03:59 | <monochrom> | But you can always roll your own divMaybe and check that first. |
| 17:04:25 | <monochrom> | It is not like catching exceptions in pure code is any nicer. |
| 17:05:15 | → | tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
| 17:05:28 | <bwe> | interestingly, I can trace it back to : y1 / y2 where y1 and y2 are both 25, so the result is 1 |
| 17:06:27 | × | thefoxcry quits (~thefoxcry@195.135.246.201) (Quit: Leaving) |
| 17:08:16 | × | CalimeroTeknik quits (~calimero@ctkarch.org) (Changing host) |
| 17:08:16 | → | CalimeroTeknik joins (~calimero@user/calimeroteknik) |
| 17:15:03 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 17:19:45 | → | danza_ joins (~francesco@151.57.244.219) |
| 17:20:14 | × | danza quits (~francesco@151.37.225.56) (Read error: Connection reset by peer) |
| 17:23:14 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 17:33:48 | <bwe> | nice experience with https://stackoverflow.com/questions/6724434/how-to-debug-haskell-code to debug |
| 17:34:04 | <bwe> | I've found the location where I divide by 0 |
| 17:34:09 | <bwe> | fixed it, runs now |
| 17:34:10 | → | Miroboru joins (~myrvoll@178-164-114.82.3p.ntebredband.no) |
| 17:39:54 | × | euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.) |
| 17:42:14 | <bwe> | monochrom: I wonder whether I'd actually switch to fractional repr |
| 17:42:21 | <bwe> | what's the go-to way there? |
| 17:47:04 | → | euphores joins (~SASL_euph@user/euphores) |
| 17:50:48 | <c_wraith> | If you mean a function with the type Scientific -> Rational, realToFrac is the way to go |
| 17:51:19 | <c_wraith> | I mean, I guess it's just toRational in this specific case |
| 17:51:21 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 17:51:40 | <c_wraith> | but realToFrac is the generic conversion function between non-integer representations |
| 17:54:19 | → | ash3en joins (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) |
| 17:58:22 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 17:59:02 | <monochrom> | The only correct "go-to" way, "rule of thumb", "best practice", "state of the art" etc etc in this case is "it depends". |
| 17:59:10 | → | euleritian joins (~euleritia@77.22.252.56) |
| 17:59:35 | <monochrom> | One can, of course, expand "it depends" to "write down formally and completely your requirements and expectations". |
| 18:00:09 | <monochrom> | I'll tell a fable about this. |
| 18:00:26 | <monochrom> | Once upon a time, someone asked "how to represent infinite sets?" |
| 18:01:11 | <monochrom> | Fortunately, since they didn't say anything about what getters they needed, there is a simple solution: (). |
| 18:01:22 | <monochrom> | I'll tell another fable about this. |
| 18:02:17 | <monochrom> | Once upon a time, people talked about "the best data compression". A possible solution was /dev/null when they didn't say anything about decompression. |
| 18:03:50 | <monochrom> | The infinite-set case is not trolling. Of all setters and getters that everyone takes for granted for finite sets, you must give up some of them for infinite sets, and the implementation really depends on what you can give up. |
| 18:07:11 | <monochrom> | OK, there is another "go-to" answer that beautifully covers everything, but you have to be a management type. "hire someone who knows". |
| 18:15:01 | × | zfnmxt quits (~zfnmxt@user/zfnmxt) (Remote host closed the connection) |
| 18:15:15 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:16:17 | × | Midjak quits (~MarciZ@82.66.147.146) (Quit: This computer has gone to sleep) |
| 18:17:45 | × | tomku quits (~tomku@user/tomku) (Ping timeout: 276 seconds) |
| 18:20:11 | × | danza_ quits (~francesco@151.57.244.219) (Quit: Leaving) |
| 18:22:00 | × | euleritian quits (~euleritia@77.22.252.56) (Remote host closed the connection) |
| 18:22:33 | → | cpressey joins (~weechat@176.254.71.203) |
| 18:22:35 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 18:24:29 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 18:34:59 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:35:37 | → | zfnmxt joins (~zfnmxt@user/zfnmxt) |
| 18:39:20 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 18:50:38 | → | waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) |
| 18:54:04 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
| 18:54:05 | <EvanR> | you don't need to worry about division by zero if you prove your code won't ever do it! |
| 18:55:21 | → | ach_ol joins (~ach_ol@c-71-62-230-245.hsd1.va.comcast.net) |
| 18:57:44 | <darkling> | My favourite bad-specification tale is the one about optimisation: "We need to minimise costs". "OK, shut the factory." |
| 18:58:37 | <dminuoso> | darkling: See, that's not going to minimise costs. |
| 18:59:11 | × | cpressey quits (~weechat@176.254.71.203) (Ping timeout: 252 seconds) |
| 18:59:21 | <dminuoso> | You'll still have hundreds of workers to pay salary for. |
| 18:59:28 | <dminuoso> | Dissolving your company, that will do the trick. |
| 18:59:38 | <Rembane> | Liquid companies are the best |
| 19:00:31 | darkling | gets the acid |
| 19:02:34 | <dminuoso> | darkling: You will probably need fluoroantimonic acid. |
| 19:02:50 | <dminuoso> | That stuff is absolutely nasty, I just recently discovered super acids. |
| 19:04:15 | <darkling> | Ouch. That's nasty. |
| 19:04:55 | <darkling> | That's a candidate for a "Things I Won't Work With" from Derek Lowe. |
| 19:06:57 | <monochrom> | That solves the car parking problem, literally. Dissolve the car. >:D |
| 19:08:29 | × | ach_ol quits (~ach_ol@c-71-62-230-245.hsd1.va.comcast.net) (Quit: Leaving.) |
| 19:09:09 | → | cpressey joins (~weechat@176.254.71.203) |
| 19:12:05 | → | CiaoSen joins (~Jura@2a05:5800:225:1a00:e6b9:7aff:fe80:3d03) |
| 19:16:35 | → | ach_ol joins (~ach_ol@c-71-62-230-245.hsd1.va.comcast.net) |
| 19:17:55 | <dminuoso> | You can also just stack cars vertically, solves your car parking problem too. |
| 19:18:05 | <dminuoso> | Introduces a car unparking problem, but that wasn't included in the original problem. |
| 19:18:12 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:18:50 | <geekosaur> | isn't that the japanese solution? |
| 19:19:04 | <geekosaur> | complete with robots to solve the unparking part? |
| 19:19:27 | <monochrom> | Nah, that is too perfect. >:D |
| 19:20:05 | <monochrom> | The scrapyard kind of stacks are cheaper stacks. >:D |
| 19:20:16 | <dminuoso> | geekosaur: Oh see, I was going to do the western way: cutting costs by not having any frame to rest the cars on. Just stack them ontop of each other directly. |
| 19:20:26 | × | srk quits (~sorki@user/srk) (Quit: ZNC 1.8.1 - https://znc.in) |
| 19:20:30 | <dminuoso> | Contract fulfilled! |
| 19:20:46 | <monochrom> | "max stack min cost" |
| 19:21:45 | <dminuoso> | And maybe we can externalize the cost to repair the cars to insurances.. |
| 19:22:10 | <dminuoso> | Bonus: The top car never needs repairs. |
| 19:22:24 | <dminuoso> | We could maybe sell this spot with a premium price. |
| 19:22:52 | <monochrom> | That reminds me of Hong Kong sea view scams. |
| 19:22:59 | <monochrom> | in real estate |
| 19:23:01 | → | srk joins (~sorki@user/srk) |
| 19:23:37 | <monochrom> | Builder builds an apartment that has unobstructed view to beauty sea. (Oh just you wait.) Sells at premium price. |
| 19:24:06 | <dminuoso> | And then the lot in front gets developed the same way the year after? |
| 19:24:25 | <monochrom> | Two years later builds yet another apartment right in front. (Do land reclamation if necessary---shove soil into sea for new land.) Recurse. |
| 19:24:33 | <monochrom> | Yeah :) |
| 19:26:13 | <monochrom> | By induction, every position in your car stack can be sold at premium price. >:) |
| 19:26:55 | <darkling> | Induction... furnace? |
| 19:27:26 | <dminuoso> | In some way that's just exploiting a natural risk to real estate. You generally have no control over whether Tesla is opening a factory next door a year later, or whether you will be relocated because your lot is on the outskirt of a new airport. Or like how you are liable for contaminated dirt removal, but if there's gold in your backyard, it belongs to the state... |
| 19:27:39 | <dminuoso> | monochrom: I like the business model! |
| 19:27:55 | <dminuoso> | Let me figure out how to register an LLC now.. |
| 19:28:45 | <dminuoso> | (Why exactly is it that companies can exist with (severely) limited liability, but private people cannot?) |
| 19:30:00 | <monochrom> | Companies can be sold, even partly with the notion of shares. Private people can't be sold. |
| 19:30:01 | <darkling> | Because they let the people that run them amass enough money to be able to... err... persuade the legislators to say so. |
| 19:30:14 | <monochrom> | Solution: Private people should be up for trading, too! |
| 19:30:16 | <dminuoso> | Oh private people can definitely be sold. |
| 19:30:42 | <monochrom> | I am IPOing myself LOL |
| 19:30:55 | → | cyphase joins (~cyphase@user/cyphase) |
| 19:31:25 | <monochrom> | Although, influencings on Youtube are ahead of us. |
| 19:31:27 | <darkling> | monochrom: In mixed company? |
| 19:31:30 | <monochrom> | err, influeners! |
| 19:31:32 | <dminuoso> | Incorporating people, interesting idea. |
| 19:31:39 | <dminuoso> | That's different from plain selling, though. |
| 19:31:49 | <dminuoso> | The latter exists in various (illegal) markets. |
| 19:32:02 | <dminuoso> | I wonder whether incorporating people is a thing on the darknet. |
| 19:32:41 | <monochrom> | Yeah I take the context to be "within laws". Clearly, private people can also have limited liability in illegal markets! |
| 19:33:09 | × | cpressey quits (~weechat@176.254.71.203) (Ping timeout: 276 seconds) |
| 19:34:10 | → | destituion joins (~destituio@2a02:2121:2cc:d20e:57a3:7e82:5e63:4fee) |
| 19:36:24 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 276 seconds) |
| 19:46:14 | → | skyesoss joins (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) |
| 19:48:53 | × | skyesoss quits (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) (Quit: skyesoss) |
| 19:49:26 | → | skyesoss joins (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) |
| 19:52:06 | × | mud quits (~mud@user/kadoban) (Ping timeout: 252 seconds) |
| 19:56:19 | → | mud joins (~mud@user/kadoban) |
| 19:58:52 | × | zfnmxt quits (~zfnmxt@user/zfnmxt) (Remote host closed the connection) |
| 20:02:13 | → | zfnmxt joins (~zfnmxt@user/zfnmxt) |
| 20:07:05 | × | zfnmxt quits (~zfnmxt@user/zfnmxt) (Remote host closed the connection) |
| 20:09:19 | → | zfnmxt joins (~zfnmxt@user/zfnmxt) |
| 20:12:00 | × | ash3en quits (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) (Quit: ash3en) |
| 20:12:18 | → | ash3en joins (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) |
| 20:16:40 | → | Square2 joins (~Square@user/square) |
| 20:16:49 | → | cpressey joins (~weechat@176.254.71.203) |
| 20:19:23 | × | destituion quits (~destituio@2a02:2121:2cc:d20e:57a3:7e82:5e63:4fee) (Read error: Connection reset by peer) |
| 20:19:36 | → | destituion joins (~destituio@83-243-191-191.fth.tafjordconnect.net) |
| 20:22:33 | × | cpressey quits (~weechat@176.254.71.203) (Ping timeout: 276 seconds) |
| 20:24:33 | → | cyphase joins (~cyphase@user/cyphase) |
| 20:27:13 | → | noumenon joins (~noumenon@113.51-175-156.customer.lyse.net) |
| 20:31:16 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 20:37:05 | × | mreh quits (~matthew@host86-160-168-12.range86-160.btcentralplus.com) (Ping timeout: 252 seconds) |
| 20:38:45 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 248 seconds) |
| 20:44:04 | <ash3en> | anyone has experience with waargonaut? it looks not as simple as aeson. no simple deriving? |
| 20:49:08 | → | tomku joins (~tomku@user/tomku) |
| 20:52:30 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 252 seconds) |
| 20:57:25 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 248 seconds) |
| 20:57:59 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:58:04 | → | Midjak joins (~MarciZ@82.66.147.146) |
| 20:58:57 | × | ash3en quits (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) (Quit: ash3en) |
| 21:00:02 | × | haskellbridge quits (~hackager@syn-024-093-192-219.res.spectrum.com) (Remote host closed the connection) |
| 21:00:30 | → | haskellbridge joins (~hackager@syn-024-093-192-219.res.spectrum.com) |
| 21:00:30 | ChanServ | sets mode +v haskellbridge |
| 21:01:23 | × | kimiamania quits (~65804703@user/kimiamania) (Quit: PegeLinux) |
| 21:01:26 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 21:01:43 | → | kimiamania joins (~65804703@user/kimiamania) |
| 21:02:51 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 276 seconds) |
| 21:03:35 | → | euleritian joins (~euleritia@dynamic-176-003-020-012.176.3.pool.telefonica.de) |
| 21:06:50 | <davean> | Its pretty straight forward to use |
| 21:10:54 | → | skyesoss1 joins (~Thunderbi@128.135.204.35) |
| 21:14:27 | × | _xor quits (~xor@ip-208-102-243-175.dynamic.fuse.net) (Quit: brb/bbiab) |
| 21:21:00 | × | tcard quits (~tcard@2400:4051:5801:7500:1e90:74c3:2754:ce8a) (Quit: Leaving) |
| 21:23:59 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 21:33:19 | → | tcard joins (~tcard@p5147008-ipxg23701hodogaya.kanagawa.ocn.ne.jp) |
| 21:41:52 | × | down200 quits (~down200@shell.lug.mtu.edu) (Quit: ZNC - https://znc.in) |
| 21:42:18 | → | down200 joins (~down200@shell.lug.mtu.edu) |
| 21:43:20 | → | Inst joins (~Inst@user/Inst) |
| 21:43:30 | <pie_> | hm. looks like effects are still an (active?) area of research |
| 21:44:58 | × | down200 quits (~down200@shell.lug.mtu.edu) (Remote host closed the connection) |
| 21:48:58 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 21:52:37 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 21:55:49 | × | skyesoss1 quits (~Thunderbi@128.135.204.35) (Quit: skyesoss1) |
| 21:55:56 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:56:30 | → | down200 joins (~down200@shell.lug.mtu.edu) |
| 21:58:29 | × | tomku quits (~tomku@user/tomku) (Ping timeout: 252 seconds) |
| 21:58:42 | → | tomku joins (~tomku@user/tomku) |
| 22:00:09 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 22:00:28 | × | phma quits (~phma@2001:5b0:211f:9678:d7d4:309e:db55:1e79) (Read error: Connection reset by peer) |
| 22:01:31 | → | phma joins (~phma@2001:5b0:210f:55a8:9fbe:3c54:a526:88c8) |
| 22:01:34 | × | haetsal quits (~quassel@221.138.168.192) (Quit: No Ping reply in 180 seconds.) |
| 22:02:50 | → | haetsal joins (~quassel@221.138.168.192) |
| 22:03:05 | → | cyphase joins (~cyphase@user/cyphase) |
| 22:06:43 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:08:30 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 276 seconds) |
| 22:12:56 | <Inst> | actually, when you need a queue |
| 22:13:00 | <Inst> | you can just use sequence, no? |
| 22:13:25 | <monochrom> | You can also just use []. |
| 22:14:01 | <Inst> | for O(n) dequeue :3 |
| 22:14:39 | <monochrom> | sequence is not O(1) either. |
| 22:15:43 | <monochrom> | And to think we have just gone through a long-drawn conversation, jokes, and field stories about if you don't write more conditions then anything goes. |
| 22:16:10 | → | cyphase joins (~cyphase@user/cyphase) |
| 22:16:27 | <Inst> | i was trying to build a queue in haskell, ended up building a circular queue instead |
| 22:18:01 | <c_wraith> | theoretically, Okasaki queues have O(1) worst-case push and pop |
| 22:18:41 | <c_wraith> | But they're also confusing as heck, and the simplest structure in his thesis |
| 22:19:12 | <monochrom> | I coded it up so now it is simple to just import. (But I also understood it.) |
| 22:19:17 | <Inst> | wait, okasaki's purely functional data structures was his thesis? |
| 22:19:31 | × | xal quits (~xal@mx1.xal.systems) () |
| 22:19:32 | <Inst> | doctoral dissertation, rather |
| 22:19:41 | <geekosaur> | the book is an extension of it, yes |
| 22:20:00 | → | xal joins (~xal@mx1.xal.systems) |
| 22:20:02 | <monochrom> | For most people though amortized-O(1) is good enough. Then it's just (front_list, back_list). |
| 22:20:26 | <monochrom> | Someone actually did that for an STM queue. |
| 22:20:53 | <c_wraith> | One of Okasaki's first points is that amortized analysis can break down badly in persistent data structures, if your use pattern isn't very friendly |
| 22:21:53 | <c_wraith> | So, like.. Using the ([a], [a]) representation can open up complexity-based DoS attacks on a service if it can be manipulated externally |
| 22:22:21 | <monochrom> | Ah yeah it assumes ephemeral (even linear) not persistent. |
| 22:23:19 | <monochrom> | I swear I never use queues persistently so I'm good. :) |
| 22:23:41 | <c_wraith> | ah, like how C code never has memory unsafety! |
| 22:23:55 | <monochrom> | "That's not fair!" |
| 22:25:33 | → | cpressey joins (~weechat@176.254.71.203) |
| 22:26:15 | <monochrom> | Ugh too much Haskell harms C programming. |
| 22:26:40 | <c_wraith> | very true |
| 22:27:15 | <c_wraith> | I just start thinking of all the footguns and say "you know, I bet I don't actually need to do this." |
| 22:27:24 | <monochrom> | I have "int f(int x) { g(0, x); }" and I thought it meant that the return value of g() becomes the return value of f(), just like in Haskell, right? RIGHT? |
| 22:27:50 | <c_wraith> | it took me two reads to realize why that wasn't true |
| 22:28:01 | <monochrom> | Fortunately some kind of -Wall saved me, but I was puzzled why it thinks I didn't specify a return value. |
| 22:28:11 | <haskellbridge> | <mauke> Hey, it works in Perl :-D |
| 22:28:13 | <geekosaur> | whereas I spotted it immediately |
| 22:28:57 | <geekosaur> | but I am involved with enough C/C++ code to keep things like that ready to mind |
| 22:28:58 | <c_wraith> | you need to do more Haskell. :P |
| 22:29:22 | <geekosaur> | I'm also fairly good at context switching |
| 22:29:34 | <haskellbridge> | <mauke> C/C++ has undefined behavior |
| 22:30:20 | <geekosaur> | I'm half tempted to say they are undefined behavior |
| 22:33:25 | × | sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 248 seconds) |
| 22:38:13 | × | zzz quits (~z@user/zero) (Ping timeout: 248 seconds) |
| 22:38:47 | <Inst> | https://hackage.haskell.org/package/containers-0.7/docs/Data-Sequence.html |
| 22:38:49 | <Inst> | looking at the thing |
| 22:39:11 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
| 22:40:06 | <Inst> | O(1) access, O(1) queue, O(log(n)) splitting, seems as though it should do everything you'd want a FIFO queue for, no? |
| 22:40:46 | <c_wraith> | the constant factors are kinda high. |
| 22:41:01 | × | acidjnk quits (~acidjnk@2003:d6:e72c:fb96:64ac:4517:a3be:c0ce) (Ping timeout: 252 seconds) |
| 22:41:12 | <Inst> | iirc someone benchmarked it vs list, and that was the problem |
| 22:45:50 | → | zero joins (~z@user/zero) |
| 22:48:51 | → | ddellacosta joins (~ddellacos@ool-44c73d29.dyn.optonline.net) |
| 22:54:57 | × | cpressey quits (~weechat@176.254.71.203) (Ping timeout: 252 seconds) |
| 22:56:17 | → | NullPointerExcep joins (~NullPoint@200.82.250.153) |
| 23:04:27 | × | Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
| 23:08:31 | × | gmg quits (~user@user/gehmehgeh) (Ping timeout: 260 seconds) |
| 23:08:53 | <monochrom> | Also IIRC those O(1)'s are amortized only. |
| 23:17:36 | <exarkun> | Correct |
| 23:29:45 | × | tomku quits (~tomku@user/tomku) (Ping timeout: 276 seconds) |
| 23:36:23 | → | tomku joins (~tomku@user/tomku) |
| 23:40:55 | × | ach_ol quits (~ach_ol@c-71-62-230-245.hsd1.va.comcast.net) (Quit: Leaving.) |
| 23:47:01 | × | Square2 quits (~Square@user/square) (Ping timeout: 248 seconds) |
| 23:52:31 | × | CiaoSen quits (~Jura@2a05:5800:225:1a00:e6b9:7aff:fe80:3d03) (Ping timeout: 252 seconds) |
All times are in UTC on 2024-07-19.