DragonFriend
50b4d7aa35
Add replace and treplace to String ( #2127 )
...
* Add replace and treplace functions to String
2025-05-14 11:00:20 +02:00
Christoffer Lerno
abe4727c3a
Deprecate uXX and iXX bit suffixes.
...
Add experimental LL / ULL suffixes for int128 and uint128 literals.
2025-05-13 23:48:59 +02:00
Christoffer Lerno
54e70cae0f
Add DateTime + Duration overloads.
2025-05-07 10:49:30 +02:00
Christoffer Lerno
584a8a2e60
- Fix regression in Time diff due to operator overloading #2124
...
- Add `Duration * Int` and `Clock - Clock` overload.
2025-05-06 22:33:39 +02:00
Christoffer Lerno
d313afa487
Add String.count to count the number of instances of a string.
2025-05-02 21:48:04 +02:00
Christoffer Lerno
8a0907cb70
Add String.tokenize_all to replace the now deprecated String.splitter
2025-05-02 20:51:15 +02:00
Christoffer Lerno
8a09b2e5f7
std::ascii moved into std::core::ascii. Old _m variants are deprecated, as is uint methods.
2025-05-02 18:06:28 +02:00
Christoffer Lerno
0d3299f267
Added String.quick_ztr and String.is_zstr
2025-05-02 13:22:13 +02:00
Christoffer Lerno
8a2907806b
Fixes to tclone and other temp allocations with overaligned data.
2025-04-20 21:30:36 +02:00
Christoffer Lerno
f778e75757
Added missing @clone_aligned and add checks to @tclone
2025-04-20 18:31:52 +02:00
joshringuk@gmail.com
434a0e8e4b
array contains
2025-04-18 18:15:01 +02:00
Christoffer Lerno
946c167bf1
Improve error for default args #2096 . Deprecated old inference with slice copy. Copying must now ensure a slicing operator at the end of the right hand side: foo[1..2] = bar[..] rather than the old foo[1..2] = bar. The old behaviour can be mostly retained with --use-old-slice-copy).
2025-04-18 17:19:04 +02:00
Boris Barbulovski
b5d0739de0
Add env::ANDROID to std.*
2025-04-16 17:47:49 +02:00
Christoffer Lerno
0a9bb2e8e0
Fix to simple a += b overload fallback. Renaming and reordering in the stdlib.
2025-04-15 12:01:58 +02:00
Christoffer Lerno
b64dcde21d
Make aliases able to use @deprecated. Prefer math::I and math::I_F for math::IMAGINARY and math::IMAGINARYF the latter is deprecated. Combination of += and [] overloads now properly handled in most cases.
2025-04-14 20:51:01 +02:00
Christoffer Lerno
f85198e3ee
Added += and related as overloads. Updated tests and docs. Slice2 extracted to its own file.
2025-04-14 00:55:46 +02:00
Christoffer Lerno
dca805bd8a
Added tests to sincos. Correctly detect multiple overloads of the same type. Fix regression quaternion overload. Remove "1." style.
2025-04-13 15:46:27 +02:00
Christoffer Lerno
3888fcb182
- Add @operator_r and @operator_s attributes.
2025-04-13 13:43:03 +02:00
Christoffer Lerno
0f2d425297
Operator overloading for + - * / % & | ^ << >> ~ == !=
2025-04-11 18:46:22 +02:00
Christoffer Lerno
8cce7f6836
Incorrect rounding at compile time going from double to int.
2025-04-07 02:36:04 +02:00
Sander van den Bosch
561a683230
Added .hash() functions for vectors ( #2043 )
...
* Added .hash() functions for vectors
* Update test to a non-zero sized vector
* Changed vector hash functions to hash the underlying bytes in a char slice, the same approch is used for arrays
* Added test for hashed
* Updated formatting to be consistant with C3 code style
* Formatting, use "self"
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-03-31 16:33:48 +02:00
Christoffer Lerno
5c46b0c2a0
Add @each_row for the csv module.
2025-03-26 18:19:19 +01:00
Christoffer Lerno
fa707db078
Do not implicitly convert enums to ordinal in formatting functions.
2025-03-25 12:27:51 +01:00
Christoffer Lerno
82f1b543ed
&self not runtime null-checked in macro #1827 . Regression in temp allocators.
2025-03-23 22:50:09 +01:00
Christoffer Lerno
a03d821602
- Use @pool_init() to set up a temp pool on a thread. Only the main thread has implicit temp pool setup.
...
- `tmem` is now a variable.
2025-03-21 17:08:58 +01:00
Christoffer Lerno
72608ce01d
- Temp allocator now supports more than 2 in-flight stacks.
...
- Printing stacktrace uses its own temp allocator.
- `@pool` no longer takes an argument.
- `Allocator` interface removes `mark` and `reset`.
- DynamicArenaAllocator has changed init function.
- Added `BackedArenaAllocator` which is allocated to a fixed size, then allocates on the backing allocator and supports mark/reset.
2025-03-18 15:16:22 +01:00
Christoffer Lerno
5c77c9a754
- Change distinct -> typedef.
...
- Order of attribute declaration is changed for `alias`.
- Added `LANGUAGE_DEV_VERSION` env constant.
- Rename `anyfault` -> `fault`.
- Changed `fault` -> `faultdef`.
- Added `attrdef` instead of `alias` for attribute aliases.
2025-03-15 20:10:47 +01:00
Christoffer Lerno
8b49e6c14d
Rename def to alias.
2025-03-13 11:22:27 +01:00
Christoffer Lerno
25bccf4883
New faults and syntax ( #2034 )
...
- Remove `[?]` syntax.
- Change `int!` to `int?` syntax.
- New `fault` declarations.
- Enum associated values can reference the calling enum.
2025-03-10 00:11:35 +01:00
BWindey
1461414128
[TEST] Add unit tests for libc ( #1974 )
...
Some tests for libc + fixes
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-03-08 22:25:21 +01:00
m0tholith
dc8b35e62f
Added is_initalized function to list, linkedlist, and anylist types ( #2027 )
...
* Added `is_initalized` function to list, linkedlist, and anylist types
2025-03-08 21:49:17 +01:00
Christoffer Lerno
a088a5057a
Remove if (catch foo) { case ... } syntax.
2025-03-07 22:48:28 +01:00
Christoffer Lerno
5482107ca8
Some formatting and updated test. Updated releasenotes.
2025-03-07 00:14:41 +01:00
Stephen Molloy
1fba9a7993
String.to_float("+") fails ( #2021 )
...
* When stripping +/- from the start of a string in String.to_real: only do this if the string length is greater than 1.
* Added a test for the String.to_float("+") bug
2025-03-07 00:02:13 +01:00
Christoffer Lerno
2439405e70
- $foreach "()" replaced by trailing ":" $foreach ($x, $y : $foo) -> $foreach $x, $y : $foo:
...
- `$for` "()" replaced by trailing ":" `$for (var $x = 0; $x < FOO; $x++)` -> `$for var $x = 0; $x < FOO; $x++:`
- `$switch` "()" replaced by trailing ":" `$switch ($Type)` -> `$switch $Type:`
- Empty `$switch` requires trailing ":" `$switch` -> `$switch:`
2025-03-04 16:13:47 +01:00
Jonas
46b52ec9ce
Fix Atomic.max ( #2011 )
...
* Fix atomic max and comments in std::atomic
* Updates to `Atomic` to handle distinct types and booleans.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-03-04 15:39:03 +01:00
Zack Puhl
177df6321a
add test file for wide string constants
...
add full UTF-8 to wide-str language capabilities
move wstr language constant expressions to builtins and adjust test cases
2025-03-04 13:46:59 +01:00
Christoffer Lerno
0ef99c23a8
Allow swizzling assign, eg. abc.xz += { 5, 10 };
2025-03-04 02:18:24 +01:00
Christoffer Lerno
0a905d8458
Change all hash functions to have a common hash function.
2025-03-03 20:07:02 +01:00
Christoffer Lerno
261bfb97c6
Rename length_sq to sq_magnitude
2025-03-03 18:47:55 +01:00
Christoffer Lerno
cc94199131
Remove Vec2 and other aliases from std::math.
2025-03-03 18:13:39 +01:00
Christoffer Lerno
0925010c07
Removal of any-switches
2025-03-03 15:02:25 +01:00
Christoffer Lerno
910fc6e364
Post and pre-decrement operators switched places for vector elements. #2010 .
2025-03-03 01:21:01 +01:00
Christoffer Lerno
c40198b016
- new_* functions in general moved to version without new_ prefix.
...
- `string::new_from_*` changed to `string::from_*`.
- `String.to_utf16_copy` and related changed to `String.to_utf16`.
- `String.to_utf16_tcopy` and related changed to `String.to_temp_utf16`
- `mem::temp_new` changed to `mem::tnew`.
- `mem::temp_alloc` and related changed to `mem::talloc`.
- `mem::temp_new_array` changed to `mem::temp_array`.
2025-03-03 00:32:20 +01:00
Christoffer Lerno
2a895ec7be
First 0.7 update, removing all deprecated features.
2025-03-03 00:32:20 +01:00
Christoffer Lerno
55c88408be
Remove some deprecated use.
2025-03-01 23:58:28 +01:00
Christoffer Lerno
33b05bcfeb
More deprecations in lib6, and updates to lib7
2025-02-27 11:10:41 +01:00
Christoffer Lerno
1dfc24822e
Update pool test.
2025-02-24 22:37:20 +01:00
Christoffer Lerno
e35c7f0b90
Update pool test.
2025-02-24 18:07:36 +01:00
Jonas Quinten
ed62268997
std::math::bigint: Fixed init_with_array with empty array
2025-02-24 11:12:55 +01:00