Tomas has provided

]]>

**See part 1: Name Lookup** **See part 2: Template Argument Deduction **

]]>

Auto-vectorization is a powerful compiler feature. In VS 12 it represents outstanding engineering by a few folks on the Microsoft Visual C++ compiler team. The engineering leader of this team is

In the first part of this n-part series, Jim introduces the series, describes improvements to the VC++ 2012 compilers, shares, introduces auto-vectorization, demos a few apps that benefit from compiler-optimized performance via auto-vectorization, and begins to describe how/when user code is vectorized (typical and atypical patterns alike - more to come as the lectures progress, of course). Over the course of this series, Jim will present both the practical and theoretical foundations of auto-vectorization.

(You can learn more about auto-vectorization in VC++ by reading **the blog posts by Jim Hogg**, another member of the VC++ compiler team working on this technology.)

Tune in. Ask questions. Learn.

Remember Herb Sutter's great GotW post (#30, to be precise) on Name Lookup? Here's the problem from that post, to refresh your memory (Thanks to Herb for providing information like this on GotW!):

*In the following code, which functions are called? Why? Analyze the implications?*

namespace A { struct X; struct Y; void f( int ); void g( X ); } namespace B { void f( int i ) { f( i ); // which f()? } void g( A::X x ) { g( x ); // which g()? } void h( A::Y y ) { h( y ); // which h()? } }

We recommend you watch this entire episode before playing around with Herb's sample above (and don't read the GotW answer, either! That's cheating. Learn from STL. He's an outstanding teacher, as you know.)

Please supply feedback on this thread, especially as it relates to what you'd like STL to focus on in subsequent episodes. For **part 2, STL will focus on** **Template Argument Deduction**.

Tune in. Enjoy. Learn.

This will be a 2-part series with an option for more depending on how many questions you ask.

In **part 2**, you'll learn about **File IO, Controlling the stream buffer, GS handler, C++ exceptions, CRT and Windows APIs, CRT floating point support**.**->Slides for this presentation**

**->Source code for the demos in this presentation**

Tune in. Enjoy. Learn.

See **part 1**

Graham's goal here is to share technical knowledge and insights that span programming domains and skill sets—an

Enjoy. Learn!

From Dr. Hutton:

*Streams, or infinite sequences, have many applications in programming, and can naturally be defined using recursive equations. But how do we ensure that such equations make sense, i.e. that they actually produce well-defined streams? In this talk, Graham Hutton presents a new approach to this problem, based upon the topological notion of contractive functions on streams. This talk is aimed at a general audience, and doesn't require special knowledge of topology or functional programming.*

Lecture Materials:

Slides: http://www.cs.nott.ac.uk/~gmh/contractive.ppt

Paper: http://www.cs.nott.ac.uk/~gmh/contractive.pdf

Speaker Bio:

**Graham Hutton** is Professor of Computer Science at the University of Nottingham, where he co-leads the Functional Programming Lab. His research interests are in formal reasoning about program correctness and efficiency, with an emphasis on functional languages such as Haskell. He is also the author of a best-selling Haskell textbook, for which he's recorded **associated Channel 9 lectures** that have received more than 600,000 downloads.

Here, you'll learn about **memory leak detection (CRT debug heap)**, **unhandled exceptions**, **assert and error reporting**, **CRT entry points**, **CRT support for Unicode**, **SBCS and MBCC.****->Slides for this presentation**

**->Source code for the demos in this presentation**

Tune in. Enjoy. Learn.

See **part 2**.

The fundamental concept here is the monad, and Greg has a novel and conceptually simplified explanation of what a monad is and why it matters. This is a very important and required first step in the series since the whole of it is about the application of monadic composition to real world web development.

In **part 4, **Greg primarily focuses on the idea that *a monad is really an API—*a view into the organization of data and control structures, not those structures themselves. In OO terms, it's an *interface*. To make this point concrete, Greg explores one of the simplest possible data structures supporting at least two different, though consistent, interpretations of the same API. The structure used, Conway's partisan games, turns out to be tailor-made for this investigation. Not only does this data structure have the requisite container-like shape, it provides opportunities to see just what's necessary in a container to implement the monadic interface.

Running throughout the presentation is a more general comparison of reuse between an OO approach and a more functional one. When the monadic API is "mixed into" the implementing structure, we get less reuse than when the implementing structure is passed as a type parameter. Finally, doing the work puts us in a unique position to see not just how to generalize Conway's construction *monadically*, but also the underlying pattern that allows the generalization to suggest itself.**Source code for the Conway game****Slides for this presenation**

**Advanced STL **covers the gory details of the STL's implementation -> you will therefore need to be versed in the basics of STL, competent in C++ (of course), and be able to pay attention! Stephan is a great teacher and we are so happy to have him on Channel 9—the only place you'll find this level of technical detail regarding the internals of the STL. There are no books. There are no websites. This is Stephan taking us into what is uncharted territory for most, even those with a more advanced STL skill set.

This is a *very* special episode—it was driven by **you**!

In Part 5, Niner KerrekSB commented that a great topic for this advanced series would be developing a generic mechanism for printing out STL containers (like a vector of ints). Then Sven Groot helped out with his usual brilliance. I love this Niner interaction!

You got STL to lecture on this stuff! That is HUGE

In fact, STL was so impressed that he decided to try it out himself and see how generic he could make it. He uses only those STL features available in VC10 SP1 (for example, *variadic templates* are not used in his solution because the feature is not implemented in VC 2010 SP1...).

What did Stephan come up with? **Get STL's PrettyPrinter implementation**, then watch this great episode to learn the details behind the code. Thanks STL, KerrekSB, and Sven Groot for an excellent exercise!

[Advanced STL]

Part 1 (shared_ptr - type erasure)

Part 2 (equal()/copy() - algorithm optimizations)

Part 3 (_ITERATOR_DEBUG_LEVEL, #pragma detect_mismatch, and /d1reportSingleClassLayout)

Part 4 (rvalue references v2.1 and associative container mischief)

Part 5 (deduplicator, using Boost.Bimap/Filesystem/ScopeExit) - see Stephan's deduplicate.cpp

Part 6 (container pretty printer) - see Stephan's pretty_printer.cpp

**Watch STL's great ****introductory series on the STL**

**Advanced STL **covers the gory details of the STL's implementation -> you will therefore need to be versed in the basics of STL, competent in C++ (of course), and be able to pay attention! Stephan is a great teacher and we are so happy to have him on Channel 9—the only place you'll find this level of technical detail regarding the internals of the STL. There are no books. There are no websites. This is Stephan taking us into what is uncharted territory for most, even those with a more advanced STL skill set.**In this 5th part of the n-part series**, STL digs into **the Boost Library (http://www.boost.org). In his words, it's an open source, super quality, community-driven STL++. Stephan will walk you through a sample application from end to end, using boost.**

[Advanced STL]

Part 1 (shared_ptr - type erasure)

Part 2 (equal()/copy() - algorithm optimizations)

Part 3 (_ITERATOR_DEBUG_LEVEL, #pragma detect_mismatch, and /d1reportSingleClassLayout)

Part 4 (rvalue references v2.1 and associative container mischief)

Part 5 (deduplicator, using Boost.Bimap/Filesystem/ScopeExit) - see Stephan's deduplicate.cpp

Part 6 (container pretty printer) - see Stephan's pretty_printer.cpp

]]>**Advanced STL **covers the gory details of the STL's implementation -> you will therefore need to be versed in the basics of STL, competent in C++ (of course), and be able to pay attention! Stephan is a great teacher and we are so happy to have him on Channel 9—the only place you'll find this level of technical detail regarding the internals of the STL. There are no books. There are no websites. This is Stephan taking us into what is uncharted territory for most, even those with a more advanced STL skill set.**In this 4th part of the n-part series**, STL digs into **rvalue references, perfect forwarding **and **associative containers **(set, map, etc).

[Advanced STL]

Part 1 (shared_ptr - type erasure)

Part 2 (equal()/copy() - algorithm optimizations)

Part 3 (_ITERATOR_DEBUG_LEVEL, #pragma detect_mismatch, and /d1reportSingleClassLayout)

Part 4 (rvalue references v2.1 and associative container mischief)

Part 5 (deduplicator, using Boost.Bimap/Filesystem/ScopeExit) - see Stephan's deduplicate.cpp

Part 6 (container pretty printer) - see Stephan's pretty_printer.cpp

]]>This is the **third and final part **in our introductory series of lectures exploring the fundamental logical construct that powers all that we do as software engineers—the *algorithm*.

In part 3, Dr. Gurevich teaches us about **bounded complexity and the axiomatic definition of sequential algorithms**.

Find some time to watch this. You'll be learning about algorithms from one of the world's premiere minds in the science of logic and algorithms. In this lecture, Yuri references a few of his academic papers, which you can find **here.**

**Thank you, Yuri**, for taking the time to share your extensive knowledge and gentle, kind spirit with Niner Nation. We all really appreciate it! Thanks, too, to **Wes Dyer **and **Bart De Smet** for being our live audience for this lecture and asking **great **questions.

There are two STLs: the *Standard Template Library* and *Stephan T. Lavavej* You will get to know a lot about each STL over the course of these lectures.**Advanced STL **covers the gory details of the STL's implementation -> you will therefore need to be versed in the basics of STL, competent in C++ (of course), and be able to pay attention! Stephan is a great teacher and we are so happy to have him on Channel 9—the only place you'll find this level of technical detail regarding the internals of the STL. There are no books. There are no websites. This is Stephan taking us into what is uncharted territory for most, even those with a more advanced STL skill set.**In this third part of the n-part series**, STL digs into the **_ITERATOR_DEBUG_LEVEL "New World Order,"** as he says, which powers the STL's comprehensive correctness checks. You will also learn about the history of **_SECURE_SCL **and **_HAS_ITERATOR_DEBUGGING**.

STL explains ** #pragma detect_mismatch as a defense against ODR violations** (One Definition Rule).

As an extra treat,

[Advanced STL]

Part 1 (shared_ptr - type erasure)

Part 2 (equal()/copy() - algorithm optimizations)

Part 3 (_ITERATOR_DEBUG_LEVEL, #pragma detect_mismatch, and /d1reportSingleClassLayout)

Part 4 (rvalue references v2.1 and associative container mischief)

Part 5 (deduplicator, using Boost.Bimap/Filesystem/ScopeExit) - see Stephan's deduplicate.cpp

Part 6 (container pretty printer) - see Stephan's pretty_printer.cpp

]]>As you continue to learn about the beauty and the weirdness inside the STL, you should take Stephan's wisdom to heart and see if you can implement some of the patterns he shares with you in your own code. And you should, of course, take his advice about what NOT to do in your native compositions.

