
Eleanor McHugh
That Weird Go Girl
London, United Kingdom
Actions
Presenter of Go and Ruby oddities. Author of A Go Developer's Notebook. Digital identity researcher. Caster of polygonal dice. Builder of machines. Eternal procrastinator.
Links
Area of Expertise
Topics
Y: Recursion The Hard Way
In most modern programming languages including Go, it's possible for a function to call itself recursively. It's such a mainstream technique that we've come to take it for granted.
But what if functions couldn't call themselves?
There's a branch of mathematics called Combinatorics which answers just this question, and in this session we're going to study that answer and see what it can teach us.
When we're finished you might never look at Go - or programming - the same way ever again.
The Browser Environment - A System Programmer's Perspective
This is a quirky, code-first introduction to vanilla JavaScript applications and the Sinatra microservices which love them.
The highlight will be a deep dive into the use of WebSockets to provide realtime communications between web browsers and backend services. However along the way we'll also learn about DOM manipulation, AJAX/fetch asynchronous requests, timer events, server-side command loops, and the basics of end-to-end encryption with Ruby.
The Browser Environment - A System Programmer's Perspective
WORKSHOP PROPOSAL
This is a quirky, code-first introduction to vanilla JavaScript applications and the Sinatra microservices which love them.
The highlight will be a deep dive into the use of WebSockets to provide realtime communications between web browsers and backend services. However along the way we'll also learn about DOM manipulation, AJAX/fetch asynchronous requests, timer events, server-side command loops, and the basics of end-to-end encryption with Ruby.
Implementing Software Machines in Go
A fast-paced dive into the rudiments of process virtual machine and emulator implementation.
If you’ve played games or worked in any one of a number of popular programming languages you’re likely to have relied on a software machine written by a small but dedicated team of virtual machine enthusiasts. And unless you’ve taken a course in programming language implementation you probably have only a loose idea of what software machines are, how they work, or how easy it is to write your own.
My interest in this field was sparked during the era of home micros when I chanced upon an article in a programming magazine on how to implement Forth in Basic. That article with its inscrutable magic became an obsession that lead to a career in coding and much else beyond.
In this fast-paced introduction I’ll use code written in Go to explain the basic building-blocks with which we can model computing machines in software, covering as many of the main architectural features as possible in the time: stacks; heaps; dispatchers; clocks; registers; instruction sets.
This talk contains a lot of code (intended for offline study) but regardless of you current skill level it will reveal a little of the magic underneath many of the tools you probably use daily. The examples should also be sufficient to kickstart your own adventures in this fascinating field.
To Be Confirmed
The world has changed remarkably since 2020 with online interaction disrupting traditional office work and questions of legitimate identity becoming the focus of many political disputes.
Central Banks are experimenting with digital currency, the EU is compiling a biometric database of nearly 500 million people, and in the UK the Online Harms Bill threatens to outlaw secure messaging.
Digital Panopticons are seemingly sprouting up across the free world and our profession is largely blind to the consequences.
So join me for a deep dive into the nature of identity, the brokering of trust, and how we as developers can protect those who rely on the software we create from unwarranted intrusions.
There'll be a mixture of technical exploration and personal reminiscence as I explain how I became involved in this somewhat esoteric field and the insights I've picked up along the way which inform my opinions and architectural choices.
An Introduction to Functional Programming in Go
Some rabbit holes are so far off the beaten track that when you find them they're essentially irresistible. This is one of those rabbit holes.
Go is a pragmatic language with good tooling that's quick to learn and well suited to writing concurrent and network aware programs. Its design is generally conservative and so is its community, only gaining Generics a decade after release. It doesn't seem like fertile ground for Functional Programming.
And yet...
Go has functions. Not pure functions admittedly, but certainly first class functions with closures. That opens up some possibilities if we don't mind cutting some corners.
Join me for a friendly introduction to functions in Go. There will be a couple of simple problems to illustrate the ideas we’ll be covering, plenty of code you can study later, and a few thought-provoking examples which may permanently change the way you think about Go.
This talk has had two prior outings. Once as a keynote at GoLab (2019), and later an unrecorded workshop at GopherCon UK (2020).
Writing Ruby-like Functions and Methods in Go using Generics
This session is about how to write functions presenting the flexible APIs offered by languages such as Ruby without sacrificing more of the type safety offered by Go than is strictly necessary. Then how to test them and evaluate their performance without excessive code bloat.
Lots of fun will be had with Interfaces, Type Switches, Generics, and go test.
I love Go but have always found the way it handles collection types somewhat frustrating. In languages such as Ruby the collection classes are fleshed out with lots of functionality (ie batteries included) that in Go we have to roll for ourselves.
It’s not that the same things can’t be done, it’s that there’s no clear template for how to go about doing so consistently. And as the language provides a number of orthogonal data types for collections it makes sense to design functions which can work across them.
As a consequence of this I’ve been working on various packages for collection handling in Go for more than a decade now, some of them more practical than others.
Another of my interests is the use of Higher-Order Functions and Interfaces in API design. This topic doesn’t seem to get a lot of coverage despite Go having First-Class Function Closures. We’ll look at how to leverage Closures to write flexible functions and methods with strong type safety guarantees, as well as how to loosen those restrictions at runtime using Type Switches and Interfaces.
There was one very frustrating problem with these techniques prior to the introduction of Generics - the amount of code repetition necessary to support even the relatively small set of base types. This could be tackled using Reflection but that essentially abandons the speed of compiled code in favour of runtime interpretation as well as further degrading type safety. I don’t have a big problem with this on my personal projects but I feel bad doing it in production code.
Generics aren’t currently a perfect solution but they are very helpful so I’ll use them extensively throughout my examples and contrast them with alternative approaches where time allows.
Testing also benefits from both Closures and Generics so I’ll include examples of test code using both to write declarative tests and then to reduce the amount of code repetition involved. The same principles apply to benchmarking so we'll explore these as well.
If time allows I’ll include a Reflection example to highlight how much more legible Generic Functions are and also how much better their performance is.
By the end of the session I’ll have covered these topics in sufficient depth that anyone with a basic knowledge of Go will be able to have fun exploring further.
Generics, Reflection, and Efficient Collections
This is a talk about how we structure and collate information so as to effectively process it, the language tools Go provides to help us do this, and the sometimes frustrating tradeoffs we must make when marry the real world with the digital.
We'll start by looking at basic collection types in Go: array, slice, map, and channel. These will then be used as the basis for our own user defined types with methods for processing the collected items.
These methods will then be expanded to take functions as parameters (the higher order functional style popularised by languages such as Ruby) and by using Go's Reflection package we will generalise them for a variety of tasks and uses cases.
Reflection adds an interpreted element to our programs with a resulting performance cost. Careful design can often minimise this cost and it may well amortise to zero on a sufficiently large collection however there is always greater code complexity to manage. When the data to be contained in a user defined collection is homogenous we can reduce much of this complexity by using Generics and our next set of examples will demonstrate this.
At the end of this talk you should have some useful ideas for designing your own collection types in Go as well as a reasonable base from which to explore Reflection, Generics, and the Higher-Order Functional style of programming.
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top