Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sparkie
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
61.
▲
by
sparkie
11mo ago
It's not only xor that does this, but most 32-bit operations zero-extend the result of the 64-bit register. AMD did this for backward compatibility. so existing programs would mostly continue working, unlike Intel's earlier attemp
62.
▲
by
sparkie
11mo ago
The primary focus of Lions/seL4 is security, and formal verification of it. It's a necessary project for a world where CVEs are frequently published for the Kernel and other underlying system services, in part because they're
63.
▲
by
sparkie
11mo ago
I don't specifically mean stdlib `rand` (hence comment about assuming no inherent bias) - but just some arbitrary PRNG. Updated the code above to say `random` so as not confuse.
64.
▲
by
sparkie
11mo ago
We could potentially use a conditional move and an unconditional jump to make the branch target predictor do the work instead - and flood it with a bunch of targets which are intended to mispredict. Eg, we could give 255 different paths for
65.
▲
by
sparkie
11mo ago
The branch taken hint (3EH) was re-added in Redwood Cove (2023), but it's only for static prediction where the branch predictor has not yet encountered the branch - ie, useful for things you would only use once or twice but would likel
66.
▲
by
sparkie
11mo ago
It's most likely a combination of both genetics and society - neither are absolutes. There is no concrete evidence that intelligence is purely a social construct, nor that it is genetic. We simply don't know. People get cancelled
67.
▲
by
sparkie
1y ago
You realize that LLMs are trained on human discussions right? If everyone stops asking questions and asks the LLM instead, there is no new training data for future LLMs to learn from. They will stagnate, or consume their own slop, and regre
68.
▲
by
sparkie
1y ago
They're one byte opcodes, but not one byte ops. Most of them have operands which are encoded in a ModRM byte which follows the opcode. The ModRM may be followed by a SIB byte, and that may be followed by a a variable size immediate|dis
69.
▲
by
sparkie
1y ago
To state the obvious, IANAL. > This is indeed a weak-point in the contract approach: People can't be bound by an contract they never knew about nor agreed-to. "Prominent notice" is important in the terms of use approach. M
70.
▲
by
sparkie
1y ago
Apologies, there's a mistake in the godbolt link above. `SIGN_BIT` should be `0x8000` and not `0x1000`.
71.
▲
by
sparkie
1y ago
It's fine to use techniques like this in standard C provided you guard them with the preprocessor and provide a fallback option on unsupported hardware.
72.
▲
by
sparkie
1y ago
C23 also has `alignas` and `alignof` (`_Alignas`/`_Alignof` in C11 with the lowercase as macros in stdalign.h), and also provides `aligned_alloc` and `free_aligned_size` in stdlib.
73.
▲
by
sparkie
1y ago
There's numerous techniques used. Many are covered in Gudeman's 1993 paper "Representing Type Information in Dynamically Typed Languages"[1], which includes low-bits tagging, high-bits tagging, and NaN-boxing. The high b
74.
▲
by
sparkie
1y ago
You don't need the hardware UAI/LAM to make use of the high pointer bits. The most common technique is to use `shl reg, 16; sar reg, 16`, which will shift in ones or zeros from the left depending on the 47th bit. Several runtimes
75.
▲
by
sparkie
1y ago
> Using 16 bits may be risky on recent x86. For example, IIRC Linux enables 5-level page tables on microarchitectures that support it, which can put valid address data in bits 48-56. Linux will not allocate past the 47-bit range, even wi
76.
▲
by
sparkie
1y ago
> On amd64 they actually need to be sort of "sign extended" so require some fixup once extracted. Pointers need to be canonical if LAM/UAI is not enabled. The simplest way to do it is to shift left by 16, then shift arithm
77.
▲
by
sparkie
1y ago
A general language feature would be fexprs , or call-by-name (which can be combined with call-by-value using call-by-push-value ). In Kernel[1] for example, where operatives are an improved fexpr . ($define! $if ($vau
78.
▲
by
sparkie
1y ago
> Before Raymond, the phrase 'open source' had a definite meaning in computing which is quite different from the sense it has now. In 1990 when you said a program was 'open source', you meant that you could read the s
79.
▲
by
sparkie
1y ago
Surprised there's no mention of Austral[1] in related work. Austral has read and write borrows for linear types, and has been around for a few years. It uses special `Region` types for borrows, where a linear type `Foo` is wrapped in a
80.
▲
by
sparkie
1y ago
When you realize the game is completely rigged, you have to stop playing it. We would like for western companies to be able to operate in China the way we let Chinese companies operate in our nations, but since China don't want to reci
81.
▲
by
sparkie
1y ago
Almost everyone in China pirated Windows and Office. Microsoft were unable to do anything about it, and gave up trying. Western companies have virtually no IP in China. It gets stolen and IP rights are not enforcible - western companies bas
82.
▲
by
sparkie
1y ago
Sparse on details. Presumably will be based on the existing Linear Address Masking/Upper Address Ignore specs, which are equivalent, and will be similar to CHERI. If so it needs to be opt-in or at least opt-out per process, because man
83.
▲
by
sparkie
1y ago
As you mentioned earlier though, the issue isn't immigration per se, but the scale of it, which has been accelerating even though its been obvious for some time that we're already beyond the point at which it is beneficial to econ
84.
▲
by
sparkie
1y ago
Policy changes wouldn't be needed if the existing policy weren't exploitable for cheaper labour. For every brilliant individual there are dozens of mediocre individuals. The policy is intended to stop the latter and not the former
85.
▲
by
sparkie
1y ago
O(1) simply means that there's a constant upper bound to the algorithm as n -> ∞. In English: There is some worst-case time taken to compute the algorithm that adding any further `n` will not take any longer.
86.
▲
by
sparkie
1y ago
The misconception is mixing up notations. Using Big-O for the upper bound has been the norm for describing algorithms for at least half a century. In Knuth's description[1] of Big-O notation (and related variants), from 1976, he starts
87.
▲
by
sparkie
1y ago
It's true though. Time complexity is a relative measure. Big-O notation is an upper bound , not a lower one. You don't take the fastest storage (L1 cache) as the baseline `x` and then say it takes some f(n) > x time to access
88.
▲
by
sparkie
1y ago
Are we certain that it didn't exist though? Unicode only got emoji in 2014, after ~5 year standardization effort. There were many different, incompatible formats around for about a decade before that, plus non-emoji like Kaoani. Perhap
89.
▲
by
sparkie
1y ago
The concern here is getting sufficient quality training data for the newer LLMs. They'll be not only learning from human written code, but also from the slop produced by previous generation LLMs. It may be that they get worse over time
90.
▲
by
sparkie
1y ago
Obviously you'll need to read the manuals to get much done, but these kinds of tutorials are complimentary. The issue with x86_64 is that you need to understand some of the legacy "warts" to actually use 64-bits. The CPU does
More ›