Lambdas en C++

Look what the Chihuahua dragged in! Well, in the absence of cats, a Chihuahua will do.

Lambdas en C++ is a Spanish translation of C++ Lambda Story, a collaboration with well-known author and blogger Bartłomiej Filipek. You can follow his C++ Stories blog.

Last year I did a review for the English version of the book that you can find here.

So, if you’d prefer to read C++ en tu idioma, check out the electronic version of the book on Leanpub.

Better yet, bundle it with C++17 – La guía completa and get to a great start with Modern C++ in your native language.


Lambdas en C++ es una traducción al español de C++ Lambda Story, una colaboración con el conocido autor y blogger Bartłomiej Filipek. Puedes seguir su blog C++ Stories.

El año pasado hice una reseña del libro de la versión en inglés que puedes encontrar aquí.

Así que si prefieres leer C++ en tu idioma, echa un vistazo a la versión electrónica del libro en Leanpub.

Todavía mejor, líalo con C++17 – La guía completa y empieza con el pie derecho con C++ moderno en tu lengua madre.

Posted in software | Tagged , , , , | Leave a comment

Shhh! Be Mindful!

Finally the book is here! I’m biased, extremely biased about this book, and for good reason. We met Renda and the Madrigals when our daughters went to the same kinder garden, elementary and middle school. We’ve vacationed together and have spent time together as families and still go out together every couple of months.

So you can say we know them well.

When we found out that Renda was writing this book we couldn’t help but be happy. Writing a book is such an endeavor, and a topic about mindfulness and families is a rare thing to find, and this book is unique in that way.

We have been happily part of Renda’s mindfulness sessions as a family and can attest to their effectiveness. One of the first things that you notice is that you do practice, well, as a family! That awareness in itself, that you’re doing something you like with the someones you love makes all the difference. Besides, Renda has a unique way of creating an ambiance, calming you down, focusing you in the moment, in the now, in the present.

So, if you’re into mindfulness and want to share this experience with the rest of your family, go ahead and get a copy. Got mine. On Kindle.

You can get it on Amazon here:

Posted in software | Leave a comment

From “See You Zoom!” to “See You, Zoom!”

Torrey Pines State Beach, San Diego, CA

With a large percentage of vaccinated people in the US, and the number of COVID-19 cases dropping dramatically in our county in California, it seems inevitable that some time in the near future we’ll have to return to a physical office, if only partially. For those of us with kids at home, there’s also a large possibility that they’ll have to return physically to school.

Last year I took the plunge and got a one-year subscription to Zoom, and our family meetings and community service have benefited from it. We schedule at least three meetings during the week, but it seems all this will be coming to an end. Zoom has proven resilient and useful–I have to provide an attendance list for about 25 kids in a class, and the reports are great. But being candid, I won’t miss it a bit once we’re able to meet people in person. So nope, I won’t renew.

Transitioning (as a family and not as an individual) will be stressful. There is some anxiety kicking in because of the unknown.

Regardless, it is concerning that other countries are still in the thick of it, and my thoughts go for those friends of ours with family in India. We’ve had the misfortune of losing three uncles and two aunts, in the span of three months, one just last week, albeit only one of them to COVID. This is on my side of the family.

If you’re in the US, how are you coping with the transition?

Posted in software | Leave a comment

If you build it, will they come?

This is my Lightning Talk for CPPCON 2020. I’m super grateful to Chris Ryan for posting it on LinkedIn.

Quality C++ documentation is abundant…as long as it is in English. If you’re a Spanish speaker your options are limited. This talk is about my experience in bringing es.cppreference.com, the Spanish companion site to cppreference.com, up to date to enable Spanish-speaking C++ lovers and enthusiasts a quality experience when learning C++…en español.

Many years ago I read a follow-up book to the seminal Design Patterns book by The GoF, called Pattern Hatching: Design Patterns Applied by John Vlissides. He kept a homonymous monthly column in C++ Report, a magazine now defunct. One of the things that called my attention is that he mentioned that keeping on with design patterns was a labor of love.

Before his passing, he was kind enough to review an article that I intended to publish on Pluggable Factory and gave me very valuable feedback, as well as feedback on using the nifty counter technique–originally in the C++ ARM and then in John Lakos‘ book, Large Scale C++ (first edition)–to implement a variation of Singleton.

To me, John was an inspiring figure to give to the community without expecting anything in return, and hopefully the effort of translating C++ documentation to Spanish will enable others to learn and love this programming language that has given me so much.

So John, this is my labor of love.

Posted in software | Leave a comment

Look what the cat dragged in…

Well, in reality I like birds better.

Disclaimer: I got C++ Lambda Story as a gift from the author, Bartłomiej Filipek, and in a previous post I shared that I had covered the book end to end.

Nonetheless, it’s nice to see a book come to life in physical form and will certainly enjoy having a copy instead of starting up a PDF reader.

Highly recommended, focused book about C++ lambdas.

Now, if only it were in Spanish…

Posted in C++, C++17, C++20, lambdas, software | Tagged , | Leave a comment

C++23 Stacktrace library documentation now available in Spanish / C++23 Documentación de la biblioteca de listado de pila ahora disponible en español

Una de las primeras características de C++23 se encuentra disponible aquí.

Todas las características documentadas hasta ahora se encuentran aquí.

Posted in software | Tagged , , , , | Leave a comment

C++20 Three-Way Comparison Now Available In Spanish / C++20 Comparación de tres vías ahora disponible en español

