Exceptions vs. Return Values to represent errors (in F#) – II– An example...
In the previous post, we talked about the difference between Critical and Normal code. In this post we are going to talk about the Critical code part. Ideally, we want: A way to indicate that a...
View ArticleExceptions vs. Return Values to represent errors (in F#) – III–The Critical...
Code for this post is here. In the last post we looked at some Critical code and decided that, albeit correct, it is convoluted. The error management path obfuscates the underlying logic. Also we have...
View ArticleExceptions vs. Return Values to represent errors (in F#) – IV – Implementation
The Critical monad is defined as follows. First there is the type that propagates through the monad: type Result<'a, 'b> = | Success of 'a | Failure of 'b Then we define the usual computation...
View ArticleFunctional programming in C
0.1 Discriminated unions in C 0.2 Nested functions and lambda variables 0.3 Automatic cleanup of local variables 0.4 Data structures 0.5 Wrapping up This post/program (as I’m writing it in literate...
View ArticleFunctional programming in C – Implementation
0.1 Cleanup 0.2 Lambdas 0.3 Unions 0.1 Cleanup Let’s start simple with the cleanup function. First we need the usual barrage of includes. G_BEGIN_DECLS allows the header to be linked in C++. #ifndef...
View ArticleBuilding a stock alert system with Google Script
When I thought about it, I realized that my ideal system would be a spreadsheet where to add tickers and alert levels. Under the covers, the system would need to check the current price of a ticker,...
View ArticleA Stack data structure implementation using Span
This Stack data structure can be used over memory that resides on the stack, heap or unmanaged heap. If you know about Span this should immediately make sense to you. Continue reading →
View ArticleStopping Garbage Collection in .NET Core 3.0 (part I)
The main idea is to use [ETW events](https://docs.microsoft.com/en-us/windows/desktop/etw/about-event-tracing) to detect when a GC occurs and to call an user provided delegate at that point. You can...
View ArticleStopping Garbage Collection in .NET Core 3.0 (part II)
Let’s see how it’s implemented. For why it is implemented, see Part I. The FxCop code analyzers get upset if I don’t declare this, which also impede me from using unsigned numeral types in interfaces....
View ArticleMy blog moved to www.lucabol.com …
I should have gotten my own domain name way earlier, but anyhow, here it is … http://www.lucabol.com
View Article