SDEditGen: structured syntax for sdedit sequence diagrams

SDEditGen is a preprocessor tool for Quick Sequence Diagram Editor, better known as sdedit. QSDE / sdedit is an excellent open source text to UML tool, but its syntax is not so nice: it is often unintutitive, cryptic, and hard to remember. Also, like syntax of many sequence diagram tools, sdedit’s syntax is unstructured. It is easy to create and read a Hello world (Bob → Alice) example, but it is much harder to write and read complex real-world diagrams. SDEditGen aims to provide a structured, nicer, easier and more intuitive syntax for sdedit. Read more

PSClasses: classes for PowerShell versions before 5.0

The PSClasses project provides classes with inheritance to PowerShell versions earlier than 5.0. PSClasses include important features of object-oriented languages, like following: class inheritance, overriding methods, calling overridden superclass methods, multiple constructors, calling other constructors of same class, calling superclass constructors. The library also contains an uncommon feature: automatic generation of the constructor which accepts arguments corresponding to all instance variables. This feature resembles case classes in Scala or data classes in Kotlin. Read more

Reader monad: unary functions, Cats, implementation, example, alternatives

The article describes several ways of chaining unary functions most relevant for Reader monad and proceeds with a summary of Reader monad functionality in Cats library: it presents basic methods like pure, ask, map, andThen, local and flatMap. The flatMap example is presented in several variants, both with and without a Reader. The article then includes a simple implementation of pure, map and flatMap methods. A non-trivial, bigger example is converted from Haskell to Scala: Reader is employed here to avoid passing the same argument around. Several Scala alternatives are presented and compared to the Reader solution. Read more