/robowaifu/ - DIY Robot Wives

Advancing robotics to a point where anime catgrill meidos in tiny miniskirts are a reality

Days left: 15


JulayWorld fallback document - SAVE LOCALLY

JulayWorld onion service: bhlnasxdkbaoxf4gtpbhavref7l2j3bwooes77hqcacxztkindztzrad.onion

Max message length: 32768

Drag files to upload or
click here to select them

Maximum 5 files / Maximum size: 20.00 MB

More

(used to delete files and postings)


C++ General Robowaifu Technician 09/09/2019 (Mon) 02:49:55 No.12
C++ Resources general

The C++ programming language is currently the primary AI-engine language in use.

isocpp.org/get-started
https://archive.is/hp4JR

stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
https://archive.is/OHw9L

en.cppreference.com/w/
https://archive.is/gt73H

www.youtube.com/user/CppCon
https://archive.is/QGynC

BTW if you're new to C++ and you're stuck on Windows (either you can't or won't upgrade to Linux) then you can at least incorporate a good, open shell into your system to begin with so you can follow along. Start at this link, and if you have any questions just ask ITT:
www.msys2.org/
https://archive.fo/p3EUc
Edited last time by Chobitsu on 10/05/2019 (Sat) 20:16:32.
>>1460
>>1461
Hey, this is Robi. Wanna help me add support for different imageboards on https://gitgud.io/rb/MultiScraper ? I am trying to also add support for importing scraped threads.
>>1462
Oh hey there Robi. Sorry I missed this. Sure, but I'm not much of a dev outside of C++ tbh. If you think that would work then I'm your guy.
>>1462
Hey Robi, question. I've never run an IB before (or even installed one). Do you think I'll need an install of Lynxchan running to help out with this project?
191115 - v0.2b
--------------
-direct archival support now included for:
endchan.net
8kun.us

-add notification for new thread discovery
-add apostrophe handling in filenames
-patch bug with filename extension handling
-patch minor bug causing unnecessary rechecking of un-bumped threads
-add 'file empty' record similar to file 404 record (skips re-attempting later)
-add minor optimization when force-rechecking a thread's files
-extend DL timeout to 90 secs to better accommodate endchan's large filesizes
-add special check for MongoDB crash
-add thread's ID prefix to the 'file_404s.json' file
-add 'deleted' file download bypass
-patch minor bug w/ force re-checking of threads

https://files.catbox.moe/0y7z6j.xz
0b43b392ea2b69de1bb7d83c1c4714e473763629060c7f05f5dde4bd32a1dfa1 BUMP-0.2b.tar.xz


Since this is taking me longer to get the duplicate file management in place, I'll just put it off until a v0.2c release and go ahead and put what I have out there now, since endchan.net is now included and there's a couple of bugfixes that help alleviate some nuisance. Cheers.
191121 - v0.2c
--------------
-direct archival support now included for:
lainchan.org
arisuchan.jp
8kun.top

-add timeout error code 9001 - interim step towards better error correction
-extend DL timeout out to 120sec to pick up even longer downloads (good for TOR)
-add space handling in filenames
-make minor output message adjustments
-add somewhat better validation of 'catalog.json' files
-add facility for cleanly re-acquiring any accidentally deleted thread folders
f76855c247ea4243f5e3fb98b52a1ebdd4759e86d815de148e7d77f9d6e96495 BUMP-0.2c.tar.xz
https://files.catbox.moe/bvccj0.xz


Alright, I've decided to go ahead and make another subrelease earlier since 8kun.top seems to be working atm. I'll be doing a pretty significant revamping of the Page class' data management, so I'll hold off on the dupe files handling until then.
>>1523
Hmm, looks like that was a bit premature. Apparently VanwaTech's system allows browsers OK for 8kun.top, but is rejecting BUMP--probably all types of bots. Might need to play around with the useragent, oh well.