Three-way comparison (aka “the spaceship operator <=>) is a cool new feature in C++20. While the usage is simple, the documentation is not :-). Strong, weak, partial ordering…concepts, more concepts, type traits, and so on.

Documentation a long time in the making, but I finally had a good couple of days working on it. There are some examples missing–ditto in the English version–but nonetheless much needed documentation. You can find it here.


La comparación de tres vías (también conocida como “el operador nave espacial”, <=> ). Mientras que el uso es simple, la documentación no. Ordenamiento fuerte, débil, parcial…conceptos, más conceptos, rasgos de tipo y así sucesivamente.

La documentación tomó bastante tiempo, pero finalmente tuve un buen par de días para trabajar en ella. Hay algunos ejemplos que faltan–lo mismo en la versión en inglés–pero no obstante, se necesita mucho la documentación. La puedes encontrar aquí.

Posted in software | Leave a comment

C++20 format library now available in Spanish/Biblioteca de formato de C++20 ahora disponible en español

You can find it here/Puedes encontrarla aquí.

Posted in C++, C++20 | Leave a comment

Should the new Mac mini M1 be called a Big Mac?

For the past week I’ve been enjoying the new Mac mini M1 (with Apple Silicon), and boy, what a thing of beauty.

Externally it looks the same; the back, as has been reported, has less extensibility, but I don’t mind–I use either Thunderbolt 3 or Bluetooth accessories, so no problemo. I paired it with and older Apple Wireless Magic keyboard and trackpad, a Samsung 34″ C34J791 Thunderbolt 3 monitor that can double as a T3 hub, extended storage with a Samsung Portable X5 SSD with Thunderbolt 3 and this thing is fluid.

I also own a 2019 MacBook Pro (Intel Core i9, six-core), and informally they’re on par in terms of performance, but Geekbench reports, the Mac mini M1 beating the MacBook Pro hands down.

I’ve been running versions of IntelliJ IDEA for Apple Silicon and CLion for Apple Silicon. Startup time almost instantaneous from a cold boot. Kudos to Phil Nash, Anastasia Kazakova and team for these great tools.

It took around 3 weeks to receive it since I ordered it, but it was worth the wait–and I wasn’t in a hurry. If you can get your hands on one of these, or are undecided, highly recommended.

Posted in hardware, software | Tagged , , , , , , | Leave a comment

CPPCON2020 Plenary Session Review: Performance Matters

This was my favorite session. I must confess that I’ve seen it three times, and had the time to go slowly over the topic discussed: performance.

Emery Berger needs no introduction. Just check his LinkedIn profile, but just in case, his credentials are at the beginning of the session and just the fact that the CPPCON organizers scheduled him for a plenary session is telling: He’s got the goods.

What made this session useful and memorable? On one hand, Emery supports the topic of performance taking a meticulous approach supported by sound math, statistics, data, you name it. At the end of the post I add references that are mentioned in the session.

Chillax, have a mojito

Emery starts the session with a simple example: performance of a given system in the ’70’s, cool ’80’s, and today, but soon things get super interesting. In the past, you gained performance just by…upgrading your computer, right? Of course! Who doesn’t remember those Gateway 486SX computers with 4MB of RAM (and don’t make me go to 386SX, 80286, 8086…)

Moore’s Law right? Dennard’s Scaling, correcto?

Well, with the advent of multicore/manycore processors, things changed, and for the better.

Gains in performance cannot be stated by “I ran it once and it ran better”. Given two systems, A and A’, if A’ performs better and making a claim, what is the reason? Our typical approach is to find opportunities for better code, but why? It shouldn’t be black magic, right?

So, without spilling the beans, this is what you will learn from the session:

  • Variance when there are factors that may affect performance
  • Data Layout (from code to how it’s really laid out in memory)
  • Link order and its impact on function addresses
  • Environment variable size (moves program stack)
  • Changing libraries
  • Running a program in a new directory and its impact on layout

Make sure you check the reference he makes to Producing Wrong Data Without Doing Anything Obviously Wrong!

Furthermore, Emery will introduce you to randomization as a way to eliminate the effect of layout with the Stabilizer tool, and how it eliminates the layout bias. In this section of the talk he references Null Hypothesis, Central Limit Theorem, Student’s t-test and Analysis of Variance (ANOVA), so be ready to do some reading.

Moreover, Emery introduces causal profile and Coz, and how to approach a performance problem. What he exposed reminded me of Control Theory with a feedback loop. I asked Emery in a follow up Q&A about the difference between BPF and Coz, and he mentioned that BPF is an observing tool, while Coz is a predicting tool. I would think they would be a great complement to each other. On verra.

In this section of the talk you’ll be introduced to:

  • Experimentation and what slowing down a component reveals
  • Latency and throughput

My favorite reference was Little’s Law, which I have used exactly twice in previous projects. A specific resource where it is mentioned–and used–is in Windows Server 2003 Resource Kit: Performance Guide.

Hopefully I got you interested in this session. If you have an hour to chillax with a mojito, I encourage you to check this session. You’ll derive hours of satisfaction following up the papers and putting into practice what you learn.

Word of the Conference

Many of the sessions, such as Emery’s plenary session, and Herb Sutter’s capstone plenary session, make use of the word incantation. Presenters use it to present a non-apparent solution to a given problem. It seems that every CPPCON conference I’ve attended there’s a catchy phrase. We’ll see what next year brings.

References

Posted in C++, C++17, C++20, performance, software | Tagged , , , , , | Leave a comment