Commit Graph

79 Commits

Author SHA1 Message Date
30515bd5ac
subprojects/bahaghari/lib: update nixdoc docstring format 2025-01-12 21:33:15 +08:00
861aa28201
pkgs/firefox-addons: add RSSHub Radar 2025-01-05 18:53:54 +08:00
6201b8447b
bahaghari: update comments and project documentation
Preparation for
2024-08-15 17:21:27 +08:00
820ea56746
bahaghari/lib: move toFloat to trivial namespace 2024-08-03 08:51:28 +08:00
d69e61f2a8
bahaghari/lib: add isEven and isOdd for math subset 2024-08-01 11:02:06 +08:00
9c69e03395
bahaghari/tests: add tests derivation for flake output
Also a schema to check if the whole test suite passes which is nice.
2024-08-01 10:59:26 +08:00
ad32539742
bahaghari/shell: add treefmt config and replace nixpkgs-fmt with the official formatter 2024-08-01 09:02:40 +08:00
c19b9738f2
bahaghari/flake: remove all inputs as a design constraint 2024-08-01 09:01:49 +08:00
fb7a15bdfb
bahaghari: fix utils as extra module arg 2024-07-31 22:01:02 +08:00
e3122bfd24
bahaghari/lib: add trigonometric functions to math subset
Code taken from
https://lantian.pub/en/article/modify-computer/nix-trigonometric-math-library-from-zero.lantian/
with proper attributions (hopefully).
2024-07-07 20:14:41 +08:00
cf23a92548
bahaghari/lib: add radian <-> degree conversion in math subset 2024-06-27 21:08:09 +08:00
e1848def6d
bahaghari/lib: refactor math subset 2024-06-15 19:54:57 +08:00
f7a9452ee5
bahaghari/lib: update color.hsl 2024-06-15 19:54:28 +08:00
ff0ddb0e27
bahaghari/lib: add math.mod
Now, it's the real modulo operation.
2024-06-15 19:46:34 +08:00
61720afeb2
bahaghari/lib: simplify math.remainder
Indeed I'm too dumb for mathematics. :p

Also, now the remainder implementation is double-checked with Python 3's
math.remainder() function.
2024-06-15 19:45:33 +08:00
4bd8aee223
bahaghari/lib: rename math.mod' into remainder
It's a much easier thing to write and apparently it is different to
modulo.
2024-06-15 16:23:30 +08:00
da4a0b8826
bahaghari/lib: fix math.mod' implementation bug 2024-06-15 15:55:24 +08:00
3f8c59c399
bahaghari/lib: add math.isWithinRange' 2024-06-15 15:12:05 +08:00
2576ef4e43
bahaghari/lib: implement basic HSL color namespace 2024-06-15 13:48:34 +08:00
a170fd8344
bahaghari/lib: add math.mod' function 2024-06-15 13:38:42 +08:00
25654828c0
bahaghari/lib: add optionalNull to top-level 2024-06-14 23:54:37 +08:00
e119d84731
bahaghari/tests/lib: add more unit tests 2024-06-14 23:46:01 +08:00
17c36bf29c
bahaghari/lib: update error message to be more consistent with nixpkgs 2024-06-11 16:39:09 +08:00
e74640cf16
bahaghari: use npins for pinning nixpkgs branches
This makes it possible for easier way to contribute with non-flakes
usage.
2024-06-05 21:16:01 +08:00
999401f3ce
bahaghari/lib: update hex subset to properly accept inputs with mixed letter cases 2024-06-05 10:22:58 +08:00
35873462f3
bahaghari/lib: update and refactor colors.rgb
Now the RGB colorspace object doesn't have the methods built into the
set as that basically screws a lot of things when exporting it to the
output.

Also, the alpha component should be handled nicely now.
2024-06-04 20:40:29 +08:00
3825c8568c
bahaghari/lib: add trivial.optionalNull 2024-06-04 19:45:29 +08:00
3989b48551
bahaghari/tests/lib: update math subset tests 2024-06-03 16:22:08 +08:00
a5ad6af3f0
bahaghari/lib: add math.exp 2024-06-03 16:14:06 +08:00
5f07c5b0fc
bahaghari/lib: add math.sqrt function 2024-06-01 13:21:30 +08:00
817ec35b02
bahaghari/lib: add floor and ceil for math subset
Even though they're already available from the builtins, we still want
the library subset to feel consistent.
2024-05-30 14:42:29 +08:00
14049db2e4
bahaghari/lib: add more functions to math subset 2024-05-29 22:56:33 +08:00
9a5e6cb7f6
bahaghari/utils: move into separate folder 2024-05-24 13:44:01 +08:00
c15ec954c0
bahaghari/lib: init colors.rgb subset 2024-05-21 20:42:08 +08:00
f882c30209
bahaghari/lib: add isNumber and scale 2024-05-21 20:27:12 +08:00
3e3dbcfbbe
bahaghari/tests/lib: add more test cases for hex subset 2024-05-21 20:23:35 +08:00
77d988cc7c
bahaghari: fix default attrset 2024-05-18 16:41:22 +08:00
118191fe5b
bahaghari/modules/tinted-theming: refactor code 2024-05-18 16:41:21 +08:00
ef69085e0d
bahaghari/lib/tinted-theming: update formatting and comments 2024-03-15 17:30:15 +08:00
9bb2ca951e
bahaghari/lib: update comments 2024-03-02 18:13:56 +08:00
66b35ea2c6
bahaghari: update library arguments
It makes it confusing sometimes. Not worth keeping the design.
2024-03-02 18:10:21 +08:00
b25ed0989d
bahaghari/lib: update Tinted Theming subset 2024-03-02 18:00:40 +08:00
9d122c32c0
bahaghari/lib: update percentage
Also reordered the arguments to make it more "functional".
2024-03-02 17:18:15 +08:00
fc2f27eea8
bahaghari/lib: add clamp 2024-03-02 12:58:48 +08:00
0b7b3ffd7d
bahaghari/lib: add grow' and isWithinRange
Also updated the order of the arguments to make it more usable in
functional programming paradigm or whatever.
2024-03-02 12:54:59 +08:00
d2370bdbb8
bahaghari/modules/tinted-theming: make it consistent for YAML files importing 2024-03-01 18:12:12 +08:00
878dddea77
bahaghari/lib: init math subset
In preparation for implementing the colorspace library subset.
2024-02-29 22:06:33 +08:00
9fde40828b
bahaghari/lib: simplify fromDec implementation 2024-02-29 16:13:49 +08:00
e5083302b2
bahaghari: reformat codebase 2024-02-29 16:12:21 +08:00
b84d07ac0c
bahaghari/lib: update hex subset with generateBaseDigitType 2024-02-28 18:43:20 +08:00