Sorry if I got anyone's hopes up what I get for not testing heh (it still works fine with 8kun's onion service jthnx5wyvjvzsxtu.onion, use torify).
Someone complained that they were interested in the software, but they were confused how to get everything set up to build BUMP. I created a INSTALL file for Ubuntu that I hope helps. If anything's unclear or you experience some difficulty with these instructions, I'd appreciate knowing about it, thanks. I'll include this file when I make the next release.

>Install.txt
Here are detailed setup instructions for BUMP from a clean install of Ubuntu 19.10:

1. Execute this command from a terminal:
sudo apt-get install meson ninja-build libcurl4-openssl-dev libfltk1.3-dev libjsoncpp-dev

-this will get you set up with required developer libraries

2. Clone and build juci++ (instructions located at):
https://gitlab.com/cppit/jucipp/blob/master/docs/install.md#debianlinux-mintubuntu

-installing this will get you set up with the basic latest dev environment and other rereqs,
not to mention being a powerful little FOSS C & C++ IDE.

3. Clone and build curlpp:
git clone https://github.com/JosephP91/curlcpp.git
cd curlcpp/ && mkdir build && cd build
cmake .. && make
sudo make install

4. May as well use Juci to build BUMP software since you have Juci now. From the directory
where you extracted the (inside) BUMP archive, run this from the terminal:
juci .

5. Inside Juci, compile and run the BUMP code:
Project > Compile and Run (Ctrl+Return)

-you should see an error about 'program argument error' from BUMP. These can be added under:
Project > Set Run Arguments
(for example):
bump julay.world ck

