The slide packs of the conference C++Now! 2012 are available:
https://github.com/boostcon/cppnow_presentations_2012

Some of those slides packs seems too much large for the GitHub blob serving interface. To solve this problem download them all from as zip here (large amount of stuff):
https://github.com/boostcon/cppnow_presentations_2012/downloads

Among those many (sometimes large) slides packs there is some good stuff. I think some of that stuff is interesting for D programmers too. I have chosen four of them.

----------------------------

"50 Boost C++ Libraries in 180 minutes", by Boris Schaling:

Among the Libraries shown, in Phobos I'd like the 12 libraries:

- Boost.Pool Memory management with an allocator based on a singleton. - Boost.Multiindex Create new containers which provide multiple interfaces to lookup items. - Boost.Bimap A ready-to-use container based on Boost.Multiindex with exactly two interfaces. - Boost.CircularBuffer A fixed-size container which overwrites items if you keep on inserting more (I'd like a dynamic version too of this). - Boost.DynamicBitset Works exactly like std::bitset except that the size can be set (and modified) at run-time (in Phobos I'd like a in-place-allocated fixed-size one too). - Boost.Flyweight Flyweight pattern: Sharing common data between objects to minimize memory usage. - Boost.Accumulators Containers which calculate new results whenever a new value is pushed into them. - Boost.Rational Use exact representations of rational numbers like 1/3 in C++. - Boost.Graph A library to solve problems like finding the shortest route between two subway stations. - Boost.Conversion Three cast operators for numbers and polymorphic types. - Boost.MinMax Find the minimum and maximum of two or multiple values with one function call. - Boost.Hash Classes and functions to return hash values and to build your own for user-defined types.

----------------------------

"Metaprogramming Applied to Numerical Problems - A Generic Implementation of Runge-Kutta Algorithms", by Mario Mulansky and Karsten Ahnert: this should be not hard to do in D, with less and simpler code.

----------------------------

"More Useful Computations in the Same Duration: Optimizing Embedded Hard Real-Time Code in C++", by Scott Schurr:

Page 46: #pragma no_alias Are we going to need something like that (or "restrict") in D too?


Page 55, Managing Code Bloat:

Maybe D should offer a built-in solution for this common C++ coding pattern:

Class TCB_impl {
    template<int chan> friend class TCB;
    inline void status(int chan) { ... }
    void source(int chan, int st) { ... }
};

template <int chan>
class TCB {
public:
    inline void status() { impl_.status(chan); }
    inline void source(int st) { impl_.start(chan, st); }
private:
    TCB_impl impl_;
};


Some time ago I suggested the attribute @templated(). If inside its () there are no variable names then that function/attribute is not templated, so it's like the functions/attributes of TCB_impl:


class TCB(int chan) {
public:
    void status() { status_impl(chan); }
    @templated() void status_impl(int chan) { ... }

    void source(int st) { source_impl(chan, st); }
    @templated() void source_impl(int chan, int st) { ... }
}


But maybe something better is possible:

class TCB(int chan) {
    @templated() immutable mchan = chan;
public:
    this() { this.mchan = chan; }
    @templated() void status() { /*uses mchan*/... }
    @templated() void source(int st) { /*uses mchan*/... }
}

----------------------------

"Now What?" by Sean Parent (Adobe).

Slide 29 (page 18), "Desktop Compute Power" shows that nowdays for some tasks GPU and vectorized code are much faster than regular sequential C++ code.


Slides 36 and 38:
That typical object oriented paradigms of using shared references to objects breaks down in a massively parallel environment
* Sharing implies either single threaded
* Or synchronization
To utilize the hardware we need to move towards functional, declarative, reactive, and value semantic programming No raw loops


Slide 40 (page 25) adds to slide 29: "Without addressing vectorization, GPGPU, and scalable parallelismW standard C++ is just a scripting system to get to the other 99% of the machine through other languages and libraries. Do we need such a complex scripting system?"

The same question is valid for D. It seems important.

Bye,
bearophile

Reply via email to