Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-25 06:29:56 × Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer)
2021-03-25 06:30:28 Varis joins (~Tadas@unaffiliated/varis)
2021-03-25 06:30:40 × azure1 quits (~azure@103.154.230.130) (Read error: Connection reset by peer)
2021-03-25 06:30:59 azure1 joins (~azure@103.154.230.130)
2021-03-25 06:31:48 aragorn1212 joins (31cf3bf0@49.207.59.240)
2021-03-25 06:31:58 <aragorn1212> hi
2021-03-25 06:32:12 <aragorn1212> is the beginners channel not active anymore?
2021-03-25 06:32:26 malumore joins (~malumore@151.62.125.69)
2021-03-25 06:34:43 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood)
2021-03-25 06:35:03 × Tops2 quits (~Tobias@dyndsl-091-249-083-058.ewe-ip-backbone.de) (Read error: Connection reset by peer)
2021-03-25 06:35:55 frozenErebus joins (~frozenEre@94.128.81.87)
2021-03-25 06:35:55 × emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer)
2021-03-25 06:35:55 <aragorn1212> Anyone active?
2021-03-25 06:36:01 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
2021-03-25 06:36:17 emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com)
2021-03-25 06:36:30 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-25 06:38:53 danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
2021-03-25 06:39:31 thc202 joins (~thc202@unaffiliated/thc202)
2021-03-25 06:44:01 <ski> aragorn1212 : it is active
2021-03-25 06:44:28 <ski> (although beginner's questions are also welcome in here)
2021-03-25 06:44:45 shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:70ce:e84:9e94:29ff)
2021-03-25 06:44:56 × andreas31 quits (~andreas@gateway/tor-sasl/andreas303) (Remote host closed the connection)
2021-03-25 06:45:46 andreas31 joins (~andreas@gateway/tor-sasl/andreas303)
2021-03-25 06:52:53 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2021-03-25 06:53:20 ddellacosta joins (~ddellacos@86.106.143.10)
2021-03-25 06:53:21 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
2021-03-25 06:56:46 × irc_user quits (uid423822@gateway/web/irccloud.com/x-dntykznpsmhskubk) (Quit: Connection closed for inactivity)
2021-03-25 06:58:07 × ddellacosta quits (~ddellacos@86.106.143.10) (Ping timeout: 268 seconds)
2021-03-25 06:59:31 michalz joins (~user@185.246.204.52)
2021-03-25 07:02:09 knupfer joins (~Thunderbi@200116b8240912008c086767523d9d96.dip.versatel-1u1.de)
2021-03-25 07:07:59 × aragorn1212 quits (31cf3bf0@49.207.59.240) (Quit: Connection closed)
2021-03-25 07:09:07 Lord_of_Life joins (~Lord@unaffiliated/lord-of-life/x-0885362)
2021-03-25 07:10:28 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
2021-03-25 07:13:12 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
2021-03-25 07:13:41 madjest71 joins (~Android@2a02-a420-47-b3b2-eb4-5763-729d-3295.mobile6.kpn.net)
2021-03-25 07:15:50 × madjestic quits (~Android@86-88-72-244.fixed.kpn.net) (Ping timeout: 256 seconds)
2021-03-25 07:17:14 × stree quits (~stree@68.36.8.116) (Ping timeout: 268 seconds)
2021-03-25 07:20:54 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-25 07:21:42 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Client Quit)
2021-03-25 07:22:41 × marinelli quits (~marinelli@gateway/tor-sasl/marinelli) (Quit: marinelli)
2021-03-25 07:27:16 cfricke joins (~cfricke@unaffiliated/cfricke)
2021-03-25 07:27:20 × quinn quits (~quinn@c-73-223-224-163.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
2021-03-25 07:29:42 stree joins (~stree@68.36.8.116)
2021-03-25 07:30:51 ddellacosta joins (~ddellacos@83.143.246.107)
2021-03-25 07:32:19 × rj quits (~x@gateway/tor-sasl/rj) (Remote host closed the connection)
2021-03-25 07:33:00 rj joins (~x@gateway/tor-sasl/rj)
2021-03-25 07:33:33 quinn joins (~quinn@c-73-223-224-163.hsd1.ca.comcast.net)
2021-03-25 07:35:37 × ddellacosta quits (~ddellacos@83.143.246.107) (Ping timeout: 256 seconds)
2021-03-25 07:40:22 kiweun joins (~kiweun@2607:fea8:2a62:9600:c9a0:4edb:f142:45d8)
2021-03-25 07:44:13 × frozenErebus quits (~frozenEre@94.128.81.87) (Ping timeout: 265 seconds)
2021-03-25 07:46:23 madjestic joins (~Android@86-88-72-244.fixed.kpn.net)
2021-03-25 07:49:05 aqd joins (~aqd@84.20.147.33)
2021-03-25 07:49:16 wonko7 joins (~wonko7@45.15.17.60)
2021-03-25 07:49:55 × madjest71 quits (~Android@2a02-a420-47-b3b2-eb4-5763-729d-3295.mobile6.kpn.net) (Ping timeout: 268 seconds)
2021-03-25 07:50:30 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 265 seconds)
2021-03-25 07:51:11 Varis joins (~Tadas@unaffiliated/varis)
2021-03-25 07:51:17 × forgottenone quits (~forgotten@176.42.23.95) (Remote host closed the connection)
2021-03-25 07:54:59 apeyroux joins (~alex@78.20.138.88.rev.sfr.net)
2021-03-25 07:56:06 frozenErebus joins (~frozenEre@94.128.81.87)
2021-03-25 07:56:58 chele joins (~chele@ip5b40237d.dynamic.kabel-deutschland.de)
2021-03-25 07:59:49 Franciman joins (~francesco@host-79-53-62-46.retail.telecomitalia.it)
2021-03-25 08:00:10 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-25 08:00:11 <idnar> glguy: you could have defined it as `data Either a b = Right a | Left b` though
2021-03-25 08:02:21 <Uniaika> idnar: I have the hardest time determining my left and my right, so I don't need that kind of psychological warfare waged against me :P
2021-03-25 08:03:28 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-03-25 08:03:28 × emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer)
2021-03-25 08:03:29 × kini quits (~kini@unaffiliated/kini) (Ping timeout: 268 seconds)
2021-03-25 08:03:52 emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com)
2021-03-25 08:08:29 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 256 seconds)
2021-03-25 08:09:09 sarna joins (3e1528e3@gateway/web/cgi-irc/kiwiirc.com/ip.62.21.40.227)
2021-03-25 08:10:12 <sarna> hey, I have a question that I think you might know the answer to. how would you express a sum type in yaml?
2021-03-25 08:10:12 × emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer)
2021-03-25 08:10:28 emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com)
2021-03-25 08:11:00 ski glances around the channel for someone knowledgable about YAML
2021-03-25 08:11:55 <sarna> ski: I thought haskellers would be good at enforcing invariants :) even if the language isn't that helpful
2021-03-25 08:12:27 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 256 seconds)
2021-03-25 08:12:33 × wonko7 quits (~wonko7@45.15.17.60) (Ping timeout: 245 seconds)
2021-03-25 08:12:49 <ski> (not sure what the invariant here would be, but ok)
2021-03-25 08:14:13 <sarna> ski: I have a map with key foo. if the value in foo is true, I need key bar to exist. if it's false, I need key baz to exist
2021-03-25 08:15:02 <sarna> maybe there's a better way of doing this, I don't know. no idea where to ask either
2021-03-25 08:15:41 <__minoru__shirae> why ask about yaml if you can ask about json and then convert from json to yaml
2021-03-25 08:15:42 <nshepperd2> the usual way express sum types in a languages that don't have them is just a tagged product
2021-03-25 08:16:07 × vchlup quits (~vchlup@nat.brnet.cz) (Read error: Connection reset by peer)
2021-03-25 08:16:07 <nshepperd2> in other words just do the map the way you said and check the invariant when you decode it
2021-03-25 08:16:30 <ski> sarna : hm, so are you asking about encoding sum types, or about validating such an encoding ?
2021-03-25 08:16:37 graf_blutwurst joins (~user@2001:171b:226e:adc0:8def:33e:39f5:7058)
2021-03-25 08:16:42 vchlup joins (~vchlup@nat.brnet.cz)
2021-03-25 08:16:49 <sarna> nshepperd2: and how to communicate that to my users? for now I put the other variant in a comment and wrote "if foo then this, if not then that"
2021-03-25 08:16:56 <sarna> ski: encoding
2021-03-25 08:16:56 × emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer)
2021-03-25 08:17:03 emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com)
2021-03-25 08:18:25 <sarna> __minoru__shirae: is json less offensive here? :D I'm using yaml because people who'll use the thing are used to it (devops)
2021-03-25 08:18:32 <nshepperd2> yes just document it. also have a helpful error message when the value does not validate
2021-03-25 08:19:00 <sarna> nshepperd2: oh right, I'll make it fail nicely. thanks for the help :))
2021-03-25 08:19:13 <ski> you could probably use a "map" (conceptually a record) with one field being a tag, and either remaining fields that should be present (and none else) determined by that tag, or else having a single other field, whose contents would be a record of one type or another (or perhaps of some other type), depending on the tag
2021-03-25 08:20:01 <ski> i presume there's some way to validate that some YAML adheres to an expected format, and if so, it would be nice to have it validate this encoding of a sum type
2021-03-25 08:20:57 × Kaiepi quits (~Kaiepi@47.54.252.148) (Ping timeout: 256 seconds)
2021-03-25 08:21:13 <sarna> ski: oh thanks for the suggestions! I don't have a good name for the field if I was doing version 2, so I'll go with ver 1 :)
2021-03-25 08:21:21 <ski> (if there's just two variants, then the tag could possibly be a boolean. if there's more, you'd use something else, maybe integers or strings)
2021-03-25 08:22:10 <sarna> yeah it's thankfully just a bool :D

All times are in UTC.