70 Commits

Author SHA1 Message Date
Laurenz
e16d3f5a67
Externalize assets (#3515) 2024-02-28 10:06:54 +00:00
frozolotl
79615a01bd
Improve color negation (#3500) 2024-02-27 11:15:17 +00:00
Laurenz
ca5d682edb
Fix cast order for ToInt (#3485) 2024-02-25 11:50:11 +00:00
Laurenz
56ecd6c806
Wider callsite span (#3466) 2024-02-21 14:11:35 +00:00
Laurenz
be49935753
Destructuring improvements (#3463) 2024-02-21 08:38:47 +00:00
PgBiel
47b8d61cd8
Implement bitwise operations on integers (#3130) 2024-01-25 15:07:11 +00:00
Sébastien d'Herbais de Thun
1834ebc529
Added int.signum, float.signum, float.is-nan, and float.is-infinite (#3118) 2024-01-12 13:38:58 +00:00
Niklas Ausborn
1f983ced90
Implement CSV file header rows support. (#2619)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2023-12-18 17:14:21 +01:00
Eric Biedert
077d6b5c54
Adjust color mixing for hue-based spaces (#2931) 2023-12-13 13:23:32 +01:00
Emanuel
9e333e5058
Add calc.root function (#2736)
Fixes #2522
2023-12-06 14:32:56 +01:00
Laurenz
85b1d1d4dd Rework Vt into Engine
- Moves as much data out of the `Vm`
- Removes duplication with call_vm and call_vt flavours
- Uses tracked chain instead of fixed int for determining max nesting depth
- This means that nesting checks now generalizes to layout and realization, to detect crashing show rules and overly nested layouts
2023-11-26 19:03:21 +01:00
frozolotl
43f90b2159
Implement euclidean division and remainder (#2678) 2023-11-17 19:55:57 +01:00
frozolotl
d93ed1b3d8
Implement Oklch support (#2611) 2023-11-10 10:31:06 +01:00
Laurenz
cbfd9884a9 Fix argument parsing bug
Things like `luma(1, key: "val")` didn't produce an error before because `args.finish()?` wasn't called. This changes `args: Args` to `args: &mut Args` to make it impossible for that to happen.
2023-10-27 13:25:15 +02:00
MALO
0804a9e25d
Use/allow U+2212 MINUS SIGN instead of U+002D HYPHEN MINUS everywhere (#2318) 2023-10-09 15:30:40 +02:00
T0mstone
cf9bde3245
Add capability to get current compiler version (#2016) 2023-10-02 20:28:19 +02:00
Sébastien d'Herbais de Thun
163c2e1aa2
Gradient Part 1 - Color rework (#2171) 2023-09-19 15:48:33 +02:00
Laurenz
f9feea3f29 Bump dependencies 2023-09-13 14:44:45 +02:00
Laurenz
305524d005 Update tests for type system changes 2023-09-11 14:42:43 +02:00
Laurenz
921b40cf9c Forward third-party errors
Better to know something even if it isn't always formatted in the prettiest way
2023-09-11 12:04:37 +02:00
Laurenz
5b36b46230 Fix data loading display names 2023-08-30 17:15:49 +02:00
Beiri22
22b5959608
separate decode from string/bytes for all data functions; and encode for json, toml, yaml via serde (#1935) 2023-08-25 14:31:03 +02:00
Matt Fellenz
823fc5e5c4
Fix incomplete line endings (#1866) 2023-08-06 00:15:29 +02:00
Laurenz
b8b0137504 Bytes type
- Moves `Bytes` from `util` to `eval` module
- Accepts bytes in `str` function for bytes -> str conversion
- Adds `bytes` function for str | array -> bytes conversion
- Adds `array` function for bytes -> array conversion
- Adds `len`, `at`, and `slice` methods for bytes
- Adds `encoding` parameter to `read` function
2023-08-04 15:46:46 +02:00
Laurenz
803ae9309f Support scope argument for eval 2023-07-18 21:53:42 +02:00
Lynn
9a9da80665
Color mixing function (#1332)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2023-07-05 11:26:50 +02:00
Laurenz
04bffc4f12 Reintroduce --root 2023-06-28 10:36:53 +02:00
Laurenz
3bedf8d0d1 Translate TOML datetime properly 2023-06-09 15:45:16 +02:00
Jett Chen
c87f802cf6
add calc.exp, calc.ln (#1299)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2023-06-07 14:44:07 +02:00
Erik Bünnig
b805c5f100
Unicode code point conversion (#1068) (#1132) 2023-05-30 18:11:30 +02:00
Lynn
7e07b61046
Add a base parameter to str() (#1362) 2023-05-30 18:05:15 +02:00
Laurenz Stampfl
752817ae74
Add support for date & time handling (#435) 2023-05-23 10:41:20 +02:00
Laurenz
08870d4a4c Clearer error messages for failed comparisons
Fixes #1231
2023-05-22 13:06:33 +02:00
Leedehai
84b9d9c990
Print the string that is not castable to number (#1207) 2023-05-19 14:54:44 +02:00
Pg Biel
f88ef45ee6
Function scopes (#1032) 2023-05-03 14:20:53 +02:00
Laurenz
3680c854a2 Touch up docs 2023-04-26 15:37:21 +02:00
HarmoGlace
6134e3f4ee
Add toml support (#807) 2023-04-26 11:31:32 +02:00
HarmoGlace
42b93b7b53
Add quo, trunc and fract calculation methods and rename mod to rem (#890) 2023-04-20 16:09:41 +02:00
HarmoGlace
1e934def56
Add gcd and lcm calculation methods (#789) 2023-04-19 16:18:31 +02:00
HarmoGlace
29b36d4876
Fix pow overflow (#784) 2023-04-13 21:08:54 +02:00
Laurenz
9025ecb2ee Better error spans in calc 2023-04-13 15:13:31 +02:00
HarmoGlace
e11bd2a193
Add factorial, permutation and binomial to calculation functions (#639) 2023-04-13 14:38:51 +02:00
Eric Biedert
c7db709da5
Allow treating ratios as floats (#681) 2023-04-11 14:13:01 +02:00
Laurenz
e77abf842d Make error messages a bit more consistent 2023-04-04 14:33:43 +02:00
HarmoGlace
4aa5e0a4a3
Make behavior of calculation functions consistent (#515) 2023-04-04 14:33:26 +02:00
Laurenz
e1ecb8cabe Simplify pow function 2023-04-01 23:31:23 +02:00
P-Andersson
387bcc3879
add support for loading data from yaml files (#447) 2023-04-01 14:33:42 +02:00
Naim A
2ed4212c76
bail! when #symbol is called without parameters (#440) 2023-03-29 23:07:08 +02:00
Laurenz
ab43bd802e Renaming and refactoring 2023-03-19 22:39:19 +01:00
Laurenz
89f44f220d Bibliography and citations 2023-03-14 22:53:54 +01:00