You should be all set to archive literally any board for every site included in the .sites.config
file. BUMP is pretty smart about figuring out what needs to be updated in future runs and only grabs
what's changed. Also, it will probably be easier to just run BUMP from the terminal afterwards tbh.
BTW there's a new /robowaifu/-oriented C++ & OpenGL project begun in the RW Simulator thread (just in case any C++ anons here missed it).
>>1814
I've been working on learning functional C++ code here's a simple example of the idea. int main() { vector<int> ints{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; auto even = [](int i) { return 0 == i % 2; }; auto square = [](int i) { return i * i; }; for (int i : ints | filter(even) | transform(square)) { cout << i << ' '; } cout << '\n'; } this outputs: 0 4 16 36 64 100 I really like this style of coding and I'm really glad ranges is finally in C++20. https://en.cppreference.com/w/cpp/ranges Until GCC 9.3 arrives, I'm just using Eric Niebler's library for now. code: https://privatebin.net/?e15accfb31d0132c#EW58fwas6hHJdr8AA8qgQuPHV18hbmtTJr1NZNJRZbim
heh for some reason private bin ditched the includes: #include <iostream> #include <vector> using std::cout; using std::vector; #include <range/v3/view/filter.hpp> #include <range/v3/view/transform.hpp> using namespace ranges; using views::filter; using views::transform;
>>1945 here's another toy example that demonstrates ranges lazy-evaluation: // lazyEvaluation.cpp #include <cstdio> #include <tuple> #include <range/v3/all.hpp> using namespace ranges; decltype(auto) pairs(const char* foo) { return views::zip_with([](int c, auto i) { return std::make_pair(c, i); }, views::c_str(foo), views::ints(0, unreachable)); } int main() { for (const auto [c, i] : pairs("ROBOWAIFU")) { printf("(%c,%i) ", c, i); } printf("\n\n"); } outputs: (R,0) (O,1) (B,2) (O,3) (W,4) (A,5) (I,6) (F,7) (U,8) the views::ints(0, unreachable) call is an iota-view from zero to infinity, but because of lazy evaluation it only returns the proper numbers of elements.
Open file (2.12 MB 849x1315 wg21-1990-2020.png)
The C++20 standard was finalized last month. I think it addresses a couple of key features that have long been missing, modules & coroutines. Modules are a fundamental game-changer for the entire C culture IMO. Coroutines have been done using C++ in one form or another for decades but always as some type of custom solution. Having them in the standard itself will help dismantle proprietary-only approaches, and will certainly improve concurrency in general. Personally, ranges are the biggest change to my own programming style so far, but it's not really something fundamental like modules, but rather more of a sophistication layered on top of Stepanov's breakthroughs. https://isocpp.org//blog/2020/02/bjarne-stroustrup-on-cpp20s-significance https://invidio.us/watch?v=03BtQljH2oA
>>1994 >The C++20 standard was finalized last month A significant number of committee members post on the r/cpp subreddit i know, w/e :^) I rendered a pdf of the page discussing the Prague meeting. old.reddit.com/r/cpp/comments/f47x4o/202002_prague_iso_c_committee_trip_report_c20_is/ there are also a number of important discussions going on in the working groups that will have a future impact in AI/ML & embedded using the standard C++ library, and therefore are important for the future of robowaifus. EG: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1708r2.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2072r0.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1709r2.pdf cheers.
>>1999 meant to add this link on the deterministic exceptions in c++ proposal. this need is a significant issue in the real-time kernel of a robowaifu, and will be a huge boon if adopted in the standard. https://www.research.ed.ac.uk/portal/files/78829292/low_cost_deterministic_C_exceptions_for_embedded_systems.pdf
>>1994 Here's a pretty nice item about C++20 ranges. I learned a few things. https://hannes.hauswedell.net/post/2019/11/30/range_intro/
>>2024 >main.cpp #include <taskflow/taskflow.hpp> // Cpp-Taskflow is header-only int main() { tf::Executor executor; tf::Taskflow taskflow; auto [A, B, C, D] = taskflow.emplace( []() { std::cout << "TaskA\n"; }, // task dependency graph []() { std::cout << "TaskB\n"; }, // []() { std::cout << "TaskC\n"; }, // +---+ []() { std::cout << "TaskD\n"; } // +---->| B |-----+ ); // | +---+ | // +---+ +-v-+ A.precede(B); // A runs before B // | A | | D | A.precede(C); // A runs before C // +---+ +-^-+ B.precede(D); // B runs before D // | +---+ | C.precede(D); // C runs before D // +---->| C |-----+ // +---+ executor.run(taskflow).wait(); return 0; } > meson.build project('taskflow', 'cpp') add_project_arguments('-std=c++2a', '-Wall', '-Wextra', language: 'cpp') cxx = meson.get_compiler('cpp') thrd_dep = cxx.find_library('pthread') executable('taskflow', 'main.cpp', dependencies : thrd_dep) >outputs TaskA TaskC TaskB TaskD
Open file (90.55 KB 882x679 juCi++_069.png)
Intel has sponsored the book now, so it's free for anyone interested in TBB (also opensauce now). https://link.springer.com/book/10.1007%2F978-1-4842-4398-5 https://github.com/oneapi-src/oneTBB
Open file (1.20 MB 6972x1583 performance.jpg)
>>2028 BTW, for anyone who's never dabbled into the incredibly complex world of concurrency and parallelization, this model's approach is remarkable in it's ease of use & resiliency. i haven't had a chance to profile anything with it just yet, but according to the published numbers in their paper, it's also notably higher performance than the two major parallelization/concurrency frameworks OpenMP & TBB.
>>2020 Once we get into a large system of complex dynamics and having to sort out in realtime lots and lots of signal needles inside noise haystacks, I may look into this libraries performance as an optimization. https://github.com/orlp/pdqsort
Open file (37.07 KB 673x454 pdqsort_perf_comp.png)
Another curated list of C++ libraries. The location itself of the list adds a fair measure of credence to the legitimacy of the selections. https://en.cppreference.com/w/cpp/links/libs
>>215 I realized I hadn't posted an updated a copy here since C++20 was voted in. So, I just personally rendered the typeset from the official TeX draft sources themselves https://github.com/cplusplus/draft , so this is literally as current atm as anywhere else. Read it right here on /robowaifu/ first nerds! :^) >Working Draft, Standard for Programming Language C++, 2020-05-15, 1'834pp
C++ Several C++20 features have been implemented: P1668R1, Permitting Unevaluated inline-assembly in constexpr Functions P1161R3, Deprecate a[b,c] P0848R3, Conditionally Trivial Special Member Functions P1091R3, Extending structured bindings P1143R2, Adding the constinit keyword P1152R4, Deprecating volatile P0388R4, Permit conversions to arrays of unknown bound P0784R7, constexpr new Concepts, including P0734R0, P0857R0, P1084R2, P1141R2, P0848R3, P1616R1, P1452R2 P1301R4, [[nodiscard("with reason")]] P1814R0, class template argument deduction for alias templates P1816R0, class template argument deduction for aggregates P0960R3, Parenthesized initialization of aggregates P1331R2, Allow trivial default initialization in constexpr contexts P1327R1, Allowing dynamic_cast and polymorphic typeid in constexpr contexts P0912R5, Coroutines (requires -fcoroutines) Several C++ Defect Reports have been resolved, e.g.: DR 1560, lvalue-to-rvalue conversion in ?: DR 1813, __is_standard_layout for a class with repeated bases DR 2094, volatile scalars are trivially copyable, DR 2096, constraints on literal unions DR 2413, typename in conversion-function-ids DR 2352, Similar types and reference binding DR 1601, Promotion of enumeration with fixed underlying type DR 330, Qualification conversions and pointers to arrays of pointers DR 1307, Overload resolution based on size of array initializer-list DR 1710, Missing template keyword in class-or-decltype New warnings: -Wmismatched-tags, disabled by default, warns about declarations of structs, classes, and class templates and their specializations with a class-key that does not match either the definition or the first declaration if no definition is provided. The option is provided to ease portability to Windows-based compilers. -Wredundant-tags, disabled by default, warns about redundant class-key and enum-key in contexts where the key can be eliminated without causing an syntactic ambiguity. G++ can now detect modifying constant objects in constexpr evaluation (which is undefined behavior). G++ no longer emits bogus -Wsign-conversion warnings with explicit casts. Narrowing is now detected in more contexts (e.g., case values). Memory consumption of the compiler has been reduced in constexpr evaluation. The noexcept-specifier is now properly treated as a complete-class context as per [class.mem]. The attribute deprecated can now be used on namespaces too. The ABI of passing and returning certain C++ classes by value changed on several targets in GCC 10, including AArch64, ARM, PowerPC ELFv2, S/390 and Itanium. These changes affect classes with a zero-sized subobject (an empty base class, or data member with the [[no_unique_address]] attribute) where all other non-static data members have the same type (this is called a "homogeneous aggregate" in some ABI specifications, or if there is only one such member, a "single element"). In -std=c++17 and -std=c++20 modes, classes with an empty base class were not considered to have a single element or to be a homogeneous aggregate, and so could be passed differently (in the wrong registers or at the wrong stack address). This could make code compiled with -std=c++17 and -std=c++14 ABI incompatible. This has been corrected and the empty bases are ignored in those ABI decisions, so functions compiled with -std=c++14 and -std=c++17 are now ABI compatible again. Example: struct empty {}; struct S : empty { float f; }; void f(S);. Similarly, in classes containing non-static data members with empty class types using the C++20 [[no_unique_address]] attribute, those members weren't ignored in the ABI argument passing decisions as they should be. Both of these ABI changes are now diagnosed with -Wpsabi.
>>3187 I neglected to list the improvments in libstdc++ Runtime Library (libstdc++) Improved experimental C++2a support, including: Library concepts in <concepts> and <iterator>. Constrained algorithms in <ranges>, <algorithm>, and <memory> (thanks to Patrick Palka). New algorithms shift_left and shift_right (thanks to Patrick Palka). std::span (thanks to JeanHeyd Meneide). Three-way comparisons in <compare> and throughout the library. Constexpr support in <algorithm> and elsewhere (thanks to Edward Smith-Rowland). <stop_token> and std::jthread (thanks to Thomas Rodgers). std::atomic_ref and std::atomic<floating point>. Integer comparison functions (cmp_equal, cmp_less etc.). std::ssize, std::to_array. std::construct_at, std::destroy, constexpr std::allocator. Mathematical constants in <numbers>. Support for RDSEED in std::random_device. Reduced header dependencies, leading to faster compilation for some code.
Codeplay has a Community Edition of their SYCL (single-source heterogeneous computing--ie, run your standard C++ code directly on GPUs) implementation. SYCL is an open standard controlled by Khronos. https://developer.codeplay.com/home/ https://www.khronos.org/sycl/
>>3248 I finally installed GCC10.1 today and this now works right out of the box: >muh_ranges.cpp #include <iostream> #include <ranges> #include <vector> using std::views::filter; using std::views::transform; int main() { std::vector ints{0, 1, 2, 3, 4, 5}; auto even = [](int i) { return 0 == i % 2; }; auto square = [](int i) { return i * i; }; for (int i : ints | filter(even) | transform(square)) { std::cout << i << ' '; } std::cout << std::endl; } >outputs: 0 4 16 All that needs to be done with your build file to enable this is simply to specify C++20 as the standard: >meson.build project('muh_ranges_tst', 'cpp') add_project_arguments('-std=c++20', '-Wall', '-Wextra', language: 'cpp') executable('muh_ranges_tst', 'muh_ranges.cpp') This has been a long wait and I'm pretty stoked tbh. While there are a lot of other improvements to C++20, ranges was the biggest one for me personally. This will literally change all my future C++ code for the better. Give it a couple more standard revs and it will probably be easier to read in most cases than even Python.
Open file (83.24 KB 865x637 juCi++_099.png)
>>3682 The dream is alive. :^)
>>3682 >>3693 I just found out you can integrate the ranges piping directly on the primary argument for the for_each() algo: #include <algorithm> #include <iostream> #include <ranges> #include <vector> using std::ranges::for_each; using std::ranges::sort; using std::views::filter; using std::views::transform; auto print = [](const auto e) { std::cout << e << ' '; }; auto even = [](const int i) { return 0 == i % 2; }; auto square = [](const auto i) { return i * i; }; int main() { std::vector ints{5, 7, 4, 2, 8, 6, 1, 9, 0, 3}; sort(ints); for_each(ints | filter(even) | transform(square), print); std::cout << std::endl; } >outputs: 0 4 16 36 64
Any professional C++ developers who have needed to solve determinate template specialization (at compile-time ofc), or have had to wade through 100+ long error messages in the past will appreciate C++20 concepts. You can use any of the builtin concepts, create your own, and also compose them: >muh_constraints.cpp // https://en.cppreference.com/w/cpp/language/constraints #include <concepts> #include <iostream> #include <type_traits> using uint = unsigned; template <class T> concept Integral = std::is_integral<T>::value; template <class T> concept SignedIntegral = Integral<T> && std::is_signed<T>::value; template <class T> concept UnsignedIntegral = Integral<T> && ! SignedIntegral<T>; // constrained C++20 function template template <SignedIntegral T> void z(T) { std::cout << "signed\n"; } // constrained C++20 function template template <UnsignedIntegral T> void z(T) { std::cout << "unsigned\n"; } int main() { z(1); z(uint(1)); std::cout << std::endl; } >outputs: signed unsigned
Edited last time by Chobitsu on 06/03/2020 (Wed) 14:33:41.
Normal functions and template functions can effectively be equivalent now in C++20. Consider a trivial GCD example. Though calculating a greatest common divisor can be tedious and error-prone for the non-maths types like me, the standard library provides a GCD function, but it's on you the programmer to ensure the arguments passed to it satisfy specific constraints beforehand, or the code is either undefined or ill-formed. Tn the past this maybe meant writing verbose tests and perhaps specializing template code, but with C++20 concepts, you can now combine constraints (such as Integral) with the auto keyword, and get template functions directly by just writing normal functions. This is a big step towards true unification of generic programming and standard programming. In the history of the language until now, these have generally been pretty distinct. Note the remark in the std::gcd, and how it's satisfied by the Integral constraint we created. >gcd_foo.cpp /*https://en.cppreference.com/w/cpp/numeric/gcd Computes the greatest common divisor of the integers m and n. Remarks If either M or N is not an integer type, or if either is (possibly cv-qualified) bool, the program is ill-formed. */ #include <iostream> #include <numeric> #include <type_traits> // C++20 concept template <typename T> concept Integral = std::is_integral<T>::value; using std::cout; // C++20 constrained (normal) function Integral auto muh_gcd(Integral auto m, Integral auto n) { return std::gcd(m, n); } int main() { cout << "gcd(1,0): " << muh_gcd(1, 0) << '\n'; cout << "gcd(-100,100): " << muh_gcd(-100, 100) << '\n'; cout << "gcd(10,100): " << muh_gcd(10, 100) << '\n'; cout << "gcd(1071, 462): " << muh_gcd(1071, 462) << '\n'; // ill-formed, and will be caught at compile-time with muh_gcd() // cout << "gcd(3.14,6.28): " << muh_gcd(3.14, 6.28) << '\n'; // cout << "gcd(true,false): " << muh_gcd(true, false) << '\n'; cout << std::endl; } >outputs: gcd(1,0): 1 gcd(-100,100): 100 gcd(10,100): 10 gcd(1071, 462): 21
>>3712 Again note, this is all generated template code in the end. These calls are pre-computed as constants at compile-time. No runtime costs. Multiply that by billions of items, and the value of normal_functions==generic_functions starts to come into focus.
Note that when using C++20 concepts, the C++ compiler will still properly select functions from the candidates just as normal. Consider an overload to add two parameters: #include <iostream> #include <string> #include <type_traits> template <typename T> concept Arithmetic = std::is_arithmetic<T>::value; using std::cout; // C++20 constrained function Arithmetic auto muh_add(Arithmetic auto A, Arithmetic auto B) { cout << "Arithmetic\t"; return A + B; } // C++17 generic function auto muh_add(auto A, auto B) { cout << "auto\t\t"; return A + B; } int main() { cout << "muh_add(6, 5): " << muh_add(6, 5) << '\n'; // ints cout << "muh_add(5.5, 5): " << muh_add(5.5, 5) << '\n'; // doubles std::string foo{"robo"}, bar{"waifu"}; cout << "muh_add(foo, bar): " << muh_add(foo, bar)<< '\n'; // strings cout << std::endl; } >outputs muh_add(6, 5): Arithmetic 11 muh_add(5.5, 5): Arithmetic 10.5 muh_add(foo, bar): auto robowaifu Of the 3 calls to muh_add(), for the first two the compiler chooses the Arithmetic constrained function (and each type uses the overloaded operator '+'). For the last one the compiler correctly determines that a std::string is not an Arithmetic type and finds the second, generic candidate. This function uses the overloaded operator '+' as well for concatenating the two strings.
>>3704 >>3712 >>3717 BTW, if any Anons want to dabble around with concepts, be aware these examples are merely expository-only, and not intended for production. Basically, don't roll-your-own when you don't have to. Even when you do, you should be composing the new concepts out of the official standard library ones. (see this list https://en.cppreference.com/w/cpp/concepts ) For example, there is already a std::integral concept in the C++20 standard. https://en.cppreference.com/w/cpp/concepts/integral
Curated C++ Performance List Maintained by Bartłomiej Filipek, whose no slouch in this domain himself. https://github.com/fenbf/AwesomePerfCpp
Bjarne just released a mini-synopsis of C++ over the last ~15yrs. 168p. >By 2006, C++ had been in widespread industrial use for 20 years. It contained parts that had survived unchanged since introduced into C in the early 1970s as well as features that were novel in the early 2000s. From 2006 to 2020, the C++ developer community grew from about 3 million to about 4.5 million. It was a period where new programming models emerged, hardware architectures evolved, new application domains gained massive importance, and quite a few well-financed and professionally marketed languages fought for dominance. How did C++ ś an older language without serious commercial backing ś manage to thrive in the face of all that? >This paper focuses on the major changes to the ISO C++ standard for the 2011, 2014, 2017, and 2020 revisions. The standard library is about 3/4 of the C++20 standard, but this paper’s primary focus is on language features and the programming techniques they support. The paper contains long lists of features documenting the growth of C++. Significant technical points are discussed and illustrated with short code fragments. In addition, it presents some failed proposals and the discussions that led to their failure. It offers a perspective on the bewildering flow of facts and features across the years. The emphasis is on the ideas, people, and processes that shaped the language. >Themes include efforts to preserve the essence of C++ through evolutionary changes, to simplify its use, to improve support for generic programming, to better support compile-time programming, to extend support for concurrency and parallel programming, and to maintain stable support for decades’ old code. >The ISO C++ standard evolves through a consensus process. Inevitably, there is competition among proposals and clashes (usually polite ones) over direction, design philosophies, and principles. The committee is now larger and more active than ever, with as many as 250 people turning up to week-long meetings three times a year and many more taking part electronically. We try (not always successfully) to mitigate the effects of design by committee, bureaucratic paralysis, and excessive enthusiasm for a variety of language fashions. >Specific language-technical topics include the memory model, concurrency and parallelism, compile-time computation, move-semantics, exceptions, lambda expressions, and modules. Designing a mechanism for specifying a template’s requirements on its arguments that is sufficiently flexible and precise yet doesn’t impose run-time costs turned out to be hard. The repeated attempts to design łconceptsž to do that have their roots back in the 1980s and touch upon many key design issues for C++ and for generic programming. >The description is based on personal participation in the key events and design decisions, backed by the thousands of papers and hundreds of meeting minutes in the ISO C++ standards committee’s archives. >--- Actually, this looks to be an addition to ACM's next HOPL, which is an important and relatively rare (the next HOPL will be only the 4th in the ACM's 70+ years) event. If so, and if I'm not entirely mistaken, then that puts Bjarne into the sole unique club of having 3 entries in HOPL. Along with his Turing Award that marks quite a legacy for his career.
Edited last time by Chobitsu on 06/20/2020 (Sat) 16:39:36.
>>3855 >Actually, this looks to be an addition to ACM's next HOPL, which is an important and relatively rare (the next HOPL will be only the 4th in the ACM's 70+ years) event. If so, and if I'm not entirely mistaken, then that puts Bjarne into the sole unique club of having 3 entries in HOPL. Along with his Turing Award that marks quite a legacy for his career. Both now confirmed. >"...With this paper, C++ becomes the first and only language to be presented three times at HOPL and I become the first and only person to present three times. HOPL happens every 15 years. The other papers are now accessible as the Proceedings of the ACM on Programming Languages, Volume 4, Issue HOPL, June 2020: https://dl.acm.org/toc/pacmpl/" http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2184r0.pdf
>>4116 final edit here. >
How are you supposed to run this on a microcontroller inside a robots head?
>>4123 Hey Anon, so we're kind of divided as a group about where to place the compute resources for a robowaifu. Some of us think we should keep the sensitive SBCs inside a shielded little 'breadbox' inside the robowaifu's chest to keep it safe from RF interference and physical shock/damage. Others of us think the biomemetic approach is best and want to put the SBCs inside the head. The little microcontrollers can (and will) be distributed around the robowaifu's body generally near where they are needed, and all networked together. Just fyi, we have a thread about these devices. >>16 >Single board computers & micro-controllers
>>648 Not sure why I didn't just post the book itself.
C++20 ranges has a nice & clean calling convention for binary_search() now: binary_search(haystack, needle) Be sure to sort your container first ofc, or it's undefined behavior. Here's a trivial usage example: #include <algorithm> #include <iostream> #include <vector> using std::cout; using std::vector; using std::ranges::binary_search; using std::ranges::sort; int main() { vector haystack{3, 5, 9, 4, 1}; sort(haystack); vector needles{1, 2, 3}; for (const auto needle : needles) { cout << "Searching for " << needle << '\n'; if (binary_search(haystack, needle)) cout << "Found " << needle << '\n'; else cout << "no dice!\n"; } }

Report/Delete/Moderation Forms
Delete
Report

Captcha (required for reports and bans by board staff)

no cookies?