Semantics for probabilistic programming, Dr Chris Heunen

Semantics for probabilistic programming, Dr Chris Heunen

03.10.17, 1pm, Room JCB 1.33B

Abstract: Statistical models in e.g. machine learning are traditionally
expressed in some sort of flow charts. Writing sophisticated models
succintly is much easier in a fully fledged programming language. The
programmer can then rely on generic inference algorithms instead of
having to craft one for each model. Several such higher-order functional
probabilistic programming languages exist, but their semantics, and
hence correctness, are not clear. The problem is that the standard
semantics of probability theory, given by measurable spaces, does not
support function types. I will describe how to get around this.

Monads and Lenses – Dr James Cheney

Event details

  • When: 17th July 2017 13:00 - 14:00
  • Where: Cole 1.33a
  • Format: Colloquium, Seminar

Talk Title:  Monads and Lenses


Monads are an abstraction that can be used to mathematically model computational effects (among other things).  Lenses are an abstraction for bidirectional computation, a generalization of the view-update problem.  In this talk I will discuss ways to combine them and why it might be interesting to do so.


This talk is on joint work with Faris Abou-Saleh, Jeremy Gibbons, James McKinna and Perdita Stevens conducted as part of the recently-concluded project “A theory of least change for bidirectional transformations”.

Please take part in our 10 minute survey about the use of Open Researcher and Contributor IDs (ORCID):

Are you a researcher or research student? Please take part in our 10 minute survey about the use of Open Researcher and Contributor IDs (ORCID):

This survey aims to establish the extent to which researchers at the University of St Andrews are using ORCID identifiers during their work. The survey will collect anonymous data about the awareness and use of ORCID iDs amongst researchers and will only take 5 – 10 minutes to complete.

You will be able to indicate your interest in taking part in a follow-up interview. This is entirely voluntary and does not affect participation in the online survey or its results.

You will also have a chance to win a £100 Amazon voucher by providing your email address at the end of the survey. Again, this is entirely voluntary and will be independent from participation in the voluntary follow-up interviews.

This research is carried out in the context of an MSc project by Eva Borger at the School of Computer Science in collaboration with the University Library. For more information, contact Eva at .

To access the survey, follow this link:

Responses will be collected until 14th July 2017.

Ethics approval: CS12882

If you would like help setting up an ORCID ID or linking it to your Pure Profile, you can contact Jennifer Pritchard or Norman Stewart at .

The Library’s Digital Research division also holds Open Office Hours every Wednesday 2pm-4pm, in the Old Union Diner, Butts Wynd (off North Street) where the team are available for advice regarding Open Access, Research Data Management, Pure, ORCID, Research Computing and Digital Humanities

Thank you!


Eva Borger

PhD (Neuroscience)

MSc Student Management and IT

University of St Andrews

School of Computer Science



Graduation Celebrations

Wednesday 21st June

As usual the school will host a small reception in the Jack Cole coffee area between 10.30 and 12.30, come along and enjoy a glass of bubbly and a cream cake or two in true Computer Science fashion!

All graduating students, their guests and staff members are invited.


Translational Research into Common Psychiatric Disorders, Professor Douglas Steele, Professor of Neuroimaging / Consultant Psychiatrist, University of Dundee

Event details

  • When: 24th April 2017 14:00 - 15:00
  • Where: Cole 1.33a
  • Format: Colloquium, Seminar, Talk

Translational Neuroimaging Based Psychiatric Research

Computational methods are having a considerable influence on contemporary neuroscience research: in data collection (non-invasive functional brain imaging), data analysis and computational modelling of healthy and abnormal brain and behaviour. The presentation is in two parts. Part 1 is an overview of the current main computational-neuroscience areas in research. Part 2 focuses on some recent high impact research into potential empirical and mechanistic biomarkers for psychiatric disorders.

Implementing Event-Driven Microservices Architecture using Functional programming

Event details

  • When: 8th March 2017 15:00 - 16:00
  • Where: TBA
  • Series: CS Colloquia Series
  • Format: Colloquium, Seminar


BIO: Nikhil Barthwal is a polyglot programmer currently working as a Senior Software Engineer at, an e-commerce startup recently acquired by Walmart. He works in the Tools & Productivity team with the aim of making developers more productive, as well as improving the quality of the code. Outside of work, he is involved with local meetups in New York city where he gives talks on various topics related to technology. He holds a Master’s in Computer Science with special focus on Distributed Systems and a Bachelor’s in Electrical Engineering.

ABSTRACT: Web services are typically stateless entities, that need to operate at scale at large. Functional paradigm can be used to model these web services work and offer several benefits like scalability, productivity, and correctness.

This talk describes how implemented their Event-Driven Microservices using F#. It covers topics like their Microservices, Event-Sourcing, Kafka, Build & Deployment pipeline. The objective of the talk is show how to create a scalable & highly distributed web service in F#, and demonstrate how various characteristics of functional paradigm capture the behavior of such services architecture very naturally.

The technology driving the evolution of internet advertising, targeted advertising or intrusive surveillance?

Event details

  • When: 27th February 2017 14:00 - 15:00
  • Where: Cole 1.33b
  • Format: Colloquium, Seminar


 Tim Palmer read Computational Science in St Andrews graduating in 1993.

 Initially working for Oracle in London then San Francisco, he went on to work in Investment Banking Technology for over a decade.

 Most recently Tim was CTO for The Exchange Lab – a programmatic marketing company.

 He is now Senior Partner in Digiterre, a technology consultancy working for a wide variety of software projects across London.



 In 1997 internet advertising consisted of simple “click me” banner adverts.

 By 2011 around two hundred digital marketing firms followed us around the internet encouraging us to “complete that purchase”.

 Today more than four thousand technology firms provide marketing technology seemingly to help us keep track of The Kardashians.

 In the seminar, a simple HTML and JavaScript snippet will be used to explain the basics of digital marketing; how these building blocks are making fortunes for some and providing free internet for everyone; and how the technology presents a real challenge to protect our online privacy.

 Or to put it another way, the 8 Most Shocking Secrets of Digital Marketing – you won’t believe the 7th one.


Chris Norval wins best paper at Mining Online Health Reports workshop

St Andrews researchers Chris Norval and Tristan Henderson won the Best Paper award at the Mining Online Health Reports workshop, part of the ACM International Conference on Web Search and Data Mining (WSDM 2017). The workshop brought together experts from academia, industry and the health sector to discuss techniques and future priorities for analysing online data for health research.

Norval and Henderson’s paper argued that the successful exploitation of people’s social data requires new and usable methods of obtaining consent, and proposed the use of machine learning algorithms to predict when someone is likely to give consent for their data to be used. This work forms part of a Wellcome Trust funded project on understanding consent for sharing health data over online social networks.

 “Unfrying your brain with F#”  Andrea Magnorsky, Workday Software Ltd

Event details

  • When: 6th March 2017 16:00 - 17:00
  • Where: Cole 1.33a
  • Format: Colloquium, Seminar


 F#, just like other non-pure functional languages, allows you find the sweet spot between FP practices and OO language pragmatism. Most of the advanced features of F# give you the power to change the language and to introduce a higher level of abstraction to your code. In this talk, we will discuss active patterns, computation expressions, parsers, using type providers and more. These language features help you make your code simpler and easier to maintain.



 I ended up as a Software Developer, I am pretty sure there was no other viable option. My current technical interests are F#, games, programming languages and philosophy of computing .

I really enjoy finding different ways to write code, sometimes for performance, other times for succinctness, sometimes, just because you can, there is no better way to learn than trying.

When I am not working I tend to play with Haskell or other languages or cats