What is the size of a std::function?

Summary The size of a std::function in C++ is not fixed and can vary depending on the type of callable object it stores. According to the C++ reference, the stored callable object is called the target. The size of std::function can be broken down into several components, including: 8 bytes for a function pointer 8 … Read more

Bug fix commit classifier only 60% accurate – 40% false positives from refactoring/formatting commits. How to improve?

Summary The current approach to classifying GitHub commits as bug fixes or refactoring/formatting commits has an accuracy of only 60%, with 40% false positives from refactoring commits. Improving the accuracy of the classifier is crucial to reduce the number of misclassified commits. The current dataset consists of 28K commits, with 1,200 classified as bugs, out … Read more

Why does swapping root.left and root.right using a temporary variable work, but a seemingly equivalent approach fails?

Summary The problem lies in understanding Java reference semantics when swapping fields in a binary tree node. Two approaches are compared: one that works by swapping root.left and root.right using a temporary variable, and another that fails when trying to achieve the same result but through a different assignment sequence. The key to understanding this … Read more

APL screen always renders after speak finishes – is async render with long speech possible?

Summary The Alexa Presentation Language (APL) is used to create visual experiences for Alexa skills on devices with screens, such as the Echo Show. However, the APL screen rendering is deferred until speech completes, causing visual feedback to appear late and making the screen feel secondary. This limitation is particularly noticeable in storytelling use cases … Read more

How to print or log from Groovy policy in Boomi API Gateway (Gravitee underlying gateway)?

Summary The problem at hand is logging or printing debug values from a Groovy policy in Boomi API Gateway, which uses Gravitee APIM Gateway 3.3.13 as its underlying gateway. The goal is to find a supported method to log to Boomi Gateway logs, log to Gravitee logs, or output debug statements from within a Groovy … Read more