Bananymous
09292bb87e
BAN: Cleanup math code and add SSE sqrt
...
We should prefer SSE instructions when they are easily available. For
other functions x87 is just simpler. It's hard to write faster and close
to as accurate approximations with SSE.
This does not use xmmintrin.h as clangd does not like that file and
starts throwing errors in every file that includes this :)
2026-03-22 22:07:48 +02:00
Bananymous
07712758a7
BAN: Add default constructor to ipv4address
2026-03-17 20:24:48 +02:00
Bananymous
a5cdf0640f
BAN: Add value_type to String{,View}
2026-02-23 16:06:48 +02:00
Bananymous
1fc2e43881
BAN: Add support for string format padding
2026-02-23 16:06:48 +02:00
Bananymous
0964c9f928
BAN: Remove unnecessary assert from span
2026-02-23 16:06:48 +02:00
Bananymous
8b1e820869
BAN: Add reallocator support to Vector
2026-02-21 04:03:11 +02:00
Bananymous
9edc6966db
BAN: Add reallocator definition
...
for the moment this does not exist in kernel, kmalloc rewrite soon™️
2026-02-21 04:03:11 +02:00
Bananymous
12207dcb77
BAN: Add is_trivially_copyable trait
2026-02-21 04:03:11 +02:00
Bananymous
8794122c2d
BAN: Variant allow copy/move from empty
2026-02-07 18:54:31 +02:00
Bananymous
90deb9fb43
BAN: Make debug output thread safe
...
Now file lock is only acquired once per message, not once per character
2026-01-09 20:30:35 +02:00
Bananymous
fea5d1d82b
BAN: Fix wrong include in heap
2026-01-07 22:12:20 +02:00
Bananymous
e2ccc3026f
BAN: Remove unnecessary c++ header inclusion
2025-12-16 16:44:42 +02:00
Bananymous
37aef630d2
BAN: Fix Array and Vector span constness
2025-10-28 05:50:19 +02:00
Bananymous
9f0addbd8b
BAN: Implement simple priority queue
...
This is just a wrapper around BAN::Vector and heap functions
2025-10-26 00:32:00 +03:00
Bananymous
7f8ea6b8e0
BAN: Move heap functions to Heap.h
...
This also adds push_heap and pop_heap, similar to what C++ standard
library provides
2025-10-26 00:31:06 +03:00
Bananymous
9d3ea6fed7
BAN: Use new it_value_type_t in sorting functions
2025-10-26 00:30:51 +03:00
Bananymous
703b3eda56
BAN: Add it_value_type_t
...
This is a template that resolves into T for pointers to T and T::value_type otherwise. It allows using the underlaying type of an iterator or pointer for range based algorithms
2025-10-26 00:22:35 +03:00
Bananymous
3be17c6117
BAN: Add clear and access by index to CircularQueue
2025-07-10 17:24:40 +03:00
Bananymous
b97c123764
BAN: Make WeakPtr::lock const
...
There is no reason why it would not be :)
Also this prevented upstream from compiling
2025-06-11 16:53:43 +03:00
Bananymous
6f74f3c386
BAN: Allow constexpr construction of StringView
2025-06-07 18:29:32 +03:00
Bananymous
e9f8471a28
BAN: Return UTF::invalid from byte_length instead of 0
2025-06-02 11:39:18 +03:00
Bananymous
8ff9c030bf
Kernel: Add better termios support
...
I'm not sure if this is correct but at least it's better than before :)
2025-06-01 13:48:03 +03:00
Bananymous
4d840a8d9a
BAN: Make Array more constexpr
2025-04-23 18:40:20 +03:00
Bananymous
98e05fd179
BAN: Implement atomic functions for normal integers
2025-04-20 03:11:41 +03:00
Bananymous
1a153b835c
BAN: Nullterminate encoded UTF8 data
2025-04-01 22:39:56 +03:00
Bananymous
73c292c4e9
BAN: Fix negative floating point value printing
2025-04-01 22:39:21 +03:00
Bananymous
cbe3f2a4ac
BuildSystem: Cleanup and fix cmake files
...
I now set library SONAME so i don't have to build them in build root.
Creating font now makes sure the install directory exists. This allows
building using make files.
LibC now links agains ligcc
2025-01-28 17:11:21 +02:00
Bananymous
8b312a47e6
BAN: Allow MUST and TRY to contain commas
2024-12-16 17:22:40 +02:00
Bananymous
90820f24a4
BAN: Make HashMap::{insert,emplace}{,_or_assign} return an iterator
...
This reduces the number of lookups done into the hash map :)
2024-12-09 03:37:13 +02:00
Bananymous
6f118c1be1
BAN: Make HashMap key move constructible
...
This allows using non-copyable types as keys
2024-11-26 00:57:11 +02:00
Bananymous
7316eb87b8
BAN: Add requires expression for BAN::Formatter
...
This allows seeing syntax errors before compilation :)
2024-11-26 00:55:58 +02:00
Bananymous
5376236ab6
BAN: Make ErrorOr non-copyable
...
This makes avoiding accidentals copies easier :)
2024-11-26 00:55:12 +02:00
Bananymous
0af80d48ee
BAN: Mark ByteSpan::slice as [[nodiscard]]
2024-11-26 00:54:35 +02:00
Bananymous
31d2a39540
BAN: Add default constructors for BAN::{Little,Big}Endian
2024-11-21 13:34:12 +02:00
Bananymous
f8ef11b4d2
BAN: Make PlacementNew.h only include <new> if it exists
...
Otherwise it will define the functions itself. This allows compiling
toolchain as stdlibc++ depends on BAN.
2024-11-19 00:16:44 +02:00
Bananymous
4417268ecc
BAN: only include <new> in PlacementNew.h
...
I was getting annoying multiple definitions for placement new and my
build system requires that c++ libraries are compiled. I guess this is
the easiest and cleanest solution
2024-11-08 02:48:07 +02:00
Bananymous
346853ee55
BAN: Implement sincos to math
...
This function calculates both sin and cos fast (hopefully)
2024-11-04 17:42:01 +02:00
Bananymous
a82f00cb70
BAN: Fix HashMap::{insert,emplace}_or_assign to actually assing value
...
I seemed to completely forgotten to do the assignment itself :D
2024-11-04 15:42:04 +02:00
Bananymous
f4be37700f
Kernel/userspace: rework floating point math
...
SSE is now unconditionally enabled any where and most of math.h is now
actually implemented. using __builtin_<func> lead to many hangs where
the builtin function would just call itself.
2024-11-03 20:28:15 +02:00
Bananymous
07275ecb5f
BAN: Implement floating point constants in Numbers.h
2024-11-03 20:19:45 +02:00
Bananymous
ddd3b4c093
BAN: Implement is_pod type traits
2024-10-17 01:35:42 +03:00
Bananymous
3a6fc4c197
BAN: Add proper error messages for `MUST()` in userspace
2024-10-17 01:32:55 +03:00
Bananymous
dab6e5a60f
BAN: Cleanup HashMap implementation and add {insert,emplace}_or_assign
2024-10-13 22:00:16 +03:00
Bananymous
0b05e9827b
BAN: Use memmove instead of memcpy on overlapping data
...
I was accidentally using memcpy where memmove was needed
2024-10-13 22:00:16 +03:00
Bananymous
1c1a76d6d7
BAN: Member function pointers now use references instead of pointers
...
This seems cleaner as class pointer cannot be null anymore
2024-10-13 22:00:16 +03:00
Bananymous
df4f37d68d
BAN: only define placement new operators for banan-os targets
...
This allows building and using BAN library outside of banan-os!
2024-10-10 21:55:25 +03:00
Bananymous
44629ba5dd
BAN: Allow userspace to use string literals with BAN::Error
2024-10-10 21:54:52 +03:00
Bananymous
2da6776451
BAN: Update {Byte}Span API with better constness
...
const BAN::Span<int> is now allowed to modify its underlying data, but
the container itself is const.
BAN::Span<const int> can be used for spans over constant data.
2024-10-10 21:53:23 +03:00
Bananymous
a68f411024
BAN: Add requires clauses for Container::emplace{,_back} functions
...
This allows syntax highlighters to report errors!
2024-10-10 21:51:44 +03:00
Bananymous
f432d3fcf8
BAN: Cleanup Optional casting for value getters
2024-10-07 01:44:44 +03:00