Logs: freenode/#haskell
| 2021-03-18 20:07:56 | <yahb> | mniip: |
| 2021-03-18 20:08:00 | <mniip> | % show# 0# |
| 2021-03-18 20:08:00 | <yahb> | mniip: "0#" |
| 2021-03-18 20:08:13 | <mniip> | this doesn't violate levity polymorphism restrictions |
| 2021-03-18 20:08:16 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 276 seconds) |
| 2021-03-18 20:08:33 | → | ukari joins (~ukari@unaffiliated/ukari) |
| 2021-03-18 20:08:43 | <koz_> | I admit I was a tad unclear. My intended statement was 'at this present moment, no instances of anything exist for Int# in code'. Not 'there can be no ...'. |
| 2021-03-18 20:08:58 | <edmundnoble> | Well now one does ;) |
| 2021-03-18 20:09:10 | <koz_> | I generally don't talk of instances in non-constructive terms. :P |
| 2021-03-18 20:09:13 | <edmundnoble> | I actually would not be surprised if there was an instance of `Typeable` |
| 2021-03-18 20:09:18 | <mniip> | edward is working on fixing that :P |
| 2021-03-18 20:09:21 | <koz_> | That's a good question actually. |
| 2021-03-18 20:09:28 | <mniip> | % typeRep @Int# |
| 2021-03-18 20:09:28 | <yahb> | mniip: ; <interactive>:38:10: error:; * Expected kind `k0 -> *', but `Int#' has kind `TYPE 'GHC.Exts.IntRep'; * In the type `Int#'; In the expression: typeRep @Int#; In an equation for `it': it = typeRep @Int# |
| 2021-03-18 20:09:30 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-03-18 20:09:40 | × | pk37 quits (7aa1ce54@122.161.206.84) (Client Quit) |
| 2021-03-18 20:09:51 | <mniip> | % Type.Reflection.typeRep @Int# |
| 2021-03-18 20:09:51 | <yahb> | mniip: Int# |
| 2021-03-18 20:09:55 | <mniip> | so it does |
| 2021-03-18 20:10:02 | × | mikoto-chan quits (~anass@gateway/tor-sasl/mikoto-chan) (Ping timeout: 268 seconds) |
| 2021-03-18 20:10:03 | <dolio> | Having 1700 backpack packages isn't going to fix anything. |
| 2021-03-18 20:10:05 | <mniip> | I bet it also has an instance of (~) Int# |
| 2021-03-18 20:10:15 | <edmundnoble> | Hahahaha |
| 2021-03-18 20:10:19 | <edmundnoble> | Yes true |
| 2021-03-18 20:10:30 | <edmundnoble> | Cheeky |
| 2021-03-18 20:10:33 | <koz_> | I wonder if it has Coercible? |
| 2021-03-18 20:10:39 | <mniip> | sure does |
| 2021-03-18 20:10:52 | × | hive-mind quits (~hivemind@rrcs-67-53-148-69.west.biz.rr.com) (Ping timeout: 276 seconds) |
| 2021-03-18 20:10:56 | <edmundnoble> | With unliftednewtypes I'd hope so |
| 2021-03-18 20:11:04 | <mniip> | % newtype N = N Int# |
| 2021-03-18 20:11:04 | <yahb> | mniip: |
| 2021-03-18 20:11:05 | <koz_> | TIL! |
| 2021-03-18 20:11:09 | → | malumore joins (~malumore@151.62.122.146) |
| 2021-03-18 20:11:11 | <koz_> | Thank you #haskell. |
| 2021-03-18 20:11:16 | <mniip> | % show# (coerce (N 3#) :: Int#) |
| 2021-03-18 20:11:17 | <yahb> | mniip: "3#" |
| 2021-03-18 20:11:25 | → | hive-mind joins (~hivemind@rrcs-67-53-148-69.west.biz.rr.com) |
| 2021-03-18 20:11:49 | <edmundnoble> | There intuitively seems to be many less useful instances of levity-polymorphic type classes than there are levity-monomorphic ones, for sure |
| 2021-03-18 20:12:08 | <mniip> | there are many issues |
| 2021-03-18 20:12:28 | <edmundnoble> | The lack of `Num` is the obviously painful one that really takes you into Perl-land when you want to do math on unboxed stuff |
| 2021-03-18 20:12:43 | <koz_> | edmundnoble: Yep, been there, and it felt like writing Core. |
| 2021-03-18 20:13:07 | <edmundnoble> | I recently mangled my code to do math on unboxed stuff, and let me tell you |
| 2021-03-18 20:13:10 | <edmundnoble> | Half the allocations |
| 2021-03-18 20:13:15 | <edmundnoble> | Exact same time taken |
| 2021-03-18 20:13:22 | <edmundnoble> | Facepalm |
| 2021-03-18 20:13:34 | <Uniaika> | Thanks to you all |
| 2021-03-18 20:13:40 | <edmundnoble> | Same live set size too :P |
| 2021-03-18 20:13:48 | <edmundnoble> | Np uwuni |
| 2021-03-18 20:13:56 | → | timCF joins (~i.tkachuk@m91-129-99-43.cust.tele2.ee) |
| 2021-03-18 20:14:29 | <koz_> | When do we get 'Sorts are Calling Conventions'? :P |
| 2021-03-18 20:14:32 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2021-03-18 20:14:43 | <Uniaika> | edmundnoble: UwU |
| 2021-03-18 20:15:15 | <koz_> | Uniaika: Nyan nyan. |
| 2021-03-18 20:15:32 | → | sz0 joins (uid110435@gateway/web/irccloud.com/x-tywxgqqycltuflco) |
| 2021-03-18 20:15:38 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 2021-03-18 20:15:47 | <timCF> | Hello! I have a question. Is type `Either a b` really a functor? Just thinking that functor class implies 1 type parameter, but here we have 2 - it not matching. |
| 2021-03-18 20:15:55 | <Uniaika> | koz_: :D |
| 2021-03-18 20:16:05 | <Uniaika> | timCF: nope, Either a b is not a functor |
| 2021-03-18 20:16:07 | <Uniaika> | that being said |
| 2021-03-18 20:16:09 | <koz_> | timCF: 'Either a b' isn't a functor. 'Either a' is. |
| 2021-03-18 20:16:13 | <Uniaika> | (Either a) is a functor |
| 2021-03-18 20:16:18 | <koz_> | (for all a, even) |
| 2021-03-18 20:16:19 | <Uniaika> | and the type parameter is b |
| 2021-03-18 20:16:37 | <Uniaika> | same thing with (a,b) tuples |
| 2021-03-18 20:16:50 | <koz_> | And a -> b. |
| 2021-03-18 20:16:53 | <Uniaika> | timCF: actually, Viktor Dukhovni authored a nice write-up about it |
| 2021-03-18 20:17:00 | <Uniaika> | let me find that for you |
| 2021-03-18 20:19:11 | <[exa]> | timCF: the 1 parameter should be "missing" in the definition, the functor (Either a) is in fact something like `Either a _`. That way, `fmap (f :: b->c)` can cleanly turn `((Either a) b)` to `((Either a) c)` without trying to interfere with the "base" definition. I added the parentheses there for clarity. |
| 2021-03-18 20:19:16 | → | coot joins (~coot@37.30.58.223.nat.umts.dynamic.t-mobile.pl) |
| 2021-03-18 20:20:27 | × | rj_ quits (~x@gateway/tor-sasl/rj) (Remote host closed the connection) |
| 2021-03-18 20:20:43 | <timCF> | Uniaika: koz_: [exa]: thanks! I did found definition in Prelude, indeed it matches what you did said https://hackage.haskell.org/package/base-4.14.1.0/docs/src/Data.Either.html#line-133 |
| 2021-03-18 20:21:01 | <[exa]> | timCF: if you would like to see the theoretical reason, fire up ghci and, with :k, try to see the kind of: `Int`, `[Int]`, `[]`, `Maybe`, `Maybe Int` and say `Num` and `Functor` |
| 2021-03-18 20:24:08 | <Uniaika> | timCF: https://gitlab.haskell.org/ghc/ghc/-/blob/master/libraries/base/GHC/Base.hs#L515-563 |
| 2021-03-18 20:24:13 | <Uniaika> | read that |
| 2021-03-18 20:25:12 | × | puke quits (~vroom@217.138.252.170) (Remote host closed the connection) |
| 2021-03-18 20:26:09 | <monochrom> | You can understand "Either X Y" as "(Either X) Y". |
| 2021-03-18 20:26:33 | <Uniaika> | timCF: if you want a typeclass that allows you to have both, that's Bifunctor |
| 2021-03-18 20:27:15 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-03-18 20:27:18 | <timCF> | Uniaika: monochrom: thanks! |
| 2021-03-18 20:31:21 | <koz_> | Uniaika: Bifunctor <3. |
| 2021-03-18 20:31:21 | × | Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 265 seconds) |
| 2021-03-18 20:31:31 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds) |
| 2021-03-18 20:31:44 | × | mikoto-c1 quits (~anass@gateway/tor-sasl/mikoto-chan) (Quit: mikoto-c1) |
| 2021-03-18 20:31:46 | <Uniaika> | koz_: yus <3 |
| 2021-03-18 20:32:10 | <monochrom> | trifunctor = 3 |
| 2021-03-18 20:32:19 | <koz_> | monochrom: OMG ROFL |
| 2021-03-18 20:32:23 | <koz_> | I didn't even see that. |
| 2021-03-18 20:32:31 | <geekosaur> | heh |
| 2021-03-18 20:32:50 | <koz_> | Thus, Functor <3 |
| 2021-03-18 20:32:56 | → | puke joins (~vroom@217.138.252.170) |
| 2021-03-18 20:33:02 | <Uniaika> | monochrom: hahaha |
| 2021-03-18 20:33:27 | <monochrom> | Where other people have associative memory, I have pun memory. |
| 2021-03-18 20:34:10 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-3-8.w83-200.abo.wanadoo.fr) |
| 2021-03-18 20:34:34 | → | mikoto-chan joins (~anass@gateway/tor-sasl/mikoto-chan) |
| 2021-03-18 20:35:00 | → | aarvar joins (~foewfoiew@2601:602:a080:fa0:99f2:16e7:abb7:2d80) |
| 2021-03-18 20:35:18 | × | mikoto-chan quits (~anass@gateway/tor-sasl/mikoto-chan) (Client Quit) |
| 2021-03-18 20:35:32 | × | knupfer quits (~Thunderbi@200116b82c0621002447c2923b633e13.dip.versatel-1u1.de) (Ping timeout: 244 seconds) |
| 2021-03-18 20:35:32 | × | danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 260 seconds) |
| 2021-03-18 20:35:54 | × | hiroaki quits (~hiroaki@2a02:8108:8c40:2bb8:de28:da9b:e021:bab6) (Ping timeout: 265 seconds) |
| 2021-03-18 20:37:32 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
All times are in UTC.