Optical
Aberration

10 November 2022

For most of this year I have been working on the Swift extension for Visual Studio Code. The work is part of the Swift Server Workgroup push to improve the Swift development experience outside of the Apple eco-system. In July I posted an article on the swift.org website giving an overview of the extension and what functionality it provides. Given this was a general overview a number of the more minor features were not included in that article…

3 December 2021

In this article I am going to cover how to build a HTTP Proxy server using Swift. We will use the Hummingbird HTTP server framework as the basis for the server and use the Swift server AsyncHTTPClient HTTP client to forward on requests to the target service.A proxy server is a service that sits between a client and another service. It forwards messages from the client onto the…

1 December 2021

The Hummingbird server framework is designed to be flexible. It imposes as little structure as possible on how you build your application, but sometimes you need some structure. Do you really want to build all your application setup boilerplate every time you create a new app? To avoid this I have written a hummingbird project template which can be your starting point for your next app.GitHub has a feature called template repositories. These allow you to create a new project repository setup for a…

21 September 2021

Swift 5.5 has been released. This new release includes a series of new concurrency features including, async/await, structured concurrency and actors. Probably one of the most exciting series of additions to Swift in a long time (and this is from a language with new features appearing, what seems like, every other week).The recently released version of Hummingbird (v0.13.0) includes new APIs that allow you to take…

3 June 2021

JMESPath is a query language for JSON. WIth it you can script searching large JSON datasets and transform the results.A search can be as simple as a single field name. result would return the object attached to the result field at the top level of a JSON file. This can be specialized to return an object inside result by added a dot and then another field name eg result.object.Queries can index arrays as followsWhich will return the name field…