Mailund on the Internet

On Writing, Science, Programming and more

  • Generators in C

    Now that I am almost done with The Joys of Hashing, I am looking at the material I made last year for our Genome-scale Algorithms class. I implemented a toy read mapper as an example for the final project.

    Read more…
  • Elegant Scipy

    I was a little disappointed about this. I had hoped it would give a good overview of Scipy, but instead, it is a bunch of examples that use it. It is not that the examples aren’t interesting.

    Read more…
  • Lazy queues

    The purpose of the lazy lists I implemented in my previous post was to build lazy queues. Lazy lists give you constant time concatenation, which can be useful in itself, but I needed it to implement persistent functional queues.

    Read more…
  • Lazy lists

    I wanted to write about lazy lists and lazy queues today, but I spent most of the day struggling with getting lazy evaluation to work. Finally, I convinced myself that something was broken in R, and I was justified in thinking that; upgrading to the most recent version resolved the issue.

    Read more…
  • Promises, their environments, and how we evaluate them

    Have you ever wondered how functions are evaluated? How you can have arguments that would raise errors, but do not, or how default arguments can be expressions that depend on function arguments that you haven’t seen yet when you define a function?

    Read more…
  • Functional lists and queues

    I wanted to write something about function parameters, how these are passed as so-called “promises”, how these have associated scopes (and the consequences of that), and how they give us lazy evaluation.

    Read more…
  • Seeing Further

    I also finished Seeing Further: The Story of Science, Discovery, and the Genius of the Royal Society yesterday. I found this a mixed back. When I bought it I thought it was a Bill Bryson book—I like those—but if I had checked the description just a little bit I would have seen that it is only edited by Bryson.

    Read more…
  • The Power of Habit

    In the weekend I finished The Power of Habit. This is a very interesting book. Duhigg writes about how we are run by habit to a degree I had not imagined.

    Read more…
  • Exercises (CT Chapter 9)

    Exercises Missing element You are given a sorted array, A. It contains n - 1 of the numbers from 1 to n. You should find the missing number. You can use the property that for all numbers i less than the missing number you have A[i] == i, while for all i larger than the missing number you have A[i] == i - 1.

    Read more…
  • Slides (CT Chapter 9)

    Here are some slides for chapter 9 of Introduction to Computational Thinking. Slides Handouts Handouts with notes