--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To post to this group, send email to c...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAJ_4DfSWF9%2BhsUQrf8nZbJebJF%2Bo-cZTNYfR4wUO7%3DWqYkxRxg%40mail.gmail.com.
One might expect there to be various types of internal classes added over time like StringPiece and URL classes.
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To post to this group, send email to c...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAHOzFDfaYA6o6g-%2B8htgP%3DT-ooUuuqUSYX8%2B2j0%3Dp9rgY8hFA%40mail.gmail.com.
I didn't realize it was out. I went to take a look and was disappointed that it included almost nothing interesting. I assume more stuff will be added over time.One might expect there to be various types of internal classes added over time like StringPiece and URL classes. Chrome has our own version of these and getting new variants will be confusing for everybody. Without really understanding the scope of what will be there, I'm reluctant to say up front we should allow its use.In some ideal world we would switch to the ABSL versions. But this is a tremendous amount of work, and in some cases there are different goals or historical reasons for certain behaviors (think URL classes).There is some stuff I'm interested in that I suspect will be added over time. It's possible we could take a case-by-case approach like Blink with base. I'm not technically sure how we would implement this. Like whether we would need to fork some files or if we could bring it in and efficiently use the parts we want.
Brett--On Tue, Sep 26, 2017 at 10:12 AM, 'Ryan Hamilton' via cxx <c...@chromium.org> wrote:--Howdy Folks,Now that abseil has launched, it would be great to be able to use this in Chromium. For QUIC and HTTP/2, in particular this would help facilitate code sharing.Is this on the radar? How can I help? :)Cheers,Ryan
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To post to this group, send email to c...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAJ_4DfSWF9%2BhsUQrf8nZbJebJF%2Bo-cZTNYfR4wUO7%3DWqYkxRxg%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To post to this group, send email to c...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CABiGVV-D8uNHvCt1FCMH-ekc7pWh2RJK%2BrTdiPZz%2BX2RxYWuCA%40mail.gmail.com.
On Tue, Sep 26, 2017 at 1:25 PM, Brett Wilson <bre...@chromium.org> wrote:I didn't realize it was out. I went to take a look and was disappointed that it included almost nothing interesting. I assume more stuff will be added over time.One might expect there to be various types of internal classes added over time like StringPiece and URL classes. Chrome has our own version of these and getting new variants will be confusing for everybody. Without really understanding the scope of what will be there, I'm reluctant to say up front we should allow its use.In some ideal world we would switch to the ABSL versions. But this is a tremendous amount of work, and in some cases there are different goals or historical reasons for certain behaviors (think URL classes).There is some stuff I'm interested in that I suspect will be added over time. It's possible we could take a case-by-case approach like Blink with base. I'm not technically sure how we would implement this. Like whether we would need to fork some files or if we could bring it in and efficiently use the parts we want.I was thinking maybe we could add it to third_party but ban including any headers from it with PRESUBMIT, and then build a whitelist for each thing similar to C++11 library things.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAHtyhaTv%2Bc80ti4RCSBssu9LLk_zstCA4fmHaDtsmt21ku%3DBNg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To post to this group, send email to c...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CABiGVV_%3Ddvwr95580OqAYYMBKi9owWs4Su%2BR3%2B7vd1i37n7vHg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CACuR13e56X9PbCZFackO-R3buoef--U4ODnMHg9V5KMkD1KMnw%40mail.gmail.com.
| Karl Wiberg | | Software Engineer | | kwi...@google.com | | +46 70 696 1024 |
StrCat and StrAppend look nice as well. Maybe it's just me, but I find string concatenation to be a bit cumbersome at the moment. For quick one off operations there is std::to_string, but it is currently still in the "To Be Discussed" section of our C++11 styleguide and comes with it's own performance drawbacks: https://groups.google.com/a/chromium.org/d/msg/cxx/H2uAxR86N_g/YxabMC6nCgAJ For more sophisticated operations we have base::StringPrintf, but given its C based API it is a bit awkward to use when trying to concatenate std::strings. For more information Googlers can see C++ Tip of the Week #3. Non-Googlers hopefully will find it here soon: https://abseil.io/tips/
On the matter of string_view and StringPiece16, C++17 comes with a std::basic_string_view, at which point we could replace base::StringPiece with std::string_view and base::StringPiece16 with either std::u16string_view or a custom implementation of std::basic_string_view. I suggest we wait for C++17 instead of trying to adopt absl::string_view in the mean time. While we are on the topic of 16-bit strings: Are there significant differences between the character traits of base::char16 and std::char16_t that would prevent us today from simply typedeffing base::string16 to std::u16string?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/d34b1923-e147-462b-b84f-cc9cf6253377%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAF3XrKpVnfawiVT-Ojuz3B2qFThbMn9-QCvKZ-5zBb%3Dtuxa4_Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CABWS%2BBwOBjXPYoC9tAcstNSrRyBdzsvw8dOGyzWe%2BybWV7efNg%40mail.gmail.com.
Don’t all of our compilers (or standard libraries) support string_view now anyway?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CACuR13cbRYBQ09R1M%2Bh3BcdNwxG4ufYVv1Z9iJiNJPvLHJ-M%3Dg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAF8qwaACuu8biVOj94Os_EF5woRj0Mnjni2Vs_SO8-BT8qUU%2BQ%40mail.gmail.com.
Well said.WebRTC can't use //base at all—we can't depend on anything in Chromium—so the situation we've ended up with is that we've manually copied various odds and ends from //base into our tree, and in general not kept them up to date, because importing them is a lot of work, because //base isn't a proper library. Abseil on the other hand is a proper library, which we can keep up to date without much effort.We're primarily looking to use Abseil internally in WebRTC, but some Abseil stuff will end up in our API—e.g. absl::optional, absl::span, that sort of thing—but this shouldn't be much of a problem for Chromium. Chromium code used to have to translate from base::scoped_ptr to rtc::scoped_ptr before we all switched to std::unique_ptr, and Chromium code still has to use rtc::scoped_refptr (instead of base::scoped_refptr) when talking to us. Adding Abseil types to the mix will not really cause any new problems, and may actually get rid of problems by enabling Chromium and WebRTC to converge on their type use. For example, right now Chromium maintains its own base::optional, and WebRTC has its rtc::Optional, but we could both use absl::optional—less maintenance and better interop.
SPDY, QUIC (not all of //net, but the core bits of those two), and WebRTC all are used in contexts outside of Chromium and can't depend on //base. They already must carefully handle the interactions across Chromium code. Take a look at net/quic/platform.BoringSSL is in a similar boat. We even have our own random std::span implementation right now. The certificate verifier library in //net/cert will ultimately get moved into BoringSSL (this is necessary even for Chromium because WebRTC can't depend on //net), at which point all its //base dependencies will need to be severed and replaced with Abseil.You're right that API boundaries are still a pain, though much fewer of those types would actually be visible across API boundaries. Ultimately, I think we want Chromium to migrate to absl/STL versions of things like string_view, span, etc.,
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAF8qwaACuu8biVOj94Os_EF5woRj0Mnjni2Vs_SO8-BT8qUU%2BQ%40mail.gmail.com.
(I agree with everything jbroman says here.)On Thu, Feb 22, 2018 at 1:52 PM, David Benjamin <davi...@chromium.org> wrote:SPDY, QUIC (not all of //net, but the core bits of those two), and WebRTC all are used in contexts outside of Chromium and can't depend on //base. They already must carefully handle the interactions across Chromium code. Take a look at net/quic/platform.BoringSSL is in a similar boat. We even have our own random std::span implementation right now. The certificate verifier library in //net/cert will ultimately get moved into BoringSSL (this is necessary even for Chromium because WebRTC can't depend on //net), at which point all its //base dependencies will need to be severed and replaced with Abseil.You're right that API boundaries are still a pain, though much fewer of those types would actually be visible across API boundaries. Ultimately, I think we want Chromium to migrate to absl/STL versions of things like string_view, span, etc.,Why wouldn't we use the C++ stdlib types instead?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAMGbLiGk_Z1C3G0VM%2BiGrAW2egyt2w%3D%2BDi-ODU7ghe94rMwSJg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAF8qwaAEoFOd5oMJEPZEHb%3DvFdML4bT_7A%3DF-VDpYN614Y-aVQ%40mail.gmail.com.
(I agree with everything jbroman says here.)
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAHtyhaTp4M0ovbbt4wqy1MuzeMe4-fxsLmNRpv187%3DwhKmai2Q%40mail.gmail.com.
Even if we did DEPS checks, I think it'd be easy for something like absl::optional to leak out and be used in code not dealing with //net or WebRTC due to things leaking from headers. Is it worth explicitly documenting anywhere (in README.chromium or in something similar to chromium-cpp.appspot.com) what the expectations around using constructs in absl are?
On Thu, Feb 22, 2018 at 2:38 PM, Nico Weber <tha...@chromium.org> wrote:(I agree with everything jbroman says here.)+1 from me as well.It sounds like implementation wise- DEPS to absl as a whole would come with a -base pairing so they don't use both.- Up in src/DEPS we would -absl and then whitelist headers if/as transitioning things out of base.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAHtyhaTp4M0ovbbt4wqy1MuzeMe4-fxsLmNRpv187%3DwhKmai2Q%40mail.gmail.com.
On Thu, Feb 22, 2018 at 12:43 PM, <dan...@chromium.org> wrote:On Thu, Feb 22, 2018 at 2:38 PM, Nico Weber <tha...@chromium.org> wrote:(I agree with everything jbroman says here.)+1 from me as well.It sounds like implementation wise- DEPS to absl as a whole would come with a -base pairing so they don't use both.- Up in src/DEPS we would -absl and then whitelist headers if/as transitioning things out of base.How would we prevent random directories from adding +absl?
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To post to this group, send email to c...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/72c45469-68e8-4be5-935c-72fdea3df80e%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAPXR0RQeRZrJgW0dKCRt1NHaHpY_LJeRD%2B2VN0pW3XpGgSWKEw%40mail.gmail.com.
Bumping this up, since Abseil recently released their SwissTable implementation to GitHub [Blog, Code]. Given that we currently try to avoid std::unordered_ containers, this might be interesting for us. However, we definitely should do a careful performance and memory / binary size analysis, similarly to what brettw@ already did.
Additionally, there are other library features that might be interesting to us:
absl::optional: This is already used in WebRTC, and adopting it in base would allow us to drop our own base::Optional implementation and make interfacing between Chromium and WebRTC easier. Furthermore, this will make adoption of std::optional easier once we have C++17.
absl::variant: Modeled after std::variant and quite powerful. Adopting this would simplify the implementation of base::Value quite a bit, and it was also featured in the Promises for Chromium prototype. Due to the heavy use of templates there are some code-bloat concerns with variant, which is why we probably want to restrict usages of this to //base for now.
Other features listed by jbroman@ above, which would simplify some of the implementations found in //base/stl_util.h and //base/template_util.h.
I suggest we allow some of the abseil features in //base, exporting them in the base:: namespace for client code to use. Also we would discuss on a case-by-case basis what exactly we will expose, similarly to how we discuss adoption of new STL features. WDYT?
Cheers,
Jan
Jan Wilken Dörrie
Software Engineer
jdoe...@google.com
+49 89 839300973
Google Germany GmbH
Erika-Mann-Straße 33
80636 München
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.
This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.
Bumping this up, since Abseil recently released their SwissTable implementation to GitHub [Blog, Code]. Given that we currently try to avoid std::unordered_ containers, this might be interesting for us. However, we definitely should do a careful performance and memory / binary size analysis, similarly to what brettw@ already did.
Additionally, there are other library features that might be interesting to us:
absl::optional: This is already used in WebRTC, and adopting it in base would allow us to drop our own base::Optional implementation and make interfacing between Chromium and WebRTC easier. Furthermore, this will make adoption of std::optional easier once we have C++17.
absl::variant: Modeled after std::variant and quite powerful. Adopting this would simplify the implementation of base::Value quite a bit, and it was also featured in the Promises for Chromium prototype. Due to the heavy use of templates there are some code-bloat concerns with variant, which is why we probably want to restrict usages of this to //base for now.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CALB5StadEaDapOus7muSpjXZty7j%2Bda1r4E2FE_NxNQ2vvCe8w%40mail.gmail.com.
Bumping this up, since Abseil recently released their SwissTable implementation to GitHub [Blog, Code]. Given that we currently try to avoid std::unordered_ containers, this might be interesting for us. However, we definitely should do a careful performance and memory / binary size analysis, similarly to what brettw@ already did.
Additionally, there are other library features that might be interesting to us:
absl::optional: This is already used in WebRTC, and adopting it in base would allow us to drop our own base::Optional implementation and make interfacing between Chromium and WebRTC easier. Furthermore, this will make adoption of std::optional easier once we have C++17.
The listed reasons for using absl in base sound fairly small to me at this point, so I'd probably suggest waiting until there's more upside.
On Thu, Oct 4, 2018 at 10:55 AM Jeremy Roman <jbr...@chromium.org> wrote:On Thu, Oct 4, 2018 at 6:00 AM Jan Wilken Dörrie <jdoe...@chromium.org> wrote:Bumping this up, since Abseil recently released their SwissTable implementation to GitHub [Blog, Code]. Given that we currently try to avoid std::unordered_ containers, this might be interesting for us. However, we definitely should do a careful performance and memory / binary size analysis, similarly to what brettw@ already did.
Indeed. In particular, I thought SwissTable was optimized primarily for x86_64 (for datacentre use), but we have ARM/ARM64 platforms as well.
Additionally, there are other library features that might be interesting to us:
absl::optional: This is already used in WebRTC, and adopting it in base would allow us to drop our own base::Optional implementation and make interfacing between Chromium and WebRTC easier. Furthermore, this will make adoption of std::optional easier once we have C++17.
This strikes me as a good place to start if we want to rely on Abseil more, since base::Optional already aims to be compatible with std::optional, much like absl::optional.
absl::variant: Modeled after std::variant and quite powerful. Adopting this would simplify the implementation of base::Value quite a bit, and it was also featured in the Promises for Chromium prototype. Due to the heavy use of templates there are some code-bloat concerns with variant, which is why we probably want to restrict usages of this to //base for now.
On Thu, Oct 4, 2018 at 1:45 PM Nico Weber <tha...@chromium.org> wrote:The listed reasons for using absl in base sound fairly small to me at this point, so I'd probably suggest waiting until there's more upside.I'd personally like to see us alias base::Optional to absl's so we can stop maintaining our copy. (I don't have a well formed opinion on keeping it aliased vs using absl:: directly thereafter yet.)
On Thu, Oct 4, 2018 at 10:55 AM Jeremy Roman <jbr...@chromium.org> wrote:On Thu, Oct 4, 2018 at 6:00 AM Jan Wilken Dörrie <jdoe...@chromium.org> wrote:Bumping this up, since Abseil recently released their SwissTable implementation to GitHub [Blog, Code]. Given that we currently try to avoid std::unordered_ containers, this might be interesting for us. However, we definitely should do a careful performance and memory / binary size analysis, similarly to what brettw@ already did.
Indeed. In particular, I thought SwissTable was optimized primarily for x86_64 (for datacentre use), but we have ARM/ARM64 platforms as well.I look forward to learning more about the performance of SwissTable!Additionally, there are other library features that might be interesting to us:
absl::optional: This is already used in WebRTC, and adopting it in base would allow us to drop our own base::Optional implementation and make interfacing between Chromium and WebRTC easier. Furthermore, this will make adoption of std::optional easier once we have C++17.
This strikes me as a good place to start if we want to rely on Abseil more, since base::Optional already aims to be compatible with std::optional, much like absl::optional.
absl::variant: Modeled after std::variant and quite powerful. Adopting this would simplify the implementation of base::Value quite a bit, and it was also featured in the Promises for Chromium prototype. Due to the heavy use of templates there are some code-bloat concerns with variant, which is why we probably want to restrict usages of this to //base for now.
If we can simplify base::Value /and/ reduce binary size then that seems like a good motivation to me. If we can't get both then maybe we should steer clear of this particular widget for now.
On Thu, Oct 4, 2018 at 10:56 AM <dan...@chromium.org> wrote:On Thu, Oct 4, 2018 at 1:45 PM Nico Weber <tha...@chromium.org> wrote:The listed reasons for using absl in base sound fairly small to me at this point, so I'd probably suggest waiting until there's more upside.I'd personally like to see us alias base::Optional to absl's so we can stop maintaining our copy. (I don't have a well formed opinion on keeping it aliased vs using absl:: directly thereafter yet.)My team just started using C++17. I wonder how far away it is for Chromium? My impression is it's blocked on Nacl or something, but once that's unblocked it might be relatively faster to move to 14 and 17 than it has been to update C++ versions. If true, it might be better to wait.
On Thu, Oct 4, 2018 at 10:55 AM Jeremy Roman <jbr...@chromium.org> wrote:On Thu, Oct 4, 2018 at 6:00 AM Jan Wilken Dörrie <jdoe...@chromium.org> wrote:Bumping this up, since Abseil recently released their SwissTable implementation to GitHub [Blog, Code]. Given that we currently try to avoid std::unordered_ containers, this might be interesting for us. However, we definitely should do a careful performance and memory / binary size analysis, similarly to what brettw@ already did.
Indeed. In particular, I thought SwissTable was optimized primarily for x86_64 (for datacentre use), but we have ARM/ARM64 platforms as well.I look forward to learning more about the performance of SwissTable!Additionally, there are other library features that might be interesting to us:
absl::optional: This is already used in WebRTC, and adopting it in base would allow us to drop our own base::Optional implementation and make interfacing between Chromium and WebRTC easier. Furthermore, this will make adoption of std::optional easier once we have C++17.
This strikes me as a good place to start if we want to rely on Abseil more, since base::Optional already aims to be compatible with std::optional, much like absl::optional.
absl::variant: Modeled after std::variant and quite powerful. Adopting this would simplify the implementation of base::Value quite a bit, and it was also featured in the Promises for Chromium prototype. Due to the heavy use of templates there are some code-bloat concerns with variant, which is why we probably want to restrict usages of this to //base for now.
If we can simplify base::Value /and/ reduce binary size then that seems like a good motivation to me. If we can't get both then maybe we should steer clear of this particular widget for now.Also watch out because any public-facing changes to base::Value take *forever*.Brett
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To post to this group, send email to c...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CABiGVV9fHLxHLenNr8wify%3DxurzFoojjxcUwM_456KhhBTCrLg%40mail.gmail.com.
On Thu, 4 Oct 2018 at 19:08, Brett Wilson <bre...@chromium.org> wrote:On Thu, Oct 4, 2018 at 10:56 AM <dan...@chromium.org> wrote:On Thu, Oct 4, 2018 at 1:45 PM Nico Weber <tha...@chromium.org> wrote:The listed reasons for using absl in base sound fairly small to me at this point, so I'd probably suggest waiting until there's more upside.I'd personally like to see us alias base::Optional to absl's so we can stop maintaining our copy. (I don't have a well formed opinion on keeping it aliased vs using absl:: directly thereafter yet.)My team just started using C++17. I wonder how far away it is for Chromium? My impression is it's blocked on Nacl or something, but once that's unblocked it might be relatively faster to move to 14 and 17 than it has been to update C++ versions. If true, it might be better to wait.Migrating to C++17 would be ideal, but I'm under the impression we're blocked until NaCl is depreciated which will be several years :(
On Fri, Oct 5, 2018 at 3:54 AM Alex Clarke <alexc...@google.com> wrote:On Thu, 4 Oct 2018 at 19:08, Brett Wilson <bre...@chromium.org> wrote:On Thu, Oct 4, 2018 at 10:56 AM <dan...@chromium.org> wrote:On Thu, Oct 4, 2018 at 1:45 PM Nico Weber <tha...@chromium.org> wrote:The listed reasons for using absl in base sound fairly small to me at this point, so I'd probably suggest waiting until there's more upside.I'd personally like to see us alias base::Optional to absl's so we can stop maintaining our copy. (I don't have a well formed opinion on keeping it aliased vs using absl:: directly thereafter yet.)My team just started using C++17. I wonder how far away it is for Chromium? My impression is it's blocked on Nacl or something, but once that's unblocked it might be relatively faster to move to 14 and 17 than it has been to update C++ versions. If true, it might be better to wait.Migrating to C++17 would be ideal, but I'm under the impression we're blocked until NaCl is depreciated which will be several years :(Discussions are ongoing, but yes, at the moment it looks like it's going to be a while.