Bananymous
a990143628
BAN: Implement intro sort
2023-12-07 23:56:11 +02:00
Bananymous
66630bd5eb
BAN: Add less than operator for iterator
2023-12-07 23:55:41 +02:00
Bananymous
8971c0eb85
BAN: Move placement new to New.h
...
I have no idea why they were defined in Move.h
2023-12-07 23:52:57 +02:00
Bananymous
a8c3e6a9e2
BAN: Remove empty else. Builds with -Wall -Wextra
2023-12-07 23:50:35 +02:00
Bananymous
1fcf56f6c6
BAN: Implement ilog2 for unsigned integers
2023-12-07 23:50:04 +02:00
Bananymous
6ee01a1237
BAN: Implement heap sort
2023-12-07 23:18:49 +02:00
Bananymous
bbed9a30c6
BAN: Cleanup sorting code
2023-12-07 23:18:49 +02:00
Bananymous
8a0ceb56dc
BAN: Implement more methods for iterators
2023-12-07 23:18:49 +02:00
Bananymous
ccf1786485
BAN: Implement distance() for iterators
2023-12-07 23:18:49 +02:00
Bananymous
4662068071
BAN: Implement quick sort
2023-12-07 19:28:31 +02:00
Bananymous
9f5bdde29d
BAN: Implement next() and prev() for iterators and use them in sorts
2023-12-07 19:28:05 +02:00
Bananymous
8aa137bdfe
BAN: implement quick sort and test for it
2023-12-07 11:55:28 +02:00
Bananymous
d37b59b2df
BAN: Fix simple iterator operator--()
2023-12-07 11:55:28 +02:00
Bananymous
412aa05feb
BAN: implement exchange sort and test for it
2023-12-07 11:55:28 +02:00
Bananymous
44358a9182
BAN: add value_type to iterators
2023-12-07 10:15:18 +02:00
Bananymous
045a96009e
BAN: implement basic swap
...
This will be improved, currently just works on general type T and
moves values between arguments.
2023-12-07 09:26:17 +02:00
Bananymous
543a8bd7c6
BAN: Add basic GUID data structure
2023-11-21 15:11:50 +02:00
Bananymous
061d10e635
BAN: Update bytespan -> span API
2023-11-04 18:12:46 +02:00
Bananymous
6d899aa6ce
BuildSystem: using sysroot doesn't need root privileges anymore!
...
Sysroot is now created with fakeroot. This allows root access to be
only needed for disk image creation, since it uses loopback devices.
2023-11-04 17:50:43 +02:00
Bananymous
120f7329b1
BAN: Update ASSERT api
...
its now much harder to mix < with <= and > with >=
2023-11-02 00:01:12 +02:00
Bananymous
0405461742
BAN: Implement better ASSERT macros
...
Implement macros for all basic binary ops. These macros print failed
values when the fail.
2023-10-30 16:22:02 +02:00
Bananymous
f72fdeeb59
BAN: String now uses union for its sso storage
...
This allows String to shrink by 8 bytes since Variant's 8 index is
no longer stored in here.
This required me to make Strings max size one bit less, but that
should still be fine. There should never be strings with size of
over half of the computer's address space.
2023-10-30 11:13:16 +02:00
Bananymous
1af3ca19ab
BAN: Rewrite String with small string optimizations
...
String now holds a 15 byte sso buffer. I'm not sure what the size
should actually be but 15 will work for now. Maybe the sso buffer
should be contained in an union with one bit flag in size instead of
variant that uses extra 8 bytes for type index.
This patch buffs sizeof(String) from 24 bytes to 32 bytes on 64 bit.
I assume this is much better version than the old which had to make
allocation even for empty strings :D.
2023-10-29 03:11:13 +03:00
Bananymous
09fcc613c7
BAN: Add variant to ForwardList
...
I should be using the forward list more
2023-10-29 02:28:55 +03:00
Bananymous
3bffbe330d
BAN: Update ByteSpan API
...
Add ByteSpan::as_span<T> and const versions of as() and as_span()
require T to be const.
2023-10-28 22:10:47 +03:00
Bananymous
fda4a4ad24
BAN: ByteSpan can be sliced without specified size
...
This will give span with all remaining size after offset
2023-10-25 21:41:11 +03:00
Bananymous
988a4e1cd8
BAN: Fix bug of size of splice after slice()
...
I have no idea what was I doing before :D
2023-10-24 17:23:45 +03:00
Bananymous
db5c24b2a5
BAN: Implement ByteSpan
...
This is a span over exisiting containers/data types. I'm not too
happy with the constructors and assignment operators, but they will
work for now
2023-10-20 04:59:29 +03:00
Bananymous
781c950af6
BAN: add helper to cast Span<T> to Span<const T>
2023-10-20 04:59:08 +03:00
Bananymous
d2cfc843e4
BAN: Optional can now be constructed from another Optional
...
Also fix bug in release_value() where we did not call the
destructor.
2023-10-11 20:10:06 +03:00
Bananymous
eb5c6cf736
BAN: Remove endianness functions from Math
...
There is now a Endianness.h for these. The functions were super slow.
2023-09-29 19:38:07 +03:00
Bananymous
27adb9486b
BAN: Update Endiannes API
...
Add functions to swap endiannes or convert host to big/little endian
This code should be very compiler friendly and should be optimized to
single bswap instruction on x86.
2023-09-28 01:22:14 +03:00
Bananymous
b62186441b
BAN: Implement basic WeakPtr
...
This can be constructed from classes that inherit from Weakable
2023-09-25 19:43:10 +03:00
Bananymous
971eb737c1
BAN: Fix LinkedList::pop_back()
2023-09-22 17:20:35 +03:00
Bananymous
720bc418a6
All: Clear lines with only whitspace in them
2023-09-10 00:31:42 +03:00
Bananymous
cbd2519b9a
Kernel: better handle kernel errors
2023-08-29 00:13:21 +03:00
Bananymous
e8a73f9696
BuildSystem: use -a with rsync
...
This allows cmake to not rebuild whole project every time
2023-08-28 11:38:17 +03:00
Bananymous
b05cf9ef09
BuildSystem: Base sysroot is now distributed as a tar ball
...
This allows file and directory permissions work as intended.
cmake is now filled with 'sudo' but with sudo timeout this should be
fine.
2023-08-23 10:38:21 +03:00
Bananymous
2bf12a52d1
BAN: increase function size to 5 * sizeof(void*)
2023-08-22 14:52:03 +03:00
Bananymous
be5b81740e
BAN: Add enum class Iteration for for_each loops
2023-08-22 11:30:53 +03:00
Bananymous
e7458ca10a
BAN: Function call is now const
2023-08-22 11:30:40 +03:00
Bananymous
6feb8a99d2
BAN: UniqPtr can now be constructed from other convertible UniqPtr
2023-08-04 10:29:42 +03:00
Bananymous
5411c5aa4a
BAN: Fix function call in Optional
2023-07-21 10:57:46 +03:00
Bananymous
891144dac1
BAN: Iterators are now single general type with CONST template
...
This allows us to use the same base class for iterator and
const_iterator which were practically the same code.
2023-07-12 13:35:21 +03:00
Bananymous
41e7b53903
BAN: add either_or and either_or_t
...
This allows you to select type depending on constexpr evaluatable
boolean
2023-07-12 13:34:31 +03:00
Bananymous
6b0920e8c0
BAN: Implement ConstIteratorDouble and add it to HashMap
...
This is same as IteratorDouble except it uses const_iterator and does
not return non-const references.
2023-07-12 11:41:05 +03:00
Bananymous
4285729d5c
BAN: Generalize HashMapIterator to IteratorDouble
...
This iterator should be able to iterate any container within container
with type iterator defined.
This also fixed bug if first entry in outer container is empty container.
2023-07-12 09:29:05 +03:00
Bananymous
9174a89971
BAN: Add iterators to HashMap
2023-07-10 23:16:41 +03:00
Bananymous
74af46cb4a
BAN: RefPtr can be constructed from other types
2023-07-10 11:48:11 +03:00
Bananymous
c38e8de6b5
BAN: Optional can be constructed inplace
2023-06-12 23:45:36 +03:00