Peterlog

  1. Requests debugging

    TIL that the Python requests library is able to dump request/response details to the debug log - quite useful for development and debugging of http clients.

    Switch it on with something like this:

    import requests
    import logging
    try: # for Python 3
        from http.client import HTTPConnection
    except ImportError:
        from httplib ...
  2. Neutronic Security

    Or: digging into Openstack Neutrons' packet filtering bowels

    The other day I had to track down weird behaviour with Neutron security groups in one of our clouds, and thought to share notes on debugging those and on Neutron networking in general 1.

    Compute node neutronics

    Recall that on a compute ...

  3. Ceph Cheatsheet

    I love Ceph to pieces! I don’t love it’s docs that much though, and I find the multi-level subcommands unintuitive at times. Quick, is it "ceph pg query x.y" or "ceph pg x.y query"? There’s some good docs out there, but to me they feel ...

  4. Clojure: Functional

    By peter

    It's been awhile, but finally I've found some time to play with Clojure again.

    Now on for some more functional programming techniques: partials, closures, higher order functions, and so on.

    Recap: composite types as functions

    Composite types can be used as functions of their elements, I wrote about ...

  5. Clojure: Set for a Lazy Life

    By peter

    I'm now reaching Pt. III of "The Joy of Clojure". The first part is about immutability and lazy evaluation.

    Recap: Benefits of Immutability

    Values are set in constructors and don't change thereafter. Makes it easier to debug and reason about programs. Implementing invariants is easier: invariants only need ...

  6. Clojure: Collecting things

    By peter

    Last time I've explored scalar data types. There are a lot of details to discover there, but on the whole that was dry stuff.

    Now for something a bit more complex: collection data types (putting the List in Lisp).

    Persistence and Terminology

    Immutable sequences are called persistent in The ...

  7. Logstash

    By peter

    When I was a System Integrator in Zug, I really learned to love log files. Indispensable for troubleshooting; and over time you learned to visualize the internal state of the trading programs just by looking at the traces.

    However, most of those logs were local. The most critical log messages ...

  8. Clojure: Scale those scalars

    By peter

    Now for some more details on fundamental data types. The fourth chapter of "The Joy of Clojure" 2nd ed. deals with some scalar data type topics. I'll cover integer overflow, keywords, symbols, metadata, regular expressions, and others.

    Overflow and Promotion

    By default, we get Longs:

    user> (def regular 23 ...
  9. This Clojure Firehose

    By peter

    Previously, I've been starting my foray into Clojure-land with some pretty basic stuff, an intro to some datastructures. Now I'm going into more interesting territory: functions, namespaces, blocks & scope.

    Functions make the Lisp go round

    Functions Anonymous

    Defining anonymous functions is done with this 'special form' ie. builtin ...

Page 1 / 7 »