HackerTrans
トップ新着トレンドコメント過去質問紹介求人

facturi

no profile record

投稿

[untitled]

1 ポイント·投稿者 facturi·2 年前·0 コメント

Garbage Collection and Metastability [Marc's Blog]

brooker.co.za
2 ポイント·投稿者 facturi·2 年前·0 コメント

Ask HN: What AI-generated bugs do you encounter, and how you debugged them

1 ポイント·投稿者 facturi·2 年前·0 コメント

コメント

facturi
·2 年前·議論
[flagged]
facturi
·2 年前·議論
It works in MariaDB.
facturi
·2 年前·議論
Tearing issue is mentioned in this issue https://github.com/dotnet/csharplang/issues/7016 but not in proposal
facturi
·2 年前·議論
That proposal doesn't mention how the union struct handles tearing under concurrent modification.

Tearing can cause memory safety issue. Variant A can have an integer field and variant B can have a reference field in the same offset. Tearing can cause it to treat an integer as reference.
facturi
·2 年前·議論
In GC languages, RCU is just atomic pointer update with immutable data structure. In a language without GC, it requires delayed destruction to avoid memory safety issues.

Linux kernel's RCU waits for all CPU cores to context switch and disables preemption when reading RCU data structure. This is not usable in normal application programming.
facturi
·2 年前·議論
This is related: Why relations are better than objects https://www.cell-lang.net/relations.html
facturi
·2 年前·議論
Does the range query aggregate the elements in range? If the aggregation operation forms a group (follows associativity law, has inverse) you can use prefix sum data structures like Fenwick tree.

If it doesn't have inverse so that you cannot subtract prefix sum, sparse table can be used.