proj-oot-ootLibrariesThoughts

"say" instead of "print" (it's shorter)

"say" autocoerces to string (includes a call to conv2str/str()/Python repr on its input), so you don't have to "say str(x)" or "say repr(x)"

would 'sss' be even better (easier to type?)

for print-to-stderr, need something equally easy to type. dbg1-dbg9? db1-db9? dd1-dd9? ddd? should we have warn, note, err? Python's DEBUG, INFO, WARNING, ERROR, CRITICAL?

why did i define custom log levels in atr? Which ones did i define? looks like i had DEBUG2, DEBUG3, REPORT. See prog/atr/atr_logger.py. Maybe just need an extra 'sublevel' argument there?


since we dont use backwards inference, we should use coercion functions like toStr (python's str()), not like fromStr, as haskell sometimes does.

---

rand:

by default returns a uniform floating point number between 0 and 1. Optional arguments:


hash:

SipHash for hash tables for resistance to hash flooding [1]

Python uses SipHash?: see https://www.python.org/dev/peps/pep-0456/


scrypt

sha-256

git is moving towards sha3-256 [2] [3]

---

it would be neat if there were a discussion forum and/or wiki purely for the purpose of doing cross-language comparison of library APIs, in order to find out the most loved way of doing each common thing (what are the most popular libraries for representing and manipulating dates in Java, Haskell, Python, etc, and which is better?)

---

https://github.com/brson/rust-api-guidelines

---

probably newlib-nano (which is used in ARM MCUs), or maybe its parent newlib

otherwise, probably musl

wait actually http://wiki.osdev.org/C_Library says that PDCLib is even smaller/more underpowered. We should just take the intersection of the functionality of all the 'libc's mentioned on the osdev page.

---

in rust the prelude is a std lib that is preloaded/always in scope. haskell too. so mb follow this terminology.

---