Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
yoklov
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
yoklov
8y ago
Often when people [0] discuss the difficulty of writing linked lists in Rust compared to C++, they mean intrusive linked lists. These are still very difficult in Rust. I've heard pinning being stabilized makes them possible safely, but
32.
▲
by
yoklov
8y ago
https://github.com/cbreeden/fxhash is reasonably widely used. It doesn't have the security benefits of SipHash, however they are rather dubious in practice -- 64 bits of state is simply not enough to be secure, no
33.
▲
by
yoklov
8y ago
What's happening is that the std::unordered_map was a mistake. Many parts of it's API prevent implementing it efficiently (For example, every insertion requires allocation, even if you reserve). It's widely regarded, within a
34.
▲
by
yoklov
8y ago
Even that's surprising, since std::unordered_map is notoriously slow (and impossible to optimize given weirdly exposed implementation details in it's API)
35.
▲
by
yoklov
8y ago
> Personally, I've only had the experience of a broken webpage once in two and a half years of using it. Is there a reason DNS-based filtering is much better than normal ad-blocking in this respect?
36.
▲
by
yoklov
8y ago
Faster to build than a hash map, less code (which is also better for icache), etc. JSON Objects tend to have few enough values that it doesn't matter a ton anyway.
37.
▲
by
yoklov
8y ago
Firefox has this in nightly too (possibly only in US). It's been there a while and works well, I don't know why it hasn't moved on from nightly, to be honest...
38.
▲
by
yoklov
8y ago
15ms for that is ridiculously slow, but if you’re doing single pixel rectangles... that would do it.
39.
▲
by
yoklov
8y ago
The system malloc implementation. Users who want to use jemalloc have to opt in, but doing so is relatively easy (using the jemallocator crate from crates.io).
40.
▲
by
yoklov
8y ago
The data-entangle construct taking a string that it presumably evals looks like a security nightmare (and disallowed for good reason by many devs with CSP). Not to mention the innerHTML use (although its unclear if thats just as an example)
41.
▲
by
yoklov
8y ago
It’s lua, just with restrictions. Nothing you’d ship with, but a far cry from almost assembly.
42.
▲
by
yoklov
8y ago
It's still not POSIX compatible, deliberately.
43.
▲
by
yoklov
8y ago
Does firefox not import passwords from chrome as part of the profile import? It's... certainly supposed to. EDIT: Oh, you probably didn't mean getting them out and into firefox, you probably wanted to use something different to av
44.
▲
by
yoklov
8y ago
I've always loved that both webkit and gecko (MFBT -- mozilla framework for building templates) use vaguely non-work-safe acronyms of their template frameworks.
45.
▲
by
yoklov
8y ago
> There are plans to extend mrustc to support newer Rust, but it turned out to be difficult. Was some feature added to rust 1.20.0 that was particularly difficult to implement? Or is this just a 'have to stop somewhere' situati
46.
▲
by
yoklov
8y ago
> Ruby’s JIT compiler does JIT compilation in a unique way, which prints C code to a disk and spawns common C compiler process to generate native code Well, uh, that is one way to do it...
47.
▲
by
yoklov
8y ago
They're used for more than that, but I agree it's unfortunate that DRM is a major use case.
48.
▲
by
yoklov
8y ago
Nothing prevents it beyond awkward save/load semantics in the browser. Webgl acceleration would be fairly trivial (to one familiar with opengl) if necessary as well.
49.
▲
by
yoklov
8y ago
I think this underestimates the complexity of proteins.
50.
▲
by
yoklov
8y ago
Might use Rhino or something, since it’s on the JVM
51.
▲
by
yoklov
8y ago
I don’t have the historical context, but its easy to fall into a trap like this even these days. Start with a config file, eventually it grows a need for conditionals, maybe some event handing, ....
52.
▲
by
yoklov
8y ago
Hm, it would be great to fix the pixel mixing. Cool nonetheless.
53.
▲
by
yoklov
8y ago
I think `async/await` is the big one for network stuff. Rocket is the library I was thinking of when I wrote that, though. My (possibly mistaken) understanding is that my coworkers who do more web servery stuff than me prefer actix to
54.
▲
by
yoklov
8y ago
I use Rust daily, and it took me a while to be productive. Productive is hard to define, and I guess I'm not "all the way there"; the design of a Rust project still takes me longer than a C++ or JavaScript one, mostly due to
55.
▲
by
yoklov
8y ago
It's very easy to use nightly (install via rustup, then `cargo +nightly blah --args` instead of `cargo blah --args`), and there are (ugh, still) a number of somewhat popular libraries that require nightly versions of the compiler. In p
56.
▲
by
yoklov
8y ago
Eh, again, this kind of thing is common for compiler output, and the use of such compilers is very common. I think you'd have more luck looking at static strings and warning on any string that has a sufficiently high entropy. Sure, som
57.
▲
by
yoklov
8y ago
A long tail of subtle event and reentrancy bugs, where an event loop wasn't getting an event it needed (leading to dropped or mishandled OS events), or a function that doesn't expect to need to be reentrant was suddenly reentrant.
58.
▲
by
yoklov
8y ago
That doesn't look that far off from what you'll see in generated code, e.g. something like babel could easily output the lines you've pasted. The rest of it is extremely dodgy, of course.
59.
▲
by
yoklov
8y ago
Prior to the introduction of async/await (or promises) there were a number of places we used a similar technique inside Firefox to avoid callback spaghetti. For us it caused no end of problems, and were glad to see it go (well, there a
60.
▲
by
yoklov
8y ago
Meow requires several instructions that make it difficult to use in practice for a while.
More ›