Tune in. Enjoy. Learn.

[Advanced STL]

Part 1 (shared_ptr - type erasure)

Part 2 (equal()/copy() - algorithm optimizations)

Part 3 (_ITERATOR_DEBUG_LEVEL, #pragma detect_mismatch, and /d1reportSingleClassLayout)

Part 4 (rvalue references v2.1 and associative container mischief)

Part 5 (deduplicator, using Boost.Bimap/Filesystem/ScopeExit) - see Stephan's deduplicate.cpp

Part 6 (container pretty printer) - see Stephan's pretty_printer.cpp

]]>This is the **second part **in a series of lectures exploring the fundamental logic-recipe powering all that we do as software engineers and computer scientists—the algorithm. **What is an algorithm?** You may be surprised to learn that this is not a simple question. Nonetheless, in this video, Yuri presents an answer—one that is perhaps somewhat controversial in nature—based on his own research and philosophy.

**Thank you, Yuri**, for taking the time to share your extensive knowledge and gentle, kind spirit with Niner Nation. We all really appreciate it! Thanks, too, to **Wes Dyer **and **Bart De Smet** for being our live audience for this lecture and asking **great **questions!**See Part 1See Part 3**

In the

You will also learn a lot about the beauty and the weirdness inside the STL. You should take Stephan's wisdom to heart and see if you can implement some of the patterns he shares with you in your own code, and you should of course take his advice about what NOT to do in your native compositions.

