-
Prefix Doubling Attempts
I’ve been working on an algorithm for suffix array construction today. It’s called prefix doubling, but I don’t have a link, sorry. I think it comes from this paper but I don’t have access to it at home.
Read more… -
CPS and Iterators in C
Today, I want to talk about continuation-passing-style (CSP). This is a general approach you can use to translate recursions into tail-calls. What’s tail-calls, I (imagine hearing) you ask? A tail-call is when a function calls another function as the last thing it does.
Read more… -
C Slices
About those slices I mentioned yesterday, here’s what’s that about. I’m working on some string algorithms and more straightforward C implementations than those I put in my book. I implemented all the algorithms and data structures I use in my string algorithm class in Python and Go in the spring,^[I’m toying with the idea of writing string algorithms books for those languages, but I have a long list of writing obligations, so I don’t know if that will ever happen.
Read more… -
Macro Metaprogramming
I’ve been working on a small C library for Python- or Go-like slices the last couple of weeks. Essentially arrays, but where I can index from the end using negative numbers (like in Python) and where I can extract a sub-slice, x[i:j], in constant time (like in Go; I implement them the same way as Go does).
Read more… -
'Witness' arrays
The other day I was reminded of an exercises we got first or second year when I studied computer science. It is a cool little trick, that I’ve never seen outside of that exercise, so I thought I’d share it.
Read more… -
Krofatter Egon Samlet
Hvis nogen imod al forvendtning skulle få lyst til at læse Krofatter Egon og hjælpepakken som en samlet pakke, så har jeg lavet en EPUB og PDF version som man ganske nemt kan hente ved at klikke på de links.
Read more… -
Krofatter Egon og Hjælpepakken — 14
Is this not making any sense to you? You are not alone. If you don’t know what’s going on, or why I write in Danish, start here. Afsked med Hammel Det var midt på eftermiddagen næste dag, at Egon vågnede ved at det bankede på døren.
Read more… -
Krofatter Egon og Hjælpepakken — 13
Is this not making any sense to you? You are not alone. If you don’t know what’s going on, or why I write in Danish, start here. Opgøret Da de stadigvæk var langt fra skovbrynet kunne Uffe og Egon gennem forrude se en stor søjle af røg stige op fra et sted inde i skoven.
Read more… -
Krofatter Egon og Hjælpepakken — 12
Is this not making any sense to you? You are not alone. If you don’t know what’s going on, or why I write in Danish, start here. Rådet kommer til undsætning Egon løb imod bilen mens han vinkede med begge arme efter bedste evne.
Read more… -
Krofatter Egon og Hjælpepakken — 11
Is this not making any sense to you? You are not alone. If you don’t know what’s going on, or why I write in Danish, start here. En smugkro i skoven Egon løb.
Read more…