X-Git-Url: https://git.r.bdr.sh/rbdr/r.bdr.sh/blobdiff_plain/0c34df5affa01c37adb70e2c86d2a4ae3dd573bc..c38fcb6e09663a5e9f59f2e9dc9ea6f988032d67:/learning.txt?ds=inline diff --git a/learning.txt b/learning.txt index e46de4e..ea937d7 100644 --- a/learning.txt +++ b/learning.txt @@ -1,3 +1,4 @@ +2024-03-09: I misunderstood how expect() works in rust. In a Result it won't return Err, it'll panic. .map_err() and ok_or_else() are a closer way to offer the same result. 2024-03-06: The definition of the first week in the ISO standard is the one that contains january 4th. 2024-03-06: In lua os.time() if you pass month 13 or month -1, it correctly calculates the next or previous year, so you don't have to manually do that math. 2024-03-03: The string methods in lua are attached to the metatable so you can run them with :, but the table ones aren't so you always need table.method().