Logs: freenode/#haskell
| 2021-04-18 22:04:20 | → | hiroaki_ joins (~hiroaki@2a02:908:4b18:8c40:2bbc:3100:411b:408e) |
| 2021-04-18 22:04:41 | × | Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Ping timeout: 240 seconds) |
| 2021-04-18 22:05:30 | <lechner> | Hi, is it possible to represent JSON field names containing hyphens in data types declared with JSON Generics? |
| 2021-04-18 22:06:28 | → | ph88 joins (~ph88@2a02:8109:9e00:7e5c:d5ef:86b3:afc4:9258) |
| 2021-04-18 22:08:20 | <safinaskar> | thanks for discussion! (i still have my opinion) |
| 2021-04-18 22:09:13 | × | Zunaka quits (~IceChat9@176.24.159.82) (Quit: Never underestimate the power of stupid people in large groups.) |
| 2021-04-18 22:09:44 | × | gitgood quits (~gitgood@80-44-9-246.dynamic.dsl.as9105.com) (Remote host closed the connection) |
| 2021-04-18 22:14:13 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 252 seconds) |
| 2021-04-18 22:14:44 | × | Alleria_ quits (~textual@2603-7000-3040-0000-8d12-8548-27bc-6b87.res6.spectrum.com) (Quit: Textual IRC Client: www.textualapp.com) |
| 2021-04-18 22:15:29 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection) |
| 2021-04-18 22:16:21 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 2021-04-18 22:16:40 | × | kenanmarasli quits (1fdf0934@31.223.9.52) (Quit: Connection closed) |
| 2021-04-18 22:18:36 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection) |
| 2021-04-18 22:19:10 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) |
| 2021-04-18 22:20:41 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds) |
| 2021-04-18 22:21:33 | × | Cale quits (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com) (Remote host closed the connection) |
| 2021-04-18 22:22:42 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-04-18 22:22:57 | × | Lowl3v3l quits (~Lowl3v3l@dslb-002-207-103-026.002.207.pools.vodafone-ip.de) (Quit: Leaving.) |
| 2021-04-18 22:23:12 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 2021-04-18 22:25:37 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2021-04-18 22:26:00 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 2021-04-18 22:26:36 | → | jess joins (jess@freenode/staff/jess) |
| 2021-04-18 22:26:39 | → | dinciorip joins (~dincio@5.170.13.178) |
| 2021-04-18 22:27:14 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 246 seconds) |
| 2021-04-18 22:28:16 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection) |
| 2021-04-18 22:28:43 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 258 seconds) |
| 2021-04-18 22:30:14 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-04-18 22:35:21 | × | sh9 quits (~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8) |
| 2021-04-18 22:37:12 | × | nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 268 seconds) |
| 2021-04-18 22:45:18 | → | barakkleyman_ joins (~barakkley@2.55.14.78) |
| 2021-04-18 22:45:32 | × | barakkl1993 quits (~barakkley@2.55.46.17) (Ping timeout: 252 seconds) |
| 2021-04-18 22:52:05 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 2021-04-18 22:54:10 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 2021-04-18 22:56:11 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) |
| 2021-04-18 22:56:12 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2021-04-18 22:57:04 | → | Tario joins (~Tario@199.58.83.11) |
| 2021-04-18 22:58:46 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 252 seconds) |
| 2021-04-18 23:00:57 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection) |
| 2021-04-18 23:01:06 | → | loller_ joins (uid358106@gateway/web/irccloud.com/x-uyikepdymdnjzedf) |
| 2021-04-18 23:01:11 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) |
| 2021-04-18 23:03:00 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection) |
| 2021-04-18 23:05:38 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) |
| 2021-04-18 23:05:44 | × | dinciorip quits (~dincio@5.170.13.178) (Ping timeout: 246 seconds) |
| 2021-04-18 23:08:36 | → | viluon joins (uid453725@gateway/web/irccloud.com/x-nkzdiizrnnhacztz) |
| 2021-04-18 23:08:41 | × | Tario quits (~Tario@199.58.83.11) (Ping timeout: 240 seconds) |
| 2021-04-18 23:09:55 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 250 seconds) |
| 2021-04-18 23:11:39 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 2021-04-18 23:12:01 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 2021-04-18 23:13:39 | → | Cale joins (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com) |
| 2021-04-18 23:19:37 | × | Synthetica quits (uid199651@gateway/web/irccloud.com/x-xpxejlqaymkwmeed) (Quit: Connection closed for inactivity) |
| 2021-04-18 23:20:11 | → | Tario joins (~Tario@199.58.83.11) |
| 2021-04-18 23:20:23 | → | sh9 joins (~sh9@softbank060116136158.bbtec.net) |
| 2021-04-18 23:20:30 | × | barakkleyman_ quits (~barakkley@2.55.14.78) (Ping timeout: 265 seconds) |
| 2021-04-18 23:20:39 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Remote host closed the connection) |
| 2021-04-18 23:20:55 | <infinisil> | lechner: I guess you're talking about aeson? |
| 2021-04-18 23:21:37 | <infinisil> | lechner: If so, you can customize the field names of the derived instance with https://hackage.haskell.org/package/aeson-1.5.6.0/docs/Data-Aeson.html#v:fieldLabelModifier |
| 2021-04-18 23:23:44 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 2021-04-18 23:25:56 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 2021-04-18 23:26:56 | → | lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net) |
| 2021-04-18 23:27:27 | → | saf222 joins (~user@109-252-90-136.nat.spd-mgts.ru) |
| 2021-04-18 23:27:48 | ← | saf222 parts (~user@109-252-90-136.nat.spd-mgts.ru) () |
| 2021-04-18 23:28:00 | <Axman6> | safinaskar: I'm curious wherer you picked up the style you use in your Haskell, I've neverseen anyone write haskell like that |
| 2021-04-18 23:28:04 | <Axman6> | where* |
| 2021-04-18 23:29:04 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 2021-04-18 23:29:37 | × | Tario quits (~Tario@199.58.83.11) (Ping timeout: 268 seconds) |
| 2021-04-18 23:30:29 | <Axman6> | I can't remember the last time I saw curly brackets used for anything other than records, nested lets, using fully qualified modules for everything. |
| 2021-04-18 23:31:24 | → | Codaraxis joins (Codaraxis@gateway/vpn/mullvad/codaraxis) |
| 2021-04-18 23:31:35 | × | Wuzzy quits (~Wuzzy@p5790e74f.dip0.t-ipconnect.de) (Quit: Wuzzy) |
| 2021-04-18 23:32:48 | → | ep1ctetus joins (~epictetus@ip72-194-54-201.sb.sd.cox.net) |
| 2021-04-18 23:33:23 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 246 seconds) |
| 2021-04-18 23:33:23 | × | jonatan quits (~nate@h77-53-70-163.cust.a3fiber.se) (Ping timeout: 246 seconds) |
| 2021-04-18 23:33:39 | → | jonatan joins (~nate@h77-53-70-163.cust.a3fiber.se) |
| 2021-04-18 23:34:18 | × | Codaraxis_ quits (~Codaraxis@141.98.255.147) (Ping timeout: 252 seconds) |
| 2021-04-18 23:34:45 | × | son0p quits (~ff@181.136.122.143) (Remote host closed the connection) |
| 2021-04-18 23:35:01 | <monochrom> | SPJ uses {;} too :) |
| 2021-04-18 23:35:18 | <Axman6> | yes, but not in the same way |
| 2021-04-18 23:35:34 | <Axman6> | and SPJ has more than earned the right to use whatever style he wants |
| 2021-04-18 23:37:33 | <lechner> | infinisil: thanks! should i use fieldLabelModifier to replace underscores with hyphens? |
| 2021-04-18 23:38:10 | <infinisil> | lechner: Sure that could work |
| 2021-04-18 23:38:17 | × | hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 3.1) |
| 2021-04-18 23:39:31 | <lechner> | infinisil: is there a way to do it per field (and not necessarily for all)? I don't have that issue now but it seems more general |
| 2021-04-18 23:39:48 | <infinisil> | lechner: You can write an instance yourself |
| 2021-04-18 23:39:57 | <Axman6> | lechner: it sounds like you're nearing the point where just writing the instance will be easier |
| 2021-04-18 23:40:02 | × | zeenk quits (~zeenk@2a02:2f04:a10b:af00:91ba:3645:1cdb:9a75) (Quit: Konversation terminated!) |
| 2021-04-18 23:41:04 | <Axman6> | I did a CTF the other day and in it it had JSON documents with field names "N" and "p+q", "p-q" etc. it was definitely easier to just write the instances |
| 2021-04-18 23:42:19 | <lechner> | infinisil Axman6: it's my second time using Haskell. any hints would be appreciated https://paste.debian.net/1194239/ |
| 2021-04-18 23:42:48 | <infinisil> | lechner: Just read through the aeson page |
| 2021-04-18 23:42:49 | <Axman6> | is Queue the one which has a hyphen? |
| 2021-04-18 23:43:14 | <infinisil> | lechner: Specifically https://hackage.haskell.org/package/aeson-1.5.6.0/docs/Data-Aeson.html#g:2 |
| 2021-04-18 23:43:26 | <lechner> | base-directory, message-broker, routing-key, order-desk |
| 2021-04-18 23:44:12 | × | dcoutts_ quits (~dcoutts@unaffiliated/dcoutts) (Read error: Connection reset by peer) |
| 2021-04-18 23:44:34 | → | dcoutts_ joins (~dcoutts@unaffiliated/dcoutts) |
| 2021-04-18 23:45:01 | <Axman6> | ok, well I'll use Queue as an example: instance FromJSON Queue where parseJSON = withObject "Queue" $ \v -> Queue <$> v .: "exchange" <*> v .: "routing-key" <*> v .: "queue" |
| 2021-04-18 23:45:28 | <lechner> | yeah, i just found it. thanks so much! |
| 2021-04-18 23:46:25 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) |
| 2021-04-18 23:46:30 | <lechner> | what's <$> vs <*> please? |
| 2021-04-18 23:46:38 | → | Tario joins (~Tario@201.192.165.173) |
| 2021-04-18 23:46:58 | <Axman6> | <$> is infix fmap: (<$>) :: (a -> b) -> f a -> f b |
| 2021-04-18 23:47:32 | <Axman6> | <*> is infix ap, often pronounced "apply". (<*>) :: f (a -> b) -> f a -> f b |
| 2021-04-18 23:47:42 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection) |
All times are in UTC.