Welcome back, STL!!!

Tune in. Enjoy. Learn.

[Advanced STL]

Part 1 (shared_ptr - type erasure)

Part 2 (equal()/copy() - algorithm optimizations)

Part 3 (_ITERATOR_DEBUG_LEVEL, #pragma detect_mismatch, and /d1reportSingleClassLayout)

Part 4 (rvalue references v2.1 and associative container mischief)

Part 5 (deduplicator, using Boost.Bimap/Filesystem/ScopeExit) - see Stephan's deduplicate.cpp

Part 6 (container pretty printer) - see Stephan's pretty_printer.cpp

]]>Why *bananas*, Ralf?

*Banana *is functional programming slang for "fold"—an application of the catamorphic recursion scheme most widely known in the higher-order list processing tradition of Bird-Meertens Formalism and the Squiggol community. Erik Meijer used to be known as the "banana man" because of his early research on the subject; he also co-authored the seminal paper with theoretical (categorical) foundations on the subject. Incidentally, the paper used the notation of so-called "banana brackets" (instead of using the plain string "foldr"), which sort of explains why we sometimes say bananas. There is no shortage of crazy paper titles on the subject, by the way: "Functional Programming with Bananas, Lenses, Envelopes, and Barbed Wire," "Bananas in Space: ...," "Dealing with large bananas," "Boxes go bananas: ...," "See more through lenses than bananas," etc.

More to the point, ** foldr** is the Swiss Army Knife in functional programming. Monoidal reductions of lists or mapping over lists and many other list-processing idioms can be modeled with the regular recursion operator

**Learn more:Going Bananas lecture slide deck**

Ralf's blog

For the exercises/riddles in the slide deck:

12 (medium)

18 (medium)

21 (medium)

23 (easy)

24 (hard)

31 (hard)

34 (easy)

The fundamental concept here is the monad, and Greg has a novel and conceptually simplified explanation of what a monad is and why it matters. This is a very important and required first step in the series since the whole of it is about the application of monadic composition to real world web development.

