Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-04-16 15:34:05 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-04-16 15:34:48 nineonine joins (~nineonine@2604:3d08:7785:9600:2926:4844:fa1f:b849)
2021-04-16 15:34:59 xelxebar joins (~xelxebar@gateway/tor-sasl/xelxebar)
2021-04-16 15:35:34 __minoru__shirae joins (~shiraeesh@109.166.58.206)
2021-04-16 15:36:15 <monochrom> I would first put "try letunit <|> letin" on the same line, or use explicit parentheses, to ensure that the computer is not misreading me.
2021-04-16 15:36:15 romesrf_ joins (~romesrf@44.190.189.46.rev.vodafone.pt)
2021-04-16 15:37:46 <dmj`> could combine them, result <- (fmap Left (char '_')) <|> (fmap Right (many1 letter)), then you could case match on which one you got back
2021-04-16 15:37:52 × romesrf quits (~romesrf@44.190.189.46.rev.vodafone.pt) (Ping timeout: 252 seconds)
2021-04-16 15:39:19 <monochrom> Meta-ly, I find let-var and let-wildcard sufficiently related that I may merge letin and letunit in the first place.
2021-04-16 15:39:19 × nineonine quits (~nineonine@2604:3d08:7785:9600:2926:4844:fa1f:b849) (Ping timeout: 250 seconds)
2021-04-16 15:40:18 <romesrf_> for this small example yes, but my issue is in a bigger parser that "needs" multiple letin constructors to "break down" basic types
2021-04-16 15:40:33 <dmj`> what monochrom said
2021-04-16 15:40:37 nineonine joins (~nineonine@2604:3d08:7785:9600:2926:4844:fa1f:b849)
2021-04-16 15:40:45 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-04-16 15:40:54 <monochrom> They literally differ in only one small spot. I would use "pat <- fmap Left (char '_') <|> fmap Right (many1 letter)" to address the difference.
2021-04-16 15:41:06 <dmj`> again what monochrom said
2021-04-16 15:41:07 <romesrf_> yeah that's what dmj` said too
2021-04-16 15:41:09 <romesrf_> ahahaha
2021-04-16 15:41:53 <romesrf_> i could try to merge all my letins into one big one, but it would kind of lose clarity
2021-04-16 15:42:12 <romesrf_> i wonder why the `try` isn't working like this
2021-04-16 15:42:42 <monochrom> In this case there are two clarities: clarity at the tree level, vs clarity at the forest level. And they are in conflict.
2021-04-16 15:42:44 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-04-16 15:43:14 <monochrom> What I mean is, you look at the code of letin and letunit, it violates DRY.
2021-04-16 15:43:58 <romesrf_> you're right, i should make a parser func for the deconstruction and call it in between the let =in...
2021-04-16 15:44:03 <monochrom> If you RY you usually gain clarity at the tree level, every tree is clear on its own, you lose sight that at the forest level you have two trees that are really the same.
2021-04-16 15:44:30 <romesrf_> thanks for the insight. i'll try it
2021-04-16 15:45:47 <monochrom> In this specific scenerio, I am inspired by Haskell's "let <pattern> = <expr> in <expr>" this is one single concept that spans a wide range of <pattern>s, no one seriously split this by different patterns. Oh one possible <pattern> is <var>, big deal.
2021-04-16 15:46:07 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-04-16 15:46:26 jamm_ joins (~jamm@unaffiliated/jamm)
2021-04-16 15:46:34 <romesrf_> :) you make a compelling argument
2021-04-16 15:46:36 × __minoru__shirae quits (~shiraeesh@109.166.58.206) (Remote host closed the connection)
2021-04-16 15:47:54 __minoru__shirae joins (~shiraeesh@109.166.58.206)
2021-04-16 15:50:12 nineonin_ joins (~nineonine@50.216.62.2)
2021-04-16 15:50:23 <monochrom> For "<|> letin" on its own line, you need to know a treacherous detail of Haskell layout. The compiler is required to search for a place to inserting "}" until it finds how to make your code legal.
2021-04-16 15:51:59 × nineonine quits (~nineonine@2604:3d08:7785:9600:2926:4844:fa1f:b849) (Ping timeout: 258 seconds)
2021-04-16 15:52:03 <monochrom> Now, you have got "try letunit" and "<|> letin" aligned, so you have already forced a semicolon between them, "try letunit ; <|> letin", so the "}" is not going after them.
2021-04-16 15:52:48 <monochrom> BUT! The compiler sees that the "}" can go between them, "try letunit } <|> letin". That's the only way to make your code legal.
2021-04-16 15:53:06 <monochrom> You now have "do { ... ; try letunit} <|> letin".
2021-04-16 15:53:16 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 252 seconds)
2021-04-16 15:59:27 <romesrf_> OH
2021-04-16 15:59:34 <romesrf_> that's also really insightful hahahah
2021-04-16 16:00:06 × MahmoudMAZOUZ[m] quits (mazouzmaen@gateway/shell/matrix.org/x-imqdkovzqltlmznc) (Quit: Idle for 30+ days)
2021-04-16 16:00:07 <romesrf_> but i'm still going to change it up to use a new datatype "Pattern", and then use the "Pattern" in a general letin :: Parser Expr to return an Expr
2021-04-16 16:00:11 idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net)
2021-04-16 16:00:16 <romesrf_> you convinced me :)
2021-04-16 16:00:23 <monochrom> :)
2021-04-16 16:00:44 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
2021-04-16 16:01:23 jamm_ joins (~jamm@unaffiliated/jamm)
2021-04-16 16:04:04 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
2021-04-16 16:04:20 jamm_ joins (~jamm@unaffiliated/jamm)
2021-04-16 16:05:50 barzo joins (~sosal@188.119.23.191)
2021-04-16 16:06:08 × HannaM quits (~quassel@p54849510.dip0.t-ipconnect.de) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
2021-04-16 16:06:35 nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2021-04-16 16:09:43 juuandyy joins (~juuandyy@90.106.228.121)
2021-04-16 16:11:02 frozenErebus joins (~frozenEre@37.231.244.249)
2021-04-16 16:15:49 × ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Remote host closed the connection)
2021-04-16 16:17:53 × knupfer quits (~Thunderbi@200116b82be894005038e5d10273cf38.dip.versatel-1u1.de) (Ping timeout: 250 seconds)
2021-04-16 16:21:06 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 240 seconds)
2021-04-16 16:21:35 ddellacosta joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
2021-04-16 16:26:14 × ddellacosta quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Ping timeout: 246 seconds)
2021-04-16 16:26:34 × dsrt^ quits (dsrt@ip98-184-89-2.mc.at.cox.net) ()
2021-04-16 16:28:56 jonatan joins (~nate@h77-53-70-163.cust.a3fiber.se)
2021-04-16 16:29:17 Varis joins (~Tadas@unaffiliated/varis)
2021-04-16 16:29:43 dsrt^ joins (dsrt@ip98-184-89-2.mc.at.cox.net)
2021-04-16 16:32:16 LKoen joins (~LKoen@65.250.88.92.rev.sfr.net)
2021-04-16 16:35:51 × dsrt^ quits (dsrt@ip98-184-89-2.mc.at.cox.net) ()
2021-04-16 16:36:55 gitgood joins (~gitgood@80-44-9-246.dynamic.dsl.as9105.com)
2021-04-16 16:38:17 bitmapper joins (uid464869@gateway/web/irccloud.com/x-ffewfqkvmgmtpxhy)
2021-04-16 16:39:31 nrh^ joins (nrh@ip98-184-89-2.mc.at.cox.net)
2021-04-16 16:43:28 × jumper149 quits (~jumper149@80.240.31.34) (Quit: WeeChat 3.1)
2021-04-16 16:43:49 ddellacosta joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
2021-04-16 16:45:31 × jespada quits (~jespada@90.254.243.187) (Quit: Leaving)
2021-04-16 16:46:26 × dpl quits (~dpl@77-121-78-163.chn.volia.net) (Ping timeout: 240 seconds)
2021-04-16 16:49:59 dmytrish joins (~mitra@2a02:8084:a82:d900:319a:d200:a43d:3e3c)
2021-04-16 16:53:36 Sornaensis joins (~Sornaensi@077213199124.dynamic.telenor.dk)
2021-04-16 16:54:25 HannaM joins (~quassel@p54849510.dip0.t-ipconnect.de)
2021-04-16 16:54:56 × nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 246 seconds)
2021-04-16 16:57:05 × Sorny quits (~Sornaensi@79.142.232.102.static.router4.bolignet.dk) (Ping timeout: 260 seconds)
2021-04-16 16:57:55 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
2021-04-16 16:57:59 × jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection)
2021-04-16 16:58:21 jb55 joins (~jb55@gateway/tor-sasl/jb55)
2021-04-16 16:58:55 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
2021-04-16 17:00:38 × elliott_ quits (~elliott_@pool-108-18-30-46.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
2021-04-16 17:03:39 × Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer)
2021-04-16 17:04:08 × NieDzejkob quits (~quassel@195.149.98.3) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2021-04-16 17:04:24 NieDzejkob joins (~quassel@195.149.98.3)
2021-04-16 17:07:49 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2021-04-16 17:13:30 × howdoi quits (uid224@gateway/web/irccloud.com/x-sbirtyqsxkkyetzh) (Quit: Connection closed for inactivity)
2021-04-16 17:14:17 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
2021-04-16 17:16:23 × xff0x quits (~xff0x@2001:1a81:5248:9d00:9381:fa96:9ca3:9618) (Ping timeout: 250 seconds)
2021-04-16 17:17:17 xff0x joins (~xff0x@2001:1a81:526f:3a00:9b6e:f4dc:2aa2:1178)
2021-04-16 17:18:24 × juuandyy quits (~juuandyy@90.106.228.121) (Quit: Konversation terminated!)
2021-04-16 17:18:38 × BosonCollider quits (~olofs@90-227-86-119-no542.tbcn.telia.com) (Ping timeout: 240 seconds)
2021-04-16 17:19:12 elfets_ joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
2021-04-16 17:21:38 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 240 seconds)
2021-04-16 17:21:50 BosonCollider joins (~olofs@90-227-86-119-no542.tbcn.telia.com)
2021-04-16 17:22:03 × barzo quits (~sosal@188.119.23.191) (Read error: Connection reset by peer)
2021-04-16 17:23:14 quinn joins (~quinn@c-73-223-224-163.hsd1.ca.comcast.net)
2021-04-16 17:23:15 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Quit: WeeChat 3.0.1)
2021-04-16 17:24:41 Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net)

All times are in UTC.