Logs on 2024-12-04 (liberachat/#haskell)
| 00:00:08 | × | alp_ quits (~alp@2001:861:8ca0:4940:5aee:7e5d:1206:a620) (Remote host closed the connection) |
| 00:00:25 | → | alp_ joins (~alp@2001:861:8ca0:4940:a886:2477:d10a:75c1) |
| 00:01:19 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 00:02:09 | → | alp__ joins (~alp@128-79-174-146.hfc.dyn.abo.bbox.fr) |
| 00:03:35 | × | gawen quits (~gawen@user/gawen) (Quit: cya) |
| 00:03:49 | × | iqubic quits (~sophia@2601:602:9201:9440:6112:c36d:f068:3b4f) (Ping timeout: 260 seconds) |
| 00:05:13 | × | alp_ quits (~alp@2001:861:8ca0:4940:a886:2477:d10a:75c1) (Ping timeout: 252 seconds) |
| 00:06:43 | → | iqubic joins (~sophia@2601:602:9201:9440:9777:a5e9:365:fd69) |
| 00:06:54 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 00:08:14 | × | j1n37 quits (~j1n37@user/j1n37) (Read error: Connection reset by peer) |
| 00:10:05 | → | agent314 joins (~quassel@static-198-54-130-91.cust.tzulo.com) |
| 00:10:36 | <Leary> | @tell tylerhou `Fix` is a functor from the category of endofunctors on Hask to Hask; your `lift` corresponds to `fmap`, mapping the morphisms of the former (natural transformations) to to those of the latter (arrows). |
| 00:10:36 | <lambdabot> | Consider it noted. |
| 00:11:08 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 00:11:49 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 00:11:52 | → | gawen joins (~gawen@user/gawen) |
| 00:12:21 | → | j1n37 joins (~j1n37@user/j1n37) |
| 00:12:46 | → | GdeVolpiano joins (~GdeVolpia@user/GdeVolpiano) |
| 00:15:29 | × | ByronJohnson quits (~bairyn@50.250.232.19) (Remote host closed the connection) |
| 00:18:49 | × | agent314 quits (~quassel@static-198-54-130-91.cust.tzulo.com) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 00:22:41 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 00:23:26 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 00:23:59 | × | sprotte24 quits (~sprotte24@p200300d16f4231002957a791852bdd2a.dip0.t-ipconnect.de) (Quit: Leaving) |
| 00:29:27 | × | j1n37 quits (~j1n37@user/j1n37) (Read error: Connection reset by peer) |
| 00:29:37 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds) |
| 00:34:11 | → | j1n37 joins (~j1n37@user/j1n37) |
| 00:34:51 | × | OftenFaded quits (~OftenFade@user/tisktisk) (Quit: Client closed) |
| 00:34:55 | × | weary-traveler quits (~user@user/user363627) (Remote host closed the connection) |
| 00:37:36 | → | weary-traveler joins (~user@user/user363627) |
| 00:40:15 | → | pera joins (~pera@user/pera) |
| 00:40:43 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 00:46:00 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 00:47:23 | × | mange quits (~user@user/mange) (Ping timeout: 252 seconds) |
| 00:47:42 | → | ByronJohnson joins (~bairyn@50.250.232.19) |
| 00:50:48 | → | dolio joins (~dolio@130.44.140.168) |
| 00:50:50 | × | euleritian quits (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 00:51:56 | → | euleritian joins (~euleritia@77.22.252.159) |
| 00:52:25 | × | ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 260 seconds) |
| 00:54:13 | × | euleritian quits (~euleritia@77.22.252.159) (Read error: Connection reset by peer) |
| 00:54:28 | → | euleritian joins (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
| 00:56:31 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 00:59:20 | → | Smiles joins (uid551636@id-551636.lymington.irccloud.com) |
| 01:01:20 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds) |
| 01:01:58 | → | mange joins (~user@user/mange) |
| 01:01:58 | × | mange quits (~user@user/mange) (Excess Flood) |
| 01:03:33 | → | Guest33 joins (~Guest33@14.139.38.209) |
| 01:04:30 | × | Guest33 quits (~Guest33@14.139.38.209) (Client Quit) |
| 01:04:36 | → | OftenFaded joins (~OftenFade@user/tisktisk) |
| 01:06:02 | × | Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
| 01:07:35 | <monochrom> | >:) |
| 01:09:53 | × | euleritian quits (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Ping timeout: 255 seconds) |
| 01:12:18 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 01:17:06 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds) |
| 01:17:12 | → | euleritian joins (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) |
| 01:24:09 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 01:28:03 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 01:29:03 | × | euleritian quits (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) (Ping timeout: 265 seconds) |
| 01:30:15 | → | euleritian joins (~euleritia@dynamic-176-006-135-047.176.6.pool.telefonica.de) |
| 01:32:37 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 01:43:34 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 01:48:49 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 01:52:12 | ← | emma-underscores parts (~quassel@204.187.100.82) () |
| 01:57:56 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 01:59:20 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 02:02:30 | × | Buliarous quits (~gypsydang@46.232.210.139) (Remote host closed the connection) |
| 02:02:58 | × | pera quits (~pera@user/pera) (Quit: leaving) |
| 02:03:25 | → | Buliarous joins (~gypsydang@46.232.210.139) |
| 02:04:20 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds) |
| 02:14:29 | × | machined1od quits (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 260 seconds) |
| 02:15:07 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 02:19:48 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |
| 02:30:39 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 02:33:50 | × | joeyadams quits (~joeyadams@syn-184-054-105-097.res.spectrum.com) (Quit: Leaving) |
| 02:34:23 | × | OftenFaded quits (~OftenFade@user/tisktisk) (Quit: Client closed) |
| 02:35:51 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds) |
| 02:41:43 | × | Everything quits (~Everythin@46-133-12-50.mobile.vf-ua.net) (Quit: leaving) |
| 02:46:26 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 02:51:25 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 02:53:54 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
| 02:54:41 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 260 seconds) |
| 02:54:49 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 03:02:13 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 03:06:57 | × | td_ quits (~td@i5387091F.versanet.de) (Ping timeout: 248 seconds) |
| 03:08:56 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 03:08:59 | → | td_ joins (~td@i53870906.versanet.de) |
| 03:20:15 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 03:23:06 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 03:24:30 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds) |
| 03:31:58 | × | alp__ quits (~alp@128-79-174-146.hfc.dyn.abo.bbox.fr) (Remote host closed the connection) |
| 03:32:16 | → | alp__ joins (~alp@2001:861:8ca0:4940:fc7d:2254:175b:29dd) |
| 03:33:59 | → | alp_ joins (~alp@2001:861:8ca0:4940:68d:72c1:d8a6:4577) |
| 03:35:23 | × | alp_ quits (~alp@2001:861:8ca0:4940:68d:72c1:d8a6:4577) (Remote host closed the connection) |
| 03:35:38 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 03:35:40 | → | alp_ joins (~alp@2001:861:8ca0:4940:1baf:64f4:e1ae:5b74) |
| 03:37:05 | × | alp_ quits (~alp@2001:861:8ca0:4940:1baf:64f4:e1ae:5b74) (Remote host closed the connection) |
| 03:37:09 | × | alp__ quits (~alp@2001:861:8ca0:4940:fc7d:2254:175b:29dd) (Ping timeout: 252 seconds) |
| 03:37:22 | → | alp_ joins (~alp@2001:861:8ca0:4940:4ba7:cb8a:c26a:d8d0) |
| 03:39:06 | → | alp__ joins (~alp@2001:861:8ca0:4940:5a62:c4d4:e730:577a) |
| 03:40:46 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 03:41:53 | × | ByronJohnson quits (~bairyn@50.250.232.19) (Remote host closed the connection) |
| 03:42:17 | × | alp_ quits (~alp@2001:861:8ca0:4940:4ba7:cb8a:c26a:d8d0) (Ping timeout: 252 seconds) |
| 03:44:07 | × | alp__ quits (~alp@2001:861:8ca0:4940:5a62:c4d4:e730:577a) (Ping timeout: 252 seconds) |
| 03:51:26 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 03:59:33 | → | koolazer joins (~koo@user/koolazer) |
| 04:01:49 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 04:12:31 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 04:17:30 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 04:17:47 | → | aforemny_ joins (~aforemny@2001:9e8:6cc3:9500:59e1:615b:5b80:729c) |
| 04:18:43 | × | aforemny quits (~aforemny@2001:9e8:6ce3:fa00:8581:f920:fe47:eb38) (Ping timeout: 252 seconds) |
| 04:27:16 | → | r-sta joins (~r-sta@sgyl-37-b2-v4wan-168528-cust2421.vm6.cable.virginm.net) |
| 04:27:27 | <r-sta> | hello i wish to release a library via cabal |
| 04:28:06 | <r-sta> | i want to have an example to paste where it uses the import, and a cmd line to open a repl to the src with the required lib built from cabal |
| 04:28:18 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 04:28:23 | <r-sta> | can anyone help me with the steps? |
| 04:29:05 | × | vanishingideal quits (~vanishing@user/vanishingideal) (Quit: leaving) |
| 04:31:14 | ← | L29Ah parts (~L29Ah@wikipedia/L29Ah) () |
| 04:32:05 | <r-sta> | heres some code |
| 04:32:06 | <r-sta> | https://paste.tomsmeding.com/xmn5qdUG |
| 04:33:30 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds) |
| 04:34:56 | <r-sta> | imtrying to write a zipper library for data.functor |
| 04:35:09 | <r-sta> | to give default fmap instances |
| 04:37:42 | <Axman6> | ndo you have a cabal project (i.e, a .cabal file) for it yet? |
| 04:37:47 | <Axman6> | -n |
| 04:38:25 | <Axman6> | that Source class looks quite hard to use |
| 04:38:53 | <r-sta> | yeah, im just trying to use a cabal proj file vsn |
| 04:39:10 | <r-sta> | is there some place i can link a directory? |
| 04:39:56 | <Axman6> | the easiest thing would be to put it on a publicly accessible git hosting site like github (and ththat will make it easier for us ot help you too) |
| 04:41:17 | <Axman6> | Is there a reason you don't have a functional dependency a -> index in Source? |
| 04:42:19 | <Axman6> | repeatedly n f a = iterate f a !! n, btw |
| 04:44:05 | <r-sta> | different sources of the same type might have different indexes |
| 04:44:06 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 04:44:40 | <Axman6> | I'm not sure I really understand what this is supposed to do, so I'll ignore it for now we can sort out the cabal side of things. |
| 04:44:51 | <r-sta> | ok |
| 04:44:58 | <r-sta> | there is a simpler presentation anyhow |
| 04:45:03 | <r-sta> | which is what i will be uploading |
| 04:46:41 | <r-sta> | so... all i have at the moment is a comment... but i could still upload it i guess |
| 04:47:19 | <r-sta> | i can open it up in ghci with cabal v2-repl zipper |
| 04:47:27 | <r-sta> | how do i push it to hackage? |
| 04:47:45 | <r-sta> | and do i have to do something so it appears as Data.Functor.Zipper ? |
| 04:48:05 | <Axman6> | do you have a cabal file? |
| 04:49:04 | <r-sta> | yeah |
| 04:49:15 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 04:49:26 | <Axman6> | do you have your code on github or another git hosting website so we can see it? |
| 04:49:41 | → | billchenchina joins (~billchenc@2a0d:2580:ff0c:201:47cf:ca1:a674:8042) |
| 04:50:23 | <r-sta> | if you give me the cmd to upload to cabal i could link the hackage! |
| 04:50:42 | <r-sta> | cabal-version: 2.4 |
| 04:50:42 | <r-sta> | name: zipper |
| 04:50:43 | <r-sta> | version: 0.1.0.0 |
| 04:50:43 | <r-sta> | library |
| 04:50:44 | <r-sta> | default-language: Haskell2010 |
| 04:50:44 | <r-sta> | hs-source-dirs: src |
| 04:50:45 | <r-sta> | exposed-modules: Data.Functor.Zipper |
| 04:50:45 | <r-sta> | build-depends: base |
| 04:50:52 | <Axman6> | you need a hackage account first, and you should consider whether this is something th's generally useful to other people |
| 04:50:59 | <Axman6> | do not paste multiple lines in IRC! |
| 04:51:02 | <Axman6> | @where paste |
| 04:51:02 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 04:51:07 | <r-sta> | erp, sry |
| 04:51:23 | <r-sta> | i think its useful, it gives default functor instances |
| 04:51:36 | <Axman6> | there is already a library called zipper, so you'll need to call it something else |
| 04:51:39 | <r-sta> | ie, users can implement it as an alternative to implementing fmap |
| 04:52:06 | <r-sta> | hmm... its like, a pointer with a next function for where it points too |
| 04:52:08 | <r-sta> | any ideas? |
| 04:52:20 | <r-sta> | its kind of a zipper... |
| 04:52:29 | <Axman6> | I don't see what that has to do with functors? |
| 04:52:49 | <r-sta> | if you give the length of however many cursor updates it requires |
| 04:52:57 | <r-sta> | then it lenses each value and fmaps like that |
| 04:53:14 | <r-sta> | the length is a "complete functor sheduling" |
| 04:53:32 | <r-sta> | where there pointer index / cursor type is just Int for list position |
| 04:53:48 | <r-sta> | if its more complicated because it jumps about the place as it fmaps, then it might not be Int |
| 04:53:50 | <Axman6> | I think this is a long way from being ready to upload to hackage, there's no documentation or explanation of what it does or how to use it |
| 04:54:08 | <Axman6> | so, step one, make it available via git |
| 04:54:09 | × | poscat quits (~poscat@user/poscat) (Ping timeout: 252 seconds) |
| 04:54:14 | <r-sta> | ok |
| 04:54:59 | <r-sta> | i just want to get the hackage cabal issue sorted first cos im sick of these darn proj files |
| 04:55:07 | <jackdk> | Note that Hackage is an append-only package store, and the trustees ask people only to upload packages that "work, are useful to other people, and that you intend to maintain". It's possible to point to git repositories using a `cabal.project` file, which is one way to depend on experimental packages while they're cooking. |
| 04:55:17 | <r-sta> | i want to get as much like, pure abstraction into the background as possible |
| 04:55:41 | <r-sta> | really general libs like functors consisting for pointers with shedules for visitation, id rather make standard libs |
| 04:55:44 | <Axman6> | Please don't upload packages to hackage that aren't ready for other people to use them |
| 04:55:51 | <r-sta> | ah ok |
| 04:56:01 | <r-sta> | ill make sure someone here gives it a look over before i do so |
| 04:56:10 | <r-sta> | just trying to get a hackage account atm |
| 04:56:25 | → | poscat joins (~poscat@user/poscat) |
| 04:56:46 | <Axman6> | that will take a while IIRC, they get manually approved. Please just put it on github, then we can give you better advice |
| 04:57:05 | <jackdk> | ... or your alternative code forge of choice |
| 04:57:39 | <Axman6> | sure, wherever, as long as we can see it |
| 04:58:06 | <r-sta> | okok one moment |
| 04:59:38 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 05:01:31 | <r-sta> | any idea what i could call it? |
| 05:01:53 | <r-sta> | next? |
| 05:02:01 | <r-sta> | ok im calling it next |
| 05:02:12 | <Axman6> | I don't understand what it's for or why it exists, so not really |
| 05:03:00 | <Axman6> | Also have you looked for (or asked) if there is something that already exists that implements what you want? |
| 05:04:26 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 05:04:53 | <Axman6> | You haven't defined any instances for your class, so it's very unclear to me what it's supposed to do. the `ensemble` looks very context specific, will other people frequently be working with something which works on [Double] like that? |
| 05:05:09 | <r-sta> | https://github.com/munston/next/tree/main/next |
| 05:05:23 | <r-sta> | hmm... |
| 05:05:26 | <r-sta> | er, no |
| 05:05:33 | <r-sta> | thats for parametric things |
| 05:05:39 | <r-sta> | thats not part of the general abstraction |
| 05:05:51 | <r-sta> | sorry it was a shotgun module for examples sake |
| 05:06:01 | <r-sta> | ... |
| 05:06:05 | <Axman6> | Can you add a README explaining what it is and what it's used for? |
| 05:06:25 | <r-sta> | probably the class is more useful no? |
| 05:06:36 | <r-sta> | isnt it clear from Source and SheduledFunctor what it does? |
| 05:06:41 | <Axman6> | no idea, I don't understand the class |
| 05:07:00 | <r-sta> | ill write a clearer version in this repo 2 secs |
| 05:08:56 | <Axman6> | generally you wouldn't have everything inside a folder in the git repo either, your .cabal file and src directory would usually be at the top level |
| 05:09:51 | <Axman6> | I'm really confused why there seems to be so much IO involved in the types if this is about functors, do we mean the same functors, as in Haskell's Functor class? |
| 05:15:27 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 05:17:40 | <r-sta> | https://raw.githubusercontent.com/munston/next/refs/heads/main/next/src/Data/Functor/Next.hs |
| 05:18:06 | <r-sta> | oh the src thing |
| 05:18:13 | <r-sta> | thats some weird mutability version |
| 05:18:18 | × | Smiles quits (uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 05:18:25 | <r-sta> | the core (pure) version is the scheduled functor below |
| 05:18:27 | <Axman6> | that's what you shared... |
| 05:18:51 | <r-sta> | yeah. i mean. its just because it uses writing and reading in the IO monad |
| 05:19:03 | <r-sta> | but its just a synonym to the pure version below it |
| 05:19:03 | <Axman6> | so you're reimplementing things that already exist in the lens package? |
| 05:19:16 | <r-sta> | huh, no its just a term |
| 05:19:23 | <r-sta> | its a getter setter pair iiuc |
| 05:19:44 | <r-sta> | its like, if your fmapping, you think of editing the contents *within* the container |
| 05:19:47 | <r-sta> | but with a lens |
| 05:19:52 | <r-sta> | its like you retrive it first |
| 05:19:56 | <r-sta> | then edit it and put it back |
| 05:20:09 | <Axman6> | right, that's what the lens library provides? |
| 05:20:13 | <r-sta> | the mutability in the Source version kind of means you dont need to put it back you just write to disck |
| 05:20:25 | <r-sta> | Axman6: its 3 lines |
| 05:20:34 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |
| 05:20:47 | <r-sta> | im not pulling in a whole repo for that, so obfuscating |
| 05:20:52 | <r-sta> | its for comunications sake anyway |
| 05:21:44 | <r-sta> | i mean, you could say the index was in a bifunctor... |
| 05:22:01 | <r-sta> | because its a uniquely appearing element, fmap is the same as get edit and set |
| 05:22:20 | <r-sta> | the cursor itself, does not need a cursor for its get and set |
| 05:22:25 | <r-sta> | because there is only one of them |
| 05:22:55 | <r-sta> | its like. functor <-> lenslike opperation |
| 05:23:03 | <r-sta> | its basically a bifunctor on the cursor and the contents |
| 05:23:12 | <r-sta> | but instead we just say we can put a lens on to edit it |
| 05:23:38 | <r-sta> | the actual values in the functor that is being sheduled have an order specified |
| 05:23:55 | <Axman6> | do you have example instances of those three classes? The Lens class feels like it might not be a good idea |
| 05:23:58 | <r-sta> | otherwise the functor is coming from the get edit set in much the same way |
| 05:24:33 | <r-sta> | if you dont have the lens class it ends up looking like the version from before |
| 05:27:36 | <Axman6> | Ok, so I have quite a lot of problems here, but one of the biggest is reusing very well understood terms with new meaning - Haskell developers know what a lens is (and generally accept that that means the van Laarhoven encoding of them). So for people to use this, they need to adopt incompatible ideas that don't work with the rest of the HAskell ecosystem. That doesn't sound like something that should be on hackage. Can you explain what you're actually trying |
| 05:27:36 | <Axman6> | to achieve? It doesn't like you just want to have the code somewhere out of your project, that doesn't mean it needs to be on hackage |
| 05:29:26 | <r-sta> | this might be more simple to understand |
| 05:29:26 | <r-sta> | https://raw.githubusercontent.com/munston/next/refs/heads/main/next/src/Data/Functor/Next.hs |
| 05:30:21 | <r-sta> | there are no problems with using the word Lens in a source file. it is a standard encoding also |
| 05:30:26 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
| 05:31:14 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 05:32:57 | <r-sta> | as for what im trying to acheive, thats what im trying to comunicate, is there anything specific thats not clear about the technique being presented? |
| 05:33:16 | <r-sta> | could do the missing definition i suppose |
| 05:33:31 | <Axman6> | some example instances would help, I understand the code, I don't understand what it's for |
| 05:34:02 | <Axman6> | it feels like it's related to Traversable, or just lens' optics |
| 05:35:56 | <Axman6> | is the idea of fmapDefaultZ that it would repearedly call... yeah I can't figure out how you could even imeplement fmapDefaultZ using that interface, there's no way to tell which index you're up to, how do you know when you're done? |
| 05:36:30 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 05:38:04 | <r-sta> | you just get given the length |
| 05:38:08 | <r-sta> | you do it that many times |
| 05:38:13 | <r-sta> | maybe thats not the best way... |
| 05:38:18 | <r-sta> | but it is *a* way! |
| 05:38:19 | <Axman6> | but what if the index isn't at the beginning? |
| 05:38:28 | <r-sta> | then your fucked! |
| 05:38:46 | <r-sta> | i mean... it should be at the beginning |
| 05:39:05 | <r-sta> | tbh this feels like a week point |
| 05:39:16 | <Axman6> | so I can go through a _thing_ once ever? what types can be instances of Next? |
| 05:39:35 | <r-sta> | eg if its a list, ix ~ Int |
| 05:39:39 | <r-sta> | next = +1 |
| 05:39:56 | <Axman6> | does that mean that using this on a list of O(n^2)? |
| 05:40:11 | <Axman6> | of=is |
| 05:40:16 | <r-sta> | hmm.. well depends on how you implement the zipper |
| 05:40:22 | <r-sta> | if it just uses !! it will be slow |
| 05:40:32 | <r-sta> | if it actually maintains the cursor like a zipper it might be faster |
| 05:40:39 | <r-sta> | but its at class level so we cant be sure |
| 05:41:08 | <Axman6> | so does it make sense to have instance Next Int [a]? |
| 05:41:09 | <r-sta> | we just know that if we were given an index, we should be able to edit at that cursor location |
| 05:41:33 | <r-sta> | yes thats a good instance. other shedules might be interesting too |
| 05:41:46 | <r-sta> | like if there is (x,xs) instead of (x:xs) |
| 05:41:52 | <Axman6> | or do we need instance Next Int (ListZipper a) which is some other type that represents a cursor over a list? |
| 05:41:58 | <r-sta> | and you alternate between the head, and each element of the tail in turn |
| 05:42:11 | <r-sta> | so doing n opperations on one of n+1 elements |
| 05:42:20 | <r-sta> | and doing one on each of the others |
| 05:42:49 | <r-sta> | Axeman6: yes, if you wanted the fast version, you would have to ensure the instance is over a container that updates that way |
| 05:43:01 | <Axman6> | the usual definition for a list zipper is something like data ListZipper a = ListZipper [a] a [a] where the first list is all the elements before the focus (in reverse order), the current focus, and everything after |
| 05:43:13 | <r-sta> | exactly, this is the perfect example instance |
| 05:43:34 | <Axman6> | ok, so write some instances so people know what this is for |
| 05:43:40 | <r-sta> | we write these implementations, and then it gives the fmap |
| 05:43:46 | <Axman6> | does it make sense to have a zipper over Map k v? |
| 05:44:10 | <r-sta> | iiuc yes, but that it might be slower depending on theoretical hardware |
| 05:44:32 | <Axman6> | Luckily GHC doesn't support theoretical hardware |
| 05:44:56 | <r-sta> | damn, then the Map version might even be faster |
| 05:45:21 | <r-sta> | i cant decide on how to write the classes though |
| 05:45:38 | <r-sta> | you have flumoxed me by saying i shouldnt invoke a lens class just for a lens on the cursor |
| 05:45:55 | <Axman6> | So this goes to my point ogf this not being ready for hackage, if you can't figure out how to use it properly, how will others? |
| 05:46:12 | <Axman6> | Well, what are the instances of the Lens class? |
| 05:46:26 | <Axman6> | show us some instances |
| 05:47:03 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 05:47:44 | <Axman6> | For reference, the lens encoding of this is extremely nice: https://hackage.haskell.org/package/zippers-0.3.2/docs/Control-Zipper.html as long as you have a lens to any point in your structure, you can get a zipper for free over it |
| 05:48:46 | <Axman6> | (This is one of those libraries I've always wanted a use for but never found one) |
| 05:49:02 | <r-sta> | https://github.com/munston/next/blob/main/next/src/Data/Functor/Next.hs |
| 05:50:19 | <r-sta> | er, yeah, i was working with ed for a while on all that stuff and despite basically giving the biplate stuff i ended up hating all the carrots and stuff |
| 05:50:32 | <Axman6> | editZ doesn't call next, so it just applies `f` `lengthZ x` times on one focus right? |
| 05:50:56 | <r-sta> | yeah, you dont want the cursor shifting each time there is an edit nesacarrily |
| 05:51:52 | <Axman6> | how often do I want to apply a function n times, where n is the length of the ... structure? |
| 05:52:04 | <Axman6> | I still don't see any instances btw |
| 05:52:05 | <r-sta> | every time you do fmap! |
| 05:52:31 | <r-sta> | anyway, this can let you do it n+m times, where m are some extra edits!!! |
| 05:52:33 | <Axman6> | but if the index never moves, then I'm just applying f that many times to one item? |
| 05:53:00 | <Axman6> | Also, you can't use this to implement fmap at all right? You only modify one a at a time, so its type can't change |
| 05:53:02 | <r-sta> | huh, no, just because its not used in the edit function automatically, you just have to use it manually in fmap |
| 05:53:14 | <r-sta> | erp! |
| 05:53:16 | <r-sta> | type change |
| 05:53:19 | <r-sta> | oh no! |
| 05:53:20 | <Axman6> | that |
| 05:53:28 | <Axman6> | that's a pretty fundamental part of fmap... |
| 05:53:29 | <r-sta> | stupid parameter vectors totally blindsided me |
| 05:53:36 | <Axman6> | it might be _the_ fundamental part of fmap |
| 05:53:46 | <r-sta> | suspended traversals will never allow for that! |
| 05:53:51 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 05:53:52 | <Axman6> | indeed |
| 05:54:27 | <r-sta> | the requirement becomes an insane 2 type zipper |
| 05:54:33 | <Axman6> | data ListZipper' a b c = ListZipper [a] (Maybe b) [c] would allow it |
| 05:54:37 | <r-sta> | and not amenable to arbitrary scheduling |
| 05:54:39 | <r-sta> | ffs |
| 05:54:48 | → | Square2 joins (~Square4@user/square) |
| 05:55:09 | <r-sta> | yeah, but its about not being able to do many updates to the same entry according to the schedule |
| 05:55:24 | <r-sta> | "functor schedule" is a misnomer in of itself |
| 05:55:29 | <r-sta> | nothing to do with functors! |
| 05:55:32 | <r-sta> | brarg! |
| 05:55:53 | <r-sta> | ok, now this is why you need a seccond pair of eyes |
| 05:55:54 | <Axman6> | indeed |
| 05:56:08 | <r-sta> | well thats not getting on hackage then! |
| 05:56:11 | <Axman6> | These are good lessons to learn though |
| 05:56:34 | <r-sta> | ok fair |
| 05:56:49 | <r-sta> | im actually kinda bummed out about that, ima go |
| 05:56:53 | <Axman6> | and one of the reasons I kept trying to get you to write some concrete things like instances (fmapDefaultZ would have been good too). just because you can write the types doesn't mean you can write the code |
| 05:57:27 | <Axman6> | so this may well still be a useful thing, but you gotta prove that (luckily programs are proofs in Haskell) |
| 05:57:28 | <r-sta> | ... |
| 05:57:29 | <r-sta> | suppose |
| 05:57:50 | <Axman6> | undefined proves everything, just not usefully |
| 05:57:53 | × | Square quits (~Square@user/square) (Ping timeout: 255 seconds) |
| 05:58:20 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 05:58:24 | <r-sta> | your right, i would have run into the "edit many times, not (a->b) for edit" as soon as i went to write the instance |
| 05:58:47 | <Axman6> | monoMap :: Zipper ix a (f a) => (a -> a) -> f a -> f a feels doable, and worth seeing if you can do it |
| 05:58:51 | <r-sta> | ANYWAY |
| 05:58:53 | <r-sta> | basically |
| 05:58:54 | <r-sta> | yeah |
| 05:58:57 | <r-sta> | you have to mono it |
| 05:59:05 | <r-sta> | then everything still holds |
| 05:59:23 | <Axman6> | prove it =) |
| 05:59:27 | <r-sta> | multiple edits breaks traversable laws, i thought this might be an interesting structure |
| 06:00:24 | <r-sta> | (sorry your also right there should be a next in editZ) |
| 06:01:24 | <r-sta> | this compiles ok; |
| 06:01:24 | <r-sta> | https://github.com/munston/next/blob/main/next/src/Data/Functor/Next.hs |
| 06:02:02 | <Axman6> | does it work? Show me some instances |
| 06:02:53 | <Axman6> | simple ones that only have simple definitions: Data.Proxy.Proxy, (b, a), Maybe a - can you write isntances for next and zipper for those? |
| 06:03:53 | <monochrom> | If I were interested, I would ask about actual instances and toy examples too. |
| 06:04:04 | <Axman6> | instance Next () (Proxy a) where ..., instance Next () (b, a) where ..., instance Next ?? (Maybe a) where ... |
| 06:04:05 | <monochrom> | But since I am uninterested, I will tell the well-known math joke. |
| 06:04:18 | <r-sta> | or maybe more like this; |
| 06:04:18 | <r-sta> | https://github.com/munston/next/blob/main/next/src/Data/Functor/Next.hs |
| 06:04:43 | <r-sta> | go on, whats this math joke? |
| 06:04:54 | <Axman6> | I think the joke is an exercise left to the reader |
| 06:04:58 | <monochrom> | A math PhD student thought up a new kind of rings (additional axioms on top of ring axioms), and proved many nice theorems about them. |
| 06:05:31 | Axman6 | gets the popcorn |
| 06:05:38 | <monochrom> | During the exam, the examiners asked: Do you have examples of this kind of rings? Answer: No, haven't thought of it. |
| 06:05:51 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds) |
| 06:05:53 | × | poscat quits (~poscat@user/poscat) (Quit: Bye) |
| 06:06:08 | <monochrom> | The examiners went on to go to the blackboard and proved that only {0} satisfies the additional axioms. |
| 06:07:20 | → | poscat joins (~poscat@user/poscat) |
| 06:07:43 | → | euandreh1 joins (~Thunderbi@2804:d59:8929:cc00:c70d:53a7:f44e:6c64) |
| 06:08:15 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 06:09:40 | Axman6 | is waiting for a punchline... |
| 06:09:50 | <monochrom> | That's the punchline. |
| 06:10:50 | × | euandreh1 quits (~Thunderbi@2804:d59:8929:cc00:c70d:53a7:f44e:6c64) (Client Quit) |
| 06:10:56 | × | euandreh quits (~Thunderbi@189.6.105.228) (Ping timeout: 264 seconds) |
| 06:11:05 | <Axman6> | that feels more like a cry for help based on a real experience you've had monochrom, you good bro? |
| 06:11:19 | <monochrom> | Perhaps I can retell the joke with semigroups instead of rings? More people here know semigroups. |
| 06:11:56 | <monochrom> | A math PhD student thought up a new kind of semigroups (additional axioms on top of semigroup axioms), and proved many nice theorems about them. |
| 06:12:10 | <monochrom> | During the exam, the examiners asked: Do you have examples of this kind of semigroups? Answer: No, haven't thought of it. |
| 06:12:11 | <Axman6> | Also, I'm pretty sure the appropriate type above for Maybe would be instance Next Bool (Maybe a) - "have we visited all the a's yet" |
| 06:12:25 | <monochrom> | The examiners went on to go to the blackboard and proved that only the empty set satisfies the additional axioms. |
| 06:12:54 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds) |
| 06:13:26 | <Axman6> | monochrom: that just sounds like the sort of nonsense mathematicians do all the time though, the student feels like a model methematician to me |
| 06:14:01 | <monochrom> | haha |
| 06:15:06 | <Axman6> | r-sta: I have a feeling you want to use lengthZ x - 1 btw |
| 06:15:14 | <monochrom> | Works that survive peer review are not that bad. Someone would be asking "is there an example?" all the time. |
| 06:15:41 | <monochrom> | But sure, during sketching and brainstorming, of course you run into that all the time. It's brainstorming. |
| 06:16:06 | <Axman6> | I've definitely gone through very similar things, where I thought I had come up with something useful, until I tried to use it |
| 06:17:25 | <Axman6> | (possible max 0 (lengthZ x - 1) to be safe - the isntance for Proxy will have lengthZ _ = 0) |
| 06:17:36 | <r-sta> | it does not work... |
| 06:17:37 | <r-sta> | https://github.com/munston/next/blob/main/next/src/Data/Functor/Next.hs |
| 06:18:32 | <Axman6> | what goes wrong? |
| 06:18:46 | <Axman6> | I would expect any use of error to go wrong =) |
| 06:19:12 | <r-sta> | it does not return an error |
| 06:19:17 | <r-sta> | :-( |
| 06:19:33 | <Axman6> | what did you do to run it though? |
| 06:19:42 | <Axman6> | did you evaluate test in ghci? |
| 06:20:00 | <r-sta> | yeah it just returns fine |
| 06:20:03 | <r-sta> | unchanged |
| 06:20:15 | <r-sta> | ghci> test |
| 06:20:16 | <r-sta> | ListCursor 0 0 [1,2,3] |
| 06:20:24 | <r-sta> | should be [2,3,4] |
| 06:20:35 | <r-sta> | well, if it was (+1) and not (error.show) |
| 06:21:10 | <Axman6> | should newListCursor xs = ListCursor 0 0 xs be calling length? (something which is almost always a code smell btw, length may never terminate) |
| 06:21:21 | <r-sta> | DERP! |
| 06:22:59 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 06:24:00 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 06:24:01 | <r-sta> | ok |
| 06:24:02 | <r-sta> | https://raw.githubusercontent.com/munston/next/refs/heads/main/next/src/Data/Functor/Next.hs |
| 06:24:04 | <r-sta> | that works |
| 06:24:09 | <r-sta> | all examples and everything |
| 06:24:48 | <r-sta> | not a bad concept eh!? |
| 06:25:08 | <Axman6> | I seem many problems still, but at least you got something working |
| 06:25:13 | <r-sta> | any ideas how to get it into the kind of form where it could be a lib? |
| 06:25:39 | <r-sta> | problems!? |
| 06:25:42 | <r-sta> | seems fine! |
| 06:25:47 | → | zenmov joins (~zenmov@user/zenmov) |
| 06:25:48 | <r-sta> | compiles, passes unit tests |
| 06:25:58 | <r-sta> | never breaks... |
| 06:26:01 | <Axman6> | I think you'd need to make it more efficient first, there's some significant performance issues there. most of the list operations are O(n^2) |
| 06:26:31 | <Axman6> | And I think you'd need some more instances defined |
| 06:26:33 | <r-sta> | oh, you mean you want the propper zipper version |
| 06:26:39 | <r-sta> | im not spending all day writing instances |
| 06:26:59 | <Axman6> | then why do you want to release it on hackage? Without instances, it's not useful to anyone |
| 06:27:14 | <r-sta> | huh |
| 06:27:24 | <r-sta> | i meant more in terms of, like getting it to do stuff |
| 06:27:34 | <r-sta> | its not useless |
| 06:27:39 | <r-sta> | but like, the user might want Map |
| 06:27:44 | <r-sta> | idk how to implementa that |
| 06:27:46 | <Axman6> | Just because some Haskell code _exists_ doesn't mean it should be on Hackage (as someone who has a few packages on Hackage that aren't useful at all that should be removed) |
| 06:27:53 | <r-sta> | cos its from a library and i can basically only do pure code |
| 06:28:10 | <r-sta> | ok ill keep it off hackage and save from having to maintain it! |
| 06:28:13 | <Axman6> | I don't understand your point |
| 06:28:24 | <r-sta> | point is i am not writing these instances |
| 06:28:27 | <Axman6> | what does pure code have to do with Map? |
| 06:28:37 | <r-sta> | er... i mean. not from libraries |
| 06:28:39 | <r-sta> | sorry, tired |
| 06:28:48 | <r-sta> | prelude only idiom |
| 06:28:49 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 06:28:58 | <r-sta> | part of the reason i want to get some of my libs on hackage |
| 06:28:59 | <Axman6> | Right, so what use does this provide to other people? |
| 06:29:02 | <r-sta> | so i can actually use libs! |
| 06:29:12 | <Axman6> | you can use libraries without hackage |
| 06:29:18 | <r-sta> | ok. so. if eg. you. wrote the Map instance, etc, so it was useful |
| 06:29:29 | <r-sta> | well, its broken cos i didnt realise there was this mono type restriction |
| 06:29:36 | <r-sta> | and so there are like, theoretics abound |
| 06:29:50 | <Axman6> | Well, I can;t write the Map instance, I don't control your package or the containers package, and those are the only two places instances are allowed to be defined |
| 06:30:30 | <r-sta> | fair |
| 06:30:35 | <r-sta> | well i dont need this anyway |
| 06:30:41 | <r-sta> | personally |
| 06:30:52 | <r-sta> | and i kind of just wanted to use it for my project. but i get thats not the point |
| 06:31:01 | <r-sta> | so ill keep it in a local cabal proj as per usual |
| 06:31:14 | <r-sta> | and if any of the libs are more worthy of user stuff ill put those |
| 06:31:14 | <Axman6> | Sounds reasonable to me |
| 06:31:40 | <r-sta> | so what do you think of the concept? |
| 06:31:49 | <r-sta> | and this weird multi edit monotyping business |
| 06:32:18 | × | euleritian quits (~euleritia@dynamic-176-006-135-047.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 06:32:35 | → | euleritian joins (~euleritia@77.23.250.232) |
| 06:33:48 | <Axman6> | I'm not sure what someone would use it for. it reminds me a bit of Ed Kmett's monoid action stuff, but only barely. |
| 06:34:05 | <r-sta> | well im using it for parameters |
| 06:34:13 | <r-sta> | i have an awesome code hang on |
| 06:34:32 | <Axman6> | Also feels a lot like https://hackage.haskell.org/package/cursor |
| 06:35:39 | <r-sta> | yup |
| 06:35:46 | <r-sta> | done loads on this over the years |
| 06:35:50 | <r-sta> | there was i think conduit |
| 06:36:17 | <r-sta> | https://pastebin.com/raw/tCbSrZ5M |
| 06:36:35 | <Axman6> | Can't quite see the relationship to conduit |
| 06:37:13 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 06:37:18 | <r-sta> | sorry i think i put the wrong code |
| 06:38:02 | <Axman6> | I'm done with work for today, so home time for me |
| 06:39:23 | <r-sta> | ok try this |
| 06:39:24 | <r-sta> | https://pastebin.com/raw/4bGief1Z |
| 06:39:43 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 06:40:38 | <r-sta> | and thanks for your help |
| 06:42:32 | × | r-sta quits (~r-sta@sgyl-37-b2-v4wan-168528-cust2421.vm6.cable.virginm.net) (Quit: Client closed) |
| 06:42:38 | → | hseg joins (~gesh@46.120.21.36) |
| 06:44:10 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 06:53:15 | × | gentauro quits (~gentauro@user/gentauro) (Ping timeout: 276 seconds) |
| 06:55:07 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 06:57:36 | → | ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) |
| 06:59:13 | → | alp joins (~alp@2001:861:8ca0:4940:81a9:6af:7f50:e369) |
| 06:59:26 | → | gentauro joins (~gentauro@user/gentauro) |
| 07:02:43 | × | alp quits (~alp@2001:861:8ca0:4940:81a9:6af:7f50:e369) (Remote host closed the connection) |
| 07:03:19 | → | ByronJohnson joins (~bairyn@50.250.232.19) |
| 07:03:20 | → | alp joins (~alp@2001:861:8ca0:4940:81a9:6af:7f50:e369) |
| 07:07:16 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 07:07:19 | × | euleritian quits (~euleritia@77.23.250.232) (Ping timeout: 260 seconds) |
| 07:08:10 | → | euleritian joins (~euleritia@dynamic-176-006-135-047.176.6.pool.telefonica.de) |
| 07:09:13 | × | ByronJohnson quits (~bairyn@50.250.232.19) (Remote host closed the connection) |
| 07:18:34 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 07:19:05 | → | CiaoSen joins (~Jura@2a05:5800:206:4900:ca4b:d6ff:fec1:99da) |
| 07:20:16 | → | ByronJohnson joins (~bairyn@50.250.232.19) |
| 07:23:23 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds) |
| 07:25:21 | × | poscat quits (~poscat@user/poscat) (Quit: Bye) |
| 07:31:50 | × | ft quits (~ft@p508db9c7.dip0.t-ipconnect.de) (Quit: leaving) |
| 07:34:21 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 07:41:05 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds) |
| 07:41:47 | → | agent314 joins (~quassel@static-198-54-130-91.cust.tzulo.com) |
| 07:45:03 | × | agent314 quits (~quassel@static-198-54-130-91.cust.tzulo.com) (Client Quit) |
| 07:45:06 | → | vpan joins (~vpan@212.117.1.172) |
| 07:52:07 | × | weary-traveler quits (~user@user/user363627) (Remote host closed the connection) |
| 07:52:24 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 07:53:21 | → | agent314 joins (~quassel@static-198-54-130-91.cust.tzulo.com) |
| 07:54:25 | × | agent314 quits (~quassel@static-198-54-130-91.cust.tzulo.com) (Client Quit) |
| 07:57:00 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 07:57:36 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds) |
| 08:00:03 | × | caconym quits (~caconym@user/caconym) (Quit: bye) |
| 08:00:40 | → | caconym joins (~caconym@user/caconym) |
| 08:01:46 | → | falafel joins (~falafel@2603:8000:b4f0:62a0:73f:cafd:54ea:955f) |
| 08:06:30 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 08:08:23 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 255 seconds) |
| 08:13:09 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 08:14:51 | → | chele joins (~chele@user/chele) |
| 08:21:24 | → | kuribas joins (~user@2a02:1808:80:ffbf:6c27:4932:fe0c:bc0c) |
| 08:22:07 | × | euleritian quits (~euleritia@dynamic-176-006-135-047.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 08:22:25 | → | euleritian joins (~euleritia@77.23.250.232) |
| 08:27:14 | × | euleritian quits (~euleritia@77.23.250.232) (Ping timeout: 260 seconds) |
| 08:27:37 | × | youthlic quits (~Thunderbi@user/youthlic) (Remote host closed the connection) |
| 08:28:04 | → | youthlic joins (~Thunderbi@user/youthlic) |
| 08:28:21 | <albet70> | hi, nice to meet u all,i want 2 improve my english. pls help me.3ks a lot |
| 08:28:26 | → | euleritian joins (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) |
| 08:33:15 | × | euleritian quits (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
| 08:33:16 | → | poscat joins (~poscat@user/poscat) |
| 08:33:47 | → | euleritian joins (~euleritia@dynamic-176-006-135-047.176.6.pool.telefonica.de) |
| 08:37:07 | → | kuribas` joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 08:38:34 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 08:38:52 | × | kuribas quits (~user@2a02:1808:80:ffbf:6c27:4932:fe0c:bc0c) (Ping timeout: 252 seconds) |
| 08:42:07 | × | falafel quits (~falafel@2603:8000:b4f0:62a0:73f:cafd:54ea:955f) (Ping timeout: 264 seconds) |
| 08:42:14 | × | youthlic quits (~Thunderbi@user/youthlic) (Remote host closed the connection) |
| 08:42:27 | → | merijn joins (~merijn@77.242.116.146) |
| 08:42:32 | × | tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
| 08:42:41 | → | youthlic joins (~Thunderbi@user/youthlic) |
| 08:53:59 | → | michalz joins (~michalz@185.246.207.222) |
| 08:56:38 | × | ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en) |
| 08:58:34 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 08:58:36 | → | billchenchina- joins (~billchenc@103.118.42.229) |
| 09:00:49 | × | billchenchina quits (~billchenc@2a0d:2580:ff0c:201:47cf:ca1:a674:8042) (Ping timeout: 245 seconds) |
| 09:07:44 | → | machinedgod joins (~machinedg@d108-173-18-100.abhsia.telus.net) |
| 09:08:50 | × | poscat quits (~poscat@user/poscat) (Ping timeout: 260 seconds) |
| 09:09:09 | → | poscat0x04 joins (~poscat@user/poscat) |
| 09:11:51 | → | Smiles joins (uid551636@id-551636.lymington.irccloud.com) |
| 09:13:51 | → | acidjnk_new3 joins (~acidjnk@p200300d6e7283f433921c55fec8b6dfb.dip0.t-ipconnect.de) |
| 09:17:15 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.4.2) |
| 09:19:05 | × | euleritian quits (~euleritia@dynamic-176-006-135-047.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 09:19:12 | → | lxsameer joins (~lxsameer@Serene/lxsameer) |
| 09:19:22 | → | euleritian joins (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) |
| 09:24:53 | × | billchenchina- quits (~billchenc@103.118.42.229) (Ping timeout: 255 seconds) |
| 09:26:50 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 09:29:54 | × | euleritian quits (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) (Ping timeout: 246 seconds) |
| 09:30:36 | × | ByronJohnson quits (~bairyn@50.250.232.19) (Ping timeout: 246 seconds) |
| 09:30:58 | → | euleritian joins (~euleritia@dynamic-176-006-135-047.176.6.pool.telefonica.de) |
| 09:39:01 | × | euleritian quits (~euleritia@dynamic-176-006-135-047.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 09:39:20 | → | euleritian joins (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) |
| 09:47:36 | → | ByronJohnson joins (~bairyn@50.250.232.19) |
| 10:02:06 | → | lortabac joins (~lortabac@37.166.141.63) |
| 10:08:51 | → | comerijn joins (~merijn@77.242.116.146) |
| 10:11:20 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 252 seconds) |
| 10:12:47 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 10:13:13 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 10:19:56 | × | CiaoSen quits (~Jura@2a05:5800:206:4900:ca4b:d6ff:fec1:99da) (Ping timeout: 264 seconds) |
| 10:27:28 | <hellwolf> | huh? |
| 10:27:35 | <hellwolf> | wrong channel, ser |
| 10:48:08 | × | lortabac quits (~lortabac@37.166.141.63) (Read error: Connection reset by peer) |
| 10:56:17 | → | cptaffe` joins (~cptaffe@user/cptaffe) |
| 10:56:45 | × | cptaffe quits (~cptaffe@user/cptaffe) (Ping timeout: 260 seconds) |
| 10:58:00 | × | dunj3 quits (~dunj3@2a01:239:328:1600::1) (Quit: ZNC 1.9.1 - https://znc.in) |
| 10:58:32 | cptaffe` | is now known as cptaffe |
| 11:00:38 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 11:15:26 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 11:16:55 | × | comerijn quits (~merijn@77.242.116.146) (Ping timeout: 264 seconds) |
| 11:19:35 | → | __monty__ joins (~toonn@user/toonn) |
| 11:20:34 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 11:24:08 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (*.net *.split) |
| 11:24:08 | × | mantraofpie quits (~mantraofp@user/mantraofpie) (*.net *.split) |
| 11:24:08 | × | califax quits (~califax@user/califx) (*.net *.split) |
| 11:24:08 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (*.net *.split) |
| 11:24:08 | × | gmg quits (~user@user/gehmehgeh) (*.net *.split) |
| 11:24:08 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (*.net *.split) |
| 11:24:08 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (*.net *.split) |
| 11:25:20 | × | alp quits (~alp@2001:861:8ca0:4940:81a9:6af:7f50:e369) (Ping timeout: 260 seconds) |
| 11:30:09 | → | merijn joins (~merijn@77.242.116.146) |
| 11:30:54 | → | CiaoSen joins (~Jura@2a05:5800:206:4900:ca4b:d6ff:fec1:99da) |
| 11:34:34 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Ping timeout: 245 seconds) |
| 11:41:31 | <hellwolf> | I have a dumb question, for some recursive show instances, how can I avoid too many parenthesis? I don't seem to be able to square it, no matter how I try. I always end up "a :* (b :* (c :* Nil))" |
| 11:41:51 | <hellwolf> | (maybe it's the limitation of the show function signature) |
| 11:47:58 | <tomsmeding> | hellwolf: showsPrec can do this |
| 11:48:16 | <tomsmeding> | but iirc the default-generated Show instance only takes precedence into account, not associativity |
| 11:48:17 | <hellwolf> | I was looking at it. but not sure how yet. |
| 11:48:37 | <tomsmeding> | showsPrec takes a precedence argument so that you can do parentheses correctly in the first place |
| 11:48:58 | <tomsmeding> | correctly handling associativity means carefully choosing what precedence you pass to subterms, usually |
| 11:49:16 | <hellwolf> | okay, I will take a look... I have skill issues atm. |
| 11:49:33 | <tomsmeding> | doing it this way with showsPrec essentially means that you lump together all operators on a certain precedence level |
| 11:50:35 | <tomsmeding> | so e.g. if you have :+ and :- both on the same precedence level and both left-associative, then ((a :+ b) :- c) :+ d will (with an associativity-aware showsPrec) print as "a :+ b :- c :+ d" |
| 11:50:40 | <tomsmeding> | this may not be what you want |
| 11:50:55 | <tomsmeding> | but if this is what you want, then showsPrec is enough to implement this |
| 11:51:07 | <tomsmeding> | note that this behaviour will even happen if :+ and :- are of unrelated types |
| 11:53:03 | <tomsmeding> | hellwolf: the general idea with showsPrec is that at the start of a showsPrec implementation, if the `d` you receive is strictly larger than the precedence level of the operator you're about to print, then you add parentheses around your result |
| 11:53:28 | <tomsmeding> | so if you have a non-associative level-6 binary operator, then it would call showsPrec on its children with d=7 |
| 11:53:42 | <tomsmeding> | so that if those were more copies of your operator, they'd be adding parentheses around themselves |
| 11:54:36 | <tomsmeding> | now if you have a right-associative level-6 binary operator, then if the right-hand child is another copy of your operator, then you don't want that child to get parentheses. (i.e. print `a ^ (b ^ c)` as `a ^ b ^ c`.) |
| 11:54:49 | <tomsmeding> | so then call showsPrec on the left child with d=7 and on the right child with d=6 |
| 11:55:12 | <tomsmeding> | this works, but as I said, this will print _anything_ on the right-hand side with d=6, including operators from unrelated types |
| 11:55:18 | <tomsmeding> | this is generally fine, but it's something to be aware of |
| 11:55:58 | <tomsmeding> | general note: if you want to communicate "you're innermost, always add parens if you're not a single word", pass d=11 |
| 11:56:18 | <tomsmeding> | (all operators have precedence level <= 10) |
| 11:56:28 | <tomsmeding> | and if you want to communicate "never add parens", pass d=0 |
| 11:57:03 | <hellwolf> | I see... gonna spend sometimes on it, taking a note in TODO. THanks! |
| 11:57:04 | <tomsmeding> | hellwolf: "skill issue" is harsher language for "need to practice more" |
| 11:58:09 | <hellwolf> | I want to show an example. but another question popped up, how do you set default Num type to Int in ghci? |
| 11:58:45 | <hellwolf> | during one session is fine to. But when I use "default (Int)", ghci doesn't like it. |
| 12:00:26 | <tomsmeding> | doesn't it? |
| 12:00:29 | <tomsmeding> | % default (Int) |
| 12:00:30 | <yahb2> | <no output> |
| 12:00:41 | <tomsmeding> | % maxBound |
| 12:00:41 | <yahb2> | 9223372036854775807 |
| 12:00:42 | <tomsmeding> | works for me |
| 12:01:21 | <tomsmeding> | % :q |
| 12:01:21 | <yahb2> | <bye> |
| 12:01:29 | <tomsmeding> | (clearing that default because it may be surprising) |
| 12:04:38 | <hellwolf> | `It does |
| 12:04:48 | <hellwolf> | need the parenthesis |
| 12:04:49 | <hellwolf> | :D |
| 12:05:08 | <hellwolf> | % default Int |
| 12:05:08 | <yahb2> | <interactive>:5:9: error: [GHC-58481] parse error on input ‘Int’ |
| 12:09:09 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 276 seconds) |
| 12:09:34 | <tomsmeding> | ah right :) |
| 12:16:42 | → | alp joins (~alp@2001:861:8ca0:4940:7c92:cf4a:cc5b:7dc2) |
| 12:18:41 | → | merijn joins (~merijn@77.242.116.146) |
| 12:24:06 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 276 seconds) |
| 12:24:30 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 12:28:40 | × | alp quits (~alp@2001:861:8ca0:4940:7c92:cf4a:cc5b:7dc2) (Remote host closed the connection) |
| 12:29:03 | → | alp joins (~alp@2001:861:8ca0:4940:e895:2263:cae3:811) |
| 12:31:45 | → | cyanteeth joins (~cyanteeth@user/cyanteeth) |
| 12:33:21 | → | battos joins (~battos@78.190.101.163) |
| 12:34:33 | <battos> | Hey. I have a stack overflow exception and I cant solve it for couple hours. If anyone can help, I would appreciate it. Thanks. https://stackoverflow.com/questions/79251167/haskell-3-way-merge-sort-stack-overflow-exception |
| 12:36:03 | → | merijn joins (~merijn@77.242.116.146) |
| 12:36:13 | <int-e> | battos: check what happens if xs has length 2 in `threeWayMergeSort` |
| 12:36:16 | × | cyanteeth quits (~cyanteeth@user/cyanteeth) (Remote host closed the connection) |
| 12:37:03 | <battos> | int-e, 2 `div` 3 would be 0 right |
| 12:37:25 | <battos> | omg if this is the problem i am gonna... |
| 12:37:28 | <int-e> | yep |
| 12:37:53 | <battos> | what should i do? (n `div` 3) + 1? |
| 12:38:09 | <int-e> | (n+1) `div` 3 probably works |
| 12:38:39 | <int-e> | with (n `div` 3) + 1 you have to worry about n=3 |
| 12:39:02 | <int-e> | it's... fine actually, but it's not the split you want. |
| 12:39:14 | <int-e> | :t splitAt |
| 12:39:15 | <lambdabot> | Int -> [a] -> ([a], [a]) |
| 12:39:29 | <battos> | n+1 did not work |
| 12:39:43 | × | CiaoSen quits (~Jura@2a05:5800:206:4900:ca4b:d6ff:fec1:99da) (Ping timeout: 264 seconds) |
| 12:39:45 | → | cyanteeth joins (~cyanteeth@user/cyanteeth) |
| 12:40:05 | <int-e> | you have that expression 4 times, did you change them all? |
| 12:40:06 | × | cyanteeth quits (~cyanteeth@user/cyanteeth) (Remote host closed the connection) |
| 12:40:16 | <battos> | int-e, yes |
| 12:41:26 | <int-e> | oh |
| 12:41:31 | <battos> | lambdabot, do i need to like understand something. bc i didnt get it :( Im new to haskell and functional programming |
| 12:41:33 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 12:41:43 | <int-e> | merge left middle [] = merge left middle [] and merge left [] right = merge left [] right will not terminate |
| 12:41:54 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 248 seconds) |
| 12:42:42 | <int-e> | and there's no case for `merge [] [1] [2]` |
| 12:42:55 | <int-e> | so... a bit more work to do |
| 12:43:10 | <battos> | i guess so |
| 12:43:58 | <int-e> | it's probably best to have a dedicate 2-way merge function |
| 12:44:11 | → | merijn joins (~merijn@77.242.116.146) |
| 12:44:17 | <int-e> | that you can fall back to when one of the lists is depleted |
| 12:46:25 | <battos> | that makes sense |
| 12:49:43 | <int-e> | battos: lambdabot is a bot. `splitAt` is a function that combines take and drop in one which would help avoiding some duplicate effort your code. |
| 12:49:48 | <int-e> | *in your code |
| 12:50:28 | <battos> | oh ok |
| 12:52:16 | <battos> | int-e, https://paste.tomsmeding.com/blUsmtTG i wrote a mergeTwo function |
| 12:52:46 | <battos> | still, [2,1] -> exception stack overflow |
| 12:55:23 | <int-e> | n+1 `div` 3 is not (n+1) `div` 3 |
| 12:56:12 | <int-e> | But with the changes, merge [1] [2] [] now works. |
| 12:57:03 | <battos> | is n+1 div 3 -> n + (1 div 3) |
| 12:57:08 | <int-e> | n+1 `div` 3 = n + (1 `div` 3) = n + 0 = n |
| 12:57:33 | <int-e> | `div` is multiplicative |
| 12:58:25 | <battos> | ok, changed n+1 -> (n+1) and now threeWayMergeSort [2,1] works |
| 12:59:06 | <battos> | now i need to benchmark this function for random arrays of size 10k, 100k, 1000k for my homework :D |
| 12:59:11 | <battos> | thanks for helping |
| 13:00:15 | <battos> | if you want to you can add the solution to stackoverflow so i can select it as solution int-e |
| 13:00:26 | <int-e> | I don't do SO |
| 13:01:09 | <battos> | Okay |
| 13:09:31 | → | cyanteeth joins (~cyanteeth@user/cyanteeth) |
| 13:10:52 | × | cyanteeth quits (~cyanteeth@user/cyanteeth) (Remote host closed the connection) |
| 13:14:24 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.4.2) |
| 13:14:51 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 13:31:03 | → | notzmv joins (~umar@user/notzmv) |
| 13:37:07 | → | cyanteeth joins (~cyanteeth@user/cyanteeth) |
| 13:37:52 | × | cyanteeth quits (~cyanteeth@user/cyanteeth) (Remote host closed the connection) |
| 13:42:36 | → | califax joins (~califax@user/califx) |
| 13:44:21 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 13:44:31 | → | gmg joins (~user@user/gehmehgeh) |
| 13:46:37 | → | cyanteeth joins (~cyanteeth@user/cyanteeth) |
| 13:47:07 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 13:52:02 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 13:53:38 | × | cyanteeth quits (~cyanteeth@user/cyanteeth) (Remote host closed the connection) |
| 13:55:32 | × | caubert quits (~caubert@user/caubert) (Quit: WeeChat 4.4.2) |
| 14:01:00 | → | homo joins (~homo@82-128-196-26.bb.dnainternet.fi) |
| 14:01:31 | → | caubert joins (~caubert@user/caubert) |
| 14:01:57 | × | homo quits (~homo@82-128-196-26.bb.dnainternet.fi) (Changing host) |
| 14:01:57 | → | homo joins (~homo@user/homo) |
| 14:04:31 | → | Square joins (~Square@user/square) |
| 14:05:10 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 14:06:14 | <battos> | when I :set +s, it says something like (x secs, y bytes). This is the time and memory usage of the command, right? |
| 14:07:45 | × | Square2 quits (~Square4@user/square) (Ping timeout: 248 seconds) |
| 14:08:42 | → | hiecaq joins (~hiecaq@user/hiecaq) |
| 14:10:33 | → | hackyhacker joins (~hackyhack@ip-213-124-181-180.ip.prioritytelecom.net) |
| 14:11:42 | <hackyhacker> | Hello I found in the HLint docs that they support to ignore eta reduce suggestions. Does anyone know how to set this option globally in helix or nvim with lspconfig? |
| 14:16:38 | → | briandaed joins (~root@185.234.210.211.r.toneticgroup.pl) |
| 14:16:56 | × | briandaed quits (~root@185.234.210.211.r.toneticgroup.pl) (Changing host) |
| 14:16:56 | → | briandaed joins (~root@user/briandaed) |
| 14:17:00 | <merijn> | hackyhacker: Should be a global hlint config file, I think |
| 14:18:32 | <hackyhacker> | You can drop an hlint.config in the root of your project but I don't think there is a global one idk. |
| 14:18:39 | <merijn> | hackyhacker: Also, just an fyi, that hlint is very opinionated and not necessarily with widely shared opinions ;) |
| 14:19:04 | <hackyhacker> | Yeah I find it very unreadable to write everything pointfree like hlint suggests |
| 14:20:03 | <merijn> | agree |
| 14:20:26 | × | Typedfern quits (~Typedfern@56.red-83-37-30.dynamicip.rima-tde.net) (Ping timeout: 265 seconds) |
| 14:21:56 | <hackyhacker> | Does everyone just use VSCode? The other editors are so hard to set up because I can barely find anyone talking about it online. For other languages I can often find config examples from github issues and stuff. |
| 14:22:51 | <hackyhacker> | Or do you guys just use bare bones editors without lsp stuff? |
| 14:24:14 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 14:26:19 | <kqr> | I'm looking for something like concatMap except the mapping function in my case is a side effectful a -> m [b]. What is it I'm looking for? |
| 14:26:22 | <lortabac> | merijn: "hlint is very opinionated and not necessarily with widely shared opinions" -> this is a very diplomatic statement :) |
| 14:26:52 | → | Typedfern joins (~Typedfern@192.red-83-37-43.dynamicip.rima-tde.net) |
| 14:27:30 | × | battos quits (~battos@78.190.101.163) (Quit: Leaving) |
| 14:28:06 | <kqr> | I guess I could fmap concat over the result of traverse though. |
| 14:28:39 | <haskellbridge> | <Morj> Doesn't concatMapM sound exatcly like what you want? :D |
| 14:29:38 | <lortabac> | am I the only one who would like to have a point-free fmap? We have <$> and <&> but no <.> |
| 14:30:08 | <Leary> | :t \f -> getAp . foldMap (Ap . f) |
| 14:30:09 | <lambdabot> | forall k (t :: * -> *) (f :: k -> *) (a1 :: k) a2. (Foldable t, Monoid (Ap f a1)) => (a2 -> f a1) -> t a2 -> f a1 |
| 14:30:13 | <lortabac> | this is annoying when changing a definition from pure to monadic. You are obliged to eta-expand |
| 14:30:51 | <kqr> | Morj: Yeah, but it's not in base! |
| 14:30:58 | <Leary> | kqr: ^ This, though the signature should be simpler than that. |
| 14:31:36 | <haskellbridge> | <Morj> Ah it's in ghc api, lol. My eyes glanced off of that thinking that ghc = base |
| 14:31:48 | <kqr> | Oh. I'm just starting to wrap my head around Foldable and Monoid instances like Sum etc. so this is good practice. |
| 14:32:59 | <Leary> | :t (\f -> getAp . foldMap (Ap . f)) :: forall f g a b. (Foldable f, Applicative g, Monoid b) => (a -> g b) -> f a -> g b |
| 14:33:00 | <lambdabot> | (Foldable f, Applicative g, Monoid b) => (a -> g b) -> f a -> g b |
| 14:37:51 | × | ByronJohnson quits (~bairyn@50.250.232.19) (Remote host closed the connection) |
| 14:39:21 | <merijn> | lortabac: I mean, the hlint default config is basically "What Neil Mitchell likes" :p |
| 14:41:20 | × | euleritian quits (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
| 14:43:05 | × | hseg quits (~gesh@46.120.21.36) (Quit: WeeChat 4.4.3) |
| 14:44:24 | → | euleritian joins (~euleritia@dynamic-176-006-146-121.176.6.pool.telefonica.de) |
| 14:45:36 | → | cyanteeth joins (~cyanteeth@user/cyanteeth) |
| 14:47:33 | × | cyanteeth quits (~cyanteeth@user/cyanteeth) (Remote host closed the connection) |
| 14:53:23 | → | cyanteeth joins (~cyanteeth@user/cyanteeth) |
| 14:57:24 | × | cyanteeth quits (~cyanteeth@user/cyanteeth) (Remote host closed the connection) |
| 15:02:23 | × | Square quits (~Square@user/square) (Ping timeout: 255 seconds) |
| 15:09:06 | → | alexherbo2 joins (~alexherbo@2a02-8440-3118-f7e7-64d7-8b7a-d066-aa25.rev.sfr.net) |
| 15:09:36 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 15:09:59 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 15:17:09 | <hellwolf> | do notation and where clause doesn't mix well, is it correct? Also, whomever also using using emacs, do you also have the issue that when using let in do notation, the emacs' indentation with "tab" starts to go wrong. |
| 15:19:57 | <int-e> | can you press tab multiple times to cycle between several guesses? |
| 15:21:29 | <hellwolf> | not in this case |
| 15:21:33 | → | weary-traveler joins (~user@user/user363627) |
| 15:21:46 | <hellwolf> | perhaps I need to upgrade my emacs setup, but I don't find my much outdated. |
| 15:21:50 | <hellwolf> | *mine |
| 15:30:41 | × | alp quits (~alp@2001:861:8ca0:4940:e895:2263:cae3:811) (Ping timeout: 252 seconds) |
| 15:30:49 | × | rvalue quits (~rvalue@user/rvalue) (Read error: Connection reset by peer) |
| 15:31:21 | → | rvalue joins (~rvalue@user/rvalue) |
| 15:32:00 | → | vanishingideal joins (~vanishing@user/vanishingideal) |
| 15:33:56 | × | turlando quits (~turlando@user/turlando) (Remote host closed the connection) |
| 15:35:12 | → | turlando joins (~turlando@user/turlando) |
| 15:37:12 | → | alp joins (~alp@2001:861:8ca0:4940:7ce9:459b:14a1:a2de) |
| 15:43:55 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 15:44:26 | × | poscat0x04 quits (~poscat@user/poscat) (Quit: Bye) |
| 15:56:22 | × | hiecaq quits (~hiecaq@user/hiecaq) (Quit: ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.0.92)) |
| 15:58:51 | × | euleritian quits (~euleritia@dynamic-176-006-146-121.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 15:59:08 | → | euleritian joins (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) |
| 16:02:30 | → | ByronJohnson joins (~bairyn@50.250.232.19) |
| 16:04:01 | → | Wygulmage joins (~Wygulmage@user/Wygulmage) |
| 16:07:33 | <Wygulmage> | Does putting an equality constraint in a GADT constructor increase the size of the GADT's values? For example, in `data Foo a where MkFoo :: Int -> Foo Int` does a `MkFoo Int` include both an `Int` and a `Refl :: a :~: Int` ? |
| 16:08:26 | <Wygulmage> | (Rather, `MkFoo n` include both `n` and `Refl` ) |
| 16:09:46 | <jle`> | Wygulmage: do you mean the runtime representation? |
| 16:09:46 | <Wygulmage> | Or is its actual representation equivalent to `data Bar = Bar Int` , with the equality constraint disappearing in compiled code? |
| 16:09:56 | <Wygulmage> | Yeah, the runtime representation. |
| 16:10:50 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.4.2) |
| 16:10:56 | <jle`> | hm i know typeclass constraints definitely carry runtime baggage but i don't think equality would |
| 16:11:42 | <geekosaur> | an equality constraint is an alias inside the typechecker |
| 16:12:06 | <geekosaur> | inequality requires a runtime witness of some kind AIUI |
| 16:12:41 | <Wygulmage> | I didn't know you could have inequality constraints. But you mean that it gets compiled to a coercion rather than a witness? |
| 16:13:02 | <geekosaur> | you can't, directly. there are mechanisms available but they're not built in |
| 16:13:24 | <Leary> | Wygulmage: IIRC implicit equality constraints are as free as they should be, but explicit ones are lifted, so end up costing another word. |
| 16:13:25 | <jle`> | hm if you try to encode the gadt as an adt then the equality constraint would carry at least a function pointer of baggage. but as something built into the compiler i don't think it would. just speculating |
| 16:14:33 | <Leary> | You can probably check by inspecting core ... or it might need to be stg. |
| 16:14:39 | <geekosaur> | https://stackoverflow.com/questions/6939043/is-it-possible-to-place-inequality-constraints-on-haskell-type-variables |
| 16:14:51 | <Wygulmage> | Leary: So `Foo a where MkFoo :: Int -> Foo a` has not extra overhead, but `data Bar a where MkBar :: (a ~ Int)=> Int -> Bar a` has extra overhead? |
| 16:15:08 | <geekosaur> | basically you can do it for free with a closed type family |
| 16:16:35 | <Leary> | Wygulmage: Assuming you meant `MkFoo :: Int -> Foo Int`---yes. |
| 16:16:35 | <Wygulmage> | geekosaur: That's clever. I guess it's like using type-level comparison on Natural. |
| 16:17:11 | × | alexherbo2 quits (~alexherbo@2a02-8440-3118-f7e7-64d7-8b7a-d066-aa25.rev.sfr.net) (Remote host closed the connection) |
| 16:17:16 | <Wygulmage> | Leary: Oops--yes, I did. Thanks. |
| 16:17:31 | → | alexherbo2 joins (~alexherbo@2a02-8440-3118-f7e7-64d7-8b7a-d066-aa25.rev.sfr.net) |
| 16:17:31 | × | MyNetAz quits (~MyNetAz@user/MyNetAz) (Remote host closed the connection) |
| 16:17:55 | <Wygulmage> | And I'll try do get better at reading core. |
| 16:19:22 | <Leary> | Wygulmage: N.B. https://discourse.haskell.org/t/unboxed-equality/9929 |
| 16:24:32 | → | MyNetAz joins (~MyNetAz@user/MyNetAz) |
| 16:35:53 | → | alp_ joins (~alp@2001:861:8ca0:4940:9c1:764:1276:4604) |
| 16:37:23 | <Wygulmage> | Leary: Good to know that you can roll your own just in case, although for my purposes GADT pattern mating is easier. |
| 16:37:28 | <Wygulmage> | *matching |
| 16:38:36 | × | alp quits (~alp@2001:861:8ca0:4940:7ce9:459b:14a1:a2de) (Ping timeout: 272 seconds) |
| 16:42:54 | <hellwolf> | I have these utilities for workign with NP (SimpleNP, not the sop package one) and TupleN (up to 64-ary) for my project: https://paste.tomsmeding.com/5dU8Su98 . |
| 16:42:54 | <hellwolf> | Should I make an effort some day to package it independently? Asking here to see if it is something people would ever need. Packaging is a small lift from me, but I am happy to do if there is people need it. |
| 16:43:28 | <hellwolf> | (and, with a bit more effort, I can make a version works for sop's NP, too) |
| 16:49:09 | → | ash3en joins (~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) |
| 16:53:01 | × | ash3en quits (~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) (Client Quit) |
| 16:59:28 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 265 seconds) |
| 17:02:28 | × | kuribas` quits (~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 27.1)) |
| 17:05:33 | × | alexherbo2 quits (~alexherbo@2a02-8440-3118-f7e7-64d7-8b7a-d066-aa25.rev.sfr.net) (Remote host closed the connection) |
| 17:05:39 | × | acidjnk_new3 quits (~acidjnk@p200300d6e7283f433921c55fec8b6dfb.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 17:05:50 | <kaol> | I have a new job starting and I got do decide so it's a Haskell job. Fun. |
| 17:05:52 | → | alexherbo2 joins (~alexherbo@2a02-8440-3118-f7e7-64d7-8b7a-d066-aa25.rev.sfr.net) |
| 17:06:15 | <kaol> | *to |
| 17:06:35 | × | machinedgod quits (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 255 seconds) |
| 17:07:56 | × | ubert quits (~Thunderbi@2a02:8109:ab8a:5a00:ac82:32e9:69de:2e6f) (Quit: ubert) |
| 17:12:00 | → | Everything joins (~Everythin@94.153.24.195) |
| 17:12:05 | <haskellbridge> | <Morj> Nice, congrats |
| 17:12:16 | <haskellbridge> | <Morj> What's the area? |
| 17:12:22 | <hellwolf> | congrats, what domain? |
| 17:13:42 | × | Leary quits (~Leary@user/Leary/x-0910699) (Remote host closed the connection) |
| 17:16:15 | <kaol> | Alarm transfer systems. In laymans terms, an alarm happens on a site and it's everything needed to get it to the control room in a timely and reliable manner. |
| 17:17:25 | → | trnry joins (~nate@139.64.168.160) |
| 17:18:28 | <hellwolf> | Sounds like an area where model checking can make your alarm the safest: https://benjaminselfridge.github.io/posts/2022-05-10-model-checking-1.html#what-is-model-checking :D |
| 17:20:25 | × | trnry quits (~nate@139.64.168.160) (Client Quit) |
| 17:25:41 | → | Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) |
| 17:28:16 | × | vpan quits (~vpan@212.117.1.172) (Quit: Leaving.) |
| 17:30:18 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 17:33:44 | × | alexherbo2 quits (~alexherbo@2a02-8440-3118-f7e7-64d7-8b7a-d066-aa25.rev.sfr.net) (Remote host closed the connection) |
| 17:34:03 | → | alexherbo2 joins (~alexherbo@2a02-8440-3118-f7e7-64d7-8b7a-d066-aa25.rev.sfr.net) |
| 17:47:31 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 17:48:56 | × | Everything quits (~Everythin@94.153.24.195) (Quit: leaving) |
| 17:50:48 | → | tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
| 17:57:28 | → | pavonia joins (~user@user/siracusa) |
| 18:07:30 | × | ByronJohnson quits (~bairyn@50.250.232.19) (Remote host closed the connection) |
| 18:08:40 | <hackyhacker> | \q |
| 18:08:49 | <hackyhacker> | oops sorry |
| 18:08:53 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 248 seconds) |
| 18:09:19 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 18:09:27 | → | acidjnk_new3 joins (~acidjnk@p200300d6e7283f433921c55fec8b6dfb.dip0.t-ipconnect.de) |
| 18:09:54 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:10:27 | ← | hackyhacker parts (~hackyhack@ip-213-124-181-180.ip.prioritytelecom.net) (WeeChat 4.4.4) |
| 18:11:48 | × | alp_ quits (~alp@2001:861:8ca0:4940:9c1:764:1276:4604) (Remote host closed the connection) |
| 18:12:36 | → | alp joins (~alp@2001:861:8ca0:4940:aa17:2267:ede3:dd49) |
| 18:14:16 | × | alp quits (~alp@2001:861:8ca0:4940:aa17:2267:ede3:dd49) (Remote host closed the connection) |
| 18:14:33 | → | alp joins (~alp@2001:861:8ca0:4940:ce1e:7443:2bff:952b) |
| 18:18:48 | → | ByronJohnson joins (~bairyn@50.250.232.19) |
| 18:21:21 | × | alp quits (~alp@2001:861:8ca0:4940:ce1e:7443:2bff:952b) (Remote host closed the connection) |
| 18:21:39 | → | alp joins (~alp@2001:861:8ca0:4940:8eac:f601:9281:f0e1) |
| 18:22:33 | → | OftenFaded joins (~OftenFade@user/tisktisk) |
| 18:23:03 | × | alp quits (~alp@2001:861:8ca0:4940:8eac:f601:9281:f0e1) (Remote host closed the connection) |
| 18:23:20 | → | alp joins (~alp@2001:861:8ca0:4940:2495:aa5d:f835:c4d7) |
| 18:24:43 | × | alp quits (~alp@2001:861:8ca0:4940:2495:aa5d:f835:c4d7) (Remote host closed the connection) |
| 18:25:00 | → | alp joins (~alp@2001:861:8ca0:4940:bd22:8dd:6c10:c5e0) |
| 18:26:25 | × | alp quits (~alp@2001:861:8ca0:4940:bd22:8dd:6c10:c5e0) (Remote host closed the connection) |
| 18:26:42 | → | alp joins (~alp@2001:861:8ca0:4940:1ca2:997d:5ece:75da) |
| 18:28:06 | × | alp quits (~alp@2001:861:8ca0:4940:1ca2:997d:5ece:75da) (Remote host closed the connection) |
| 18:28:23 | → | alp joins (~alp@2001:861:8ca0:4940:176d:44a4:3e5:e4a9) |
| 18:29:40 | × | alexherbo2 quits (~alexherbo@2a02-8440-3118-f7e7-64d7-8b7a-d066-aa25.rev.sfr.net) (Remote host closed the connection) |
| 18:29:47 | × | alp quits (~alp@2001:861:8ca0:4940:176d:44a4:3e5:e4a9) (Remote host closed the connection) |
| 18:30:05 | → | alp joins (~alp@2001:861:8ca0:4940:95ee:27bd:823f:53b4) |
| 18:31:29 | × | alp quits (~alp@2001:861:8ca0:4940:95ee:27bd:823f:53b4) (Remote host closed the connection) |
| 18:31:46 | → | alp joins (~alp@2001:861:8ca0:4940:5b10:bb7b:d799:e1a) |
| 18:32:21 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 18:33:10 | × | alp quits (~alp@2001:861:8ca0:4940:5b10:bb7b:d799:e1a) (Remote host closed the connection) |
| 18:33:27 | → | alp joins (~alp@2001:861:8ca0:4940:bffe:bef:d5fd:3228) |
| 18:34:12 | × | Wygulmage quits (~Wygulmage@user/Wygulmage) (Quit: Client closed) |
| 18:35:09 | → | alp_ joins (~alp@2001:861:8ca0:4940:b9a2:1759:6304:ffae) |
| 18:36:53 | → | alp__ joins (~alp@2001:861:8ca0:4940:563c:b90a:93c1:efa) |
| 18:38:21 | × | alp quits (~alp@2001:861:8ca0:4940:bffe:bef:d5fd:3228) (Ping timeout: 246 seconds) |
| 18:40:06 | × | alp_ quits (~alp@2001:861:8ca0:4940:b9a2:1759:6304:ffae) (Ping timeout: 246 seconds) |
| 18:41:51 | × | alp__ quits (~alp@2001:861:8ca0:4940:563c:b90a:93c1:efa) (Ping timeout: 246 seconds) |
| 18:49:12 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 18:50:24 | → | rvalue- joins (~rvalue@user/rvalue) |
| 18:51:18 | × | rvalue quits (~rvalue@user/rvalue) (Ping timeout: 246 seconds) |
| 18:53:39 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 18:58:30 | rvalue- | is now known as rvalue |
| 19:11:57 | × | euleritian quits (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 19:12:49 | → | euleritian joins (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) |
| 19:13:34 | <tomsmeding> | kaol: it feels kind of odd to me that there's only one person working on such a system |
| 19:13:43 | <tomsmeding> | at least, I assume it's just one person given that you could choose the tech :p |
| 19:14:14 | <dminuoso> | tomsmeding: Oh, because obscure security is so regularly done by teams of experts? :-) |
| 19:14:34 | <tomsmeding> | perhaps "odd" is not quite the right word |
| 19:14:50 | <tomsmeding> | well, I did say "feels odd" |
| 19:14:52 | <tomsmeding> | :> |
| 19:16:02 | × | euleritian quits (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 19:16:37 | → | euleritian joins (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) |
| 19:18:13 | <monochrom> | 1 is an odd number. QED. >:) |
| 19:19:24 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Quit: Lost terminal) |
| 19:20:21 | <monochrom> | More pun: It's alarming that they assign just one person for the whole thing so the bus factor is not good at all. >:) |
| 19:23:02 | × | dolio quits (~dolio@130.44.140.168) (Quit: ZNC 1.9.1 - https://znc.in) |
| 19:23:34 | → | ash3en joins (~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) |
| 19:24:33 | → | dolio joins (~dolio@130.44.140.168) |
| 19:26:26 | <kaol> | tomsmeding: I'm just the first person there, I have some hires in mind to recommend (starting from the Haskell dev team my last work laid off). |
| 19:26:47 | <tomsmeding> | kaol: good stuff! |
| 19:26:49 | <tomsmeding> | Have fun :) |
| 19:28:01 | <kaol> | It's all new development and it's likely going to take all year until we have anything approaching production ready and they're okay with that. |
| 19:29:46 | × | euleritian quits (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 19:30:05 | → | euleritian joins (~euleritia@dynamic-176-006-132-219.176.6.pool.telefonica.de) |
| 19:30:23 | × | dolio quits (~dolio@130.44.140.168) (Quit: ZNC 1.9.1 - https://znc.in) |
| 19:31:23 | → | dolio joins (~dolio@130.44.140.168) |
| 19:34:57 | × | Pixi__ quits (~Pixi@user/pixi) (Quit: Leaving) |
| 19:35:12 | → | sprotte24 joins (~sprotte24@134.245.44.87) |
| 19:35:17 | → | Pixi joins (~Pixi@user/pixi) |
| 19:38:31 | → | econo_ joins (uid147250@id-147250.tinside.irccloud.com) |
| 19:38:36 | → | machinedgod joins (~machinedg@d108-173-18-100.abhsia.telus.net) |
| 19:43:29 | → | eL_Bart0 joins (eL_Bart0@dietunichtguten.org) |
| 19:58:02 | → | voom joins (~voonij@163.123.195.138) |
| 20:00:05 | × | caconym quits (~caconym@user/caconym) (Quit: bye) |
| 20:00:42 | → | caconym joins (~caconym@user/caconym) |
| 20:00:52 | × | briandaed quits (~root@user/briandaed) (Remote host closed the connection) |
| 20:05:30 | × | ash3en quits (~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) (Quit: ash3en) |
| 20:10:38 | → | ash3en joins (~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) |
| 20:11:01 | <lxsameer> | hey folks, is there any better way to do this: https://dpaste.com/8PZL9Q6Q3 I'm using the asyc lib |
| 20:12:05 | × | ash3en quits (~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 20:16:39 | <kaol> | Better how? wait >=> const (pure ()) would avoid the lambda, do and binding to _ if that's what makes it worse for you. |
| 20:17:04 | <kaol> | Oops, "wait >=> const pass" that is. |
| 20:23:09 | <lxsameer> | kaol: cheers |
| 20:24:15 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 20:24:24 | × | weary-traveler quits (~user@user/user363627) (Remote host closed the connection) |
| 20:25:35 | <mauke> | :t void . ?wait |
| 20:25:36 | <lambdabot> | (Functor f, ?wait::a1 -> f a2) => a1 -> f () |
| 20:27:01 | <lxsameer> | mauke: what's that question mark? |
| 20:27:09 | → | weary-traveler joins (~user@user/user363627) |
| 20:28:57 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds) |
| 20:30:16 | <mauke> | implicit parameters |
| 20:30:28 | <mauke> | used here as a hack for type checking |
| 20:30:42 | <lxsameer> | ah got it, thank you |
| 20:31:15 | <mauke> | https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/implicit_parameters.html |
| 20:31:45 | <mauke> | :t \wait -> void . wait |
| 20:31:45 | <lambdabot> | Functor f => (a1 -> f a2) -> a1 -> f () |
| 20:31:57 | <mauke> | ^ mostly equivalent |
| 20:32:39 | <mauke> | but when you're asking the compiler to just make up some types, the result reads nicer with implicit params |
| 20:35:01 | × | lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 248 seconds) |
| 20:39:01 | <sprout> | > [0..5] |
| 20:39:03 | <lambdabot> | [0,1,2,3,4,5] |
| 20:40:04 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 20:44:42 | Adeon | is now known as Adeonhilla |
| 20:46:48 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds) |
| 20:47:25 | Adeonhilla | is now known as Adeon |
| 20:56:29 | → | sindu joins (~sindu@176.75.224.1) |
| 20:58:05 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 21:01:01 | × | voom quits (~voonij@163.123.195.138) (Remote host closed the connection) |
| 21:02:56 | → | philopsos joins (~caecilius@user/philopsos) |
| 21:03:25 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 21:04:04 | → | Guest77 joins (~Guest77@64.16.19.162) |
| 21:05:38 | × | OftenFaded quits (~OftenFade@user/tisktisk) (Quit: Client closed) |
| 21:06:35 | <Guest77> | Hey folks, I'm having an ambiguous occurence error in a codebase I inherited and I'm hoping someone can help out quickly |
| 21:08:14 | <Guest77> | The relevant line of code is here: `(Just x) -> minimum [(neck c), ((amount_msat::Channel->Msat) e), x]` |
| 21:09:20 | <Guest77> | `amount_msat` is causing an issue because Channel is imported from a library called Cln.Types, but this library also contains other records with an `amount_msat` field |
| 21:10:17 | → | OftenFaded joins (~OftenFade@user/tisktisk) |
| 21:10:30 | <Guest77> | I would think that ::Channel makes it unambiguous but I'm also not very experienced with Haskell. The library import is unqualified, i.e. `import Cln.Types` if that changes things |
| 21:10:53 | → | simendsj` joins (~simendsjo@84.211.91.108) |
| 21:11:34 | <mauke> | are you saying that Cln.Types exports multiple functions, all called amount_msat? |
| 21:11:48 | <mauke> | actually, what is the error message? |
| 21:11:51 | simendsjo | is now known as simendsjo_ |
| 21:11:56 | simendsj` | is now known as simendsjo |
| 21:12:03 | × | simendsjo quits (~simendsjo@84.211.91.108) (Client Quit) |
| 21:12:58 | → | simendsjo joins (~simendsjo@84.211.91.108) |
| 21:13:14 | <Guest77> | mauke: https://paste.tomsmeding.com/LYPd4zmE |
| 21:13:51 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 21:14:05 | <Guest77> | It exports multiple records with an `amount_msat` field. Not sure why `amount_msat::Channel` isn't enough |
| 21:17:39 | <mauke> | I don't think ghc uses type annotations to disambiguate identifiers |
| 21:18:21 | <mauke> | can you restrict the import? as in `import Cln.Types (Channel(..))`? |
| 21:18:34 | <Guest77> | I'll give it a shot! |
| 21:18:47 | → | ft joins (~ft@p508db9c7.dip0.t-ipconnect.de) |
| 21:19:02 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds) |
| 21:19:43 | <mauke> | otherwise you could probably rewrite as ... case e of Channel{ amount_msat } -> amount_msat |
| 21:19:57 | <mauke> | (assuming appropriate language extensions are enabled) |
| 21:20:44 | <Guest77> | Hmm, there are a couple of places where I'm running into the same problem with this codebase |
| 21:21:34 | <Guest77> | If there's a way I can resolve it without doing a big rewrite that might be more friendly but I'll see if this option works |
| 21:21:35 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 21:22:39 | → | ash3en joins (~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) |
| 21:23:28 | <Guest77> | for a bit more context, this is the case statement I'm addressing: https://paste.tomsmeding.com/ikKbq345 |
| 21:24:06 | <Guest77> | and to make sure that I'm tracking properly, I'm going to describe what I think this statement is doing |
| 21:24:42 | × | simendsjo quits (~simendsjo@84.211.91.108) (Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)) |
| 21:27:08 | simendsjo_ | is now known as simendsjo |
| 21:28:13 | <Guest77> | in the function definition, e is a Channel. Within the case statement, the function `htlc_maximum_msat` is applied to this Channel and the result is going to be a Maybe. If it's `Just x` then it returns `minimum` between `neck c`, `amount_msat` of the channel, or the x value. Otherwise, it returns the `min` (same as minimum?) of those first two |
| 21:28:14 | <Guest77> | values |
| 21:29:39 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 21:30:05 | <Guest77> | So I think that rewriting the case statement is basically a non-starter since it has to accomodate the Maybe of `htlc_maximum_msat` |
| 21:30:28 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 21:31:05 | <Guest77> | Is this something that could be resolved by changing the configuration I'm using in stack? |
| 21:33:55 | <Guest77> | Also: I just checked the type signatures of the functions. Does it make sense to change the `min (neck c) ((amount_msat) e)` to `minimum [(neck c), ((amount_msat) e)]` or is there a reason to use the different functions |
| 21:34:22 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 21:36:14 | <Guest77> | sorry if I'm being spammy, there's a lot of rust to shake off since I read "Learn You a Haskell" '=D |
| 21:36:24 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:36:27 | × | Typedfern quits (~Typedfern@192.red-83-37-43.dynamicip.rima-tde.net) (Remote host closed the connection) |
| 21:37:38 | × | euleritian quits (~euleritia@dynamic-176-006-132-219.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 21:37:55 | → | euleritian joins (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) |
| 21:38:10 | × | ash3en quits (~Thunderbi@ip1f10cbd6.dynamic.kabel-deutschland.de) (Quit: ash3en) |
| 21:40:55 | × | Smiles quits (uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 21:43:14 | → | Typedfern joins (~Typedfern@247.red-83-37-42.dynamicip.rima-tde.net) |
| 21:43:17 | × | tv quits (~tv@user/tv) (Read error: Connection reset by peer) |
| 21:45:27 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 21:45:48 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
| 21:46:53 | × | Typedfern quits (~Typedfern@247.red-83-37-42.dynamicip.rima-tde.net) (Remote host closed the connection) |
| 21:48:10 | → | Typedfern joins (~Typedfern@247.red-83-37-42.dynamicip.rima-tde.net) |
| 21:49:22 | → | typedfern_ joins (~Typedfern@83.37.42.247) |
| 21:50:29 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 21:52:51 | × | euleritian quits (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) (Ping timeout: 276 seconds) |
| 21:53:34 | <Guest77> | hey mauke do you have any input on the above? |
| 21:53:36 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 21:55:05 | <Guest77> | It seems like this is on the right track towards the problem I'm facing: https://pure-hack.com/posts/overloaded-labels-in-haskell/ |
| 22:01:13 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 22:04:44 | → | Smiles joins (uid551636@id-551636.lymington.irccloud.com) |
| 22:09:26 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds) |
| 22:12:16 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:14:04 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 22:14:30 | × | michalz quits (~michalz@185.246.207.222) (Remote host closed the connection) |
| 22:16:13 | <Guest77> | well. my brain hurts now.I appreciate the input, I'll sit with this one a while |
| 22:16:17 | × | Guest77 quits (~Guest77@64.16.19.162) (Quit: Client closed) |
| 22:17:06 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 22:18:44 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds) |
| 22:24:50 | → | alexherbo2 joins (~alexherbo@2a02-8440-3118-f7e7-7572-88f5-5565-7769.rev.sfr.net) |
| 22:27:15 | → | sonolin joins (~michael@174-26-31-216.phnx.qwest.net) |
| 22:29:18 | × | j1n37 quits (~j1n37@user/j1n37) (Read error: Connection reset by peer) |
| 22:29:50 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 22:30:10 | → | cyanteeth joins (~cyanteeth@user/cyanteeth) |
| 22:32:30 | → | j1n37 joins (~j1n37@user/j1n37) |
| 22:34:33 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 22:35:39 | × | cyanteeth quits (~cyanteeth@user/cyanteeth) (Ping timeout: 252 seconds) |
| 22:44:55 | → | falafel joins (~falafel@2603:8000:b4f0:62a0:2d1c:7dad:d29d:19e) |
| 22:45:38 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 22:47:43 | → | cyanteeth joins (~cyanteeth@user/cyanteeth) |
| 22:50:45 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 22:51:23 | × | cyanteeth quits (~cyanteeth@user/cyanteeth) (Remote host closed the connection) |
| 22:54:28 | → | cyanteeth joins (~cyanteeth@user/cyanteeth) |
| 22:55:05 | × | cyanteeth quits (~cyanteeth@user/cyanteeth) (Remote host closed the connection) |
| 22:55:35 | → | cyanteeth joins (~cyanteeth@user/cyanteeth) |
| 22:57:41 | × | sonolin quits (~michael@174-26-31-216.phnx.qwest.net) (Changing host) |
| 22:57:41 | → | sonolin joins (~michael@user/sonolin) |
| 22:58:37 | × | cyanteeth quits (~cyanteeth@user/cyanteeth) (Remote host closed the connection) |
| 23:01:10 | → | cyanteeth joins (~cyanteeth@user/cyanteeth) |
| 23:01:27 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 23:05:29 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 23:06:28 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 23:10:30 | × | cyanteeth quits (~cyanteeth@user/cyanteeth) (Ping timeout: 252 seconds) |
| 23:12:41 | → | poscat joins (~poscat@user/poscat) |
| 23:15:04 | × | falafel quits (~falafel@2603:8000:b4f0:62a0:2d1c:7dad:d29d:19e) (Ping timeout: 260 seconds) |
| 23:17:13 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 23:17:55 | × | poscat quits (~poscat@user/poscat) (Ping timeout: 265 seconds) |
| 23:23:46 | → | poscat joins (~poscat@user/poscat) |
| 23:24:12 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |
| 23:26:21 | × | poscat quits (~poscat@user/poscat) (Client Quit) |
| 23:32:07 | → | poscat joins (~poscat@user/poscat) |
| 23:35:17 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 23:39:59 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds) |
| 23:47:12 | → | aztex joins (~aztex@mob-194-230-148-208.cgn.sunrise.net) |
| 23:50:50 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 23:52:49 | → | Leary joins (~Leary@user/Leary/x-0910699) |
| 23:55:14 | × | weary-traveler quits (~user@user/user363627) (Remote host closed the connection) |
| 23:55:54 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 23:56:52 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
All times are in UTC on 2024-12-04.