Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
e4m2
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
e4m2
2y ago
It's very common in games. Integers are always an option, of course, but in this context it's hard to beat the convenience of just storing seconds in a floating point number. Related: https://randomascii.wordpress.com&#
32.
▲
by
e4m2
2y ago
This is a fair concern. > Does anyone know more about the security of the 8-round form and whether we should be concerned? This is the latest cryptanalysis I could find (see Table 2 and 3 for an overview): https://ieeexplore.i
33.
▲
by
e4m2
3y ago
The author of that talk, Eric Lengyel, also wrote the book "Foundations of Game Engine Development, Volume 1: Mathematics". Its 4th chapter focuses on the same topics.
34.
▲
by
e4m2
3y ago
The author of the post happens to be the person who implements your crypto, so you don't have to roll your own: https://github.com/FiloSottile . (I personally also wouldn't use OpenSSL as an example of good cryptog
35.
▲
by
e4m2
3y ago
From the linked GitHub repo: > As for the heap allocated objects, they will be allocated from unmanged(non-GC) memory, and will be allocated/freed exactly like in Rust. I understand this decision, but it would also be interesting to
36.
▲
by
e4m2
3y ago
Yes and no. My post specifically mentions UTF-16 and WTF-16, too. The term "Unicode string" exists and is well established: https://unicode.org/glossary/#unicode_string . Windows Unicode strings happen to fit
37.
▲
by
e4m2
3y ago
> that release finally made UTF-8 the standard text encoding This is a bit of a reach unfortunately. UTF-16 (most often broken WTF-16) is still the standard text encoding on NT. The manifest change only makes A-suffixed functions always
38.
▲
by
e4m2
3y ago
It made the switch, sure, but overflow remains undefined.
39.
▲
by
e4m2
3y ago
Why does the stdlib implementation do so badly in the first place?
40.
▲
by
e4m2
3y ago
See also https://arewefastyet.com .
41.
▲
by
e4m2
3y ago
I've done this before, works quite well actually, but isn't very popular for some reason. > You can do dummy defines of structs with the same size Don't forget alignment. The general pattern is: https://godbolt.
42.
▲
by
e4m2
3y ago
> Does it assume that the predefined capacity will not be reached? Yes, the function name says exactly that as well, though admittedly what this actually means and what consequences it might have if the assumption is false are probably f
43.
▲
by
e4m2
3y ago
The core Zig devs, TigerBeetle and Bun are the main ones AFAIK. The latter two are VC backed, the Zig Software Foundation is a 501(c)(3).
44.
▲
by
e4m2
3y ago
Interestingly, the actual syntax tree and related structures/functions are generated from the config.yml file and the templates inside the bin directory. They are using a custom template language written in Ruby, here's an example
45.
▲
by
e4m2
3y ago
True, another extension would be disastrous, we may never recover from the fallout of malformed UCS2-esque UTF-16. Let's just hope no one fixes all the broken, accidentally forward-compatible decoders in the practically infinite amount
46.
▲
by
e4m2
3y ago
UTF-32 is a fixed-width encoding. To quote directly from the Unicode standard, chapter 3.9, definition 90: > UTF-32 encoding form: The Unicode encoding form that assigns each Unicode scalar value to a single unsigned 32-bit code unit wit
47.
▲
by
e4m2
3y ago
Since C++20 the correct, constexpr-friendly approach to your specific problem is std::bit_cast: https://en.cppreference.com/w/cpp/numeric/bit_cast .
48.
▲
by
e4m2
3y ago
Frama-C as a bare minimum is a pipe dream. It's a nice thought, don't get me wrong, but it's hard enough to convince people to add `-fsanitize=...` to their compiler flags. An entire separate static analysis tool with its own
49.
▲
by
e4m2
3y ago
The author of the PR works for Intel, though.
50.
▲
by
e4m2
3y ago
bcrypt has stood the test of time very well. It (unintentionally?) does better than some more modern algorithms which are optimized for the wrong kind of "computational hardness", i.e. cache/memory hard. That being said, to a
51.
▲
by
e4m2
3y ago
There is an extended version on arXiv: https://arxiv.org/abs/2304.05276 . Also, the artifact (Docker image + some guides, CC BY 4.0) for the OCaml library: https://zenodo.org/record/7824835 . Edit:
52.
▲
by
e4m2
3y ago
> I don't see how to access move mask from Zig, however. Bools in a vector each only occupy one bit. You can @bitCast an N element bool vector directly to a uN integer and it will generate movemask on x86.
53.
▲
by
e4m2
3y ago
A lower-level, more security oriented look at some of the same issues: https://googleprojectzero.blogspot.com/2016/02/the-definitiv...
54.
▲
by
e4m2
3y ago
> Can bet 99.99% that Mullvad throws the envelope in the trash and just forgets about it. Better yet, they shred it: https://mullvad.net/en/help/no-logging-data-policy/#payments .
55.
▲
by
e4m2
3y ago
Yes, in general, having a better router would probably help (although you haven't mentioned the exact model you have, maybe it's already fine and the problem is elsewhere). Enabling SQM [1] would probably mitigate the issue furthe
56.
▲
by
e4m2
3y ago
Ah, good to know! My main sources were the release notes and occasionally your tweets (the account seems to have gotten suspended?), so my information was understandably a bit out of date. Glad to see progress being made though.
57.
▲
by
e4m2
3y ago
> For example, can I use the C backend to compile zig to C, and then use the system compiler as I would normally do with a meson cross file or CMake toolchain file? It's possible, but: 1. The C backend isn't 100% there yet. You
58.
▲
by
e4m2
4y ago
> There are also some things that aren't quite yet finished: > There are not yet mechanisms to build in release mode (that should be achieved by modifying the toolchain). > Windows/Mac builds are still in progres
59.
▲
by
e4m2
4y ago
> The main downside is that sometimes your code looks more like Qt and less like Python. This can be remedied to a degree: https://doc.qt.io/qtforpython/considerations.html#features
60.
▲
by
e4m2
4y ago
The main function returns zero implicitly if control flow reaches the end without encountering a return statement.
More ›