Logs on 2021-10-18 (liberachat/#haskell)
| 00:02:11 | × | alx741 quits (~alx741@186.178.108.68) (Ping timeout: 264 seconds) |
| 00:03:40 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 00:08:31 | × | zebrag quits (~chris@user/zebrag) (Remote host closed the connection) |
| 00:08:48 | → | Kaiepi joins (~Kaiepi@156.34.44.192) |
| 00:10:39 | × | Kaiepi quits (~Kaiepi@156.34.44.192) (Read error: Connection reset by peer) |
| 00:10:56 | → | Kaiepi joins (~Kaiepi@156.34.44.192) |
| 00:11:53 | → | zebrag joins (~chris@user/zebrag) |
| 00:16:09 | → | alx741 joins (~alx741@186.178.108.68) |
| 00:16:25 | → | fluffyballoon joins (~user@131.93.208.196) |
| 00:17:06 | × | Kaiepi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection) |
| 00:17:26 | → | Kaiepi joins (~Kaiepi@156.34.44.192) |
| 00:20:04 | × | fernand quits (~fernand@179.156.35.4) (Ping timeout: 268 seconds) |
| 00:20:06 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 245 seconds) |
| 00:20:52 | × | Skyfire quits (~pyon@user/pyon) (Quit: WeeChat 3.3) |
| 00:26:06 | × | Kaiepi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection) |
| 00:26:27 | → | Kaiepi joins (~Kaiepi@156.34.44.192) |
| 00:27:47 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 00:27:48 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 00:27:48 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:31:00 | <tcard> | juhp: FYI: I am getting an nginx 504 Gateway Time-out when visiting www.stackage.org |
| 00:34:06 | <Guest3676> | how can I print Scientific as 1.2E+10 instead of 1.2e10 ? can pretty printing libraries handle things like this? |
| 00:34:20 | <Axman6> | does formatting support that? |
| 00:34:40 | <Axman6> | if not, I'm sure you could convince wrunt to add it... |
| 00:34:53 | × | hiruji` quits (~hiruji@2606:6080:1002:8:3285:30e:de43:8809) (Ping timeout: 264 seconds) |
| 00:35:20 | <Guest3676> | well I skimmed https://hackage.haskell.org/package/scientific-0.3.7.0/docs/Data-Scientific.html#g:8 |
| 00:35:35 | <Guest3676> | and no it's not very extensive |
| 00:35:41 | <Guest3676> | wrunt ? :o |
| 00:36:53 | <geekosaur> | sounds like you could build it with toDecimalDigits |
| 00:38:26 | → | hiruji joins (~hiruji@user/hiruji) |
| 00:39:43 | <Guest3676> | Axman6: no wait there is https://hackage.haskell.org/package/formatting-7.1.1/docs/Formatting-Formatters.html#v:sci |
| 00:40:01 | <Axman6> | not sur eI can see it in https://hackage.haskell.org/package/formatting-7.1.3/docs/Formatting-Formatters.html#g:2 but it definitely sounds like something that would fit into that library |
| 00:43:10 | × | renzhi quits (~xp@2607:fa49:6500:b100::5845) (Ping timeout: 260 seconds) |
| 00:44:14 | → | caef^ joins (~caef@70.166.66.234) |
| 00:44:41 | × | Kaiepi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection) |
| 00:44:45 | → | Kaipi joins (~Kaiepi@156.34.44.192) |
| 00:47:58 | × | Kaipi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection) |
| 00:48:07 | → | Kaipi joins (~Kaiepi@156.34.44.192) |
| 00:55:53 | → | renzhi joins (~xp@2607:fa49:6500:b100::6e7f) |
| 00:58:05 | ← | tektik parts (~said@68.33.69.0) (Leaving) |
| 01:01:29 | × | Kaipi quits (~Kaiepi@156.34.44.192) (Read error: Connection reset by peer) |
| 01:01:30 | → | Merfont joins (~Kaiepi@156.34.44.192) |
| 01:03:26 | → | Skyfire joins (~pyon@user/pyon) |
| 01:08:06 | → | jacks2 joins (~bc8165b6@217.29.117.252) |
| 01:08:11 | × | sprout quits (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Ping timeout: 264 seconds) |
| 01:08:15 | × | Merfont quits (~Kaiepi@156.34.44.192) (Read error: Connection reset by peer) |
| 01:08:18 | <jacks2> | hi. is there already a function like this? |
| 01:08:24 | <jacks2> | > foldr (<|>) Nothing [Nothing, Just 10, Just 20] |
| 01:08:26 | <lambdabot> | Just 10 |
| 01:08:28 | → | Merfont joins (~Kaiepi@156.34.44.192) |
| 01:09:26 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 01:09:47 | <davean> | msum |
| 01:09:56 | × | Guest3676 quits (~Guest36@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed) |
| 01:09:57 | <jacks2> | > msum Nothing [Nothing, Just 10, Just 20] |
| 01:09:59 | <lambdabot> | error: |
| 01:09:59 | <lambdabot> | • No instance for (MonadPlus ((->) [Maybe Integer])) |
| 01:09:59 | <lambdabot> | arising from a use of ‘msum’ |
| 01:10:02 | <jacks2> | > msum [Nothing, Just 10, Just 20] |
| 01:10:04 | <lambdabot> | Just 10 |
| 01:10:06 | <jacks2> | nice |
| 01:10:15 | <davean> | asum is more general |
| 01:10:20 | <jacks2> | :t asum |
| 01:10:22 | <lambdabot> | (Foldable t, Alternative f) => t (f a) -> f a |
| 01:10:38 | <davean> | For some reson I was thinking monadic there |
| 01:10:39 | <jacks2> | :t msum |
| 01:10:40 | <lambdabot> | (Foldable t, MonadPlus m) => t (m a) -> m a |
| 01:10:41 | <davean> | and its just asum |
| 01:10:50 | <jacks2> | which one is more general? |
| 01:11:00 | <davean> | asum |
| 01:11:08 | <jacks2> | okay |
| 01:11:20 | <davean> | They're the same code, just different constraints |
| 01:11:34 | <davean> | MonadPlus implies Alternative |
| 01:11:42 | × | zaquest quits (~notzaques@5.128.210.178) (Remote host closed the connection) |
| 01:11:42 | <jacks2> | yes I understand. a bit like liftA2 vs liftM? |
| 01:11:43 | <davean> | so theres no reason to have a Monad constraint |
| 01:11:48 | <davean> | yes |
| 01:12:45 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:13:01 | → | zaquest joins (~notzaques@5.128.210.178) |
| 01:13:51 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:13:52 | <jacks2> | unfortunately asum isn't in prelude, and msum is |
| 01:14:04 | × | gentauro quits (~gentauro@user/gentauro) (Ping timeout: 252 seconds) |
| 01:14:22 | <jacks2> | or maybe I imported msum somewhere |
| 01:14:29 | <davean> | Data.Foldable |
| 01:14:49 | <jacks2> | I know, but if msum is in prelude it is more convenient to use it than asum |
| 01:15:16 | <jacks2> | oh my mistake, msum isn't in prelude either |
| 01:15:22 | <davean> | You do you. Thats never how I'd pick functions but its not my code |
| 01:22:58 | × | neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 268 seconds) |
| 01:25:50 | → | gentauro joins (~gentauro@user/gentauro) |
| 01:28:10 | Axman6 | agrees with davean |
| 01:28:24 | → | abarbu joins (~user@c-66-31-23-28.hsd1.ma.comcast.net) |
| 01:28:54 | <Axman6> | jacks2: asum is exactly the function you werre asking for, msum happens to also do the same thing for Maybe, but in general MonadPlus and Alternative are not the same thing |
| 01:29:50 | <dsal> | I use asum for exception handling when I feel like a cowboy. |
| 01:29:50 | <jacks2> | Axman6, davean, you'd import additional header just to call asum, even though you get the same result, and even if the type difference didn't show up in your function signature? |
| 01:30:23 | × | xff0x quits (~xff0x@2001:1a81:52c3:e900:6f99:de0e:9a06:26db) (Ping timeout: 264 seconds) |
| 01:30:26 | <dsal> | jacks2: I import `fold` when `concat` would work because I don't like `concat` |
| 01:31:12 | → | xff0x joins (~xff0x@2001:1a81:52c3:e900:c99c:9c9c:56dc:ad93) |
| 01:31:14 | <dsal> | Yeah, I'm using asum in a bunch of projects, but not msum. |
| 01:31:30 | <jacks2> | what's the advantage? there's disadvantage, additional import, and cryptic error message if you get something wrong |
| 01:32:20 | <dsal> | I carry fewer abstractions in my head and apply them to more things. |
| 01:32:38 | <davean> | jacks2: absolutely I'd import it |
| 01:33:16 | <abarbu> | In nix, how do I provide additional build inputs to haskell-nix.stackProject? It errors our if I provide buildInputs = [..] |
| 01:33:55 | <dsal> | abarbu: In stack.yaml, it's just : `nix: packages: [zlib]` (since I can't write any code that doesn't use zlib) |
| 01:34:28 | × | fluffyballoon quits (~user@131.93.208.196) (Remote host closed the connection) |
| 01:35:41 | <abarbu> | dsal: That would be awesome! Except that you can't specify packages if you specify a custom shell.nix :( |
| 01:42:18 | × | Merfont quits (~Kaiepi@156.34.44.192) (Remote host closed the connection) |
| 01:43:03 | → | Kaiepi joins (~Kaiepi@156.34.44.192) |
| 01:43:09 | → | sprout joins (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) |
| 01:47:42 | × | fryguybob quits (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com) (Remote host closed the connection) |
| 01:48:15 | × | sprout quits (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Ping timeout: 268 seconds) |
| 01:50:47 | × | jespada quits (~jespada@2803:9800:9842:7a62:a1db:843b:ed19:cad6) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 01:51:39 | → | jespada joins (~jespada@2803:9800:9842:7a62:a1db:843b:ed19:cad6) |
| 01:57:34 | × | xff0x quits (~xff0x@2001:1a81:52c3:e900:c99c:9c9c:56dc:ad93) (Ping timeout: 252 seconds) |
| 01:57:59 | × | emf quits (~emf@2620:10d:c090:400::5:35f6) (Ping timeout: 264 seconds) |
| 01:59:06 | × | Kaiepi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection) |
| 01:59:22 | → | xff0x joins (~xff0x@2001:1a81:52fe:af00:73f9:c60:e593:d5a0) |
| 01:59:26 | → | Kaiepi joins (~Kaiepi@156.34.44.192) |
| 01:59:42 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 02:00:13 | × | wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Remote host closed the connection) |
| 02:00:25 | → | sprout joins (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) |
| 02:00:36 | → | wyrd joins (~wyrd@gateway/tor-sasl/wyrd) |
| 02:01:02 | × | alx741 quits (~alx741@186.178.108.68) (Quit: alx741) |
| 02:02:48 | → | kupi joins (uid212005@id-212005.hampstead.irccloud.com) |
| 02:04:42 | × | lemonsnicks quits (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Quit: ZNC 1.8.2 - https://znc.in) |
| 02:05:11 | × | sprout quits (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Ping timeout: 264 seconds) |
| 02:05:43 | <dsal> | abarbu: Oh, I've got some with a custom shell.nix as well, but I don't do that as often. |
| 02:10:01 | <dsal> | I don't know nix that well, though, so I'm not entirely sure we're speaking the same language. I've got a project with `pkgs.haskell.lib.buildStackProject` which has a `buildInputs` section that look pretty normal. |
| 02:10:40 | → | [_] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 02:11:30 | <abarbu> | dsal: Ah, that uses the nixpkgs infrastructure. I'm using haskell.nix the other setup. There you do nixpkgs.haskell-nix.stackProject instead |
| 02:12:06 | <dsal> | Ah. I use haskell.nix in most of mine, but not via nix shell. So many options. |
| 02:12:14 | <abarbu> | Too many! |
| 02:13:34 | <dsal> | I'm on an M1 mac, so I also have two different processors. lts-18.13 has a slightly older version of `network` which doesn't build natively on my machine. stack seems to use its own architecture to determine what architecture to build for (which kind of makes sense). |
| 02:13:35 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 264 seconds) |
| 02:15:23 | × | jespada quits (~jespada@2803:9800:9842:7a62:a1db:843b:ed19:cad6) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:15:51 | → | lemonsnicks joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) |
| 02:17:13 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
| 02:24:02 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 02:24:02 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 02:24:02 | → | wroathe joins (~wroathe@user/wroathe) |
| 02:27:24 | × | brainfreeze quits (~brainfree@2a03:1b20:4:f011::20d) (Quit: Leaving) |
| 02:32:28 | → | sprout joins (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) |
| 02:33:10 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 02:33:42 | × | Kaiepi quits (~Kaiepi@156.34.44.192) (Read error: Connection reset by peer) |
| 02:33:50 | → | Kaipi joins (~Kaiepi@156.34.44.192) |
| 02:36:48 | × | Kaipi quits (~Kaiepi@156.34.44.192) (Read error: Connection reset by peer) |
| 02:36:55 | × | sprout quits (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Ping timeout: 260 seconds) |
| 02:37:06 | → | Kaiepi joins (~Kaiepi@156.34.44.192) |
| 02:39:26 | <Axman6> | jacks2: yes, I would. Control.Applicative is in base so it's always available - Prelude is just one, slightly special module in base |
| 02:41:26 | <Axman6> | jacks2: I don't understand your comment about "cryptic error messages", why would they be any different to the ones you get when importing msum and using? |
| 02:42:27 | <Axman6> | limiting yourself to what's available in relude is going to lead to very painful and/or boring programs. Wait until you hear about libraries :\ |
| 02:45:23 | × | td_ quits (~td@94.134.91.73) (Ping timeout: 264 seconds) |
| 02:45:59 | × | cheater quits (~Username@user/cheater) (Ping timeout: 264 seconds) |
| 02:45:59 | → | cheater1__ joins (~Username@user/cheater) |
| 02:46:03 | cheater1__ | is now known as cheater |
| 02:46:59 | → | td_ joins (~td@muedsl-82-207-238-233.citykom.de) |
| 02:48:10 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 252 seconds) |
| 02:49:07 | × | xlei quits (akans@pool-68-129-84-118.nycmny.fios.verizon.net) (Ping timeout: 265 seconds) |
| 02:49:15 | → | jax2 joins (~user@47.149.122.76) |
| 02:49:28 | ← | jax2 parts (~user@47.149.122.76) (ERC (IRC client for Emacs 27.1)) |
| 02:49:53 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:50:47 | × | shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 264 seconds) |
| 02:52:14 | <jacks2> | Axman6 I was talking about concat vs fold |
| 02:53:09 | <jacks2> | no need to patronize me. I know about libraries. I just don't see the point in importing a module just to use a more generic library, when I don't need it |
| 02:55:40 | <davean> | jacks2: its that its the right one. |
| 02:55:59 | <davean> | You realize soon that theres probably not a reason for that function to be Maybe and its actually a hinderance that it is, etc |
| 02:56:26 | <davean> | use the right function - it makes the rest of your life better |
| 02:56:44 | <davean> | its not about how generic it is, its about how correct it is |
| 02:57:16 | <jacks2> | > fold [[1,2,3],[4,5,6]] |
| 02:57:18 | <lambdabot> | [1,2,3,4,5,6] |
| 02:57:20 | <jacks2> | > concat [[1,2,3],[4,5,6]] |
| 02:57:21 | <lambdabot> | [1,2,3,4,5,6] |
| 02:57:27 | <jacks2> | which one is more correct? |
| 02:59:57 | <jacks2> | even ignoring the additional line of using import.. say map vs fmap. no reason to use fmap when dealing with lists. additional overhead on the person reading and modifying the code |
| 03:00:31 | <jacks2> | or using >>= instead of concatMap, as I've seen some people do |
| 03:04:27 | → | segfaultfizzbuzz joins (~segfaultf@135-180-0-138.static.sonic.net) |
| 03:04:40 | × | peterhil quits (~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi) (Ping timeout: 252 seconds) |
| 03:05:12 | → | stengah joins (~stengah@user/stengah) |
| 03:05:36 | <xsperry> | fold can do things concat can't. say: |
| 03:05:37 | → | xlei joins (znc@pool-68-129-84-118.nycmny.fios.verizon.net) |
| 03:05:40 | <xsperry> | > fold [Just "foo", Just "bar"] |
| 03:05:41 | <lambdabot> | Just "foobar" |
| 03:07:14 | → | sprout joins (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) |
| 03:08:26 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 245 seconds) |
| 03:09:27 | → | Kaipi joins (~Kaiepi@156.34.44.192) |
| 03:09:27 | × | Kaiepi quits (~Kaiepi@156.34.44.192) (Read error: Connection reset by peer) |
| 03:12:23 | × | sprout quits (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Ping timeout: 264 seconds) |
| 03:16:06 | × | Kaipi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection) |
| 03:18:23 | × | segfaultfizzbuzz quits (~segfaultf@135-180-0-138.static.sonic.net) (Ping timeout: 264 seconds) |
| 03:26:51 | <dsal> | jacks2: I've heard the argument before about using the least generic thing possible in all cases. You might get a better error message sometimes when refactoring or you might avoid the need to change anything at all when refactoring. |
| 03:28:11 | <dsal> | concatMap is another thing I've used in the past, but wouldn't use again. It's just easier for me to think about monoids in general and then realize that list is one rather than to try to think of all the special things I can do with lists. |
| 03:28:49 | × | ikex quits (~ash@user/ikex) (Ping timeout: 252 seconds) |
| 03:29:00 | → | ikex1 joins (~ash@user/ikex) |
| 03:29:39 | ikex1 | is now known as ikex |
| 03:31:05 | × | [_] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 03:31:18 | <dsal> | I work with someone who's kind of my opposite in that regard. I used `fold` in a function and he pointed out it's just `concat` because I'm currently using a list and just doing a [[a]] -> [a] sort of thing, so I shouldn't use `fold`. He's got some fear that some refactoring will make future code type check, but do the wrong thing and it'll introduce a bug. |
| 03:31:37 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
| 03:31:46 | × | stengah quits (~stengah@user/stengah) (Ping timeout: 245 seconds) |
| 03:32:03 | × | caef^ quits (~caef@70.166.66.234) (Remote host closed the connection) |
| 03:32:54 | <dsal> | e.g., xsperry's case... kind of. Except that wouldn't typecheck. I have a difficult time sympathizing with that sentiment. Too many things to know. |
| 03:34:46 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 03:34:46 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 03:34:46 | → | wroathe joins (~wroathe@user/wroathe) |
| 03:35:53 | <awpr> | I kind of like using monomorphic functions when the context is monomorphic. seeing e.g. `IM.map` immediately tells the reader the thing is an `IntMap`, which otherwise might only be determined some lines away because something used `IM.lookup` on it |
| 03:37:43 | <awpr> | but that only applies where the context is already monomorphic; if the entire surrounding thing can be meaningfully generalized, I say generalize it |
| 03:39:41 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 245 seconds) |
| 03:40:28 | <awpr> | this also doesn't apply to "more restrictive" or "less restrictive" typeclass constraints like in asum vs. msum: neither of those is more informative to the type checker, they just ask the context for different constraints. in that case, I'd just always use `asum |
| 03:41:41 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 03:41:41 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 03:41:41 | → | wroathe joins (~wroathe@user/wroathe) |
| 03:43:45 | → | sprout joins (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) |
| 03:48:40 | × | sprout quits (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Ping timeout: 252 seconds) |
| 03:54:16 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 245 seconds) |
| 03:59:54 | → | kronicmage joins (user3131@neotame.csclub.uwaterloo.ca) |
| 04:00:06 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 245 seconds) |
| 04:03:23 | × | xlei quits (znc@pool-68-129-84-118.nycmny.fios.verizon.net) (Ping timeout: 264 seconds) |
| 04:05:11 | → | xlei joins (znc@pool-68-129-84-118.nycmny.fios.verizon.net) |
| 04:07:51 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 04:07:51 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 04:07:51 | → | wroathe joins (~wroathe@user/wroathe) |
| 04:12:59 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 264 seconds) |
| 04:13:26 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 04:14:46 | → | lavaman joins (~lavaman@98.38.249.169) |
| 04:17:23 | → | coot joins (~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) |
| 04:18:14 | <dsal> | It's interesting seeing arguments the other way around. There are some folks here who feel strongly that you should use `map` and `return` and stuff. |
| 04:18:15 | <abarbu> | Is there any way to use haskell.nix with stack nightlies without having to rebuild GHC and everything else from scratch? |
| 04:18:44 | <dsal> | cachix. :/ |
| 04:19:47 | <abarbu> | I think I have cachix set up correctly because it works for lts releases. But it doesn't seem to find anything for nightlies? |
| 04:19:48 | → | sprout joins (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) |
| 04:20:11 | <dsal> | Well, *someone* has to do that build. |
| 04:21:14 | <abarbu> | Sure, but when I use stack I don't need to rebuild GHC from scratch every time. There's no way around that? |
| 04:21:22 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 04:21:36 | → | lavaman joins (~lavaman@98.38.249.169) |
| 04:21:44 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 04:22:34 | × | kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 04:24:42 | × | zebrag quits (~chris@user/zebrag) (Remote host closed the connection) |
| 04:24:59 | × | sprout quits (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Ping timeout: 264 seconds) |
| 04:25:31 | <dsal> | Not really. Nix hashes are kind of easy to invalidate. I gave up on nightlies a while back anyway. They just started giving me things to worry about. |
| 04:27:54 | × | hgolden quits (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Remote host closed the connection) |
| 04:28:43 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 04:28:44 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 04:28:44 | → | wroathe joins (~wroathe@user/wroathe) |
| 04:29:29 | → | hgolden joins (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) |
| 04:30:07 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 04:30:37 | × | lieven quits (~mal@ns2.wyrd.be) (*.net *.split) |
| 04:30:37 | × | mcglk quits (~mcglk@131.191.49.120) (*.net *.split) |
| 04:30:37 | × | noctux quits (~noctux@user/noctux) (*.net *.split) |
| 04:30:37 | × | tput quits (~tim@S0106a84e3fe54613.ed.shawcable.net) (*.net *.split) |
| 04:30:37 | × | riatre_ quits (~quassel@2001:310:6000:f::5198:1) (*.net *.split) |
| 04:30:37 | × | cawfee quits (~root@2406:3003:2077:2758::babe) (*.net *.split) |
| 04:30:37 | × | ent- quits (entgod@kapsi.fi) (*.net *.split) |
| 04:30:37 | × | meejah quits (~meejah@rutas.meejah.ca) (*.net *.split) |
| 04:30:37 | × | andjjj23 quits (~irc@107.170.228.47) (*.net *.split) |
| 04:30:37 | × | achapman quits (~ajc@vmx14030.hosting24.com.au) (*.net *.split) |
| 04:30:37 | × | tlax_ quits (tlax@kapsi.fi) (*.net *.split) |
| 04:30:37 | × | koz quits (~koz@2404:4408:430f:a900:ca69:658c:ba89:aa9f) (*.net *.split) |
| 04:30:37 | × | thaumavorio_ quits (~thaumavor@thaumavor.io) (*.net *.split) |
| 04:30:37 | × | aweinstock quits (~aweinstoc@cpe-67-248-65-250.nycap.res.rr.com) (*.net *.split) |
| 04:30:37 | × | sweater quits (~sweater@206.81.18.26) (*.net *.split) |
| 04:30:37 | × | eL_Bart0 quits (eL_Bart0@dietunichtguten.org) (*.net *.split) |
| 04:30:37 | × | c_wraith quits (~c_wraith@adjoint.us) (*.net *.split) |
| 04:30:37 | × | eco quits (~ubuntu@ec2-54-201-230-197.us-west-2.compute.amazonaws.com) (*.net *.split) |
| 04:30:37 | × | LambdaDuck quits (~anka@ksit.fixme.fi) (*.net *.split) |
| 04:30:37 | × | Sqaure quits (~a@178.62.91.8) (*.net *.split) |
| 04:30:37 | × | dminuoso quits (~dminuoso@user/dminuoso) (*.net *.split) |
| 04:30:37 | × | tolt quits (~weechat-h@li219-154.members.linode.com) (*.net *.split) |
| 04:30:37 | × | a1paca quits (~a1paca@user/a1paca) (*.net *.split) |
| 04:30:37 | × | jamestmartin quits (james@jtmar.me) (*.net *.split) |
| 04:30:45 | → | riatre joins (~quassel@2001:310:6000:f::5198:1) |
| 04:30:45 | → | LambdaDuck joins (~anka@ksit.fixme.fi) |
| 04:30:45 | → | ent joins (entgod@kapsi.fi) |
| 04:30:47 | → | jamestmartin joins (james@jtmar.me) |
| 04:30:48 | → | noctux joins (~noctux@user/noctux) |
| 04:30:48 | → | meejah joins (~meejah@rutas.meejah.ca) |
| 04:30:50 | → | aweinstock joins (~aweinstoc@cpe-67-248-65-250.nycap.res.rr.com) |
| 04:30:50 | → | eL_Bart0 joins (eL_Bart0@dietunichtguten.org) |
| 04:30:51 | → | c_wraith joins (~c_wraith@adjoint.us) |
| 04:30:52 | → | tlax joins (tlax@kapsi.fi) |
| 04:30:54 | → | cawfee joins (~root@2406:3003:2077:2758::babe) |
| 04:30:55 | → | eco joins (~ubuntu@ec2-54-201-230-197.us-west-2.compute.amazonaws.com) |
| 04:30:56 | → | koz joins (~koz@2404:4408:430f:a900:ca69:658c:ba89:aa9f) |
| 04:31:00 | → | achapman joins (~ajc@vmx14030.hosting24.com.au) |
| 04:31:01 | → | tput joins (~tim@S0106a84e3fe54613.ed.shawcable.net) |
| 04:31:09 | → | lieven joins (~mal@ns2.wyrd.be) |
| 04:31:34 | → | andjjj23 joins (~irc@107.170.228.47) |
| 04:31:37 | → | thaumavorio joins (~thaumavor@thaumavor.io) |
| 04:31:39 | → | sweater joins (~sweater@206.81.18.26) |
| 04:31:54 | → | dminuoso joins (~dminuoso@user/dminuoso) |
| 04:31:54 | → | mcglk joins (~mcglk@131.191.49.120) |
| 04:32:20 | → | tolt joins (~weechat-h@li219-154.members.linode.com) |
| 04:32:29 | → | a1paca joins (~a1paca@user/a1paca) |
| 04:32:59 | × | hgolden quits (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Remote host closed the connection) |
| 04:33:23 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds) |
| 04:33:31 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
| 04:35:04 | × | aegon quits (~mike@174.127.249.180) (Remote host closed the connection) |
| 04:35:59 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 268 seconds) |
| 04:40:06 | × | _xor quits (~xor@72.49.199.147) (Read error: Connection reset by peer) |
| 04:40:34 | → | _xor joins (~xor@72.49.199.147) |
| 04:42:05 | → | hgolden joins (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) |
| 04:48:36 | → | sprout joins (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) |
| 04:52:15 | → | lavaman joins (~lavaman@98.38.249.169) |
| 04:52:39 | × | cjb quits (~cjb@user/cjb) () |
| 04:56:21 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds) |
| 05:04:35 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 05:08:00 | → | peterhil joins (~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi) |
| 05:12:27 | × | notzmv quits (~zmv@user/notzmv) (Remote host closed the connection) |
| 05:13:25 | <juhp> | TIL I learnt one can write say: id id 1 |
| 05:14:00 | → | notzmv joins (~zmv@user/notzmv) |
| 05:15:42 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
| 05:15:51 | <juhp> | I assume this is well-known presumably, but under what condition can one just write f g x ? |
| 05:17:14 | → | nehsou^ joins (~nehsou@70.166.66.234) |
| 05:18:04 | <juhp> | f g x = (f g) x, I think? |
| 05:20:19 | <c_wraith> | That's just how haskell works. |
| 05:20:19 | <juhp> | I suppose that probably answers my question... |
| 05:20:43 | <c_wraith> | as long as none of the symbols are infix operators, that's how function application associates |
| 05:20:54 | <c_wraith> | or rather, how function application groups |
| 05:21:21 | × | zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 245 seconds) |
| 05:21:22 | × | notzmv quits (~zmv@user/notzmv) (Read error: Connection reset by peer) |
| 05:22:01 | <juhp> | Ya, thanks - I understood what hlint suggested now (actually for a lambda onto a function), but didn't seem very obvious to me |
| 05:22:30 | <awpr> | it's the same situation as `div 5 2`, just that the "first argument" happens to be a function, too |
| 05:23:19 | <awpr> | with `id` it just gets a bit more opaque because its type doesn't immediately look like it should be a function (but it can be, when applied to a function) |
| 05:23:37 | <juhp> | Right |
| 05:24:17 | → | lavaman joins (~lavaman@98.38.249.169) |
| 05:24:28 | → | notzmv joins (~zmv@user/notzmv) |
| 05:25:04 | <juhp> | I don't see f g x that often, but maybe I haven't read enough code |
| 05:26:02 | <awpr> | `map g [0..10]` is an instance of that, `g <$> anything` is the same but with `f` as an infix operator |
| 05:26:13 | <awpr> | s/the same/also/ |
| 05:26:18 | <juhp> | juhp: Well that's probably not true, but hope you know what i mean |
| 05:26:30 | <juhp> | Indeed |
| 05:27:10 | <juhp> | Maybe I meant with f being a lambda expression, anyway thank you! |
| 05:27:33 | → | Kaiepi joins (~Kaiepi@156.34.44.192) |
| 05:28:52 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 258 seconds) |
| 05:31:56 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:33:56 | <kronicmage> | re: id being a function, you can parse `id id 1` by remembering that `($)` is just a specialized `id`. so `id id 1` is equivalent to `id $ 1` |
| 05:41:49 | <Axman6> | :t maybe (pure Nothing) |
| 05:41:50 | <lambdabot> | Applicative f => (a1 -> f (Maybe a2)) -> Maybe a1 -> f (Maybe a2) |
| 05:44:05 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 265 seconds) |
| 05:46:37 | <juhp> | kronicmage: cool |
| 05:46:40 | → | stengah joins (~stengah@user/stengah) |
| 05:49:16 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 05:51:56 | <juhp> | the actual code was this btw: (\ (P p)-> p) parseContents cs |
| 05:52:27 | <c_wraith> | I'd probably write an accessor for that |
| 05:52:50 | <juhp> | Nod, it is not my original code :) |
| 05:54:55 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 05:55:55 | → | DNH joins (~DNH@2a02:8108:1100:16d8:10fc:32:f4d5:679f) |
| 05:58:58 | <juhp> | Okay I see P is from polyparse... |
| 06:00:18 | × | DNH quits (~DNH@2a02:8108:1100:16d8:10fc:32:f4d5:679f) (Ping timeout: 258 seconds) |
| 06:03:55 | × | xlei quits (znc@pool-68-129-84-118.nycmny.fios.verizon.net) (Ping timeout: 265 seconds) |
| 06:04:52 | × | MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 06:05:26 | → | MQ-17J joins (~MQ-17J@8.6.144.138) |
| 06:06:50 | → | fendor joins (~fendor@91.141.32.95.wireless.dyn.drei.com) |
| 06:08:53 | → | bhrgunatha joins (~bhrgunath@2001-b011-8011-07bb-75d1-4d38-03de-4a6b.dynamic-ip6.hinet.net) |
| 06:10:31 | × | bhrgunatha quits (~bhrgunath@2001-b011-8011-07bb-75d1-4d38-03de-4a6b.dynamic-ip6.hinet.net) (Client Quit) |
| 06:18:02 | × | hgolden quits (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Remote host closed the connection) |
| 06:19:43 | → | hgolden joins (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) |
| 06:24:35 | → | falafel joins (~falafel@2603-8000-d800-688c-c469-52c4-b20d-779e.res6.spectrum.com) |
| 06:25:55 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:a0c2:d1aa:a892:e67) |
| 06:30:11 | → | michalz joins (~michalz@185.246.204.87) |
| 06:34:14 | × | coot quits (~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 06:38:17 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 06:44:11 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 06:48:15 | → | coot joins (~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) |
| 06:48:50 | × | peterhil quits (~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi) (Ping timeout: 260 seconds) |
| 06:55:41 | → | Square joins (~a@178.62.91.8) |
| 06:57:57 | → | ubert joins (~Thunderbi@77.119.216.214.wireless.dyn.drei.com) |
| 06:58:35 | × | stengah quits (~stengah@user/stengah) (Ping timeout: 264 seconds) |
| 07:00:16 | → | stengah joins (~stengah@user/stengah) |
| 07:00:31 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 07:01:11 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 07:05:30 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 07:07:06 | × | Kaiepi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection) |
| 07:07:26 | → | jgeerds joins (~jgeerds@55d4da80.access.ecotel.net) |
| 07:07:26 | → | Kaiepi joins (~Kaiepi@156.34.44.192) |
| 07:12:54 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 07:13:26 | × | falafel quits (~falafel@2603-8000-d800-688c-c469-52c4-b20d-779e.res6.spectrum.com) (Ping timeout: 245 seconds) |
| 07:18:59 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 07:19:05 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
| 07:19:45 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 07:24:59 | × | stengah quits (~stengah@user/stengah) (Ping timeout: 264 seconds) |
| 07:31:57 | kosmikus_ | is now known as kosmikus |
| 07:32:55 | → | nsilv joins (~NSilv@host-87-15-180-17.retail.telecomitalia.it) |
| 07:34:22 | → | kosmikus[m] joins (~andresloe@2001:470:69fc:105::95d) |
| 07:35:31 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 07:36:29 | → | jumper149 joins (~jumper149@80.240.31.34) |
| 07:40:44 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 07:44:16 | → | chele joins (~chele@user/chele) |
| 07:52:08 | → | Pickchea joins (~private@user/pickchea) |
| 07:53:20 | → | Inst joins (~delicacie@2601:6c4:4080:3f80:f94e:aef:95ac:8647) |
| 07:56:20 | → | max22- joins (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
| 08:00:39 | × | jacks2 quits (~bc8165b6@217.29.117.252) (Quit: http://www.okay.uz/ (Session timeout)) |
| 08:01:57 | → | aplainze1akind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 08:02:12 | → | eggplant_ joins (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) |
| 08:03:03 | → | darkstarx joins (~darkstard@2601:1c2:300:c8a0::6c32) |
| 08:03:18 | × | darkstardevx quits (~darkstard@2601:1c2:300:c8a0::6c32) (Remote host closed the connection) |
| 08:03:26 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 245 seconds) |
| 08:03:26 | × | sclv quits (sid39734@haskell/developer/sclv) (Ping timeout: 245 seconds) |
| 08:03:26 | × | FragByte quits (~christian@user/fragbyte) (Ping timeout: 245 seconds) |
| 08:03:26 | × | grfn quits (sid449115@helmsley.irccloud.com) (Ping timeout: 245 seconds) |
| 08:03:26 | × | edmundnoble quits (sid229620@helmsley.irccloud.com) (Ping timeout: 245 seconds) |
| 08:03:26 | × | tritlo quits (sid58727@user/tritlo) (Ping timeout: 245 seconds) |
| 08:03:26 | × | astra` quits (sid289983@user/amish) (Ping timeout: 245 seconds) |
| 08:03:39 | → | edmundnoble joins (sid229620@id-229620.helmsley.irccloud.com) |
| 08:03:41 | → | sclv joins (sid39734@haskell/developer/sclv) |
| 08:03:51 | × | dmj` quits (sid72307@hampstead.irccloud.com) (Ping timeout: 245 seconds) |
| 08:03:51 | × | SanchayanMaity quits (sid478177@hampstead.irccloud.com) (Ping timeout: 245 seconds) |
| 08:03:51 | × | Boarders quits (sid425905@lymington.irccloud.com) (Ping timeout: 245 seconds) |
| 08:03:51 | × | elvishjerricco quits (sid237756@helmsley.irccloud.com) (Ping timeout: 245 seconds) |
| 08:03:51 | × | ehamberg quits (sid18208@hampstead.irccloud.com) (Ping timeout: 245 seconds) |
| 08:03:51 | × | etrepum quits (sid763@uxbridge.irccloud.com) (Ping timeout: 245 seconds) |
| 08:03:51 | → | tritlo joins (sid58727@user/tritlo) |
| 08:03:51 | → | astra` joins (sid289983@user/amish) |
| 08:03:53 | → | grfn joins (sid449115@id-449115.helmsley.irccloud.com) |
| 08:04:10 | × | jgeerds quits (~jgeerds@55d4da80.access.ecotel.net) (Ping timeout: 260 seconds) |
| 08:04:12 | → | etrepum joins (sid763@id-763.uxbridge.irccloud.com) |
| 08:04:15 | → | SanchayanMaity joins (sid478177@id-478177.hampstead.irccloud.com) |
| 08:04:15 | → | ehamberg joins (sid18208@id-18208.hampstead.irccloud.com) |
| 08:04:16 | → | elvishjerricco joins (sid237756@id-237756.helmsley.irccloud.com) |
| 08:04:17 | → | Boarders joins (sid425905@id-425905.lymington.irccloud.com) |
| 08:04:17 | → | FragByte joins (~christian@user/fragbyte) |
| 08:04:20 | → | dmj` joins (sid72307@id-72307.hampstead.irccloud.com) |
| 08:04:41 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Ping timeout: 245 seconds) |
| 08:05:31 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Ping timeout: 245 seconds) |
| 08:05:50 | → | hendursa1 joins (~weechat@user/hendursaga) |
| 08:06:08 | → | notzmv joins (~zmv@user/notzmv) |
| 08:09:21 | × | hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds) |
| 08:14:32 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 08:15:15 | → | acidjnk_new joins (~acidjnk@p200300d0c703cb80b093ae7a86818c94.dip0.t-ipconnect.de) |
| 08:17:24 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 08:17:46 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 08:18:36 | → | ubert1 joins (~Thunderbi@178.115.62.230.wireless.dyn.drei.com) |
| 08:20:11 | × | ubert quits (~Thunderbi@77.119.216.214.wireless.dyn.drei.com) (Ping timeout: 264 seconds) |
| 08:27:11 | → | cfricke joins (~cfricke@user/cfricke) |
| 08:28:39 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 08:31:23 | × | cfricke quits (~cfricke@user/cfricke) (Client Quit) |
| 08:31:32 | → | cfricke joins (~cfricke@user/cfricke) |
| 08:31:59 | × | hnOsmium0001 quits (uid453710@id-453710.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 08:35:09 | × | nsilv quits (~NSilv@host-87-15-180-17.retail.telecomitalia.it) (Quit: #nix) |
| 08:35:27 | → | nsilv joins (~NSilv@host-87-15-180-17.retail.telecomitalia.it) |
| 08:36:18 | × | shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit) |
| 08:36:47 | <carbolymer> | how can I enable colours in stack through ghcid? `ghcid --color=always` does not seem to make any difference |
| 08:37:13 | → | werneta_ joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 08:37:18 | × | wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds) |
| 08:37:48 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Read error: Connection reset by peer) |
| 08:42:00 | → | wyrd joins (~wyrd@gateway/tor-sasl/wyrd) |
| 08:47:27 | → | CiaoSen joins (~Jura@p200300c95730dd002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 08:51:18 | → | DNH joins (~DNH@2a02:8108:1100:16d8:4434:a728:da46:b4e9) |
| 08:51:19 | → | o1lo01ol1o joins (~o1lo01ol1@2001:8a0:6d7a:df01:dde2:6c49:6076:e5ad) |
| 08:52:32 | <unit73e> | carbolymer, you mean, terminal color output? |
| 08:53:23 | <unit73e> | https://docs.haskellstack.org/en/stable/yaml_configuration/#color |
| 08:53:47 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 264 seconds) |
| 08:56:03 | <unit73e> | you can have that in your global config btw: $HOME/.stack/config |
| 08:56:10 | <unit73e> | I've been using cabal more lately though |
| 08:58:30 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:00:58 | kmein_ | is now known as kmein |
| 09:02:42 | <carbolymer> | unit73e: thanks, although stack shows colour output without any problems for me |
| 09:03:09 | <carbolymer> | I've added: |
| 09:03:09 | <carbolymer> | :set -fwarn-unused-binds -fwarn-unused-imports -ferror-spans -fdiagnostics-color=always |
| 09:03:09 | <carbolymer> | to ~/.ghci , and it works |
| 09:03:26 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 09:03:28 | <unit73e> | I see. you wanted ghci |
| 09:03:44 | <unit73e> | well glad you figured it out |
| 09:03:48 | <carbolymer> | well... it's ghc from stack from ghcid ;] |
| 09:03:52 | <carbolymer> | ghci* |
| 09:05:49 | → | kuribas joins (~user@188.188.202.68) |
| 09:21:11 | → | lavaman joins (~lavaman@98.38.249.169) |
| 09:21:15 | → | __monty__ joins (~toonn@user/toonn) |
| 09:26:11 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 264 seconds) |
| 09:28:46 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 09:30:18 | × | coot quits (~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 09:32:49 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:35:33 | × | bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 09:38:54 | → | neurocyte0132889 joins (~neurocyte@46.243.83.114) |
| 09:38:54 | × | neurocyte0132889 quits (~neurocyte@46.243.83.114) (Changing host) |
| 09:38:54 | → | neurocyte0132889 joins (~neurocyte@user/neurocyte) |
| 09:45:26 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 09:53:00 | → | Kaipi joins (~Kaiepi@156.34.44.192) |
| 09:53:10 | × | Kaiepi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection) |
| 09:57:09 | × | neurocyte0132889 quits (~neurocyte@user/neurocyte) (Read error: Connection reset by peer) |
| 09:57:54 | → | neurocyte0132889 joins (~neurocyte@46.243.83.114) |
| 09:57:54 | × | neurocyte0132889 quits (~neurocyte@46.243.83.114) (Changing host) |
| 09:57:54 | → | neurocyte0132889 joins (~neurocyte@user/neurocyte) |
| 09:59:38 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 09:59:43 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Client Quit) |
| 10:00:51 | → | coot joins (~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) |
| 10:01:02 | × | nsilv quits (~NSilv@host-87-15-180-17.retail.telecomitalia.it) (Ping timeout: 258 seconds) |
| 10:01:25 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 10:04:52 | × | Kaipi quits (~Kaiepi@156.34.44.192) (Ping timeout: 258 seconds) |
| 10:06:41 | × | kuribas quits (~user@188.188.202.68) (Remote host closed the connection) |
| 10:07:10 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 10:07:19 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:07:56 | × | CiaoSen quits (~Jura@p200300c95730dd002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 10:08:56 | → | Kaiepi joins (~Kaiepi@156.34.44.192) |
| 10:10:44 | → | timCF joins (~timCF@200-149-20-81.sta.estpak.ee) |
| 10:12:40 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 10:13:39 | <timCF> | Hello! I have a question about `Async` library. Let's say I do have a parent thread, which uses combination of `async` and `link` to spawn and link a number of child threads. Link gives parent thread ability to fail in case of any children fail with exception. I wonder how to do the other way around - to give child threads ability to automatically fail in case parent thread throws an exception OR just |
| 10:13:45 | <timCF> | terminates normally. |
| 10:14:45 | <[exa]> | usually I share some kind of killswitch that can be easily read by the threads |
| 10:14:55 | × | neurocyte0132889 quits (~neurocyte@user/neurocyte) (Read error: Connection reset by peer) |
| 10:15:09 | <timCF> | For the first case I can use `linkOnly` from the child thread called against parent Async. But I'm not sure how to automatically cancel all child threads in case parent terminates normally |
| 10:15:17 | <[exa]> | ofc someone needs to trigger the killswitch but you've got bracket for that :] |
| 10:15:43 | → | neurocyte0132889 joins (~neurocyte@46.243.83.114) |
| 10:15:43 | × | neurocyte0132889 quits (~neurocyte@46.243.83.114) (Changing host) |
| 10:15:43 | → | neurocyte0132889 joins (~neurocyte@user/neurocyte) |
| 10:16:22 | <timCF> | [exa]: so you propagate some sort of MVar/TChan for the purposes of monitoring parent thread wellness from the child threads? |
| 10:17:10 | <[exa]> | yeah, as long as threads can check this repeatedly it's okay |
| 10:17:12 | <typetetris> | Hi there! Hasn't there been recent developments in GHC to easier get stack traces in Haskell? Please give me a pointer, where I could read, how to use this! |
| 10:17:27 | <[exa]> | typetetris: check out the typeclass HasStacktrace |
| 10:17:39 | <[exa]> | (not sure how recent that is though) |
| 10:18:29 | <[exa]> | (uh I messed up the name obviously) |
| 10:20:01 | <[exa]> | (it's HasCallStack :] ) |
| 10:20:54 | <timCF> | [exa]: I see, it's definitely possible, but not very ergonomic. I wish Async have utility function for this. I think high level `withAsync` is kinda giving desired behaviour, but it's not ergonomic in cases where number of threads is dynamic and defained in runtime only and can change during runtime |
| 10:21:35 | <[exa]> | timCF: well you can either manually kill all threads or just exit() the process, but you see that's not very clean either |
| 10:21:44 | × | neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 258 seconds) |
| 10:23:05 | <timCF> | [exa]: Cleanup operation which is killing all child processes could do the job (unless it interrupted) |
| 10:23:26 | <timCF> | [exa]: Some sort of bracket construct in main parent thread |
| 10:23:34 | <[exa]> | yeah well, how do you find all child threads (not processes)? |
| 10:24:04 | <[exa]> | unless you really want to kill all threads that belong to the RTS, which may not compose well with other stuff running |
| 10:24:08 | <timCF> | [exa]: keep a Map/Set inside main process state, threre is no other way I guess |
| 10:24:12 | → | mbuf joins (~Shakthi@223.178.116.173) |
| 10:24:45 | <timCF> | [exa]: State monad probably is the way to go, or something similar |
| 10:25:25 | <typetetris> | Trying to use https://hackage.haskell.org/package/haskell-stack-trace-plugin I get `Overloaded signature conflicts with monomorphism restriction` for some of my functions (0 arity ones, which are just fancy new names for certain values)? What does it mean, how could I fix that? |
| 10:25:56 | → | neurocyte0132889 joins (~neurocyte@46.243.83.114) |
| 10:25:56 | × | neurocyte0132889 quits (~neurocyte@46.243.83.114) (Changing host) |
| 10:25:56 | → | neurocyte0132889 joins (~neurocyte@user/neurocyte) |
| 10:26:22 | <timCF> | typetetris: try `-Wno-monomorphism-restriction` |
| 10:26:37 | <[exa]> | timCF: yeah well, I was trying something like that, eventually ended up just with the broadcast killswitch |
| 10:26:52 | → | stengah joins (~stengah@user/stengah) |
| 10:26:58 | <timCF> | typetetris: this restriction is not very useful anyway, and creates a lot of noise from nowhere |
| 10:28:25 | <typetetris> | I tried to add `{-# OPTIONS_GHC -Wno-monomorphism-restriction #-}` to the file, but it doesn't seem to help. Do I have to do that globally? |
| 10:32:16 | <merijn> | timCF: Hard disagree |
| 10:32:34 | <[exa]> | +1 ^ |
| 10:32:35 | <merijn> | no-MMR is a great way to turn trivial errors that easy to fix into unpredictable resource leaks! |
| 10:32:40 | <typetetris> | I see there is toplevel stuff like: `(Right something) = semver "whatever"` in the file, it didn't like that. |
| 10:33:18 | <[exa]> | typetetris: you tried the code from the example right? |
| 10:33:35 | <[exa]> | which ones is it pointing to? |
| 10:33:58 | → | lavaman joins (~lavaman@98.38.249.169) |
| 10:34:12 | <timCF> | merijn: interesting.. I always turn it off to not write type signatures in some local bindings which should be polymorphic. Could you share more info why this warning is useful? |
| 10:34:47 | <[exa]> | NMR should have no effect on local bindings right? |
| 10:35:06 | <timCF> | [exa]: I'll give you example, sec |
| 10:35:09 | <merijn> | timCF: Ok, some context first: MMR *only* applies to things that don't have left side arguments, i.e. does not apply to "foo x = ..." but does to "foo = \x -> ..." |
| 10:35:17 | <[exa]> | ah you meant module-local? |
| 10:35:25 | <typetetris> | [exa]: I did not try the code from the example. But turning the `(Right bla) = blub` top-level stuff into `bla = either (error . show) id blub` made the error message about the monomorphism stuff go away, no my code base compiles with that stack trace plugin. Just wanted to let you know. |
| 10:35:42 | <merijn> | timCF: So, suppose we have "foo :: Num a => [a]; foo = veryExpensiveComputation" (except, without the signature) |
| 10:36:01 | <merijn> | timCF: "foo" *looks* like a value, and you'd expect your very expensive computation to only run *once* |
| 10:36:19 | <merijn> | timCF: Except, it's typeclass polymorphic, which means it can be instantiated an unbounded number of times |
| 10:36:40 | <[exa]> | unbounded memory! |
| 10:37:11 | <merijn> | timCF: You have two options: 1) keep all evaluated instantiations around indefinitely (probably a bad ideaa for obvious reasons) or 2) re-evaluate it every time it's used (computational overhead you might not expect, since it looks like a static value) |
| 10:37:45 | → | xlei joins (znc@pool-68-129-84-118.nycmny.fios.verizon.net) |
| 10:37:45 | <merijn> | timCF: The Haskell report opts for a third option: Typeclass polymorphic things that look like values are monomorphised (i.e. specialised to one specific type and then only computed once) |
| 10:38:12 | <merijn> | timCF: Which means "things that look like values behave like values", the problem is that *actual* polymorphic usage now doesn't work (the MMR error you get) |
| 10:38:26 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 260 seconds) |
| 10:38:28 | <timCF> | [exa]: Here. Local binding in this function will require type signature in case NMR is off https://github.com/21it/witch/blob/efe4cdca31f90067edf7a09d0770a649d17a1c0b/src/lib/Witch/Instances.hs#L913-L926 |
| 10:38:46 | <merijn> | timCF: Forcing you to add a type signature to "opt in" to solution 2) (re-evaluate at every instantiation) |
| 10:39:24 | <merijn> | timCF: Accidental dramatic slowdown by re-evaluation at every use is incredibly hard to spot/detect and thus a resource leak nightmare |
| 10:39:37 | <merijn> | timCF: on the other hand, MMR conflict is a trivial compile time error |
| 10:39:50 | <merijn> | I dunno which you prefer dealing with, but I'll take the compile time error any day :p |
| 10:40:19 | <merijn> | especially since the fix for the compile issue is as easy as "add an explicit signature to the offending binding" |
| 10:42:07 | <merijn> | timCF: tbh, personally I'm increasingly adding type signatures on *every* binding, including the where block. And with my phd project having lots of "don't touch code for 1.5 year, then come back to it" really has me convinced it's "The 1 True Way (TM)" |
| 10:42:28 | <timCF> | merijn: if it affects runtime, I definitely want to be faster in runtime and spend 10 sec to write type signature for this local binding :) |
| 10:42:36 | <[exa]> | timCF: wow there it's interesting, you sure it's ne NMR that triggers it? |
| 10:42:56 | <merijn> | timCF: For example, looking at the lines you linked...I have *no* clue what tryFrom is remotely doing |
| 10:43:08 | <[exa]> | anyway instance-ish stuff might have extra rules because you don't know half of the types there |
| 10:43:21 | × | eggplant_ quits (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Remote host closed the connection) |
| 10:43:25 | <merijn> | timCF: If it had a signature I could be messing with this code in 10s...now I need to reverse engineer all the types, etc. |
| 10:44:06 | <[exa]> | oh yeah |
| 10:44:20 | <[exa]> | e.g. we would now precisely know why the NMR gets triggered. :D |
| 10:44:59 | <merijn> | I don't do it everywhere yet, atm, but I really should |
| 10:45:11 | <merijn> | I was looking up some example code and am now annoyed with missing cases |
| 10:45:20 | <merijn> | See: https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/src/Core.hs#L237-L281 |
| 10:45:37 | <merijn> | None of those where bindings need a signature, but it's so much more scannable with them |
| 10:46:11 | <merijn> | tbh, quite annoyed with the one on line 273, it's fairly easy to spot what type it should be, but no real point why it shouldn't just have a signature |
| 10:47:15 | <timCF> | merijn: but what do you mean by "leak"? It means resources are acquired, but not liberated properly? |
| 10:48:20 | <timCF> | merijn: or computation is performed without nesessity? |
| 10:48:24 | <merijn> | timCF: Well, the leak would be if you evaluated polymorphic only once per instantiation and kept them around. But since that leaks, GHC doesn't. So in this case it's less leak and more "makes it easy to unintentionally re-evaluate the same expression repeatedly" |
| 10:49:56 | <timCF> | merijn: I see, thanks! So if this affects runtime, I'll probably will turn restriction back |
| 10:52:19 | → | rond_ joins (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) |
| 10:53:12 | <timCF> | [exa]: yeah, I'm sure this restriction forces type signature on local binding, tried it now and got "The Monomorphism Restriction applies to the binding `tryFrom'` |
| 10:55:24 | × | nckx quits (~nckx@tobias.gr) (Quit: ♪ It's the most wonderful time of the year 🎃) |
| 10:56:12 | <timCF> | Initially when I was starting with Haskell, I've got a basic list of GHC settings from this post, and then modified it for my needs (added StrictData and couple others). Seems like Haskell IRC is better source of information than medium blog posts) https://medium.com/mercury-bank/enable-all-the-warnings-a0517bc081c3 |
| 10:56:27 | → | gaff joins (~gaff@49.207.209.245) |
| 11:00:53 | → | alx741 joins (~alx741@186.178.108.68) |
| 11:03:29 | × | gaff quits (~gaff@49.207.209.245) (Quit: Bye ...) |
| 11:06:17 | × | DNH quits (~DNH@2a02:8108:1100:16d8:4434:a728:da46:b4e9) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 11:07:20 | → | DNH joins (~DNH@2a02:8108:1100:16d8:4434:a728:da46:b4e9) |
| 11:07:57 | → | Pickchea joins (~private@user/pickchea) |
| 11:08:29 | <arahael> | Medium is a trap. |
| 11:08:32 | <arahael> | A curse on the web. |
| 11:10:34 | → | nckx joins (~nckx@tobias.gr) |
| 11:11:46 | <timCF> | arahael: And stack overflow as well) |
| 11:16:36 | <arahael> | timCF: Eh, well, stackoverflow started well. |
| 11:18:23 | × | stengah quits (~stengah@user/stengah) (Ping timeout: 264 seconds) |
| 11:20:10 | <Franciman> | same as haskell |
| 11:20:16 | <Franciman> | started well |
| 11:20:18 | <Franciman> | got better |
| 11:21:10 | → | acidjnk joins (~acidjnk@p200300d0c703cb806ce024b26c2d7c09.dip0.t-ipconnect.de) |
| 11:23:50 | × | acidjnk_new quits (~acidjnk@p200300d0c703cb80b093ae7a86818c94.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 11:24:02 | <merijn> | Haskell SO is pretty good |
| 11:24:21 | <merijn> | Haskell questions have a non-zero chance of some OG answerers :p |
| 11:24:47 | <merijn> | All these people asking beginner questions and getting info dumped by pigworker and Lennart xD |
| 11:25:00 | <Franciman> | then what about OCaml? |
| 11:25:32 | → | acidjnk_new joins (~acidjnk@pd9e0b933.dip0.t-ipconnect.de) |
| 11:26:27 | × | ArctVaulMarsHMPJ quits (~pjetcetal@2.95.44.252) (Read error: Connection reset by peer) |
| 11:26:47 | <merijn> | I dunno, I've never read any ocaml questions |
| 11:26:52 | <Franciman> | no i asked |
| 11:26:55 | <Franciman> | what do you think about ocaml |
| 11:27:21 | <merijn> | ocaml is...ok |
| 11:27:38 | <merijn> | Like, if you're not allowed to use Haskell it's decent |
| 11:27:58 | <merijn> | But, like, if they won't let you use Haskell you might be better off with F# or Rust |
| 11:28:09 | <Franciman> | cringe |
| 11:28:19 | <Franciman> | why do they not allow to use haskell? |
| 11:28:49 | × | acidjnk quits (~acidjnk@p200300d0c703cb806ce024b26c2d7c09.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 11:28:51 | <Franciman> | codata as data is something I cringe at in haskell |
| 11:29:11 | <Franciman> | I wish there was a language with explicit codata |
| 11:29:21 | <Franciman> | to see if we can still obtain the modulatiry of full lazy haskell |
| 11:30:14 | <Franciman> | in fact I am not sure about a thing, it looks like in "big projects" laziness is to be constrained using streaming libraries |
| 11:30:24 | <Franciman> | but you wouldn't need such a strange beast if you had codata |
| 11:31:30 | <Franciman> | as usual you can get away with monadic, which be careful were not invented in haskell, code and have codata=data again |
| 11:31:45 | → | ArctVaulMarsHMPJ joins (~pjetcetal@2.95.44.252) |
| 11:32:05 | <Franciman> | embedding things in boxes is a favourite topic |
| 11:32:12 | <Franciman> | the XXI century version of indirection |
| 11:32:37 | <Franciman> | or I should say embedding things in diamonds |
| 11:33:52 | <Cajun> | codata? thats not a term ive run into before |
| 11:37:55 | → | Guest|55 joins (~Guest|55@147.188.245.199) |
| 11:38:32 | × | Guest|55 quits (~Guest|55@147.188.245.199) (Client Quit) |
| 11:40:30 | → | jgeerds joins (~jgeerds@55d4da80.access.ecotel.net) |
| 11:41:45 | <merijn> | Cajun: Well, you're about to fall down a freaking rabbit hole, then :p |
| 11:42:26 | <Franciman> | haskell hides them in a way |
| 11:42:33 | <Franciman> | through laziness |
| 11:43:06 | <merijn> | Cajun: In total languages "data" refers *only* to finite recursive data, so something like infinite lists |
| 11:43:22 | <merijn> | Cajun: codata are recursive data structure that are unbounded |
| 11:43:45 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) |
| 11:43:54 | <Franciman> | where you don't specify the constructors |
| 11:43:57 | <Franciman> | but the destructors |
| 11:44:05 | <Franciman> | that's how you attain the reversal of the order of evaluation |
| 11:44:09 | <Franciman> | that is typical of laziness |
| 11:44:11 | <Franciman> | from strictness |
| 11:45:08 | <Franciman> | that's why they are called codata, because speaking the pale imitation of structuralism, i.e. category theory |
| 11:45:14 | <Franciman> | they are the dual of data |
| 11:45:17 | <Franciman> | but this is not important |
| 11:45:44 | <Franciman> | https://www.microsoft.com/en-us/research/uploads/prod/2020/01/CoDataInAction.pdf this paper shows some examples of explicit codata |
| 11:45:57 | <Franciman> | it also argues that OOP is basically codata |
| 11:47:34 | <Cajun> | ooh ill have to give that a read, seems very interesting |
| 11:48:01 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Ping timeout: 245 seconds) |
| 11:48:48 | → | kupi joins (uid212005@id-212005.hampstead.irccloud.com) |
| 12:02:59 | → | shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
| 12:05:20 | × | coot quits (~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 12:10:05 | → | stengah joins (~stengah@user/stengah) |
| 12:12:27 | × | hendursa1 quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds) |
| 12:12:56 | → | hendursa1 joins (~weechat@user/hendursaga) |
| 12:18:35 | <Hecate> | fuck |
| 12:18:38 | <Hecate> | 2012 was 9 years ago |
| 12:18:41 | <Hecate> | ouch |
| 12:18:43 | <Hecate> | OUCH |
| 12:19:02 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 12:19:15 | → | peterhil joins (~peterhil@dsl-hkibng32-54fb56-2.dhcp.inet.fi) |
| 12:21:19 | <yushyin> | time flies |
| 12:22:22 | <APic> | Indeed |
| 12:22:38 | <merijn> | Hecate: It's too early in the day for existential crisises... |
| 12:22:50 | <merijn> | Please refrain from inducing them >.> |
| 12:22:56 | maerwald | pours a strong whisky |
| 12:23:16 | <merijn> | Like there's any other kind >.> |
| 12:23:28 | <Hecate> | indeed |
| 12:23:44 | <merijn> | There' just "whisky" and "cask strength" :p |
| 12:23:59 | <merijn> | Can't legally call it whisky below 40% ABV anyway :p |
| 12:24:25 | <Hecate> | Btw, is there anyone here interested in dedicating some time in an organised structure to improve the state of compilers techniques and pedagogy in Haskell? |
| 12:24:39 | <maerwald> | pedawhat? |
| 12:24:48 | <Hecate> | uuh, teaching? |
| 12:24:57 | <merijn> | Interested in the abstract sense or the "actually investing personal time in it" sense? :p |
| 12:25:11 | <maerwald> | I'm strongly opposed to teaching |
| 12:25:31 | <Hecate> | merijn: investing personal time in it but also in a structure that guarantees that you're doing just casting rocks in the water |
| 12:25:36 | <Hecate> | maerwald: yes I figured :p |
| 12:26:34 | <timCF> | Does anybody know advantages of `TMVar` vs `MVar`? I guess it has similar interface, but different internal implementation which is more performant in some cases? |
| 12:27:13 | <merijn> | timCF: Depending on your usecase TMVar might actually be a lot *less* performant |
| 12:27:41 | <timCF> | merijn: So the main advantage is smooth STM compatibility? |
| 12:27:58 | <merijn> | timCF: Well, they are faster for *some* usecases |
| 12:28:20 | <merijn> | Classic case of "well, you gotta understand the implementation and pros&cons of both" |
| 12:28:39 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 12:29:13 | <timCF> | merijn: Well, I hoped for the simple answer X is just better than Y. But like everything in Haskell it's not that simple huh |
| 12:29:31 | <merijn> | timCF: This is more "things are never simple when it comes to concurrency" :p |
| 12:29:43 | <merijn> | timCF: Specifically, MVar guarantees single wakeup |
| 12:29:43 | <xerox> | anybody on macos on m1? does ctrl+arrow left/right work for you in the ghci prompt? i.e. moving by words back and forth (or also ctrl+a to get to the beginning of the line) if so, what version of ghc? |
| 12:30:00 | <merijn> | timCF: Which means if you have 1k threads blocked on an MVar and it gets a write only 1 thread will wakeup an run |
| 12:30:20 | <merijn> | timCF: TMVar will wake up all 1k threads and race to see which one wins (see "thundering herd" problems) |
| 12:30:44 | <merijn> | MVar is also fair (it guarantees every blocked thread will see a write, before any thread sees it's 2nd write) |
| 12:30:48 | <merijn> | TMVar are not |
| 12:31:24 | <merijn> | timCF: The static overhead of MVar is slightly bigger, but that can easily be drowned out be thundering herd issues |
| 12:32:06 | <timCF> | merijn: hmm, it's the opposite to what I want.. I actually want a simple kill-switch to kill *every* child Async process in case parent dies or just terminates normally |
| 12:32:15 | → | fryguybob joins (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com) |
| 12:32:33 | <timCF> | so I do need some sort cross-thread signaling/broadcast |
| 12:33:05 | <timCF> | similar to what `withAsync` function is using internally |
| 12:33:35 | <timCF> | but not N child processes, not just one |
| 12:34:09 | <timCF> | * I mean for N child processes where N is dynamic runtime value |
| 12:35:16 | → | nschoe joins (~quassel@178.251.84.79) |
| 12:38:35 | × | ubert1 quits (~Thunderbi@178.115.62.230.wireless.dyn.drei.com) (Ping timeout: 258 seconds) |
| 12:38:50 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 260 seconds) |
| 12:39:14 | <timCF> | Async library itself using STM-style TMVar for some reason to propagate termination of the parent thread, I do wonder why https://hackage.haskell.org/package/async-2.2.4/docs/src/Control.Concurrent.Async.html#withAsyncUsing |
| 12:39:40 | <tomjaguarpaw> | Suppose I write f = \(# #) -> e . Is there any overhead to evaluating f (# #) compared to just evaluating e ? |
| 12:40:01 | → | ubert joins (~Thunderbi@178.115.62.230.wireless.dyn.drei.com) |
| 12:40:20 | <Franciman> | Hecate: can you please expand a bit on what you mean? |
| 12:40:24 | <Franciman> | I didn't understand ^^' |
| 12:41:59 | <Franciman> | what do you mean by "compiler techniques and pedagogy in Haskell" ? |
| 12:42:02 | <Franciman> | are they tw oseparate things? |
| 12:43:58 | <tomsmeding> | tomjaguarpaw: one is calling a function and the other isn't, I suppose? |
| 12:44:10 | <tomsmeding> | but inlining of course |
| 12:49:59 | → | xiongxin joins (~quassel@113.116.35.81) |
| 12:52:53 | <Hecate> | Franciman: it's a whole. It's about having both excellent tooling for writing compilers, from frontend to backend, and having excellent pedagogical material to make Haskell shine on this |
| 12:54:42 | <Franciman> | thanks, Hecate. Very nice idea |
| 12:55:22 | → | coot joins (~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) |
| 12:56:37 | <Hecate> | hohai coot :) |
| 12:56:40 | <Hecate> | Franciman: 👍 |
| 12:58:32 | <Franciman> | yes? |
| 12:58:40 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 13:02:19 | <kritzefitz> | "(>>=)" is right-associative, which means that "a >>= b >>= c" is equivalent to "(a >>= b) >>= c" or did I get the directions mixed up? |
| 13:03:48 | → | kritzefitz_ joins (~kritzefit@picard.host.weltraumschlangen.de) |
| 13:03:49 | <ski> | you did |
| 13:03:52 | <Franciman> | kritzefitz: right associative means the parens are to the right |
| 13:03:55 | <quantum> | kritzefitz: Citing Wikipedia: An operator `*` is right-associative if `a * b * c` is interpreted as `a * (b * c)` |
| 13:04:01 | <ski> | (and it's left-associative) |
| 13:04:01 | <Franciman> | o the rightmost >>= takes precedence |
| 13:04:17 | <Franciman> | :info (>>=) |
| 13:04:20 | <Franciman> | sad |
| 13:04:24 | <ski> | % :i >>= |
| 13:04:25 | <yahb> | ski: type Monad :: (* -> *) -> Constraint; class Applicative m => Monad m where; (>>=) :: m a -> (a -> m b) -> m b; ...; -- Defined in `GHC.Base'; infixl 1 >>= |
| 13:04:35 | <Franciman> | left associative :O |
| 13:04:40 | <kritzefitz> | Sorry, I meant "(>>=)" is left-associative. So it's still "(a >>= b) >>= c" right? |
| 13:04:44 | <ski> | yes |
| 13:04:47 | <quantum> | yep |
| 13:05:22 | <tomjaguarpaw> | My benchmarks show that (# #) -> T is substially slower that T |
| 13:05:25 | <tomjaguarpaw> | Hmm |
| 13:05:53 | <ski> | but if you type `... >>= \x -> ... >>= \y -> ...', that's `... >>= (\x -> ... >>= (\y -> ...))' |
| 13:06:18 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) |
| 13:07:44 | <kritzefitz> | Huh, interesting. |
| 13:08:18 | → | jespada joins (~jespada@2803:9800:9842:7a62:a1db:843b:ed19:cad6) |
| 13:08:21 | <kritzefitz> | So is "(Nothing >>= a) >>= b" slightly less efficient than `Nothing >>= (a >=> b)? |
| 13:09:03 | <ski> | yes |
| 13:09:12 | <ski> | (barring a SSC) |
| 13:10:31 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Ping timeout: 245 seconds) |
| 13:11:57 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 13:12:27 | <kritzefitz> | Does this similarly behave for "Writer [o]"? I image left associative list writers to be a lot less efficient than right associative, because the former will always prepend the long existing output to the short new output. |
| 13:12:38 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 13:13:34 | <ski> | @src Writer (>>=) |
| 13:13:34 | <lambdabot> | m >>= k = Writer $ |
| 13:13:34 | <lambdabot> | let (a, w) = runWriter m |
| 13:13:35 | <lambdabot> | (b, w') = runWriter (k a) |
| 13:13:35 | <lambdabot> | in (b, w <> w') |
| 13:14:00 | <ski> | i think so |
| 13:14:30 | <ski> | you could use difference lists, instead |
| 13:15:06 | <ski> | (or use `ContT' or `Codensity') |
| 13:19:05 | → | lbseale joins (~lbseale@user/ep1ctetus) |
| 13:19:10 | <tomjaguarpaw> | Where substantially is about 1%, so not actually that substantial |
| 13:19:30 | <tomjaguarpaw> | OTOH () -> T is about 20% slower that T |
| 13:20:14 | → | burnsidesLlama joins (~burnsides@dhcp168-043.wadham.ox.ac.uk) |
| 13:22:23 | → | boxscape_ joins (~boxscape_@p54a3581e.dip0.t-ipconnect.de) |
| 13:23:00 | <kritzefitz> | Huh, does it really make such a little difference? I would have imagined that repeatedly prepending a very long list has a stronger impact. But most monadic code probably ends up right-associative (because of lambdas and do notation), so maybe I'm over-estimating the effect. |
| 13:24:28 | <boxscape_> | Is there a way to get GHC to always default type class constraints in type inference to concrete types? MonomorphismRestriction + ExtendedDefaultRules is not enough... (I'm going to give an introductory talk about Haskell at my company and am trying to stay away from type classes) |
| 13:25:22 | <boxscape_> | e.g. the type of `g a b = a + b` is still inferred to be `Num a => a -> a -> a` |
| 13:28:40 | <geekosaur> | afaik there is no way to get ghc to always monomorphize; it's always going to go for the most general signature. and I suspect a lot of stuff would break if it didn't |
| 13:29:17 | <geekosaur> | that's the sort of thingt that is very likely to have unforeseen consequences |
| 13:30:16 | <boxscape_> | ok, thanks |
| 13:30:53 | <boxscape_> | I suppose I can just define my own (+) that's monomorphic and such |
| 13:38:27 | → | kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 13:41:14 | <boxscape_> | (On the other hand, I also don't really want to give the impression that (+) can only be used for integers - not sure what I'll do yet) |
| 13:42:34 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 13:45:04 | → | slack1256 joins (~slack1256@45.4.2.52) |
| 13:46:35 | × | acidjnk_new quits (~acidjnk@pd9e0b933.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 13:47:23 | × | xiongxin quits (~quassel@113.116.35.81) (Quit: No Ping reply in 180 seconds.) |
| 13:47:35 | × | stengah quits (~stengah@user/stengah) (Ping timeout: 258 seconds) |
| 13:48:39 | → | xiongxin joins (~quassel@113.116.34.92) |
| 13:53:12 | → | ian` joins (~user@ool-45779fe5.dyn.optonline.net) |
| 13:53:30 | ian` | is now known as bontaq |
| 13:55:02 | × | neurocyte0132889 quits (~neurocyte@user/neurocyte) (Read error: Connection reset by peer) |
| 13:55:41 | → | neurocyte0132889 joins (~neurocyte@46.243.83.114) |
| 13:55:41 | × | neurocyte0132889 quits (~neurocyte@46.243.83.114) (Changing host) |
| 13:55:41 | → | neurocyte0132889 joins (~neurocyte@user/neurocyte) |
| 13:56:38 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 13:56:52 | × | neurocyte0132889 quits (~neurocyte@user/neurocyte) (Read error: Connection reset by peer) |
| 13:57:24 | → | neurocyte0132889 joins (~neurocyte@46.243.83.114) |
| 13:57:24 | × | neurocyte0132889 quits (~neurocyte@46.243.83.114) (Changing host) |
| 13:57:24 | → | neurocyte0132889 joins (~neurocyte@user/neurocyte) |
| 13:58:49 | → | Pickchea joins (~private@user/pickchea) |
| 13:59:29 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:a0c2:d1aa:a892:e67) (Quit: WeeChat 2.8) |
| 14:01:44 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 14:01:44 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 14:01:44 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:04:24 | × | LiaoTao quits (~LiaoTao@gateway/tor-sasl/liaotao) (Quit: ZNC 1.8.2 - https://znc.in) |
| 14:04:48 | → | LiaoTao joins (~LiaoTao@gateway/tor-sasl/liaotao) |
| 14:05:32 | × | burnsidesLlama quits (~burnsides@dhcp168-043.wadham.ox.ac.uk) (Remote host closed the connection) |
| 14:05:59 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 258 seconds) |
| 14:06:11 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 14:06:59 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 14:07:08 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 14:07:39 | × | timCF quits (~timCF@200-149-20-81.sta.estpak.ee) (Quit: leaving) |
| 14:08:29 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) |
| 14:09:21 | → | burnsidesLlama joins (~burnsides@dhcp168-043.wadham.ox.ac.uk) |
| 14:11:53 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 14:11:53 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 14:11:53 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:12:36 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Ping timeout: 245 seconds) |
| 14:14:26 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 14:18:34 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 14:18:54 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 14:20:03 | → | stengah joins (~stengah@user/stengah) |
| 14:22:13 | × | LiaoTao quits (~LiaoTao@gateway/tor-sasl/liaotao) (Remote host closed the connection) |
| 14:22:32 | → | LiaoTao joins (~LiaoTao@gateway/tor-sasl/liaotao) |
| 14:23:53 | <coot> | Hecate: hi, I think you want to ask about the MR with colour support. That one is ready for review. |
| 14:25:00 | → | zebrag joins (~chris@user/zebrag) |
| 14:25:00 | × | wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Remote host closed the connection) |
| 14:25:01 | <geekosaur> | channel? |
| 14:25:33 | <coot> | Hecate: I have another question, what's the process for updating which commit of `hackage` the `ghc` repo is using. I would like both `ghc-9.0` and `ghc-9.2` branches of `ghc` repo to use a more recent commit from `ghc-9.0` and `ghc-9.2` branches of `hackage` (respectively). |
| 14:26:33 | → | hnOsmium0001 joins (uid453710@id-453710.hampstead.irccloud.com) |
| 14:27:58 | → | Cale joins (~cale@2607:fea8:995f:d3e0:a7e3:45a3:f953:e812) |
| 14:28:42 | × | sprout quits (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 14:29:35 | × | jlamothe quits (~jlamothe@198.251.61.229) (Quit: leaving) |
| 14:30:17 | → | wyrd joins (~wyrd@gateway/tor-sasl/wyrd) |
| 14:32:50 | × | thaumavorio quits (~thaumavor@thaumavor.io) (Quit: ZNC 1.8.2 - https://znc.in) |
| 14:34:45 | → | nsilv joins (~NSilv@host-87-15-180-17.retail.telecomitalia.it) |
| 14:35:38 | → | thaumavorio joins (~thaumavor@thaumavor.io) |
| 14:35:41 | → | lavaman joins (~lavaman@98.38.249.169) |
| 14:38:21 | × | nsilv quits (~NSilv@host-87-15-180-17.retail.telecomitalia.it) (Client Quit) |
| 14:40:35 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 264 seconds) |
| 14:41:04 | → | shriekingnoise joins (~shrieking@186.137.144.80) |
| 14:43:42 | → | ArtVandelayer joins (~ArtVandel@ip174-68-147-20.lv.lv.cox.net) |
| 14:48:33 | × | kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 14:49:26 | → | jlamothe joins (~jlamothe@198.251.61.229) |
| 14:49:59 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) |
| 14:54:43 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Ping timeout: 252 seconds) |
| 14:58:52 | × | xiongxin quits (~quassel@113.116.34.92) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 15:00:34 | → | lbseale_ joins (~lbseale@user/ep1ctetus) |
| 15:02:58 | <Hecate> | coot: updating the submodule? I don't remember at the moment :| |
| 15:03:58 | × | lbseale quits (~lbseale@user/ep1ctetus) (Ping timeout: 260 seconds) |
| 15:04:35 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 15:06:18 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
| 15:06:57 | × | hiruji quits (~hiruji@user/hiruji) (Quit: ZNC 1.8.2 - https://znc.in) |
| 15:07:15 | → | hiruji joins (~hiruji@user/hiruji) |
| 15:07:16 | × | hiruji quits (~hiruji@user/hiruji) (Remote host closed the connection) |
| 15:07:35 | → | hiruji joins (~hiruji@user/hiruji) |
| 15:12:04 | → | tinhatcat joins (~manjaro-g@2620:103:a000:2201:8e4c:af6a:e11c:11a1) |
| 15:12:23 | × | MQ-17J quits (~MQ-17J@8.6.144.138) (Ping timeout: 264 seconds) |
| 15:15:39 | → | jtomas joins (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) |
| 15:19:28 | × | zincy quits (~tom@2a00:23c8:970c:4801:d922:ea97:b63a:4161) (Ping timeout: 252 seconds) |
| 15:20:06 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 245 seconds) |
| 15:21:09 | <ph88> | what's the best way to parse line by line ? |
| 15:22:08 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 15:22:15 | → | kupi joins (uid212005@id-212005.hampstead.irccloud.com) |
| 15:23:04 | → | wroathe joins (~wroathe@user/wroathe) |
| 15:23:05 | × | burnsidesLlama quits (~burnsides@dhcp168-043.wadham.ox.ac.uk) (Remote host closed the connection) |
| 15:24:52 | → | sprout joins (~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) |
| 15:25:31 | × | coot quits (~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 15:25:32 | → | Morrow joins (~Morrow@147.161.13.214) |
| 15:25:45 | → | segfaultfizzbuzz joins (~segfaultf@135-180-0-138.static.sonic.net) |
| 15:26:57 | → | zmt00 joins (~zmt00@user/zmt00) |
| 15:27:45 | <ph88> | i have this now but i feel my code is a bit ugly and not really split out well https://bpa.st/46NQ |
| 15:27:59 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 264 seconds) |
| 15:28:55 | × | DNH quits (~DNH@2a02:8108:1100:16d8:4434:a728:da46:b4e9) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 15:30:37 | <boxscape_> | ph88 have you considered just using `lines` to split the input into a list of lines before parsing it? |
| 15:31:22 | <xerox> | is there a specific channel to haskeline? |
| 15:31:34 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) |
| 15:31:53 | <geekosaur> | nope; ask here |
| 15:32:49 | <xerox> | geekosaur: hehe you already tried to help me with this, the ghci line editing problems, I made up the tiniest possible haskeline program and it also shows those problems |
| 15:33:04 | <c_wraith> | ph88: that probably feels so awkward because you're trying to use a parser combinator library like an imperative parsing library |
| 15:33:07 | <geekosaur> | hm |
| 15:33:09 | <xerox> | I thought maybe if I find someone knowledgeable on haskeline itself they can help me figure out where it's going wrong |
| 15:33:28 | <c_wraith> | ph88: If you used it more declaratively, it would work a lot more naturally |
| 15:33:39 | <ph88> | boxscape_, i considered it yes. I just ran my current implementation on an actual input file of 300 MB and the process gets killed, likely by some overflow/memory thing |
| 15:34:01 | <ph88> | c_wraith, i don't know how to do that |
| 15:34:34 | <geekosaur> | xeros, you could take your question to its bug tracker with your minimal reproducing example https://github.com/judah/haskeline/issues |
| 15:34:57 | <c_wraith> | ph88: write parsers for subsets of your grammar that stand alone, and then combine them with standard combinators. Using manual recursion should almost never be necessary. |
| 15:35:18 | <ph88> | c_wraith, i couldn't find a good combinator to do this recursion for me |
| 15:35:31 | <xerox> | geekosaur: I have one half written, working on making some screencaps to show the problems, but in the meanwhile I wanted to see if I could find some gentle soul that could help me debug it |
| 15:35:32 | <c_wraith> | you're making a list. some/many will do |
| 15:35:44 | <xerox> | I have a feeling it's my system, but I don't know what to try |
| 15:36:14 | <c_wraith> | or maybe sepBy if you don't want the newline to be part of the sub-parsers |
| 15:36:20 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 15:36:23 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Ping timeout: 264 seconds) |
| 15:37:05 | <ph88> | c_wraith, sepBy newline ? |
| 15:38:19 | <c_wraith> | well, the subparser would go in between those |
| 15:38:40 | <c_wraith> | The whole point of parser combinators is to be compositional |
| 15:38:51 | <c_wraith> | Start with a parser for a single line |
| 15:39:12 | <c_wraith> | Then use sepBy to combine that parser with the line separator to parse multiple lines |
| 15:40:02 | <ph88> | c_wraith, here full program, single line parser on 74 to 86 https://bpa.st/W6ZA but the input first contains a bunch of lines i need to skip over |
| 15:40:05 | → | bitmapper joins (uid464869@id-464869.lymington.irccloud.com) |
| 15:40:36 | <ph88> | the skipping over lines that do not match is not going well |
| 15:41:03 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 15:41:08 | <c_wraith> | did you know that you can import multiple modules with the same qualified name? |
| 15:41:40 | <ph88> | ye |
| 15:43:27 | <ph88> | when i call my line parser then it expect the return type Line .. but when there is a line to be skipped i have the choice of not calling the Line parser (i would perfer) or build type Maybe Line and then filter out again |
| 15:43:58 | → | MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
| 15:45:37 | <ph88> | i would like to say: either a line or nothing something like this get = (get <|> try (manyTill anyChar (try newline))) `sepBy` newline but the types are not good in this case, because left side of <|> is Line, and right side of <|> is String (which i don't care about even) |
| 15:45:37 | × | MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 15:46:16 | → | MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
| 15:47:22 | <monochrom> | Consider "optional". |
| 15:47:34 | <c_wraith> | Ok, so.. the problem is that this actually *isn't* line-based. There are lines you care about and lines you don't, and that's not a decision made by looking at individual lines. You care about whether you're in the prefix or the data. |
| 15:48:03 | → | DNH joins (~DNH@2a02:8108:1100:16d8:4434:a728:da46:b4e9) |
| 15:49:12 | <ph88> | prefix ? |
| 15:49:37 | <c_wraith> | "the input first contains a bunch of lines i need to skip over" - a prefix of the data |
| 15:50:48 | <ph88> | i was considering skipping over those lines by detecting whether they do NOT match a data line |
| 15:51:33 | <c_wraith> | that's fine as a local technique, but I'm saying to look at the picture from the top down |
| 15:51:50 | <c_wraith> | You have a document. It has a prefix which you don't care about, and then data you do |
| 15:51:50 | <ph88> | ok |
| 15:51:54 | <ph88> | yes |
| 15:52:06 | <c_wraith> | Write a parser for the prefix. Write a separate parser for the data. |
| 15:52:22 | <c_wraith> | Combine them to make a document parser |
| 15:52:50 | <c_wraith> | Don't try to write a single parser that handles both types of lines |
| 15:53:23 | <ph88> | monochrom, i considered optional, just that i'm not sure whether it will consume the input until the end of the line for lines that i am not interested in. I just tested it a little bit and my best guess it it only parses the first non interesting line and then stops because of this |
| 15:53:26 | × | stengah quits (~stengah@user/stengah) (Ping timeout: 245 seconds) |
| 15:53:56 | <monochrom> | That depends on how good is what you give to optional. |
| 15:53:57 | → | burnsidesLlama joins (~burnsides@dhcp168-043.wadham.ox.ac.uk) |
| 15:54:41 | <ph88> | c_wraith, so like (data_line <|> prefix_line) `sepBy` newline ? for the document parser ? |
| 15:55:13 | <c_wraith> | no. more like prefix *> data |
| 15:55:20 | <ph88> | ok |
| 15:55:29 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 15:55:31 | × | DNH quits (~DNH@2a02:8108:1100:16d8:4434:a728:da46:b4e9) (Ping timeout: 245 seconds) |
| 15:55:51 | <monochrom> | sepBy? sepEndBy? EndBy? |
| 15:56:17 | <monochrom> | Or perhaps even blank lines are legal so none of the above? |
| 15:59:47 | × | burnsidesLlama quits (~burnsides@dhcp168-043.wadham.ox.ac.uk) (Ping timeout: 264 seconds) |
| 15:59:48 | × | MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 16:04:03 | × | jgeerds quits (~jgeerds@55d4da80.access.ecotel.net) (Ping timeout: 258 seconds) |
| 16:04:47 | → | MQ-17J joins (~MQ-17J@8.6.144.138) |
| 16:11:31 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 16:13:00 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
| 16:13:53 | → | mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
| 16:14:12 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 16:14:20 | Lord_of_Life_ | is now known as Lord_of_Life |
| 16:15:59 | → | ncopa joins (~ncopa@alpine/developer/ncopa) |
| 16:16:30 | → | emf joins (~emf@2620:10d:c090:400::5:75e7) |
| 16:21:16 | <ncopa> | hi, seems like https://gitlab.haskell.org/ is down? |
| 16:21:30 | <geekosaur> | yes |
| 16:21:42 | <boxscape_> | I can access it |
| 16:21:43 | <ncopa> | seems like it just came back |
| 16:21:46 | <boxscape_> | ah |
| 16:21:59 | <geekosaur> | it's being migrated to a new machine and is out of space on the old one, and will be fairly unreliable during the move |
| 16:22:06 | → | ikex1 joins (~ash@user/ikex) |
| 16:22:35 | × | ikex quits (~ash@user/ikex) (Ping timeout: 264 seconds) |
| 16:22:43 | ikex1 | is now known as ikex |
| 16:23:05 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) |
| 16:26:07 | <geekosaur> | https://mail.haskell.org/pipermail/ghc-devs/2021-October/020290.html is the official notice |
| 16:32:02 | <zzz> | is (a -> a) an "endofunction"? |
| 16:33:12 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 16:34:40 | <zzz> | or "how do you call a function that returns the same type as its argument?" |
| 16:40:25 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 16:40:25 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 16:40:25 | → | wroathe joins (~wroathe@user/wroathe) |
| 16:41:14 | <Morrow[m]> | Endomorphism https://hackage.haskell.org/package/base-4.15.0.0/docs/Data-Monoid.html#t:Endo |
| 16:44:48 | × | kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 16:45:27 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 258 seconds) |
| 16:48:47 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 16:48:47 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 16:48:47 | → | wroathe joins (~wroathe@user/wroathe) |
| 16:49:42 | <boxscape_> | similarly to how a x a -> a is a closed (or internal) binary operation on a, it seems like that terminology should be adaptable to unary functions as well, but I'm not familiar with anyone doing it |
| 16:52:35 | × | nschoe quits (~quassel@178.251.84.79) (Ping timeout: 264 seconds) |
| 17:03:23 | → | coot joins (~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) |
| 17:03:46 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Quit: Leaving) |
| 17:06:32 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 17:07:38 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
| 17:09:16 | → | burnsidesLlama joins (~burnsides@dhcp168-043.wadham.ox.ac.uk) |
| 17:09:25 | × | hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection) |
| 17:10:01 | <ph88> | c_wraith, parser seems to be working well now. thanks for help |
| 17:10:10 | × | coot quits (~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 17:10:26 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 17:10:31 | <c_wraith> | nice |
| 17:10:56 | → | hololeap joins (~hololeap@user/hololeap) |
| 17:14:43 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 17:22:04 | × | motherfsck quits (~motherfsc@user/motherfsck) (Ping timeout: 252 seconds) |
| 17:23:35 | × | hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection) |
| 17:23:46 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Remote host closed the connection) |
| 17:24:56 | → | hololeap joins (~hololeap@user/hololeap) |
| 17:27:41 | → | coot joins (~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) |
| 17:33:19 | <zzz> | Morrow[m]: that's it, thanks |
| 17:33:24 | × | coot quits (~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 17:34:23 | → | coot joins (~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) |
| 17:34:41 | → | rekahsoft joins (~rekahsoft@52.129.35.150) |
| 17:36:12 | → | motherfsck joins (~motherfsc@user/motherfsck) |
| 17:38:17 | → | aegon joins (~mike@174.127.249.180) |
| 17:43:12 | × | mbuf quits (~Shakthi@223.178.116.173) (Quit: Leaving) |
| 17:49:08 | → | econo joins (uid147250@user/econo) |
| 17:51:09 | <abarbu> | With haskell.nix and shellFor when I add a tool like haskell-language-server, how can I change the flags it builds with? I tried updating modules with 'packages.haskell-language-server.flags.floskell = false;' but it doesn't work. |
| 17:52:46 | → | Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) |
| 17:56:51 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 17:56:51 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 17:56:51 | → | wroathe joins (~wroathe@user/wroathe) |
| 17:57:03 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) |
| 18:03:16 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 258 seconds) |
| 18:04:48 | × | max22- quits (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Ping timeout: 258 seconds) |
| 18:08:16 | <alzgh> | I'm very new to Haskell, sorry if this question is not good. I'm a little confused why we say a function is lifted when we apply fmap to it? I mean I don't understand why this terminology is used. When we apply a function with fmap to a structure, we go one level down into the structure and apply the function to the individual members of the structure while preserving the structure. So, it goes down not up is how I'm visualizing it. |
| 18:08:33 | <zzz> | is there anyway we can overload record accessors with normal functions? |
| 18:08:33 | × | kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 18:08:37 | <zzz> | i mean |
| 18:09:23 | <monochrom> | I don't say "lifted" either. |
| 18:09:47 | <zzz> | forget it :( |
| 18:10:38 | <monochrom> | But it converts an X->Y function to a [X]->[Y} function. |
| 18:11:40 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 18:11:40 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 18:11:40 | → | wroathe joins (~wroathe@user/wroathe) |
| 18:11:50 | <boxscape_> | alzgh I suppose the idea is that on the ground level, you have function types like `a -> b`, and then the type `f a -> f b` is built on top of that, so you're lifting the function from living in `a -> b` to living in `f a -> f b` |
| 18:12:07 | <alzgh> | does the `[]` in your notation stand for the (general) structure containing X monochrom? |
| 18:12:26 | <monochrom> | No, I'm just using the list example. |
| 18:12:58 | <alzgh> | ahh, OK |
| 18:13:25 | <monochrom> | BTW I don't say "structure" either. |
| 18:14:33 | <monochrom> | Well, not until the audience knows what it's supposed to mean. |
| 18:14:51 | → | zincy joins (~tom@2a00:23c8:970c:4801:8009:c2de:a6e:7c44) |
| 18:15:32 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 268 seconds) |
| 18:15:37 | <monochrom> | But you'll be surprised at how many people in the audience don't actually know what it's supposed to mean, but too afraid to ask, so everyone pretends to play along. |
| 18:16:38 | <monochrom> | The emperor's new cloth, lifting, structure, and isomorphism. |
| 18:17:33 | <alzgh> | boxscape_: OK, so while the function applies to the individual members of the structure, it must be lifted to the level of the structure to be able work on the individual members and that's what fmap does. That's what I understood from your statement. BTW, what I'm writing here is most likely not formally correct. I'm just trying to visualize it and make it sensible in simple terms first. |
| 18:18:33 | <boxscape_> | yeah |
| 18:20:36 | × | jumper149 quits (~jumper149@80.240.31.34) (Quit: WeeChat 3.2) |
| 18:22:18 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
| 18:22:34 | <c_wraith> | boxscape_: oh, remember the thing we talked about a bit with putting type arguments in patterns a while back? You were having trouble with it in a build of GHC from master, it wanted a kind parameter as well as the type parameter.. I did some checking, and the 9.2 release candidate doesn't have that problem, which is a good sign. |
| 18:22:57 | <boxscape_> | c_wraith yep, I reported it as a bug and it got fixed right away :) |
| 18:23:06 | <c_wraith> | On the other hand, 9.2 has been stuck at rc1 for months now. What's the deal with that? :( |
| 18:24:06 | <boxscape_> | alzgh here's an image that perhaps also helps with the intuition of how fmap "lifts" a function f https://i.imgur.com/EMpxByV.png |
| 18:24:23 | <boxscape_> | excuse the crude mouse pad drawing |
| 18:24:31 | <boxscape_> | touch pad, rather |
| 18:24:52 | <c_wraith> | I was going to say this might be a case where category theory's diagrams actually are useful for someone who doesn't know category theory. That's basically what that is. |
| 18:25:32 | <boxscape_> | yeah |
| 18:25:37 | <yushyin> | boxscape_: what a work of art! ;) |
| 18:25:44 | <boxscape_> | :) thanks |
| 18:25:45 | <c_wraith> | Except category theory seems to have the arrows going down instead of up by convention. Not sure what's up with that. |
| 18:25:51 | <boxscape_> | hmm |
| 18:26:22 | <janus> | c_wraith: i heard that RecordDotSyntax has a few bugs in its GHC proposal that will need sorting out |
| 18:26:36 | <monochrom> | That's just like computer graphics having the Y axis pointing down. |
| 18:26:49 | <boxscape_> | and trees having their roots at the top |
| 18:27:03 | <c_wraith> | no one can agree on anything, ever! |
| 18:27:04 | <alzgh> | this makes a lot of sense boxscape_ thanks. The drawing is perfect for the purpose. I'm just wondering why tagged the arrows from `a` to `[a]` with `pure`? |
| 18:27:05 | <janus> | c_wraith: so i was thinking maybe they implement it first and then write the new spec, instead ? dunno but it does hint at why more time could be needed |
| 18:27:31 | <boxscape_> | alzgh there's a function `pure :: a -> f a`, which e.g. for list converts an element into a singleton list with that element |
| 18:27:36 | <boxscape_> | > pure 4 :: [Int] |
| 18:27:38 | <lambdabot> | [4] |
| 18:28:09 | <boxscape_> | > pure 4 :: Maybe Int |
| 18:28:11 | <c_wraith> | janus: I was under the impression they cut out a bunch for the 9.2 target, and were going to put the stuff that got cut in a later release |
| 18:28:11 | <lambdabot> | Just 4 |
| 18:28:17 | <boxscape_> | (afk) |
| 18:28:19 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 18:28:20 | <c_wraith> | janus: maybe I misinterpreted that, though |
| 18:29:48 | → | CiaoSen joins (~Jura@p5dcc1a24.dip0.t-ipconnect.de) |
| 18:30:29 | → | wonko joins (~wjc@62.115.229.50) |
| 18:32:14 | <alzgh> | Ohh, thanks boxscape_ this looks very much related to Functors which I'm learning right now. I'm going to get to them in a few days, I guess :-) |
| 18:33:52 | <alzgh> | haha monochrom, I think I have a basic understanding of structure, but most likely not the formal rigorous definition. As far as I know, the only example that not clearly fits with my informal definition of structure is `f = fmap (+1) negate` I have learned that `fmap` for functions is defined as `.` so we can say that `fmap (+1) negate` is equal to `(+1) . negate`. But don't mind asking what structure really means, and would love to learn from you :D |
| 18:34:18 | <koz> | If I had a function that used to work on a concrete type, and then change it to be polymorphic, is that a major or minor bump in version according to the PVP? |
| 18:36:19 | <janus> | c_wraith: do let me know if you find a credible source, i don't remember anymore where i read what i told you. it's all gossip! o_O |
| 18:37:05 | → | lavaman joins (~lavaman@98.38.249.169) |
| 18:37:31 | <c_wraith> | koz: it won't break existing code unless it makes inference fail. Could be either, depending on how likely you believe such an inference failure to be |
| 18:37:53 | → | azeem joins (~azeem@2a00:801:237:7bcf:1c96:8993:d67f:c459) |
| 18:38:03 | <c_wraith> | koz: on the other hand, adding a new function can introduce name collisions also, and that's only a minor change. Seems like a minor change to me. |
| 18:38:05 | <[exa]> | alzgh: (jumping into the discussion but hopefully helpful-- ) you may view Functors (over some type) as something that's got the semantics of that type hidden somewhere inside, e.g. it contains the type or may produce results of that type. In this context, it is useful to view functions as boxes that contain their results (of the type), but you need to supply the parameter to get the result out of the box. |
| 18:38:07 | <koz> | It's for a DataKinds 'tag'. |
| 18:38:11 | <[exa]> | Then the `fmap` behaves the same as for lists - just transforms the (yet nonexisting) result inside the container. |
| 18:38:29 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 18:38:29 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 18:38:29 | → | wroathe joins (~wroathe@user/wroathe) |
| 18:38:32 | <koz> | So I have a data type so 'tagged', and the function currently expects a specific tag, and I wanna change it to allow _any_ tag. |
| 18:38:42 | <koz> | I _feel_ that's minor. |
| 18:38:47 | <koz> | But I'm not exactly sure. |
| 18:39:51 | <c_wraith> | You're also allowed to bump the major version whenever you want, if you so desire. the only restrictions are on the things you can do without bumping the major version |
| 18:40:33 | <[exa]> | (go browsers, bump major!) |
| 18:41:02 | <monochrom> | bowser is a major bump, I heard |
| 18:41:46 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
| 18:42:20 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 18:42:34 | <myShoggoth> | Haskell Foundation: Into the Future! https://haskell-foundation.medium.com/into-the-future-8f8968094d91 |
| 18:43:04 | → | P1RATEZ joins (piratez@user/p1ratez) |
| 18:43:05 | <shapr> | yay |
| 18:43:18 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
| 18:43:31 | <Morrow[m]> | <koz> "If I had a function that used to..." <- Don't forget that the MonomorphismRestriction is a thing, so if you make the function take something polymorphic GHC may begin to fail to monomorphize it when it needs to. |
| 18:44:21 | <maerwald> | "An IDE that simulates the runtime and shows developers how their code translates into a running system not only helps programmers be more productive, it helps them learn the language better and faster." |
| 18:44:26 | <maerwald> | that sounds pretty ambitious |
| 18:44:28 | → | max22- joins (~maxime@2a01cb088335980099ed81e6a8bd9a3f.ipv6.abo.wanadoo.fr) |
| 18:44:48 | <monochrom> | It is. We know. |
| 18:45:20 | <monochrom> | But I like how it agrees with my stance of "I'm above debuggers". |
| 18:45:21 | → | jgeerds joins (~jgeerds@55d4da80.access.ecotel.net) |
| 18:45:41 | <shapr> | could hook in somethin like https://github.com/quchen/stgi |
| 18:47:48 | <maerwald> | I think haskell is simply not as well suited for operational reasoning like other languages. |
| 18:47:51 | <monochrom> | The parallel between "other languages are stuck with imperative programming, we go above that" and "other languages are stuck with debuggers, we go above that". |
| 18:48:29 | <maerwald> | so even if we make this easier, it'll still be harder than in other languages |
| 18:48:37 | <maerwald> | (I don't mind, but others might) |
| 18:49:00 | <shapr> | I like that graphical reduction thing Cale was using for awhile |
| 18:49:02 | <monochrom> | I don't mind how others do. They can always go back to python. |
| 18:49:04 | <c_wraith> | eh? GHC-haskell is pretty easy to reason about operationally. A totally different skill set, but not hard to learn. |
| 18:49:22 | <monochrom> | (Eh? python is not exactly great with operational reasoning either!) |
| 18:49:24 | <maerwald> | c_wraith: my experience is the opposite |
| 18:50:12 | <maerwald> | after seeing expensive haskell consultants fail at the problem :p |
| 18:50:50 | <c_wraith> | Well, it's often hard to retrofit sanity into a large codebase built without it. |
| 18:51:01 | <monochrom> | One of my angles is: so what if other languages are easier to operational-reason with? |
| 18:51:01 | <c_wraith> | But that's true in every language |
| 18:51:18 | <maerwald> | c_wraith: the problem wasn't that there's too much complicated code |
| 18:51:27 | <monochrom> | Does it mean easier to make programs correct? |
| 18:51:37 | <maerwald> | it's that reasoning about laziness is very tricky, even if you force values |
| 18:51:55 | × | jgeerds quits (~jgeerds@55d4da80.access.ecotel.net) (Ping timeout: 268 seconds) |
| 18:51:55 | <Morrow[m]> | koz: https://paste.tomsmeding.com/MIhvwIgV |
| 18:52:22 | <c_wraith> | Not maintaining space invariants is bad, yes |
| 18:52:31 | <c_wraith> | not knowing how to even think about them is even worse |
| 18:52:39 | <maerwald> | in the end... forcing the value at the call-site wasn't enough |
| 18:53:18 | <c_wraith> | yes, this is why StrictData is a bad idea. |
| 18:53:22 | <maerwald> | becuase intermediate thunks built up in a hot loop that were immediately evaluated afterwards, causing excessive allocations |
| 18:53:26 | <maerwald> | c_ |
| 18:53:29 | <maerwald> | lol |
| 18:53:31 | <maerwald> | StrictData fixed it |
| 18:53:37 | <c_wraith> | People think it will solve their problems, but it doesn't |
| 18:53:42 | <maerwald> | xD |
| 18:53:47 | <c_wraith> | It just hides the lack of understanding |
| 18:53:48 | <monochrom> | Usually it is Strict that is problematic. |
| 18:53:53 | <maerwald> | it actually did fix it xD |
| 18:54:03 | <c_wraith> | It didn't fix the problem, it made the code work |
| 18:54:06 | <c_wraith> | those are different |
| 18:54:17 | <maerwald> | c_wraith: I don't think you've seen the code :p |
| 18:54:55 | <monochrom> | Yeah, StrictData is a solution because of the way some people define data types. |
| 18:55:05 | <maerwald> | but it took 2 years for someone to figure out these things (among many others) |
| 18:55:30 | <monochrom> | If they presume strict data when they design their types and algorithms, then StrictData is exactly what they need. |
| 18:55:31 | <maerwald> | and those are then people familiar with GHC internals |
| 18:55:40 | <maerwald> | so not your regular Haskeller |
| 18:56:38 | <maerwald> | so... how can you make this knowledge available to everyone? I think you can't, because GHC is a moving target |
| 18:56:50 | <maerwald> | it'll be restricted to a subset of Haskellers |
| 18:56:53 | <c_wraith> | I mean, if StrictData actually solved the problem, you wouldn't have proposals for unlifted data types advertised with "actually fixes the problem" |
| 18:57:14 | <monochrom> | If they are like "data X = X Int Double" and that's what all their types are like, and they're doing foldl' over those types and nothing more interesting than that, then StrictData is for them. They were not using Haskell's laziness in the first place. |
| 18:57:38 | <alzgh> | [exa]: this makes a lot of sense. So function are basically also structures that need an input to produce an output and fmapping some func1 over a func2 applies func1 to the data inside func2 which happens to be its output provided an input. The only dissimilarity with other types of Functors is that the result doesn't preserve the structure and only outputs the value inside it. |
| 18:57:57 | <monochrom> | It is when you have a recursive data type that you begin to question the value of StrictData. (Pun intended!) |
| 18:58:05 | × | MQ-17J quits (~MQ-17J@8.6.144.138) (Ping timeout: 258 seconds) |
| 18:58:10 | <maerwald> | if your library depends on inlining behavior of GHC, you will have to study GHC... like, intensely |
| 18:58:24 | <maerwald> | because the next GHC version can break your library |
| 18:59:27 | <maerwald> | If you think I'm making this up, see https://github.com/composewell/streamly/issues/1061 |
| 18:59:37 | <monochrom> | FWIW, C compilers are not standing targets either. |
| 18:59:52 | <monochrom> | Cache systems are not standing targets either. |
| 19:00:21 | <maerwald> | monochrom: sure, but not comparable to GHC. There are some pretty mechanical tactics you can teach junior C devs. |
| 19:00:31 | <monochrom> | Every 5 years the two memes "array of structs" and "struct of arrays" swap places. |
| 19:01:14 | <maerwald> | hell, optimizing C code was fun back in uni... because you could figure out what's going on with a little debugging (and without reading compiler code) |
| 19:01:21 | <[exa]> | alzgh: it preserves the structure, it's still a box with something (transformed by the fmapped function) in it |
| 19:02:10 | <[exa]> | alzgh: observe: fmap show [3] ==> ["3"] (the inside got converted to string) |
| 19:02:35 | <[exa]> | alzgh: same with: fmap show (Just 3) ==> (Just "3") again the inside got stringed |
| 19:02:38 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:03:03 | <monochrom> | See, this is the problem with saying "structure" and going on to "preserve" it. |
| 19:03:27 | <[exa]> | alzgh: now, for example: fmap show Nothgin ==> Nothing -- looks like nothing happened, but the first Nothing is of type "Maybe Int" (so you know you're missing an Int), and te second is Maybe String (so you know there'd be a String if something arrived) |
| 19:04:21 | <alzgh> | [exa]: this wouldn't hold if the Functor is a function though, would it? |
| 19:04:31 | <[exa]> | alzgh: and the functions are: fmap show (GivenSomeParameterIGiveYou 3) ==> (GivenSomeParameterIGiveYou "3") |
| 19:04:36 | <monochrom> | A formula is worth a thousand pictures (so a million words). The formula "fmap f xs = \a -> f (xs a)" is extremely clear. |
| 19:05:14 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 260 seconds) |
| 19:05:41 | <monochrom> | Or even to eta-expand one small part: fmap f (\a -> xs a) = (\a -> f (xs a)) |
| 19:06:37 | <[exa]> | alzgh: in short, just as a list with something [ _ ] is a kinda-container and (Just _) is a kinda-container, (\param -> _) is a kinda-container too |
| 19:06:38 | <monochrom> | See the highly elegant and symmetric "moving f inside/outside" that rivals any commuting diagram. |
| 19:07:18 | <monochrom> | (So nevermind any word mincing.) |
| 19:07:31 | <[exa]> | alzgh: and fmapping `show` does the same in all three cases, respectively producing: [show _], (Just (show _)), (\param -> show _) |
| 19:07:50 | <[exa]> | end of function-are-boxes allegory :] |
| 19:07:59 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 19:10:54 | → | |57 joins (~|@2601:184:4700:2340:b998:1e2e:a37b:879c) |
| 19:12:18 | × | rond_ quits (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) (Quit: Client closed) |
| 19:16:18 | × | hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1) |
| 19:16:46 | × | rekahsoft quits (~rekahsoft@52.129.35.150) (Remote host closed the connection) |
| 19:16:50 | → | hendursaga joins (~weechat@user/hendursaga) |
| 19:17:32 | → | rekahsoft joins (~rekahsoft@52.129.35.150) |
| 19:19:42 | → | danso joins (~danso@23-233-111-52.cpe.pppoe.ca) |
| 19:23:21 | <|57> | "Parametric polymorphism is to naturality as multiplicity polymorphism is to ________" What, if anything, goes in the blank? |
| 19:25:45 | × | myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 265 seconds) |
| 19:28:11 | → | glassy joins (~glassy@user/glassy) |
| 19:29:10 | <adamCS> | Is there any way to use a value of a type in a "top-level-splice" in the same module where that type is defined? I don't know much TH and each time I try to do this I am needing to use Lift (or liftData, which requires Data) and then GHC complains about the stage restriction. But since what I'm doing is deriving instances, if I don't do this in the same module I'll have orphan instances. |
| 19:30:14 | <adamCS> | My TH needs a value because I am deriving an instance for Unbox for a Maybe-like type. So I need to have some value to package up in the "Nothing" case. |
| 19:30:20 | → | jgeerds joins (~jgeerds@55d4da80.access.ecotel.net) |
| 19:31:16 | × | jgeerds quits (~jgeerds@55d4da80.access.ecotel.net) (Remote host closed the connection) |
| 19:32:19 | × | fendor quits (~fendor@91.141.32.95.wireless.dyn.drei.com) (Remote host closed the connection) |
| 19:33:05 | → | Midjak joins (~Midjak@82-65-111-221.subs.proxad.net) |
| 19:33:54 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 19:33:54 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 19:33:54 | → | wroathe joins (~wroathe@user/wroathe) |
| 19:34:55 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 19:36:46 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 19:37:35 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 19:38:23 | × | zincy quits (~tom@2a00:23c8:970c:4801:8009:c2de:a6e:7c44) (Read error: Connection reset by peer) |
| 19:38:40 | → | zincy joins (~tom@2a00:23c8:970c:4801:8009:c2de:a6e:7c44) |
| 19:40:18 | × | hgolden quits (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Remote host closed the connection) |
| 19:40:22 | <glassy> | hi! how do I write the kind HasOrd where any type a of kind HasOrd has an Ord instance? |
| 19:40:50 | <glassy> | I'd like to write dataType Tree (a :: HasOrd) = E | T Tree a Tree for a binary search tree. |
| 19:41:43 | <geekosaur> | I don't think you do, because kinds other than Type do not have inhabited types afaik? |
| 19:41:58 | <geekosaur> | this may be where QuantifiedConstraints comes in though |
| 19:43:07 | <geekosaur> | you really want a constraint on a, not a kind. and you should not put it on the type definition because it's pretty much useless there |
| 19:43:24 | <geekosaur> | you in particular cannot do that to get away from writing the constraint on functions that use it |
| 19:44:04 | <geekosaur> | kinds will not help you here. constraints will not help you here. |
| 19:44:52 | <boxscape_> | yeah the canonical way to do this is just to supply the Ord constraint to any function that accepts a tree, similar to how Set in the standard library does it |
| 19:45:45 | <boxscape_> | ("supplying a constraint" sounds strange, I think the instances as records abstraction is leaking in my brain) |
| 19:46:18 | <glassy> | hmm |
| 19:46:37 | <glassy> | my issue is that if I liked I could make a Tree a where a does not satisfy Ord a |
| 19:47:00 | <glassy> | the usual solution is to not export constructors and have it as a library so you can't poke around the internals i guess |
| 19:47:42 | <boxscape_> | alas datatype contexts were not implemented correctly when they were added to Haskell ~30 years ago, so `data Ord a => Tree a = ...` does not do what you want, although there has recently-ish been some work to change that |
| 19:47:45 | <geekosaur> | yes, via smart constructors |
| 19:47:46 | <boxscape_> | that doesn't help you now, though |
| 19:49:11 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 19:50:10 | <glassy> | yeah DatatypeContexts extension doesn't work at all |
| 19:50:16 | <glassy> | i tried it |
| 19:50:47 | <kronicmage> | iirc you could do it with gadts? |
| 19:53:21 | <boxscape_> | yeah you could also put a constraint on the node constructor like `data Tree a where E :: Tree a; T :: Ord a => Tree a -> a -> Tree a -> Tree a`; that *would* ensure that you can't construct a tree for an a without Ord, though to me it seems a bit weird to pass in an Ord constraint at every Node when really you want the same Ord instance for the |
| 19:53:21 | <boxscape_> | whole tree |
| 19:53:42 | × | burnsidesLlama quits (~burnsides@dhcp168-043.wadham.ox.ac.uk) (Remote host closed the connection) |
| 19:57:07 | <glassy> | huh |
| 19:57:10 | <glassy> | it seems to work |
| 19:57:21 | <glassy> | E :: Tree (Int -> Int) doesn't work as it shouldn't |
| 19:57:42 | <boxscape_> | FWIW this is the recent-ish work on datatype contexts I was talking about https://youtu.be/rqmCwpRXT_E?t=64 |
| 19:58:32 | <glassy> | oh thank you |
| 19:58:32 | <monochrom> | Ugh how dare they steal a Wadler paper title :) |
| 19:58:39 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 258 seconds) |
| 19:58:39 | <glassy> | i really like Richard Eisenberg's stuff |
| 19:58:47 | <glassy> | i watch all the Tweag youtube videos, they are fun |
| 19:58:53 | <boxscape_> | yeah |
| 19:59:52 | <Franciman> | Philip Wadler is a true hero |
| 20:00:22 | <jackhill> | Is there an easy way to tell ghc at build-time where to find gcc & company? I'm brainstorming solutions for https://issues.guix.gnu.org/51213 |
| 20:00:42 | <Franciman> | jackhill: I love your work! |
| 20:00:51 | <Franciman> | keep up the great work at guix |
| 20:02:00 | <jackhill> | Franciman: awesome, thanks! We love it too :D |
| 20:03:23 | × | CiaoSen quits (~Jura@p5dcc1a24.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 20:04:47 | <geekosaur> | jackhill, afaik you can pass CC=... at configure time, but it'll be overridden at install time |
| 20:04:55 | × | juhp quits (~juhp@128.106.188.220) (Ping timeout: 252 seconds) |
| 20:05:03 | <geekosaur> | maybe the best you can do is edit the settings file of the installed ghc |
| 20:05:16 | <Franciman> | jackhill: pgmc |
| 20:05:32 | <Franciman> | -pgmc can be used to pass an executable as c compiler |
| 20:05:44 | <geekosaur> | I think pgmc is what they're trying to avoid (that is, not to have to specify it on every use) |
| 20:05:52 | <Franciman> | section 5.11 |
| 20:06:10 | <geekosaur> | which is why I'm suggesting the settings file |
| 20:06:36 | <Franciman> | dumb idea, make a wrapper script |
| 20:06:42 | <geekosaur> | alternately installation also uses a configure script and CC=... can be passed there as well; it'll be tested and used to construct the settings file |
| 20:07:34 | → | juhp joins (~juhp@128.106.188.220) |
| 20:07:40 | <geekosaur> | which makes it safer than just editing the settings file, especially as it'll also be used to fix any other settings that depend on it |
| 20:08:17 | <Franciman> | is it guaranteed to work? |
| 20:08:27 | <Franciman> | or does it rely on some tacit assumption? |
| 20:08:54 | <geekosaur> | there is an assumption that the compile time and install time compilers are broadly compatible |
| 20:09:08 | <geekosaur> | but in general the install-time configure tries to deal with that |
| 20:09:29 | × | coot quits (~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 20:09:34 | <geekosaur> | which is why it's a configure script and not just sed-ing a configure script based on assumptions |
| 20:11:09 | → | emf_ joins (~emf@2620:10d:c090:400::5:a662) |
| 20:11:17 | × | eL_Bart0 quits (eL_Bart0@dietunichtguten.org) (Quit: Restarting) |
| 20:11:23 | × | abarbu quits (~user@c-66-31-23-28.hsd1.ma.comcast.net) (Read error: No route to host) |
| 20:11:50 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 20:11:50 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 20:11:50 | → | wroathe joins (~wroathe@user/wroathe) |
| 20:12:09 | × | myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 265 seconds) |
| 20:12:28 | → | eL_Bart0 joins (eL_Bart0@dietunichtguten.org) |
| 20:13:16 | <geekosaur> | er, sed-ing a settings file |
| 20:13:20 | × | mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds) |
| 20:14:11 | × | emf quits (~emf@2620:10d:c090:400::5:75e7) (Ping timeout: 264 seconds) |
| 20:15:09 | → | mikoto-chan joins (~mikoto-ch@185.237.102.123) |
| 20:15:33 | <Franciman> | I am not familiar with guix environment anymore |
| 20:15:49 | <Franciman> | so |
| 20:16:10 | × | glassy quits (~glassy@user/glassy) (Quit: Connection closed) |
| 20:17:06 | → | lavaman joins (~lavaman@98.38.249.169) |
| 20:17:13 | <Franciman> | not quote me on that |
| 20:17:29 | <Franciman> | but doesn't guix allow defining commands also specifying options? |
| 20:18:40 | <Franciman> | which can be overridden at later stages |
| 20:19:23 | → | glassy joins (~glassy@92.40.175.103.threembb.co.uk) |
| 20:19:52 | <geekosaur> | also it seems to me like this is a guix issue, wherein it should make the ghc environment dependent on a C compiler toolchain rather than requiring you to do it yourself |
| 20:20:58 | <geekosaur> | (meaning also it should generate an appropriate settings file based on the C compiler; it may in particular need some settings tweaks for a clang toolchain) |
| 20:21:25 | <geekosaur> | I mean, isn't that part of the point of guix that it deals with those kinds of dependencies for you? |
| 20:24:33 | → | acidjnk_new joins (~acidjnk@p200300d0c703cb806ce024b26c2d7c09.dip0.t-ipconnect.de) |
| 20:26:08 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 20:26:44 | <Franciman> | i agree |
| 20:26:54 | × | wonko quits (~wjc@62.115.229.50) (Ping timeout: 260 seconds) |
| 20:26:57 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 20:26:58 | <Franciman> | i suppose they wanted to know how to tell ghc about things |
| 20:27:06 | → | burnsidesLlama joins (~burnsides@dhcp168-043.wadham.ox.ac.uk) |
| 20:27:08 | <Franciman> | you gave a nice answer |
| 20:29:03 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 20:30:02 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 20:30:33 | × | ubert quits (~Thunderbi@178.115.62.230.wireless.dyn.drei.com) (Remote host closed the connection) |
| 20:31:11 | → | kupi joins (uid212005@id-212005.hampstead.irccloud.com) |
| 20:31:34 | × | burnsidesLlama quits (~burnsides@dhcp168-043.wadham.ox.ac.uk) (Ping timeout: 260 seconds) |
| 20:31:56 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 20:32:30 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 260 seconds) |
| 20:35:04 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 20:36:36 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 20:36:36 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 258 seconds) |
| 20:36:58 | → | mmhat joins (~mmh@55d44f19.access.ecotel.net) |
| 20:37:09 | × | mmhat quits (~mmh@55d44f19.access.ecotel.net) (Client Quit) |
| 20:37:35 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 20:37:55 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Remote host closed the connection) |
| 20:38:13 | <zzz> | what are the reasons to avoid rank N types? |
| 20:38:34 | <awpr> | for what value of N? |
| 20:38:52 | <awpr> | 0 => no reason. 1000 => utterly incomprehensible to humans |
| 20:39:40 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 20:39:40 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 20:39:40 | → | wroathe joins (~wroathe@user/wroathe) |
| 20:41:14 | → | meer joins (~delicacie@2601:6c4:4080:3f80:cc37:7f71:51d3:b41c) |
| 20:42:23 | × | jtomas quits (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 264 seconds) |
| 20:42:33 | <dsal> | RankNTypes is another one of those "probably should be on by default" extensions as ~2 emerges pretty naturally. |
| 20:42:44 | × | yates quits (~user@fv-nc-f7af8b91e1-234237-1.tingfiber.com) (Remote host closed the connection) |
| 20:43:01 | × | Inst quits (~delicacie@2601:6c4:4080:3f80:f94e:aef:95ac:8647) (Ping timeout: 245 seconds) |
| 20:43:02 | <dsal> | There's also Rank2Types. Maybe that should be on by default. Or maybe we should make a Rank3Types and definitely stop there. |
| 20:43:19 | <geekosaur> | Rank2Types is just an alias for RankNTypes |
| 20:43:23 | → | jtomas joins (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) |
| 20:43:32 | × | kritzefitz_ quits (~kritzefit@picard.host.weltraumschlangen.de) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) |
| 20:43:38 | <dsal> | Lame. I need hard limits. |
| 20:43:43 | <awpr> | I remember having an actual use for a type with a surprisingly large rank recently. 3 or 4 |
| 20:43:50 | <awpr> | I'll see if I can find it |
| 20:43:51 | <geekosaur> | dating from back when rank-2 was the best ghc could manage |
| 20:44:35 | <boxscape_> | Also there's an algorithm to infer types for rank-2 that doesn't work for rank-n, but it's not implemented in ghc |
| 20:45:16 | <awpr> | okay it was only rank-3 |
| 20:46:21 | × | cigsender quits (~cigsender@74.124.58.162) (Quit: leaving) |
| 20:46:26 | <boxscape_> | makes me wonder if there's a reasonable interpretation of negative ranks |
| 20:46:31 | <int-e> | . o O ( continuations are an easy way to increase the rank ) |
| 20:47:43 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 258 seconds) |
| 20:48:42 | <dsal> | All my types are rank. |
| 20:49:45 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 20:52:06 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 20:54:34 | → | brainfreeze joins (~brainfree@2a03:1b20:4:f011::20d) |
| 20:58:12 | <monochrom> | I like rank-3. callCC :: ((forall b. a -> Cont r b) -> Cont r a) -> Cont r a) is rank-3. 3 is a good limit. |
| 20:58:36 | <monochrom> | And now, not serious: rank-3.141592653... is better :) |
| 20:59:29 | <monochrom> | And now, serious again: With quicklook impredicativity, perhaps unlimited rank-n is pretty OK. |
| 20:59:31 | geekosaur | wonders if fractional rank is like fractional dimension |
| 20:59:47 | <zzz> | ok thank you for the answers |
| 20:59:49 | <zzz> | you can stop now |
| 21:02:22 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 260 seconds) |
| 21:02:57 | <Cajun> | wait does GHC have a limit on the N in RankNTypes like it has a limit for tuples? |
| 21:03:04 | <monochrom> | No. |
| 21:03:04 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 21:03:21 | <monochrom> | Except computing resource, I suppose. |
| 21:03:36 | <zzz> | i feel someone is going to test that right now |
| 21:03:45 | <geekosaur> | and maybe how big a bunch oif (((((((((((( get |
| 21:04:20 | <monochrom> | Yeah you will have n ->'s and n ('s, perhaps that already kills you. |
| 21:05:43 | <Cajun> | well you can simulate parenthesis on the term level with `($)` , would that be possible on the type level? |
| 21:08:19 | <geekosaur> | no, and suspect it wouldn't be useful anyway |
| 21:08:59 | <zzz> | can we infixr data constructors? |
| 21:09:02 | <geekosaur> | I think that would require a generalized type level lambda, not just type families? |
| 21:09:15 | × | AWizzArd quits (~code@gehrels.uberspace.de) (Changing host) |
| 21:09:15 | → | AWizzArd joins (~code@user/awizzard) |
| 21:09:23 | <geekosaur> | % :info (:) |
| 21:09:23 | <yahb> | geekosaur: type [] :: * -> *; data [] a = ... | a : [a]; -- Defined in `GHC.Types'; infixr 5 : |
| 21:09:40 | <awpr> | yes, constructors can have fixity, even alphanumeric-named ones |
| 21:09:53 | <awpr> | controls what they do when used in backquotes |
| 21:11:01 | <boxscape_> | hm can you make a type family `Rank :: Nat -> Type` that returns some type of rank n if given n as argument |
| 21:11:05 | <zzz> | nice. didn't know that |
| 21:11:58 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 21:13:01 | <boxscape_> | oh right you can't have `forall` on the rhs of a type family definition, hm |
| 21:14:03 | × | nvmd quits (~nvmd@user/nvmd) (Quit: Later, nerds.) |
| 21:14:46 | <boxscape_> | % :kind! Rank (S (S (S Z))) (forall a . a) |
| 21:14:47 | <yahb> | boxscape_: *; = (((forall a. a) -> Int) -> Int) -> Int |
| 21:14:57 | <ph88> | Can i use this function to go from a list to a tree ? https://hackage.haskell.org/package/containers-0.6.5.1/docs/Data-Tree.html#v:unfoldTree if i put a list as b :: [Item] what does it mean to return [b] :: [[Item]] in this case ? |
| 21:15:12 | <boxscape_> | (type family is `type family Rank (n :: Nat) (t :: Type) :: Type where Rank Z t = t; Rank (S n) t = (Rank n t) -> Int`) |
| 21:17:02 | <boxscape_> | % :kind! Rank (ToNat 100) (forall a . a -> a) |
| 21:17:03 | <yahb> | boxscape_: *; = ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((forall a. a -> a) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int |
| 21:17:06 | <boxscape_> | is that a rank 100 type? |
| 21:17:32 | × | |57 quits (~|@2601:184:4700:2340:b998:1e2e:a37b:879c) (Quit: Client closed) |
| 21:18:00 | <Cajun> | that thing is a monster |
| 21:18:03 | <awpr> | not sure if the Wiki's definition considers that more than rank-1: "where N is the number of foralls which are nested and cannot be merged with a previous one" |
| 21:18:13 | <boxscape_> | hm I see |
| 21:18:59 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 264 seconds) |
| 21:19:15 | <awpr> | maybe the RHS can be `(forall a. t) -> Int`? |
| 21:19:20 | <hpc> | would it work with Rank2Types pre-N-merge? |
| 21:19:23 | → | mmhat joins (~mmh@55d44f19.access.ecotel.net) |
| 21:19:41 | <hpc> | if it's rank "1" |
| 21:20:08 | <awpr> | if it's actually 1, maybe it should even work without Rank2Types |
| 21:20:16 | × | SrPx_ quits (sid108780@uxbridge.irccloud.com) () |
| 21:20:44 | → | SrPx joins (sid108780@id-108780.uxbridge.irccloud.com) |
| 21:21:07 | <boxscape_> | % undefined :: Rank (ToNat 10) (forall a . a -> a) |
| 21:21:07 | <yahb> | boxscape_: ; <interactive>:24:1: error:; * Illegal polymorphic type: forall a. a -> a; Perhaps you intended to use RankNTypes; * When checking the inferred type; it :: ((((((((((forall a. a -> a) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int |
| 21:21:24 | <boxscape_> | nope |
| 21:22:26 | <hpc> | what do you know, it does work |
| 21:22:36 | <hpc> | with just ExplicitForAll in my ghci |
| 21:23:00 | <boxscape_> | hm |
| 21:23:05 | <boxscape_> | which version? |
| 21:23:10 | <awpr> | doesn't work on replit.com 8.6.5. have a .ghci with extensions enabled? |
| 21:23:22 | <boxscape_> | % :!ghci --verison |
| 21:23:22 | <yahb> | boxscape_: GHCi, version 9.0.1: https://www.haskell.org/ghc/ :? for help; ghc: unrecognised flag: --verison; Usage: For basic information, try the `--help' option. |
| 21:23:31 | <boxscape_> | --verison works? huh |
| 21:23:49 | <boxscape_> | oh wait |
| 21:23:56 | <boxscape_> | it doesn't, lol |
| 21:24:04 | <boxscape_> | it just happens to display the version in the error message |
| 21:25:23 | <Cajun> | % :!ghc -V |
| 21:25:23 | <yahb> | Cajun: The Glorious Glasgow Haskell Compilation System, version 9.0.1 |
| 21:26:03 | <hpc> | The Glorious Glasgow Haskell Compilation System, version 8.8.4 |
| 21:26:16 | → | burnsidesLlama joins (~burnsides@dhcp168-043.wadham.ox.ac.uk) |
| 21:26:38 | × | jtomas quits (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 260 seconds) |
| 21:27:04 | <boxscape_> | did you run `:set -XNoRankNTypes` first? |
| 21:27:16 | <hpc> | that's on by default now? |
| 21:27:21 | <boxscape_> | probably not |
| 21:27:24 | <boxscape_> | just want to make sure |
| 21:27:30 | <hpc> | ah |
| 21:27:34 | <hpc> | yeah, still works |
| 21:27:38 | <boxscape_> | hm, interesting |
| 21:27:58 | <geekosaur> | affected by quicklook maybe? |
| 21:28:08 | <geekosaur> | it did change some related behaviors |
| 21:28:12 | <boxscape_> | could be |
| 21:28:16 | <hpc> | quicklook? |
| 21:28:26 | <geekosaur> | the new impredicativity stuff |
| 21:28:41 | × | Trattue- quits (~Trattue@152.70.182.158) (Quit: bye) |
| 21:28:43 | <boxscape_> | new implementation of -XImpredicativeTypes |
| 21:30:34 | → | Trattue joins (~Trattue@152.70.182.158) |
| 21:31:47 | <zzz> | what have i done |
| 21:32:44 | → | pavonia joins (~user@user/siracusa) |
| 21:38:19 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) |
| 21:40:32 | → | guydb89 joins (~guy@98.40.140.117) |
| 21:41:02 | → | cjb joins (~cjb@user/cjb) |
| 21:42:59 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Ping timeout: 264 seconds) |
| 21:43:08 | × | P1RATEZ quits (piratez@user/p1ratez) (Quit: https://miguelmigs.com/sensations-remixes-part-1/) |
| 21:43:35 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 21:43:45 | × | Midjak quits (~Midjak@82-65-111-221.subs.proxad.net) (Quit: Leaving) |
| 21:45:14 | → | Midjak joins (~Midjak@82-65-111-221.subs.proxad.net) |
| 21:45:16 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 21:46:06 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) |
| 21:49:26 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 258 seconds) |
| 21:58:54 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:02:58 | × | o1lo01ol1o quits (~o1lo01ol1@2001:8a0:6d7a:df01:dde2:6c49:6076:e5ad) (Remote host closed the connection) |
| 22:03:54 | → | o1lo01ol1o joins (~o1lo01ol1@2001:8a0:6d7a:df01:dde2:6c49:6076:e5ad) |
| 22:04:42 | <Axman6> | @djinn ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((forall a. a -> a) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int |
| 22:04:58 | <lambdabot> | Djinn command failed: <<timeout>> |
| 22:05:37 | <hpc> | haha |
| 22:05:43 | <hpc> | i have never seen djinn time out before |
| 22:08:26 | × | o1lo01ol1o quits (~o1lo01ol1@2001:8a0:6d7a:df01:dde2:6c49:6076:e5ad) (Ping timeout: 245 seconds) |
| 22:10:11 | → | wroathe joins (~wroathe@50-205-197-50-static.hfc.comcastbusiness.net) |
| 22:10:11 | × | wroathe quits (~wroathe@50-205-197-50-static.hfc.comcastbusiness.net) (Changing host) |
| 22:10:11 | → | wroathe joins (~wroathe@user/wroathe) |
| 22:11:22 | <DigitalKiwi> | Axman6: lol that reminds me of a python program that will segfault |
| 22:12:06 | × | michalz quits (~michalz@185.246.204.87) (Remote host closed the connection) |
| 22:12:22 | × | Morrow quits (~Morrow@147.161.13.214) (Ping timeout: 260 seconds) |
| 22:15:07 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 258 seconds) |
| 22:15:26 | <koz> | Suppose I have a GADT 'trapping' a type variable 'a'. If I pattern-match on said GADT to reveal that 'a', how do I refer to it for a type application? |
| 22:15:33 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 22:16:15 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Remote host closed the connection) |
| 22:16:36 | <awpr> | currently, you have to get a handle on it by a signature in the pattern, with `ScopedTypeVariables`, or otherwise do something with a type that locks down that existential somehow |
| 22:16:56 | <monochrom> | \∩/ Richard Eisenberg is still using Hugs to test out new features! |
| 22:17:03 | <awpr> | there have been rumblings about allowing `TypeApplications` in patterns, which would be awesome, but not sure if it's gone anywhere |
| 22:17:16 | <c_wraith> | awpr: it's in the 9.2 release candidate and works fine |
| 22:17:18 | <koz> | awpr: How would that signature even look? |
| 22:17:20 | → | Morrow joins (~Morrow@147.161.13.214) |
| 22:18:21 | <awpr> | `data Thing where Thing :: forall a. Proxy a -> Thing` |
| 22:18:21 | <awpr> | `\ (Thing (_ :: Proxy a)) -> doSomething @a` |
| 22:18:33 | <koz> | Ah. |
| 22:18:44 | <awpr> | c_wraith: awesome, I've been looking forward to this feature |
| 22:18:52 | <DigitalKiwi> | ghc -e "putStrLn (replicate 100 '(') <> putStrLn (replicate 100 ')')"|python3 <-- the program |
| 22:19:22 | <awpr> | without it, it's not possible to get at an existential like `a` in `data Thing = Monoid a => Thing` |
| 22:20:58 | <c_wraith> | One of several reasons I want GHC 9.2 to get released :) |
| 22:21:03 | <DigitalKiwi> | how many parens you need to segfault depend on what version of python you are using lol and it might be fixed in 3.9 hmm |
| 22:21:37 | <awpr> | oh right, s/ve been/m still/ |
| 22:21:41 | <jackhill> | Franciman, geekosaur: sorry, I got distracted and wondered off. I think you gave me some good leads, which I'll envestigate later, thanks! Wrapper script is possible, but kludge, so I hopped to avoid it. Yes, the idea is to have ghc find the toolchain it wants directly from the store, and do it in such a way that Guix can see that reference. |
| 22:22:03 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) |
| 22:22:18 | <jackhill> | I looked for hints from Nix, but (maybe my Nix reading isn't good enough) didn't see any. |
| 22:22:26 | <geekosaur> | ghc will use whatebver toolchain it is presented with, so it's up to guix to select and rpesent one. which one might be a guix-level config option |
| 22:23:30 | <geekosaur> | then just pass the appropriate CC=.. to both build and install configure scripts as part of building/installing ghc (which again is up to guix, not to you) |
| 22:23:56 | <jackhill> | yeah, I bet we're missing it for the install configure scripts, since all the build time stuff works |
| 22:24:46 | <jackhill> | geekosaur: right. Well it's up to me insofar as I'm trying to teach Guix how to do it :) |
| 22:28:42 | × | mikoto-chan quits (~mikoto-ch@185.237.102.123) (Ping timeout: 260 seconds) |
| 22:30:55 | <geekosaur> | mm. I'm still thinking you just want to expose the whole toolchain. because even if you get the simple cases working, you'llk still trip over it with inline-c |
| 22:31:30 | × | Midjak quits (~Midjak@82-65-111-221.subs.proxad.net) (Quit: This computer has gone to sleep) |
| 22:32:16 | <Axman6> | hpc: yeah, I'm amazed. I rememebr back in the day type checking exponentially large expressions and that causing issues |
| 22:36:44 | <Axman6> | Who runs yahb? |
| 22:37:26 | → | greyrat joins (~greyrat@ip202.ip-51-178-215.eu) |
| 22:37:49 | <geekosaur> | mniip |
| 22:38:04 | <mniip> | hi |
| 22:43:38 | × | ArtVandelayer quits (~ArtVandel@ip174-68-147-20.lv.lv.cox.net) (Ping timeout: 260 seconds) |
| 22:44:41 | × | burnsidesLlama quits (~burnsides@dhcp168-043.wadham.ox.ac.uk) (Remote host closed the connection) |
| 22:46:18 | <jackhill> | geekosaur: that's doable it that's what's expected. |
| 22:47:22 | × | glassy quits (~glassy@92.40.175.103.threembb.co.uk) (Ping timeout: 260 seconds) |
| 22:47:58 | <geekosaur> | yeh, I'm suspecting that and probably cabal c-sources won't consult ghc to see what c compiler it expects, you'll have to arrange for it to be in $PATH some other way |
| 22:49:27 | × | ph88 quits (~ph88@2a02:8109:9e00:7e5c::3d56) (Remote host closed the connection) |
| 22:49:51 | → | ph88 joins (~ph88@2a02:8109:9e00:7e5c::3d56) |
| 22:50:23 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 258 seconds) |
| 22:53:45 | × | max22- quits (~maxime@2a01cb088335980099ed81e6a8bd9a3f.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
| 22:56:10 | × | Morrow quits (~Morrow@147.161.13.214) (Read error: Connection reset by peer) |
| 22:59:20 | → | MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
| 23:02:05 | → | k60 joins (~k60@broadband-95-84-168-218.ip.moscow.rt.ru) |
| 23:02:46 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.3) |
| 23:03:34 | → | wroathe joins (~wroathe@96-88-30-181-static.hfc.comcastbusiness.net) |
| 23:03:34 | × | wroathe quits (~wroathe@96-88-30-181-static.hfc.comcastbusiness.net) (Changing host) |
| 23:03:34 | → | wroathe joins (~wroathe@user/wroathe) |
| 23:04:32 | × | ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 23:06:46 | × | azeem quits (~azeem@2a00:801:237:7bcf:1c96:8993:d67f:c459) (Ping timeout: 245 seconds) |
| 23:06:47 | × | Ferdirand quits (~somebody@2001:4c78:2012:5000::2) (Ping timeout: 240 seconds) |
| 23:06:54 | → | Ferdirand joins (~somebody@2001:4c78:2012:5000::2) |
| 23:09:05 | <Axman6> | DigitalKiwi: Someone I know at the qfpl (lightandlight I think?) made a python, haskell... thing... which was very good at finding python bugs like that |
| 23:09:10 | × | d34df00d quits (~d34df00d@2600:1700:8c60:3a10::48) (Ping timeout: 252 seconds) |
| 23:09:27 | <DigitalKiwi> | i got it from dibblego ;) |
| 23:10:28 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 23:11:59 | <Axman6> | yeah I figured you might have |
| 23:12:22 | × | k60 quits (~k60@broadband-95-84-168-218.ip.moscow.rt.ru) (Quit: k60) |
| 23:12:36 | → | k60 joins (~user@broadband-95-84-168-218.ip.moscow.rt.ru) |
| 23:12:43 | ← | k60 parts (~user@broadband-95-84-168-218.ip.moscow.rt.ru) () |
| 23:14:01 | → | burnsidesLlama joins (~burnsides@dhcp168-043.wadham.ox.ac.uk) |
| 23:14:10 | → | fluffyballoon joins (~user@131.93.208.196) |
| 23:14:32 | → | k60 joins (~k60@broadband-95-84-168-218.ip.moscow.rt.ru) |
| 23:14:51 | × | k60 quits (~k60@broadband-95-84-168-218.ip.moscow.rt.ru) (Client Quit) |
| 23:15:23 | → | k60 joins (~k60@broadband-95-84-168-218.ip.moscow.rt.ru) |
| 23:15:57 | → | trog joins (~trog@user/trog) |
| 23:17:51 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 23:17:59 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 23:18:43 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3) |
| 23:19:59 | × | betelgeuse quits (~betelgeus@94-225-47-8.access.telenet.be) (Quit: The Lounge - https://thelounge.chat) |
| 23:20:02 | × | k60 quits (~k60@broadband-95-84-168-218.ip.moscow.rt.ru) (Ping timeout: 260 seconds) |
| 23:21:18 | × | wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds) |
| 23:21:21 | → | acidjnk_new3 joins (~acidjnk@p200300d0c703cb87414c380a9484df88.dip0.t-ipconnect.de) |
| 23:24:30 | × | acidjnk_new quits (~acidjnk@p200300d0c703cb806ce024b26c2d7c09.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 23:24:38 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 23:25:24 | <dibblego> | sup yooz |
| 23:27:44 | <Axman6> | I reckon I'll be able to come visit youse all soon, jackdk keeps saying I should come up |
| 23:28:44 | <dibblego> | yeah harry ap |
| 23:28:51 | × | Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.) |
| 23:29:49 | <Axman6> | Would've been sooner if gladys hasn't wrecked the joint for everyone |
| 23:30:27 | <dibblego> | yeah she's a knob — come and breathe all over me pls |
| 23:31:12 | <jackdk> | The one upside is that it dented her political forcefield enough that the corruption stuff may possibly potentially catch up with her maybe |
| 23:31:48 | <dibblego> | 'ere ya go, 28 Nov, seeya there https://i.imgur.com/O7jaEbR.png |
| 23:32:19 | → | argento joins (~argent0@168-227-96-26.ptr.westnet.com.ar) |
| 23:39:30 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 23:40:01 | × | mmhat quits (~mmh@55d44f19.access.ecotel.net) (Quit: WeeChat 3.3) |
| 23:42:22 | → | wyrd joins (~wyrd@gateway/tor-sasl/wyrd) |
| 23:47:37 | × | guydb89 quits (~guy@98.40.140.117) (Quit: leaving) |
| 23:51:33 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Remote host closed the connection) |
| 23:51:54 | → | guydb89 joins (~guy@98.40.140.117) |
| 23:54:01 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 258 seconds) |
| 23:54:01 | × | MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 23:54:15 | → | MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
All times are in UTC on 2021-10-18.