Logs: freenode/#haskell
| 2020-11-26 08:23:10 | <jle`> | jophish: if it matches the specific behavior you want, you can try using Ap as a wrapper |
| 2020-11-26 08:23:36 | <dminuoso> | koz_: To be fair, I recently started longing for caseS |
| 2020-11-26 08:23:45 | <dminuoso> | Which I think fits in that hole |
| 2020-11-26 08:23:53 | <koz_> | caseS? |
| 2020-11-26 08:24:03 | <dminuoso> | selective case-of |
| 2020-11-26 08:24:13 | <koz_> | dminuoso: I don't follow, sorry. |
| 2020-11-26 08:24:28 | <dminuoso> | koz_: a selective functor equivalent for do-notation |
| 2020-11-26 08:25:28 | <koz_> | Wait, that's a thing? |
| 2020-11-26 08:25:32 | <dminuoso> | No |
| 2020-11-26 08:25:33 | <dminuoso> | branch :: Selective f => f (Either a b) -> f (a -> c) -> f (b -> c) -> f c |
| 2020-11-26 08:25:48 | <dminuoso> | So sort of cross between `branch` and `case-of` |
| 2020-11-26 08:26:29 | <dminuoso> | https://gist.github.com/dminuoso/7acab978112cc0f0a7f0288bd87d3378 you can write this currently |
| 2020-11-26 08:26:57 | <koz_> | Huh, interesting. |
| 2020-11-26 08:27:35 | <dminuoso> | But it only works for a+b and its hard to composable |
| 2020-11-26 08:27:44 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds) |
| 2020-11-26 08:28:20 | <koz_> | How would you generalize that beyond Either though? |
| 2020-11-26 08:28:23 | → | michalz joins (~user@185.246.204.47) |
| 2020-11-26 08:28:25 | <koz_> | I don't think you can really. |
| 2020-11-26 08:28:45 | × | monochrom quits (trebla@216.138.220.146) (Ping timeout: 240 seconds) |
| 2020-11-26 08:29:20 | <dminuoso> | I think you could write a version of `branch` that works with generics |
| 2020-11-26 08:29:47 | <dminuoso> | over arbitrary sum types |
| 2020-11-26 08:30:20 | <koz_> | gbranch |
| 2020-11-26 08:30:32 | → | borne joins (~fritjof@200116b864b8bd00394a967dc8ef4e61.dip.versatel-1u1.de) |
| 2020-11-26 08:30:40 | → | Fractalis joins (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) |
| 2020-11-26 08:30:47 | → | geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
| 2020-11-26 08:32:23 | <jophish> | jle`: you think I'm made of Applicative instances?! |
| 2020-11-26 08:33:18 | × | Fractalis quits (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) (Client Quit) |
| 2020-11-26 08:33:29 | <n0042> | =$ |
| 2020-11-26 08:34:21 | <koz_> | jophish: I sure am. |
| 2020-11-26 08:37:06 | <jophish> | :D |
| 2020-11-26 08:38:52 | → | chele joins (~chele@ip5b416ea2.dynamic.kabel-deutschland.de) |
| 2020-11-26 08:43:18 | × | gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 272 seconds) |
| 2020-11-26 08:44:01 | hackage | typson-esqueleto 0.1.0.0 - Typson Esqueleto Integration https://hackage.haskell.org/package/typson-esqueleto-0.1.0.0 (aaronallen8455) |
| 2020-11-26 08:46:09 | → | gproto23 joins (~gproto23@unaffiliated/gproto23) |
| 2020-11-26 08:50:03 | × | centril quits (~centril@213-66-146-92-no250.tbcn.telia.com) (Ping timeout: 256 seconds) |
| 2020-11-26 08:50:58 | → | kritzefitz joins (~kritzefit@fw-front.credativ.com) |
| 2020-11-26 08:54:20 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-11-26 08:55:50 | → | Boomerang_ joins (~Boomerang@xd520f68c.cust.hiper.dk) |
| 2020-11-26 08:56:57 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 2020-11-26 08:58:06 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection) |
| 2020-11-26 08:58:37 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds) |
| 2020-11-26 09:01:36 | × | Sheilong quits (uid293653@gateway/web/irccloud.com/x-bojsghgzllzoprwv) (Quit: Connection closed for inactivity) |
| 2020-11-26 09:03:39 | → | adm_ joins (~adm@43.229.89.234) |
| 2020-11-26 09:04:35 | → | centril joins (~centril@213-66-146-92-no250.tbcn.telia.com) |
| 2020-11-26 09:07:35 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 2020-11-26 09:07:43 | × | adm_ quits (~adm@43.229.89.234) (Ping timeout: 246 seconds) |
| 2020-11-26 09:10:17 | → | wonko7 joins (~wonko7@2a01:e35:2ffb:7040:55f1:c3a3:cdbe:bf52) |
| 2020-11-26 09:10:29 | → | bifunc2 joins (bifunc2@gateway/vpn/protonvpn/bifunc2) |
| 2020-11-26 09:11:07 | <bifunc2> | What are some popular ways to create fixed-length containers, where the length is fixed in the type? |
| 2020-11-26 09:11:10 | → | mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
| 2020-11-26 09:12:07 | <dminuoso> | There really aren't any. |
| 2020-11-26 09:12:11 | <[exa]> | bifunc2: like this? https://hackage.haskell.org/package/fixed-vector |
| 2020-11-26 09:12:33 | <dminuoso> | (By that I mean they aren't very popular) |
| 2020-11-26 09:12:43 | <[exa]> | yeah that's very true |
| 2020-11-26 09:12:54 | <bifunc2> | why are they not popular? |
| 2020-11-26 09:13:13 | <bifunc2> | btw is this related to dependent types? i heard dependent types are not yet in haskell, at all |
| 2020-11-26 09:13:15 | <[exa]> | once you get the sizes into the typesystem, everyone starts to demand more "smart" operations from it, and you end up requiring dependent types |
| 2020-11-26 09:13:17 | <dminuoso> | This takes you straight into dependent typing |
| 2020-11-26 09:13:18 | <[exa]> | which is hard |
| 2020-11-26 09:14:28 | <bifunc2> | ok maybe it's best for now to assert equal lengths at runtime |
| 2020-11-26 09:15:33 | <[exa]> | bifunc2: making runtime fail as soon as possible on detected error usually gives a good assurance that the handling is right, esp. if you have at least a single automated integration test |
| 2020-11-26 09:16:21 | → | dyeplexer joins (~lol@unaffiliated/terpin) |
| 2020-11-26 09:17:38 | <[exa]> | the other approach is to write the code so that the error is not representable, e.g. make a tiny layer that always handles the sizes right™ and build upon it |
| 2020-11-26 09:18:01 | × | st8less quits (~st8less@2603:a060:11fd:0:e465:6770:e76d:da2a) (Ping timeout: 272 seconds) |
| 2020-11-26 09:19:35 | → | st8less joins (~st8less@inet-167-224-197-181.isp.ozarksgo.net) |
| 2020-11-26 09:27:05 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2020-11-26 09:28:35 | × | geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 256 seconds) |
| 2020-11-26 09:28:43 | → | Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it) |
| 2020-11-26 09:30:02 | → | thc202 joins (~thc202@unaffiliated/thc202) |
| 2020-11-26 09:33:08 | × | plutoniix quits (~q@ppp-223-24-94-50.revip6.asianet.co.th) (Quit: Leaving) |
| 2020-11-26 09:34:17 | → | kuribas joins (~user@ptr-25vy0i7d0jyf2exvnea.18120a2.ip6.access.telenet.be) |
| 2020-11-26 09:37:02 | → | fendor joins (~fendor@178.165.131.166.wireless.dyn.drei.com) |
| 2020-11-26 09:38:41 | → | supercoven joins (~Supercove@196.244.192.54) |
| 2020-11-26 09:38:42 | × | supercoven quits (~Supercove@196.244.192.54) (Max SendQ exceeded) |
| 2020-11-26 09:38:56 | → | supercoven joins (~Supercove@196.244.192.54) |
| 2020-11-26 09:38:57 | × | supercoven quits (~Supercove@196.244.192.54) (Max SendQ exceeded) |
| 2020-11-26 09:39:11 | → | supercoven joins (~Supercove@196.244.192.54) |
| 2020-11-26 09:39:12 | × | supercoven quits (~Supercove@196.244.192.54) (Max SendQ exceeded) |
| 2020-11-26 09:39:26 | → | supercoven joins (~Supercove@196.244.192.54) |
| 2020-11-26 09:39:27 | × | supercoven quits (~Supercove@196.244.192.54) (Max SendQ exceeded) |
| 2020-11-26 09:39:41 | → | supercoven joins (~Supercove@196.244.192.54) |
| 2020-11-26 09:39:42 | × | supercoven quits (~Supercove@196.244.192.54) (Max SendQ exceeded) |
| 2020-11-26 09:43:34 | × | invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 265 seconds) |
| 2020-11-26 09:46:44 | × | Boomerang_ quits (~Boomerang@xd520f68c.cust.hiper.dk) (Quit: Leaving) |
| 2020-11-26 09:46:55 | × | michalz quits (~user@185.246.204.47) (Read error: Connection reset by peer) |
| 2020-11-26 09:50:12 | <merijn> | dminuoso: Yes there are, sized Vector :) |
| 2020-11-26 09:50:30 | <merijn> | https://hackage.haskell.org/package/vector-sized is pretty great |
| 2020-11-26 09:52:52 | <dminuoso> | https://packdeps.haskellers.com/reverse/vector-sized |
| 2020-11-26 09:52:54 | <dminuoso> | yes, very popular. |
| 2020-11-26 09:52:55 | × | hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-kfwargodivspffqj) (Quit: Connection closed for inactivity) |
| 2020-11-26 09:52:55 | → | michalz joins (~user@185.246.204.61) |
| 2020-11-26 09:55:21 | × | tsrt^ quits (tsrt@ip98-184-89-2.mc.at.cox.net) () |
| 2020-11-26 09:56:00 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-11-26 09:56:19 | × | michalz quits (~user@185.246.204.61) (Read error: Connection reset by peer) |
| 2020-11-26 09:57:52 | <dminuoso> | Also, vector-sized has a very defty dependency footprint |
| 2020-11-26 09:57:59 | <dminuoso> | Since it pulls in adjunctions |
| 2020-11-26 09:58:59 | → | exlipse joins (~exlipse@4e69b241.skybroadband.com) |
| 2020-11-26 09:59:05 | <dminuoso> | And that gives you half the kmettiverse |
| 2020-11-26 09:59:28 | <dminuoso> | Anyway. They asked for "popular" not "great" |
| 2020-11-26 10:00:49 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds) |
All times are in UTC.