In **part 3**, Greg continues to take us on a monadic journey, en route to the design of a composable web stack from client to database. This series is specifically about monadic design patterns and not implementation details using Scala and asscoiated dev tools. Open your minds and let the design pattern knowledge in.

Shape. Wrap. Roll.

]]>As is Stephan's nature, he elaborates on technical details in very substantive way. The Standard Template Library, or

Merry Christmas to all Niners who celebrate it! This is the last episode of STL's intro to STL series. A great way to end the year and a nice gift for all of you out there who are interested in and/or practice the art of native programming with C++. Enjoy. Learn.

In **part 10**, the final chapter in this magnificent introductory series covering the STL, Stephan introduces us to **type traits.**

**Stephan (I guess we can just call him STL now, eh?) will be back!!** Look for a new series on advanced C++ topics and deeper dives into the implementation details of the STL. Yes, Advanced STL with STL is on the horizon. Much thanks and praise for Stephan's **exemplary **lectures!

Enjoy! Learn!

Books mentioned by Stephen:

The C++ Standard Library: A Tutorial And Reference by Nicolai M. Josuttis

Effective STL by Scott Meyers

**[STL Introduction lecture links]**

Part 1 (sequence containers)

Part 2 (associative containers)

Part 3 (smart pointers)

Part 4 (Nurikabe solver) - see Wikipedia's article and Stephan's updated source code

Part 5 (Nurikabe solver, continued)

Part 6 (algorithms and functors)

Part 7 (algorithms and functors, continued)

Part 8 (regular expressions)

Part 9 (rvalue references)

Part 10 (type traits)

]]>The fundamental concept here is the monad, and Greg has a novel and conceptually simplified explanation of what a monad is and why it matters. This is a very important and required first step in the series since the whole of it is about the application of monadic composition to real world web development.

In part 2, Greg continues to take us on a monadic journey, en route to the design a composable web system from client to database and back. Tune in. Learn.

Shape. Wrap. Roll.

See **part 1 **first, if you haven't already...

See **part 3**

As is Stephan's nature, he elaborates on technical details in very substantive way. The Standard Template Library, or

In

Enjoy! Learn!

Books mentioned by Stephen:

The C++ Standard Library: A Tutorial And Reference by Nicolai M. Josuttis

Effective STL by Scott Meyers

**[STL Introduction lecture links]**

Part 1 (sequence containers)

Part 2 (associative containers)

Part 3 (smart pointers)

Part 4 (Nurikabe solver) - see Wikipedia's article and Stephan's updated source code

Part 5 (Nurikabe solver, continued)

Part 6 (algorithms and functors)

Part 7 (algorithms and functors, continued)

Part 8 (regular expressions)

Part 9 (rvalue references)

Part 10 (type traits)

]]>As is Stephan's nature, he elaborates on technical details in very substantive way. The Standard Template Library, or

In

Enjoy! Learn!

Books mentioned by Stephen:

The C++ Standard Library: A Tutorial And Reference by Nicolai M. Josuttis

Effective STL by Scott Meyers

**[STL Introduction lecture links]**

Part 1 (sequence containers)

Part 2 (associative containers)

Part 3 (smart pointers)

Part 4 (Nurikabe solver) - see Wikipedia's article and Stephan's updated source code

Part 5 (Nurikabe solver, continued)

Part 6 (algorithms and functors)

Part 7 (algorithms and functors, continued)

Part 8 (regular expressions)

Part 9 (rvalue references)

Part 10 (type traits)

]]>As is Stephan's nature, he elaborates on technical details in very substantive way. The Standard Template Library, or

In

Enjoy! Learn!

Books mentioned by Stephen:

Effective STL by Scott Meyers

**[STL Introduction lecture links]**

Part 1 (sequence containers)

Part 2 (associative containers)

Part 3 (smart pointers)

Part 4 (Nurikabe solver) - see Wikipedia's article and Stephan's updated source code

Part 5 (Nurikabe solver, continued)

Part 6 (algorithms and functors)

Part 7 (algorithms and functors, continued)

Part 8 (regular expressions)

Part 9 (rvalue references)

Part 10 (type traits)

]]>As is Stephan's nature, he elaborates on technical details in very substantive way. The Standard Template Library, or

In

Enjoy! Learn!

Books mentioned by Stephen:

Effective STL by Scott Meyers

**[STL Introduction lecture links]**

Part 1 (sequence containers)

Part 2 (associative containers)

Part 3 (smart pointers)

Part 4 (Nurikabe solver) - see Wikipedia's article and Stephan's updated source code

Part 5 (Nurikabe solver, continued)

Part 6 (algorithms and functors)

Part 7 (algorithms and functors, continued)

Part 8 (regular expressions)

Part 9 (rvalue references)

Part 10 (type traits)

]]>