Logs: liberachat/#haskell
| 2021-07-04 16:58:20 | <turlando> | Right, I think I will look into lens/microlens, thanks everybody :) |
| 2021-07-04 16:58:36 | → | cheater1__ joins (~Username@user/cheater) |
| 2021-07-04 16:58:48 | × | cheater quits (~Username@user/cheater) (Ping timeout: 268 seconds) |
| 2021-07-04 16:58:49 | cheater1__ | is now known as cheater |
| 2021-07-04 16:58:58 | → | edward1 joins (~edward@cpc69060-oxfd26-2-0-cust374.4-3.cable.virginm.net) |
| 2021-07-04 17:00:02 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 272 seconds) |
| 2021-07-04 17:00:19 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 2021-07-04 17:00:50 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.0.1) |
| 2021-07-04 17:03:50 | × | cheater quits (~Username@user/cheater) (Ping timeout: 272 seconds) |
| 2021-07-04 17:04:01 | → | cheater joins (~Username@user/cheater) |
| 2021-07-04 17:04:14 | → | Topsi joins (~Tobias@dyndsl-095-033-017-135.ewe-ip-backbone.de) |
| 2021-07-04 17:04:38 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 2021-07-04 17:07:57 | × | hunji quits (~hunji@ip-86.net-89-3-14.rev.numericable.fr) (Quit: Client closed) |
| 2021-07-04 17:08:54 | × | edward1 quits (~edward@cpc69060-oxfd26-2-0-cust374.4-3.cable.virginm.net) (Ping timeout: 272 seconds) |
| 2021-07-04 17:10:08 | × | MorrowM quits (~MorrowM_@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 252 seconds) |
| 2021-07-04 17:14:48 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 2021-07-04 17:15:51 | → | timCF_ joins (~timCF@m91-129-104-218.cust.tele2.ee) |
| 2021-07-04 17:16:29 | × | timCF quits (~timCF@m91-129-104-218.cust.tele2.ee) (Quit: Client closed) |
| 2021-07-04 17:16:39 | × | timCF_ quits (~timCF@m91-129-104-218.cust.tele2.ee) (Client Quit) |
| 2021-07-04 17:17:02 | → | norias joins (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net) |
| 2021-07-04 17:18:18 | × | alx741 quits (~alx741@186.178.109.174) (Ping timeout: 240 seconds) |
| 2021-07-04 17:19:06 | × | warnz quits (~warnz@2600:1700:77c0:5610:20b2:48fc:c4b7:f8df) (Ping timeout: 240 seconds) |
| 2021-07-04 17:19:08 | → | timCF joins (~timCF@m91-129-104-218.cust.tele2.ee) |
| 2021-07-04 17:19:40 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 252 seconds) |
| 2021-07-04 17:20:11 | × | timCF quits (~timCF@m91-129-104-218.cust.tele2.ee) (Client Quit) |
| 2021-07-04 17:21:08 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 2021-07-04 17:21:56 | × | LukeHoersten quits (~LukeHoers@user/lukehoersten) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-07-04 17:22:50 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 272 seconds) |
| 2021-07-04 17:23:17 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:5061:15ea:118b:e58d) |
| 2021-07-04 17:24:44 | → | edward1 joins (~edward@cpc69060-oxfd26-2-0-cust374.4-3.cable.virginm.net) |
| 2021-07-04 17:24:52 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 2021-07-04 17:25:49 | × | dunkeln_ quits (~dunkeln@188.71.194.238) (Ping timeout: 265 seconds) |
| 2021-07-04 17:27:30 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:5061:15ea:118b:e58d) (Ping timeout: 240 seconds) |
| 2021-07-04 17:29:24 | <dsal> | I've never really looked into microlens. I guess I should do that. |
| 2021-07-04 17:30:56 | <dsal> | Oh, it doesn't seem to provide prisms, which is rather important. |
| 2021-07-04 17:32:49 | → | alx741 joins (~alx741@186.178.108.123) |
| 2021-07-04 17:37:13 | <turlando> | Half an hour later, it still feels like a lot of overhead for waling a tree and something that can be done with 10 lines of lisp. There really isn't another way? |
| 2021-07-04 17:37:26 | <turlando> | s/waling/walking/ |
| 2021-07-04 17:38:32 | → | dunkeln_ joins (~dunkeln@188.71.194.238) |
| 2021-07-04 17:39:30 | <dsal> | Well, you can do this: |
| 2021-07-04 17:39:34 | <dsal> | secondB :: T -> Maybe Int |
| 2021-07-04 17:39:34 | <dsal> | secondB (A (B _ x)) = Just x |
| 2021-07-04 17:39:34 | <dsal> | secondB _ = Nothing |
| 2021-07-04 17:39:36 | <dsal> | For that one use case. |
| 2021-07-04 17:40:34 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 256 seconds) |
| 2021-07-04 17:40:37 | <dsal> | But passing in the structure is a bit more difficult since you need a way to describe the condition. |
| 2021-07-04 17:40:37 | <turlando> | It works for small paths, but for longer it becomes an unreasonable mess :\ |
| 2021-07-04 17:41:13 | <turlando> | Yep, and at the end I would just be re-inventing lens, just buggier |
| 2021-07-04 17:41:25 | <dsal> | You can do a similar thing like this: |
| 2021-07-04 17:41:27 | <dsal> | λ> listToMaybe [ x | (A (B _ x)) <- [t] ] |
| 2021-07-04 17:41:27 | <dsal> | Just 3 |
| 2021-07-04 17:41:48 | <dsal> | But yeah, expressing it as a prism is most natural to me. |
| 2021-07-04 17:41:58 | <hendursaga> | tam: I also have that issue - I still haven't gotten a reply :( |
| 2021-07-04 17:42:16 | <energizer> | is there a place on the internet that collects type signatures for various important computing things? i'm thinking of "what is the type signature of a linker" etc |
| 2021-07-04 17:44:24 | × | ukari quits (~ukari@user/ukari) (Remote host closed the connection) |
| 2021-07-04 17:45:02 | → | MorrowM joins (~MorrowM_@bzq-110-168-31-106.red.bezeqint.net) |
| 2021-07-04 17:45:38 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 272 seconds) |
| 2021-07-04 17:45:49 | → | ukari joins (~ukari@user/ukari) |
| 2021-07-04 17:45:55 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 2021-07-04 17:58:33 | × | ukari quits (~ukari@user/ukari) (Remote host closed the connection) |
| 2021-07-04 17:59:44 | → | ukari joins (~ukari@user/ukari) |
| 2021-07-04 18:00:01 | → | derelict joins (~derelict@user/derelict) |
| 2021-07-04 18:01:15 | → | chris_ joins (~chris@81.96.113.213) |
| 2021-07-04 18:02:52 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-07-04 18:03:29 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-07-04 18:06:41 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 258 seconds) |
| 2021-07-04 18:07:10 | × | edward1 quits (~edward@cpc69060-oxfd26-2-0-cust374.4-3.cable.virginm.net) (Ping timeout: 272 seconds) |
| 2021-07-04 18:13:40 | × | samhh quits (~samhh@90.252.112.94) (Ping timeout: 265 seconds) |
| 2021-07-04 18:13:48 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 2021-07-04 18:14:02 | → | fakehacker[m] joins (~fakehacke@2001:470:69fc:105::b5f0) |
| 2021-07-04 18:14:02 | <fakehacker[m]> | Hi! I can't figure this out. https://paste.tomsmeding.com/MeVtwSw6 < I have written dateRangeParser in do-notation and I would like to write the equivalent function without do-notation but I can't figure out how to do it |
| 2021-07-04 18:14:02 | <fakehacker[m]> | https://paste.tomsmeding.com/piObTlbu < There's an updated paste with the type included. Forgot that in the first paste |
| 2021-07-04 18:15:20 | → | Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com) |
| 2021-07-04 18:16:58 | → | haritz joins (~hrtz@user/haritz) |
| 2021-07-04 18:17:39 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 2021-07-04 18:18:53 | → | dunj3 joins (~dunj3@2001:16b8:3050:bb00:92ff:fb46:3b31:9dc1) |
| 2021-07-04 18:18:57 | → | cheater1__ joins (~Username@user/cheater) |
| 2021-07-04 18:19:12 | × | cheater quits (~Username@user/cheater) (Ping timeout: 272 seconds) |
| 2021-07-04 18:19:20 | cheater1__ | is now known as cheater |
| 2021-07-04 18:19:36 | <geekosaur> | you're missing some types from that paste |
| 2021-07-04 18:19:55 | <geekosaur> | you're also missing the Range constructor in your rewrite, which is probably why it's wrong |
| 2021-07-04 18:20:40 | <geekosaur> | I defined Day as a type alias for Int but that leaves ReadM and Parser |
| 2021-07-04 18:21:14 | <fakehacker[m]> | Day is from Data.Time.Calendar |
| 2021-07-04 18:21:37 | <fakehacker[m]> | ReadM and Parser is from optparse-applicative |
| 2021-07-04 18:21:57 | <fakehacker[m]> | And yes, the issue is that I can't figure out how to add the Range constructor |
| 2021-07-04 18:22:58 | <fakehacker[m]> | I can get a 'Parser (Day, Day)' no problem |
| 2021-07-04 18:33:31 | → | cheater1__ joins (~Username@user/cheater) |
| 2021-07-04 18:33:44 | <geekosaur> | it's not real pretty, which often follows frome these point-free kind of things... https://paste.tomsmeding.com/Jg1nKYth |
| 2021-07-04 18:33:46 | × | cheater quits (~Username@user/cheater) (Ping timeout: 272 seconds) |
| 2021-07-04 18:33:49 | → | fengctor joins (~fengctor@bras-base-ngflon0508w-grc-11-76-68-2-143.dsl.bell.ca) |
| 2021-07-04 18:33:53 | cheater1__ | is now known as cheater |
| 2021-07-04 18:34:42 | <fakehacker[m]> | Oh, makes sense I didn't figure that one out |
| 2021-07-04 18:35:24 | <fakehacker[m]> | I thought it wouldn't be too awkward considering it wasn't particularly complicated in the do-notation |
| 2021-07-04 18:36:09 | <geekosaur> | this is part of why ApplicativeDo exists |
| 2021-07-04 18:36:19 | → | TranquilEcho joins (~grom@user/tranquilecho) |
| 2021-07-04 18:36:19 | <fakehacker[m]> | Hehe, alright |
| 2021-07-04 18:37:23 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-07-04 18:37:47 | <fakehacker[m]> | So apparently it's possible to remove one pair of brackets |
| 2021-07-04 18:37:51 | <fakehacker[m]> | Makes it marginally less awkward |
| 2021-07-04 18:38:18 | <geekosaur> | probably, I didn't bother checking fixities but just treated it as pointfree |
All times are in UTC.