Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 658 659 660 661 662 663 664 665 666 667 668 .. 5022
502,152 events total
2020-10-15 20:53:21 × Guest72657 quits (~AllahuAkb@mskresolve-a.mskcc.org) (Quit: Textual IRC Client: www.textualapp.com)
2020-10-15 20:54:02 <monochrom> dolio: Haha yeah. No worries, I was joking.
2020-10-15 20:54:15 thir joins (~thir@p200300f27f025800e13a3eca7002ede4.dip0.t-ipconnect.de)
2020-10-15 20:54:36 <monochrom> wait, what commuting?
2020-10-15 20:54:54 reppertj joins (~textual@pool-96-246-209-59.nycmny.fios.verizon.net)
2020-10-15 20:57:03 × dhil quits (~dhil@78.156.97.38) (Ping timeout: 260 seconds)
2020-10-15 20:57:22 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
2020-10-15 20:57:47 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
2020-10-15 20:58:39 × noumenon quits (~daemon@113.51-175-156.customer.lyse.net) (Quit: Leaving)
2020-10-15 21:00:02 × Lthere quits (~Lthere@185.204.1.185) ()
2020-10-15 21:01:12 × thir quits (~thir@p200300f27f025800e13a3eca7002ede4.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-15 21:02:35 snakemas1 joins (~snakemast@213.100.206.23)
2020-10-15 21:04:08 hekkaidekapus_ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
2020-10-15 21:05:52 × hekkaidekapus_ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Remote host closed the connection)
2020-10-15 21:06:16 hekkaidekapus_ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
2020-10-15 21:06:43 × hekkaidekapus quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds)
2020-10-15 21:07:31 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2020-10-15 21:08:13 × machinedgod quits (~machinedg@24.105.81.50) (Quit: leaving)
2020-10-15 21:10:31 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
2020-10-15 21:10:48 × jsynacek quits (~jsynacek@ip-185-149-130-112.kmenet.cz) (Ping timeout: 258 seconds)
2020-10-15 21:10:49 × hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 246 seconds)
2020-10-15 21:11:08 dhil joins (~dhil@195.213.192.122)
2020-10-15 21:11:27 Kaeipi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
2020-10-15 21:11:55 × knupfer quits (~Thunderbi@200116b82c60f70035574b36d39cb792.dip.versatel-1u1.de) (Ping timeout: 240 seconds)
2020-10-15 21:12:33 × Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
2020-10-15 21:12:56 mirrorbird joins (~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1)
2020-10-15 21:14:04 sdx23 joins (~sdx23@unaffiliated/sdx23)
2020-10-15 21:16:09 machinedgod joins (~machinedg@24.105.81.50)
2020-10-15 21:17:33 × jneira_ quits (~jneira@80.30.100.250) (Ping timeout: 260 seconds)
2020-10-15 21:23:59 × c0c0 quits (~coco@212-51-137-149.fiber7.init7.net) (Quit: WeeChat 2.7.1)
2020-10-15 21:24:15 proofofme joins (~proofofme@184-96-74-65.hlrn.qwest.net)
2020-10-15 21:24:33 jneira_ joins (~jneira@80.30.100.250)
2020-10-15 21:27:16 <koz_> I have a data type Foo, and wanna write a ... whatever you call it that allows a user to create values of Foo with a TH splice.
2020-10-15 21:27:26 <koz_> What do I need to read to understand how that works?
2020-10-15 21:27:34 <koz_> (quasi-quotation?)
2020-10-15 21:29:50 gxt joins (~gxt@gateway/tor-sasl/gxt)
2020-10-15 21:29:59 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 246 seconds)
2020-10-15 21:30:13 <monochrom> Do you mean the [e| ... ] one? The $(...) one?
2020-10-15 21:31:04 <koz_> monochrom: Yeah, the [e|...] one. Like the one inline-c uses?
2020-10-15 21:31:17 <monochrom> Or neither, instead a function f :: X -> Q Exp so your users can write $(f ...) ?
2020-10-15 21:31:39 Stanley00 joins (~stanley00@unaffiliated/stanley00)
2020-10-15 21:31:48 <koz_> The [e| ... ] one is what I was after.
2020-10-15 21:31:56 <koz_> Dunno proper way to name it, or how to define my own... well, e.
2020-10-15 21:32:44 <monochrom> You cannot define your own e. Even though quasi quotation uses a similar syntax [ your_function_name | ... ]
2020-10-15 21:33:03 <koz_> OK, I'm clearly missing something here.
2020-10-15 21:33:11 <monochrom> However, if you write [e|...], the type is Q Exp
2020-10-15 21:33:16 thir joins (~thir@p200300f27f025800e13a3eca7002ede4.dip0.t-ipconnect.de)
2020-10-15 21:33:16 <koz_> Ah.
2020-10-15 21:33:39 <koz_> I want the [ your_function_name | ... ] syntax, but dunno how to write the your_function_name in question.
2020-10-15 21:36:26 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 272 seconds)
2020-10-15 21:36:39 <koz_> Do I just need to write something like foo :: QuasiQuoter (plus definition) or something?
2020-10-15 21:36:51 <koz_> And then folks can use [ foo | ... ]?
2020-10-15 21:37:53 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-15 21:39:29 conal joins (~conal@64.71.133.70)
2020-10-15 21:39:30 × jgt1 quits (~jgt@77-255-14-254.adsl.inetia.pl) (Read error: Connection reset by peer)
2020-10-15 21:39:37 <koz_> Sorry, [foo| ... |].
2020-10-15 21:39:47 jgt1 joins (~jgt@77-255-14-254.adsl.inetia.pl)
2020-10-15 21:40:17 × LKoen quits (~LKoen@81.255.219.130) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
2020-10-15 21:40:27 × deviantfero quits (~deviantfe@190.99.48.231) (Ping timeout: 260 seconds)
2020-10-15 21:41:14 <monochrom> So I think I ended up learning from just the user guide and the Language.Haskell.TH.* doc. Although the user guide used to refer to a haskellwiki page, which in turn also refer to a paper, I found the haskellwiki example too steep, and the paper, well, the user guide already points out that the paper is outdated.
2020-10-15 21:41:23 × thir quits (~thir@p200300f27f025800e13a3eca7002ede4.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
2020-10-15 21:41:33 <koz_> monochrom: OK, I think I have enough to go on.
2020-10-15 21:42:13 <koz_> What would I use to signal a (compile-time, I assume?) error in TH? I need to fill in the fields of QuasiQuoter corresponding to inappropriate contexts with errors, as per the docs.
2020-10-15 21:42:31 <monochrom> And of course, the user guide is too brief, and the Language.Haskell.TH.* doc too reference material. So I learned by trial and error.
2020-10-15 21:43:13 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2020-10-15 21:43:26 <monochrom> For [foo|...] you write foo :: QuasiQuoter, yeah.
2020-10-15 21:43:57 hackage katip-datadog 0.2.0.0 - Datadog scribe for the Katip logging framework https://hackage.haskell.org/package/katip-datadog-0.2.0.0 (MichaelXavier)
2020-10-15 21:43:58 Merfont joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
2020-10-15 21:43:58 × Kaeipi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Read error: Connection reset by peer)
2020-10-15 21:44:41 × chaosmasttter quits (~chaosmast@p200300c4a711b001c4478125cc0e8bf4.dip0.t-ipconnect.de) (Quit: WeeChat 2.9)
2020-10-15 21:46:05 <monochrom> Maybe Q being an instance of MonadFail helps the static error message.
2020-10-15 21:46:27 × danvet_ quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds)
2020-10-15 21:46:28 <koz_> So just use fail "Error message goes here"?
2020-10-15 21:46:37 <monochrom> Oh, there are also reportError etc right at the beginning of the Language.Haskell.TH
2020-10-15 21:46:59 <monochrom> (well, after the long TOC)
2020-10-15 21:46:59 dcoutts_ joins (~duncan@33.14.75.194.dyn.plus.net)
2020-10-15 21:47:20 <monochrom> Haha "Report an error to the user, but allow the current splice's computation to carry on. To abort the computation, use fail."
2020-10-15 21:47:27 hackage katip-elasticsearch 0.7.0.0 - ElasticSearch scribe for the Katip logging framework. https://hackage.haskell.org/package/katip-elasticsearch-0.7.0.0 (MichaelXavier)
2020-10-15 21:47:30 <koz_> So, fail's the way, got it.
2020-10-15 21:47:35 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Quit: Goodbye)
2020-10-15 21:48:58 hackage jsonifier 0.1 - Fast and simple JSON encoding toolkit https://hackage.haskell.org/package/jsonifier-0.1 (NikitaVolkov)
2020-10-15 21:49:39 mav1 joins (~mav@i5E86B60A.versanet.de)
2020-10-15 21:51:28 hackage jsonifier 0.1.0.1 - Fast and simple JSON encoding toolkit https://hackage.haskell.org/package/jsonifier-0.1.0.1 (NikitaVolkov)
2020-10-15 21:53:25 × alp quits (~alp@2a01:e0a:58b:4920:650c:2dd8:d1c6:e413) (Ping timeout: 272 seconds)
2020-10-15 21:54:20 <monochrom> I think TH ends up being one of those things that look like intimidating to learn because there are a lot of things, e.g., Language.Haskell.TH.Syntax is very long and detailed and comprehensive, but it turns out for 90% of use cases you only need to learn 10% of it.
2020-10-15 21:55:00 schwuk joins (~schwuk@178.162.209.171)
2020-10-15 21:55:37 <monochrom> For example, you can ignore all of Language.Haskell.TH.Syntax because you will just need to write [e| $(x) + 1|] instead of meticulously building the AST.
2020-10-15 21:57:57 × isovector1 quits (~isovector@172.103.216.166) (Ping timeout: 258 seconds)
2020-10-15 21:58:02 <monochrom> So the only things you really need to know are: There are Q Exp, Q [Dec], etc; Q is MonadIO, so you can always go liftIO (putStrLn "We thank our sponsor NordVPN. Do you need a VPN? ..."); how to prevent variable capture; how to deliberately cause variable capture.
2020-10-15 21:59:44 <monochrom> And TH's notion of declaration groups --- this affects visibility.
2020-10-15 21:59:45 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
2020-10-15 22:00:23 × Amras quits (~Amras@unaffiliated/amras0000) (Ping timeout: 272 seconds)
2020-10-15 22:00:30 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2020-10-15 22:05:08 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2020-10-15 22:06:14 DavidEichmann joins (~david@43.240.198.146.dyn.plus.net)
2020-10-15 22:07:22 <int-e> monochrom: that's so triggering
2020-10-15 22:07:43 × hekkaidekapus_ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds)
2020-10-15 22:08:01 <int-e> (the string literal, I mean)
2020-10-15 22:09:07 hekkaidekapus_ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
2020-10-15 22:10:10 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) ()

All times are in UTC.