Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-04-26 17:41:31 kiweun joins (~kiweun@2607:fea8:2a62:9600:d0dd:ef94:ca28:e17b)
2021-04-26 17:42:07 <remexre> are there good ways to do sort of reflective-ish operations on types? something like Go's struct tags, maybe? I saw {-# ANN #-}, thought it sounds like it might require writing a compiler plugin, so I'd like to avoid it if possible
2021-04-26 17:42:44 <ski> with the sequential update, you get something like `set pos0 tile0 (set pos1 tile1 (..(error "invalid position")..))', which would be a function that given a position, compares it with `pos0',`pos1',&c. in turn, and gives the corresponding tile
2021-04-26 17:43:25 <ski> iow, you'd get `\pos -> if pos == pos0 then tile0 else if pos == pos1 then tile 1 else ..(error "invalid position")..'
2021-04-26 17:44:26 × ddellac__ quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
2021-04-26 17:44:35 <tempate> ski: oh, that's actually what I was thinking
2021-04-26 17:44:36 nicholasbulka joins (~nicholasb@2601:900:4301:da0:58e6:3a0a:96a:ca2c)
2021-04-26 17:44:58 <tempate> I guess I can do it from scratch instead of swapping tiles in the final board's function?
2021-04-26 17:46:16 <ski> well, the `set' function i referred to would basically just by "swapping tiles". iow it'd make a new function that gives the same result on all positions, except on `pos0', where it'd give `tile0' (instead of whatever tile the previous function gave there)
2021-04-26 17:46:46 <ski> jrp : hm, i dunno how `InputT' is meant to work
2021-04-26 17:47:13 × rajivr quits (uid269651@gateway/web/irccloud.com/x-tixhxbhwulglbevd) (Quit: Connection closed for inactivity)
2021-04-26 17:47:30 <monochrom> remexre: I don't know what's "reflective" and Go, but "struct tag" is perhaps one of the things GHC.Generics and {-# language DeriveGenerics #-} provides.
2021-04-26 17:47:38 jgt joins (~jgt@78.162.43.217)
2021-04-26 17:47:54 <monochrom> To be sure, I don't know what "struct tag" means either. Just guessing from words.
2021-04-26 17:48:30 <remexre> Go lets you associate arbitrary strings with fields of a struct; when doing reflection you can see what string a field has
2021-04-26 17:48:57 <ski> tempate : but yea, you can do this as a recursive function, if you prefer
2021-04-26 17:48:59 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:58e6:3a0a:96a:ca2c) (Ping timeout: 250 seconds)
2021-04-26 17:49:32 × kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 240 seconds)
2021-04-26 17:49:40 <monochrom> DeriveGenerics associates the field name with the field.
2021-04-26 17:49:42 pbgc joins (~pbgc@a89-152-234-147.cpe.netcabo.pt)
2021-04-26 17:49:55 lleb joins (5c91ba7e@amarseille-158-1-23-126.w92-145.abo.wanadoo.fr)
2021-04-26 17:49:56 <ski> i don't think generics gives you anything like that, remexre
2021-04-26 17:50:33 <ski> what it does is let you write polytypic algorithms, that depend on the shape of the type
2021-04-26 17:50:52 <remexre> yeah, I'm familiar with that usage of it
2021-04-26 17:51:08 × ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection)
2021-04-26 17:51:09 juuandyy joins (~juuandyy@90.106.228.121)
2021-04-26 17:51:09 × hendursa1 quits (~weechat@gateway/tor-sasl/hendursaga) (Ping timeout: 240 seconds)
2021-04-26 17:51:23 ADG1089 joins (~aditya@171.76.29.233)
2021-04-26 17:52:05 <tempate> ski: but is iow a function?
2021-04-26 17:52:21 <ski> "iow" is short for "in other words"
2021-04-26 17:52:30 <tempate> oh
2021-04-26 17:52:30 ukari joins (~ukari@unaffiliated/ukari)
2021-04-26 17:52:34 × jgt quits (~jgt@78.162.43.217) (Ping timeout: 265 seconds)
2021-04-26 17:52:37 <monochrom> If you go phantom type, you can associate a type-level string of your choice; and then use GHC.TypeLits.symbolVal to convert type-level string to term-level string.
2021-04-26 17:52:41 untakenstupidnic joins (~user@5.114.130.12)
2021-04-26 17:52:44 hendursa1 joins (~weechat@gateway/tor-sasl/hendursaga)
2021-04-26 17:53:10 × geekosaur quits (930099da@rrcs-147-0-153-218.central.biz.rr.com) (Quit: Connection closed)
2021-04-26 17:53:39 <monochrom> But phantom type also means you now have to go through newtype wrappers and unwrappers all the time.
2021-04-26 17:53:42 <remexre> using Tagged or whatever?
2021-04-26 17:53:46 <monochrom> Yeah
2021-04-26 17:53:48 <remexre> yeah, I'm trying to avoid the newtype wrapping
2021-04-26 17:55:03 chimera joins (~chimera@168-182-134-95.pool.ukrtel.net)
2021-04-26 17:55:58 usr25 joins (~usr25@unaffiliated/usr25)
2021-04-26 18:00:22 maralorn parts (maralornma@gateway/shell/matrix.org/x-taapglyfnhcaxlmi) ("User left")
2021-04-26 18:01:03 maralorn joins (maralornma@gateway/shell/matrix.org/x-taapglyfnhcaxlmi)
2021-04-26 18:02:32 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
2021-04-26 18:05:17 maralorn parts (maralornma@gateway/shell/matrix.org/x-taapglyfnhcaxlmi) ("User left")
2021-04-26 18:07:12 AkechiShiro joins (~AkechiShi@2a01:e0a:5f9:9681:9dbe:b42:df17:bf9c)
2021-04-26 18:08:24 nicholasbulka joins (~nicholasb@2601:900:4301:da0:58e6:3a0a:96a:ca2c)
2021-04-26 18:11:50 maralorn joins (maralornma@gateway/shell/matrix.org/x-taapglyfnhcaxlmi)
2021-04-26 18:12:54 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:58e6:3a0a:96a:ca2c) (Ping timeout: 245 seconds)
2021-04-26 18:14:46 nvmd joins (~nvmd@177.30.111.232)
2021-04-26 18:14:47 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2021-04-26 18:15:05 geekosaur joins (930099da@rrcs-147-0-153-218.central.biz.rr.com)
2021-04-26 18:15:23 × lleb quits (5c91ba7e@amarseille-158-1-23-126.w92-145.abo.wanadoo.fr) (Ping timeout: 240 seconds)
2021-04-26 18:16:23 Synthetica joins (uid199651@gateway/web/irccloud.com/x-njxepqszlnawpkda)
2021-04-26 18:16:32 nicholasbulka joins (~nicholasb@2601:900:4301:da0:5440:6bb8:f181:7832)
2021-04-26 18:18:32 ddellac__ joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-04-26 18:19:38 × s00pcan quits (~chris@075-133-056-178.res.spectrum.com) (Ping timeout: 260 seconds)
2021-04-26 18:19:39 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:5440:6bb8:f181:7832) (Remote host closed the connection)
2021-04-26 18:19:56 nicholasbulka joins (~nicholasb@2601:900:4301:da0:58e6:3a0a:96a:ca2c)
2021-04-26 18:20:13 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-04-26 18:21:13 s00pcan joins (~chris@107.181.165.217)
2021-04-26 18:22:58 × ddellac__ quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 252 seconds)
2021-04-26 18:23:27 kritzefitz joins (~kritzefit@212.86.56.80)
2021-04-26 18:25:10 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 252 seconds)
2021-04-26 18:27:12 × dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection)
2021-04-26 18:27:32 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 240 seconds)
2021-04-26 18:27:41 × ADG1089 quits (~aditya@171.76.29.233) (Quit: Konversation terminated!)
2021-04-26 18:33:39 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
2021-04-26 18:37:10 timwattenberg joins (~quassel@hq.wattenberg.me)
2021-04-26 18:39:26 bitmagie joins (~Thunderbi@200116b8066293008848276d0b5d693d.dip.versatel-1u1.de)
2021-04-26 18:41:41 × darjeeling_ quits (~darjeelin@122.245.216.145) (Ping timeout: 240 seconds)
2021-04-26 18:42:11 × geekosaur quits (930099da@rrcs-147-0-153-218.central.biz.rr.com) (Quit: Connection closed)
2021-04-26 18:42:13 × ystael quits (~ystael@209.6.50.55) (Ping timeout: 252 seconds)
2021-04-26 18:42:32 × bennofs_ quits (~quassel@dynamic-089-012-155-245.89.12.pool.telefonica.de) (Read error: Connection reset by peer)
2021-04-26 18:42:45 bennofs_ joins (~quassel@dynamic-089-012-155-245.89.12.pool.telefonica.de)
2021-04-26 18:44:04 × ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection)
2021-04-26 18:44:42 ukari joins (~ukari@unaffiliated/ukari)
2021-04-26 18:45:37 × guest7682358928 quits (c9dbe902@gateway/web/cgi-irc/kiwiirc.com/ip.201.219.233.2) (Quit: Ping timeout (120 seconds))
2021-04-26 18:46:01 × bitmagie quits (~Thunderbi@200116b8066293008848276d0b5d693d.dip.versatel-1u1.de) (Quit: bitmagie)
2021-04-26 18:46:31 guest7682358928 joins (c9dbe902@gateway/web/cgi-irc/kiwiirc.com/ip.201.219.233.2)
2021-04-26 18:48:14 × jrp quits (0550efe4@5.80.239.228) (Quit: Connection closed)
2021-04-26 18:53:34 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
2021-04-26 18:55:05 darjeeling_ joins (~darjeelin@122.245.217.205)
2021-04-26 18:55:32 × coot quits (~coot@37.30.50.130.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-04-26 18:56:20 ddellac__ joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-04-26 18:57:06 × guest7682358928 quits (c9dbe902@gateway/web/cgi-irc/kiwiirc.com/ip.201.219.233.2) (Ping timeout: 240 seconds)
2021-04-26 18:57:36 geekosaur joins (930099da@rrcs-147-0-153-218.central.biz.rr.com)
2021-04-26 18:59:06 jrp joins (0550efe4@5.80.239.228)
2021-04-26 19:00:55 × ddellac__ quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 252 seconds)
2021-04-26 19:01:06 × LKoen quits (~LKoen@22.249.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
2021-04-26 19:01:24 LKoen joins (~LKoen@22.249.88.92.rev.sfr.net)
2021-04-26 19:04:17 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2021-04-26 19:06:47 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-04-26 19:07:45 chateau joins (~chateau@71.215.110.96)
2021-04-26 19:09:03 × chateau quits (~chateau@71.215.110.96) (Quit: Leaving)
2021-04-26 19:09:51 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
2021-04-26 19:13:44 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 245 seconds)
2021-04-26 19:15:14 brandonhamilton joins (~brandonha@151.36.60.188)

All times are in UTC.