RSSAmplifier

Blog

invoke::thought()

A collection of random (mostly C++) things.

cdacamar.github.ioRSS feed ↗5 posts

Latest posts

Text Editor Data Structures: Rethinking Undo

Undo and redo have been a staple operation of text editors probably since the first typo was ever made, yet there has not been a lot of innovation around refining the idea of what undo and redo could be. Let s explore what I mean On The Subject of Undo Undo In order to understand how to change undo we first need to understand what the fundamental operation of undo is supposed to do. I have always…

Text Editor Data Structures

Text editors can be an interesting challenge to program. The types of problems that text editors need to solve can range from trivial to mind-bogglingly difficult. Recently, I have been on something of a spiritual journey to rework some internal data structures in an editor I have been building, specifically the most fundamental data structure to any text editor: the text. Table of Contents…

Mapping Strings in C++

Mapping strings to things makes sense. You take a meaningful string and you assign it a value. As with most things we do in programming there are many pitfalls to approaching a problem. So, lets explore some of them! What Exactly Is Your Problem? Here’s a situation we’ve all run into at some point. Say you’re reading records from a database and it has a column called “Type”. Lets say for some…

Localizing Code With std::variant

As we all know, C++17 is on the horizon. With it s release will comes a new member to the data container family, std::variant . Looking at std::variant Let s take a look at it s definition: template < class ... Types > class variant ; Variant types are useful for all types of applications, particularly when you want to flatten hierarchies into simpler, more independent types. Let s see a simple…

Breathing Life: What to Expect Here

So what can you expect here? In a word, code . Lots of code! Why? A couple of reasons: I am a very visual person, I learned (and continue to learn) through example. When I see results I want to know how we got there. Understanding results is a small part of a long and convoluted battle in converting and handling data. My personal interest lies in that conversion. Most of us may know of an…