YAPC::EU 2016 Day 2

7 minute read

These are my notes from the talks I attended at the second day of YAPC::EU 2016.

Studying Geneva real estate prices using Perl grammars (Laurent Dami)

  • using house price data available about houses in Geneva one can see when people bought a property and when they sold it. Hence one can see the price difference over time. Sometimes an increase over one million Swiss Francs per month!
  • used Perl5 regexes to parse the data in version 1
  • problems with Perl5 regex solution:
    • incomplete
    • sometimes incorrect
    • tedious handling of whitespace
    • fragile interdependence of quantifiers
    • multiplicities in data not handled properly
  • proposed solution: go to Regexp::Grammars or Perl6 grammars
  • used model of data; based on natural language
  • difficulties:
    • syntax may vary
    • boroughs use either names or numbers
    • punctuation not always the same
    • optional words
  • now uses a Perl6 grammar to try to parse the data
  • tokens are in ratchet mode, which doesn’t allow backtracking, and aren’t frugal (are greedy)
  • one can use regexs, which allow backtracking and are frugal
  • better: use a token with .before construct rather than .+?
  • experience with Perl6
    • steep learning curve
    • beautiful assembly of powerful concepts
    • very good error messages
    • docs hard to find

Making your web application work for everyone (Job van Achterberg)

  • inclusive design/universal design
  • allow everyone be able to use something
  • apply these design concepts for the web
  • web accessibility initiative (lead by Tim Burners-Lee)
  • web content accessibility guidelines
  • 4 principles of accessibility
    • perceivable
    • operable
    • understandable
    • robust
  • ARIA - accessibile rich internet applications
  • small changes can make huge differences in internet accessibility
  • contrast is a huge win for readability
  • don’t just show things by using hover; doesn’t work on e.g. on mobile devices
  • replace CSS outline with something better; don’t use none
  • aria elements provide context for screen readers (e.g. for blind users)
  • websites should be usable with mouse, keyboard, screen reader, mobile and desktop. All of these are possible together.
  • make it visible, usable, grokable, flexible
  • use semantic html
  • use image alt text
  • use proper sectioning tags
  • headings should follow levels; don’t jump around
  • captchas are hard to see, hard to understand, hard to hear
    • Karl Groves has a list of captcha alternatives
  • progressive enhancement
    • layers: html, styled with css, behaviour added with javascript
  • tools:
  • screen readers
    • nvda: free
    • orca: from Gnome project
    • voiceover (comes with MacOS)
    • dragon
    • dolphin (costs money)

Writing XS in plain C (bulk88)

  • history of XS
    • came originally from “mus” (make user sub) in Perl 3.0
    • became “tus” in 5 alpha v 4
    • “us” became “xs”; user sub -> extension
  • gave many of the low-level details of how XS works internally
  • showed examples of Perl code translated into low-level Perl C, which avoids using XS to do the heavy lifting.
    • lots of boilerplate
    • lots of pointer arithmetic

Velociraptor in a Modern World (Mirela Iclodean)

  • works in a shop with a monolithic application from around 2000
  • a warehouse management system
  • one would expect old technologies in the codebase, however this is not the case: DBIC, Moose, perl 5.20, Plack, PSGI etc.
  • automated and continuous deployment
  • their style of agile
    • visibility (in terms of code, processes etc.)
    • clear standup updates (I can finish tomorrow, because… (specific))
    • fewer meetings
    • keep tasks nice and small
    • feedback early
    • avoid bottlenecks
    • code reviews (open to all devs in company)
    • adopt mordern tools and concepts
  • use Vagrant for dev environment creation
    • fast to get up and running for new devs
  • continuous deployment
    • ansible, vagrant, puppet, hieradata
    • took 5 months to convert to continuous deployment
  • logging
  • avoid TMTOWTDI for new people; let them know about it once they’re confident and more experienced

Starting up with Perl6 (Nigel Hamilton)

  • experience of starting up a company, from 20 years’ experience
  • ideas need to be vetted first; don’t do lots of development before you know the idea could have traction
  • one has to keep getting up after a startup failure and try again
  • now helps other founders
  • a business is a value exchange system between customers and the product; customers get value from product, customers give money for product
  • current startup process
    • feel the pain -> log it
    • does the pain come back? -> log it
    • do others have the same pain - will they pay money to fix it?
    • model the business system using the lean canvas
    • test the riskiest assumptions
    • build a minimal viable product (MVP)
  • need to test assumptions about startup ideas as soon as possible
  • serving -> learning -> earning
  • serve a need; learn from it; earn money; feed back to beginning

