news
Programming Leftovers
-
Artyom Bologov ☛ Customizing ed(2): Syntax Highlighting and rlwrap Heresy
I’ve already used Rlwrap in my previous post, but only as a line editing wrapper. Rlwrap is awesome and is much more than mere line editing: [...]
-
Daniel Lemire ☛ Automated Equality Checks in C++ with Reflection (C++26)
In C++, comparing two objects for equality is straightforward when they are simple types like integers or strings. But what about complex, nested structures? You may have to implement the comparison (operator==) manually for each class, which is error-prone and tedious.
-
[Old] Frederick J Ross ☛ The seven programming ur-languages
But not all languages have the same set of patterns. The patterns for looping in C or Python are very different from the patterns of recursion in Standard ML or Prolog. The way you organize a program in Lisp, where you name new language constructs, is very different from how you organize it in APL, where fragments of symbol sequences are both the definitions of behavior and become the label for that behavior in your mind.
These distinct collections of fundamentals form various ur-languages. Learning a new language that traces to the same ur-language is an easy shift. Learning one that traces to an unfamiliar ur-language requires significant time and effort and new neural pathways.
-
Rlang ☛ Distribution of p-values under the null hypothesis for discrete data by @ellis2013nz
A few months back in a side skirmish during the great p-curve controversy, Richard McElreath mentioned that p-values under the null hypothesis are not always uniformly distributed, as is sometimes claimed.
-
Java/Golang
-
Nicolas Fränkel ☛ XML Schema Validation 1.1 in Java
This week, I received an interesting task: dusting off a legacy Java application. The application analyzes specific XML files in proprietary format. I know XML doesn’t sound sexy to junior developers, but it has an amazing benefit. One can validate a file against a grammar. Such grammar is called an XSD, the acronym for XML Schema Definition. Fun fact: you write XSDs in XML.
In this post, I explain the problem, what I tried, and the final working solution.
-