• BFPG Monthly Meetup
    Type Providers in F# Type Providers are a feature that is unique to F#. They fundamentally expand on the idea of a type system, and allow for dynamic types to be generated at compile time, and statically verified before compilation is complete. These types can be used to provide data to the application from remote sources, and make "Intellisense" a tool for exploring datasets. Computational biology is a sector that generates a huge amount of data, with limited options for exploration. Using a type provider to enable quick exploration, as well as type safety when processing, could help researchers work faster and more efficiently. - A brief introduction to type providers - A look at a couple of the common type providers (JSON, CSV, SQL) - A look at a new type provider for bioinformatic data, pulling from Genbank. Real World Haskell: A TUI e-mail client There is a myriad of free software e-mail clients to choose from. However only few support a text user interface and fast indexing. - Quick introduction to brick and how to build text user interfaces - How do we extensively test purebred? - What have we done to leverage Haskell to build a better client than what is available today? - What have we learned so far?

    Data61/CSIRO Fortitude Valley

    Level 2, T C Beirne Centre, 315 Brunswick Street, Fortitude Valley 4006 QLD · Brisbane

    1 comment
  • BFPG Monthly Meetup
    We've got some shorter talks this month: - Just Enough Lens to be Dangerous - The Errors Package - Types, Kinds and Higher Kinded Types - (any others that people are up for presenting: message Ben if you can. There is about 20 mins that we could spend on talks).

    Data61/CSIRO Fortitude Valley

    Level 2, T C Beirne Centre, 315 Brunswick Street, Fortitude Valley 4006 QLD · Brisbane

    3 comments
  • BFPG Monthly Meetup
    Appetite for dysfunction - Andrew McMiddlin Property based testing is an unreasonably effective technique for finding bugs and providing minimal test cases to reproduce those bugs. It achieves this by randomly generating inputs, providing those inputs to the software under test, and ensuring that the outputs uphold some desirable properties. Property based state machine testing extends this technique to more easily test stateful software, using state machines to model the application while ensuring that the model and application continue to agree. `hedgehog`, as its project page tells us, will eat all your bugs. More specifically, it is a Haskell library that provides excellent support for both of these styles of testing. Although `hedgehog` is a Haskell library, its usefulness is by no means limited to testing Haskell code. In fact, coupled with some other libraries and tools, it can be used to great effect when testing any software. Even something like... WordPress. WordPress, for anyone who hasn't investigated setting up a blog in the last 15 years, is a blogging platform implemented using PHP and MySQL. WordPress is not written in Haskell or anything resembling a functional programming language, its REST API is under specified, and it makes extensive use of JSON objects with fields that may or may not appear depending on the context in which the object is used. At first this might not appear to be a good candidate for testing with a typed, functional language. Appearances can be deceiving. Haskell and its ecosystem are well equipped to tackle this problem, bringing with them all of their usual benefits. You don't have to take my word for it either -- I've written the code. In this talk I will provide a tour of the tools and techniques I've employed to test WordPress. The main players are: `hedgehog` to perform state machine testing, including concurrency tests. `servant` to generate client request functions given a specification of the REST API. `dependent-map` to model the dynamic JSON objects. The final ingredient in this functional, testing cocktail is Nix. I will briefly show how NixOps and Nixpkgs provide a means to specify a test environment in a succinct and declarative manner, and then deploy that specification to a virtual machine for testing. Attendees should leave the talk with a high-level understanding of state machine testing and the tools and techniques that can be employed to test complex APIs not written in Haskell. All source code will be made publicly available under an open source licence after the talk. ----- Laws! - George Wilson Laws, laws, laws. It seems as though whenever we learn about a new abstraction in functional programming, we hear about its associated laws. Laws come up when we learn about type classes like Functors, Monoids, Monads, and more! Usually laws are mentioned and swiftly brushed past as we move on to examples and applications of whatever structure we're learning about. But not today. In this talk, we'll look more closely at laws themselves. Why should our abstractions have laws? We'll answer this question both by seeing powers we gain by having laws, and by seeing tragedies that can befall us without laws.

    Data61/CSIRO Fortitude Valley

    Level 2, T C Beirne Centre, 315 Brunswick Street, Fortitude Valley 4006 QLD · Brisbane

    1 comment
  • SMT Solving in Haskell - Matt Peddie
    SMT Solving in Haskell - Matt Peddie In this talk I'll explain what SMT solving is and how to use it to prove interesting things without type theory, proof assistants or a pen, along with other applications. I'll introduce the topic through the lens of the SBV library, a powerful Haskell DSL for working with SMT problems.

    Data61/CSIRO Fortitude Valley

    Level 2, T C Beirne Centre, 315 Brunswick Street, Fortitude Valley 4006 QLD · Brisbane

  • Hedgehog State Machine Testing & Typescript Sodium (+React)
    Property Based State Machine Testing - Andrew McCluskey Automated testing is key to ensuring the ongoing health and well being of any software project, giving developers and users confidence that their software works as intended. Property based testing is a significant step forward compared to traditional unit tests, exercising code with randomly generated inputs to ensure that key properties hold. However, both of these techniques tend to be used at the level of individual functions. Many important properties of an application only appear at a higher level, and depend on the state of the application under test. The Haskell library hedgehog, a relative newcomer to the property based testing world, includes facilities for property-based state machine testing, giving developers a foundation on which to build these more complicated tests. In this talk, Andrew will give you an introduction to state machine property testing using hedgehog.He'll start with a quick refresher on property based testing, followed by a brief introduction to state machines and the sorts of applications they can be used to model. From there, he'll take you on a guided tour of hedgehog's state machine testing facilities. Finally, Andrew will present a series of examples to show off what you can do and hopefully give you enough ideas to start applying this tool to your own projects. The application being tested will be a servant web application, and examples will include testing fundamentals such as content creation and deletion, uniqueness constraints, and authentication. An intermediate knowledge of Haskell and familiarity with property based testing will be beneficial,but not essential. The slides and demo application will be available after the talk for people to study in detail. Typescript Sodium & React Typescript has an implementation of Sodium that gives a really nice way of managing time varying state. In this talk, we'll learn a little bit of FRP, how it could be a good replacement the redux side of react and why at this point it can't stand on it's own like reflex does in the GHCJs space. This could be a very good option if you've got a typescript/react/redux front end and would like to make it a little more functional. We may also even learn something about about a pen and paper RPG called Deadlands along the way. :)

    Data61/CSIRO Fortitude Valley

    Level 2, T C Beirne Centre, 315 Brunswick Street, Fortitude Valley 4006 QLD · Brisbane

    1 comment
  • BFPG Monthly Meetup
    This month we have two talks which will also be featured in the YOW! Lambda Jam program later in May. **Contravariant Functors: The Other Side of the Coin - George Wilson** Since their introduction, Applicative and its sidekick Alternative have become ubiquitous and beloved type classes in Haskell and similar languages such as Purescript. By contrast, their contravariant counterparts are relatively unknown. These contravariant structures are useful, and their time has come! In this talk, we will learn about Contravariant, and its subclasses Divisible and Decidable. How do they work? How do they relate to the classes we know? Are they useful? For what? This talks aims to demystify these classes in an approachable way, by demonstrating their use with practical motivating examples. **Taming the C monster: Haskell FFI techniques - Fraser Tweedale** Haskell has a powerful foreign function interface (FFI) for interfacing with C libraries. Haskell is a great language for building libraries and tools, but interoperability requirements or time constraints can make the FFI a compelling option. Binding to a non-trivial C library presents several challenges including C idioms, memory management, error handling and more. This presentation will address a selection of these concerns, using hs-notmuch, a binding to the notmuch mail indexer, as a case study. We will discuss: - FFI basics and tools to assist binding authors - working with "double pointer"-style constructors - working with iterators; how to do lazy iteration - how to use Haskell's garbage collector to manage lifecycles of external objects, and "gotchas" encountered - using types to enforce correct use of unsafe APIs - performance considerations (including profiling results) The presentation will conclude with a mention of some important FFI concepts that were not covered (e.g. callbacks) and a look at how hs-notmuch is being used in the Real World. Developers familiar with C will get the most out of this talk (because there will be limited time to explain C idioms, memory management, etc). To varying degrees, most of the concepts and techniques discussed will apply to other languages' FFIs.

    Data61/CSIRO Fortitude Valley

    Level 2, T C Beirne Centre, 315 Brunswick Street, Fortitude Valley 4006 QLD · Brisbane

  • BFPG Monthly Meetup
    **Scrap Your Boilerplate with Lens - Isaac Elliott** Recursion leads to boilerplate - if you've ever written a function that visits all the elements in a recursive data structure, then you've written this boilerplate. There are two families of solutions to this problem: recursion schemes, and "Scrap Your Boilerplate" (SYB). The recursion schemes approach requires that your data structure be "recursion schemes compatible", and then provides functions that work generically over all such datatypes. On the other hand, the SYB approach requires a function that describes how to traverse a structure, and implements generic combinators that use this function. I'll be talking about a modern incarnation of SYB found in Haskell's lens library, known as Plated. Plated uses existing optics machinery to do boilerplate-free folds and traversals over recursive data structures. One particularly useful example is from the realm of programming languages, where Plated trivialises the idea of composing and applying optmisation rules to a syntax tree.

    Data61/CSIRO Fortitude Valley

    Level 2, T C Beirne Centre, 315 Brunswick Street, Fortitude Valley 4006 QLD · Brisbane

  • BFPG Monthly Meetup
    **VENUE CHANGE** for the March meetup. Our usual home is unavailable. The meetup will be hosted at Red Hat. Attendance is capped due to capacity constraint. === Functional programming tasting plate - Dave Laing === There are plenty of talks that introduce the basics of functional programming, and there are quite a few talks that try to explain some complex conceptual or theoretical piece of the puzzle. This is not either of those talks. Instead, we'll be taking a series of shallow dives into a handful of libraries and tools in the functional programming space that are particular good at getting people excited. The main theme will be showing off the nice things you can unearth if you have a community of motivated and curious folks from a lot of different domains and have them dig in a lot of different directions. To that end we'll be looking at some interesting tools for abstraction, parsing, concurrency, rest APIS, testing and benchmarking. === An Accessible Introduction to Dependent Types - Donovan Crichton === This talk will introduce the concepts of dependently-typed programming from a use-case driven point of view. We'll introduce the fundamentals of dependent types and give you the basic tools needed to produce dependently typed programs in the functional language (that supports dependent types!) of your choice. Specifically we'll have examples from Haskell and Idris, showing where and how Haskell has support for dependently typed programs, and where Idris (which fully supports dependent types) can pick up the slack! This is a practical talk with no references to category theory or type theory, the concepts will come from everyday (and some not-so everyday) practical examples! We'll cover: GADTS and Closed Type Families in Haskell, and their equivalent in Idris (Dependent data-types and Type-level functions), and some examples from the problem that introduced the speaker to dependent types from the areas of Artificial Intelligence and Domain Specified Languages. This is an intermediate-level talk and knowledge of the following would be very useful: Haskell/Idris Syntax (they're basically the same!), Parameterised Data Types, and Functions.

    Red Hat

    193 North Quay, Level 3(at the corner of Herschel and North Quay) · Brisbane

  • Everyday Scala & Show me the Monoids
    Your Everyday Scala - Jacob Wang ----------------------------------------------- This talk will introduce you to Scala, a hybrid OO/FP language running on the JVM. We will cover its language features, library/tooling ecosystem as well as our own experience running Skedulo's backend almost entirely in Scala. Show me the Monoids - Nat Dash ---------------------------------------------- In this talk we will discuss monoids and how they are defined. We will look at some examples of how this abstraction can make code cleaner. Finally, we will take a look at how monoids are used in a general purpose data structure - finger trees.

    Data61/CSIRO Fortitude Valley

    Level 2, T C Beirne Centre, 315 Brunswick Street, Fortitude Valley 4006 QLD · Brisbane

    4 comments
  • BFPG Monthly Meetup
    Intro to Typeclasses, From S to F - Owen Harvey A beginners guide. What are typeclasses and why should you care about them? Typeclasses are an interesting and powerful mechanism in Haskell for dealing with abstraction. This talk covers several of the common typeclasses that are used in Haskell today. We will be looking at what these typeclasses do, how you reason about, abstract, and refactor your code by depending on typeclasses. How to Tame a Data Format - George Wilson Many programmers, data scientists, and other science and mathematics professionals spend a lot of time cleaning and working with data stored in nested formats, such as JSON; or in tabular formats, such as CSV. There are many libraries in many languages for reading and writing these formats. In strongly statically-typed languages, we achieve a benefit by imposing structure onto the parsed data. The messiness of real data makes this challenging, but hope is not lost! This talk will discuss design decisions made in existing open source libraries, and highlight the tools and techniques for designing practical and general purely functional libraries to work with these formats, while maintaining the benefits of strong static typing. We will learn about Encode and Decode type classes, zippers, and some different philosophies about error handling. We will see what differences exist in the application of these tools to nested and tabular data formats. An attendee will leave this talk with an understanding of the design of a modern functional encoding and decoding library. You should be able to jump into one of these libraries and understand how the pieces fit together. New tools will be added to your toolbelt for when you come up against a data format and need to write your own library.

    Data61/CSIRO Fortitude Valley

    Level 2, T C Beirne Centre, 315 Brunswick Street, Fortitude Valley 4006 QLD · Brisbane

    1 comment