Go for Perl Programmers (Sue Spence)

  • a general purpose language
  • generally used for systems programming
  • “a reboot of C/C++”
  • Go’s first killer app is Docker
  • the tour on the Google Go page gives a good introduction to the language
  • http://glot.io: an open source pastebin with runnable snippets and API
  • run a program: go run <program>.go
  • install a module: go get <package>
  • Go programs are compiled to static binaries (loved by devops; makes deployment easy)
  • strong standard library (developed by Google)
  • strongly typed like C/C++; some sugar available
  • native UTF8 support
  • automatic garbage collection
  • “lightweight OO”
  • dead code is not allowed
  • bossy about formatting and “tabs won”
  • has concurrent programming support
  • has no objects or classes; no inheritance; only composition
  • methods defined on types
  • goroutines: coroutines -> lightweight threads managed by the Go runtime

9 PostgreSQL features I wish I learned earlier (Thomas Klausner)

  • pg_service.conf the connection service file
    • written like an ini file
    • define services in order to connect to the database; e.g. username, password, dbname etc.
    • separate what we want to connect to from how
  • REASSIGN OWNED: reassign user privs on tables
  • \e edit last command in favourite editor
  • infinity: simplifies queries for things that always need to be larger than a certain value, e.g. from a point in the past to whenever in the future
  • BETWEEN: select terms between two values
  • NOTIFY: simple notification system to implement job queues
    • has max length of 8000 bytes; have to keep messages short
  • common table expressions: very temporary helper tables
    • WITH something AS ( SELECT .... ) SELECT blah FROM moo WHERE condition
  • WITH RECURSIVE: recursive queries; use for e.g. trees of data
  • \x: expanded mode; good for viewing many columns
  • \o: pipe output to a file. \o filename; select * from moo; # -> goes to file
  • UPSERT either update or insert if it didn’t already exist

Lightning Talks

URL Shorteners, a numbers game (Rene Schickbauer)

  • had a new domain which used part of his nick
  • was short, so created a url shortener service
  • uses fewer bytes than bit.ly

Agent Based Modeling in Perl (Guinevere Nell)

  • agent based modelling is like a video game that plays itself
  • emergent system
  • is used to model complex systems in bio and social sciences
  • easy in Perl
  • not much in Perl atm though
  • lots of stuff written in Java
  • if written in Perl could be flexible, easy to modify, extend and understand

Using mixed CSV headers in DBI (Tux)

  • following on from his CSV talk
  • maintains DBD::CSV
  • added the new functionality from CSV::XS into DBD::CSV
  • will be released soon after tests are written

Announcing a new book (Laurent Rosenfeld)

  • has written tutorials in Perl 6, mostly on a French site, but stuff also now in English
  • looked for existing tutorials on Perl 6 and didn’t find anything
  • translated “Think Python - How to think like a computer scientist” into French
  • then had the idea of translating “Think Python” into Perl 6
  • mostly complete, one chapter still to be written

The case for academic software (José Joaquín Atria)

  • motivated by Leon’s lightning talk from yesterday
  • was in a similar position; has left academia and moved into industry
  • PhD in Speech Sciences
  • what values are ignored by academia?
    • it works for me
    • PhD abandonware
    • the worst code he’s seen comes from academics
  • values which are shared by Open Source
    • openness is important
  • not all academics miss the point of good software
  • software sustainablity institute
  • first conference of research software engineers (Sept this year)

Pipelines in Perl with eHive (Andrew Yates)

  • run compute processing workflows
  • fits with LSF
  • submits jobs to server farms automatically
  • three phases in a job
    • fetch input
    • run
    • write output

From Perl to Rust: A Journey (Lukas Mai)

  • Rust is a cool thing
  • how long to get to Rust
  • Perl and Rust are towns in Germany :-)

A few works in progress (Lee Johnson)

  • shows his photography projects, and some photos thereof
  • nice photos, work in progress, includes project about Perl programming community

London PM Infrastructure Update (Sue Spence)

  • info about London.pm infrastructure
  • to change London.pm website one can submit pull requests

Asciio, doodle with text (Nadim Khemir)

  • tmate-slave allows sharing of tmux sessions on the internet
  • dev of Asciio
  • showed examples of Asciio as videos