Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-24 09:26:40 <dminuoso> That's how swagger2 does it, and it's not bad
2020-11-24 09:27:06 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-11-24 09:27:21 <idnar> dminuoso: oh hmm, generic-lens has that, I wonder why generic-optics doesn't
2020-11-24 09:27:53 <dminuoso> idnar: Also, why would I use generics over TH here?
2020-11-24 09:28:02 <dminuoso> The TH code is likely to be much faster
2020-11-24 09:28:43 <dminuoso> Also, its controllable and configurable
2020-11-24 09:29:00 _xor joins (~xor@74.215.46.133)
2020-11-24 09:29:11 <dminuoso> With Generics you're, essentially, tied to whatever the implementation has, unless you start flinging newtypes and type families at it
2020-11-24 09:31:00 <idnar> dminuoso: there's a paper explaining how they got it to ~the performance of TH, but yes there's various up/downsides
2020-11-24 09:31:48 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
2020-11-24 09:32:07 <dminuoso> With TH I can just dump the splice, and splice it manually by copy and paste.
2020-11-24 09:32:21 <dminuoso> Can you reify Generics code like that?
2020-11-24 09:32:27 acagastya parts (~acagastya@wikinews/acagastya) ("WeeChat 2.8")
2020-11-24 09:32:46 <dminuoso> But, Ill check out the paper
2020-11-24 09:33:21 <dminuoso> Oh I think you misunderstood
2020-11-24 09:33:30 <dminuoso> Im not talking about the *generated* lens, Im talking about the compilation time overhead
2020-11-24 09:33:35 <dminuoso> Generics are crazy slow
2020-11-24 09:34:24 <idnar> dminuoso: huh, TH is _much_ slower to compile IME
2020-11-24 09:34:56 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-ivgwdqliaykucuud) (Quit: Connection closed for inactivity)
2020-11-24 09:35:15 <idnar> dminuoso: I guess maybe It Depends™
2020-11-24 09:36:30 <dminuoso> Im not sure how Generics could be faster, really.
2020-11-24 09:38:22 falafel_ joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4)
2020-11-24 09:38:55 × Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
2020-11-24 09:39:14 × LeD quits (5fa448e7@95.164.72.231) (Ping timeout: 245 seconds)
2020-11-24 09:39:59 <idnar> oh re: labels, "I intend to add support for this for generic-optics too, but it isn’t implemented yet."
2020-11-24 09:40:24 <idnar> guess that explains it
2020-11-24 09:52:14 × falafel_ quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 264 seconds)
2020-11-24 09:54:37 <maerwald> my experience with aeson th vs generics is that th is slower afair
2020-11-24 09:56:48 DavidEichmann joins (~david@62.110.198.146.dyn.plus.net)
2020-11-24 09:57:42 <maerwald> but that's anecdotal evidence
2020-11-24 09:57:46 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-11-24 09:58:24 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
2020-11-24 09:58:58 <tdammers> slower to compile, or slower to run?
2020-11-24 09:59:06 <tdammers> oh wait
2020-11-24 09:59:19 <tdammers> note to self, read scrollback before blurting out word vomit
2020-11-24 09:59:34 raichoo joins (~raichoo@213.240.178.58)
2020-11-24 10:00:23 Rudd0 joins (~Rudd0@185.189.115.98)
2020-11-24 10:01:14 bulters joins (~jeroen@5920ab49.static.cust.trined.nl)
2020-11-24 10:02:18 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
2020-11-24 10:02:41 hidedagger joins (~nate@unaffiliated/hidedagger)
2020-11-24 10:07:46 <kuribas> OTOH generics is pure haskell, also TH sometimes has weird effects on declarations, TH doesn't work with cross-compiling, etc...
2020-11-24 10:09:26 <dminuoso> maerwald: Well and it depends on the quality of TH code
2020-11-24 10:09:40 shangxiao joins (~davids@101.181.159.140)
2020-11-24 10:10:04 <maerwald> dminuoso: also, you should be using openapi3, not swagger2 :)
2020-11-24 10:10:14 <dminuoso> Generics is probably easier to get right both in compilation time as well as runtime overhead, but TH is easier to make it deterministic and *definitely* obtain a particular result
2020-11-24 10:10:29 <dminuoso> maerwald: Yeah, there was some reasons.. dont really recall them.
2020-11-24 10:10:42 <maerwald> it's pretty much the same api
2020-11-24 10:10:48 <dminuoso> Oh, it wasn't released at the time
2020-11-24 10:12:27 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
2020-11-24 10:12:30 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-11-24 10:13:34 <dminuoso> maerwald: interesting, it looks almost identical in terms of dependencies and module structure
2020-11-24 10:13:41 <kuribas> maerwald: question, is there an easy way to download a docker image and compile to a musl binary?
2020-11-24 10:13:59 <maerwald> kuribas: yes
2020-11-24 10:14:00 <dminuoso> perhaps its a drop-in replacement?
2020-11-24 10:14:04 <dminuoso> Will try
2020-11-24 10:14:11 <maerwald> dminuoso: yeah, upstream was unresponsive so they forked
2020-11-24 10:14:16 <kuribas> maerwald: which can be done on differents OSes? windows, linuxes, ...
2020-11-24 10:14:28 <dminuoso> Cool, I remember OpenAPI 3.0 has some things that 2.x failed to represent
2020-11-24 10:14:43 hidedagger joins (~nate@unaffiliated/hidedagger)
2020-11-24 10:14:44 <maerwald> dminuoso: yes, oneOf
2020-11-24 10:14:52 <dminuoso> Right, that's the one
2020-11-24 10:14:58 × hidedagger quits (~nate@unaffiliated/hidedagger) (Client Quit)
2020-11-24 10:15:18 <dminuoso> Silly Haskellers and their sum types
2020-11-24 10:15:26 <maerwald> kuribas: I have never used docker on windows
2020-11-24 10:15:34 <dminuoso> Does openapi3 has allOf support?
2020-11-24 10:15:36 <kuribas> maerwald: well, linuxes then?
2020-11-24 10:16:03 <dminuoso> (k ~ A_Lens, a ~ Maybe [Referenced Schema], b ~ Maybe [Referenced Schema]) => LabelOptic "oneOf" k Schema Schema a b
2020-11-24 10:16:05 <dminuoso> Looks like, sweet
2020-11-24 10:16:30 <maerwald> kuribas: https://gist.github.com/hasufell/f0893abfbba63ac4ea40feb0520946ee
2020-11-24 10:16:38 <maerwald> something like that
2020-11-24 10:16:57 <kuribas> maerwald: right, thanks!
2020-11-24 10:17:02 noteness joins (noteness@unaffiliated/nessessary129)
2020-11-24 10:17:37 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds)
2020-11-24 10:19:21 __monty__ joins (~toonn@unaffiliated/toonn)
2020-11-24 10:23:27 hseg joins (~gesh@185.120.126.113)
2020-11-24 10:28:14 <kuribas> I wonder if something exists between monad and applicative.
2020-11-24 10:28:30 <kuribas> for example: say you have two forms, and the result of the second form depends on the first form.
2020-11-24 10:28:47 <kuribas> however you know the second form will be always there.
2020-11-24 10:29:23 <kuribas> it's not an applicative, because the second form depends on the first. But not a monad either, because the existance of the second form is independent of the result of the first.
2020-11-24 10:29:53 <merijn> kuribas: So...Selective Functors? :p
2020-11-24 10:30:01 <merijn> kuribas: Did you live under a rock last year? ;)
2020-11-24 10:30:22 <kuribas> seem so ;-P
2020-11-24 10:30:32 <merijn> kuribas: https://www.staff.ncl.ac.uk/andrey.mokhov/selective-functors.pdf
2020-11-24 10:30:34 <kuribas> thanks :)
2020-11-24 10:30:47 <n0042> The vocabulary of learning Haskell has got to be one of the neatest things I've ever experienced. Thank you both for that
2020-11-24 10:31:06 <merijn> kuribas: In fact, I think you are literally describing Selective with your optional 2nd form :p
2020-11-24 10:31:14 <bulters> I come here only for the vocab ;-)
2020-11-24 10:31:31 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-11-24 10:32:01 <kuribas> merijn: the second for is not optional
2020-11-24 10:32:04 p8m_ joins (p8m@gateway/vpn/protonvpn/p8m)
2020-11-24 10:32:28 <merijn> kuribas: First one, whatever, reading is hard :p
2020-11-24 10:32:41 × p8m quits (p8m@gateway/vpn/protonvpn/p8m) (Ping timeout: 265 seconds)
2020-11-24 10:32:42 <kuribas> any, sounds interesting, I'll have a look
2020-11-24 10:32:54 <bulters> @merijn: wouldn't it be an Invariant Functor?
2020-11-24 10:32:54 <lambdabot> Unknown command, try @list
2020-11-24 10:32:56 <kuribas> *anyway*... writing is hard :)
2020-11-24 10:33:12 <bulters> since it's always there, disregarding the first form?
2020-11-24 10:33:54 <bulters> (disclaimer: I understand sh*t about formal type theory....)
2020-11-24 10:34:44 <[exa]> invariant functor sounds a bit more like Const
2020-11-24 10:34:45 <merijn> various functor types don't really have much to do with type theory, though :p

All times are in UTC.