Unicode as she is broke
Do you think your string-handling code is robust? Are there any problems with the following snippets?
Do you think your string-handling code is robust? Are there any problems with the following snippets?
Here’s a little example of statically-sized stacks in C#. They’re implemented with a linked-list as the backing store: using System; namespace ConsoleApplication { public static class MainClass { // Example: public static void Main(string[] args) { var stack = Stack.New<int>(); // real type Stack<Z,int> var s1 = stack.Push(1).Push(2).Push(3); // real type Stack<S<S<S<Z>>>> [...]
2-pivot quicksort This posting on the Java core library mailing list proposes to replace the current quicksort with a new, 2-pivot quicksort. Ordinary quicksort in Haskell looks something like this: quicksort [] = [] quicksort (pivot:rest) = quicksort [x| x ← rest, x ≤ pivot] ++ [pivot] ++ quicksort [x| x ← rest, x > [...]
So, I thought it would be a fun idea for my first ever Lisp/Scheme program to implement Alan Turing’s original a-machines from his paper, On Computable Numbers, with an Application to the Entscheidungsproblem (paper available to public). Fun? Oh, I hadn’t any idea… Preamble; choice of implementation I decided to go with the latest and [...]