Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-17 02:10:53 elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
2021-03-17 02:13:35 <fen> and that works i think for the fully connected version https://pastebin.com/raw/WmFFrRZC
2021-03-17 02:15:15 × urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna)
2021-03-17 02:15:50 spoonm joins (~spoonm@tokyo.spoonm.org)
2021-03-17 02:18:07 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-17 02:19:13 conal joins (~conal@64.71.133.70)
2021-03-17 02:24:09 Sgeo__ joins (~Sgeo@ool-18b98aa4.dyn.optonline.net)
2021-03-17 02:24:36 × InsideBreeze quits (~manjaro-i@183.217.97.244) (Remote host closed the connection)
2021-03-17 02:27:29 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 244 seconds)
2021-03-17 02:27:30 × Sgeo_ quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Ping timeout: 246 seconds)
2021-03-17 02:28:59 <fen> and then, how do i "compile" this down to just one polynomial in the original variables?
2021-03-17 02:30:17 × Feuermagier quits (~Feuermagi@2a02:2488:4211:3400:246e:bf09:8453:9d6) (Ping timeout: 260 seconds)
2021-03-17 02:30:54 × son0p_ quits (~son0p@181.58.39.182) (Quit: Lost terminal)
2021-03-17 02:36:53 × glamas quits (~glamas@107.182.17.237) (Quit: ZNC 1.7.4 - https://znc.in)
2021-03-17 02:37:32 manjaroi3 joins (~manjaro-i@183.217.97.244)
2021-03-17 02:38:02 glamas joins (~glamas@107.182.17.237)
2021-03-17 02:38:19 manjaroi3 is now known as InsideBreeze
2021-03-17 02:41:57 × xff0x quits (~xff0x@2001:1a81:52ee:e100:f577:1f30:738f:e56) (Ping timeout: 260 seconds)
2021-03-17 02:42:02 × renzhi quits (~renzhi@2607:fa49:653f:eb00::296e) (Ping timeout: 264 seconds)
2021-03-17 02:43:35 xff0x joins (~xff0x@2001:1a81:5326:4900:3e74:f6d7:c8e5:a70d)
2021-03-17 02:46:33 dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2021-03-17 02:46:37 × ezrakilt_ quits (~ezrakilty@97-113-58-224.tukw.qwest.net) (Remote host closed the connection)
2021-03-17 02:49:43 × molehillish quits (~molehilli@ip98-167-226-26.ph.ph.cox.net) (Remote host closed the connection)
2021-03-17 02:50:15 molehillish joins (~molehilli@2600:8800:8d06:1800:2195:2964:ee:f10b)
2021-03-17 02:52:34 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-03-17 02:54:42 × Sheilong quits (uid293653@gateway/web/irccloud.com/x-rdlxtdjjstsfznpl) ()
2021-03-17 02:55:14 × molehillish quits (~molehilli@2600:8800:8d06:1800:2195:2964:ee:f10b) (Ping timeout: 264 seconds)
2021-03-17 02:55:24 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection)
2021-03-17 02:56:12 × tomku quits (~tomku@unaffiliated/tomku) (Ping timeout: 246 seconds)
2021-03-17 02:56:45 × augnun quits (~augnun@2804:14c:658b:41bb:b8be:cb43:1724:b623) (Quit: WeeChat 3.1)
2021-03-17 02:57:03 × alx741 quits (~alx741@186.178.109.138) (Quit: alx741)
2021-03-17 02:58:08 <infinisil> fen: Why is there an (S m) in Poly?
2021-03-17 02:58:25 molehillish joins (~molehilli@ip98-167-226-26.ph.ph.cox.net)
2021-03-17 02:58:31 <fen> its not really a "polynomial"
2021-03-17 02:58:49 <infinisil> Ah I haven't read the backlog
2021-03-17 02:58:55 <fen> its like a polynomial where it can refer to the previous monmials as if they were input variables
2021-03-17 02:59:22 <fen> so it should be evaluable to a polynomial in just these input variables...
2021-03-17 02:59:41 <fen> for differentiation, otherwise this thing has product rule terms
2021-03-17 03:00:00 <spidr> are you all math majors
2021-03-17 03:00:06 <infinisil> fen: What do you mean by "compile" it down?
2021-03-17 03:00:14 Alleria joins (~textual@mskresolve-a.mskcc.org)
2021-03-17 03:00:37 Alleria is now known as Guest8076
2021-03-17 03:01:12 <fen> well, the previous monomials are thought of as bound variables, so dereferencfing over those and rewriting them in terms of eventually just the inputs, and you have to kind of multiply down the powers, distributing over the product of terms in each monomial
2021-03-17 03:02:37 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-17 03:02:51 × dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 246 seconds)
2021-03-17 03:02:56 <infinisil> Got an example of that?
2021-03-17 03:02:59 <fen> so each monomial basically just expands and you are left with as many terms at the end
2021-03-17 03:04:20 <fen> f (x,y,z) = "a=" x*y*(z**0) + "b=" 2*x^^0*y*z*a
2021-03-17 03:04:26 × drbean quits (~drbean@TC210-63-209-44.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in)
2021-03-17 03:04:26 <fen> can be rewritten;
2021-03-17 03:04:48 <fen> f (x,y,z) = x*y*(z**0) + "b=" 2*x^^0*y*z*x*y*(z**0)
2021-03-17 03:04:59 <fen> f (x,y,z) = x*y*(z**0) + 2*x^^0*y*z*x*y*(z**0)
2021-03-17 03:05:05 × Guest8076 quits (~textual@mskresolve-a.mskcc.org) (Ping timeout: 265 seconds)
2021-03-17 03:05:18 <fen> i guess you have to collect terms and combine powers
2021-03-17 03:05:21 <infinisil> Ah I see
2021-03-17 03:05:26 × nfd quits (~nfd9001@2601:602:77f:1820:7826:d79f:3033:c241) (Ping timeout: 264 seconds)
2021-03-17 03:05:34 <fen> and if there had been a power on the `a'
2021-03-17 03:05:49 <fen> f (x,y,z) = "a=" x*y*(z**0) + "b=" 2*x^^0*y*z*(a**0.5)
2021-03-17 03:05:50 FinnElija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716)
2021-03-17 03:05:50 finn_elija is now known as Guest80609
2021-03-17 03:05:50 FinnElija is now known as finn_elija
2021-03-17 03:06:05 <fen> f (x,y,z) = x*y*(z**0) + 2*x^^0*y*z*(x*y*(z**0))**0.5
2021-03-17 03:06:16 <fen> f (x,y,z) = x*y*(z**0) + 2*x**0*y*z*(x*y*(z**0))**0.5
2021-03-17 03:07:00 <infinisil> So for a start, I suggest renaming your pseudo-polynomial type to something different, and then creating an actual Polynomial type that captures the result you want
2021-03-17 03:07:07 <fen> where then you have to; distribute the power over the rewritten terms,collect terms and combine powers
2021-03-17 03:07:14 <infinisil> Then write a function that changes the pseudo-polynomial into a proper one
2021-03-17 03:07:18 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
2021-03-17 03:07:44 <fen> and back again
2021-03-17 03:08:11 tomku joins (~tomku@unaffiliated/tomku)
2021-03-17 03:08:13 <fen> and something then can rewrite the pseudo-polynomial into this form
2021-03-17 03:08:55 × Guest80609 quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 268 seconds)
2021-03-17 03:09:51 ezrakilty joins (~ezrakilty@97-113-58-224.tukw.qwest.net)
2021-03-17 03:11:28 × tinwood quits (~tinwood@general.default.akavanagh.uk0.bigv.io) (Remote host closed the connection)
2021-03-17 03:14:25 Alleria__ joins (~textual@mskresolve-a.mskcc.org)
2021-03-17 03:14:38 tinwood joins (~tinwood@general.default.akavanagh.uk0.bigv.io)
2021-03-17 03:15:45 × m0rphism quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 256 seconds)
2021-03-17 03:19:06 × Alleria__ quits (~textual@mskresolve-a.mskcc.org) (Ping timeout: 260 seconds)
2021-03-17 03:31:15 <fen> infinisil: https://pastebin.com/raw/Z6J6yybf
2021-03-17 03:34:43 <infinisil> fen: Nice, what would the type be of a function that converts from PolyDeep to Polynomial?
2021-03-17 03:36:02 <fen> the type parameters on PolyDeep are the input and output lengths, so it depends how deep it is, but with no extra monomials it would be Polynomial n -> PolyDeep n n
2021-03-17 03:36:39 <infinisil> fen: *from* PolyDeep to Polynomial
2021-03-17 03:36:49 <fen> now, in the other direction, any amount of extra zero monomials (0*(x**0 * y ** 0 ...)) can be used as padding
2021-03-17 03:37:23 <fen> oh wait, thats in the same direction, to initialise an extension having mapped into the lower terms
2021-03-17 03:37:49 <fen> generally we should have forall n m. PolyDeep m n -> Polynomial n
2021-03-17 03:37:58 <fen> if i have the arguments the right way round
2021-03-17 03:38:26 <fen> which says that we can squash down any `m' depthed PolyDeep into a polynomial the length of its first layer
2021-03-17 03:38:44 <fen> well, the "layers" are more like a diagonal...
2021-03-17 03:38:47 <infinisil> Yeah that sounds right
2021-03-17 03:39:11 <infinisil> So the goal is to implement a function PolyDeep m n -> Polynomial n
2021-03-17 03:39:15 <fen> were you thinking to try and store the intermediate values in the PolyDeep container?
2021-03-17 03:39:36 <fen> squashing it down one layer at a time seems feasible
2021-03-17 03:40:01 <infinisil> Yeah, no need to store intermediate results anywhere, using recursion should work
2021-03-17 03:40:17 <fen> so you would end up with PolyDeep n n, and then only need PolyDeep n n -> Polynomial n which should be trivial to write
2021-03-17 03:40:39 <fen> i dont see how you wouldnt need intermediate values...
2021-03-17 03:41:02 <infinisil> Create a function with such a type, then pattern match on the PolyDeep for a start
2021-03-17 03:41:03 <fen> i would recurse on a class with parameters m n
2021-03-17 03:41:53 <fen> yeah the basecase should be easy, but i dont think i can write the recursive case
2021-03-17 03:44:25 <infinisil> fen: Give it a try. Keep in mind that in the recursive case you can rely on such a `deepToPoly` function having converting an m-PolyDeep into a Polynomial already
2021-03-17 03:45:06 hrnz parts (~hrnz@unaffiliated/hrnz) ("der channel hier ist nicht mein niveau ciao")
2021-03-17 03:46:45 <infinisil> (Gotta go sleep now though)

All times are in UTC.