- May 26, 2024
-
-
cms authored
- Feb 10, 2024
-
-
cms authored
further experiments with type hints - removing as much run-time checks as feasible - the main change here is type declarations for the main `ulid` function getting the signature right for the function argument (i.e. :random) was tricky and I don't think that it's being checked at compile time i did learn that using 'describe' in sbcl on functions will tell you the inferred type, which is a nice head start
-
- Mar 26, 2023
- Mar 15, 2023
- Mar 14, 2023
-
-
cms authored
-
- Mar 13, 2023
-
-
cms authored
Add run time type checks See merge request colinstrickland/cms-ulid!7
-
cms authored
we can construct the largest possible ULID manually, and then try and ask for another using the same timestamp it should signal a type error, because we have no headroom left
-
cms authored
we're relying on the "type system" to protect us against ULID overflows, but the compiler checks and assertions aren't guaranteed to be portable, so we need to inspect our bounds to see that we don't pass the upper limit for ULID according to the spec rather than ad-hoc checks and `error` like I was using before, this can all be simplified to use `check-type`
-
- Mar 12, 2023
-
-
cms authored
More unit tests, including signals tests See merge request colinstrickland/cms-ulid!6
-
cms authored
now i know how to make fiveam verify errrors are raised too
-
cms authored
we can compute if the passed integer will fit in the specified byte sequence length, and signal a type error if it does not, or if it is negative
-
cms authored
-
cms authored
sbcl will raise for us because of type checking but other lisps won't necessarily so add a simple argument check that the byte we're passed is unsigned int8
-
cms authored
Maintenance on binary helper bits, more tests, more type hints See merge request colinstrickland/cms-ulid!5
-
cms authored
fiveam gives a helpful form where you can provide a predicate function and a series of pairs for expectations and it will chain each of them. This saves me figuring out how to write a macro to do this myself :-) !
-
cms authored
we have a named argument in the lambda random function that we discard, which makes a compile time warning. declaring it as ignored for cleanliness
-
cms authored
just a straightforward value check
-
cms authored
sbcl will raise for us because of type checking but other lisps won't necessarily so add a simple argument check that the byte we're passed is unsigned int8
-
cms authored
use the type checker to fix the input to 0 > 255 because otherwise we will silently underflow
-
cms authored
for readability, let us be honest
-
- Mar 11, 2023
-
-
cms authored
it means we don't have to destructure the table arguments deeply be can just use car and cadr
-
cms authored
Adds a test to check int->bytes works as expected Split the root test suite 'all-tests' into two sub suites - 'ulid has the ulid construction tests - 'binary-utils has tests for the binary stuff you can run them like so (fiveam:run! 'cms-ulid/tests::ulid) (fiveam:run! 'cms-ulid/tests::binary-utils) (fiveam:run! 'cms-ulid/tests::all-tests) or , (asdf:test-system 'cms-ulid) will invoke test-op which runs all tests NB. while testing this iteratively on the repl, I realised that the let over the ulid function used to initialise the `last` check used to implement the time collision avoidance means that the static ulid check is not idempotent - once we've run the test for the fixed timestamp once, the ulid constructor will hold onto the fixed time
-
cms authored
explain what they are doing, briefly
-
cms authored
converts an 8 bit byte into individual bits
-
- Nov 19, 2022
-
-
cms authored
Broader tests See merge request colinstrickland/cms-ulid!4
-
cms authored
create a ulid from a predictable seed pair and check that it deconstructs as expected
-
cms authored
old habits die hard
-
cms authored
time allows you to fix the time. random allows you to supply a random function. Primarily useful for testing.
-
- Nov 12, 2022
-
-
cms authored
I want to limit the pipeline trigger to only MR See merge request colinstrickland/cms-ulid!3
-
cms authored
it would be nice to be able to push things to gitlab without burning minutes
-
cms authored
Get CI working better See merge request colinstrickland/cms-ulid!2
-
cms authored
it's slow. At some point i could put it back for release only builds or similar, but right now it takes ages, even though it passes fine
-
cms authored
not doing releases yet, so I don't need those failing CMUCL doesn't seem to work with ironclad, and I don't care about it ABCL works but is burning minutes really
-
cms authored
remove lisp-binary See merge request colinstrickland/cms-ulid!1
-