Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-26 09:21:39 × auiee quits (~auiee@88.155.72.207) (Quit: WeeChat 3.0)
2021-03-26 09:21:55 auiee joins (~auiee@88.155.72.207)
2021-03-26 09:22:47 × auiee quits (~auiee@88.155.72.207) (Client Quit)
2021-03-26 09:23:06 auiee joins (~auiee@88.155.72.207)
2021-03-26 09:23:25 × auiee quits (~auiee@88.155.72.207) (Client Quit)
2021-03-26 09:24:28 auiee joins (~auiee@88.155.72.207)
2021-03-26 09:25:18 × auiee quits (~auiee@88.155.72.207) (Client Quit)
2021-03-26 09:25:35 auiee joins (~auiee@88.155.72.207)
2021-03-26 09:27:16 auiee parts (~auiee@88.155.72.207) ()
2021-03-26 09:27:55 auiee joins (~auiee@88.155.72.207)
2021-03-26 09:28:14 × auiee quits (~auiee@88.155.72.207) (Client Quit)
2021-03-26 09:28:15 dyeplexer joins (~lol@unaffiliated/terpin)
2021-03-26 09:28:32 auiee joins (~auiee@88.155.72.207)
2021-03-26 09:28:42 × Bigcheese quits (~quassel@unaffiliated/bigcheese) (Ping timeout: 245 seconds)
2021-03-26 09:28:46 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
2021-03-26 09:29:37 LKoen joins (~LKoen@191.254.88.92.rev.sfr.net)
2021-03-26 09:29:59 × heatsink quits (~heatsink@2600:1700:bef1:5e10:1cfc:5265:7008:dc13) (Remote host closed the connection)
2021-03-26 09:31:49 auiee is now known as vglfr
2021-03-26 09:31:55 × vglfr quits (~auiee@88.155.72.207) (Client Quit)
2021-03-26 09:32:10 auiee joins (~auiee@88.155.72.207)
2021-03-26 09:32:45 auiee is now known as vglfr
2021-03-26 09:34:15 Bigcheese joins (~quassel@unaffiliated/bigcheese)
2021-03-26 09:34:15 × vglfr quits (~auiee@88.155.72.207) (Client Quit)
2021-03-26 09:34:34 auiee joins (~auiee@88.155.72.207)
2021-03-26 09:34:34 auiee is now known as vglfr
2021-03-26 09:35:37 toorevitimirp joins (~tooreviti@117.182.181.200)
2021-03-26 09:37:59 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-03-26 09:39:16 × vglfr quits (~auiee@88.155.72.207) (Client Quit)
2021-03-26 09:39:35 vglfr joins (~auiee@88.155.72.207)
2021-03-26 09:41:07 × vglfr quits (~auiee@88.155.72.207) (Client Quit)
2021-03-26 09:41:21 vglfr joins (~auiee@88.155.72.207)
2021-03-26 09:41:40 × vglfr quits (~auiee@88.155.72.207) (Client Quit)
2021-03-26 09:42:18 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
2021-03-26 09:44:20 Lowl3v3l joins (~Lowl3v3l@dslb-002-207-103-026.002.207.pools.vodafone-ip.de)
2021-03-26 09:46:31 Edward123 is now known as EdwardIII
2021-03-26 09:48:11 × LKoen quits (~LKoen@191.254.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-03-26 09:50:05 × tessier quits (~treed@kernel-panic/copilotco) (Ping timeout: 260 seconds)
2021-03-26 09:51:01 tessier joins (~treed@98.171.210.130)
2021-03-26 09:51:01 × tessier quits (~treed@98.171.210.130) (Changing host)
2021-03-26 09:51:01 tessier joins (~treed@kernel-panic/copilotco)
2021-03-26 09:52:10 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-26 09:55:47 Neuromancer joins (~Neuromanc@unaffiliated/neuromancer)
2021-03-26 09:56:44 × toorevitimirp quits (~tooreviti@117.182.181.200) (Remote host closed the connection)
2021-03-26 09:57:18 × stree quits (~stree@68.36.8.116) (Ping timeout: 240 seconds)
2021-03-26 09:57:30 rayyyy joins (~nanoz@gateway/tor-sasl/nanoz)
2021-03-26 09:58:07 benkolera joins (uid285671@gateway/web/irccloud.com/x-wpfqxhktxgpaqzio)
2021-03-26 09:59:36 toorevitimirp joins (~tooreviti@117.182.181.200)
2021-03-26 09:59:55 × toorevitimirp quits (~tooreviti@117.182.181.200) (Remote host closed the connection)
2021-03-26 10:00:57 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-26 10:01:16 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-26 10:01:21 terrorjack joins (~terrorjac@ec2-54-95-39-30.ap-northeast-1.compute.amazonaws.com)
2021-03-26 10:01:54 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
2021-03-26 10:02:04 bahamas joins (~lucian@unaffiliated/bahamas)
2021-03-26 10:02:10 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
2021-03-26 10:02:43 <bahamas> is there a canonical library for making your program configurable (through cli, files, env vars)?
2021-03-26 10:02:47 toorevitimirp joins (~tooreviti@117.182.181.200)
2021-03-26 10:03:09 fendor joins (~fendor@178.115.129.125.wireless.dyn.drei.com)
2021-03-26 10:04:35 <merijn> bahamas: All of those at once?
2021-03-26 10:05:08 <merijn> Because then definitely "no"
2021-03-26 10:05:47 <bahamas> merijn: I found this one: https://hackage.haskell.org/package/conferer
2021-03-26 10:06:38 <merijn> bahamas: tbh, my approach would be "define a datatype that is the interface to your program, then implement CLI/file config/env vars independently"
2021-03-26 10:06:55 <merijn> bahamas: You can use some neat monoid/semigroup tricks to combine configs from different sources
2021-03-26 10:07:22 × jneira quits (501e65b6@gateway/web/cgi-irc/kiwiirc.com/ip.80.30.101.182) (Ping timeout: 252 seconds)
2021-03-26 10:08:51 <bahamas> merijn: you mean the App pattern used in conjunction with ReaderT?
2021-03-26 10:08:59 Thor007 joins (~Thor007@157.42.17.151)
2021-03-26 10:09:23 <bahamas> I'm referring just to the "datatype that is the interface" part of what you said
2021-03-26 10:09:23 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-03-26 10:09:58 × fresheyeball quits (~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Ping timeout: 240 seconds)
2021-03-26 10:10:02 <merijn> I mean, the App and ReaderT parts of that are mostly unrelated, tbh
2021-03-26 10:10:04 × Thor007 quits (~Thor007@157.42.17.151) (Read error: Connection reset by peer)
2021-03-26 10:10:49 <merijn> What I meant is that if all your application logic is contained in "yourCode :: SomeConfig -> Foo", then "how SomeConfig got made" is completely orthogonal"
2021-03-26 10:10:57 stree joins (~stree@68.36.8.116)
2021-03-26 10:11:02 × toorevitimirp quits (~tooreviti@117.182.181.200) (Remote host closed the connection)
2021-03-26 10:11:59 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood)
2021-03-26 10:12:04 × Neuromancer quits (~Neuromanc@unaffiliated/neuromancer) (Read error: Connection reset by peer)
2021-03-26 10:13:08 fresheyeball joins (~isaac@c-71-237-105-37.hsd1.co.comcast.net)
2021-03-26 10:13:13 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
2021-03-26 10:13:34 <merijn> bahamas: You can do some tricks like "data Config f = Config { field1 :: f Int, field2 :: f String, field3 :: f Bool }" and then use "Config Last" to get a semigroup instance that keeps the "last" (i.e. rightmost value)
2021-03-26 10:13:39 <bahamas> merijn: so right now, the library I showed you seems like the easy route, because I don't have to implement any of the logic.
2021-03-26 10:14:02 <merijn> bahamas: Then can do something like "fileConfig <> envConfig <> cliConfig" and combine them
2021-03-26 10:14:02 <bahamas> merijn: is your suggestion coming from the idea that this is easy enough to implement not to warrant a library
2021-03-26 10:14:11 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds)
2021-03-26 10:14:20 toorevitimirp joins (~tooreviti@117.182.181.200)
2021-03-26 10:14:21 ph88 joins (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de)
2021-03-26 10:14:32 <merijn> bahamas: My suggestion is coming from: "automagic libraries never implement their magic the way I'd actually want it"
2021-03-26 10:14:49 <ph88> how can i find out which exceptions this function can throw ? https://hackage.haskell.org/package/text-1.2.4.1/docs/Data-Text-IO.html#v:hGetContents
2021-03-26 10:15:14 <bahamas> merijn: I see
2021-03-26 10:15:22 <merijn> bahamas: I see whole lots of FromConfig and Typeable in that API and that kinda thing makes me *thoroughly* paranoid and uncomfortable
2021-03-26 10:15:39 <merijn> I'd rather keep control
2021-03-26 10:15:42 × Stanley|00 quits (~stanley00@unaffiliated/stanley00) ()
2021-03-26 10:15:46 <bahamas> merijn: why is that?
2021-03-26 10:16:07 <bahamas> making you uncomfortable I mean
2021-03-26 10:16:30 <merijn> bahamas: Magic conversions are incredibly brittle. Someone changes a typeclass instance, whoops things parse entirely different. Explicit parsers are great, because you can have multiple versions
2021-03-26 10:16:33 <bahamas> I guess because of automatic conversion of config to types
2021-03-26 10:17:23 <merijn> bahamas: Inevitably there will be a time where you wanna run new code in an environment with old configs, so you want new code to parse both old *and* new configurations, and then you're hosed when your magic typeclass version only supports one version
2021-03-26 10:17:57 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
2021-03-26 10:19:12 <bahamas> merijn: ok, I think I see what you mean.
2021-03-26 10:19:28 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 252 seconds)
2021-03-26 10:20:44 <merijn> It can be useful for quick and dirty prototypes, but it's a risk to keep in mind
2021-03-26 10:22:07 × glguy quits (x@freenode/staff/haskell.developer.glguy) (Read error: Connection reset by peer)

All times are in UTC.