logoalt Hacker News

lann12/09/20241 replyview on HN

One specific example: many languages use randomized seeds in builtin dict/map types, leading to randomized iteration order.


Replies

chubot12/09/2024

Yeah, also Starlark is embedded like Lua, and doesn't come with batteries included like Python

So that means you can control the APIs, and say opendir() closedir() in Unix returns filenames in different orders. Depending on what the data structure in the kernel is

So many programs in other languages aren't deterministic just because they use APIs that aren't deterministic