Sebastian Wiesner

Select talks & projects
  • Functional Programming in TypeScript (GF IT Drinkup, May 4th, 2017)
    A short tour through the state of functional programming tools in TypeScript (GF IT Drinkup, slides)
  • Beyond Cakes (Scala Meetup Munich, Aug 31st, 2016)
    The Cake Pattern and beyond—Scala dependencies without injection using free monads (slides)
Past projects
  • Flycheck (2013–2016)
    Popular GNU Emacs extension for on-the-fly syntax checking.
Select articles
  • Maven Central Releases with SBT
    Published Jul 3, 2017. Last revised Jul 4, 2017. In categories: article, scala

    Coming from Haskell and Python I found releasing a Scala library a cumbersome process. The standard Maven Central archive—JCenter claims to be a more popular alternative, but all big projects appear to prefer the former—lacks a convenient web interface like that of Python’s package index or Haskell’s Hackage, and comprehensive documentation about publishing. Getting an artifact to Maven Central for the first time involves a surprising number of manual steps and a rather elaborate SBT configuration.

    In this article I hope to connect all the loose ends and offer a comprehensive step-by-step guide from nothing to a Maven Central release. I will start with some prerequisites which lie outside the scope of this article, guide you through the necessary bureaucracy and cover the setup. At the end I’ll introduce sbt-release, a powerful plugin to automate the entire release.

    Read more…

  • Reproduce bugs in emacs -Q
    Published Nov 29, 2015. In categories: article, emacs

    When reporting issues to Emacs packages you will often find maintainers replying with “Please reproduce this issue in emacs -Q”. This article explains what this means, why maintainer may ask for this and how to use emacs -Q to reproduce an issue.

    Read more…

  • Emacs script pitfalls
    Published Aug 12, 2014. Last revised Oct 3, 2016. In categories: article, emacs

    Emacs offers some flags to use Emacs Lisp for standalone scripts, however Emacs’ decade-long history as an interactive program makes writing standalone scripts an intricate and subtle experience. This article starts with a discussion of the safe and correct Emacs Lisp shebang—which turns out to be much longer than you might expect. We then take a look at command line arguments and standard input and output of Emacs Lisp scripts, and finally conclude with some debugging tips and the recommendation to better use another language for your scripts.

    Read more…

  • Calling Python from Haskell
    Published Apr 15, 2014. Last revised Apr 16, 2014. In categories: article, haskell

    Use Haskell’s FFI interface to run Python code for fun and profit.

    Read more…

Latest articles —subscribe via Atom
  • Decode irregular JSON from Jenkins with Circe and Shapeless
    Published Dec 10, 2017. Last revised Dec 12, 2017. In categories: scala

    The popular Continuous Integration (CI) server Jenkins provides a JSON API to access information about builds. At my employer we heavily rely on Jenkins and its API to automate our integration and delivery pipeline of our Scala services; our internal tools often uses the API of our Jenkins server to get information such as the latest successful build number for versioning. The Jenkins API speaks JSON, but the JSON it returns has a rather strange shape. I need to extract the Git revision built by a job, but Jenkins hides this information in a specific object in a “catch-all” actions array which contains JSON objects of different shapes, many of which may or may not be present. With Circe—a lovely JSON library for Scala—and some Shapeless magic I managed to decode this irregular JSON in a type-safe and fail-safe way (ignoring unknown JSON objects).

    Read more…

  • Decode “flat” ADTs with Circe
    Published Nov 29, 2017. In categories: scala

    I had to talk to a web-service that returned JSON without meaningful HTTP status codes (don’t ask). All I had was the JSON itself to figure out whether the service returned a success or failure: Essentially I had to decode an ADT except that all alternatives were flattened into the same level in the JSON. A Circe decoder for these responses needed to inspect the JSON while decoding to pick the right branch.

    Read more…

  • Amazing SBT
    Published Nov 11, 2017. In categories: scala, thoughts

    SBT—Scala’s almighty build tool—continues to amaze me, both, with the amount of WTFs delivered to me, and with the sheer power it puts in my hands. Sometimes I feel like I don’t understand what’s going on at all, and then I find myself writing SBT plugins to automate complex tasks across our build and test infrastructure in a breeze. I curse at SBT when I have to explain how SBT works to my peers, and I love SBT because more than other build tools I know it helps me automate all aspects of project life cycles, even non-trivial tasks in proprietary infrastructures.

    Read more…

  • Maven Central Releases with SBT
    Published Jul 3, 2017. Last revised Jul 4, 2017. In categories: article, scala

    Coming from Haskell and Python I found releasing a Scala library a cumbersome process. The standard Maven Central archive—JCenter claims to be a more popular alternative, but all big projects appear to prefer the former—lacks a convenient web interface like that of Python’s package index or Haskell’s Hackage, and comprehensive documentation about publishing. Getting an artifact to Maven Central for the first time involves a surprising number of manual steps and a rather elaborate SBT configuration.

    In this article I hope to connect all the loose ends and offer a comprehensive step-by-step guide from nothing to a Maven Central release. I will start with some prerequisites which lie outside the scope of this article, guide you through the necessary bureaucracy and cover the setup. At the end I’ll introduce sbt-release, a powerful plugin to automate the entire release.

    Read more…

  • My mistakes with React and Redux
    Published Apr 6, 2017. In categories: thoughts

    Web Frontend Development. Loathe it or like it. I can’t say that I like it but with React and Redux a bit more than I used to. All is not gold that glitters, though, the React stack being no exception, and there’s indeed much that we did wrong in our React application. This post is my personal top three of React mistakes:

    Read more…