Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
StephanTLavavej
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
1.
▲
by
StephanTLavavej
4y ago
Yep, that's my pull request. :-) At the moment, it's usable if you build the microsoft/STL repo with VS 2022 17.4 Preview 3 or later. When VS 2022 17.5 Preview 1 ships (in the very near future; can't say when exactly), i
2.
▲
by
StephanTLavavej
4y ago
Note that the O-rings were 12 feet in diameter - they encircled the entire solid rocket booster. They definitely didn't cost less than a dollar.
3.
▲
by
StephanTLavavej
4y ago
I'm glad you liked my charconv talk! Here's a complete list of my recorded conference talks: BoostCon/C++Now 2012: Regex In C++11 And Boost: https://youtu.be/mUZL-PRWMeg GoingNative 2012: STL11: Magic &&a
4.
▲
by
StephanTLavavej
4y ago
std::format is available, with all C++20 Defect Reports implemented, in VS 2019 16.11.14 (and all later 16.11.x) and VS 2022 17.2 (and all later 17.x).
5.
▲
by
StephanTLavavej
4y ago
It’s actually inverse cube for magnets - see https://en.wikipedia.org/wiki/Force_between_magnets : “One characteristic of a dipole field is that the strength of the field falls off inversely with the cube of the distan
6.
▲
by
StephanTLavavej
4y ago
Here’s what we do in MSVC’s STL: constexpr bool test_is_even() { assert(is_even(0)); assert(!is_even(1)); // … more test coverage return true; } int main() { test_is_even(); &#
7.
▲
by
StephanTLavavej
5y ago
> I'm curious if anybody is working to make C++ faster to compile. Yes - C++20 added support for modules to the Core Language (both "header units" and "named modules"; header units are an intermediate step betwee
8.
▲
by
StephanTLavavej
5y ago
Can you expand on how Roll breaks down when the players are trying to win?
9.
▲
by
StephanTLavavej
5y ago
Thank you!
10.
▲
by
StephanTLavavej
5y ago
I opened the spreadsheet, and now I can't remove it from my list of Google Sheets (unlike most shared spreadsheets). Am I missing some obscure way to remove it, despite the Remove option being grayed out? (It does respect the "Own
11.
▲
by
StephanTLavavej
5y ago
MSVC has /O1 and /O2 (and /Os), but not /O3. See https://docs.microsoft.com/en-us/cpp/build/reference/compile... . (I work on MSVC's STL.)
12.
▲
by
StephanTLavavej
5y ago
Modern processors have integrated “firmware” TPMs, so you shouldn’t need a discrete module. See https://arstechnica.com/gadgets/2021/06/heres-what-youll-nee... for some details. I was able to enable mine in m
13.
▲
by
StephanTLavavej
5y ago
Well beyond exploring - microsoft/STL runs libc++’s test suite for every PR, skipping a set of known failures (for product bugs, test bugs, etc.), see https://github.com/microsoft/STL/blob/main/tests
14.
▲
by
StephanTLavavej
6y ago
On the "How Was It Typed" page, Note 6 and beyond are using the same image, and link to an " http://xxxx " placeholder. Different images appear to have been intended (e.g. a Roman Numeral technique is described
15.
▲
by
StephanTLavavej
6y ago
https://www.planetary.org/articles/08190630-curiosity-wheel-... explains the root cause.
16.
▲
by
StephanTLavavej
6y ago
That “weirdness” is just scientific notation, which the Ryu implementation always emits. It is “superficial” in the sense that it’s separate from the core algorithm. When I adapted it for C++17 charconv in MSVC, I implemented fixed, general
17.
▲
by
StephanTLavavej
6y ago
We actually do use libc++'s test suite, which has found several bugs, but not this one (apparently because they don't yet have std::boyer_moore_searcher).
18.
▲
by
StephanTLavavej
6y ago
> you're guaranteed to have some bugs when implementing BM. Writing your own string search function seems nearly on the same level as implementing your own cryptographic functions, though. And that’s the Curse Of The Standard Librar
19.
▲
by
StephanTLavavej
6y ago
Very interesting, thanks!
20.
▲
by
StephanTLavavej
6y ago
Indeed, the randomized test in this PR uses alphabets from AB to ABCDEF, because I noticed the same thing - small alphabets make repetitions more likely, which are the tricky cases.
21.
▲
by
StephanTLavavej
6y ago
Apparently there are multiple fixes, some of which are said to be simpler. See https://github.com/microsoft/STL/issues/727 and the cited comments within, which quote Knuth. (I'm learning a lot by having
22.
▲
by
StephanTLavavej
6y ago
I conclude that usage of std::boyer_moore_searcher is relatively low, despite this C++17 feature shipping in VS 2017 15.3 (August 2017). "www" triggers the bug like all 3-character repeats, but Boyer-Moore manages to find it in &q
23.
▲
by
StephanTLavavej
6y ago
This sounds like the vector<list<unique_ptr<T>>> fiasco, where a vector contains elements that are movable-only (you can't copy a list<unique_ptr<T>>, only move it), yet with throwing move constructors (as
24.
▲
by
StephanTLavavej
6y ago
I believe that fuzz testing would have found it, yes. I'm not sure if fuzz testing would have been guided towards highly repetitive patterns, given the relative lack of branches in the table construction code, but the incorrectly handl
25.
▲
by
StephanTLavavej
6y ago
After comparing the outputs of the old and new algorithms, I believe that a needle needs more than two repeats in order to trigger the bug. That is, "aa" and "abab" don't trigger the bug, but "aaa" and &qu
26.
▲
by
StephanTLavavej
6y ago
And this works because I have `using namespace std;` in the test, which makes all of the Standard Library's "user"-defined literals available. So does `using namespace std::literals;` (without dragging in other names). There&
27.
▲
by
StephanTLavavej
6y ago
The smallest test case appears to be a needle of "aaa" and a haystack of "xxaaa", where VS 2019 16.5's boyer_moore_searcher will report "not found", while the corrected code finds the needle at offset 2 in
28.
▲
by
StephanTLavavej
6y ago
Legends of Caltech, page 69 has the story and a photograph (looking at my copy right now). It was a valve package plate on the Voyagers ink-stamped with “DEI/FEIF”.
29.
▲
by
StephanTLavavej
7y ago
And that's only quadratic growth, not exponential.
30.
▲
by
StephanTLavavej
7y ago
Dark mode is still incompatible with monospace code regions, as reported several times in the ApolloApp subreddit; I tried using Apollo yesterday but couldn’t get past this bug (as I read a lot of code on reddit). Please fix this and I’ll b
More ›