]> begriffs open source - libderp/log
libderp
4 years agoHore hashmap tests
Joe Nelson [Sat, 24 Apr 2021 18:49:20 +0000 (13:49 -0500)]
Hore hashmap tests

4 years agoMove macro
Joe Nelson [Sat, 24 Apr 2021 17:54:14 +0000 (12:54 -0500)]
Move macro

4 years agoPreliminary hashmap test passing
Joe Nelson [Sat, 24 Apr 2021 17:54:06 +0000 (12:54 -0500)]
Preliminary hashmap test passing

4 years agoSimplify quicksort
Joe Nelson [Sat, 24 Apr 2021 04:22:01 +0000 (23:22 -0500)]
Simplify quicksort

4 years agoWIP: quicksort
Joe Nelson [Sat, 24 Apr 2021 03:15:41 +0000 (22:15 -0500)]
WIP: quicksort

4 years agoWIP: pass auxiliary arg to comparator
Joe Nelson [Sat, 24 Apr 2021 01:45:24 +0000 (20:45 -0500)]
WIP: pass auxiliary arg to comparator

4 years agoWIP: hashmap with memory leaks
Joe Nelson [Sun, 18 Apr 2021 02:45:31 +0000 (21:45 -0500)]
WIP: hashmap with memory leaks

4 years agoTest v_reserve_capacity properly
Joe Nelson [Sat, 17 Apr 2021 03:10:12 +0000 (22:10 -0500)]
Test v_reserve_capacity properly

It fails by not reserving enough, not by necessarily returning zero.

4 years agoList find
Joe Nelson [Sat, 17 Apr 2021 03:07:47 +0000 (22:07 -0500)]
List find

4 years agoMore tests
Joe Nelson [Sat, 17 Apr 2021 02:08:43 +0000 (21:08 -0500)]
More tests

4 years agoList sorting and more
Joe Nelson [Fri, 16 Apr 2021 22:48:33 +0000 (17:48 -0500)]
List sorting and more

4 years agoHide vector internals
Joe Nelson [Fri, 16 Apr 2021 22:47:50 +0000 (17:47 -0500)]
Hide vector internals

4 years agoMore logic for removing/clearing
Joe Nelson [Sat, 10 Apr 2021 04:57:29 +0000 (23:57 -0500)]
More logic for removing/clearing

4 years agoInitial list stuff
Joe Nelson [Mon, 5 Apr 2021 03:47:17 +0000 (22:47 -0500)]
Initial list stuff

4 years agoBe less prissy about NULL
Joe Nelson [Mon, 5 Apr 2021 02:19:46 +0000 (21:19 -0500)]
Be less prissy about NULL

4 years agoStart list stuff
Joe Nelson [Sun, 4 Apr 2021 18:43:08 +0000 (13:43 -0500)]
Start list stuff

4 years agoShave off another case
Joe Nelson [Sun, 4 Apr 2021 00:47:01 +0000 (19:47 -0500)]
Shave off another case

4 years agov_reverse
Joe Nelson [Sat, 3 Apr 2021 18:54:52 +0000 (13:54 -0500)]
v_reverse

4 years agoRename conflicting "test" target in Makefile
Joe Nelson [Sat, 27 Mar 2021 18:06:49 +0000 (13:06 -0500)]
Rename conflicting "test" target in Makefile

POSIX Make doesn't allow me to mark test as .PHONY, and there's a
directory with that name which would confuse the freshness check.

4 years agoRemove phony clean target in Makefile
Joe Nelson [Sat, 27 Mar 2021 18:03:41 +0000 (13:03 -0500)]
Remove phony clean target in Makefile

Shouldn't ever need to clean when Make knows the full set of
dependencies for each build variant.

4 years agoRemove binaries that snuck in
Joe Nelson [Sat, 27 Mar 2021 17:59:55 +0000 (12:59 -0500)]
Remove binaries that snuck in

See, the derp is already strong

4 years agoScript to run test suite
Joe Nelson [Sat, 27 Mar 2021 17:55:51 +0000 (12:55 -0500)]
Script to run test suite

4 years agoTests aren't relevant in release variant
Joe Nelson [Sat, 27 Mar 2021 17:00:58 +0000 (12:00 -0500)]
Tests aren't relevant in release variant

NDEBUG prevents the assertions from doing anything. So the default
make target is now "lib" and doesn't include tests.

4 years agoLet's be real
Joe Nelson [Sat, 27 Mar 2021 16:59:55 +0000 (11:59 -0500)]
Let's be real

4 years agoSome tests
Joe Nelson [Sat, 27 Mar 2021 04:56:19 +0000 (23:56 -0500)]
Some tests

4 years agoSome missing null checks
Joe Nelson [Fri, 26 Mar 2021 03:45:32 +0000 (22:45 -0500)]
Some missing null checks

4 years agoSet errno uniformly
Joe Nelson [Fri, 26 Mar 2021 03:31:56 +0000 (22:31 -0500)]
Set errno uniformly

Even when the return code allows the caller to determine
that they passed invalid arguments.

4 years agoHave v_remove operate on a single element
Joe Nelson [Fri, 26 Mar 2021 02:50:55 +0000 (21:50 -0500)]
Have v_remove operate on a single element

This way it can work like a generalized pop(), and the caller
can use/free the element as desired. Removing a range has no
clean way to return the elements to the caller, other than
packaging up the results into a new vector perhaps.

Later we could add a v_erase() that works on a range and frees
the elements, like the C++ vector::erase(). Or call it v_delete()
like Vectors in Ada.

4 years agoDeal with large allocations more consistently
Joe Nelson [Fri, 26 Mar 2021 01:52:30 +0000 (20:52 -0500)]
Deal with large allocations more consistently

This is kind of academic because it's unlikely that such huge amounts
of memory could ever actually be allocated. In fact, probably impossible
given sizeof(void*). However I want the numerical logic to be correct,
and we'll leave it to realloc() to determine failure.

4 years agoA little cleaner way to do invariant check
Joe Nelson [Thu, 25 Mar 2021 04:07:22 +0000 (23:07 -0500)]
A little cleaner way to do invariant check

4 years agoMore untested functions
Joe Nelson [Thu, 25 Mar 2021 04:02:36 +0000 (23:02 -0500)]
More untested functions

4 years agoKeep on implementing
Joe Nelson [Thu, 25 Mar 2021 03:33:53 +0000 (22:33 -0500)]
Keep on implementing

4 years agoAlways check invariants in debug mode
Joe Nelson [Thu, 25 Mar 2021 03:33:37 +0000 (22:33 -0500)]
Always check invariants in debug mode

4 years agoStart implementing
Joe Nelson [Tue, 23 Mar 2021 04:29:11 +0000 (23:29 -0500)]
Start implementing

4 years agoAdd const where possible
Joe Nelson [Tue, 23 Mar 2021 04:28:02 +0000 (23:28 -0500)]
Add const where possible

4 years agoBeginning with vector
Joe Nelson [Mon, 22 Mar 2021 02:57:54 +0000 (21:57 -0500)]
Beginning with vector