Map Stuff – Early August 2022 Update

And another 2026 map images from the Ordnance Survey Maps – Six-inch England and Wales, 1842-1952 series:

Lancashire – 1664 Maps

Interesting places covered in Lancashire include:

Liverpool

Manchester

Blackpool

Warwickshire – 462 Maps

Interesting places covered in Warwickshire include:

Birmingham

Nuneaton

Warwick

Maps – Early July 2022 Update

I’ve added another 1108 map images:

422 maps from Cardiganshire.
686 maps from Cornwall.

Cardiganshire

A rather colourful image of Aberystwyth circa 1887

Interesting places covered in Cardiganshire include: Aberystwyth, Lampeter, and Aberaeron.

Cornwall

…And St Michael’s Mount. Again circa 1887.

Interesting places covered in Cornwall include: St Ives, Lands End, and St. Michael’s Mount

Leaking Pipes with Swift and External Executables

Observed with MacOS 12.4/Xcode 13.4.1/Swift 5

There are quite a lot of tutorials out there covering the basics of running external executables from within Swift and, with very little effort, it’s quite easy to throw together something like this…

import Foundation

let wrappedUname = Process()
wrappedUname.executableURL = URL(fileURLWithPath: "/usr/bin/uname")
wrappedUname.arguments = ["-v"]
let unameOutputPipe = Pipe()
let unameErrorPipe = Pipe()
wrappedUname.standardOutput = unameOutputPipe
wrappedUname.standardError = unameErrorPipe
do{
    try wrappedUname.run()
} catch {
    print("Unexpected error: \(error).")
}
wrappedUname.waitUntilExit()
let unameOutput = String(decoding: unameOutputPipe.fileHandleForReading.readDataToEndOfFile(), as: UTF8.self)
let unameError = String(decoding: unameOutputPipe.fileHandleForReading.readDataToEndOfFile(), as: UTF8.self)
print("Output: " + unameOutput)
print("Error: " + unameError)
Continue reading “Leaking Pipes with Swift and External Executables”