• 189 Posts
  • 393 Comments
Joined 1 year ago
cake
Cake day: July 29th, 2023

help-circle


  • lysdexic@programming.devOPMtoC++@programming.devNew features in C++26 [LWN.net]
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    3 days ago

    That’s perfectly fine. It’s a standardization process. Its goal is to set in stone a specification that everyone agrees to. Everything needs to line up.

    In the meantime, some compiler vendors provide their own contracts support. If you feel this is a mandatory feature, nothing prevents you from using vendor-specific implementations. For example, GCC has support for contracts since at least 2022, and it’s mostly in line with the stuff discussed in the standardization meetings.


  • You just referenced two languages that don’t have proper sum types. lol.

    You’re complained about “Proper HTTP implementations in proper languages”.

    I provided two concrete examples of two of the most popular and production-grade programming language ever developed.

    I can provide more.

    You then tried to weasel out by moving your goal post from “Proper HTTP implementations in proper languages” to “languages that don’t have proper sum types”.

    I won’t waste more of my time with you. Whatever you’re posting lacks relevance and does not justify any attention from anyone.


  • I would only recommend a monorepo if you’re a company with at least 5,000+ engineers and can dedicate significant time to internal infra.

    It’s funny because at least one FANG does not use monorepos and has no problem with them, in spite of being at the same scale or even perhaps larger than Facebook.

    I wonder why anyone would feel compelled to suggest adopting a monorepo in a setting that makes them far harder to use and maintain.



  • I’m inclined to interpret monorepos as an anti-pattern intended to mask away fundamental problems in the way an organization structures it’s releases and dependency management.

    It all boils down to being an artificial versioning constraint at the expense of autonomy and developer experience.

    Huge multinationals don’t have a problem in organizing all their projects as independent (and sometimes multiple) source code repositories per project. What’s wrong with these small one-bus software shops that fail to do that when they operate at a scale that’s orders of magnitude smaller?


  • lysdexic@programming.devOPMtoC++@programming.devNew features in C++26 [LWN.net]
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    3 days ago

    Still no contracts?

    In line with the release process for C++ standard specifications, where standards ship every 3 years but alternate between accepting new features and feature freeze releases, C++23 was the last release that was open to new features. This would mean C++26 is a feature freeze release following the new features introduced in C++23.






  • Proper HTTP implementations in proper languages utilize header-name enums for strict checking/matching (…)

    I don’t know what you are talking about.

    Java provides java.lang.Object.HttpHeaders, which is a constants class that provides static final String fields for the popular request and response headers.

    .NET does the exact same thing with it’s class Microsoft.Net.Http.Headers.HeaderNames.

    I can go on and on.



  • Also, TIL that the IETF deprecated the X- prefix more than 10 years ago. Seems like that one didn’t pan out.

    Can you elaborate on that? The X- prefix is supposedly only a recommendation, and intended to be used in non-standard, custom, ah-hoc request headers to avoid naming conflicts.

    Taken from https://datatracker.ietf.org/doc/html/rfc6648

    In short, although in theory the “X-” convention was a good way to avoid collisions (and attendant interoperability problems) between standardized parameters and unstandardized parameters, in practice the benefits have been outweighed by the costs associated with the leakage of unstandardized parameters into the standards space.

    I still work on software that extendively uses X- headers.



















  • ccache folder size started becoming huge. And it just didn’t speed up the project builds, I don’t remember the details of why.

    That’s highly unusual, and suggests you misconfigured your project to actually not cache your builds, and instead it just gathered precompiled binaries that it could not reuse due to being misconfigured.

    When I tried it I was working on a 100+ devs C++ project, 3/4M LOC, about as big as they come.

    That’s not necessarily a problem. I worked on C++ projects which were the similar size and ccache just worked. It has more to do with how you’re project is set, and misconfigurations.

    Compilation of everything from scratch was an hour at the end.

    That fits my usecase as well. End-to-end builds took slightly longer than 1h, but after onboarding ccache the same end-to-end builds would take less than 2 minutes. Incremental builds were virtually instant.

    Switching to lld was a huge win, as well as going from 12 to compilation 24 threads.

    That’s perfectly fine. Ccache acts before linking, and naturally being able to run more parallel tasks can indeed help, regardless of ccache being in place.

    Surprisingly, ccache works even better in this scenario. With ccache, the bottleneck of any build task switches from the CPU/Memory to IO. This had the nice trait that it was now possible to overcommit the number of jobs as the processor was no longer being maxed out. In my case it was possible to run around 40% more build jobs than physical threads to get a CPU utilization rate above 80%.

    I was a linux dev there, the pch’s worked, (…)

    I dare say ccache was not caching what it could due to precompiled headers. If you really want those, you need to configure ccache to tolerate them. Nevertheless it’s a tad pointless to have pch in a project for performance reasons when you can have a proper compiler cache.