Logs: freenode/#haskell
| 2021-04-27 03:29:17 | × | carlomagno quits (~cararell@148.87.23.12) (Quit: Leaving.) |
| 2021-04-27 03:29:26 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
| 2021-04-27 03:29:26 | aplainze1akind | is now known as aplainzetakind |
| 2021-04-27 03:29:28 | <Axman6> | so, it's commonly used to pass around settings your application was passed when it launched, from command line arguments, config files, etc. |
| 2021-04-27 03:29:52 | <shachaf> | But "Reader r a" is just a function, "r -> a". |
| 2021-04-27 03:31:02 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-04-27 03:31:34 | → | ddellac__ joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 2021-04-27 03:32:35 | <justsomeguy> | Thank you, that helps a lot. |
| 2021-04-27 03:32:42 | × | _xor quits (~xor@74.215.46.133) (Quit: brb) |
| 2021-04-27 03:33:50 | → | nineonine joins (~nineonine@50.216.62.2) |
| 2021-04-27 03:34:20 | <Axman6> | You'll often see apps using a monad stack which has ReaderT Config SomeOtherMonad so they can access things like database connection strings/objects, logging level |
| 2021-04-27 03:35:46 | × | ddellac__ quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds) |
| 2021-04-27 03:35:48 | <gnumonic> | It's pretty common to use ReaderT with a mutable variable of some sort (TVar, etc) for concurrency since you can't do concurrency with a state monad. (I think?) |
| 2021-04-27 03:36:27 | <Axman6> | sure, that could form part of your config if you wanted it to |
| 2021-04-27 03:37:25 | → | kirb joins (~kirb@185.163.110.100) |
| 2021-04-27 03:38:25 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 2021-04-27 03:39:43 | <wroathe> | Yo dawg, I put a reader in your reader so you can reader while you reader |
| 2021-04-27 03:40:10 | → | systemhalted joins (~aqualogic@71-129-231-253.lightspeed.rcsntx.sbcglobal.net) |
| 2021-04-27 03:40:12 | <Axman6> | :t fix Reader |
| 2021-04-27 03:40:14 | <lambdabot> | error: |
| 2021-04-27 03:40:14 | <lambdabot> | • Data constructor not in scope: Reader :: a -> a |
| 2021-04-27 03:40:14 | <lambdabot> | • Perhaps you meant one of these: |
| 2021-04-27 03:40:39 | × | jeet quits (~jeet@183.83.214.10) (Quit: WeeChat 3.1) |
| 2021-04-27 03:40:44 | × | geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 246 seconds) |
| 2021-04-27 03:40:58 | <gnumonic> | er yeah I guess my comment didn't really add anything. I'm just so used to writing 'ReaderT (TVar Something)" and thinking "ConcurrentState Something" that I forget that's not the only thing it's for :p |
| 2021-04-27 03:42:16 | → | geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
| 2021-04-27 03:42:46 | × | systemhalted quits (~aqualogic@71-129-231-253.lightspeed.rcsntx.sbcglobal.net) (Remote host closed the connection) |
| 2021-04-27 03:45:23 | × | thc202 quits (~thc202@unaffiliated/thc202) (Read error: Connection reset by peer) |
| 2021-04-27 03:45:30 | → | _xor joins (~xor@74.215.46.133) |
| 2021-04-27 03:46:16 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Quit: WeeChat 3.0.1) |
| 2021-04-27 03:49:32 | × | slack1256 quits (~slack1256@201-223-250-53.baf.movistar.cl) (Remote host closed the connection) |
| 2021-04-27 03:50:37 | <Axman6> | slack1256: At #previousEmployer, we had a pattern of mocking various MTL style effects, which I always wanted to write a TH library for which would could pass in a type class and it'd spit out the record of fields which represented each call for each class method, which would be passed in lists of expected arguments and return values, and IIRC we would make that a ReaderT'd value with an instance for the class we were mocking... it was still |
| 2021-04-27 03:50:37 | <Axman6> | burdensome but that would have made it less so |
| 2021-04-27 03:50:43 | <Axman6> | oh they left :'( |
| 2021-04-27 03:50:51 | <Axman6> | @tell slack1256 At #previousEmployer, we had a pattern of mocking various MTL style effects, which I always wanted to write a TH library for which would could pass in a type class and it'd spit out the record of fields which represented each call for each class method, which would be passed in lists of expected arguments and return values, and IIRC we would make that a ReaderT'd value with an instance for the class we were mocking... it was s |
| 2021-04-27 03:50:52 | <lambdabot> | Consider it noted. |
| 2021-04-27 03:50:52 | <Axman6> | till burdensome but that would have made it less so |
| 2021-04-27 03:50:55 | <Axman6> | <3 |
| 2021-04-27 03:53:26 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 2021-04-27 03:56:52 | × | geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds) |
| 2021-04-27 03:57:00 | → | Tario joins (~Tario@201.192.165.173) |
| 2021-04-27 03:57:04 | → | dastomaten joins (~dastomate@0543f40b.skybroadband.com) |
| 2021-04-27 03:57:09 | × | ech quits (~user@gateway/tor-sasl/ech) (Ping timeout: 240 seconds) |
| 2021-04-27 03:59:15 | <mniip> | is there a cute name for a free category from a quiver? |
| 2021-04-27 04:00:54 | × | dastomate quits (~dastomate@0543f40b.skybroadband.com) (Ping timeout: 268 seconds) |
| 2021-04-27 04:01:49 | → | geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
| 2021-04-27 04:02:51 | × | heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
| 2021-04-27 04:03:29 | → | heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-04-27 04:04:52 | × | zmijunkie1 quits (~Adium@87.123.60.135) (Ping timeout: 240 seconds) |
| 2021-04-27 04:04:53 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 2021-04-27 04:05:06 | <gnumonic> | would performance be very bad with a sum type that had, uh, i dunno, like ten thousand nullary constructors? |
| 2021-04-27 04:05:14 | × | xlei quits (znc@unaffiliated/xlei) (Quit: ZNC - https://znc.in) |
| 2021-04-27 04:05:50 | → | ddellac__ joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 2021-04-27 04:05:53 | <Axman6> | I thought there were limits to the number you could use |
| 2021-04-27 04:06:04 | → | zmijunkie joins (~Adium@87.122.222.91) |
| 2021-04-27 04:06:11 | × | geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds) |
| 2021-04-27 04:06:23 | <Axman6> | ifit were me I'd newtype Word or something, and then make pattern synonyms, but I'm not sure if that's necessary |
| 2021-04-27 04:07:21 | × | dmwit quits (~dmwit@pool-173-66-86-32.washdc.fios.verizon.net) (Ping timeout: 246 seconds) |
| 2021-04-27 04:08:15 | → | dmwit joins (~dmwit@pool-173-66-86-32.washdc.fios.verizon.net) |
| 2021-04-27 04:08:29 | <gnumonic> | it's for some type level stuff, i'm just looking for something that i can singletonize/generate incrementally/has an eq instance/isn't a peano number |
| 2021-04-27 04:08:57 | → | xlei joins (znc@unaffiliated/xlei) |
| 2021-04-27 04:09:26 | <Axman6> | that sounds like it will make for some very unhappy compile times, but shouldn't affect runtime since they'll all have gone away |
| 2021-04-27 04:10:22 | × | ddellac__ quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 252 seconds) |
| 2021-04-27 04:12:27 | × | bgamari quits (~bgamari@72.65.101.132) (Quit: ZNC 1.8.1 - https://znc.in) |
| 2021-04-27 04:12:47 | → | bgamari joins (~bgamari@2001:470:e438::1) |
| 2021-04-27 04:13:23 | → | guest7682358928 joins (c9dbea7b@gateway/web/cgi-irc/kiwiirc.com/ip.201.219.234.123) |
| 2021-04-27 04:13:33 | × | xkapastel quits (uid17782@gateway/web/irccloud.com/x-sgigdjanpsamlbkh) (Quit: Connection closed for inactivity) |
| 2021-04-27 04:14:27 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:9131:c747:1288:d3be) |
| 2021-04-27 04:15:10 | <gnumonic> | actually since i don't need to do induction i guess I could do something like: data SWord16 = SSword16 Bool Bool Bool (...) etc |
| 2021-04-27 04:16:17 | → | sh9 joins (~sh9@softbank060116136158.bbtec.net) |
| 2021-04-27 04:18:44 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:9131:c747:1288:d3be) (Ping timeout: 245 seconds) |
| 2021-04-27 04:19:05 | × | vdukhovni quits (64022765@100.2.39.101) (Quit: Connection closed) |
| 2021-04-27 04:21:10 | × | untakenstupidnic quits (~user@5.114.130.12) (Read error: Connection reset by peer) |
| 2021-04-27 04:21:42 | × | nineonine quits (~nineonine@50.216.62.2) (Remote host closed the connection) |
| 2021-04-27 04:22:18 | → | nineonine joins (~nineonine@50.216.62.2) |
| 2021-04-27 04:23:41 | → | untakenstupidnic joins (~user@5.114.130.12) |
| 2021-04-27 04:31:59 | × | Sgeo quits (~Sgeo@ool-18b9875e.dyn.optonline.net) (Ping timeout: 252 seconds) |
| 2021-04-27 04:32:16 | → | Sgeo joins (~Sgeo@ool-18b9875e.dyn.optonline.net) |
| 2021-04-27 04:42:49 | × | nineonine quits (~nineonine@50.216.62.2) (Ping timeout: 252 seconds) |
| 2021-04-27 04:43:27 | → | ddellac__ joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 2021-04-27 04:47:01 | <Axman6> | gnumonic: do you know how many you actually need? |
| 2021-04-27 04:47:54 | × | ddellac__ quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 245 seconds) |
| 2021-04-27 04:49:08 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 2021-04-27 04:50:23 | → | nineonine joins (~nineonine@50.216.62.2) |
| 2021-04-27 04:52:17 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Remote host closed the connection) |
| 2021-04-27 04:52:39 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 2021-04-27 04:55:31 | <gnumonic> | I don't know the precise number but not more than a few thousand (and that's including a pretty big safety margin for exceptional situations) |
| 2021-04-27 04:55:52 | <gnumonic> | i.e. if i could just singletonize a word16 straightforwardly i'd do that |
| 2021-04-27 04:56:15 | <Axman6> | Ah I was assuming it was soe category of known values, and if it were, you could break it down into its prime factors and reduce the overhead of the binary representation somewhat :P |
| 2021-04-27 05:02:53 | → | sqrt2_ joins (~ben@unaffiliated/sqrt2) |
| 2021-04-27 05:03:07 | × | sqrt2 quits (~ben@unaffiliated/sqrt2) (Ping timeout: 260 seconds) |
| 2021-04-27 05:04:43 | × | DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection) |
| 2021-04-27 05:06:43 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:8cfe:e2c:fb24:3adc) (Ping timeout: 250 seconds) |
| 2021-04-27 05:06:50 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 246 seconds) |
| 2021-04-27 05:11:52 | <gnumonic> | Nah. It's more or less just a unique identifier for some objects. It doesn't even have to be a number really, but it's not like Symbols are any better than GHC.TypeLits Nats when you need a singleton you can stash inside a data structure... Actually I dunno why I'm doing a binary representation at all. I might as well do 'data IDSym = A | B | (etc)' and 'data ID = IDSym IDSym IDSym (etc)'. |
| 2021-04-27 05:13:54 | <gnumonic> | actually i don't even need the last (etc). note to self, think more before starting to code |
| 2021-04-27 05:16:01 | → | dastomate joins (~dastomate@0543f40b.skybroadband.com) |
| 2021-04-27 05:19:17 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:ed88:b772:a9fc:1e72) |
| 2021-04-27 05:19:50 | × | dastomaten quits (~dastomate@0543f40b.skybroadband.com) (Ping timeout: 268 seconds) |
| 2021-04-27 05:20:04 | → | stree joins (~stree@68.36.8.116) |
All times are in UTC.