• Proper Notation for Scalar Multiplication in Rust:
    Dispatching on the Right-Hand Side of Operators and Rusts's Orphan Rule

    The scalar multiplication in a vector space is written kv in math, where k is a scalar value (e.g. a number) and v is a vector. It would be nice to write k * v in programming languages, to stay close to the familiar notation. Object-oriented languages typically only support calling methods on the first argument. But the scalar normally doesn't know about vectors, so it can't easily do that.

    Python works around this with the __rmul__ special method for defining the * operator. __rmul__ is called on the right-hand side object with the left-hand side as the argument, the reverse of what __mul__ does. This works well, but feels a bit like a hack.

    In Rust each operator is defined via a single trait, for example the binary operator * is defined via std::ops::Mul.

    More ...
  • Debian Stretch on a Thinkpad Yoga 370

    Disabling Secure Boot

    To boot into Debian netinst on a USB stick I had to disable Secure Boot in the BIOS. More ...

  • Testing the delay of LPC804 PLU LUTs

    The LPC804 is a new low-end microcontroller from NXP in the LPC8xx range. The LPC804 is interesting, because so far it is the only LPC microcontroller which contains a Programmable Logic Unit (PLU), a miniature FPGA with 26 5-input lookup tables and 4 bits of state. Unfortunately NXP doesn't publish the timing parameters of this circuitry. You are supposed to use NXPs proprietary PLU configuration tool, which is available only for Microsoft Windows.

    Here is a quick measurement of the speed of the LUTs in the PLU: Oscilloscope screen with delay measuments More ...

  • Site Update

    After too many years of only minor updates (mostly my CV and a small change in the address) I finally rebuilt the site using Jekyll, which is both easy to use and seems flexible enough to do whatever I want. After two days it is up and running, including tags, less time than what I spent on the unsuccessful attempt in the intervening years. More ...

  • J-Link Internals

    J-Link circuit board
    In case you are curious, here is a picture of my Atmel SAM-ICE aka Segger J-Link board. More ...

  • Some Pictures of NXT Production Hardware

    Here are some pictures of the hardware of a production NXT.

    View of the top side of the NXT mainboard This is a view of the top of the motherboard. According to the schematics released by LEGO the part missing in the upper right was a battery current sensor on AD5. The black smudge at the square speaker connector covered an additional part in the speaker cable, a 10 Ohm resistor which is not in the schematics. I unsoldered it together with the speaker cable to get the LCD daughter board out of the way for photographing the motherboard. More ...

subscribe via RSS