All of the things labelled as Posts, so that crawlers have a place to find them.
The dangers of OAuth/Social Login
OAuth authentication is not safe. This is the baseline from which all applications should be working. There is a place for social login, but it
Simulating the way to victory: Bloons TD Battles
Simulations can provide curious insights; in this case a distinct advantage to winning a game. I recently encountered a perfect opportunity to run a simulation
Improving CSS Positioning with position-anchor
CSS has a lot of features, yet unfortunately lacks a few basic positioning abilities. Many layouts are difficult to achieve, and often ignored, being supplanted
Painlessly add a virtual to a large class structure
Add a new virtual to a large object hierarchy Adding a new function to a complex class structure is arduous. A starting point is hard
JavaScript and 3d graphics don’t mix
Writing WebGL code in JavaScript has been very frustrating. There are numerous aspects of the language which make this task harder than it should be.
Is exception safe code truly possible?
It is important to write exception-safe code. A truly exception-safe function produces no side-effects when an error occurs. It returns to the caller with the
The string type is broken
My previous article, “We don’t need a string type“, caused a bit of stir. Though the feedback is mixed, there is a common theme of
Bridging __VA_ARGS__ to C++ variadic templates
Variadic templates are a great new feature of C++, yet they can be a bit confusing. __VA_ARGS__ are also a nice feature of the preprocessor,
Are explicit namespaces required?
I’m working on modules in Leaf, implementing namespace support. The moment I write my first test a feeling of uneasiness sets in. As I stare
The true cost of zero cost exceptions
Exceptions are a cornerstone of programming. If we intend to use them prolifically, as in C++, we need an efficient implementation. Thus was born the
We don’t need a string type
Should string be a distinct type or merely an alias for an array of characters? I’m considering the options for Leaf and can’t convince myself
Safely using enable_shared_from_this
Obtaining a ‘shared_ptr’ from ‘this’ is possible using the ‘enable_shared_from_this’ class. It’s a feature that allows a class to reference itself within a smart pointer
Cannot create a proper clone method with shared_ptr
Smart pointers in C++ are nice, yet fraught with irregularities. One is the inability to create a proper clone function. This requires a feature called
Compiling an overloaded function: the selectable type
How is an overloaded function compiled? It’s not something I truly considered prior to writing Leaf. My first implementation mimicked C++, at least how they
Rejuvenating the ternary conditional with optionals
I previously contemplated elimination of the ternary conditional operator, but now I have a solution that retains and improves it. My biggest concern here is
Do we need the conditional ternary operator ?:
I’m reconsidering the necessity of the conditional ternary operator in Leaf. I’m having troubles coming up with a comfortable, flexible, and unambiguous syntax. The traditional
Why a ‘constexpr’ is just a return statement
A question recently asked why a ‘constexpr’ function in C++ may comprise only a return statement. It’s a good question. On quick glance the restriction
Breaking the type tree with modifiers
A language’s type hierarchy is formed with both linking and attributes. But what if a uniform hierarchy is not the correct way to represent a
Modelling type systems: The basics
I’m in the midst of reworking a significant aspect of the type system in Leaf. It’s a lot of work, and I’d like to avoid
Overloading the broken universal reference ‘T&&’
C++11 introduced a perfect forwarding mechanism for template parameters. The key part is the ability for a template parameter to match any input without any
How to catch a “return” statement
Does ‘return’ always cause a function to return? Surprisingly the answer is “no”. Indeed there are situations in which ‘break’ may not always break from
Building blocks: Compiling if, defer, break, continue, and exceptions
One way to convert source code to machine code is via “basic blocks”. After parsing and semantic processing, and just prior to machine code generation,