Better HN
topnewbestaskshowjobs
Log inSign up

rept0id-2

17 karma · joined Sep 25, 2024 (2y ago) · 8 submissions

Submissions

comment 1y ago · link · parent

The functionality of this library is to calculate compounded interest... but the real purpose is to test Matt Godbolt's suggestions from "Correct by Construction: APIs That Are Easy to Use and Hard to Misuse - Matt Godbolt - C++ on sea" on a high-level language.

Matt gives us the example of a stocks trading API that is implemented in C++. Because we wanted to test what we saw there on a high-level language, we picked Python.

comment 1y ago · link · parent

A lib with a hard to misuse API (based on Matt Godbolt)

3.

A lib with a hard to misuse API (based on Matt Godbolt)(github.com ↗)

1 points · by rept0id-2 · 1y ago · 2 comments

comment 1y ago · link · parent

Ratatoi is a C libary that wraps stdlib's strtol (as atoi does), but it's evil.

If an overflow is detected, it calls abort(), you crash and get Aborted (core dumped).

This way, you prioritize memory safety over silently running in a wrong state, without needing to call strtol and check errors manually everywhere.

5.

Ratatoi is a C libary that wraps stdlib's strtol (as atoi does), but it's evil.(github.com ↗)

31 points · by rept0id-2 · 1y ago · 40 comments

comment 2y ago · link · parent

Promoting Folding@Home through gitification

7.

Folding Home Badge(github.com ↗)

1 points · by rept0id-2 · 2y ago · 1 comment