Making a choice from a list in Haskell, Vty (part 5, the last one)

The time has come for the final installment of this series of “discussions of a refactoring”. These are the earlier installments. This is where I finally add the ability to collapse a list item. This is a rather terse description of the changes, since I feel all of them are fairly obvious, and hence require …

Continue reading ‘Making a choice from a list in Haskell, Vty (part 5, the last one)’ »

Share

Fork/exec in Haskell

Here’s some simple code I put together. I’m mostly posting it so I won’t have any problems finding it in the future. module Main where   import Control.Monad import System.Exit import System.Posix.IO import System.Posix.Process   executeChild = do mapM_ closeFd [stdInput, stdOutput, stdError] devnull <- openFd "/dev/null" ReadWrite Nothing defaultFileFlags dup devnull; dup devnull executeFile …

Continue reading ‘Fork/exec in Haskell’ »

Share

Making a choice from a list in Haskell, Vty (part 4)

After part 3 in this series, which might have been the longest post I’ve ever put on this blog, follows a much short post. In fact it’s so short it’s rather silly. In this post I’ll modify the Option type to render into multiple lines; two in fact (it’s easy to see that it would …

Continue reading ‘Making a choice from a list in Haskell, Vty (part 4)’ »

Share

Making a choice from a list in Haskell, Vty (part 3)

This is the third part, and it’s likely to be the longest one in the series. The three previous parts have been rather short, but now it’s time for a longer post because in this one I completely change the representation of the options that are rendered. Instead of using a list and an integer …

Continue reading ‘Making a choice from a list in Haskell, Vty (part 3)’ »

Share

Ping server in Haskell (not that kind of ping, and rather silly)

Yesterday I needed to do some tests involving tunneling of network connections. Rather than firing up the full client-server setup that I want to tunnel I thought I’d use someting simple to test with first. Instead of looking online for a simple server to use, or hack one up using netcat, or even hack one …

Continue reading ‘Ping server in Haskell (not that kind of ping, and rather silly)’ »

Share