Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
LegionMammal978
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
61.
▲
by
LegionMammal978
10mo ago
> But most colours can be associated with a primary wavelength… except purple. So by that definition, they don’t really exist. And white, and black. Physically, you'll always have a measurable spectrum of intensities, and some such
62.
▲
by
LegionMammal978
10mo ago
Is offering an alternative to LLVM not precisely one of the purposes of the rustc_codegen_cranelift backend [0]? It still doesn't have 100% feature parity, but I believe it's able to fully bootstrap the compiler at this point. Wri
63.
▲
by
LegionMammal978
10mo ago
> Mathematicians do care about how much "black magic" they're invoking, and like to use simple constructions where possible (the field of reverse mathematics makes the central object of study). I'd be careful about ge
64.
▲
by
LegionMammal978
10mo ago
To be fair, in some fields I've seen arguments between "a widget should be defined as ABC" vs. "a widget should be defined as XYZ", to the point that I wonder how they're able to read papers about widgets at al
65.
▲
by
LegionMammal978
10mo ago
If you mean that you can call a C++ lambda from a static C callback via a context pointer, of course you can do that, it's not very mind-boggling. Rust FFI libraries similarly have to do that trick all the time to turn a closure into a
66.
▲
by
LegionMammal978
10mo ago
You can't turn a capturing C++ lambda into a WNDPROC, which is an ordinary function pointer. You'd still have to ferry the lambda via a context pointer, which is what this blog post and the other solutions in the comments are all
67.
▲
by
LegionMammal978
10mo ago
It looks like the author has a pretty simple procedure for computing the 'identity' sandpile (which they unfortunately don't describe at all): 1. Fill a grid with all 6s, then topple it. 2. Subtract the result from a fresh gr
68.
▲
by
LegionMammal978
10mo ago
If you wanted to avoid <string.h>, you could use the poor man's strlen(), snprintf(0,0,"%s",argv[1]). For full input validation without adding any more statements, the best I can get (in ISO C) is uint8_t number
69.
▲
by
LegionMammal978
10mo ago
The only reason that GCC needs executable trampolines is for the program to be able to create an ordinary function pointer and have all the captured data come along with it. The proposal is to reuse the syntax of nested functions, but cha
70.
▲
by
LegionMammal978
10mo ago
And my point is that with HTML, there's always an extremely fine line between allowing "almost nothing" and "almost all of it" when it comes to sanitization. I'd love to live in a world where there are natural
71.
▲
by
LegionMammal978
10mo ago
Yes, or rather, the lifetime of references to the contained objects can be tied to the lifetime of references to the arena. E.g., the bumpalo crate [0] has two relevant methods, Bump::alloc(), which puts a value into the arena and gives
72.
▲
by
LegionMammal978
10mo ago
If you're rendering dynamic HTML, then either the source is authorized to insert arbitrary dynamic content onto the domain, or it isn't. And if it isn't, then you'll always have a hard time unless you're as strict a
73.
▲
by
LegionMammal978
10mo ago
Every public API change is a cost on the user: for an extreme example, if every library I ever used renamed half its APIs every year to align with the latest ontology, then there would hardly be any point in saving my scripts, since I'
74.
▲
by
LegionMammal978
10mo ago
They had a link in their post [0]: it seems like most of the examples are with HTML elements with wacky contextual parsing semantics such as <svg> or <noscript>. Their recommendation for server-side sanitization is "don
75.
▲
by
LegionMammal978
10mo ago
A lot of these automatic marshalling systems (in this case, windows-rs) can be annoyingly unintuitive or opaque in how they handle subtler details of memory ownership, character sets, how to allocate and free objects, etc. And then it'
76.
▲
by
LegionMammal978
11mo ago
> Well, they said they would unkill xslt if someone would rewrite and maintain it so that it's not the abandonware horrorshow it was. Who said this? I was never able to find any support among the browser devs for "keep XSLT wit
77.
▲
by
LegionMammal978
11mo ago
Yet a colossal number of servers on satellites would require the same energy-production facilities to be shipped into orbit (and to receive regular maintainence in orbit whenever they fail), which requires loads of land for launch facilitie
78.
▲
by
LegionMammal978
11mo ago
Heat conduction requires a medium, but radiation works perfectly fine in a vacuum. Otherwise the Sun wouldn't be able to heat up the Earth. The problem for spacecraft is that you're limited by how much IR radiation is passively em
79.
▲
by
LegionMammal978
11mo ago
There is lots and lots and lots of space on Earth where hardly anyone is living. Cheap rural areas can support extremely large datacenters, limited only by availability of utilities and workers.
80.
▲
by
LegionMammal978
11mo ago
Indeed, the GPL's definitions of "modify" and "propagate" restrict the license's scope to actions that would otherwise infringe on copyright if not permitted. And fair use and similar doctrines generally act as
81.
▲
by
LegionMammal978
11mo ago
Things like bump functions [0] would generally do the trick. [0] https://en.wikipedia.org/wiki/Bump_function
82.
▲
by
LegionMammal978
11mo ago
> 1) Your critical sections are tiny and you know you can't panic, in which case dealing with poisoning is just useless busywork. Many people underestimate how many things can panic in corner cases. I've found quite a few unsaf
83.
▲
by
LegionMammal978
11mo ago
My point is that "blindly continuing" is not a great default if you "don't care". If you continue, then you first have to be aware that a multithreaded program can and will continue after a panic in the first place
84.
▲
by
LegionMammal978
11mo ago
> It's always either an `unwrap` (and we know how well that can go [2]) If a mutex has been poisoned, then something must have already panicked, likely in some other thread, so you're already in trouble at that point. It'
85.
▲
by
LegionMammal978
11mo ago
If the O( n ^3) schoolbook multiplication were the best that could be done, then I'd totally agree that "it's simply the nature of matrices to have a bulky multiplication process". Yet there's a whole series of algo
86.
▲
by
LegionMammal978
11mo ago
This is a bit interesting in how it doesn't require further interactivity with the attacker once the libc address has been obtained, unlike most basic ROP examples, which I've rarely seen require anything fancier than return-to-ma
87.
▲
by
LegionMammal978
1y ago
It's pretty weird, my impression is that the APIs are flexible enough to implement most sane behaviors, but websites keep managing to mess it all up. Perhaps it's just one of those things that no one bothers re-testing as the code
88.
▲
by
LegionMammal978
1y ago
On the other hand, I've not uncommonly seen this idea misused: Alice asks for Y, Bob says that it's an XY problem and that Alice really wants to solve a more general problem X with solution Z, Alice says that Z doesn't work f
89.
▲
by
LegionMammal978
1y ago
The probability is less than 1, and in fact it exponentially goes to 0, since the halting condition can be modeled as a biased random walk [0]. [0] https://wiki.bbchallenge.org/wiki/Antihydra#Trajectory
90.
▲
by
LegionMammal978
1y ago
You can solve it with a linear recurrence relation [0]: the halting probability from position n is ((sqrt(5)-1)/2)^( n +1), where n is twice the number of odds minus the number of evens. (In fact, this +2/-1 random walk is pre
More ›