Programming Leftovers
-
Ports-and-Adapters Architecture: The Pattern
The ports-and-adapters architecture should be the standard architecture for HMI applications. Its parts are loosely coupled, cohesive, easy to test and easy to extend. We can apply the reverse Conway manoeuvre to create self-dependent teams with minimal dependencies on other teams. I’ll motivate the ports-and-adapters or hexagonal architecture with USB ports and adapters and look at the architecture pattern from the production, testing and team perspective. I’ll apply the architecture to the HMI terminal of a harvester.
-
Implementing interactive languages
Suppose I want to implement an interactive language - one where code is often run immediately after writing. Think scientific computing, database queries, system shells etc. So we care about both compile-time and run-time performance because we'll usually experience their sum.
-
[Old] An Overview of the Icon Programming Language; Version 9
Icon is a high-level programming language with extensive facilities for processing strings and structures. Icon has several novel features, including expressions that may produce sequences of results, goal-directed evaluation that automatically searches for a successful result, and string scanning that allows operations on strings to be formulated at a high conceptual level. Icon also provides high-level graphics facilities.
Icon emphasizes high-level string processing and a design philosophy that allows ease of programming and short, concise programs. Storage allocation and garbage collection are automatic in Icon, and there are few restrictions on the sizes of objects. Strings, lists, and other structures are created during program execution and their size does not need to be known when a program is written. Values are converted to expected types automatically; for example, numeral strings read in as input can be used in numerical computations without explicit conversion. Icon has an expression-based syntax with reserved words; in appearance, Icon programs resemble those of Pascal and C.
-
[Old] A Brief Introduction to Icon
Icon is a very high-level imperative language with a rich repertoire of string and structure processing facilities. It is available on a wide range of computers and is in wide use.
In Icon, values, not variables, are typed. Built-in data types include numerics, character sets, strings, sets, lists, associative tables, records, and procedures. The aggregate types - sets, lists, tables, and records - can hold values of any type. Tables can be indexed by values of any type. Numerics, character sets, and strings are atomic values; operations on them produce new values. Aggregates use pointer semantics; operations on them can change existing values as well as produce new ones. Strings and aggregates can be of arbitrary size, and their sizes can change during execution. Memory management is automatic.
Icon has an expression-oriented syntax; even control structures are expressions. Procedures consist of zero or more expressions separated by newlines or semicolons. Icon programs consist of one or more procedure definitions, and execution begins by calling the procedure named main.
-
Time Series Forecasting by Comparing Many Models: EUR/TRY Rates
The Turkish central bank president has changed, and she has started to execute new economic policies. Regarding that, the Turkish Lira-related currency rates have risen. Therefore, I wonder how the Euro to Turkish lira exchange rates will look by the end of the year.
While we will model the exchange rates, we will benefit from multiple model screening techniques via the tidymodels and modeltime packages. The models we will use to compare: [...]
-
Plotting Multiple Lines on a Graph in R: A Step-by-Step Guide
Graphs are powerful visual tools for analyzing and presenting data. In this blog post, we will explore how to plot multiple lines on a graph using base R. We will cover two methods: matplot() and lines(). These functions provide flexibility and control over the appearance of the lines, allowing you to create informative and visually appealing plots. So, let’s dive in and learn how to plot multiple lines on a graph in R!
-
Using a Swift LSP in Neovim
I spent quite a bit of time trying to work out how to get a Swift LSP working in Neovim the other day. Enough time that I wanted to share it here.
I won’t go into too much detail about what an LSP is, how it works, or its benefits. There are a lot of other people who can do a much better job of that than me.
However, I would like to say that this is just how I have it working myself. There are bound to be many other ways you can get a Swift LSP working in Neovim. It just happens that this is a pretty simple configuration, that I will likely also improve in the future.