2025/03/21

Newest at the top

2025-03-21 11:08:36 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 264 seconds)
2025-03-21 11:07:05 +0100 <tomsmeding> I like this blast-to-the-past Haskell style
2025-03-21 11:06:38 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 245 seconds)
2025-03-21 11:06:15 +0100 <Athas> Forward over Forward.
2025-03-21 11:06:10 +0100 <tomsmeding> 'ad' with Forward over Forward, or Forward over ForwardDouble?
2025-03-21 11:05:45 +0100 <tomsmeding> lol
2025-03-21 11:05:42 +0100 <Athas> Sure, but it is already faster than 'ad'.
2025-03-21 11:05:41 +0100 <tomsmeding> but let me read
2025-03-21 11:05:31 +0100 <tomsmeding> that will likely be faster if you `data Bundle = Bundle {-# UNPACK #-} !Double {-# UNPACK #-} !Double`
2025-03-21 11:05:24 +0100 <Athas> But it is easy to fix.
2025-03-21 11:05:18 +0100 <Athas> There are also n+k patterns.
2025-03-21 11:05:13 +0100 <Athas> Yes, it is aaaalmost working Haskell.
2025-03-21 11:04:42 +0100 <tomsmeding> ooh, DatatypeContexts
2025-03-21 11:04:26 +0100 <Athas> And the dual numbers: https://engineering.purdue.edu/~qobi/stalingrad-examples2009/common-ghc.html
2025-03-21 11:04:14 +0100 <Athas> This is the ad hoc version: https://engineering.purdue.edu/~qobi/stalingrad-examples2009/particle-FF-ghc.html
2025-03-21 11:04:14 +0100 <Athas> This is my code: https://github.com/gradbench/gradbench/blob/4fdb8cc00daaae42b99431fde3da7be1b1bbbc13/tools/haskell…
2025-03-21 11:02:35 +0100 <tomsmeding> does that help?
2025-03-21 11:02:28 +0100 <tomsmeding> the former you get with reverse AD, which is more complicated
2025-03-21 11:02:25 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-03-21 11:02:09 +0100 <tomsmeding> the typical dual-numbers formulation gives you the _latter_, whereas you usually (but not always) want the former
2025-03-21 11:01:49 +0100 <tomsmeding> the problem is that you can do so efficiently for a function of type R^n -> R, or for a function of type R -> R^n
2025-03-21 11:01:31 +0100 <tomsmeding> __monty__: it is
2025-03-21 11:01:21 +0100 <__monty__> (I'd appreciate another recap of what AD is. It's not just a way to numerically compute derivatives of numerical functions, is it? Feel free to leave the recap for when the discussion is more or less over.)
2025-03-21 11:00:34 +0100 <tomsmeding> can you share your code with the manual dual numbers? I'm curious to see what beats `ad`
2025-03-21 11:00:14 +0100 <tomsmeding> few people are
2025-03-21 11:00:04 +0100 <Athas> I've realised I'm not good at fast Haskell.
2025-03-21 10:59:46 +0100 <Athas> Well, it's not so easy - I need actual nested AD.
2025-03-21 10:59:28 +0100 <tomsmeding> did you try Numeric.AD.Mode.Tower(.Double)? It purports to be higher-order forward derivatives
2025-03-21 10:59:03 +0100 <tomsmeding> forward in `ad` is just a dual number, so that's rather surprising
2025-03-21 10:58:43 +0100 <Athas> Forward-over-forward. And it's slower than just hacking up your own dual numbers.
2025-03-21 10:58:29 +0100 <tomsmeding> Athas: which mode did you use?
2025-03-21 10:58:19 +0100 <Athas> tomsmeding: well, I got it working (albeit with undesirable boilerplate), but now it's just remarkably slow.
2025-03-21 10:58:12 +0100 <tomsmeding> (Assuming you mean 2nd, etc. derivatives, not "AD of code containing (higher-order) functions")
2025-03-21 10:57:47 +0100 <tomsmeding> Athas: I have few insights regarding higher-order derivatives in general, let alone with `ad`. :P
2025-03-21 10:41:14 +0100califax(~califax@user/califx) califx
2025-03-21 10:39:48 +0100califax(~califax@user/califx) (Ping timeout: 264 seconds)
2025-03-21 10:36:09 +0100lxsameer(~lxsameer@Serene/lxsameer) (Ping timeout: 260 seconds)
2025-03-21 10:30:07 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be) kuribas
2025-03-21 10:26:41 +0100califax(~califax@user/califx) califx
2025-03-21 10:26:00 +0100califax(~califax@user/califx) (Ping timeout: 264 seconds)
2025-03-21 10:21:30 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-03-21 10:16:59 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-03-21 10:15:22 +0100dhil(~dhil@2a0c:b381:52e:3600:dd6a:fa62:e132:ec11) dhil
2025-03-21 10:12:39 +0100 <[exa]> `someglue` should be solvable by following a typehole
2025-03-21 10:12:30 +0100forell(~forell@user/forell) forell
2025-03-21 10:11:54 +0100 <[exa]> basically having the global value as this should do it: memoized = toLazyByteString ...someglue... runHtmlT $ mypage
2025-03-21 10:09:55 +0100 <[exa]> but you can cache the prebuild piece (let it evaluate to something with runHtml or so?) and then just shove it into the other html builders?
2025-03-21 10:08:34 +0100 <[exa]> Liamzee: yap that's a builder, not cacheable
2025-03-21 10:06:25 +0100krei-se(~krei-se@p3ee0faf4.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2025-03-21 10:06:01 +0100krei-se-(~krei-se@p5dea1e73.dip0.t-ipconnect.de) krei-se