Logs: liberachat/#haskell
| 2021-05-22 21:11:07 | gambpang | is now known as gambolingpangoli |
| 2021-05-22 21:11:16 | gambolingpangoli | is now known as gambpang |
| 2021-05-22 21:12:53 | × | biberu quits (~biberu@user/biberu) (Quit: ZNC - https://znc.in) |
| 2021-05-22 21:14:08 | → | sm joins (~sm@plaintextaccounting/sm) |
| 2021-05-22 21:15:16 | <gentauro> | 22:40 < slowButPresent> gentauro: that is when we fork. Some examples: OSD, OpenOffice, XFree86. Its bad for everyone. Even Oracle hasn't found a way to make money at it |
| 2021-05-22 21:15:24 | <gentauro> | slowButPresent: but it's a good way to kill a project :) |
| 2021-05-22 21:15:46 | × | heath quits (~heath@68.68.64.38) (Ping timeout: 264 seconds) |
| 2021-05-22 21:15:53 | × | pretty_dumm_guy quits (~trottel@217.138.220.198) (Quit: WeeChat 3.2-dev) |
| 2021-05-22 21:16:27 | → | pretty_dumm_guy joins (~trottel@217.138.220.198) |
| 2021-05-22 21:18:45 | × | sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 244 seconds) |
| 2021-05-22 21:23:49 | → | noteventime joins (b07deb54@ircip1.mibbit.com) |
| 2021-05-22 21:23:55 | × | juhp quits (~juhp@128.106.188.199) (Quit: juhp) |
| 2021-05-22 21:24:11 | → | juhp joins (~juhp@128.106.188.199) |
| 2021-05-22 21:24:18 | × | juhp quits (~juhp@128.106.188.199) (Remote host closed the connection) |
| 2021-05-22 21:24:30 | → | juhp joins (~juhp@128.106.188.199) |
| 2021-05-22 21:25:18 | <pflanze> | What is the proper way to go about changing say a list data type to a Data.Vector in a Haskell program? |
| 2021-05-22 21:26:01 | <pflanze> | Changing the data types is the easy part; the difficult one is to replace all the calls to map, catMaybes, lefts, rights etc. |
| 2021-05-22 21:26:24 | <pflanze> | I'm missing an abstraction here. |
| 2021-05-22 21:26:48 | <pflanze> | Now that I'm saying this out loud, there is one, functors, no? |
| 2021-05-22 21:26:53 | <monochrom> | fmap works for both. |
| 2021-05-22 21:26:56 | → | sm joins (~sm@172.56.44.47) |
| 2021-05-22 21:26:56 | × | sm quits (~sm@172.56.44.47) (Changing host) |
| 2021-05-22 21:26:56 | → | sm joins (~sm@plaintextaccounting/sm) |
| 2021-05-22 21:27:04 | <pflanze> | yep. OK. Now how about lefts etc. |
| 2021-05-22 21:27:10 | <monochrom> | all Foldable methods work for both |
| 2021-05-22 21:27:27 | <pflanze> | Haskell is really full of legacy, right? |
| 2021-05-22 21:27:34 | <monochrom> | IIRC Vector has "filter" too. |
| 2021-05-22 21:28:10 | <pflanze> | Clojure has a sequence type. So, map filter etc. would automatically work without code change. |
| 2021-05-22 21:28:53 | <pflanze> | (I don't know how much of the catMaybes, lefts etc. things it has though.) |
| 2021-05-22 21:29:52 | <pflanze> | BTW, I'm probably going to want to change to an *eager* Vector type soon. Haven't checked yet whether that will be Data.Vector or I'll have to go through the same circus again :) |
| 2021-05-22 21:31:58 | × | sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 264 seconds) |
| 2021-05-22 21:33:34 | john2gb3 | is now known as betelgeuse |
| 2021-05-22 21:33:46 | → | zikey joins (~zikey@197.253.219.210) |
| 2021-05-22 21:34:41 | × | betelgeuse quits (~john2gb@94-225-47-8.access.telenet.be) (Quit: The Lounge - https://thelounge.chat) |
| 2021-05-22 21:35:25 | → | betelgeuse joins (~john2gb@94-225-47-8.access.telenet.be) |
| 2021-05-22 21:37:58 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 2021-05-22 21:40:17 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 2021-05-22 21:40:55 | × | fendor_ quits (~fendor@77.119.128.108.wireless.dyn.drei.com) (Remote host closed the connection) |
| 2021-05-22 21:41:04 | <infinisil> | pflanze: If you want abstraction over sequence-type things, check out https://hackage.haskell.org/package/mono-traversable |
| 2021-05-22 21:43:28 | × | noteventime quits (b07deb54@ircip1.mibbit.com) (Quit: https://mibbit.com Online IRC Client) |
| 2021-05-22 21:43:58 | <pflanze> | Cool, thanks for that link |
| 2021-05-22 21:44:00 | → | yumaikas94 joins (~yumaikas@2601:281:c700:4240:8461:c97a:2a51:f49a) |
| 2021-05-22 21:44:34 | → | Morrow joins (~MorrowM_@147.161.15.179) |
| 2021-05-22 21:45:12 | → | Erutuon joins (~Erutuon@97-116-14-180.mpls.qwest.net) |
| 2021-05-22 21:45:25 | × | wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-05-22 21:45:34 | × | coot quits (~coot@37.30.58.122.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 2021-05-22 21:45:56 | → | wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com) |
| 2021-05-22 21:46:50 | k | is now known as niko |
| 2021-05-22 21:47:17 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2021-05-22 21:49:44 | <pflanze> | Hmm, the mono-traversable docs say: "in the upcoming GHC 7.10, using Functor, Foldable, and Traversable will become common-place. (..) map from the prelude will work on all data types that are a Functor" |
| 2021-05-22 21:50:26 | <pflanze> | Why did I have to change my code from using map to Vector.map then? |
| 2021-05-22 21:50:34 | × | wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Ping timeout: 264 seconds) |
| 2021-05-22 21:50:39 | <pflanze> | Using GHC 8.8.4 |
| 2021-05-22 21:51:42 | <boxscape> | pflanze they decided not to change the type of map, fmap is the generic one |
| 2021-05-22 21:51:51 | <pflanze> | Aha |
| 2021-05-22 21:52:42 | <boxscape> | I think mainly because they don't want confusing error message for beginners, where if you say e.g. `map [1,2,3] (+5)` it suddenly mentions Functors instead of lists |
| 2021-05-22 21:52:58 | <pflanze> | Ok |
| 2021-05-22 21:53:12 | → | nnm_ joins (~nnm@2a00:1370:811d:8e45:e6a3:c3d2:f62c:e07) |
| 2021-05-22 21:53:54 | × | nnm__ quits (~nnm@2a00:1370:811d:8e45:e6a3:c3d2:f62c:e07) (Read error: Connection reset by peer) |
| 2021-05-22 21:54:59 | <pflanze> | I wonder if there's a "Modern Haskell" book or so that teaches how to navigate Haskell "for the good parts"? |
| 2021-05-22 21:55:33 | → | nighmi joins (~felix@port-92-196-54-216.dynamic.as20676.net) |
| 2021-05-22 21:57:57 | <enikar> | what are "the goods parts"? |
| 2021-05-22 21:58:11 | <monochrom> | Some blogger's myth. |
| 2021-05-22 21:58:27 | <monochrom> | In here we don't draw a line. |
| 2021-05-22 21:59:18 | <monochrom> | We draw a line for good uses and abuses. |
| 2021-05-22 21:59:44 | <monochrom> | For example the list type is not "good" or "bad". But there are good uses and abuses. |
| 2021-05-22 21:59:49 | <monochrom> | PEBKAC as usual. |
| 2021-05-22 21:59:52 | <enikar> | my question was only rethorical. |
| 2021-05-22 22:00:32 | <monochrom> | Yeah, unfortunately Snoyman blogged to make people believe there are "good parts" and "bad parts". |
| 2021-05-22 22:01:11 | <monochrom> | That blog entry was basically unheard of by the regulars here because we don't read his blog. |
| 2021-05-22 22:01:38 | <Vq> | n+k patterns were removed, I guess enough people deemed that a "bad part". |
| 2021-05-22 22:01:38 | → | ddellacosta joins (~ddellacos@89.46.62.122) |
| 2021-05-22 22:03:27 | <boxscape> | Certainly seems like if they had never existed they never would be able to make it into the language today |
| 2021-05-22 22:03:37 | <boxscape> | the use case seems fairly narrow |
| 2021-05-22 22:04:13 | × | sondre quits (~sondrelun@cm-84.212.100.140.getinternet.no) (Ping timeout: 244 seconds) |
| 2021-05-22 22:04:16 | <boxscape> | (mostly "demonstrate neat little introductory examples of how Haskell looks like math", I would think) |
| 2021-05-22 22:04:47 | <boxscape> | though I'm not sure why I'm going on about this, not like I have to convince anyone |
| 2021-05-22 22:05:42 | × | wonko_ quits (~wjc@62.115.229.50) (Ping timeout: 264 seconds) |
| 2021-05-22 22:05:56 | <pflanze> | I was using the "good parts" sentence referring to JavaScript. I haven't read any blog post on this about Haskell. |
| 2021-05-22 22:06:10 | × | ddellacosta quits (~ddellacos@89.46.62.122) (Ping timeout: 264 seconds) |
| 2021-05-22 22:06:28 | <Vq> | boxscape: I think that's exactly it. |
| 2021-05-22 22:07:45 | <pflanze> | What I basically meant is, "how do I write good Haskell code that's generic or easy to modify, what do I need to know to achieve this?" |
| 2021-05-22 22:07:58 | × | pretty_dumm_guy quits (~trottel@217.138.220.198) (Quit: WeeChat 3.2-dev) |
| 2021-05-22 22:09:27 | <boxscape> | Matt Parson's is writing a "Haskell in production" book which seems like it might go in that direction, but I haven't actually read it yet |
| 2021-05-22 22:09:31 | <boxscape> | ( https://leanpub.com/production-haskell ) |
| 2021-05-22 22:09:32 | <pflanze> | Like, I know to avoid a range of non-total functions like `head`, now `map`, now fmap is for Functor not Traversable, so it's a bit confusing to see which are the right bits for which cases. |
| 2021-05-22 22:09:42 | <boxscape> | also his name is not a genetive, actually, it's Matt Parsons |
| 2021-05-22 22:10:48 | <boxscape> | pflanze a good primer on Functor and Traversable etc is the Typeclassopedia |
| 2021-05-22 22:10:52 | <boxscape> | @where typeclassopedia |
| 2021-05-22 22:10:52 | <lambdabot> | http://www.haskell.org/haskellwiki/Typeclassopedia |
| 2021-05-22 22:11:10 | <pflanze> | Thanks, I'll check those out |
| 2021-05-22 22:21:41 | × | gehmehgeh quits (~ircuser1@user/gehmehgeh) (Quit: Leaving) |
| 2021-05-22 22:27:04 | → | post-factum21 joins (~post-fact@2403:6200:8000:a6:1944:23a:d705:4f2b) |
| 2021-05-22 22:27:08 | × | post-factum21 quits (~post-fact@2403:6200:8000:a6:1944:23a:d705:4f2b) (K-Lined) |
| 2021-05-22 22:27:36 | × | zikey quits (~zikey@197.253.219.210) () |
| 2021-05-22 22:30:57 | → | opal25 joins (~opal@2804:18:401a:9314:1:0:1203:7ada) |
| 2021-05-22 22:31:01 | × | opal25 quits (~opal@2804:18:401a:9314:1:0:1203:7ada) (K-Lined) |
| 2021-05-22 22:31:59 | × | amahl quits (~amahl@dxv5skybfp5vl4n44dmbt-3.rev.dnainternet.fi) (Ping timeout: 272 seconds) |
| 2021-05-22 22:44:51 | × | Morrow quits (~MorrowM_@147.161.15.179) (Ping timeout: 272 seconds) |
| 2021-05-22 22:47:44 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
All times are in UTC.