Programming

The distinctions between forex and futures trading in the United Kingdom

Forex and futures trading in the UK have vital differences that traders must consider before deciding which to trade. These include the type of contract, the underlying asset, and the regulatory framework.

Futures contracts are traded on exchanges, while forex contracts are traded OTC (Over the Counter). Futures contracts are also standardised, while traders can customise forex contracts to the … Read More

Robust C++: Initialization and Restarts

In a large system, main() can easily become a mess as different developers add their initialization code. This article presents a Module class that allows a system to be initialized in a structured, layered manner. It then evolves the design to show how the system can perform a quick restart, rather than a reboot, to recover from serious errors such … Read More

Segmented Map, a Compromise Between Flat Map and std::map

This article provides an implementation of a container, called segmented map, which is almost as fast as flat map in random access and enumeration of elements and close to std::map in insertion of elements. The source code is written in C++17 and can be compiled in any C++17 compiler. Benchmarks with the “int-double” and “string-string” key-value pairs are provided for … Read More

An Optimal Wagner-Fischer Algorithm For Approximate Strings Matching In Python And NumPy

The Levenshtein distance is an efficient metric widely applied to evaluate the similarity between literal strings and other 1D sets. In this article, the optimal Wagner-Fischer algorithm for the Levenshtein distance computation and its implementation, are thoroughly discussed, by an example. The code samples in Python and NumPy demonstrate the similarity of literal strings evaluation, based on the Levenshtein distance … Read More

Rethinking the Web – Part 1

What would the web look like if the pioneers had the tools and tech we have today? What would the OO software look like if we used the OO paradigm championed by the developers of the web? Why has software development become so complicated? This series of articles answers these questions, and presents an alternate approach to how we design … Read More

rxcg: A Simple Text Matcher C Code Generator for IoT

Create a file with regular expressions in it, feed it to this tool, and presto! – you have instant, dependency free C code you can use to match said expression from any input stream.

Introduction

Update: Generates more compact code in most cases.

Update 2: Fixed bug with blockend generation.

I’ve written so many regular expression engines and code generators

Read More