Logs: freenode/#haskell
| 2020-09-30 11:01:34 | → | p0a joins (~user@unaffiliated/p0a) |
| 2020-09-30 11:02:22 | <p0a> | Hello I have a type that has some fields, say data Foo = Foo { a,b,c :: Int }. Now I want a MaybeFoo that is like Foo except all fields are Maybe Int |
| 2020-09-30 11:02:50 | <p0a> | The idea is that I can search for Foo values in a list, equality == is only tested on the Just values |
| 2020-09-30 11:04:14 | × | snakemasterflex quits (~snakemast@213.100.206.23) (Ping timeout: 256 seconds) |
| 2020-09-30 11:05:52 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-30 11:10:28 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2020-09-30 11:14:04 | → | madjestic joins (~madjestic@86-88-72-244.fixed.kpn.net) |
| 2020-09-30 11:15:54 | × | bitmagie quits (~Thunderbi@200116b806af9800a5686823a67cc6e9.dip.versatel-1u1.de) (Quit: bitmagie) |
| 2020-09-30 11:16:06 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-30 11:16:20 | <merijn> | p0a: You can just define Foo as "Foo f = Foo { a, b, c :: f Int }" and then use "Foo Identity" as the "default" and "Foo Maybe" for the second case? |
| 2020-09-30 11:18:12 | × | cpressey quits (~cpressey@79-72-200-19.dynamic.dsl.as9105.com) (Quit: WeeChat 1.9.1) |
| 2020-09-30 11:18:29 | <p0a> | merijn: ah that's really nice, thank you |
| 2020-09-30 11:18:39 | <p0a> | do you think 'f' is a good choice for that? |
| 2020-09-30 11:19:06 | <p0a> | This is probably irrelevant but I'm curious if there's a better suggestoin |
| 2020-09-30 11:20:05 | <merijn> | p0a: 'f' is just a variable (usually associated with Functors, hence the choice here) |
| 2020-09-30 11:20:21 | <p0a> | Got it, thank you |
| 2020-09-30 11:20:40 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2020-09-30 11:21:09 | <merijn> | p0a: Here's a nice blogpost that involves slightly more complicated type machinery for an even fancier version of that: https://reasonablypolymorphic.com/blog/higher-kinded-data/ |
| 2020-09-30 11:21:42 | <merijn> | p0a: In fact, they literally use a "Person" "MaybePerson" example :p |
| 2020-09-30 11:22:05 | <p0a> | Heh! |
| 2020-09-30 11:22:09 | <p0a> | That's awesome, thanks. I will read it |
| 2020-09-30 11:22:29 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
| 2020-09-30 11:23:43 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 2020-09-30 11:24:41 | <merijn> | p0a: I'd personally probably skip the whole Generic boilerplate, because it's kinda complicated, but the first part is certainly very useful |
| 2020-09-30 11:25:16 | <p0a> | As I glanced over it |
| 2020-09-30 11:25:20 | <p0a> | it got kinda scary towards the end |
| 2020-09-30 11:25:37 | <p0a> | but if it is interesting I will read it |
| 2020-09-30 11:25:50 | <merijn> | p0a: You can simply not use the scary part :) |
| 2020-09-30 11:26:08 | <merijn> | p0a: The scary part is basically "using GHC Generics to avoid even writing the validate implementation" |
| 2020-09-30 11:26:11 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-30 11:26:25 | → | pjb joins (~t@2a01cb04063ec50038cdaa6488b186d3.ipv6.abo.wanadoo.fr) |
| 2020-09-30 11:26:27 | <p0a> | I see. I may not even need a validate myself |
| 2020-09-30 11:26:30 | <merijn> | p0a: You can just use the datatype with a manual written validation/whatever and it'll "Just Work" |
| 2020-09-30 11:26:33 | <p0a> | but we'll see, it depends on what the author is talking about |
| 2020-09-30 11:26:45 | <p0a> | whoops, low battery... gotta go. Thank you again |
| 2020-09-30 11:26:55 | × | filwisher quits (~filwisher@cpc76738-dals23-2-0-cust186.20-2.cable.virginm.net) (Ping timeout: 258 seconds) |
| 2020-09-30 11:26:56 | × | p0a quits (~user@unaffiliated/p0a) (Quit: bye) |
| 2020-09-30 11:30:11 | → | snakemasterflex joins (~snakemast@213.100.206.23) |
| 2020-09-30 11:30:37 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds) |
| 2020-09-30 11:32:52 | <kuribas> | merijn: I prefer generics over higher kinded stuff |
| 2020-09-30 11:33:23 | <kuribas> | or better, eot, when you don't need the heavy stuff that comes with generics: https://hackage.haskell.org/package/generics-eot-0.4.0.1/docs/Generics-Eot.html |
| 2020-09-30 11:33:53 | <merijn> | kuribas: Those two don't even have the same usecase(s) so that seems like a weird comment |
| 2020-09-30 11:34:15 | <merijn> | Especially given the context of a blogpost using both for very different things |
| 2020-09-30 11:34:53 | → | bahamas joins (~lucian@188.24.181.166) |
| 2020-09-30 11:34:53 | × | bahamas quits (~lucian@188.24.181.166) (Changing host) |
| 2020-09-30 11:34:53 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 2020-09-30 11:36:25 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-30 11:39:54 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 265 seconds) |
| 2020-09-30 11:40:58 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 2020-09-30 11:41:07 | <maerwald> | Is there a way to discover whether a thread is currently blocked? |
| 2020-09-30 11:42:11 | × | tinga quits (~tinga@5-168-208-80-pool.fiber.fcom.ch) (Ping timeout: 240 seconds) |
| 2020-09-30 11:45:23 | → | filwisher joins (~filwisher@cpc76738-dals23-2-0-cust186.20-2.cable.virginm.net) |
| 2020-09-30 11:46:30 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-30 11:48:22 | × | alx741_ quits (~alx741@181.196.69.150) (Ping timeout: 256 seconds) |
| 2020-09-30 11:49:07 | <kuribas> | merijn: yeah, the two aren't really related :) |
| 2020-09-30 11:49:43 | <kuribas> | merijn: I dislike the HKD approach, because it is rather messy, and usually not that hard to avoid. |
| 2020-09-30 11:49:47 | × | jgt quits (~jgt@195.225.146.77) (Ping timeout: 240 seconds) |
| 2020-09-30 11:49:58 | → | alp joins (~alp@2a01:e0a:58b:4920:bc07:244b:4df4:499a) |
| 2020-09-30 11:50:01 | × | filwisher quits (~filwisher@cpc76738-dals23-2-0-cust186.20-2.cable.virginm.net) (Ping timeout: 264 seconds) |
| 2020-09-30 11:50:23 | → | idhugo joins (~idhugo@users-1190.st.net.au.dk) |
| 2020-09-30 11:50:25 | × | plutoniix quits (~q@175.176.222.7) (Quit: Leaving) |
| 2020-09-30 11:51:01 | → | fweht joins (uid404746@gateway/web/irccloud.com/x-hoeehmttzipzbkkn) |
| 2020-09-30 11:51:24 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds) |
| 2020-09-30 11:51:52 | × | BalterNotz quits (ca420871@202.66.8.113) (Remote host closed the connection) |
| 2020-09-30 11:53:46 | → | Saten-san joins (~Saten-san@ip-81-11-153-13.dsl.scarlet.be) |
| 2020-09-30 11:53:51 | × | Saten-san quits (~Saten-san@ip-81-11-153-13.dsl.scarlet.be) (Client Quit) |
| 2020-09-30 11:54:10 | → | Saten-san joins (~Saten-san@ip-81-11-153-13.dsl.scarlet.be) |
| 2020-09-30 11:55:14 | × | Saten-san quits (~Saten-san@ip-81-11-153-13.dsl.scarlet.be) (Client Quit) |
| 2020-09-30 11:56:37 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-30 11:57:53 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) (Quit: Quit.) |
| 2020-09-30 12:00:02 | × | DireFog quits (~DireFog@s91904426.blix.com) () |
| 2020-09-30 12:00:41 | × | Alleria_ quits (~AllahuAkb@69.202.254.168) (Ping timeout: 265 seconds) |
| 2020-09-30 12:00:54 | → | alx741_ joins (~alx741@186.178.110.227) |
| 2020-09-30 12:01:02 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds) |
| 2020-09-30 12:01:57 | → | ggole joins (~ggole@2001:8003:8119:7200:f871:c0ad:b761:dbf4) |
| 2020-09-30 12:03:09 | → | avdb joins (~avdb@ip-81-11-153-13.dsl.scarlet.be) |
| 2020-09-30 12:06:19 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 2020-09-30 12:06:44 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-30 12:08:27 | hackage | hakyll 4.13.4.1 - A static website compiler library https://hackage.haskell.org/package/hakyll-4.13.4.1 (JasperVanDerJeugt) |
| 2020-09-30 12:11:09 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 2020-09-30 12:11:59 | → | urodna joins (~urodna@unaffiliated/urodna) |
| 2020-09-30 12:13:34 | ← | fweht parts (uid404746@gateway/web/irccloud.com/x-hoeehmttzipzbkkn) () |
| 2020-09-30 12:14:56 | → | coot_ joins (~coot@37.30.60.139.nat.umts.dynamic.t-mobile.pl) |
| 2020-09-30 12:15:07 | × | sagax quits (~sagax_nb@213.138.71.146) (Remote host closed the connection) |
| 2020-09-30 12:16:52 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-30 12:17:13 | → | mu_ joins (~mu@unaffiliated/mu) |
| 2020-09-30 12:18:04 | × | coot quits (~coot@37.30.59.210.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 256 seconds) |
| 2020-09-30 12:18:15 | coot_ | is now known as coot |
| 2020-09-30 12:19:03 | → | filwisher joins (~filwisher@cpc76738-dals23-2-0-cust186.20-2.cable.virginm.net) |
| 2020-09-30 12:19:52 | → | cpressey joins (~cpressey@79-72-200-19.dynamic.dsl.as9105.com) |
| 2020-09-30 12:21:27 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2020-09-30 12:21:54 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) () |
| 2020-09-30 12:25:17 | × | kindaro quits (1f08d381@h31-8-211-129.dyn.bashtel.ru) (Remote host closed the connection) |
| 2020-09-30 12:27:03 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-30 12:28:07 | × | mu_ quits (~mu@unaffiliated/mu) (Ping timeout: 240 seconds) |
| 2020-09-30 12:29:55 | × | chaosmasttter quits (~chaosmast@p200300c4a70aba018412238bea948280.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 2020-09-30 12:29:59 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) |
| 2020-09-30 12:31:07 | × | snakemasterflex quits (~snakemast@213.100.206.23) (Ping timeout: 240 seconds) |
| 2020-09-30 12:31:07 | × | John20 quits (~John@82.46.59.122) (Ping timeout: 240 seconds) |
| 2020-09-30 12:31:18 | × | Takumo quits (takumo@unaffiliated/takumokatekari) (Quit: WeeChat 1.9.1) |
All times are in UTC.