2024-07-19 00:01:32 +0200 | Square2 | (~Square@user/square) (Ping timeout: 252 seconds) |
2024-07-19 00:02:57 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
2024-07-19 00:07:23 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
2024-07-19 00:08:04 +0200 | pointlessslippe1 | (~pointless@212.82.82.3) (Ping timeout: 252 seconds) |
2024-07-19 00:09:47 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Quit: ChaiTRex) |
2024-07-19 00:15:20 +0200 | pointlessslippe1 | (~pointless@212.82.82.3) |
2024-07-19 00:16:55 +0200 | falafel | (~falafel@2a0c:5a84:e301:4d01::5c13) (Ping timeout: 252 seconds) |
2024-07-19 00:18:53 +0200 | <mreh> | what is this syntax in a pattern match? `boundingBox (G.Bitmap (G.bitmapSize -> (w, h)))` |
2024-07-19 00:19:07 +0200 | CiaoSen | (~Jura@2a05:5800:2b2:a300:e6b9:7aff:fe80:3d03) (Ping timeout: 252 seconds) |
2024-07-19 00:19:29 +0200 | <c_wraith> | that's a view pattern |
2024-07-19 00:20:13 +0200 | <c_wraith> | it calls the function on the left side of the -> on the value being matched, and then matches the result of that function against the pattern on the right. |
2024-07-19 00:20:37 +0200 | <mreh> | aha |
2024-07-19 00:21:25 +0200 | <mreh> | similar to how you can pattenr match in pattern guards |
2024-07-19 00:21:45 +0200 | <c_wraith> | yeah. Honestly, I don't see a lot of value in using them outside of pattern synonyms |
2024-07-19 00:22:05 +0200 | misterfish | (~misterfis@84.53.85.146) |
2024-07-19 00:22:54 +0200 | <c_wraith> | They're just a bit of unnecessary syntactic sugar... except in pattern synonyms, where they're the only way to use functions while destructuring values. |
2024-07-19 00:23:24 +0200 | euleritian | (~euleritia@dynamic-176-005-130-223.176.5.pool.telefonica.de) (Ping timeout: 260 seconds) |
2024-07-19 00:23:37 +0200 | euleritian | (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) |
2024-07-19 00:24:34 +0200 | yin | (~yin@user/zero) |
2024-07-19 00:26:16 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-07-19 00:27:11 +0200 | misterfish | (~misterfis@84.53.85.146) (Ping timeout: 252 seconds) |
2024-07-19 00:28:10 +0200 | misterfish | (~misterfis@84.53.85.146) |
2024-07-19 00:42:55 +0200 | noumenon | (~noumenon@113.51-175-156.customer.lyse.net) |
2024-07-19 00:47:43 +0200 | Midjak | (~MarciZ@82.66.147.146) (Quit: This computer has gone to sleep) |
2024-07-19 00:53:36 +0200 | misterfish | (~misterfis@84.53.85.146) (Ping timeout: 276 seconds) |
2024-07-19 00:58:17 +0200 | zero | (~z@user/zero) (Remote host closed the connection) |
2024-07-19 00:59:14 +0200 | zero | (~z@user/zero) |
2024-07-19 01:09:02 +0200 | Guest18 | (~Guest18@2605:59c8:26f7:4e10:241b:ad0:4a05:c733) (Quit: Client closed) |
2024-07-19 01:15:01 +0200 | noumenon | (~noumenon@113.51-175-156.customer.lyse.net) (Quit: Leaving) |
2024-07-19 01:16:43 +0200 | monochrom | (trebla@216.138.220.146) (Quit: ZNC 1.9.0+deb2build3 - https://znc.in) |
2024-07-19 01:19:36 +0200 | mreh | (~matthew@host86-160-168-12.range86-160.btcentralplus.com) (Ping timeout: 276 seconds) |
2024-07-19 01:34:33 +0200 | tomku | (~tomku@user/tomku) (Ping timeout: 276 seconds) |
2024-07-19 01:34:47 +0200 | tomku | (~tomku@user/tomku) |
2024-07-19 01:41:37 +0200 | ddellacosta | (~ddellacos@ool-44c73d29.dyn.optonline.net) (Ping timeout: 252 seconds) |
2024-07-19 01:42:37 +0200 | pavonia | (~user@user/siracusa) |
2024-07-19 01:43:35 +0200 | ddellacosta | (~ddellacos@ool-44c73d29.dyn.optonline.net) |
2024-07-19 01:43:58 +0200 | gmg | (~user@user/gehmehgeh) (Quit: Leaving) |
2024-07-19 01:53:18 +0200 | zero | (~z@user/zero) (Quit: quit) |
2024-07-19 01:54:31 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
2024-07-19 01:55:14 +0200 | zero | (~z@user/zero) |
2024-07-19 01:59:29 +0200 | yin | (~yin@user/zero) (Quit: leaving) |
2024-07-19 02:01:51 +0200 | xff0x | (~xff0x@2405:6580:b080:900:71aa:4bc6:5c8f:1add) (Ping timeout: 246 seconds) |
2024-07-19 02:10:57 +0200 | mrmr155334346 | (~mrmr@user/mrmr) (Ping timeout: 276 seconds) |
2024-07-19 02:15:56 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2024-07-19 02:21:36 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
2024-07-19 02:33:10 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
2024-07-19 02:33:11 +0200 | xff0x | (~xff0x@2405:6580:b080:900:71aa:4bc6:5c8f:1add) |
2024-07-19 02:35:53 +0200 | <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 |
2024-07-19 02:36:18 +0200 | machinedgod | (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 276 seconds) |
2024-07-19 02:37:43 +0200 | <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) |
2024-07-19 02:38:57 +0200 | <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) |
2024-07-19 02:41:36 +0200 | <Unicorn_Princess> | thanks, thought it would be something like that |
2024-07-19 02:45:45 +0200 | ystael | (~ystael@user/ystael) |
2024-07-19 02:54:13 +0200 | ystael | (~ystael@user/ystael) (Ping timeout: 248 seconds) |
2024-07-19 03:03:34 +0200 | euleritian | (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) (Remote host closed the connection) |
2024-07-19 03:03:42 +0200 | euleritian | (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) |
2024-07-19 03:07:33 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 248 seconds) |
2024-07-19 03:07:57 +0200 | puke | (~puke@user/puke) (Ping timeout: 244 seconds) |
2024-07-19 03:38:23 +0200 | RedFlamingos | (~RedFlamin@user/RedFlamingos) |
2024-07-19 03:54:24 +0200 | monochrom | (trebla@216.138.220.146) |
2024-07-19 04:03:54 +0200 | Digit | (~user@user/digit) (Ping timeout: 260 seconds) |
2024-07-19 04:04:05 +0200 | dehsou^ | (dehsou@c-98-242-74-66.hsd1.ga.comcast.net) |
2024-07-19 04:09:23 +0200 | xff0x | (~xff0x@2405:6580:b080:900:71aa:4bc6:5c8f:1add) (Ping timeout: 252 seconds) |
2024-07-19 04:09:28 +0200 | econo_ | (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
2024-07-19 04:12:46 +0200 | puke | (~puke@user/puke) |
2024-07-19 04:21:26 +0200 | td_ | (~td@i53870925.versanet.de) (Ping timeout: 255 seconds) |
2024-07-19 04:22:52 +0200 | Square2 | (~Square@user/square) |
2024-07-19 04:23:03 +0200 | td_ | (~td@i53870905.versanet.de) |
2024-07-19 04:43:40 +0200 | terrorjack | (~terrorjac@2a01:4f8:c17:87f8::) (Quit: The Lounge - https://thelounge.chat) |
2024-07-19 04:46:34 +0200 | terrorjack | (~terrorjac@2a01:4f8:c17:87f8::) |
2024-07-19 04:49:50 +0200 | waleee | (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 272 seconds) |
2024-07-19 04:52:36 +0200 | CrunchyFlakes | (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2024-07-19 04:55:00 +0200 | CrunchyFlakes | (~CrunchyFl@146.52.130.128) |
2024-07-19 05:02:24 +0200 | xff0x | (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
2024-07-19 05:11:20 +0200 | aforemny | (~aforemny@2001:9e8:6cce:bb00:2341:5bbb:f743:b389) |
2024-07-19 05:12:44 +0200 | aforemny_ | (~aforemny@2001:9e8:6cef:4a00:69ef:e68:92a5:4086) (Ping timeout: 260 seconds) |
2024-07-19 05:17:35 +0200 | Square2 | (~Square@user/square) (Ping timeout: 252 seconds) |
2024-07-19 05:19:57 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
2024-07-19 05:46:21 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2024-07-19 05:56:30 +0200 | tomku | (~tomku@user/tomku) (Ping timeout: 276 seconds) |
2024-07-19 06:01:45 +0200 | tomku | (~tomku@user/tomku) |
2024-07-19 06:01:57 +0200 | ddellacosta | (~ddellacos@ool-44c73d29.dyn.optonline.net) (Ping timeout: 248 seconds) |
2024-07-19 06:35:42 +0200 | sawilagar | (~sawilagar@user/sawilagar) |
2024-07-19 06:53:42 +0200 | sawilagar | (~sawilagar@user/sawilagar) (Ping timeout: 276 seconds) |
2024-07-19 06:55:37 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
2024-07-19 07:26:16 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 260 seconds) |
2024-07-19 07:28:08 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2024-07-19 07:30:26 +0200 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2024-07-19 07:40:34 +0200 | rvalue- | (~rvalue@user/rvalue) |
2024-07-19 07:41:16 +0200 | rvalue | (~rvalue@user/rvalue) (Ping timeout: 244 seconds) |
2024-07-19 07:43:33 +0200 | ach_ol | (~ach_ol@c-71-62-230-245.hsd1.va.comcast.net) |
2024-07-19 07:44:40 +0200 | rvalue- | rvalue |
2024-07-19 07:53:15 +0200 | Digit | (~user@user/digit) |
2024-07-19 08:15:36 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 276 seconds) |
2024-07-19 08:19:20 +0200 | acidjnk | (~acidjnk@2003:d6:e72c:fb96:64ac:4517:a3be:c0ce) |
2024-07-19 08:25:54 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
2024-07-19 08:28:50 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2024-07-19 08:29:51 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2024-07-19 08:31:28 +0200 | rosco | (~rosco@175.136.155.137) |
2024-07-19 08:34:28 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-07-19 08:34:30 +0200 | ft | (~ft@p4fc2ab80.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2024-07-19 08:36:20 +0200 | ft | (~ft@p3e9bc4e7.dip0.t-ipconnect.de) |
2024-07-19 08:36:33 +0200 | ash3en | (~Thunderbi@2a01:c23:8c5f:2400:1193:86f7:2ef5:3d84) |
2024-07-19 08:36:47 +0200 | sord937 | (~sord937@gateway/tor-sasl/sord937) |
2024-07-19 08:45:19 +0200 | __monty__ | (~toonn@user/toonn) |
2024-07-19 08:47:24 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) |
2024-07-19 09:06:18 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 276 seconds) |
2024-07-19 09:06:57 +0200 | ft | (~ft@p3e9bc4e7.dip0.t-ipconnect.de) (Ping timeout: 276 seconds) |
2024-07-19 09:20:59 +0200 | emmanuelux | (~emmanuelu@user/emmanuelux) (Quit: au revoir) |
2024-07-19 09:34:13 +0200 | <albet70> | 🟢albet70 :monad is parametric polymorphism or adhoc polymorphism? |
2024-07-19 09:38:04 +0200 | <ghodawalaaman> | what is that green circle lol |
2024-07-19 09:40:50 +0200 | <albet70> | sorry, I copied it from some else |
2024-07-19 09:41:02 +0200 | <albet70> | I forgot to remove it |
2024-07-19 09:41:19 +0200 | vgtw | (~vgtw@user/vgtw) (Quit: ZNC - https://znc.in) |
2024-07-19 09:43:03 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2024-07-19 09:44:52 +0200 | misterfish | (~misterfis@ip-185-104-138-30.ptr.icomera.net) |
2024-07-19 09:47:26 +0200 | <ncf> | albet70: can you ask a more precise question? |
2024-07-19 09:53:50 +0200 | <Maxdamantus> | it's both. |
2024-07-19 09:54:31 +0200 | <albet70> | ok |
2024-07-19 09:55:37 +0200 | <tomsmeding> | a monad is a structure, it's not inherently a polymorphic thing |
2024-07-19 09:56:06 +0200 | <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. |
2024-07-19 09:56:10 +0200 | <tomsmeding> | now, Monad is of course a type class, and type classes can be seen as both |
2024-07-19 09:56:22 +0200 | <tomsmeding> | what Maxdamantus says |
2024-07-19 09:56:47 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-07-19 09:56:57 +0200 | cpressey | (~weechat@176.254.71.203) |
2024-07-19 09:58:47 +0200 | <Maxdamantus> | `return` happens to have one type parameter, and `(>>=)` and `fmap` happen to have two type parameters. |
2024-07-19 09:59:37 +0200 | <albet70> | whats the function name of (flip const)? |
2024-07-19 10:02:22 +0200 | <ncf> | doesn't have one, but it's equal to const id |
2024-07-19 10:02:36 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) (Quit: Leaving) |
2024-07-19 10:02:51 +0200 | tomsmeding | . o O ( constantly the identity ) |
2024-07-19 10:04:00 +0200 | <Maxdamantus> | @pl filp const |
2024-07-19 10:04:00 +0200 | <lambdabot> | filp const |
2024-07-19 10:04:09 +0200 | <Maxdamantus> | @pl flip const |
2024-07-19 10:04:09 +0200 | <lambdabot> | const id |
2024-07-19 10:05:51 +0200 | kuribas | (~user@ip-188-118-57-242.reverse.destiny.be) |
2024-07-19 10:06:11 +0200 | chele | (~chele@user/chele) |
2024-07-19 10:13:06 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-07-19 10:16:28 +0200 | vpan | (~vpan@212.117.1.172) |
2024-07-19 10:23:43 +0200 | ach_ol | (~ach_ol@c-71-62-230-245.hsd1.va.comcast.net) (Quit: Leaving.) |
2024-07-19 10:23:48 +0200 | sawilagar | (~sawilagar@user/sawilagar) |
2024-07-19 10:35:49 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) |
2024-07-19 10:36:56 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-07-19 10:38:50 +0200 | Square2 | (~Square@user/square) |
2024-07-19 10:47:58 +0200 | tzh | (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
2024-07-19 10:54:33 +0200 | misterfish | (~misterfis@ip-185-104-138-30.ptr.icomera.net) (Ping timeout: 252 seconds) |
2024-07-19 10:59:44 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) |
2024-07-19 11:04:45 +0200 | CiaoSen | (~Jura@2a05:5800:225:1a00:e6b9:7aff:fe80:3d03) |
2024-07-19 11:12:05 +0200 | <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. |
2024-07-19 11:13:06 +0200 | <geekosaur> | that means you are reading a Latin-1 file as UTF-8 |
2024-07-19 11:13:22 +0200 | <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. |
2024-07-19 11:13:30 +0200 | <bwe> | geekosaur: let me check |
2024-07-19 11:14:01 +0200 | <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 |
2024-07-19 11:14:31 +0200 | mulk | (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
2024-07-19 11:15:29 +0200 | <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. |
2024-07-19 11:15:46 +0200 | mulk | (~mulk@p5b112b2e.dip0.t-ipconnect.de) |
2024-07-19 11:16:34 +0200 | <geekosaur> | but a byte '\xa0' is not valid utf8 |
2024-07-19 11:16:53 +0200 | <geekosaur> | it is a non-breaking space in Latin-1 |
2024-07-19 11:17:21 +0200 | <geekosaur> | https://hackage.haskell.org/package/text-2.1.1/docs/Data-Text-Encoding.html#v:decodeLatin1 may be of interest |
2024-07-19 11:18:05 +0200 | euphores | (~SASL_euph@user/euphores) (Quit: Leaving.) |
2024-07-19 11:18:12 +0200 | <bwe> | I believe you :) |
2024-07-19 11:18:15 +0200 | <geekosaur> | (do not trust random html to be what it claims to be) |
2024-07-19 11:19:01 +0200 | <bwe> | will look into that - and check the source I get with req first |
2024-07-19 11:19:16 +0200 | <bwe> | so, it's most likely latin1 stuff that claims to be utf-8 |
2024-07-19 11:19:25 +0200 | <geekosaur> | the utf8 version is C2 A0 |
2024-07-19 11:19:37 +0200 | <bwe> | what is that? |
2024-07-19 11:19:54 +0200 | <geekosaur> | two bytes, because that's how the utf8 encoding works |
2024-07-19 11:20:07 +0200 | <geekosaur> | (for non-breaking space) |
2024-07-19 11:20:26 +0200 | <bwe> | thanks for clarifying |
2024-07-19 11:21:36 +0200 | <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 |
2024-07-19 11:21:57 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) (Ping timeout: 248 seconds) |
2024-07-19 11:22:33 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) |
2024-07-19 11:23:26 +0200 | <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) |
2024-07-19 11:23:58 +0200 | <geekosaur> | (I think it's 21-bit) |
2024-07-19 11:24:24 +0200 | mreh | (~matthew@host86-160-168-12.range86-160.btcentralplus.com) |
2024-07-19 11:25:40 +0200 | euphores | (~SASL_euph@user/euphores) |
2024-07-19 11:27:57 +0200 | driib3 | (~driib@vmi931078.contaboserver.net) (Quit: The Lounge - https://thelounge.chat) |
2024-07-19 11:28:35 +0200 | driib3 | (~driib@vmi931078.contaboserver.net) |
2024-07-19 11:28:56 +0200 | bwe | figures out what req tells the incoming lbs to be. |
2024-07-19 11:31:35 +0200 | JamesMowery8 | (~JamesMowe@ip98-167-207-182.ph.ph.cox.net) |
2024-07-19 11:32:44 +0200 | JamesMowery | (~JamesMowe@ip98-167-207-182.ph.ph.cox.net) (Ping timeout: 244 seconds) |
2024-07-19 11:32:51 +0200 | JamesMowery8 | JamesMowery |
2024-07-19 11:41:52 +0200 | gehmehgeh | (~user@user/gehmehgeh) |
2024-07-19 11:42:46 +0200 | <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?). |
2024-07-19 11:44:04 +0200 | gehmehgeh | gmg |
2024-07-19 11:47:50 +0200 | <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) |
2024-07-19 11:49:05 +0200 | <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) |
2024-07-19 11:49:17 +0200 | <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) |
2024-07-19 11:49:58 +0200 | <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 |
2024-07-19 11:50:18 +0200 | <geekosaur> | (\xa0 instead of \xc2 \xa0) |
2024-07-19 11:51:47 +0200 | <bwe> | geekosaur: latin1 comes in without non-utf8 chars. I try to decode it as utf8. what will happen? |
2024-07-19 11:52:19 +0200 | <geekosaur> | if it's chatracters below \x80 then it will decode successfully |
2024-07-19 11:52:54 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-07-19 11:53:10 +0200 | <bwe> | fine. then my approach is decodeUtf8' :: ByteString -> Either UnicodeException Text and if it fails I'll do a decodeLatin1. |
2024-07-19 11:53:30 +0200 | <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 |
2024-07-19 12:03:01 +0200 | xff0x | (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 248 seconds) |
2024-07-19 12:04:13 +0200 | pavonia | (~user@user/siracusa) (Ping timeout: 252 seconds) |
2024-07-19 12:10:39 +0200 | <bwe> | geekosaur: the chaining of decodeUtf8' and if that fails doing decodeLatin1 works for me for my data set. Thanks! |
2024-07-19 12:19:05 +0200 | ash3en | (~Thunderbi@2a01:c23:8c5f:2400:1193:86f7:2ef5:3d84) (Quit: ash3en) |
2024-07-19 12:19:07 +0200 | pavonia | (~user@user/siracusa) |
2024-07-19 12:26:29 +0200 | ash3en | (~Thunderbi@2a01:c23:8c5f:2400:1193:86f7:2ef5:3d84) |
2024-07-19 12:29:14 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) |
2024-07-19 12:37:14 +0200 | Miroboru | (~myrvoll@178-164-114.82.3p.ntebredband.no) (Quit: Lost terminal) |
2024-07-19 12:39:52 +0200 | CrunchyFlakes | (~CrunchyFl@146.52.130.128) (Read error: Connection reset by peer) |
2024-07-19 12:41:58 +0200 | CrunchyFlakes | (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) |
2024-07-19 13:01:03 +0200 | CiaoSen | (~Jura@2a05:5800:225:1a00:e6b9:7aff:fe80:3d03) (Ping timeout: 252 seconds) |
2024-07-19 13:11:31 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) (Quit: Leaving) |
2024-07-19 13:11:35 +0200 | puke | (~puke@user/puke) (Remote host closed the connection) |
2024-07-19 13:11:54 +0200 | puke | (~puke@user/puke) |
2024-07-19 13:23:18 +0200 | CiaoSen | (~Jura@2a05:5800:225:1a00:e6b9:7aff:fe80:3d03) |
2024-07-19 13:33:03 +0200 | CrunchyFlakes | (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2024-07-19 13:35:16 +0200 | CrunchyFlakes | (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) |
2024-07-19 13:40:36 +0200 | mreh | (~matthew@host86-160-168-12.range86-160.btcentralplus.com) (Ping timeout: 276 seconds) |
2024-07-19 13:48:37 +0200 | cpressey | (~weechat@176.254.71.203) (Ping timeout: 248 seconds) |
2024-07-19 13:50:00 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-07-19 13:51:47 +0200 | rosco | (~rosco@175.136.155.137) (Quit: Lost terminal) |
2024-07-19 13:54:30 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2024-07-19 14:08:21 +0200 | tomku | (~tomku@user/tomku) (Ping timeout: 248 seconds) |
2024-07-19 14:08:35 +0200 | tomku | (~tomku@user/tomku) |
2024-07-19 14:09:56 +0200 | dehsou^ | (dehsou@c-98-242-74-66.hsd1.ga.comcast.net) (Remote host closed the connection) |
2024-07-19 14:19:02 +0200 | xff0x | (~xff0x@2405:6580:b080:900:85a4:92a4:ce3d:c612) |
2024-07-19 14:23:28 +0200 | ash3en | (~Thunderbi@2a01:c23:8c5f:2400:1193:86f7:2ef5:3d84) (Quit: ash3en) |
2024-07-19 14:29:57 +0200 | ash3en | (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) |
2024-07-19 14:33:27 +0200 | euleritian | (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) (Ping timeout: 252 seconds) |
2024-07-19 14:33:51 +0200 | mreh | (~matthew@host86-160-168-12.range86-160.btcentralplus.com) |
2024-07-19 14:33:55 +0200 | euleritian | (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) |
2024-07-19 14:37:08 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) |
2024-07-19 14:49:35 +0200 | cpressey | (~weechat@176.254.71.203) |
2024-07-19 14:50:24 +0200 | sprout | (~quassel@2a02:a448:3a80:0:810b:4b98:1cc4:7d07) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
2024-07-19 14:50:46 +0200 | sprout | (~quassel@2a02:a448:3a80:0:990c:9f27:85e3:92f7) |
2024-07-19 14:52:03 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-07-19 14:53:51 +0200 | ash3en | (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) (Quit: ash3en) |
2024-07-19 14:54:21 +0200 | cpressey | (~weechat@176.254.71.203) (Ping timeout: 252 seconds) |
2024-07-19 14:56:39 +0200 | ash3en | (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) |
2024-07-19 15:00:28 +0200 | zero | zzz |
2024-07-19 15:02:24 +0200 | vpan | (~vpan@212.117.1.172) (Quit: Leaving.) |
2024-07-19 15:04:16 +0200 | cpressey | (~weechat@176.254.71.203) |
2024-07-19 15:07:08 +0200 | thefoxcry | (~thefoxcry@195.135.246.201) |
2024-07-19 15:08:39 +0200 | CiaoSen | (~Jura@2a05:5800:225:1a00:e6b9:7aff:fe80:3d03) (Ping timeout: 252 seconds) |
2024-07-19 15:22:33 +0200 | ystael | (~ystael@user/ystael) |
2024-07-19 15:22:39 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) (Ping timeout: 276 seconds) |
2024-07-19 15:23:22 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) |
2024-07-19 15:57:35 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) (Quit: Leaving) |
2024-07-19 16:11:26 +0200 | kuribas | (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection) |
2024-07-19 16:12:09 +0200 | ash3en | (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) (Quit: ash3en) |
2024-07-19 16:18:32 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2024-07-19 16:21:19 +0200 | destituion | (~destituio@2a02:2121:6b6:b142:8d9d:8eb3:8da8:98dd) (Read error: Connection reset by peer) |
2024-07-19 16:59:21 +0200 | vgtw | (~vgtw@user/vgtw) |
2024-07-19 17:03:27 +0200 | Katarushisu1 | (~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net) (Ping timeout: 246 seconds) |
2024-07-19 17:06:40 +0200 | Katarushisu1 | (~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net) |
2024-07-19 17:07:05 +0200 | tomboy64 | (~tomboy64@user/tomboy64) (Ping timeout: 252 seconds) |
2024-07-19 17:09:20 +0200 | <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 ? |
2024-07-19 17:10:40 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) |
2024-07-19 17:12:39 +0200 | tomboy64 | (~tomboy64@user/tomboy64) |
2024-07-19 17:16:53 +0200 | <mauke> | obvious answer: Decimal |
2024-07-19 17:17:57 +0200 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2024-07-19 17:18:38 +0200 | <monochrom> | Perhaps go through Scientific first. Perhaps, even, go with Scientific and forget Decimal. |
2024-07-19 17:19:11 +0200 | euleritian | (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) (Ping timeout: 252 seconds) |
2024-07-19 17:19:53 +0200 | euleritian | (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) |
2024-07-19 17:22:49 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-07-19 17:22:52 +0200 | <bwe> | mauke: decimal parser (of megaparsec) seems to parse into Double; so what's the right parser to do it directly? |
2024-07-19 17:23:14 +0200 | <bwe> | monochrom: well, how then I'd translate Scientific into Decimal? |
2024-07-19 17:23:36 +0200 | aforemny_ | (~aforemny@2001:9e8:6cd6:d600:9028:bc24:7dc9:b4c1) |
2024-07-19 17:23:41 +0200 | <monochrom> | realToFrac? Don't translate, stick to Scientific? |
2024-07-19 17:23:58 +0200 | MadeleineSydney | (~Thunderbi@c-71-229-185-228.hsd1.co.comcast.net) |
2024-07-19 17:24:19 +0200 | <mauke> | this one? https://hackage.haskell.org/package/megaparsec-9.6.1/docs/Text-Megaparsec-Char-Lexer.html#v:decimal |
2024-07-19 17:24:27 +0200 | <mauke> | it's polymorphic in Num |
2024-07-19 17:24:34 +0200 | <mauke> | older versions return Integer, not Double |
2024-07-19 17:24:51 +0200 | aforemny | (~aforemny@2001:9e8:6cce:bb00:2341:5bbb:f743:b389) (Ping timeout: 276 seconds) |
2024-07-19 17:24:57 +0200 | <mauke> | but you probably want float anyway |
2024-07-19 17:25:59 +0200 | <monochrom> | decimal does integer only. The 3 in 3.99 |
2024-07-19 17:29:13 +0200 | Midjak | (~MarciZ@82.66.147.146) |
2024-07-19 17:30:15 +0200 | misterfish | (~misterfis@178.225.133.120) |
2024-07-19 17:30:41 +0200 | <bwe> | hm, so how can I get 3.99 :: Decimal then? with the float inbetween, directly or with Scientific as transition? |
2024-07-19 17:32:19 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-07-19 17:32:37 +0200 | <mauke> | I don't understand the question |
2024-07-19 17:32:49 +0200 | <mauke> | what do you mean by "float inbetween"? |
2024-07-19 17:34:22 +0200 | <monochrom> | It means going through the `float` parser there first, the issue being RealFloat and Decimal is not an instance. |
2024-07-19 17:34:42 +0200 | Rembane | (~Rembane@user/Rembane) (Quit: WeeChat 4.1.1) |
2024-07-19 17:34:46 +0200 | <monochrom> | Who ordered Decimal anyway?! >:) |
2024-07-19 17:35:14 +0200 | irssi | (~Rembane@user/Rembane) |
2024-07-19 17:35:29 +0200 | <monochrom> | My impression is that aeson cassava etc have basically settled on Scientific so its much more de facto standard. |
2024-07-19 17:35:43 +0200 | <mauke> | oh, I see |
2024-07-19 17:35:49 +0200 | irssi | Rembane |
2024-07-19 17:35:56 +0200 | <mauke> | I missed the RealFloat part. why does it need that? |
2024-07-19 17:36:25 +0200 | <bwe> | will Scientific show for short numbers up like Decimal or Double? |
2024-07-19 17:36:53 +0200 | misterfish | (~misterfis@178.225.133.120) (Ping timeout: 248 seconds) |
2024-07-19 17:36:58 +0200 | <monochrom> | Perhaps the bliss of just needing to call encodeFloat :) |
2024-07-19 17:38:03 +0200 | <monochrom> | RealFloat expresses that "mantissa and exponent" makes sense for your number type. |
2024-07-19 17:39:21 +0200 | <monochrom> | Unfortunately it is a subclass of Floating so you also have to support like trig functions... |
2024-07-19 17:39:31 +0200 | <pie_> | did haskell lose a lot of steam or have i just not been paying much attention the past two years |
2024-07-19 17:39:41 +0200 | <monochrom> | Maybe now we see a reason why that's a bad idea. |
2024-07-19 17:39:42 +0200 | <mauke> | ah, it goes through Scientific, which is ass for fixed precision |
2024-07-19 17:39:48 +0200 | <pie_> | i mean the ecosystem, not the irc channel |
2024-07-19 17:43:06 +0200 | <haskellbridge> | <sm> it's maturing |
2024-07-19 17:44:10 +0200 | <pie_> | are there any arguments that rust didnt eat everything? :P |
2024-07-19 17:44:52 +0200 | <mauke> | DecimalRaw{ decimalMantissa = coefficient sci, decimalPlaces = negate (base10Exponent sci) } |
2024-07-19 17:44:53 +0200 | euleritian | (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) (Read error: Connection reset by peer) |
2024-07-19 17:45:01 +0200 | <mauke> | modulo type errors and overflow checks |
2024-07-19 17:45:20 +0200 | euleritian | (~euleritia@77.22.252.56) |
2024-07-19 17:47:01 +0200 | <monochrom> | I am still teaching a C-and-Unix course so Rust didn't eat that. |
2024-07-19 17:47:52 +0200 | <mauke> | in particular, decimalPlaces is a Word8, but base10Exponent an Int |
2024-07-19 17:48:06 +0200 | <pie_> | to be a bit snarky, yeah but noone that actually wants to build anything that doesnt such cares about that |
2024-07-19 17:48:08 +0200 | <pie_> | *suck |
2024-07-19 17:48:21 +0200 | smalltalkman | (uid545680@id-545680.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2024-07-19 17:48:29 +0200 | <pie_> | (i am a clown trying my best, fwiw) |
2024-07-19 17:48:45 +0200 | <mauke> | speaking of, TIL I learned that execvp will fall back to /bin/sh if there's no #! line, but execv will not |
2024-07-19 17:48:51 +0200 | <monochrom> | OK then I won't answer. |
2024-07-19 17:49:08 +0200 | <monochrom> | Hrm that's interesting. |
2024-07-19 17:49:15 +0200 | <pie_> | clown not as in joking but as in i am not a Good programmer |
2024-07-19 17:49:18 +0200 | <mauke> | what am I even typing |
2024-07-19 17:49:28 +0200 | <mauke> | s/ I learned// |
2024-07-19 17:49:38 +0200 | <pie_> | mauke: I guess thats a glibc thing? |
2024-07-19 17:49:50 +0200 | <pie_> | also, wat |
2024-07-19 17:50:14 +0200 | <mauke> | I doubt it's a gnu invention |
2024-07-19 17:50:22 +0200 | <monochrom> | Oh right, the man page already has sufficient information for deducing that. |
2024-07-19 17:50:34 +0200 | <bwe> | almost done: https://paste.tomsmeding.com/qjIAShgy |
2024-07-19 17:50:45 +0200 | <monochrom> | Hey "automatic ATM teller machine" is not so bad >:) |
2024-07-19 17:51:14 +0200 | <Rembane> | mauke: Is that reasonable or an exciting footgun? |
2024-07-19 17:51:14 +0200 | hiecaq | (~hiecaq@user/hiecaq) |
2024-07-19 17:51:27 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) (Ping timeout: 252 seconds) |
2024-07-19 17:51:33 +0200 | <mauke> | :shrug: |
2024-07-19 17:51:59 +0200 | <pie_> | "footguns are toolsg" |
2024-07-19 17:52:04 +0200 | <pie_> | s/g// |
2024-07-19 17:52:12 +0200 | <monochrom> | Oh yeah why did they not make it the opposite? |
2024-07-19 17:53:01 +0200 | <monochrom> | Seems to me one wants to be more conservative if random things on PATH are involved. |
2024-07-19 17:53:07 +0200 | <pie_> | (the national rifle association maintains that everyone has a right to their footguns) |
2024-07-19 17:53:24 +0200 | <Rembane> | pie_: That's why we don't let them code in anything but C |
2024-07-19 17:53:40 +0200 | <pie_> | I dont know if self-selection is working |
2024-07-19 17:53:53 +0200 | <pie_> | sometimes I get pangs for writing C |
2024-07-19 17:54:58 +0200 | <mauke> | it's the basis of https://justine.lol/ape.html |
2024-07-19 17:57:03 +0200 | <haskellbridge> | <sm> rust didn't and won't eat everything, it's good for certain things but not everything |
2024-07-19 17:59:31 +0200 | <pie_> | (unlike me, I am not good at anything, haha :') ) |
2024-07-19 17:59:31 +0200 | <pie_> | Ok, I'm going to go back to watching some talks, get some alcohol in my system, and keep writing documentation. |
2024-07-19 18:00:00 +0200 | <pie_> | (You'd think this would be *after* getting alcohol in one's system.) |
2024-07-19 18:00:21 +0200 | euleritian | (~euleritia@77.22.252.56) (Ping timeout: 248 seconds) |
2024-07-19 18:00:38 +0200 | euleritian | (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) |
2024-07-19 18:07:51 +0200 | <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. |
2024-07-19 18:08:12 +0200 | <bwe> | (I've solved the explicit parser type requirement) |
2024-07-19 18:11:22 +0200 | <bwe> | monochrom: https://www.reddit.com/r/haskell/comments/12unrjs/comment/jh84yuc/ |
2024-07-19 18:12:06 +0200 | euleritian | (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) (Read error: Connection reset by peer) |
2024-07-19 18:12:25 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2024-07-19 18:15:35 +0200 | cyphase | (~cyphase@user/cyphase) (Ping timeout: 258 seconds) |
2024-07-19 18:16:44 +0200 | <monochrom> | How is 1/3 in ghci relevant to parsing 3.99. (Rhetorical question.) |
2024-07-19 18:17:43 +0200 | <monochrom> | I don't imagine 1/3 makes sense for Decimal either. |
2024-07-19 18:18:18 +0200 | cyphase | (~cyphase@user/cyphase) |
2024-07-19 18:22:42 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 276 seconds) |
2024-07-19 18:22:51 +0200 | euleritian | (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) |
2024-07-19 18:24:39 +0200 | euphores | (~SASL_euph@user/euphores) (Ping timeout: 276 seconds) |
2024-07-19 18:27:07 +0200 | <geekosaur> | re execvp: hysterical raisins |
2024-07-19 18:27:54 +0200 | euleritian | (~euleritia@dynamic-176-004-239-040.176.4.pool.telefonica.de) (Read error: Connection reset by peer) |
2024-07-19 18:27:58 +0200 | <bwe> | monochrom: I do some calculations (multiplication and division) with the Scientific type. |
2024-07-19 18:28:11 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2024-07-19 18:29:45 +0200 | <monochrom> | I suppose things on PATH were actually less error-prone back then. |
2024-07-19 18:30:56 +0200 | euphores | (~SASL_euph@user/euphores) |
2024-07-19 18:32:12 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) |
2024-07-19 18:32:35 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) (Remote host closed the connection) |
2024-07-19 18:33:00 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) |
2024-07-19 18:33:15 +0200 | <bwe> | monochrom: the error messages of Decimal are more helpful: Exception: Ratio has zero denominator |
2024-07-19 18:33:25 +0200 | <bwe> | so I need to catch those |
2024-07-19 18:34:57 +0200 | danse-nr3 | (~danse-nr3@user/danse-nr3) (Remote host closed the connection) |
2024-07-19 18:36:21 +0200 | cpressey | (~weechat@176.254.71.203) (Ping timeout: 276 seconds) |
2024-07-19 18:36:56 +0200 | TonyStone | (~TonyStone@user/TonyStone) (Ping timeout: 252 seconds) |
2024-07-19 18:39:04 +0200 | oo_miguel | (~Thunderbi@78.10.207.46) (Remote host closed the connection) |
2024-07-19 18:39:23 +0200 | oo_miguel | (~Thunderbi@78.10.207.46) |
2024-07-19 18:40:58 +0200 | MadeleineSydney | (~Thunderbi@c-71-229-185-228.hsd1.co.comcast.net) (Quit: MadeleineSydney) |
2024-07-19 18:47:27 +0200 | ft | (~ft@p3e9bc4e7.dip0.t-ipconnect.de) |
2024-07-19 18:54:53 +0200 | cyphase | (~cyphase@user/cyphase) (Ping timeout: 252 seconds) |
2024-07-19 18:56:03 +0200 | danza | (~francesco@151.37.225.56) |
2024-07-19 18:59:05 +0200 | <monochrom> | Double is much less disruptive when it comes to division by zero, if that's what you want. |
2024-07-19 19:00:09 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-07-19 19:00:45 +0200 | Square2 | (~Square@user/square) (Ping timeout: 252 seconds) |
2024-07-19 19:01:00 +0200 | <bwe> | monochrom: well, I moved away from Double to avoid rounding errors… |
2024-07-19 19:01:20 +0200 | <bwe> | now, this throws me into the debugging experience. |
2024-07-19 19:01:39 +0200 | <monochrom> | Rational has no rounding errors. |
2024-07-19 19:03:09 +0200 | <bwe> | how does it behave on division by zero? |
2024-07-19 19:03:27 +0200 | <monochrom> | undefined |
2024-07-19 19:03:59 +0200 | <monochrom> | But you can always roll your own divMaybe and check that first. |
2024-07-19 19:04:25 +0200 | <monochrom> | It is not like catching exceptions in pure code is any nicer. |
2024-07-19 19:05:15 +0200 | tzh | (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
2024-07-19 19:05:28 +0200 | <bwe> | interestingly, I can trace it back to : y1 / y2 where y1 and y2 are both 25, so the result is 1 |
2024-07-19 19:06:27 +0200 | thefoxcry | (~thefoxcry@195.135.246.201) (Quit: Leaving) |
2024-07-19 19:08:16 +0200 | CalimeroTeknik | (~calimero@ctkarch.org) (Changing host) |
2024-07-19 19:08:16 +0200 | CalimeroTeknik | (~calimero@user/calimeroteknik) |
2024-07-19 19:15:03 +0200 | chele | (~chele@user/chele) (Remote host closed the connection) |
2024-07-19 19:19:45 +0200 | danza_ | (~francesco@151.57.244.219) |
2024-07-19 19:20:14 +0200 | danza | (~francesco@151.37.225.56) (Read error: Connection reset by peer) |
2024-07-19 19:23:14 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-07-19 19:33:48 +0200 | <bwe> | nice experience with https://stackoverflow.com/questions/6724434/how-to-debug-haskell-code to debug |
2024-07-19 19:34:04 +0200 | <bwe> | I've found the location where I divide by 0 |
2024-07-19 19:34:09 +0200 | <bwe> | fixed it, runs now |
2024-07-19 19:34:10 +0200 | Miroboru | (~myrvoll@178-164-114.82.3p.ntebredband.no) |
2024-07-19 19:39:54 +0200 | euphores | (~SASL_euph@user/euphores) (Quit: Leaving.) |
2024-07-19 19:42:14 +0200 | <bwe> | monochrom: I wonder whether I'd actually switch to fractional repr |
2024-07-19 19:42:21 +0200 | <bwe> | what's the go-to way there? |
2024-07-19 19:47:04 +0200 | euphores | (~SASL_euph@user/euphores) |
2024-07-19 19:50:48 +0200 | <c_wraith> | If you mean a function with the type Scientific -> Rational, realToFrac is the way to go |
2024-07-19 19:51:19 +0200 | <c_wraith> | I mean, I guess it's just toRational in this specific case |
2024-07-19 19:51:21 +0200 | sord937 | (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
2024-07-19 19:51:40 +0200 | <c_wraith> | but realToFrac is the generic conversion function between non-integer representations |
2024-07-19 19:54:19 +0200 | ash3en | (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) |
2024-07-19 19:58:22 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
2024-07-19 19:59:02 +0200 | <monochrom> | The only correct "go-to" way, "rule of thumb", "best practice", "state of the art" etc etc in this case is "it depends". |
2024-07-19 19:59:10 +0200 | euleritian | (~euleritia@77.22.252.56) |
2024-07-19 19:59:35 +0200 | <monochrom> | One can, of course, expand "it depends" to "write down formally and completely your requirements and expectations". |
2024-07-19 20:00:09 +0200 | <monochrom> | I'll tell a fable about this. |
2024-07-19 20:00:26 +0200 | <monochrom> | Once upon a time, someone asked "how to represent infinite sets?" |
2024-07-19 20:01:11 +0200 | <monochrom> | Fortunately, since they didn't say anything about what getters they needed, there is a simple solution: (). |
2024-07-19 20:01:22 +0200 | <monochrom> | I'll tell another fable about this. |
2024-07-19 20:02:17 +0200 | <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. |
2024-07-19 20:03:50 +0200 | <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. |
2024-07-19 20:07:11 +0200 | <monochrom> | OK, there is another "go-to" answer that beautifully covers everything, but you have to be a management type. "hire someone who knows". |
2024-07-19 20:15:01 +0200 | zfnmxt | (~zfnmxt@user/zfnmxt) (Remote host closed the connection) |
2024-07-19 20:15:15 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-07-19 20:16:17 +0200 | Midjak | (~MarciZ@82.66.147.146) (Quit: This computer has gone to sleep) |
2024-07-19 20:17:45 +0200 | tomku | (~tomku@user/tomku) (Ping timeout: 276 seconds) |
2024-07-19 20:20:11 +0200 | danza_ | (~francesco@151.57.244.219) (Quit: Leaving) |
2024-07-19 20:22:00 +0200 | euleritian | (~euleritia@77.22.252.56) (Remote host closed the connection) |
2024-07-19 20:22:33 +0200 | cpressey | (~weechat@176.254.71.203) |
2024-07-19 20:22:35 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2024-07-19 20:24:29 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-07-19 20:34:59 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-07-19 20:35:37 +0200 | zfnmxt | (~zfnmxt@user/zfnmxt) |
2024-07-19 20:39:20 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
2024-07-19 20:50:38 +0200 | waleee | (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) |
2024-07-19 20:54:04 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
2024-07-19 20:54:05 +0200 | <EvanR> | you don't need to worry about division by zero if you prove your code won't ever do it! |
2024-07-19 20:55:21 +0200 | ach_ol | (~ach_ol@c-71-62-230-245.hsd1.va.comcast.net) |
2024-07-19 20:57:44 +0200 | <darkling> | My favourite bad-specification tale is the one about optimisation: "We need to minimise costs". "OK, shut the factory." |
2024-07-19 20:58:37 +0200 | <dminuoso> | darkling: See, that's not going to minimise costs. |
2024-07-19 20:59:11 +0200 | cpressey | (~weechat@176.254.71.203) (Ping timeout: 252 seconds) |
2024-07-19 20:59:21 +0200 | <dminuoso> | You'll still have hundreds of workers to pay salary for. |
2024-07-19 20:59:28 +0200 | <dminuoso> | Dissolving your company, that will do the trick. |
2024-07-19 20:59:38 +0200 | <Rembane> | Liquid companies are the best |
2024-07-19 21:00:31 +0200 | darkling | gets the acid |
2024-07-19 21:02:34 +0200 | <dminuoso> | darkling: You will probably need fluoroantimonic acid. |
2024-07-19 21:02:50 +0200 | <dminuoso> | That stuff is absolutely nasty, I just recently discovered super acids. |
2024-07-19 21:04:15 +0200 | <darkling> | Ouch. That's nasty. |
2024-07-19 21:04:55 +0200 | <darkling> | That's a candidate for a "Things I Won't Work With" from Derek Lowe. |
2024-07-19 21:06:57 +0200 | <monochrom> | That solves the car parking problem, literally. Dissolve the car. >:D |
2024-07-19 21:08:29 +0200 | ach_ol | (~ach_ol@c-71-62-230-245.hsd1.va.comcast.net) (Quit: Leaving.) |
2024-07-19 21:09:09 +0200 | cpressey | (~weechat@176.254.71.203) |
2024-07-19 21:12:05 +0200 | CiaoSen | (~Jura@2a05:5800:225:1a00:e6b9:7aff:fe80:3d03) |
2024-07-19 21:16:35 +0200 | ach_ol | (~ach_ol@c-71-62-230-245.hsd1.va.comcast.net) |
2024-07-19 21:17:55 +0200 | <dminuoso> | You can also just stack cars vertically, solves your car parking problem too. |
2024-07-19 21:18:05 +0200 | <dminuoso> | Introduces a car unparking problem, but that wasn't included in the original problem. |
2024-07-19 21:18:12 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-07-19 21:18:50 +0200 | <geekosaur> | isn't that the japanese solution? |
2024-07-19 21:19:04 +0200 | <geekosaur> | complete with robots to solve the unparking part? |
2024-07-19 21:19:27 +0200 | <monochrom> | Nah, that is too perfect. >:D |
2024-07-19 21:20:05 +0200 | <monochrom> | The scrapyard kind of stacks are cheaper stacks. >:D |
2024-07-19 21:20:16 +0200 | <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. |
2024-07-19 21:20:26 +0200 | srk | (~sorki@user/srk) (Quit: ZNC 1.8.1 - https://znc.in) |
2024-07-19 21:20:30 +0200 | <dminuoso> | Contract fulfilled! |
2024-07-19 21:20:46 +0200 | <monochrom> | "max stack min cost" |
2024-07-19 21:21:45 +0200 | <dminuoso> | And maybe we can externalize the cost to repair the cars to insurances.. |
2024-07-19 21:22:10 +0200 | <dminuoso> | Bonus: The top car never needs repairs. |
2024-07-19 21:22:24 +0200 | <dminuoso> | We could maybe sell this spot with a premium price. |
2024-07-19 21:22:52 +0200 | <monochrom> | That reminds me of Hong Kong sea view scams. |
2024-07-19 21:22:59 +0200 | <monochrom> | in real estate |
2024-07-19 21:23:01 +0200 | srk | (~sorki@user/srk) |
2024-07-19 21:23:37 +0200 | <monochrom> | Builder builds an apartment that has unobstructed view to beauty sea. (Oh just you wait.) Sells at premium price. |
2024-07-19 21:24:06 +0200 | <dminuoso> | And then the lot in front gets developed the same way the year after? |
2024-07-19 21:24:25 +0200 | <monochrom> | Two years later builds yet another apartment right in front. (Do land reclamation if necessary---shove soil into sea for new land.) Recurse. |
2024-07-19 21:24:33 +0200 | <monochrom> | Yeah :) |
2024-07-19 21:26:13 +0200 | <monochrom> | By induction, every position in your car stack can be sold at premium price. >:) |
2024-07-19 21:26:55 +0200 | <darkling> | Induction... furnace? |
2024-07-19 21:27:26 +0200 | <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... |
2024-07-19 21:27:39 +0200 | <dminuoso> | monochrom: I like the business model! |
2024-07-19 21:27:55 +0200 | <dminuoso> | Let me figure out how to register an LLC now.. |
2024-07-19 21:28:45 +0200 | <dminuoso> | (Why exactly is it that companies can exist with (severely) limited liability, but private people cannot?) |
2024-07-19 21:30:00 +0200 | <monochrom> | Companies can be sold, even partly with the notion of shares. Private people can't be sold. |
2024-07-19 21:30:01 +0200 | <darkling> | Because they let the people that run them amass enough money to be able to... err... persuade the legislators to say so. |
2024-07-19 21:30:14 +0200 | <monochrom> | Solution: Private people should be up for trading, too! |
2024-07-19 21:30:16 +0200 | <dminuoso> | Oh private people can definitely be sold. |
2024-07-19 21:30:42 +0200 | <monochrom> | I am IPOing myself LOL |
2024-07-19 21:30:55 +0200 | cyphase | (~cyphase@user/cyphase) |
2024-07-19 21:31:25 +0200 | <monochrom> | Although, influencings on Youtube are ahead of us. |
2024-07-19 21:31:27 +0200 | <darkling> | monochrom: In mixed company? |
2024-07-19 21:31:30 +0200 | <monochrom> | err, influeners! |
2024-07-19 21:31:32 +0200 | <dminuoso> | Incorporating people, interesting idea. |
2024-07-19 21:31:39 +0200 | <dminuoso> | That's different from plain selling, though. |
2024-07-19 21:31:49 +0200 | <dminuoso> | The latter exists in various (illegal) markets. |
2024-07-19 21:32:02 +0200 | <dminuoso> | I wonder whether incorporating people is a thing on the darknet. |
2024-07-19 21:32:41 +0200 | <monochrom> | Yeah I take the context to be "within laws". Clearly, private people can also have limited liability in illegal markets! |
2024-07-19 21:33:09 +0200 | cpressey | (~weechat@176.254.71.203) (Ping timeout: 276 seconds) |
2024-07-19 21:34:10 +0200 | destituion | (~destituio@2a02:2121:2cc:d20e:57a3:7e82:5e63:4fee) |
2024-07-19 21:36:24 +0200 | cyphase | (~cyphase@user/cyphase) (Ping timeout: 276 seconds) |
2024-07-19 21:46:14 +0200 | skyesoss | (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) |
2024-07-19 21:48:53 +0200 | skyesoss | (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) (Quit: skyesoss) |
2024-07-19 21:49:26 +0200 | skyesoss | (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) |
2024-07-19 21:52:06 +0200 | mud | (~mud@user/kadoban) (Ping timeout: 252 seconds) |
2024-07-19 21:56:19 +0200 | mud | (~mud@user/kadoban) |
2024-07-19 21:58:52 +0200 | zfnmxt | (~zfnmxt@user/zfnmxt) (Remote host closed the connection) |
2024-07-19 22:02:13 +0200 | zfnmxt | (~zfnmxt@user/zfnmxt) |
2024-07-19 22:07:05 +0200 | zfnmxt | (~zfnmxt@user/zfnmxt) (Remote host closed the connection) |
2024-07-19 22:09:19 +0200 | zfnmxt | (~zfnmxt@user/zfnmxt) |
2024-07-19 22:12:00 +0200 | ash3en | (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) (Quit: ash3en) |
2024-07-19 22:12:18 +0200 | ash3en | (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) |
2024-07-19 22:16:40 +0200 | Square2 | (~Square@user/square) |
2024-07-19 22:16:49 +0200 | cpressey | (~weechat@176.254.71.203) |
2024-07-19 22:19:23 +0200 | destituion | (~destituio@2a02:2121:2cc:d20e:57a3:7e82:5e63:4fee) (Read error: Connection reset by peer) |
2024-07-19 22:19:36 +0200 | destituion | (~destituio@83-243-191-191.fth.tafjordconnect.net) |
2024-07-19 22:22:33 +0200 | cpressey | (~weechat@176.254.71.203) (Ping timeout: 276 seconds) |
2024-07-19 22:24:33 +0200 | cyphase | (~cyphase@user/cyphase) |
2024-07-19 22:27:13 +0200 | noumenon | (~noumenon@113.51-175-156.customer.lyse.net) |
2024-07-19 22:31:16 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
2024-07-19 22:37:05 +0200 | mreh | (~matthew@host86-160-168-12.range86-160.btcentralplus.com) (Ping timeout: 252 seconds) |
2024-07-19 22:38:45 +0200 | cyphase | (~cyphase@user/cyphase) (Ping timeout: 248 seconds) |
2024-07-19 22:44:04 +0200 | <ash3en> | anyone has experience with waargonaut? it looks not as simple as aeson. no simple deriving? |
2024-07-19 22:49:08 +0200 | tomku | (~tomku@user/tomku) |
2024-07-19 22:52:30 +0200 | ystael | (~ystael@user/ystael) (Ping timeout: 252 seconds) |
2024-07-19 22:57:25 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 248 seconds) |
2024-07-19 22:57:59 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-07-19 22:58:04 +0200 | Midjak | (~MarciZ@82.66.147.146) |
2024-07-19 22:58:57 +0200 | ash3en | (~Thunderbi@2a01:c23:8c5f:2400:5a74:953f:87ea:7e18) (Quit: ash3en) |
2024-07-19 23:00:02 +0200 | haskellbridge | (~hackager@syn-024-093-192-219.res.spectrum.com) (Remote host closed the connection) |
2024-07-19 23:00:30 +0200 | haskellbridge | (~hackager@syn-024-093-192-219.res.spectrum.com) |
2024-07-19 23:00:30 +0200 | ChanServ | +v haskellbridge |
2024-07-19 23:01:23 +0200 | kimiamania | (~65804703@user/kimiamania) (Quit: PegeLinux) |
2024-07-19 23:01:26 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-07-19 23:01:43 +0200 | kimiamania | (~65804703@user/kimiamania) |
2024-07-19 23:02:51 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 276 seconds) |
2024-07-19 23:03:35 +0200 | euleritian | (~euleritia@dynamic-176-003-020-012.176.3.pool.telefonica.de) |
2024-07-19 23:06:50 +0200 | <davean> | Its pretty straight forward to use |
2024-07-19 23:10:54 +0200 | skyesoss1 | (~Thunderbi@128.135.204.35) |
2024-07-19 23:14:27 +0200 | _xor | (~xor@ip-208-102-243-175.dynamic.fuse.net) (Quit: brb/bbiab) |
2024-07-19 23:21:00 +0200 | tcard | (~tcard@2400:4051:5801:7500:1e90:74c3:2754:ce8a) (Quit: Leaving) |
2024-07-19 23:23:59 +0200 | JuanDaugherty | (~juan@user/JuanDaugherty) |
2024-07-19 23:33:19 +0200 | tcard | (~tcard@p5147008-ipxg23701hodogaya.kanagawa.ocn.ne.jp) |
2024-07-19 23:41:52 +0200 | down200 | (~down200@shell.lug.mtu.edu) (Quit: ZNC - https://znc.in) |
2024-07-19 23:42:18 +0200 | down200 | (~down200@shell.lug.mtu.edu) |
2024-07-19 23:43:20 +0200 | Inst | (~Inst@user/Inst) |
2024-07-19 23:43:30 +0200 | <pie_> | hm. looks like effects are still an (active?) area of research |
2024-07-19 23:44:58 +0200 | down200 | (~down200@shell.lug.mtu.edu) (Remote host closed the connection) |
2024-07-19 23:48:58 +0200 | JuanDaugherty | (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
2024-07-19 23:52:37 +0200 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2024-07-19 23:55:49 +0200 | skyesoss1 | (~Thunderbi@128.135.204.35) (Quit: skyesoss1) |
2024-07-19 23:55:56 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2024-07-19 23:56:30 +0200 | down200 | (~down200@shell.lug.mtu.edu) |
2024-07-19 23:58:29 +0200 | tomku | (~tomku@user/tomku) (Ping timeout: 252 seconds) |
2024-07-19 23:58:42 +0200 | tomku | (~tomku@user/tomku) |