Logs on 2022-06-26 (liberachat/#haskell)
| 00:01:35 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 00:01:48 | → | motherfsck joins (~motherfsc@user/motherfsck) |
| 00:03:09 | → | califax joins (~califax@user/califx) |
| 00:03:23 | → | alexhandy joins (~trace@user/trace) |
| 00:03:40 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 00:04:51 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 268 seconds) |
| 00:06:17 | × | alexhandy2 quits (~trace@user/trace) (Ping timeout: 248 seconds) |
| 00:06:29 | × | Topsi quits (~Topsi@dyndsl-095-033-020-051.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
| 00:12:08 | × | machinedgod quits (~machinedg@66.244.246.252) (Ping timeout: 246 seconds) |
| 00:14:54 | × | pleo quits (~pleo@user/pleo) (Quit: quit) |
| 00:22:45 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 00:22:45 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 00:22:48 | allbery_b | is now known as geekosaur |
| 00:40:37 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 268 seconds) |
| 00:44:09 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 00:48:42 | → | merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
| 00:52:03 | × | zeenk quits (~zeenk@2a02:2f04:a301:3d00:39df:1c4b:8a55:48d3) (Quit: Konversation terminated!) |
| 00:52:57 | × | alp quits (~alp@user/alp) (Ping timeout: 268 seconds) |
| 00:55:12 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 00:55:28 | → | nate4 joins (~nate@98.45.169.16) |
| 01:00:21 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
| 01:11:38 | <JensPetersen[m]> | Is there a tool that can rename a module? hls?? |
| 01:23:02 | × | merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
| 01:25:06 | × | ulvarrefr quits (~user@188.124.56.153) (Ping timeout: 272 seconds) |
| 01:33:26 | → | lainon joins (~lainon@2601:7c0:c500:4d20:2ca2:483a:8f15:302d) |
| 01:35:10 | × | lainon quits (~lainon@2601:7c0:c500:4d20:2ca2:483a:8f15:302d) (Client Quit) |
| 01:35:16 | <jackdk> | monochrom: because defining types in other languages is often a Big Ceremony, so it can feel like a different kind of thing |
| 01:36:04 | → | lainon joins (~lainon@2601:7c0:c500:4d20:2ca2:483a:8f15:302d) |
| 01:39:49 | × | gurkenglas quits (~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de) (Ping timeout: 268 seconds) |
| 01:45:10 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:cd28:27b2:2677:8e87) (Remote host closed the connection) |
| 01:52:08 | × | lainon quits (~lainon@2601:7c0:c500:4d20:2ca2:483a:8f15:302d) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 01:53:13 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 01:56:50 | ski | . o O ( "To stand on high ceremony / First leap off hinge and bracket" -- Castle Master Rhyme ) |
| 02:01:25 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 268 seconds) |
| 02:01:51 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:cc67:4409:a66e:32b4) |
| 02:05:45 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 02:13:35 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 246 seconds) |
| 02:18:40 | × | unit73e quits (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 268 seconds) |
| 02:22:55 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
| 02:25:28 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 268 seconds) |
| 02:27:53 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 02:44:56 | × | td_ quits (~td@muedsl-82-207-238-209.citykom.de) (Ping timeout: 255 seconds) |
| 02:45:47 | → | nate4 joins (~nate@98.45.169.16) |
| 02:46:52 | → | td_ joins (~td@94.134.91.9) |
| 02:52:35 | × | motherfsck quits (~motherfsc@user/motherfsck) (Ping timeout: 268 seconds) |
| 02:59:31 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 03:01:47 | → | yrlnry joins (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
| 03:05:35 | → | shapr joins (~user@2600:4040:2d31:7100:a60f:9de4:efb4:6eb3) |
| 03:06:46 | × | yrlnry quits (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 268 seconds) |
| 03:07:56 | → | motherfsck joins (~motherfsc@user/motherfsck) |
| 03:19:14 | → | merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
| 03:19:59 | × | Unicorn_Princess quits (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection) |
| 03:21:23 | × | motherfsck quits (~motherfsc@user/motherfsck) (Ping timeout: 255 seconds) |
| 03:22:32 | → | machinedgod joins (~machinedg@66.244.246.252) |
| 03:23:25 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
| 03:24:25 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 03:30:01 | × | raym quits (~raym@user/raym) (Ping timeout: 256 seconds) |
| 03:30:16 | × | toluene quits (~toluene@user/toulene) (Quit: Ping timeout (120 seconds)) |
| 03:31:42 | → | toluene joins (~toluene@user/toulene) |
| 03:34:48 | → | motherfsck joins (~motherfsc@user/motherfsck) |
| 03:35:17 | → | raym joins (~raym@user/raym) |
| 03:35:36 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:cc67:4409:a66e:32b4) (Remote host closed the connection) |
| 03:44:57 | × | raym quits (~raym@user/raym) (Remote host closed the connection) |
| 03:53:20 | × | merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
| 03:57:32 | → | yauhsien joins (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) |
| 04:00:40 | → | shiraeeshi joins (~shiraeesh@109.166.58.140) |
| 04:00:51 | × | yauhsien quits (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Read error: Connection reset by peer) |
| 04:01:22 | → | Kaiepi joins (~Kaiepi@156.34.47.253) |
| 04:01:27 | → | yauhsien joins (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) |
| 04:03:49 | → | nate4 joins (~nate@98.45.169.16) |
| 04:05:07 | → | raym joins (~raym@user/raym) |
| 04:08:23 | × | yauhsien quits (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 246 seconds) |
| 04:08:38 | × | xff0x quits (~xff0x@2405:6580:b080:900:9d54:6002:d2f9:ffa6) (Ping timeout: 240 seconds) |
| 04:10:36 | × | raym quits (~raym@user/raym) (Remote host closed the connection) |
| 04:13:10 | → | coot joins (~coot@213.134.190.95) |
| 04:14:24 | → | xff0x joins (~xff0x@2405:6580:b080:900:a1f7:c498:d5bb:4b94) |
| 04:14:33 | × | shriekingnoise quits (~shrieking@201.212.175.181) (Quit: Quit) |
| 04:16:26 | × | russruss quits (~russruss@my.russellmcc.com) (Ping timeout: 246 seconds) |
| 04:17:46 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:cc67:4409:a66e:32b4) |
| 04:20:19 | → | russruss joins (~russruss@my.russellmcc.com) |
| 04:28:44 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 04:29:23 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 04:29:24 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 272 seconds) |
| 04:35:42 | → | raym joins (~raym@user/raym) |
| 04:40:04 | × | causal quits (~user@50.35.83.177) (Quit: WeeChat 3.5) |
| 04:51:02 | → | yauhsien joins (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) |
| 04:57:09 | → | nate4 joins (~nate@98.45.169.16) |
| 04:57:15 | × | monochrom quits (~trebla@216.138.220.146) (Quit: NO CARRIER) |
| 04:57:59 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 04:58:36 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Client Quit) |
| 05:04:26 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
| 05:07:01 | × | yauhsien quits (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
| 05:10:15 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 05:11:07 | × | iteratee quits (~kyle@162.218.222.107) (Ping timeout: 240 seconds) |
| 05:13:04 | → | monochrom joins (trebla@216.138.220.146) |
| 05:18:28 | → | nate4 joins (~nate@98.45.169.16) |
| 05:20:42 | × | shiraeeshi quits (~shiraeesh@109.166.58.140) (Ping timeout: 272 seconds) |
| 05:23:40 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
| 05:24:30 | × | coot quits (~coot@213.134.190.95) (Ping timeout: 272 seconds) |
| 05:26:05 | → | Midjak joins (~Midjak@82.66.147.146) |
| 05:26:20 | × | wroathe quits (~wroathe@user/wroathe) (Quit: leaving) |
| 05:28:56 | × | machinedgod quits (~machinedg@66.244.246.252) (Ping timeout: 272 seconds) |
| 05:35:32 | × | leeb quits (~leeb@KD106155002017.au-net.ne.jp) (Ping timeout: 246 seconds) |
| 05:37:45 | → | leeb joins (~leeb@KD106155001119.au-net.ne.jp) |
| 05:39:02 | × | mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Ping timeout: 246 seconds) |
| 05:39:10 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:47:06 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 268 seconds) |
| 05:47:51 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 05:49:42 | → | nate4 joins (~nate@98.45.169.16) |
| 05:49:45 | → | merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
| 05:50:49 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 248 seconds) |
| 05:55:38 | sm | is intrigued |
| 05:56:53 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 246 seconds) |
| 06:03:00 | → | frost joins (~frost@user/frost) |
| 06:05:24 | × | Kaiepi quits (~Kaiepi@156.34.47.253) (Read error: Connection reset by peer) |
| 06:06:00 | → | yauhsien joins (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) |
| 06:09:13 | → | Kaiepi joins (~Kaiepi@156.34.47.253) |
| 06:12:37 | × | toluene quits (~toluene@user/toulene) (Quit: Ping timeout (120 seconds)) |
| 06:14:06 | → | toluene joins (~toluene@user/toulene) |
| 06:21:23 | × | yauhsien quits (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 255 seconds) |
| 06:23:50 | × | merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
| 06:29:52 | × | cdsmith63 quits (~cdsmith@c-73-184-127-183.hsd1.ga.comcast.net) (Ping timeout: 252 seconds) |
| 06:29:59 | → | gurkenglas joins (~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de) |
| 06:29:59 | → | nate4 joins (~nate@98.45.169.16) |
| 06:35:01 | <sm> | I'm a little confused by the latest discussion on https://github.com/haskellfoundation/tech-proposals/issues/35 . Isn't the change from String to AbstractFilePath a major breaking change ? Isn't it normal practice to signal that with a big version change ? Wouldn't avoiding that be strictly speaking a kludge to try to reduce upgrade work ? |
| 06:35:10 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 06:35:10 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 06:35:13 | allbery_b | is now known as geekosaur |
| 06:36:05 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 246 seconds) |
| 06:51:55 | → | nate4 joins (~nate@98.45.169.16) |
| 06:54:17 | <Maxdamantus> | sm: not particularly knowledgable about this, but which parts are you looking at in particular? afaics stages 1 and 2 should be non-breaking. |
| 06:54:50 | <Maxdamantus> | since they're just about adding the alias and warning when the alias is not used. |
| 06:55:22 | <Maxdamantus> | (presumably stage 3 would be a breaking change, but dunno if that's what you're referring to) |
| 06:56:10 | <sm> | Maxdamantus: where are those stages... the Current State section ? |
| 06:56:36 | <Maxdamantus> | This is what I read the other day: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/abstract-file-path (linked from the GH issue) |
| 06:56:56 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
| 06:57:36 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 06:58:19 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 06:58:29 | <sm> | wow, this is old.. page history doesn't show all of it either |
| 06:59:35 | × | Kaiepi quits (~Kaiepi@156.34.47.253) (Read error: Connection reset by peer) |
| 07:00:10 | <Maxdamantus> | Hm. Didn't notice the date. I did notice that (m)aerwald seemed to be talking about details that were not in that wiki page. |
| 07:02:01 | <sm> | thanks for the link. Yes I'm talking about whenever the API actually changes in a visible way |
| 07:02:26 | <Maxdamantus> | The good thing about the wiki page is that it's not necessarily incompatible with how I think things should work. |
| 07:03:46 | <Maxdamantus> | since at the end of the process, `FilePath` could just become an alias for a proper Unicode 8-bit string type (ie, UTF-8 without a well-formedness restriction). |
| 07:07:25 | → | coot joins (~coot@213.134.190.95) |
| 07:08:16 | <EvanR> | ..I'm not sure how a utf-8 string type helps filepath issues? |
| 07:08:39 | <EvanR> | even on linux, filesystems may not be using utf8 |
| 07:08:52 | <Maxdamantus> | Right, so it shouldn't have a well-formedness restriction. |
| 07:08:58 | <Maxdamantus> | It should allow any Unicode 8-bit string. |
| 07:08:59 | <Maxdamantus> | afk |
| 07:09:06 | <Maxdamantus> | (ie, any bytestring) |
| 07:09:08 | <EvanR> | what's a unicode 8-bit string |
| 07:09:35 | <EvanR> | bytestring might work |
| 07:11:38 | × | cocreature quits (~moritz@2a03:b0c0:3:d0::c8:f001) (Quit: WeeChat 3.0.1) |
| 07:11:54 | <dsal> | I worked on a filesystem abstraction that used ByteString because it was necessary in order to represent all possible file paths on the system. It's annoying, but people do annoying things and avoiding the representation doesn't make it easier. |
| 07:12:02 | → | Kaiepi joins (~Kaiepi@156.34.47.253) |
| 07:15:26 | <maerwald[m]> | Maxdamantus: what happens with filepaths that are not unicode? |
| 07:16:00 | <energizer> | presumably nothing special |
| 07:16:10 | <energizer> | they're just bytestrings |
| 07:16:30 | <maerwald[m]> | Maxdamantus: btw... PEP 383 isn't total when converting from [Char]. It can fail |
| 07:16:53 | <maerwald[m]> | energizer: I mean when you convert them to [Char] |
| 07:17:02 | <energizer> | why would you tho |
| 07:19:21 | <maerwald[m]> | energizer: because that's a common representation. If you want to filter all files that have a specific printable unicode character, you need to do that |
| 07:20:01 | <maerwald[m]> | When you enforce UTF-8, you get garbage |
| 07:20:48 | → | yauhsien joins (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) |
| 07:21:44 | <maerwald[m]> | sm: not a breaking change. It's additional API, will not even be a major version bump |
| 07:22:36 | <energizer> | maerwald[m]: yeah that conversion is fallible |
| 07:23:13 | <maerwald[m]> | energizer: decoding with PEP 383 is total. Encoding isn't |
| 07:23:14 | <sm> | maerwald: won't `FilePath` in haskell code have a different meaning at some point ? |
| 07:23:23 | <maerwald[m]> | sm: probably not |
| 07:23:28 | <sm> | I see.. thanks |
| 07:23:44 | <maerwald[m]> | The new type will be OsPath |
| 07:23:56 | <sm> | nice.. thanks for your work on it |
| 07:25:16 | sm | proceeds to bikeshed "OsPath" |
| 07:25:42 | <maerwald[m]> | energizer: we would need a Char type in Haskell that represents only Unicode scalars (without surrogates), but we don't have one |
| 07:25:56 | <Maxdamantus> | maerwald[m]: if there's the "proper Unicode 8-bit string type" that I'm talking about (equivalent to `ByteString`, but more stringy), you wouldn't need to convert to `[Char]`. |
| 07:26:21 | <Maxdamantus> | maerwald[m]: if you do convert to `[Char]`, that's essentially a Unicode conversion, where errors will be replaced with replacement characters. |
| 07:26:38 | <Maxdamantus> | ie, just like what happens when converting from UTF-8 to UTF-16. |
| 07:27:18 | <maerwald[m]> | Maxdamantus: that makes no sense. What do you do with filepaths that are not UTF-8? |
| 07:27:32 | <Maxdamantus> | the idea is that for correct handling of arbitrary strings, there should be an obvious type to use. That applies to reading text from files as well as text from filenames. |
| 07:27:35 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 07:27:35 | <maerwald[m]> | You have to decode them first, then encode again |
| 07:27:56 | <maerwald[m]> | That means you have to convert to [Char] |
| 07:28:05 | <maerwald[m]> | And now you get garbage |
| 07:29:26 | <Maxdamantus> | maerwald[m]: you should be able to do things like write them to standard out, or concatenate them to get bigger strings. Neither of those operations involve any conversion, so they shouldn't corrupt any data. |
| 07:29:57 | <maerwald[m]> | Maxdamantus: you are corrupting data, you're just doing it in a lossless way |
| 07:30:19 | <Maxdamantus> | maerwald[m]: no. If you're preserving the input bytes as output bytes, there's no data corruption. |
| 07:30:32 | <maerwald[m]> | Anyone trying to interpret printable unicode chars gets garbage |
| 07:30:41 | <maerwald[m]> | Yes that is corruption |
| 07:30:52 | <Maxdamantus> | maerwald[m]: data corruption is when you have to replace bits of the input with replacement characters, which you only need to do when interacting with other encoding forms. |
| 07:30:57 | <Maxdamantus> | eg, UTF-16 or [Char] |
| 07:31:01 | <Maxdamantus> | $ echo $'\xff'foobar | grep -a a | xxd |
| 07:31:02 | <Maxdamantus> | 00000000: ff66 6f6f 6261 720a .foobar. |
| 07:31:30 | <maerwald[m]> | Maxdamantus: i consider this corruption, because I may get wrong results |
| 07:31:35 | <Maxdamantus> | `grep` is a text-based command, but there's no reason for it to convert to UTF-16, so as demonstrated in that command, there's no need to corrupt the input data. |
| 07:31:46 | <Maxdamantus> | how is it corruption if it didn't modify the input? |
| 07:31:58 | <Maxdamantus> | corruption necessarily involves modifying something. |
| 07:32:03 | <maerwald[m]> | Because you lost encoding information |
| 07:32:39 | <Maxdamantus> | What encoding information was lost? |
| 07:32:46 | <Maxdamantus> | There is no encoding information in the input. |
| 07:32:53 | <maerwald[m]> | The original encoding |
| 07:33:00 | <Maxdamantus> | and there's no encoding information in the output. Nothing was lost or corrupted. |
| 07:33:03 | <maerwald[m]> | Of course there is |
| 07:33:15 | <Maxdamantus> | The ill-formed Unicode sequence <FF> was preserved. |
| 07:33:53 | <Maxdamantus> | If the operation had to convert to UTF-16 for some reason, it would likely have been replaced with U+FFFD, which would be a form of corruption (information loss). |
| 07:34:11 | × | yauhsien quits (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 246 seconds) |
| 07:34:20 | <maerwald[m]> | If your filepath is CP932 and you convert it to escaped UTF-8 and then convert that to [Char], you lost the original encoding and get garbage |
| 07:34:55 | <Maxdamantus> | Sure, but you should be able to do a lot of things without converting. |
| 07:35:01 | <Maxdamantus> | That's how Unicode has been designed. |
| 07:35:36 | <maerwald[m]> | Maxdamantus: yes, exactly. You should be able to do a lot of things without touching the encoding at all. That's what the propossl does |
| 07:35:42 | <Maxdamantus> | and as I said the other day, that's how ICU works, and it's how other systems endorsed by the Unicode consortium work. |
| 07:36:07 | <maerwald[m]> | Maxdamantus: UTF-8 escaping is not endorsed by the consortium |
| 07:36:13 | <Maxdamantus> | maerwald[m]: right, which is why I said: |
| 07:36:14 | <Maxdamantus> | 19:02:25 < Maxdamantus> The good thing about the wiki page is that it's not necessarily incompatible with how I think things should work. |
| 07:36:17 | <Maxdamantus> | 19:03:46 < Maxdamantus> since at the end of the process, `FilePath` could just become an alias for a proper Unicode 8-bit string type (ie, UTF-8 without a well-formedness restriction). |
| 07:36:24 | <maerwald[m]> | https://unicode.org/L2/L2009/09236-pep383-problems.html |
| 07:36:56 | × | Midjak quits (~Midjak@82.66.147.146) (Read error: Connection reset by peer) |
| 07:37:33 | → | Midjak joins (~Midjak@82.66.147.146) |
| 07:38:03 | <Maxdamantus> | imo PEP-383 is a workaround to a bad Unicode implementation. |
| 07:38:11 | <Maxdamantus> | It was devised after Python 3 was released. |
| 07:38:13 | × | eod|fserucas_ quits (~eod|fseru@193.65.114.89.rev.vodafone.pt) (Ping timeout: 256 seconds) |
| 07:38:13 | × | eod|fserucas quits (~eod|fseru@193.65.114.89.rev.vodafone.pt) (Ping timeout: 256 seconds) |
| 07:38:23 | <Maxdamantus> | So I agree that there are problems with PEP-383. |
| 07:38:26 | <maerwald[m]> | Maxdamantus: you were just suggesting to use it |
| 07:38:39 | <Maxdamantus> | Where? |
| 07:39:26 | <Maxdamantus> | I remember you mentioned the other day that it could be used to support round-tripping with `type FilePath = String`. |
| 07:39:41 | <Maxdamantus> | I don't really like that though. |
| 07:39:42 | <maerwald[m]> | That's the only way to convert arbitrary ByteStrings to UTF-8 without well formedness check |
| 07:40:02 | <Maxdamantus> | My proposal is to not convert. |
| 07:40:15 | <Maxdamantus> | There is no way to convert arbitrary `ByteString`s to well-formed UTF-8. |
| 07:40:25 | <maerwald[m]> | Exactly |
| 07:40:28 | <Maxdamantus> | (at least, not idempotently) |
| 07:40:46 | <Maxdamantus> | Right, so the Unicode string type should just handle arbitrary bytestrings. |
| 07:40:54 | <maerwald[m]> | So why would you call a bytestring UTF-8 then |
| 07:42:06 | <Maxdamantus> | You can call it an 8-bit Unicode string if you want to be more explicit that there's no well-formedness constraint. I can't remember the exact terminology I've always used, but afaik "UTF-8 string" in Unicode basically means the same thing as "8-bit Unicode string", which doesn't imply well-formedness. |
| 07:42:22 | <Maxdamantus> | "8-bit Unicode string" is equivalent to "bytestring". |
| 07:42:51 | <maerwald[m]> | Uhm, no? |
| 07:43:25 | → | jafarlihi joins (~user@188.253.235.27) |
| 07:43:30 | jafarlihi | is now known as l33th4x0r |
| 07:43:52 | <Maxdamantus> | https://unicode.org/glossary/#U |
| 07:43:54 | l33th4x0r | is now known as l337h4x0r |
| 07:43:54 | <Maxdamantus> | > Unicode String. A code unit sequence containing code units of a particular Unicode encoding form (whether well-formed or not). (See definition D80 in Section 3.9, Unicode Encoding Forms.) |
| 07:43:56 | <lambdabot> | <hint>:1:60: error: parse error on input ‘of’ |
| 07:44:23 | <maerwald[m]> | UTF-8 doesn't denote arbitrary bytestrings |
| 07:44:56 | <maerwald[m]> | The only way to handle arbitrary bytestrings is: 1. Not touch the bytestring at all and 2. Allow to specify the encoding when converting |
| 07:45:04 | <maerwald[m]> | That's what the new API does |
| 07:46:19 | <Maxdamantus> | https://www.unicode.org/versions/Unicode14.0.0/ch03.pdf |
| 07:46:29 | <Maxdamantus> | > Unicode 8-bit string: A Unicode string containing only UTF-8 code units. |
| 07:46:30 | <lambdabot> | <hint>:1:73: error: |
| 07:46:30 | <lambdabot> | parse error (possibly incorrect indentation or mismatched brackets) |
| 07:47:00 | → | Tuplanolla joins (~Tuplanoll@91-159-69-97.elisa-laajakaista.fi) |
| 07:47:06 | → | zeenk joins (~zeenk@2a02:2f04:a301:3d00:39df:1c4b:8a55:48d3) |
| 07:47:37 | <Maxdamantus> | > D78 Code unit sequence: An ordered sequence of one or more code units. |
| 07:47:39 | <lambdabot> | <hint>:1:45: error: parse error on input ‘of’ |
| 07:47:48 | <Maxdamantus> | > When the code unit is an 8-bit unit, a code unit sequence may also be referred to as a byte sequence. |
| 07:47:50 | <lambdabot> | <hint>:1:36: error: parse error on input ‘,’ |
| 07:48:06 | <Maxdamantus> | Should probably have used a different character for line quotes. |
| 07:48:24 | <maerwald[m]> | Maxdamantus: that still follows the UTF-8 Bit distribution, which doesn't express arbitrary distribution |
| 07:49:02 | <Maxdamantus> | maerwald[m]: that's not true. Feel free to read the Unicode chapter. |
| 07:49:11 | <maerwald[m]> | I did |
| 07:49:13 | <Maxdamantus> | maerwald[m]: it discusses ill-formed Unicode strings. |
| 07:49:35 | <Maxdamantus> | maerwald[m]: it even gives examples of what it calls "UTF-8 code unit sequences" that are ill-formed. |
| 07:49:58 | <maerwald[m]> | Well, what's the point to call it UTF-8 when it's arbitrary bytestrings then? |
| 07:51:24 | <Maxdamantus> | maerwald[m]: why call it "text" if it can represent things that are not text, like "����"? |
| 07:52:09 | <maerwald[m]> | I think this is not helpful |
| 07:52:29 | <Maxdamantus> | Sure, it's not particularly relevant anyway. |
| 07:53:00 | <Maxdamantus> | This is simply how the Unicode standard describes things. |
| 07:53:38 | <Maxdamantus> | as I said, you can say "Unicode 8-bit string" to be explicit, which seems to be used in the standard. |
| 07:54:48 | → | Guest18 joins (~Guest18@cpc69054-oxfd25-2-0-cust844.4-3.cable.virginm.net) |
| 07:55:26 | × | Guest18 quits (~Guest18@cpc69054-oxfd25-2-0-cust844.4-3.cable.virginm.net) (Client Quit) |
| 07:59:06 | → | notzmv joins (~zmv@user/notzmv) |
| 07:59:41 | × | dcoutts quits (~duncan@host86-150-18-54.range86-150.btcentralplus.com) (Ping timeout: 268 seconds) |
| 08:05:17 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:cc67:4409:a66e:32b4) (Remote host closed the connection) |
| 08:05:36 | → | gmg joins (~user@user/gehmehgeh) |
| 08:09:10 | × | phma quits (~phma@host-67-44-208-150.hnremote.net) (Read error: Connection reset by peer) |
| 08:11:05 | → | phma joins (phma@2001:5b0:210b:f1b8:dfb9:4399:11c9:1734) |
| 08:20:27 | → | merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
| 08:24:11 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 08:24:27 | → | img joins (~img@user/img) |
| 08:28:30 | → | alp joins (~alp@user/alp) |
| 08:29:38 | × | l337h4x0r quits (~user@188.253.235.27) (Ping timeout: 255 seconds) |
| 08:33:06 | → | MajorBiscuit joins (~MajorBisc@2a02-a461-129d-1-193d-75d8-745d-e91e.fixed6.kpn.net) |
| 08:33:08 | → | yauhsien joins (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) |
| 08:33:28 | → | l337h4x0r joins (~user@188.253.235.27) |
| 08:36:07 | × | l337h4x0r quits (~user@188.253.235.27) (Client Quit) |
| 08:42:01 | → | yrlnry joins (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
| 08:42:32 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 08:44:41 | × | alp quits (~alp@user/alp) (Ping timeout: 248 seconds) |
| 08:45:29 | → | leib joins (~leib@2405:201:900a:f088:496d:d4b9:714:29f5) |
| 08:46:44 | × | yrlnry quits (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 255 seconds) |
| 08:47:47 | × | yauhsien quits (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
| 08:55:24 | × | merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
| 09:00:20 | × | Zach[m] quits (~zoglesby@user/zoglesby) (Quit: You have been kicked for being idle) |
| 09:01:19 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 09:05:41 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:cc67:4409:a66e:32b4) |
| 09:10:08 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:cc67:4409:a66e:32b4) (Ping timeout: 255 seconds) |
| 09:11:55 | → | alp joins (~alp@user/alp) |
| 09:13:46 | × | MajorBiscuit quits (~MajorBisc@2a02-a461-129d-1-193d-75d8-745d-e91e.fixed6.kpn.net) (Ping timeout: 272 seconds) |
| 09:19:13 | → | dcoutts joins (~duncan@185.201.60.17) |
| 09:19:38 | → | nate4 joins (~nate@98.45.169.16) |
| 09:24:58 | × | leib quits (~leib@2405:201:900a:f088:496d:d4b9:714:29f5) (Remote host closed the connection) |
| 09:25:06 | → | shiraeeshi joins (~shiraeesh@109.166.58.140) |
| 09:25:18 | → | leib joins (~leib@2405:201:900a:f088:496d:d4b9:714:29f5) |
| 09:27:14 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
| 09:28:08 | × | alp quits (~alp@user/alp) (Ping timeout: 255 seconds) |
| 09:36:38 | → | _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl) |
| 09:41:28 | × | dcoutts quits (~duncan@185.201.60.17) (Remote host closed the connection) |
| 09:44:32 | × | Batzy quits (~quassel@user/batzy) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 09:47:02 | → | Batzy joins (~quassel@user/batzy) |
| 09:49:17 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 246 seconds) |
| 09:58:02 | × | leeb quits (~leeb@KD106155001119.au-net.ne.jp) (Ping timeout: 246 seconds) |
| 10:00:56 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 10:01:47 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 10:06:47 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c51d:2109:9c76:c05f) |
| 10:09:29 | → | coot joins (~coot@213.134.190.95) |
| 10:10:01 | → | alp joins (~alp@user/alp) |
| 10:11:20 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c51d:2109:9c76:c05f) (Ping timeout: 255 seconds) |
| 10:11:24 | → | lisbeths joins (uid135845@id-135845.lymington.irccloud.com) |
| 10:19:04 | → | benin0 joins (~benin@183.82.24.201) |
| 10:19:20 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 10:19:52 | → | coot joins (~coot@213.134.190.95) |
| 10:26:55 | × | auri quits (~auri@fsf/member/auri) () |
| 10:27:17 | → | auri joins (~auri@fsf/member/auri) |
| 10:31:51 | → | auri_ joins (~auri@fsf/member/auri) |
| 10:34:26 | × | auri quits (~auri@fsf/member/auri) (Ping timeout: 246 seconds) |
| 10:38:10 | × | alp quits (~alp@user/alp) (Ping timeout: 268 seconds) |
| 10:43:52 | → | merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
| 10:46:41 | → | kenaryn joins (~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr) |
| 10:57:22 | → | MajorBiscuit joins (~MajorBisc@2a02-a461-129d-1-193d-75d8-745d-e91e.fixed6.kpn.net) |
| 10:57:49 | → | dcoutts joins (~duncan@host86-187-167-237.range86-187.btcentralplus.com) |
| 10:58:08 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 255 seconds) |
| 10:59:20 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 11:00:07 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 11:00:46 | × | joo-_ quits (~joo-_@fsf/member/joo--) (Quit: leaving) |
| 11:01:48 | → | joo-_ joins (~joo-_@172-105-65-159.ip.linodeusercontent.com) |
| 11:01:48 | × | joo-_ quits (~joo-_@172-105-65-159.ip.linodeusercontent.com) (Changing host) |
| 11:01:48 | → | joo-_ joins (~joo-_@fsf/member/joo--) |
| 11:08:40 | × | myme1 quits (~myme@2a01:799:d5a:cd00:3de4:f2de:722d:a4ae) (Ping timeout: 248 seconds) |
| 11:09:42 | → | myme1 joins (~myme@2a01:799:d5a:cd00:af:3abd:b96f:39bf) |
| 11:13:34 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 11:15:47 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 268 seconds) |
| 11:17:27 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 11:18:51 | <kenaryn> | Hello. I implemented an instance for a new data type following a Chris Allen's book exercice. It compiles and I understand not how to call it in the REPL; the compiler tells me the data constructor is not in scope. Can someone guide me please? https://paste.tomsmeding.com/SwliVMAg |
| 11:19:06 | → | vbeatrice[m] joins (~vbeatrice@2001:470:69fc:105::3ebf) |
| 11:20:05 | <[Leary]> | That's the type constructor. Your data constructor is `Two`. |
| 11:20:33 | <[Leary]> | Also, that Eq instance can be derived. |
| 11:21:49 | <kenaryn> | The instance implementation itself is the exercice's purpose. |
| 11:24:04 | <kenaryn> | Calling the data constructor (i.e. `Two 11 12 == Two 9 1`) produces the same error. |
| 11:25:19 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 11:26:40 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 11:26:42 | <shiraeeshi> | the command is ":l the-name-of-the-file.hs" |
| 11:27:20 | <[Leary]> | Yes, that or import the module. |
| 11:33:23 | <kenaryn> | Apologies, I loaded the wrong module. Thank you. |
| 11:47:37 | × | merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds) |
| 11:47:53 | → | BusConscious joins (~martin@ip5f5bdf01.dynamic.kabel-deutschland.de) |
| 11:48:29 | <BusConscious> | hello everyone, yesterday I learned about record update syntax |
| 11:48:49 | <BusConscious> | now I want to do something like: append f toAdd cmd = cmd { f = [toAdd] ++ f cmd} |
| 11:49:14 | <BusConscious> | where f is the field of list type I want to append stuff to |
| 11:49:28 | <BusConscious> | but it says "Not in scope: 'f'" |
| 11:49:54 | <geekosaur> | sadly, f can't be a variable there |
| 11:50:06 | <geekosaur> | this is the big wart in record update syntax |
| 11:50:45 | <[Leary]> | Unfortunately, record fields aren't first class. Fortunately, this has lead to the invention of lenses. Unfortunately again, lenses can't be recommended to beginners. |
| 11:53:51 | → | cdsmith57 joins (~cdsmith@c-73-184-127-183.hsd1.ga.comcast.net) |
| 11:58:05 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 246 seconds) |
| 11:59:09 | <BusConscious> | I will look into that sooner or later though |
| 11:59:14 | → | nate4 joins (~nate@98.45.169.16) |
| 11:59:15 | <BusConscious> | https://hackage.haskell.org/package/lens-tutorial-1.0.4/docs/Control-Lens-Tutorial.html |
| 11:59:33 | <BusConscious> | Do lenses only work with template haskell? |
| 12:00:01 | <[Leary]> | No, it's just convenient to eliminate boilerplate. |
| 12:01:33 | × | frost quits (~frost@user/frost) (Quit: Client closed) |
| 12:01:43 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 12:02:05 | → | frost joins (~frost@user/frost) |
| 12:04:30 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
| 12:06:16 | → | merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
| 12:07:33 | <maerwald[m]> | You can also use generics to derive them |
| 12:13:34 | → | jafarlihi joins (~user@188.253.235.27) |
| 12:13:47 | jafarlihi | is now known as l337h4x0r |
| 12:16:22 | × | frost quits (~frost@user/frost) (Ping timeout: 252 seconds) |
| 12:18:40 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.5) |
| 12:22:30 | → | cyanide3dinner joins (~cyanide4d@106.201.249.151) |
| 12:26:09 | <BusConscious> | I heeded to some advice ski gave me https://github.com/MartinErhardt/kell/commit/11ba0e73baa6cbed12c5a98fd5af9bb45e72c47c |
| 12:28:17 | → | xkuru joins (~xkuru@user/xkuru) |
| 12:28:22 | × | l337h4x0r quits (~user@188.253.235.27) (Read error: Connection reset by peer) |
| 12:29:34 | <BusConscious> | In addition I also mapped over (-> TokParser String) in lines 108 and 84 and did applicative Syntax in line 139 over (-> TokParser [(a,Token)]) |
| 12:30:38 | <BusConscious> | not sure if this makes the code more readable though when compared to the original lambda solution I retained in line 94 |
| 12:30:41 | → | yrlnry joins (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
| 12:33:31 | → | jafarlihi joins (~user@188.253.229.248) |
| 12:37:58 | <BusConscious> | derp mapping over (-> TokParser String) is just concatenation lol |
| 12:46:00 | → | lainon joins (~lainon@2601:7c0:c500:4d20:2ca2:483a:8f15:302d) |
| 12:46:48 | <[Leary]> | BusConscious: I see several cases of `if a then Just b else Nothing` or equivalent. For that you can write `guard a $> b` instead. |
| 12:47:32 | → | shriekingnoise joins (~shrieking@201.212.175.181) |
| 12:47:55 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 12:55:02 | → | rekahsoft joins (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) |
| 12:55:21 | × | rekahsoft quits (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) (Remote host closed the connection) |
| 12:55:55 | → | rekahsoft joins (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) |
| 12:58:04 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 13:00:35 | <BusConscious> | [Leary]: So what guard does it creates either failed empty monad if the predicate is false or an empty monad then we use $> to map a constant function that evaluates to b over that monad. |
| 13:00:59 | <BusConscious> | and we can only do that if the monad is not empty. And in the maybe monad Nothing is the empty monad |
| 13:01:25 | <BusConscious> | is this the correct explanation of what's going on there? |
| 13:02:25 | <BusConscious> | correction: it creates either failed empty monad if the predicate is false or a monad with value () |
| 13:03:25 | <[Leary]> | It sounds like you understand. |
| 13:03:35 | <geekosaur> | although in all cases it's "monadic value" |
| 13:05:04 | <[Leary]> | Yeah, the terminology is a bit off. I'd also note that the value isn't even necessarily monadic; it only needs Alternative. |
| 13:07:17 | × | jafarlihi quits (~user@188.253.229.248) (Quit: WeeChat 3.5) |
| 13:14:29 | × | rekahsoft quits (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) (Ping timeout: 255 seconds) |
| 13:14:36 | → | unit73e joins (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
| 13:18:52 | → | rekahsoft joins (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) |
| 13:21:09 | × | lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 13:21:22 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 13:28:22 | → | lisbeths joins (uid135845@id-135845.lymington.irccloud.com) |
| 13:29:00 | × | dcoutts quits (~duncan@host86-187-167-237.range86-187.btcentralplus.com) (Ping timeout: 272 seconds) |
| 13:34:51 | → | pleo joins (~pleo@user/pleo) |
| 13:42:08 | × | phma quits (phma@2001:5b0:210b:f1b8:dfb9:4399:11c9:1734) (Read error: Connection reset by peer) |
| 13:43:08 | → | phma joins (~phma@2001:5b0:210d:23f8:ec0e:65c8:65bb:d30) |
| 13:49:48 | → | machinedgod joins (~machinedg@66.244.246.252) |
| 13:55:07 | → | rodental joins (~rodental@38.146.5.222) |
| 13:56:06 | → | jespada joins (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) |
| 14:16:19 | × | shapr quits (~user@2600:4040:2d31:7100:a60f:9de4:efb4:6eb3) (Remote host closed the connection) |
| 14:22:38 | × | cheater quits (~Username@user/cheater) (Ping timeout: 268 seconds) |
| 14:22:39 | → | cheater1__ joins (~Username@user/cheater) |
| 14:22:43 | cheater1__ | is now known as cheater |
| 14:25:37 | × | cyanide3dinner quits (~cyanide4d@106.201.249.151) (Remote host closed the connection) |
| 14:27:20 | × | even4void quits (even4void@came.here.for-some.fun) (Quit: fBNC - https://bnc4free.com) |
| 14:27:23 | × | xacktm quits (xacktm@user/xacktm) (Quit: fBNC - https://bnc4free.com) |
| 14:27:24 | × | andreas303 quits (andreas303@ip227.orange.bnc4free.com) (Quit: fBNC - https://bnc4free.com) |
| 14:27:47 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 14:30:42 | <unit73e> | do you guys use stack or cabal more? |
| 14:31:08 | <[exa]> | cabal |
| 14:31:28 | <geekosaur> | it's about 50-50 in here, and reportedly skewed more toward stack in other venues |
| 14:31:52 | <unit73e> | I use cabal more but only because stack apparently didn't like having multiple executables or at least I didn't figure out how |
| 14:32:01 | <unit73e> | and I needed that |
| 14:32:08 | <geekosaur> | I personally never use stack |
| 14:32:20 | <unit73e> | I don't see much of an advantage tbh |
| 14:32:20 | × | merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
| 14:32:25 | <unit73e> | It's sort of a "maven" |
| 14:32:43 | <unit73e> | but if anyone can convince me otherwise |
| 14:33:07 | × | mima quits (~mmh@aftr-62-216-210-207.dynamic.mnet-online.de) (Ping timeout: 268 seconds) |
| 14:33:18 | <geekosaur> | especially with the 3.8 prerelease which adds among other things better support for stackage resolvers, the two do pretty much the same things in somewhat different ways |
| 14:33:43 | → | mima joins (~mmh@aftr-62-216-210-153.dynamic.mnet-online.de) |
| 14:35:03 | <[Leary]> | I used it for a while, back when its original selling point of "cabal is broken" still held water. Now it's like, a philosophical difference. |
| 14:35:11 | <unit73e> | so it seems yes. stack seems reduntant to me and actually complicates a bit more because it has .cabal anyway |
| 14:35:52 | <unit73e> | at least stack has shown what was the problem |
| 14:36:19 | → | hgolden joins (~hgolden2@cpe-172-251-233-141.socal.res.rr.com) |
| 14:36:34 | <unit73e> | now cabal could have terminal colors, that annoys me |
| 14:37:03 | <geekosaur> | I think stack still has more traction in industry, because it's easier to set up a local resolver than a local hackage |
| 14:37:35 | <geekosaur> | and it's often important in those contexts to make sure everyone's on the same page re package versions |
| 14:37:45 | <unit73e> | yes and the original premise makes sense in the industry because you want a fixed set of versions given a base version |
| 14:38:09 | <[exa]> | unit73e: some super complicated projects have it as a requirement and it kinda makes sense there, esp. if you need very precise ghc versioning or so |
| 14:38:38 | <cdsmith> | My advice is that stack is a reasonable choice if you only want to build your project with one set of dependencies. Its "advantage" now is that it makes it easy to build from a blessed set of dependencies, including GHC version and such. But if you're maintaining libraries that need to work across many GHC and dependency versions, stack just doesn't make any sense at all. |
| 14:38:56 | <c_wraith> | yeah, stack is sort of hostile towards library authors |
| 14:39:24 | <c_wraith> | at least it doesn't recommend publishing libraries with totally broken .cabal files anymore |
| 14:39:33 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 14:40:09 | <unit73e> | right, that's my feeling too. the restrictions actually slow down progress. if everyone followed semantic versioning (or the equivalent) it wouldn't be a problem but here we are. |
| 14:40:25 | <[exa]> | packaging is hard |
| 14:40:28 | <unit73e> | yup |
| 14:41:26 | <[exa]> | linear versions do not manage various multiple interwingled features very well |
| 14:43:17 | × | cheater quits (~Username@user/cheater) (Quit: Killed (rox (Requested by panasync))) |
| 14:44:03 | → | cheater joins (~Username@user/cheater) |
| 14:49:53 | → | xacktm joins (xacktm@user/xacktm) |
| 14:52:11 | → | andreas303 joins (andreas303@ip227.orange.bnc4free.com) |
| 14:52:58 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Read error: Connection reset by peer) |
| 14:52:59 | → | jmcarthur_ joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 14:53:49 | × | jmcarthur_ quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 14:56:35 | → | even4void joins (even4void@came.here.for-some.fun) |
| 14:58:02 | → | Unicorn_Princess joins (~Unicorn_P@93-103-228-248.dynamic.t-2.net) |
| 14:59:06 | → | merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
| 15:03:56 | × | merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
| 15:06:41 | → | adrazalan joins (~adrazalan@42.191.189.65) |
| 15:11:11 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c51d:2109:9c76:c05f) |
| 15:14:14 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 15:15:32 | × | shiraeeshi quits (~shiraeesh@109.166.58.140) (Ping timeout: 255 seconds) |
| 15:15:37 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c51d:2109:9c76:c05f) (Ping timeout: 248 seconds) |
| 15:21:22 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 15:32:17 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c51d:2109:9c76:c05f) |
| 15:33:41 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 246 seconds) |
| 15:36:10 | <SridharRatnakuma> | `type family F a b where F a b = undefined`. What's the simplest way to implement this such that `F "Foo" "Foo_Bar" == "bar"`? AFAICT, I could build it from scratch using `UnconsSymbol` - but that feels too low-level. |
| 15:37:25 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: Textual IRC Client: www.textualapp.com) |
| 15:39:05 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 15:40:58 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 268 seconds) |
| 15:41:09 | × | lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 15:41:35 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 15:42:15 | <SridharRatnakuma> | Real-world context, if anyone's wondering: https://github.com/srid/ema/pull/96 |
| 15:44:35 | → | dcoutts joins (~duncan@host86-150-18-54.range86-150.btcentralplus.com) |
| 15:45:10 | × | TonyStone quits (~TonyStone@2603-7080-8607-c36a-09e4-c1eb-6da4-2a7c.res6.spectrum.com) (Ping timeout: 272 seconds) |
| 15:46:35 | <sm> | <..obligatory balancing advocacy for stack's strengths here..> |
| 15:47:40 | <unit73e> | SridharRatnakuma, I don't get it |
| 15:47:59 | <unit73e> | what's the objective? |
| 15:50:54 | <dmj`> | SridharRatnakuma: probably defining families StripPrefix, Drop and then ToLower. |
| 15:51:12 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 15:51:26 | × | pleo quits (~pleo@user/pleo) (Ping timeout: 268 seconds) |
| 15:52:36 | → | pleo joins (~pleo@user/pleo) |
| 15:56:40 | <dmj`> | > ord 'a' - ord 'A' |
| 15:56:42 | <lambdabot> | 32 |
| 15:57:12 | × | simeon quits (~pi@dslb-088-071-128-104.088.071.pools.vodafone-ip.de) (Ping timeout: 272 seconds) |
| 15:57:14 | <dmj`> | type family ToLower (c :: Char) :: Nat where ToLower c = NatToChar (CharToNat c + 32) |
| 15:58:09 | → | causal joins (~user@50.35.83.177) |
| 15:58:16 | → | TonyStone joins (~TonyStone@2603-7080-8607-c36a-09e4-c1eb-6da4-2a7c.res6.spectrum.com) |
| 15:59:32 | <unit73e> | so he objective is to strip the prefix and lower case with a map from type to string? |
| 16:00:20 | <dmj`> | unit73e: yea, could do convert to camel case from snake case, then strip prefix |
| 16:00:35 | <dmj`> | and toLower |
| 16:02:03 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 16:03:15 | → | nate4 joins (~nate@98.45.169.16) |
| 16:03:17 | → | simeon joins (~pi@dslb-088-071-128-104.088.071.pools.vodafone-ip.de) |
| 16:04:45 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 16:06:46 | <SridharRatnakuma> | Here's an opportunity to author a type-level `Symbol` processing library |
| 16:08:52 | → | pwug joins (~pwug@user/pwug) |
| 16:11:59 | <dmj`> | SridharRatnakuma: hah, for real |
| 16:12:07 | → | arjun joins (~arjun@user/arjun) |
| 16:12:29 | <dmj`> | SridharRatnakuma: alex-type-level |
| 16:12:50 | <SridharRatnakuma> | Ah, `UnconsSymbol` is only available from 9.2.1. |
| 16:14:09 | → | merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
| 16:15:50 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
| 16:16:40 | <kenaryn> | Please what are the numeric types that implement NOT the Num type class? |
| 16:19:34 | <kenaryn> | Seems to me there are Scientific and Rational. |
| 16:20:39 | <kenaryn> | Another questions: how the compiler perform a division without implementing a division method in Num type class? |
| 16:25:03 | → | econo joins (uid147250@user/econo) |
| 16:26:03 | <ski> | @instances-importing Data.Ratio Num |
| 16:26:05 | <lambdabot> | Double, Float, Int, Integer, Product a, Ratio a, Sum a, Word |
| 16:26:14 | <ski> | @src Rational |
| 16:26:14 | <lambdabot> | type Rational = Ratio Integer |
| 16:26:28 | <ski> | also `Scientific' seems to be in `Num' |
| 16:28:27 | <ski> | it's not clear what you mean by "numeric types". often that is taken to mean those types that are instances of `Num'. (although i'm sure, with alternative/redesigned numeric classes, one could possibly have some types that are instances of those, but not `Num' and friends. i guess one'd lose literal overloading with `fromInteger' and `fromRational', though) |
| 16:29:14 | <kenaryn> | Thank you ski. I understand not all what you say but you're kind. |
| 16:29:45 | × | machinedgod quits (~machinedg@66.244.246.252) (Ping timeout: 256 seconds) |
| 16:30:35 | <geekosaur> | as for division, there are two kinds of division: integer division and floating division. as such, `div` is in the Interal typeclass and (/) is in the Fractional typeclass |
| 16:30:44 | <geekosaur> | both of which require Num |
| 16:31:00 | <geekosaur> | *Integral |
| 16:31:37 | → | jinsun__ joins (~jinsun@user/jinsun) |
| 16:31:37 | × | jinsun quits (~jinsun@user/jinsun) (Killed (erbium.libera.chat (Nickname regained by services))) |
| 16:31:37 | jinsun__ | is now known as jinsun |
| 16:32:09 | jinsun | is now known as Guest1949 |
| 16:32:09 | → | jinsun__ joins (~jinsun@user/jinsun) |
| 16:32:09 | × | Guest1949 quits (~jinsun@user/jinsun) (Killed (zinc.libera.chat (Nickname regained by services))) |
| 16:32:09 | jinsun__ | is now known as jinsun |
| 16:32:46 | → | lewisje joins (~lewisje@2001:470:1f11:14e:50c5:a481:bb91:9810) |
| 16:33:08 | × | lewisje quits (~lewisje@2001:470:1f11:14e:50c5:a481:bb91:9810) (Remote host closed the connection) |
| 16:34:01 | <geekosaur> | and Rational is separate from both since it's a ratio; you use (%) with that |
| 16:34:30 | <monochrom> | Ugh Rational is an instance of Fractional too. |
| 16:34:35 | <monochrom> | > 3/4 :: Rational |
| 16:34:37 | <lambdabot> | 3 % 4 |
| 16:34:49 | <geekosaur> | right, but you still have % |
| 16:35:11 | <monochrom> | It is the rationale behind edwardk using % for a different purpose in lens. "You already have / " |
| 16:35:18 | <ski> | kenaryn : well, an implementation can provide type-specific operations (like e.g. division), without involving type classes like `Integral' (overloaded operation for integral division) or `Fractional' (overloaded operation for "exact" division (for lack of a better term) .. for floating-point types it isn't exact, but as near approximate to that as possible. it's still different from integral division, which |
| 16:35:24 | <ski> | is specified in combination with remainder, a different thing) |
| 16:35:54 | <geekosaur> | there are other instances of Num as well, if you import Data.Fixed for example |
| 16:36:08 | <geekosaur> | @instances-importing Data.Fixed Num |
| 16:36:10 | <lambdabot> | Double, Fixed a, Float, Int, Integer, Product a, Sum a, Word |
| 16:36:44 | <geekosaur> | (the `a` in `Fixed a` indicates the fixed-point precision; a number of them come predefined, or you can roll your own) |
| 16:37:06 | <geekosaur> | Deci, Cento, Milli, Micro, Nano, etc. |
| 16:37:36 | <ski> | kenaryn : e.g. GHC (in `GHC.Float') defines `divideFloat :: Float -> Float -> Float' and `divideDouble :: Double -> Double -> Double' (in terms of primitive operations `divideFloat#' and `divideDouble#' for unboxed `Float#' and `Double#' types), and *then* makes `Float' and `Double' instances of `Fractional', by defining `(/)' for those types to call those previously defined operations |
| 16:37:44 | <dmj`> | SridharRatnakuma: https://gist.github.com/9af59531f17150d23b6ecc870be6bc2c |
| 16:37:55 | → | lewisje joins (~lewisje@2001:470:1f11:14e:50c5:a481:bb91:9810) |
| 16:43:06 | <ski> | (`divideFloat#' and `divideDouble#', as well as the types `Float#' and `Double#' is not defined in the library (`base') source for GHC, but rather is given a primitive implementation, that uses machine-supported floating-point formats and instructions. there are other types handled primitively, like `Char',`Int',`Integer',`Word',`(->)' (function types),`Array',`IO',`IORef',`IOArray',.. as well) |
| 16:43:17 | × | merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
| 16:43:33 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 16:43:58 | <ski> | (hm, is there an architecture that GHC supports, that doesn't provide machine-supported floating-point ops, so that one has to rely on a software-implementation of them ?) |
| 16:44:19 | <ski> | (iirc, that is the case for GCC) |
| 16:44:36 | <dolio> | Seems doubtful. |
| 16:45:09 | <geekosaur> | I think ghc supports soft-float ARM still |
| 16:45:10 | <ski> | i guess, `-fvia-C', maybe |
| 16:45:17 | <geekosaur> | via-C is long gone |
| 16:46:04 | <ski> | i haven't looked at it in a long while, but it looks like the man page still lists it |
| 16:46:18 | <geekosaur> | unregisterised is still there but not in released versions |
| 16:46:36 | <ski> | mhm |
| 16:47:34 | <geekosaur> | ah, seems that's where unregisterised mode is hiding these days |
| 16:47:55 | <geekosaur> | per the manual (I'm looking at 9.2.2 since 9.2.3 never had one uploaded) |
| 16:48:11 | <ski> | link ? |
| 16:48:29 | <geekosaur> | https://downloads.haskell.org/ghc/9.2.1/docs/html/users_guide/codegens.html?highlight=fvia%20c#c-code-generator-fvia-c |
| 16:48:38 | <geekosaur> | oh, 9.2.1 even |
| 16:48:50 | <geekosaur> | right, I was looking for the release notes last night |
| 16:49:06 | <geekosaur> | mostly I have 8.10.7 up since that's what I still use locally |
| 16:49:41 | <geekosaur> | while bgamari and I try to figure out how the heap gets smashed with xmonad under 9.x 😕 |
| 16:55:22 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 16:55:31 | <SridharRatnakuma> | <dmj`> "Sridhar Ratnakumar: https://gist..." <- Thanks 🙂 |
| 16:55:31 | <SridharRatnakuma> | (Currently building the world because nixpkgs doesn't have 9.2 cached) |
| 16:59:50 | × | pleo quits (~pleo@user/pleo) (Ping timeout: 240 seconds) |
| 17:00:14 | <monochrom> | Oh w00t soft float, haven't seen that for decades since Pentium :) |
| 17:01:04 | <geekosaur> | and possibly not then since linux shipped with in-kernel fp emulation for a couple decades |
| 17:01:15 | <monochrom> | Nice. |
| 17:01:26 | <monochrom> | <3 abstractions |
| 17:01:48 | <dmj`> | SridharRatnakuma: np |
| 17:02:11 | <geekosaur> | someone probably still supports it as a loadable module probably, although iirc it was removed from the standard kernel some years back |
| 17:02:29 | <geekosaur> | whoops, minus one of those "probably"s |
| 17:03:30 | <geekosaur> | in particular I think debian still supports machines old enough to require either x87 or emulation thereof |
| 17:03:42 | <monochrom> | It's OK, I know how to do join :: Prob (Prob a) -> Prob a :) |
| 17:04:03 | <geekosaur> | wasn't that called Random? }😆 |
| 17:04:18 | <geekosaur> | hm, fancy smiley mode mishandled that |
| 17:04:41 | → | nate4 joins (~nate@98.45.169.16) |
| 17:10:37 | × | BusConscious quits (~martin@ip5f5bdf01.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 17:10:37 | ski | . o O ( Commodore 64 has a somewhat weird (software-implemented) 5-bytes floating-point format, 8-bit exponent (incl. sign, excess-128), 32-bit mantissa (incl. sign, excl. leading `1' bit). <https://www.c64-wiki.com/wiki/Floating_point_arithmetic> ) |
| 17:12:20 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 17:12:47 | <darkling> | So did the Spectrum. Looks very similar to that (I'd have to look up the exact layout) |
| 17:14:28 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 272 seconds) |
| 17:18:09 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 17:22:28 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 17:30:29 | <jchia[m]> | Is there a way to get the pathname of the currently executing haskell file (run under ghc) or haskell executable file? Apparently, getProgName gives only the filename without the directory. I care only about Linux. |
| 17:30:52 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 17:31:22 | <juri_> | /proc/<pid>/? |
| 17:31:27 | <jchia[m]> | There's a C function getProgArgv() called by getProgArg, but I don't think Haskell programs get to call RTS C functions directly. |
| 17:31:53 | <jchia[m]> | that would involve parsing the ghc or haskell exe command-line, somewhat fragile. |
| 17:38:04 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 17:38:36 | <hpc> | there's https://hackage.haskell.org/package/system-argv0-0.1.1/docs/System-Argv0.html |
| 17:39:50 | <hpc> | heh, there's also https://hackage.haskell.org/package/base-4.16.1.0/docs/System-Environment.html#v:getExecutablePath right underneath getProgName |
| 17:39:51 | → | yauhsien joins (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) |
| 17:40:43 | → | ayx joins (~nodebot@103.208.69.22) |
| 17:42:30 | → | yax1 joins (~nodebot@103.208.69.22) |
| 17:43:32 | <sm> | ❤️ c64 and spectrum tips showing up in #haskell 🚀 |
| 17:44:02 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 17:44:14 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 17:44:28 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 17:44:47 | → | yax2 joins (~nodebot@103.208.69.22) |
| 17:44:52 | × | yauhsien quits (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 272 seconds) |
| 17:45:52 | × | mjan22640 quits (~Srain@212.17.33.215) (Remote host closed the connection) |
| 17:46:52 | → | yax_ joins (~yaxl@2402:e280:3e30:264:85cd:eb52:f5bc:9c40) |
| 17:47:26 | → | Everything joins (~Everythin@37.115.210.35) |
| 17:52:59 | × | vglfr quits (~vglfr@coupling.penchant.volia.net) (Ping timeout: 246 seconds) |
| 17:53:42 | <yax_> | hi |
| 17:54:40 | → | pseigo joins (~pseigo@d108-173-20-33.abhsia.telus.net) |
| 17:54:50 | <jchia[m]> | hpc: Those 2 ways work fine for a compiled executable, but unfortunately not when running a Haskell script under 'ghc'. |
| 17:56:18 | <hpc> | aaaah, that makes more sense |
| 17:56:39 | → | shiraeeshi joins (~shiraeesh@109.166.58.140) |
| 17:59:09 | → | pleo joins (~pleo@user/pleo) |
| 18:00:44 | → | merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
| 18:04:38 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
| 18:05:50 | <jchia[m]> | But I guess I can live with that. I'll just build the executable. |
| 18:06:16 | × | yax_ quits (~yaxl@2402:e280:3e30:264:85cd:eb52:f5bc:9c40) (Quit: Leaving) |
| 18:07:02 | → | michalz joins (~michalz@185.246.204.125) |
| 18:08:14 | → | machinedgod joins (~machinedg@66.244.246.252) |
| 18:08:15 | <geekosaur> | I don't understand "running a Haskell script under 'ghc'". wouldn't that be runghc? |
| 18:08:36 | <geekosaur> | although it looks like runghc does have that problem, getExecutablePath returns the path to ghc itself |
| 18:10:45 | → | notzmv joins (~zmv@user/notzmv) |
| 18:11:04 | <SridharRatnakuma> | dmj`: maybe I should use this for <9.2 support, https://blog.csongor.co.uk/symbol-parsing-haskell/ |
| 18:11:06 | <SridharRatnakuma> | >>> :t listify @"Hello" |
| 18:11:06 | <SridharRatnakuma> | listify @"Hello" :: Proxy '["H", "e", "l", "l", "o"] |
| 18:12:01 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 18:12:46 | <dmj`> | SridharRatnakuma: fancy |
| 18:13:39 | × | ayx quits (~nodebot@103.208.69.22) (Read error: Connection reset by peer) |
| 18:13:39 | × | yax1 quits (~nodebot@103.208.69.22) (Read error: Connection reset by peer) |
| 18:13:39 | × | yax2 quits (~nodebot@103.208.69.22) (Read error: Connection reset by peer) |
| 18:15:50 | × | _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection) |
| 18:17:10 | × | machinedgod quits (~machinedg@66.244.246.252) (Ping timeout: 240 seconds) |
| 18:19:04 | → | yax__ joins (~yax__@user/yax/x-9576643) |
| 18:19:46 | × | leib quits (~leib@2405:201:900a:f088:496d:d4b9:714:29f5) (Read error: Connection reset by peer) |
| 18:20:33 | → | coot joins (~coot@213.134.190.95) |
| 18:20:38 | <geekosaur> | mm, I think the only way to get the source path is via template haskell. by the time it's executing bytecode, it has no idea where that bytecode came from |
| 18:21:16 | <geekosaur> | it's executing from memory, and that memory might have come from ghc -e, template haskell, runghc, ghci prompt, etc. |
| 18:21:51 | × | coot quits (~coot@213.134.190.95) (Client Quit) |
| 18:22:03 | → | coot joins (~coot@213.134.190.95) |
| 18:24:19 | × | yax__ quits (~yax__@user/yax/x-9576643) (Quit: Leaving) |
| 18:32:38 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.5) |
| 18:34:53 | × | merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
| 18:35:16 | × | Midjak quits (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep) |
| 18:37:01 | → | stackdroid18 joins (14094@user/stackdroid) |
| 18:42:46 | × | pwug quits (~pwug@user/pwug) (Quit: Leaving) |
| 18:45:17 | × | dtman34 quits (~dtman34@2601:446:4400:2ad9:1078:b9d6:ea9f:9bfa) (Quit: ZNC 1.7.2+deb3 - https://znc.in) |
| 18:45:27 | → | machinedgod joins (~machinedg@184.68.192.218) |
| 18:45:37 | → | dtman34 joins (~dtman34@2601:446:4400:2ad9:d46d:4cbc:f1f6:2b62) |
| 18:45:57 | × | pseigo quits (~pseigo@d108-173-20-33.abhsia.telus.net) (Ping timeout: 268 seconds) |
| 18:47:53 | → | yax__ joins (~yax__@user/yax/x-9576643) |
| 18:48:09 | <yax__> | what is a monad |
| 18:48:56 | <c_wraith> | yax__: usually that question leads to unhelpful answers. what are you actually trying to learn? |
| 18:49:05 | <monochrom> | Show me how you would answer "what is a numbers", and I might know how to answer "what is a monad?" |
| 18:49:53 | <hpc> | perhaps start with "what is a functor" |
| 18:50:07 | <yax__> | :DD |
| 18:50:11 | <monochrom> | Hell, life and programming are full of those phenomena. |
| 18:50:39 | <hpc> | you'll need to understand that first, and it's more intuitive if you're coming from another language |
| 18:50:56 | <monochrom> | So I was teaching a C & Unix course and I discussed FILE* and I said "streams". A student asked "what is a stream?" |
| 18:51:16 | <monochrom> | My answer: "How would you answer 'what are numbers?'" |
| 18:51:35 | <monochrom> | The student was very smart. She realized "oh, it has to come down to that" |
| 18:51:56 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 18:52:48 | <c_wraith> | I asked a bunch of mathematicians how they'd define numbers once. The best answer they could come up with was "numbers are things that look and act like numbers" |
| 18:52:52 | <monochrom> | A stream is whatever that you get from fopen, and that you can use fclose, fprintf, fwrite, etc. You have to go axiomatic aka API. There is no other "definition". |
| 18:53:40 | <geekosaur> | that's because it's the best you can do in English. there's a better definition if you're willing to talk theory 🙂 |
| 18:53:59 | <unit73e> | hum but streams are easier to explain, no? because a stream is a sequence of readable chunks in a binary. or am I being too specific? |
| 18:54:11 | → | nate4 joins (~nate@98.45.169.16) |
| 18:54:13 | <yax__> | "think of it like a stream of data flowing from one source to a destination" |
| 18:54:25 | <c_wraith> | I was willing to talk theory. Numbers are just too vague of a concept, when you look at all the things that get called "numbers". |
| 18:54:34 | <monochrom> | With "readable" you are still not doing better than "supports such API". |
| 18:54:39 | → | pseigo joins (~pseigo@node-1w7jr9ye7hx4fkp40wi692pl2.ipv6.telus.net) |
| 18:54:44 | <unit73e> | yeah I guess |
| 18:55:15 | <unit73e> | comparing explaning numebers to monad is good imo though, because you can explain specific implementations of monads but explaining the general concept is harder |
| 18:55:25 | <ski> | what does "readable" have to do with "streams" ? |
| 18:55:52 | <ski> | (does "readable" mean that there's parsing involved somewhere ? or just that you can extract values ?) |
| 18:55:59 | <monochrom> | The API has fread and getc and fscanf. |
| 18:56:03 | <yax__> | monoid in the category of endofunctors 😪 |
| 18:56:31 | <ski> | the *monoidal* category of endofunctors |
| 18:56:51 | <ski> | (but yes, that is a "HHOS" joke) |
| 18:57:20 | <unit73e> | isn't it better to explain a monad as a design pattern the respective laws? that covers everything |
| 18:57:20 | <ski> | yax__ : *are* you actually trying to do/learn something specific/concrete ? |
| 18:57:28 | <c_wraith> | unlike some things, Monad actually has a precise definition. But learning it doesn't really help. |
| 18:57:51 | <ski> | unit73e : yes. specifically to avoid certain kinds of boiler-plate code, i'd say |
| 18:58:32 | <unit73e> | that does cover and explain why it exists in the first place |
| 18:59:12 | <yax__> | yeah i would unironically love to know how an instance of applicative for (-> r) forms the s combinator |
| 18:59:27 | <c_wraith> | yax__: the thing is, that's *really* hollow. |
| 18:59:37 | <c_wraith> | yax__: the answer is "it does because it's the only thing it can do" |
| 19:00:04 | <monochrom> | You can pretty much find out the only way (->) r can be an Applicative. Then compare the only solution to <*> with the S combinator. |
| 19:00:08 | <ski> | yax__ : i find "Escaping Hell with Monads" by Philip Nilsson in 2017-05-08 at <https://philipnilsson.github.io/Badness10k/escaping-hell-with-monads/> a nice (non-tutorial) elaboration of the kind of (boiler-plate) problem that monads solve |
| 19:00:24 | <yax__> | ski: thanks |
| 19:01:14 | <yax__> | c_wraith: the way i internalized <*> is that its just a multiarg fmap |
| 19:01:42 | <monochrom> | Actually I am beginning to feel that teaching Monad and then Applicative and Functor may work better. |
| 19:01:59 | <yax__> | so (x <*> y <*> z) forming (x z) ( y z) feels weird to me |
| 19:02:14 | <c_wraith> | note.. that's not what that does. |
| 19:02:42 | <ski> | `(f <*> x <*> y) r' is `(f r) (x r) (y r)' |
| 19:03:21 | <monochrom> | (x z) (y z) is (x <*> y) z |
| 19:03:21 | <ski> | it "distributes" an "environment/context/config" (`r') to each "branch" |
| 19:03:50 | <yax__> | monochrom: ok that makes way more sense, thanks |
| 19:03:57 | <yax__> | i had a completely different and wrong idea |
| 19:04:00 | <yax__> | thanks :D |
| 19:05:00 | <ski> | (therefore `\r -> (..r..) (..r..) (..r..)' is `(\r -> ..r..) <*> (\r -> ..r..) <*> (\r -> ..r..)', pushing the lambdas inward. this is one part of the lambda calculus to SKI combinators translation, eliminating lambdas) |
| 19:06:40 | <dmj`> | yax__: its a burrito https://emorehouse.wescreates.wesleyan.edu/silliness/burrito_monads.pdf |
| 19:07:51 | <monochrom> | Applicative is curry burrito. currito.com |
| 19:08:40 | <ski> | monochrom : why `Functor' after `Monad', though ? |
| 19:08:50 | <yax__> | monads that let you extract the value out of the context should be tacos tho |
| 19:09:02 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 19:09:06 | <ski> | tacomonads ? |
| 19:09:18 | <unit73e> | maybe tacos are monads |
| 19:09:31 | <yax__> | no, burritos are |
| 19:09:36 | <yax__> | ! |
| 19:09:42 | <geekosaur> | there are more tacos than burritos in the monad universe |
| 19:09:46 | <ski> | @type Control.Comonad.extract |
| 19:09:48 | <lambdabot> | Control.Comonad.Comonad w => w a -> a |
| 19:10:22 | → | califax joins (~califax@user/califx) |
| 19:10:56 | × | lainon quits (~lainon@2601:7c0:c500:4d20:2ca2:483a:8f15:302d) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 19:11:36 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 19:13:07 | → | califax joins (~califax@user/califx) |
| 19:15:47 | → | [_] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 19:16:47 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 268 seconds) |
| 19:19:10 | → | Guest|17 joins (~Guest|17@223.186.135.189) |
| 19:20:15 | × | [_] quits (~itchyjunk@user/itchyjunk/x-7353470) (Client Quit) |
| 19:20:27 | <Guest|17> | I have ubuntu on Windows with x86 arch. I can not install ghc. I get ghc-pkg: Couldn't open database /home/abhisek/.ghcup/ghc/9.2.3/lib/ghc-9.2.3/package.conf.d |
| 19:20:32 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 19:22:46 | <maerwald> | Guest|17: WSL1? |
| 19:22:59 | <yax__> | use ghcup? |
| 19:23:02 | × | pseigo quits (~pseigo@node-1w7jr9ye7hx4fkp40wi692pl2.ipv6.telus.net) (Ping timeout: 272 seconds) |
| 19:23:05 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 248 seconds) |
| 19:23:10 | <Guest|17> | I don't have WSL at all |
| 19:23:13 | <geekosaur> | yax__, that is ghcup from the path |
| 19:23:19 | <yax__> | mb |
| 19:23:27 | <maerwald> | Guest|17: how are you running ubuntu inside windows? |
| 19:23:53 | <Guest|17> | It's the app "Ubuntu on Windows" |
| 19:24:05 | <maerwald> | that's WSL I think |
| 19:24:12 | <Guest|17> | You can install this from windows store |
| 19:24:16 | <monochrom> | Yes 100% WSL, just not sure 1 or 2. |
| 19:24:22 | <Guest|17> | Command 'wsl' not found, but can be installed with: |
| 19:24:23 | <Guest|17> | sudo apt install wsl |
| 19:24:48 | <geekosaur> | wsl isn't a command, it's a subsystem |
| 19:24:50 | × | Everything quits (~Everythin@37.115.210.35) (Quit: leaving) |
| 19:24:54 | <monochrom> | I think my students report that it's 2 now. |
| 19:25:00 | <maerwald> | Guest|17: wsl -l -v |
| 19:25:10 | → | alp joins (~alp@user/alp) |
| 19:25:17 | × | cheater quits (~Username@user/cheater) (Ping timeout: 255 seconds) |
| 19:25:23 | <Guest|17> | It's not a command ? |
| 19:25:28 | <geekosaur> | if you're running ubuntu on windows, it's either version 1 or 2 of the windows subsystem for linux |
| 19:25:36 | → | cheater joins (~Username@user/cheater) |
| 19:25:49 | <maerwald> | google says it's a command |
| 19:25:52 | <Guest|17> | OK you suggest to install the command and check the version ? |
| 19:26:12 | <maerwald> | you need to run this in cmd or powershell |
| 19:26:15 | <maerwald> | not in ubuntu |
| 19:26:29 | <maerwald> | (as admin I think) |
| 19:26:32 | <yax__> | what windows u have |
| 19:26:41 | <Guest|17> | 10 |
| 19:26:56 | <Guest|17> | NAME STATE VERSION |
| 19:26:56 | <Guest|17> | * Ubuntu Running 1 |
| 19:27:00 | <geekosaur> | okay, I thought that was wslinfo or some such but I can't find it in logs |
| 19:27:14 | <geekosaur> | sorry wsladmin |
| 19:27:18 | <geekosaur> | but whatever |
| 19:27:46 | × | pleo quits (~pleo@user/pleo) (Quit: quit) |
| 19:27:51 | <Guest|17> | How do I update to 2 ? |
| 19:28:04 | <yax__> | |
| 19:28:21 | <monochrom> | Do you need to? |
| 19:28:33 | <geekosaur> | wsl1 has a number of bugs |
| 19:29:02 | <geekosaur> | iirc even if it can find the package database it fails trying to lock it |
| 19:29:13 | <monochrom> | Oh, that. |
| 19:29:20 | <yax__> | wsl 1 was very arcane and mostly experimental |
| 19:29:34 | <yax__> | methinks |
| 19:29:53 | <geekosaur> | it was hacked together from the old windows posix subsystem, which was kinda deficient |
| 19:31:49 | <geekosaur> | I still think it's a pity they gave up on it and used hyper-v; a proper linux subsystem for windows would have technically been *very* interesting |
| 19:32:12 | <yax__> | linux gets EEE'd when |
| 19:34:12 | yax__ | shivers |
| 19:34:37 | <Guest|17> | It needs to update the kernel. Will check on tomorrow. Thank you guys for the help. appreciate it |
| 19:34:51 | <geekosaur> | I think they would have had enough trouble keeping it up to date that it wouldn't have survived anyway |
| 19:35:08 | <geekosaur> | but linux as a microkernel service… |
| 19:35:10 | <yax__> | cant u just install ghc on windows |
| 19:35:28 | → | mikoto-chan joins (~mikoto-ch@esm-84-240-99-143.netplaza.fi) |
| 19:35:42 | <geekosaur> | that's got its own annoyances since it needs to install msys2 |
| 19:36:06 | <yax__> | it auto does it for you |
| 19:36:17 | <yax__> | source: me running ghc on windows |
| 19:36:40 | <geekosaur> | does that bbut there have been version issues in the recent past |
| 19:36:54 | <yax__> | yes |
| 19:37:08 | <yax__> | source: me (reinstalled thrice) |
| 19:37:23 | <Guest|17> | I haven't tried it. I thought maybe it's easier to install on linux. |
| 19:37:43 | <geekosaur> | (also stack's handling of the whole msys2 thing is an utter hack, because it can't really do any better) |
| 19:38:10 | <yax__> | hm ive always used cabal so idk anything about that |
| 19:38:12 | <geekosaur> | well, withoutu having a separate msys2 for every ghc, which would be stupidly wasteful |
| 19:39:08 | <yax__> | i only have 1 ghc |
| 19:39:12 | → | nate4 joins (~nate@98.45.169.16) |
| 19:40:54 | → | shapr joins (~user@2600:4040:2d31:7100:a97b:7b9:d36c:3fa5) |
| 19:41:14 | <geekosaur> | yeh, but stack installs one for every resolver in use |
| 19:41:28 | <geekosaur> | and stack's still quite popular |
| 19:41:32 | <yax__> | true |
| 19:41:50 | <yax__> | i dont really use haskell for anything serious tho |
| 19:42:11 | <yax__> | so i really dont deal with build systems and stuff |
| 19:44:38 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
| 19:44:51 | → | Topsi joins (~Topsi@dyndsl-095-033-093-085.ewe-ip-backbone.de) |
| 19:49:49 | ← | yax__ parts (~yax__@user/yax/x-9576643) (byee) |
| 19:52:17 | <hololeap> | I'm playing around with this API which is essentially: Semigroup s => class Foo s a where foo :: WriterT (Maybe s) m a |
| 19:53:27 | <hololeap> | more specifically `WriterT (Maybe (Last s)) m a` |
| 19:55:07 | <hololeap> | I'd like to ensure at compile time that the computation ends with `Just (Last s)`, possibly by creating a new GADT |
| 19:55:16 | × | Guest|17 quits (~Guest|17@223.186.135.189) (Quit: Connection closed) |
| 19:55:56 | <hololeap> | TaggedMaybe (j :: IsJust) a where TaggedJust :: a -> TaggedMaybe 'True a; TaggedNothing :: TaggedMaybe 'False a |
| 19:56:10 | → | pleo joins (~pleo@user/pleo) |
| 19:57:01 | <hololeap> | then I can make `foo`s signature `WriterT (TaggedMaybe 'True s) m a` |
| 19:57:15 | <ski> | `IsJust' ? |
| 19:57:26 | <hololeap> | type IsJust = Bool |
| 19:58:16 | <hololeap> | the problem is, I don't see any way to make a sane Applicative instance for TaggedMaybe without putting it inside an existential wrapper, which causes all kinds of issues with the API |
| 19:58:17 | <ski> | i don't see how you conveniently change the index `j' |
| 19:58:24 | <ski> | like with `(>>=)' |
| 19:58:35 | × | arjun quits (~arjun@user/arjun) (Ping timeout: 255 seconds) |
| 19:58:38 | → | acidjnk joins (~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de) |
| 19:58:39 | <ski> | (or `(<*>)', if you prefer) |
| 19:58:47 | → | lainon joins (~lainon@c-68-46-201-40.hsd1.al.comcast.net) |
| 19:59:08 | <hololeap> | yeah, that's the problem, and I was curious if anyone had figured out a clever way around this |
| 19:59:15 | × | cdsmith57 quits (~cdsmith@c-73-184-127-183.hsd1.ga.comcast.net) (Quit: Client closed) |
| 19:59:16 | <ski> | hololeap : i guess we're talking about the same problem |
| 19:59:28 | → | nate4 joins (~nate@98.45.169.16) |
| 19:59:58 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 268 seconds) |
| 20:00:31 | <ski> | there is `IxMonad' .. i wonder if there's anything for a monoid (type-level) index |
| 20:02:22 | → | merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
| 20:07:33 | → | eod|fserucas_ joins (~eod|fseru@1.64.114.89.rev.vodafone.pt) |
| 20:07:33 | → | eod|fserucas joins (~eod|fseru@1.64.114.89.rev.vodafone.pt) |
| 20:08:38 | → | titibandit joins (~thibaut@xdsl-78-34-167-250.nc.de) |
| 20:09:54 | × | cheater quits (~Username@user/cheater) (Ping timeout: 272 seconds) |
| 20:09:54 | → | cheater1__ joins (~Username@user/cheater) |
| 20:09:58 | cheater1__ | is now known as cheater |
| 20:10:41 | × | titibandit quits (~thibaut@xdsl-78-34-167-250.nc.de) (Remote host closed the connection) |
| 20:12:07 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 20:12:14 | → | arjun joins (~arjun@user/arjun) |
| 20:13:37 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 20:14:51 | × | arjun quits (~arjun@user/arjun) (Client Quit) |
| 20:15:30 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 240 seconds) |
| 20:22:17 | × | machinedgod quits (~machinedg@184.68.192.218) (Ping timeout: 248 seconds) |
| 20:25:54 | <SridharRatnakuma> | dmj`: That package is slow as a tortoise. I ended up going GHC 9.2 route. https://stackoverflow.com/a/72764893/55246 |
| 20:26:28 | → | yax__ joins (~yax__@user/yax/x-9576643) |
| 20:28:25 | × | _xor quits (~xor@74.215.182.83) (Quit: WeeChat 3.4.1) |
| 20:30:01 | × | mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Ping timeout: 256 seconds) |
| 20:31:56 | → | mikoto-chan joins (~mikoto-ch@esm-84-240-99-143.netplaza.fi) |
| 20:32:03 | → | nate4 joins (~nate@98.45.169.16) |
| 20:36:30 | × | merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 20:37:41 | → | {-d0t-} joins (~q_q@user/-d0t-/x-7915216) |
| 20:38:17 | <{-d0t-}> | ohai! I haven't used servant in a while now and I feel lost. How do I return a custom code for a request? |
| 20:41:02 | × | cosimone quits (~user@93-44-186-171.ip98.fastwebnet.it) (Remote host closed the connection) |
| 20:42:11 | → | machinedgod joins (~machinedg@66.244.246.252) |
| 20:43:23 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 20:44:06 | ← | yax__ parts (~yax__@user/yax/x-9576643) () |
| 20:46:49 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
| 20:46:49 | × | mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Ping timeout: 268 seconds) |
| 20:48:30 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 20:54:21 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 20:56:44 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 21:00:32 | × | ashln quits (~ashln@98.38.236.123) (Quit: Lost terminal) |
| 21:04:01 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds) |
| 21:12:43 | × | xacktm quits (xacktm@user/xacktm) (Ping timeout: 268 seconds) |
| 21:12:57 | × | even4void quits (even4void@came.here.for-some.fun) (Ping timeout: 248 seconds) |
| 21:13:29 | × | andreas303 quits (andreas303@ip227.orange.bnc4free.com) (Ping timeout: 248 seconds) |
| 21:17:02 | × | machinedgod quits (~machinedg@66.244.246.252) (Ping timeout: 268 seconds) |
| 21:18:43 | → | machinedgod joins (~machinedg@66.244.246.252) |
| 21:19:22 | × | adium quits (adium@user/adium) (Quit: Stable ZNC by #bnc4you) |
| 21:20:22 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 21:20:22 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 21:20:22 | → | wroathe joins (~wroathe@user/wroathe) |
| 21:20:44 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 21:21:05 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 21:22:44 | <hololeap> | is it possible to stick a value in a typeclass, like `class Foo a where fooName :: String` |
| 21:23:12 | <hololeap> | or does it _have_ to reference a, e.g. `fooName :: proxy a -> String` |
| 21:23:56 | → | nate4 joins (~nate@98.45.169.16) |
| 21:24:38 | <hololeap> | I would like to avoid Proxy and just use TypeApplications, if possible, e.g. `fooName @MyFoo` |
| 21:24:45 | <ski> | it doesn't have to, you can use `fooName @a', with `TypeApplications' |
| 21:24:56 | × | Topsi quits (~Topsi@dyndsl-095-033-093-085.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
| 21:25:33 | <ski> | well, you also need `AllowAmbiguousTypes' |
| 21:25:53 | → | andreas303 joins (andreas303@ip227.orange.bnc4free.com) |
| 21:26:02 | <ski> | (also not all people are that happy with `TypeApplications') |
| 21:26:03 | <hololeap> | ah, gotcha |
| 21:26:28 | <hololeap> | why not? |
| 21:27:02 | <ski> | (e.g. suddenly now it matters in which order your type variables are generalized .. even if you haven't written an explicit `forall'. i'd possibly like to see the extension restricted to the latter case, where there is an explicitly documented ordering) |
| 21:27:14 | → | adium joins (adium@user/adium) |
| 21:27:46 | → | even4void joins (even4void@came.here.for-some.fun) |
| 21:28:45 | <monochrom> | Provide two methods, one of them has the "p a" parameter, one doesn't. :) |
| 21:29:06 | <ski> | (or make one of them a non-method, that calls the other) |
| 21:29:53 | <hololeap> | fooNameForLusers (_ :: p a) = fooName @a |
| 21:30:05 | <ski> | hololeap : in some cases, btw, it may be better to use a phantom type |
| 21:30:44 | <ski> | fooName :: Foo a -- where `Foo a' just contains a `String' |
| 21:31:13 | × | MajorBiscuit quits (~MajorBisc@2a02-a461-129d-1-193d-75d8-745d-e91e.fixed6.kpn.net) (Ping timeout: 268 seconds) |
| 21:31:44 | <hololeap> | hm ok. could I define it as `type Foo a = String` ? |
| 21:31:58 | <ski> | well, `newtype', rather |
| 21:32:07 | <ski> | (otherwise you still need `AllowAmbiguousTypes') |
| 21:32:13 | <hololeap> | I see |
| 21:32:19 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 21:32:19 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 21:32:34 | <ski> | @hoogle Tagged |
| 21:32:35 | <lambdabot> | module Data.Tagged |
| 21:32:35 | <lambdabot> | Data.Tagged newtype Tagged s b |
| 21:32:35 | <lambdabot> | Data.Tagged Tagged :: b -> Tagged s b |
| 21:33:04 | → | xacktm joins (xacktm@user/xacktm) |
| 21:34:06 | → | cosimone joins (~user@93-44-186-171.ip98.fastwebnet.it) |
| 21:35:18 | <hololeap> | yeah, especially since I can `derive newtype IsString` |
| 21:36:21 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 21:38:44 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 21:40:25 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:43:44 | ← | n3t parts (n3t@user/n3t) (WeeChat 3.3) |
| 21:45:03 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 21:45:18 | → | dos__^^` joins (~user@2409:8a55:e215:3930:58b9:4cff:fea0:d9) |
| 21:45:38 | × | dos__^^ quits (~user@user/dos/x-1723657) (Ping timeout: 240 seconds) |
| 21:49:44 | <kenaryn> | Please why does `:t (/) 1 2` returns `:: Fractional a => a` despite Chris Allen's book stating that type class Fractional is defaulting to Double type? |
| 21:50:16 | → | ashln joins (~ashln@98.38.236.123) |
| 21:50:35 | <EvanR> | defaulting happens if you ask it to evaluate (/) 1 2 |
| 21:50:38 | <EvanR> | in ghci |
| 21:50:49 | <kenaryn> | I'm currently using the REPL. |
| 21:50:50 | <EvanR> | in which case it has to pick something or else complain |
| 21:51:02 | <EvanR> | evaluation and asking for the type are not the same thing |
| 21:51:39 | → | yax__ joins (~yax__@user/yax/x-9576643) |
| 21:51:40 | <kenaryn> | Allright, I didn't know about that. So there are some basic informations that are permanently unavailable for the user. |
| 21:52:01 | <EvanR> | :t (/) 1 2 |
| 21:52:02 | <lambdabot> | Fractional a => a |
| 21:52:06 | <EvanR> | > (/) 1 2 |
| 21:52:07 | <lambdabot> | 0.5 |
| 21:52:10 | <monochrom> | :t does not use the defaulting rules |
| 21:52:35 | <kenaryn> | Understood, thanks gentlemen. |
| 21:53:16 | ← | yax__ parts (~yax__@user/yax/x-9576643) () |
| 21:54:57 | <monochrom> | You have to put code in a file, load that file, and ask about identifiers and/or expressions in that file, to see defaulting in action. |
| 21:55:21 | <monochrom> | which is different from ":type <one-shot expression>" |
| 21:55:45 | <monochrom> | For example if your file has "x = 1", then :type x will correct say Integer. |
| 21:55:53 | <dolio> | @type 1/2 |
| 21:55:54 | <lambdabot> | Fractional a => a |
| 21:55:57 | <dolio> | @type +d 1/2 |
| 21:55:59 | <lambdabot> | Double |
| 21:56:10 | <dolio> | Read the help. :þ |
| 21:56:55 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 21:58:02 | <monochrom> | For example if your file has "main = print 1", then there is a command for asking for the type of the "1" on that line of code specifically (you have to enter the line number and column number, or let an editor do it for you), and it will correctly say "that's Integer". |
| 21:58:15 | → | pavonia joins (~user@user/siracusa) |
| 21:58:16 | <monochrom> | But these do not apply to a pedestrian ":type 1". |
| 21:58:41 | × | gurkenglas quits (~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de) (Ping timeout: 246 seconds) |
| 21:59:38 | <monochrom> | Ugh why am I using 1 instead of 0? :) |
| 21:59:48 | <dolio> | @type +d 0 |
| 21:59:50 | <lambdabot> | Integer |
| 22:00:12 | <monochrom> | Oh haha I forgot that :type has +d |
| 22:00:41 | × | ashln quits (~ashln@98.38.236.123) (Ping timeout: 256 seconds) |
| 22:01:18 | <monochrom> | Yeah I can stand behind "read and memorize the help messages and the user guide. the exam is tomorrow" |
| 22:01:33 | <pavonia> | What does +d do? |
| 22:01:33 | <EvanR> | the integers start at 1 today |
| 22:01:37 | <kenaryn> | I added `n = (/) 1 2` and `m = 1` in a file, loaded it and asked for the type with `:t n` and `:t m` but it still returns `Fractional` and `Num` respectively, instead of `Double` and `Integer`. |
| 22:01:39 | <dolio> | +d does defaulting. |
| 22:01:41 | <EvanR> | 1, 0, 2, 3, ... |
| 22:01:56 | <monochrom> | People don't read manuals often enough. |
| 22:02:06 | <pavonia> | @type +d 0.123 |
| 22:02:07 | <lambdabot> | Double |
| 22:02:35 | → | _xor joins (~xor@74.215.182.83) |
| 22:02:58 | <kenaryn> | @type +d 1 % 3 |
| 22:02:59 | <EvanR> | kenaryn, after you figure out how to make it show the defaulted type (+d above), you should take away that your unannotated numerals really do have that generalized Fractional type |
| 22:03:00 | <lambdabot> | Ratio Integer |
| 22:03:09 | <dolio> | I'm surprised lambdabot supports it, to be honest. |
| 22:03:20 | <monochrom> | me too |
| 22:03:22 | <EvanR> | :t (%) |
| 22:03:23 | <lambdabot> | Integral a => a -> a -> Ratio a |
| 22:03:33 | <monochrom> | Where is yahb? |
| 22:06:47 | → | merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
| 22:06:58 | <geekosaur> | it's yahb2 now |
| 22:07:05 | <geekosaur> | mniip and their bot disappeared |
| 22:07:36 | <EvanR> | yayahb |
| 22:07:39 | <monochrom> | But I can't find yahb2 either. |
| 22:07:39 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 22:08:05 | × | stackdroid18 quits (14094@user/stackdroid) (Quit: hasta la vista... tchau!) |
| 22:09:08 | <geekosaur> | mm, where'd it go. tomsmeding? |
| 22:09:28 | <geekosaur> | [24 20:46:00] * yahb2 has quit (*.net *.split) |
| 22:10:01 | <geekosaur> | took the weekend off I guess |
| 22:10:08 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 22:10:34 | <monochrom> | 10 years from now we will lose everything and have to start over when tomsmeding finishes his PhD and gets a real job. :) |
| 22:12:46 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 272 seconds) |
| 22:14:47 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 22:14:59 | <ski> | @where PLFA |
| 22:14:59 | <lambdabot> | "Programming Language Foundations in Agda" (formal methods book) by Wen Kokke,Philip Wadler in 2018-(01-06) at <https://homepages.inf.ed.ac.uk/wadler/topics/agda.html>,<https://plfa.github.io/> |
| 22:17:29 | × | machinedgod quits (~machinedg@66.244.246.252) (Ping timeout: 248 seconds) |
| 22:18:15 | × | acidjnk quits (~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de) (Ping timeout: 256 seconds) |
| 22:19:36 | → | machinedgod joins (~machinedg@66.244.246.252) |
| 22:21:10 | × | unit73e quits (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 268 seconds) |
| 22:22:02 | → | nate4 joins (~nate@98.45.169.16) |
| 22:27:04 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
| 22:30:11 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 246 seconds) |
| 22:34:22 | <kenaryn> | F* is a formal proof programming language from Microsoft/INRIA venture that tries to compete with Adga. It has of course less traction than Agda but it's more a language than an proof-assistant; it could be the real deal once it superseeds Coq. |
| 22:35:34 | × | michalz quits (~michalz@185.246.204.125) (Remote host closed the connection) |
| 22:36:12 | × | merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
| 22:36:34 | → | merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
| 22:37:20 | ski | . o O ( <https://fstar-lang.org>,<https://fstar-lang.org/tutorial/> ) |
| 22:40:08 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 22:41:24 | × | kenaryn quits (~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr) (Quit: leaving) |
| 22:41:44 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 246 seconds) |
| 22:42:01 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 248 seconds) |
| 22:44:03 | × | xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
| 22:49:21 | × | Tuplanolla quits (~Tuplanoll@91-159-69-97.elisa-laajakaista.fi) (Quit: Leaving.) |
| 22:49:26 | × | merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
| 22:49:32 | × | {-d0t-} quits (~q_q@user/-d0t-/x-7915216) (Ping timeout: 268 seconds) |
| 23:03:07 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 23:03:12 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Client Quit) |
| 23:05:17 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 23:15:57 | → | merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
| 23:22:04 | × | zeenk quits (~zeenk@2a02:2f04:a301:3d00:39df:1c4b:8a55:48d3) (Quit: Konversation terminated!) |
| 23:24:30 | × | shiraeeshi quits (~shiraeesh@109.166.58.140) (Ping timeout: 240 seconds) |
| 23:25:29 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds) |
| 23:26:20 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 23:32:08 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 23:32:08 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 23:32:08 | → | wroathe joins (~wroathe@user/wroathe) |
| 23:35:52 | × | jinsun quits (~jinsun@user/jinsun) (Read error: Connection reset by peer) |
| 23:35:59 | → | jinsun__ joins (~jinsun@user/jinsun) |
| 23:35:59 | jinsun__ | is now known as jinsun |
| 23:37:42 | → | Guest|92 joins (~Guest|92@35.24.208.138) |
| 23:50:14 | → | shiraeeshi joins (~shiraeesh@109.166.58.140) |
| 23:50:35 | × | merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
| 23:50:58 | <Axman6> | o/ |
| 23:57:10 | <geekosaur[m]> | o/ |
| 23:57:30 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Ping timeout: 240 seconds) |
| 23:59:49 | × | pleo quits (~pleo@user/pleo) (Quit: quit) |
All times are in UTC on 2022-06-26.