about summary refs log tree commit diff
path: root/users/sterni/nix/string/default.nix (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-05-31 r/6224 chore: remove comments formerly meant for alignmentsterni1-1/+0
/**/ is a nice way to align if statements which doesn't work with nixpkgs-fmt, since it'll reflow the comment to the line preceding the if. Consequently, we can delete these comments now. Change-Id: Ifa5327f846a903e07607b21f8eedbc32fc36f758 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8689 Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-01-31 r/3723 style: format entire depot with nixpkgs-fmtVincent Ambo1-16/+24
This CL can be used to compare the style of nixpkgs-fmt against other formatters (nixpkgs, alejandra). Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: cynthia <cynthia@tvl.fyi> Reviewed-by: edef <edef@edef.eu> Reviewed-by: eta <tvl@eta.st> Reviewed-by: grfn <grfn@gws.fyi>
2021-09-12 r/2851 feat(users/sterni/nix/string): very simple printf implementationsterni1-0/+38
This is mostly to yet another silly idea which turns out to be possible. This may be actually useful should I implement more sophisticated format specifiers like "%xd" or "%f". Change-Id: Ia56cd6f5793a09fe5e19c91a8e8f9098f3244d57 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3537 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-03-05 r/2267 refactor(users/sterni/nix/string): don't calculate length for dropsterni1-4/+5
Since nix ends the substring at the end of the string anyways we can just statically use the largest nix integer as the length of the string. According to my testing this it ever so slightly faster as well. Change-Id: I64566e91c7b223f03dcebe3bc5710696dc4261bc Reviewed-on: https://cl.tvl.fyi/c/depot/+/2587 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-03-05 r/2266 feat(users/sterni/nix): move flow.match to string.matchsterni1-0/+4
After all it only matches strings. Change-Id: I3d2e5221ef43f692de69028e78ed98b6b11f82d1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2586 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-03-01 r/2257 feat(users/sterni/nix): add sternis nix libsterni1-0/+71
What you see here is mostly the fallout of me implementing a correct urlencode implementation in nix for Profpatsch's blog implementation (although they'll probably keep it at arm's length). Where I want to go from here: * Extend this library towards general purpose nix™, mainly by implementing missing interfaces which you'd still have to use <nixpkgs/lib> for right now. Reexposing parts of <nixpkgs/lib> with better naming is fine for now, at some point I'd contemplate making this depend on nothing outside of depot, maybe even itself (should be easy we only use yants for an easily replaceable check). * Improve error messages possibly by carefully reintroducing yants. I originally typed essentially everything using yants, but turns out this can a) be dangerous when stuff you are handling throws because type checking means evaluating and b) has a incredible performance cost in some cases. * Reexpose builtins with better naming and slightly wrapped so they don't unrecoverably throw in cases where a null or something would suffice. Change-Id: I33ab08ca4e62dbc16b86c66c653935686e6b0e79 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2541 Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI