Logs: freenode/#haskell
| 2020-09-22 19:55:18 | <cr0ssw1nd> | lol, I forgot that there is default for cd |
| 2020-09-22 19:55:35 | <cr0ssw1nd> | started to use /tmp a lot last time |
| 2020-09-22 19:56:13 | <maerwald> | those are all excellent choices |
| 2020-09-22 19:56:22 | × | Hollows quits (59943f26@89.148.63.38) (Remote host closed the connection) |
| 2020-09-22 19:56:25 | <maerwald> | a gentleman choice |
| 2020-09-22 19:56:45 | <cr0ssw1nd> | :) |
| 2020-09-22 20:00:53 | × | Alleria_ quits (~AllahuAkb@2604:2000:1484:26:f9f7:186a:b38:3c1e) (Ping timeout: 244 seconds) |
| 2020-09-22 20:01:03 | <sm[m]> | cr0ssw1nd: and some things are just too much hassle to build from source (pandoc) so you might find brew/nix/apt quicker |
| 2020-09-22 20:01:40 | <cr0ssw1nd> | can imagine, rpm in my case |
| 2020-09-22 20:01:46 | <cr0ssw1nd> | but probably I should try nix already |
| 2020-09-22 20:02:14 | <sm[m]> | rpm/apt tend to be very out of date, is all |
| 2020-09-22 20:02:25 | <maerwald> | cr0ssw1nd: nix... if you have time to waste :p |
| 2020-09-22 20:02:37 | × | Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-157-9.dhcp-dynamic.fibreop.nb.bellaliant.net) (Read error: Connection reset by peer) |
| 2020-09-22 20:03:25 | × | oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 240 seconds) |
| 2020-09-22 20:03:28 | → | ixlun joins (~matthew@213.205.241.18) |
| 2020-09-22 20:03:29 | <cr0ssw1nd> | gentoo already isn't that popular? :) |
| 2020-09-22 20:03:33 | <cr0ssw1nd> | for this purpose |
| 2020-09-22 20:03:43 | × | thir quits (~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 2020-09-22 20:04:06 | <sm[m]> | it's popular only among gentoo users |
| 2020-09-22 20:04:40 | → | thir joins (~thir@p200300f27f0fc60094e773283d7bf825.dip0.t-ipconnect.de) |
| 2020-09-22 20:04:50 | <ixlun> | Is there a mapZip function? |
| 2020-09-22 20:05:07 | <ixlun> | (a -> b) -> [a] -> [(a, b)] |
| 2020-09-22 20:05:57 | <phadej> | :t \f -> map (id &&& f) |
| 2020-09-22 20:05:58 | <lambdabot> | (a -> c') -> [a] -> [(a, c')] |
| 2020-09-22 20:06:02 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-09-22 20:06:24 | <ixlun> | whoa, not seen `&&&` before |
| 2020-09-22 20:07:46 | <sm[m]> | nice |
| 2020-09-22 20:08:01 | <cr0ssw1nd> | sm[m], yeah, gentoo is probably more about wasting cpu time than your own |
| 2020-09-22 20:08:19 | <maerwald> | yeah, I wasted a lot of time on it :p |
| 2020-09-22 20:09:02 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 2020-09-22 20:09:23 | × | thir quits (~thir@p200300f27f0fc60094e773283d7bf825.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 2020-09-22 20:10:03 | <phadej> | ixlun: I consider that to be slightly code-golfy, `map (\x -> (x, f x))` is not that bad either |
| 2020-09-22 20:10:40 | → | gmt joins (~gmt@pool-71-105-108-44.nycmny.fios.verizon.net) |
| 2020-09-22 20:11:55 | × | danvet_ quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds) |
| 2020-09-22 20:12:45 | × | carlomagno quits (~cararell@inet-hqmc02-o.oracle.com) (Ping timeout: 240 seconds) |
| 2020-09-22 20:12:56 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 2020-09-22 20:14:30 | → | carlomagno joins (~cararell@inet-hqmc02-o.oracle.com) |
| 2020-09-22 20:15:22 | → | acidjnk_new joins (~acidjnk@p5487d26a.dip0.t-ipconnect.de) |
| 2020-09-22 20:15:31 | <ixlun> | Indeed, I think if I came back to this code and saw your previous answer, I'd be scratching my head. |
| 2020-09-22 20:15:34 | <dolio> | Using (&&&) is longer once you account for importing Control.Arrow. |
| 2020-09-22 20:15:50 | × | gmt quits (~gmt@pool-71-105-108-44.nycmny.fios.verizon.net) (Ping timeout: 272 seconds) |
| 2020-09-22 20:15:50 | <ixlun> | (I need to read up on Arrows) |
| 2020-09-22 20:16:23 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-22 20:16:44 | × | ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
| 2020-09-22 20:16:57 | × | acidjnk_new2 quits (~acidjnk@p200300d0c7365847cc6a0d2723d0128d.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 2020-09-22 20:18:22 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 272 seconds) |
| 2020-09-22 20:20:47 | → | Alleria_ joins (~AllahuAkb@2604:2000:1484:26:e98f:8381:852e:ca0) |
| 2020-09-22 20:21:47 | × | thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds) |
| 2020-09-22 20:22:32 | <merijn> | ixlun: tbh, you don't really |
| 2020-09-22 20:22:46 | <merijn> | I'd say Arrow is a mostly dead abstraction that's fallen in near complete disuse |
| 2020-09-22 20:23:13 | <merijn> | Most of the stuff it's used for has been superseded by a mix of Applicative, Category, and Profunctor |
| 2020-09-22 20:23:55 | <merijn> | The &&& and *** combinators are sometimes used for code golfing, but their tuple instance honestly has fairly little to do with Arrows |
| 2020-09-22 20:25:18 | <sshine> | I prefer Data.Bifunctor for tuple jugling |
| 2020-09-22 20:25:25 | → | adamwespiser joins (~adam_wesp@209.6.42.110) |
| 2020-09-22 20:25:40 | <merijn> | Yeah, but &&& doesn't work with bifunctor :p |
| 2020-09-22 20:25:52 | <sshine> | :t (&&&) |
| 2020-09-22 20:25:53 | <lambdabot> | Arrow a => a b c -> a b c' -> a b (c, c') |
| 2020-09-22 20:25:57 | → | gmt joins (~gmt@pool-71-105-108-44.nycmny.fios.verizon.net) |
| 2020-09-22 20:26:21 | → | ubert joins (~Thunderbi@178.165.128.28.wireless.dyn.drei.com) |
| 2020-09-22 20:27:12 | <merijn> | That'd require Biapplicative |
| 2020-09-22 20:27:14 | × | acidjnk_new quits (~acidjnk@p5487d26a.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 2020-09-22 20:27:23 | <merijn> | actually, no, not even then |
| 2020-09-22 20:27:26 | <sshine> | heh :) |
| 2020-09-22 20:27:39 | → | isovector1 joins (~isovector@node-1w7jr9squrfoy3fci95ksrhpu.ipv6.telus.net) |
| 2020-09-22 20:28:18 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-09-22 20:30:24 | × | adamwespiser quits (~adam_wesp@209.6.42.110) (Ping timeout: 272 seconds) |
| 2020-09-22 20:30:46 | → | z0 joins (~z0@bl15-163-199.dsl.telepac.pt) |
| 2020-09-22 20:32:50 | <z0> | hi. can we create a 'newtype N = N Int' that inherits everything Int has? |
| 2020-09-22 20:33:16 | <z0> | basically i want a type synonym that doesnt typecheck with the original type |
| 2020-09-22 20:34:03 | <sshine> | z0, there are many ways to automatically derive, but I think you have to be explicit about what you derive. |
| 2020-09-22 20:34:08 | <solonarv> | z0: *everything, automatically*? no. but with GeneralizedNewtypeDeriving, you can inherit a lot of things |
| 2020-09-22 20:34:41 | <z0> | that's what i thought. thanks |
| 2020-09-22 20:34:52 | <solonarv> | newtype N = N Int deriving newtype (Eq, Ord, Num, Real, Integral, Show, Read, ... more typeclasses here ...) |
| 2020-09-22 20:35:28 | <z0> | wouldnt it be useful to be able to do that? |
| 2020-09-22 20:35:36 | <sshine> | hmm, maybe. but also shaky. |
| 2020-09-22 20:35:42 | → | irreg joins (97f8d1fe@pub-151-248-209-254.dh-hfc.datazug.ch) |
| 2020-09-22 20:35:43 | <z0> | why shaky? |
| 2020-09-22 20:36:27 | <irreg> | @pl \x y -> x y |
| 2020-09-22 20:36:28 | <lambdabot> | id |
| 2020-09-22 20:36:41 | <sshine> | I'm not sure where to start, or if what I'm thinking is the most fundamental argument to not want that. but I'd like that if my data type has some ability, this ability is listed next to the data type definition. |
| 2020-09-22 20:37:15 | × | murphy_ quits (~murphy_@2604:2000:1281:8a9e:e3b0:32cd:63ad:fdb4) (Ping timeout: 272 seconds) |
| 2020-09-22 20:37:23 | <sshine> | so with derived abilities, at least it says where I derived it. otherwise I get a soup of unknown behaviors once I derive everything from something that derives everything from something else. :) |
| 2020-09-22 20:37:47 | → | murphy_ joins (~murphy_@2604:2000:1281:8a9e:f9e2:b2b0:776f:fb0d) |
| 2020-09-22 20:38:04 | <z0> | well, you can have 'type N = Int' and that wont bother you. the difference is that i want to make sure im not passing Dollars where i should be passing Mass (dumb example) |
| 2020-09-22 20:38:05 | → | thir joins (~thir@p200300f27f0fc60094e773283d7bf825.dip0.t-ipconnect.de) |
| 2020-09-22 20:38:08 | <monochrom> | It is both useful to inherit and useful to forbid inheriting. There lies the conflict. |
| 2020-09-22 20:38:22 | <sshine> | what if I create a data type that has two fields (so isomorphic to a tuple), where I derive everything from each of those components, and somehow those components have overlapping instances? |
| 2020-09-22 20:38:58 | hackage | sequence-formats 1.5.1.3 - A package with basic parsing utilities for several Bioinformatic data formats. https://hackage.haskell.org/package/sequence-formats-1.5.1.3 (stephan_schiffels) |
| 2020-09-22 20:39:16 | <monochrom> | sshine, but then with two fields it wouldn't be newtype. |
| 2020-09-22 20:39:23 | <sshine> | monochrom, no, it wouldn't. |
| 2020-09-22 20:39:31 | <z0> | this wouldnt be a derivation, it would be like a synonym that doesnt typecheck with the original type |
| 2020-09-22 20:39:53 | <monochrom> | Here the fundamental conflict is how different people have opposite use cases of newtype and therefore opposite expectations. |
| 2020-09-22 20:39:57 | <sshine> | monochrom, so maybe this is useful to consider as a newtype-only feature. but are there deriving strategies that only work on newtypes so far? |
| 2020-09-22 20:40:29 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-22 20:40:57 | <z0> | https://downloads.haskell.org/~ghc/5.04.3/docs/html/users_guide/newtype-deriving.html |
| 2020-09-22 20:41:22 | <phadej> | hmm, that's ancient docs |
| 2020-09-22 20:41:22 | × | ixlun quits (~matthew@213.205.241.18) (Read error: Connection reset by peer) |
| 2020-09-22 20:42:15 | <monochrom> | I had a copy of GHC 4.something, but it got corrupted. |
| 2020-09-22 20:42:17 | <sshine> | z0, have you seen the safe-money package? https://hackage.haskell.org/package/safe-money - https://ren.zone/articles/safe-money - this is one approach to providing domain-specific wrappers that try to mix convenience (e.g. 3.14 :: Dense "USD") with type-safety. |
| 2020-09-22 20:45:07 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds) |
All times are in UTC.