Logs: liberachat/#haskell
| 2021-07-17 15:18:03 | → | Guest9 joins (~Guest9@43.242.116.127) |
| 2021-07-17 15:18:12 | → | superbil joins (~superbil@1-34-176-171.HINET-IP.hinet.net) |
| 2021-07-17 15:18:12 | → | adminll joins (~thedawn@user/thedawn) |
| 2021-07-17 15:18:30 | <boxscape> | maerwald: oh actually the TH version links to https://hackage.haskell.org/package/optics-core-0.4/docs/Optics-Label.html as preferred solution |
| 2021-07-17 15:19:03 | <boxscape> | that's the OverloadedLabels version I was remembering |
| 2021-07-17 15:19:04 | × | ByronJohnson quits (~bairyn@mail.digitalkingdom.org) (Ping timeout: 268 seconds) |
| 2021-07-17 15:19:12 | → | ByronJohnson joins (~bairyn@mail.digitalkingdom.org) |
| 2021-07-17 15:19:41 | → | Ariakenom joins (~Ariakenom@c83-255-154-140.bredband.tele2.se) |
| 2021-07-17 15:21:31 | → | Null_A joins (~null_a@2601:645:8700:2290:b55a:33c2:1e1d:f229) |
| 2021-07-17 15:22:44 | <maerwald> | so there you could also define custom LabelOptic instances that descend into a structure? |
| 2021-07-17 15:23:27 | <boxscape> | that seems plausible but I haven't tried doing it |
| 2021-07-17 15:23:47 | <maerwald> | I'm leaning towards makeClassy, but I'm not sure |
| 2021-07-17 15:24:25 | <boxscape> | I like makeClassy, the main reason I would avoid it personally is that the documentation advises against it |
| 2021-07-17 15:25:40 | <maerwald> | so what does LabelOptic give over HasField? |
| 2021-07-17 15:25:43 | → | Ariakenom_ joins (~Ariakenom@c83-255-154-140.bredband.tele2.se) |
| 2021-07-17 15:26:17 | <texasmynsted> | What is the modern answer to haskell records? Lens? |
| 2021-07-17 15:26:49 | <maerwald> | only difference I see is labelOptic is `Optic` and HasField is a `Lens` |
| 2021-07-17 15:28:24 | <boxscape> | hm I'm not sure what the concrete differences are |
| 2021-07-17 15:29:14 | → | elf_fortrez joins (~elf_fortr@adsl-72-50-6-20.prtc.net) |
| 2021-07-17 15:29:33 | × | Ariakenom quits (~Ariakenom@c83-255-154-140.bredband.tele2.se) (Ping timeout: 268 seconds) |
| 2021-07-17 15:29:35 | → | Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com) |
| 2021-07-17 15:30:52 | <boxscape> | texasmynsted: there are a few answers to this: In the next version, OverloadedRecordDot is being introduces, which allows one to write something like `personA.company.name`. (Updates are a bit iffy but will improve over time.) In the meantime, lens is definitely still widely used, though optics is a replacement which aims to have better error messages. There is also some research going into row types, but that's further out. |
| 2021-07-17 15:30:55 | <boxscape> | s/next version/next version of GHC |
| 2021-07-17 15:31:36 | → | nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
| 2021-07-17 15:32:08 | <boxscape> | (though regarding row types, the vinyl records package allows something similar today) |
| 2021-07-17 15:33:11 | → | hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com) |
| 2021-07-17 15:35:02 | → | Ariakenom__ joins (~Ariakenom@c83-255-154-140.bredband.tele2.se) |
| 2021-07-17 15:35:20 | × | enemeth79 quits (uid309041@id-309041.tooting.irccloud.com) (Quit: Connection closed for inactivity) |
| 2021-07-17 15:35:21 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 2021-07-17 15:35:30 | × | elf_fortrez quits (~elf_fortr@adsl-72-50-6-20.prtc.net) (Quit: Client closed) |
| 2021-07-17 15:36:09 | × | nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 255 seconds) |
| 2021-07-17 15:38:40 | × | oso quits (~oso@2601:58c:c080:a950:e67d:b4e2:c5be:433f) (Ping timeout: 246 seconds) |
| 2021-07-17 15:38:48 | × | Ariakenom_ quits (~Ariakenom@c83-255-154-140.bredband.tele2.se) (Ping timeout: 268 seconds) |
| 2021-07-17 15:39:45 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 255 seconds) |
| 2021-07-17 15:40:03 | → | favonia joins (~favonia@user/favonia) |
| 2021-07-17 15:43:24 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 258 seconds) |
| 2021-07-17 15:43:44 | × | kuribas quits (~user@ptr-25vy0i9ash1yu2tubi9.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 2021-07-17 15:44:31 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 2021-07-17 15:45:43 | × | keutoi quits (~keutoi@157.48.202.216) (Quit: Reconnecting) |
| 2021-07-17 15:45:53 | → | keutoi joins (~keutoi@157.48.202.216) |
| 2021-07-17 15:46:54 | → | chris_ joins (~chris@81.96.113.213) |
| 2021-07-17 15:47:16 | × | Guest77 quits (~Guest77@2402:e280:2117:297:e041:4ae1:dd3c:1f08) (Quit: Client closed) |
| 2021-07-17 15:53:52 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 2021-07-17 15:55:47 | × | hendursa1 quits (~weechat@user/hendursaga) (Ping timeout: 244 seconds) |
| 2021-07-17 15:56:16 | → | hendursa1 joins (~weechat@user/hendursaga) |
| 2021-07-17 15:56:22 | → | arjun joins (~user@user/arjun) |
| 2021-07-17 15:59:48 | → | Guest14 joins (~Guest14@76-236-222-208.lightspeed.tukrga.sbcglobal.net) |
| 2021-07-17 16:03:05 | <Guest14> | Hello :) |
| 2021-07-17 16:03:40 | <Guest14> | I am new to Haskell and am working through the Real World Haskell Book |
| 2021-07-17 16:03:57 | → | econo joins (uid147250@user/econo) |
| 2021-07-17 16:04:27 | <Guest14> | I have a basic question if anyone would care to listen |
| 2021-07-17 16:06:02 | <allbery_b> | best to just ask it rather than asking to ask |
| 2021-07-17 16:06:11 | allbery_b | is now known as geekosaur |
| 2021-07-17 16:06:23 | <davean> | asking to ask is why I wasn't helping |
| 2021-07-17 16:07:44 | <Guest14> | splitWith _ [] = [] |
| 2021-07-17 16:07:45 | <Guest14> | splitWith a xs = [pre ++ [x]] ++ next |
| 2021-07-17 16:07:45 | <Guest14> | where |
| 2021-07-17 16:07:46 | <Guest14> | (pre, x:suf) = span a xs |
| 2021-07-17 16:07:46 | <Guest14> | next = splitWith a suf |
| 2021-07-17 16:08:10 | <Guest14> | I have this program and I run into a problem with x:suf when span a xs is [] becuase there is no head |
| 2021-07-17 16:09:30 | × | chomwitt quits (~Pitsikoko@athedsl-32487.home.otenet.gr) (Ping timeout: 240 seconds) |
| 2021-07-17 16:09:34 | <int-e> | > let f = splitAt 1 in (f "abc", f "") |
| 2021-07-17 16:09:36 | <lambdabot> | (("a","bc"),("","")) |
| 2021-07-17 16:11:31 | <int-e> | (So maybe use splitAt instead of the x:suf pattern.) |
| 2021-07-17 16:11:39 | <maerwald> | was there a question yet? |
| 2021-07-17 16:11:45 | <davean> | No |
| 2021-07-17 16:12:09 | <Guest14> | Ok I will give that a try thanks |
| 2021-07-17 16:12:10 | <int-e> | They described a problem, close enough. |
| 2021-07-17 16:12:35 | <maerwald> | They also described the answer |
| 2021-07-17 16:12:38 | <maerwald> | "there is no head" |
| 2021-07-17 16:12:47 | <int-e> | @where paste |
| 2021-07-17 16:12:47 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 2021-07-17 16:13:04 | <int-e> | maerwald: That's the reason, but not a solution for the problem? |
| 2021-07-17 16:13:06 | int-e | shrugs |
| 2021-07-17 16:13:10 | <maerwald> | So my answer is: yes |
| 2021-07-17 16:13:28 | <int-e> | Well, so sorry for trying to be helpful. |
| 2021-07-17 16:13:33 | × | dajoer quits (~david@user/gvx) (Quit: leaving) |
| 2021-07-17 16:14:08 | × | Ariakenom__ quits (~Ariakenom@c83-255-154-140.bredband.tele2.se) (Ping timeout: 255 seconds) |
| 2021-07-17 16:14:09 | <davean> | int-e: oh do be helpful |
| 2021-07-17 16:15:04 | ← | mnrmnaugh parts (~mnrmnaugh@pool-96-252-87-182.bstnma.fios.verizon.net) (Leaving) |
| 2021-07-17 16:15:14 | <Guest14> | int-e that worked thank you |
| 2021-07-17 16:16:19 | → | darius-os_ joins (uid508861@id-508861.stonehaven.irccloud.com) |
| 2021-07-17 16:20:42 | <texasmynsted> | thank you boxscape |
| 2021-07-17 16:21:29 | <texasmynsted> | Sounds like optics or vinyl for now |
| 2021-07-17 16:21:44 | × | Guest14 quits (~Guest14@76-236-222-208.lightspeed.tukrga.sbcglobal.net) (Quit: Client closed) |
| 2021-07-17 16:22:07 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 2021-07-17 16:23:04 | → | Ariakenom__ joins (~Ariakenom@c83-255-154-140.bredband.tele2.se) |
| 2021-07-17 16:24:27 | → | Guest14 joins (~Guest14@76-236-222-208.lightspeed.tukrga.sbcglobal.net) |
| 2021-07-17 16:27:27 | × | brian_da_mage quits (~Neuromanc@user/briandamag) (Ping timeout: 255 seconds) |
| 2021-07-17 16:27:58 | → | oso joins (~oso@2601:58c:c080:a950:e67d:b4e2:c5be:433f) |
| 2021-07-17 16:30:57 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-07-17 16:31:11 | <sm> | g'day all. Speaking of optics.. you experienced [lens] coders, do you find it good or bad for (a) fields and (b) lenses to be visually disctinct from other kinds of bindings (functions, "variables") ? As in eg _field/lens_, field_/lens__, _field/lensL, .... ? |
| 2021-07-17 16:31:57 | × | Ariakenom__ quits (~Ariakenom@c83-255-154-140.bredband.tele2.se) (Ping timeout: 255 seconds) |
| 2021-07-17 16:32:24 | <sm> | I feel it would be good overall, for avoiding collisions and for human comprehension . But I don't have a lot of lens experience |
| 2021-07-17 16:33:02 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2021-07-17 16:33:18 | × | norias quits (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net) (Ping timeout: 255 seconds) |
| 2021-07-17 16:33:20 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-07-17 16:34:12 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) |
| 2021-07-17 16:36:33 | → | Ariakenom__ joins (~Ariakenom@c83-255-154-140.bredband.tele2.se) |
| 2021-07-17 16:36:59 | → | retroid_ joins (~retro@97e2ba5d.skybroadband.com) |
All times are in UTC.