@aschoedl Profile picture

Arno Schoedl

@aschoedl

Software developer, speaker, runner and hobby pilot. Looking for smart developers for my team.

Similar User
C++ on Sea photo

@cpponsea

Core C++ photo

@corecpp

Rainer Grimm photo

@rainer_grimm

Andreas Fertig photo

@Andreas__Fertig

Mateusz Pusz photo

@mateusz_pusz

Chandler Carruth photo

@chandlerc1024

Conor Hoekstra photo

@code_report

Jason Turner photo

@lefticus

Bartlomiej Filipek photo

@fenbf

@mattgodbolt@hachyderm.io photo

@mattgodbolt

Michael Park photo

@mcypark

Björkus 'No time_t to Die' Dorkus photo

@__phantomderp

Gianni Forlastro photo

@mosquitoman81

Martin Moene photo

@MartinMoene

Damien Buhl photo

@daminetreg

Just gave my talk Text Formatting For a Future Range-Based Standard Library at #usingstdcpp. For those of you interested, here are the details on how to do custom formatting with the new C++20 std::format: wgml.pl/blog/formattin… We really need an easier way...


But T const&& is actually fine. It is an rvalue, telling us that "a" is temporary, and at the same time it is const, so prevents moving out of "b". tc::common_reference in our library does it like that, as well as CONDITIONAL, our alternative to operator?:


Let's go through all reference types and see why they are bad. We cannot use T& or T const& because it turns the "a" rvalue into an lvalue. We lose the ability to reason about lifetime. We cannot use T&& because that would potentially move out of "b", which we did not std::move.


If a and b are both variables of type T, what is the type of (true ? a : b)? In current C++, it is T&. Fine. What is the type of (true ? std::move(a) : b)? It is T, which is an unfortunate pessimization because it copies T. Is there a better alternative? I believe yes, T const&&.


C++ needs "upward" copy elision, eliding copies when placing objects into members of other objects. It would require an ABI change, because constructors would need to publish if they want some of their arguments directly placed into memory, at some offset to "this".


We just added the string formatting with ranges to more of our code. When using them pervasively, through nesting, you get large trees of objects, objects aggregating sub-objects, in turn aggregating sub-sub-objects etc. There is no good solution for constructing these trees.


Thank you everyone for listening to my cppcon talk last week. The slides are now online: think-cell.com/en/career/talk… I let you know when the video is there, too.


If you are at #cppcon, here is the registration page for my talk. I will talk about how our Range library extends nicely to string processing and formatting: cppcon2018.sched.com/event/7f6b6620… Or simply try out the library and let me know how it goes.


Together with my talk at #cppcon, we will publish a new version of our think-cell library: github.com/think-cell/ran… We decided to change to the Boost license, so it can be used in commercial projects.


I think there is a general lesson for API design here: If there is a well-established representation for some entity, support it. You can support more if you want, but not less.


Many HTTP query APIs take the headers as some sort of dictionary, for example MacOS, and do not offer passing the raw HTTP string representation. So in our MacOS abstraction layer, we must use a Spirit parser to take apart the string and pass it piece-meal to MacOS.


Short of flying non-stop, from Berlin to cppcon in Seattle, Icelandair with a layover in Keflavik is about as short as it gets, only 50 nm longer than the 4400 nm non-stop: gcmap.com/mapui?P=EDDT-B…. For comparison, London would add 280 nm to the journey, New York JFK 1150 nm.


Having to implement an OAuth2 client for Windows, I wonder when people say they are so much more productive in #Python or #Javascript than in C++, is that because the language in inherently more expressive, or are just the libraries more comprehensive?


My talk "Text Formatting For a Future Range-Based Standard Library" has been accepted to both @CppCon and @meetingcpp I will be talking about treating formatted numbers and other data as lazy text ranges, so they can be operated on with all the range tools we already have.


Brings some performance pessimization. Two possible solutions for the standard: allow operating on bitwise representations of types in constexpr context, even if the result is implementation-dependent, or allow overloading on constexpr.


Just changed the reference highwayhash implementation to be constexpr capable. Not difficult with C++17, just needed to replace all reinterpret_cast with bit-shifts.


In our use cases, the inefficiencies introduced by the simple work partitioning were more than compensated by savings in overhead for the work stealing, so the simpler parallel std::for_each is faster. Your mileage may vary.


We just checked out Visual Studio's parallel std::for_each implementation. Interestingly, it uses static work partitioning rather than the more complicated work stealing performed by Microsoft's older Concurrency Runtime.


So auto&& x=func() is fine, auto&& x=perfectforwarder(func()) is not. Very error-prone. Introduced a macro that creates some decay_if_necessary(decltype(expr)) x=expr that fixes the problem.


Loading...

Something went wrong.


Something went wrong.