This post announces the availability of linenoise-swift-utf8: A Swift replacement for GNU readline. There is a very useful library called GNU readline which enables line editing and history (and more) for command line programs. I've written a few command line programs and I know that having this functionality, or similar, makes them very much easier … Continue reading A Line Editing Library
Category: Code Snippets
Signal Handling in Swift
For my series of posts on the Lambda Calculus, I have developed a lambda calculator. At the time of writing, it only works in "single step mode": you hit the return key having typed in a lambda expression and it does one beta reduction. Hit the return key again and it does another beta reduction. … Continue reading Signal Handling in Swift
Accessing Resources from Test Cases in Swift
This is just a reminder from me to me. I constantly find myself searching through my previous projects trying to remember how to do this. Putting it in my blog might make it easier to find it in future. Quite often, when writing test cases, I want to access resources that are not Swift code. … Continue reading Accessing Resources from Test Cases in Swift
Data Structures and Data Caches – part 1
I came across a presentation on Youtube by Bjarne Soustrup in which he claimed that linked lists are usually the wrong data structure. As an example he used the following You have a random stream of N integers You have to insert each one in turn in the right place in a list to make … Continue reading Data Structures and Data Caches – part 1