Hacker Newsnew | past | comments | ask | show | jobs | submit | StephanTLavavej's commentslogin

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), it will be "in box" without the need to build our GitHub repo.

It will still be necessary to build the std.ixx source file (to produce std.ifc and std.obj for consumption; we will never ship prebuilt IFCs/OBJs for the standard modules). It takes maybe 3-5 seconds and doesn't need to be rebuilt until you change your compiler options or upgrade your toolset. Build system support for doing this automatically is a work in progress.

Although we have test coverage running that exercises every header of the Standard Library through `import std;`, we're still working on fixing various compiler bugs, especially in complicated scenarios (e.g. using Ranges through modules). My hope is that the experience will be solid by the time that VS 2022 17.5 is released for production.


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.


Sorry, got my Challenger and Apollo 13 price for failed part confused with each other.

So, yeah, how about building a rocket designed to send three humans to the moon, but failed because of some <$1 part?


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 && Secrets: https://docs.microsoft.com/en-us/events/goingnative-2012/stl...

GoingNative 2013: Don't Help The Compiler: https://docs.microsoft.com/en-us/events/goingnative-2013/don...

GoingNative 2013: rand() Considered Harmful: https://docs.microsoft.com/en-us/events/goingnative-2013/ran...

CppCon 2014: STL Features And Implementation Techniques: https://youtu.be/dTeKf5Oek2c

CppCon 2015: functional: What's New, And Proper Usage: https://youtu.be/zt7ThwVfap0

CppCon 2016: tuple: What's New, And How It Works: https://youtu.be/JhgWFYfdIho

CppCon 2018: Class Template Argument Deduction for Everyone: https://youtu.be/-H-ut6j1BYU

CppCon 2019: Floating-Point charconv: Making Your Code 10x Faster With C++17's Final Boss: https://youtu.be/4P_kbF0EbZM

CppCon 2020: C++20 STL Features: 1 Year of Development on GitHub: https://youtu.be/8kjRx8vo6y4

Pure Virtual C++ 2022: MSVC C++20/23 Update: https://youtu.be/DAl37n2XOwk


That's a way better list than what I had! Thanks! Think I'll watch the rand() talk tomorrow, I love (to hate on) rand.


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).


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 distance from the magnet's center.”


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(); // runtime coverage
        static_assert(test_is_even()); // compile-time coverage
This lets us run all test cases at both runtime and compiletime. (The static_assert performs constant evaluation, and if an assert within test_is_even would fail, it won’t be a constant expression.)


That's very cool, thank you for sharing!


> 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 between classic includes and named modules), and support for header units to the Standard Library. Compiler/library support is a work in progress (MSVC's STL, which I work on, is the furthest along - see https://github.com/microsoft/STL/issues/1694 for status), but header units are showing significant improvements in compiler throughput (build speed). This looks like `import <vector>;` in your source code (with significant build system changes to build vector as a header unit, producing vector.ifc and vector.obj).

There's a proposal under review for C++23 to add named modules for the Standard Library, see https://wg21.link/p2465r2 . If this is accepted, `import std;` (or `import std.compat;`) will be the one-line way to use the entire C++ Standard Library with (what we hope will be) even better compiler throughput.

The primary limitation of header units and especially named modules is macros: neither can be influenced by macros defined in the source file, and named modules can't emit macros at all. Thus, one will still need to `#include <cassert>` in addition to `import std;` if you want the `assert()` macro.


Still looking forward to a solution for _ITERATOR_DEBUG_LEVEL in release builds with modules, VS DevCommunity ticket does exist.

Currently it appears anyone that cares about bounds checking and iterator validation in release builds, has to keep using global module fragments.


I have the opposite problem. I can't use modules because I need _ITERATOR_DEBUG_LEVEL=0 in debug builds.

The standard library modules really need to be built as part of your projects build so that you can compile them however you want.


Either that, or be like MFC/ATL and provide a couple of pre-compiled versions for common workflows.


Wow, thanks, can't wait for this.

How hard will it for library writers to supply their libraries as modules?

Will the only requirement be to remove macros?


Can you expand on how Roll breaks down when the players are trying to win?


Produce-consume ends up not working for almost all starting conditions. A lot of tiles seem tuned for a game where players leave their dice around, particularly as goods on planets, but it turns out you don't really need more than 9 dice. Players spend much of the game fishing for 6-devs, especially 6-devs that reward the player for playing a bunch of devs. If you don't get those, you can try to win with the 6-devs that reward you for playing a bunch of planets, but it's tough. Random access to starting conditions that do something, cheap planets that give red dice, and dev-oriented 6-devs ends up feeling bad, since these tiles are so much better than the other tiles.

I didn't play with expansions because they aren't on the phone app. This might be unfair, because I'm comparing it to Race with expansions.


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 "Owned by me" filter so this isn't the end of the world.)


https://jakebinstein.com/blog/google-drive-remove-option-gra...

> The right-click menu option with the trash can symbol can’t be clicked, but dragging the file over to the trash can works just fine.


Thank you!


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.)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: