This was something of an adventure, as (1) I found, and had to fix myself, a bug in Debian Stretch’s git-daemon-run package, and (2) the git-daemon config syntax was not quite intuitive to me, such that I had to tweak my parameters about five times while watching the system log, in order to export my repo.
Anyway, the clone should work from any IPv4 or IPv6 address, though I only tested IPv6. Let me know if there is a problem with IPv4 access.
I’m fond of my HackRF radio, but lost interest in working through GnuRadio Companion, because I don’t want to do any Python programming to extend the blocks. So I started looking into scheme bindings for libhackrf. There is a learning curve, for sure, but it appears that this shouldn’t be too difficult, using the Racket FFI. Here is some code (minus some important error checking) that pulls the hackrf_device_list, i.e., the struct containing information about what HackRF devices are currently plugged in to your USB:
I wanted to play around with generating an “elliptic pencil of circles” starting with the Hermatian matrices. An elliptic pencil of circles are all the circles (or some of them) which all intersect at two specific points. Here is a simple one, where the points of intersection are at (0,1) and (0,-1), or ±i in the complex plane.
You see there is the unit circle, plus the other circles branching off to each side:
The Hermatian matrix template for this particular pencil is elegant:
where n is the x coordinate of the center of each circle (or the complex number center, not having an imaginary component).
Here is Racket code used to generate the plot:
(define (matrix-circle-radius M)
(let ([A (array-ref M #[0 0])]
[d (matrix-determinant M)])
(sqrt (/ d (* -1 (* A A))))))
(define (matrix-circle-center M)
(let ([C (array-ref M #[1 0])]
[A (array-ref M #[0 0])])
(/ C (* -1 A))))
(define (circle-isoline x y r c)
(lambda (x_ y_) (sqrt (+ (sqr (- x_ x)) (sqr (- y_ y))))) r
(map (lambda (C)
(circle-isoline (real-part (first C))
(imag-part (first C))
(list 30 160 210)
(map (lambda (M)
(list (matrix-circle-center M)
(map (lambda (n)
(matrix-scale (array #[#[0 1] #[1 0]]) n)
(array #[#[1 0] #[0 -1]])))
(range 2.5 -3 -0.5))))
Schwerdteger describes an interesting “invariant” relationship between any two circles:
, , and
with the circles represented as Hermitian matrices .
The point is, in the end you come up with this single number which represents whether the smaller circle is inside the first, overlapping the first, just touching the first, or outside the first. Here are the cases:
common invariant > 1 : smaller circle contained withing the greater circle
common invariant = 1 : touching from the inside
-1 > common invariant > 1 : overlapping at two points
common invariant = -1 : touching from the outside
common invariant < -1 : completely outside
Here is Racket code used for calculations and plotting:
I have been fascinated lately with the concept of frequency spectrum and the idea that all periodic signals can be approximated by an infinite sum of sinusoidal functions. There are many introductory videos on this subject, usually titled as introductions to the Fourier transform.
He converts an off-on type of function to a fourier series. After the integration, we get this:
I translated that into some plots in Racket, to give the visual idea. Say we only add in a single sinusoid:
And a few more:
And a lot more:
And finally, hundreds of them:
It cannot quite perfectly represent the function, because the Fourier series adds an extra point in between the switch from off to on (and back), whereas the original just jumps from 0 to 1 (and back).
Here is the Racket code for those interested (I did not bother to optimize):