about summary refs log tree commit diff
path: root/users/Profpatsch/my-prelude (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-05-13 r/8138 fix(users/Profpatsch/MonadPostgres): take old formatter processProfpatsch1-4/+29
The pool library would always take out the most recently used perl resource again, and since that is the one that we just spawned, we’d be back at square one. Instead, we try to find an older one (or up to 200ms old) and use that instead, because that should be the one with the fastest response time. Okay, that was enough bullshit lol. Change-Id: I6b999e682d02ab03206a9d1b707edf16daa04a0d Reviewed-on: https://cl.tvl.fyi/c/depot/+/11657 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de>
2024-05-13 r/8137 feat(users/Profpatsch/MyPrelude): add ArgProfpatsch3-0/+36
Change-Id: I218562c924489ff9cba783dc88ecb8e777c8aac3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11656 Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-05-13 r/8136 feat(users/Profpatsch/MonadPostgres): time formatting with eventProfpatsch1-3/+40
Instead of opening a separate span, we just add events for start and end of formatting. Change-Id: I26f6792dfdcd23c01cff415fa0f436d6a22d93fe Reviewed-on: https://cl.tvl.fyi/c/depot/+/11655 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-05-13 r/8135 feat(users/Profpatsch/whatcd-resolver): use PgFormatPoolProfpatsch1-47/+47
It does chip of the init overhead of like 50–100ms, even though the formatting still takes quite some time (up to 200ms for more complex expressions). Maybe we need some simplistic formatter in the future that just splits on parens? It’s not an easy problem … Change-Id: I2ce951e6b3c2dc56294b1bdab913480727b50f0b Reviewed-on: https://cl.tvl.fyi/c/depot/+/11654 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-05-13 r/8134 feat(users/Profpatsch/MonadPostgres): add PgFormatPoolProfpatsch1-19/+127
Change-Id: Id65ee6184ef536fe6a46637005bea903b37f6ffd Reviewed-on: https://cl.tvl.fyi/c/depot/+/11653 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-05-13 r/8133 fix(users/Profpatsch/MonadPostgres): make sure no rc file is usedProfpatsch1-1/+3
Change-Id: Ia84de16fd41d00d81efd963f4ad42e069cf34ed5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11652 Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-05-13 r/8132 refactor(users/Profpatsch/MonadPostgres): rephrase maybe matchProfpatsch1-4/+3
wtf was I thinking Change-Id: Ia621032d90d7a9363dfe2bfbed122c67c90468f7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11651 Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-05-13 r/8121 fix(users/Profpatsch/MonadPostgres): fix query logging msgProfpatsch1-3/+3
Change-Id: Ic499a59002fa4860067589ff2d187795e6013066 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11640 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-03-31 r/7837 chore(3p/sources): bump channels & overlays – xz editionsterni2-2/+2
Update all 3p/sources as we do normally except - agenix which is still pinned to 0.15.0 - nixpkgs (unstable) which we bump to the HEAD of the staging-next branch. This branch includes the downgrade of xz from 5.6.1 to 5.4.6 (https://github.com/nixos/nixpkgs/commit/d6dc19adbd). It also includes the second haskell-updates rotation with GHC 9.6.4 which contains a few build fixes that seem to be required to get our Haskell targets to work. Note that this only reverts xz to a version that doesn't contain the now known backdoor (CVE-2024-3094) which may or may not actually affect NixOS. Additionally reverting to a version before the malicious contributor's involvement may be difficult, but prudent: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068024 Changes required by the updates: - //3p/overlays/haskell: - Update ihp-hsx to latest master to fix build with Stackage LTS 22. - Update tmp-postgres to latest master to work around failure with ansi-wl-pprint >= 1. - Patch punycode for mtl >= 2.3. - //users/Profpatsch: - Clean up some warnings, mostly about unused dependencies - my-prelude: Fix build with ghc-boot-9.6.4 - cas-serve: Use crypton over unmaintained cryptonite - ical-smolify: skip in ci, iCalendar would require heavy patching to work with Stackage LTS 22. - //users/{wpcarro,aspen,flokli}: Disable home-manager / nixos configuration builds that seem to have transient failures that should disappear as we move away from staging-next and closer to an actual channel release. Change-Id: I5cca48e101041c3aedc1d9932dbca2cac885fcc1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11289 Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su>
2024-03-23 r/7766 feat(users/Profpatsch/whatcd-resolver): trace http requestsProfpatsch1-11/+5
Move the http calls into their own module, so we can trace the request and provide a simple copy-to-replay command. We have to work around a bug in the otel library, which would limit our attribute value length to 128 bytes because it uses the wrong option value. ~~~ `ifExists` is finally made more useful for dealing with optional attributes in e.g. lists. Change-Id: Iafab523e9ec4b00136db43f31fdc12aeefb7f77c Reviewed-on: https://cl.tvl.fyi/c/depot/+/11241 Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-03-23 r/7765 feat(users/Profpatsch/MyPrelude): add Pretty moduleProfpatsch3-0/+115
Change-Id: Id774963178ba358447699d0297a6a1fbef5ac8fe Reviewed-on: https://cl.tvl.fyi/c/depot/+/11240 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-03-17 r/7715 feat(users/Profpatsch/whatcd-resolver): add autorefreshProfpatsch1-0/+15
Adds a little polling mechanism that compares against an ID that is generated anew every time the server is restarted. Works well together with shortcuttable. Change-Id: Icc6745b599e43881c14349794feaf5794cfe6777 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11172 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-03-16 r/7712 feat(users/Profpatsch/my-prelude): update librariesProfpatsch4-121/+486
The latest and greatest! Change-Id: I34c0e9f41b3b3cc727d9ea89c7ce6a43271b3170 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11169 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-03-16 r/7709 feat(users/Profpatsch/whatcd-resolver): log json+ld fetchingProfpatsch2-2/+8
This traces the target of a json+ld fetch. We also simplify the telemetry stuff by using a pseudo-class `MonadOtel` everywhere. I wonder if we can get rid of passing the span to `assertM`, because it’s kind of an antipattern to be honest. Change-Id: I1448d643c909a29684fa1ae54037177ba2c20639 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11166 Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-10-15 r/6819 feat(users/Profpatsch/whatcd-resolver): start checking musicbrainzProfpatsch1-0/+10
Ideally we can figure out how to search for single songs by grepping through musicbrainz. For this we kinda need the jsonld results, so this is a first step which visualizes the structure and makes it easy-ish to lazily traverse it. Change-Id: Ieca21674dee8e8c2dacbab4f2f15ccbe067da647 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9743 Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-10-15 r/6818 refactor(users/Profpatsch/jbovlaste): factor Parse into own moduleProfpatsch4-17/+171
We want to use this quite generic parser type for other things as well. Change-Id: I890b43c58e479bdf2d179a724280ef1d8748fafa Reviewed-on: https://cl.tvl.fyi/c/depot/+/9742 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-10-15 r/6816 chore(third_party/haskell): update pa packagesProfpatsch1-4/+4
Change-Id: I8abcb479b0f5c0bd6ed1abc3c9618c2362ff835a Reviewed-on: https://cl.tvl.fyi/c/depot/+/9740 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-10-14 r/6809 feat(users/Profpatsch/whatcd-resolver): more otel tracesProfpatsch1-7/+9
Change-Id: I5094b64f202eeedb57510a25850bba2edd9ec36f Reviewed-on: https://cl.tvl.fyi/c/depot/+/9725 Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-10-09 r/6747 chore(3p/sources): bump channels & overlays (2023-10-08)Vincent Ambo2-0/+3
Change-Id: I9eeaffad53aba278cd9082c5b4c3e7b1c5f6cc22 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9585 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: tazjin <tazjin@tvl.su>
2023-09-29 r/6674 feat(users/Profpatsch/MonadPostgres): trace db queriesProfpatsch3-80/+92
Experiment of how to instrument a lib I’m using to trace instead of log. Now that we added MonadTracer to Transaction, we can drop the unlifted `inSpanT`. Change-Id: Iea891a58cfb33a0837978611456c33aefcccf0d7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9491 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-08-08 r/6471 chore(users/Profpatsch): Update postgres module n stuffProfpatsch6-84/+431
Improvements from “upstream”, fresh served. Change-Id: I60e02835730f6a65739eaa729f3e3eed1a0693e6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9025 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-08-06 r/6464 chore(users/Profpatsch): clean up haskell libs a littleProfpatsch4-267/+2
Change-Id: Ia9a6c5a754ca8f2912308feb5a26f5276a08d24c Reviewed-on: https://cl.tvl.fyi/c/depot/+/9011 Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-07-16 r/6429 chore(users/Profpatsch): move utils to my-preludeProfpatsch11-39/+624
I want to use these in multiple projects. Change-Id: I5dfdad8614bc5835e59df06f724de78acae78d42 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8971 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-07-13 r/6409 chore(users/Profpatsch/*): more cabal maintenanceProfpatsch3-116/+3
Change-Id: Ib1714abce2815873eb50dbeac088e812fa9098ab Reviewed-on: https://cl.tvl.fyi/c/depot/+/8686 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de>
2023-07-13 r/6407 chore(users/Profpatsch): replace Label with pa-labelProfpatsch3-122/+2
We upstreamed some of these modules to hackage, so I can get rid of it here. Change-Id: I70e1e864a81029cadbbd96cc019a768728431cff Reviewed-on: https://cl.tvl.fyi/c/depot/+/8659 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: sterni <sternenseemann@systemli.org>
2023-04-22 r/6103 feat(users/Profpatsch/my-prelude): add RunCommand.hsProfpatsch5-0/+174
Change-Id: I08231027a7363ba89006e4dcd510302599be7b4c Reviewed-on: https://cl.tvl.fyi/c/depot/+/8499 Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-04-08 r/6083 docs(users/Profpatsch): Add small README to most subdirsProfpatsch1-0/+38
Change-Id: I2912e32fe1b2d3d3aff7bafba809634ec4c9adb6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8470 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-01-08 r/5632 feat(users/Profpatsch/netencode): Add initial Haskell parserProfpatsch2-8/+10
A simple categorical parser that does not implement Monad, and does not contain an `m` and some rudementary error message handling. In the future I’d probably want to wrap everything in an additional `m`, so that subparsers can somehow use `Selective` to throw errors from within `m` that contain the parsing context if at all possible. Hard to do without Monad, I have to say. Not even stuff like `StateT` works without the inner `m` implementing `Monad`. Change-Id: I1366eda606ddfb019637b09c82d8b0e30bd4e318 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7797 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-01-07 r/5625 feat(users/Profpatsch/my-prelude): Add Test.hsProfpatsch3-0/+117
Change-Id: Icdbbd310243baf2dc9a0038d9ea5eee7c65be421 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7793 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de>
2023-01-05 r/5593 feat(users/Profpatsch/mailbox-org): prepare adjusting filter configProfpatsch1-1/+14
In the end, it should be possible to write a single config which is pushed to the service to steer which emails arrive. This implements some helper functions and some more endpoints. We implement Semigroup/Monoid for labelled tuples. Change-Id: I48bfd311e4a7bba5bc08a9681d823a6a7d5175a8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7727 Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-01-02 r/5563 feat(users/Profpatsch/my-prelude): show Label name in Show instanceProfpatsch1-2/+10
Before: `show (label @"foo" 23) => "Label 23"` Now: `show (label @"foo" 42) => "Label @"foo" 42" Also with good bracketing due to showsPrec (and correct string escaping of the label). Change-Id: Ia5448ab9028ef5ab6c0b53407fe4df1d0e40ff5f Reviewed-on: https://cl.tvl.fyi/c/depot/+/7719 Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-01-02 r/5562 feat(users/Profpatsch/mailbox-org): list & update filtersProfpatsch4-1/+315
One step closer towards a declarative description of filters. In the end, the filters should be updated by their `rulename` field. This implements a simple scheme where we list all filters, parse some of their fields, use those fields to determine whether we want to change the filters, and then only update the filters where we changed something. Unfortunately, we can only update the filters one-by-one (a common mistake in APIs). Pulls in some modules for Json parsing that I like to use, and an `ErrorTree` abstraction over `Error` and `Data.Tree`. Change-Id: Iea45d5aa0a3fee7ec570f06d3e77009769091274 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7720 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-01-01 r/5560 feat(users/Profpatsch/mailbox-org): initProfpatsch4-45/+186
A smol little tool to talk to the mailbox.org backend. This is handy for eventually setting stuff like email filters. Their API is absolute crap, but we’ll deal with it. Updates the prelude & adds some pretty printing helpers. Change-Id: Ie3688f8ee1d7f23c65bcf4bfecc00c8269dae788 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7717 Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-01-01 r/5559 chore(users/Profpatsch/cas-serve): remove dependency on superrecordProfpatsch3-1/+103
The use of superrecord here can be replaced by simple labelled tuples. Change-Id: I23690cd0b88896440521fe81e83347ef4773d4a0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7713 Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2022-12-29 r/5543 chore(3p/sources): Bump channels & overlayssterni1-1/+1
The main change is that nixpkgs updated to GHC 9.2 and Stackage LTS-20, so we suffer from a bit of churn. * //3p/overlays/haskell: - use updated dhall-nix patch for hnix 0.16 - use superrecord fork with fixes for GHC 9.2 - use graphmod-1.4.5.1 which has support for GHC 9.2 * //users/Profpatsch: relax constraints on base in Haskell pkgs * //users/Profpatsch/cas-serve: inherit superrecord from 3p * //users/grfn/xanthous: - //3p/overlays/haskell for 8.10.7: * Provide missing dependency of binary-orphans. Fix already commited upstream as e238c3fdaab710a2ce0135e5a77cd7e6bb023a22, can be dropped when channel advances. * Downgrade to brick 0.71.1, the latest version xanthous supports. - Adjust to generic-arbitrary >= 1.0, providing Arg constraints where necessary. - Increase constraint-solver-iterations to 6 (default 4), so Xanthous.Command and Xanthous.Data can be typechecked. - Drop NFData instances for Key and Modifier which have been added to vty upstream. Change-Id: I2170438c2ce8130b65f1a9fe07c4fecab5683d66 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7654 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2022-08-22 r/4446 fix(users/Profpatsch/my-prelude): use exactSourceProfpatsch1-1/+4
Change-Id: I1b797fb69f69e09f2dda99fce2f12adef0ac2ad2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6115 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-07-17 r/4304 feat(users/Profpatsch/cas-serve): initProfpatsch3-0/+591
A dumb little daemon that stores arbitrary files by content-hash, and exposes a randomly generated URL by which the file can be fetched again. If the same file is uploaded twice, it will only be stored once. CAS hashes are not exposed to the user, so they can’t figure out whether a file they know is in the database. Change-Id: Ie57bc09d429a9f31c8f0fc5f63f78d6a84d650f7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5952 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>