## Archive for the ‘Uncategorized’ Category

I’m studying modal logic with the Konyndyk textbook and (the philosophical aspect) of kripkean semantics with “Naming and necessity”. That should be a factor on deciding whether the new blog goes or not to planet haskell, as the recent drug-oriented material isn’t representative of *everything* I like about the world.

Filed under: Uncategorized | Closed

I’m moving all my blogging activity — I even transported the posts and comments from here — to dayvancowboy.org. Whether the address at Planet Haskell should be changed is a judgement call on the Planet Haskell admins as the new blog contains vast amounts of nonhaskell material, (there is some maths though), but basically […]

Filed under: Uncategorized | Closed

I use last.fm, which means in effect I’m giving up large ammounts of privacy — the kind of music I listen to — for the sake of social networking (which in the end I don’t use at all) and fun stats. And that’s okay; at least the terms of service assure me that We won’t […]

Filed under: Uncategorized | 15 Comments

Just been implementing sentential logic as I progress through the textbook. module Main where import Control.Monad data Formula a = Prim a | (Formula a) :+ (Formula a) | (Formula a) :* (Formula a) | (Formula a) :-> (Formula a) | Not (Formula a) deriving Show (<->) :: (Formula a) -> (Formula a) -> (Formula […]

Filed under: Uncategorized | 7 Comments

### Magic Caesar autodecipher

import Char import List charRot r w = let base = (if isUpper w then 65 else 97) in if (isAlpha w) then chr (base + (mod ((ord w) – base +r) 26)) else w strRot r w = map (charRot r) w unRot w = [strRot r w | r<-[1..26]] countString st = [length […]

Filed under: Uncategorized | 9 Comments

I’ve mentioned over and over and over again that I’m not a programmer, but a econometrician. Today we put that to good use. 1. The problem I can think of two ways of producing the list of divisors of a number: divisors x = [ y | y<-[1..x], (gcd x y) == y] fdivisors x […]

Filed under: Uncategorized | 2 Comments

### A quick me-too and a suggestion

First of all, let me get this out of my system: Ok, now I have one more reason not to move out from WordPress.com The LaTeX people should, by now, have a simple “web” version of LaTeX that can be easily installed by dropping files in your cgi-bin directory. The vast majority of people with […]

Filed under: Uncategorized | 1 Comment

In some of the graphs in Bycicling for Collatz (the divisibility graph with lots of arrows and the collatz one with 1, 2 and 4 highlighted) we manipulated the Haskell-generated graph either in the DOT file source or directly in the Graphviz GUI. The structure itself was somewhat confusing, too; the Dot class never managed […]

Filed under: Uncategorized | Leave a Comment

### Bicycling for Collatz

Q: How many people with ADD does it take to change a lightbulb? A: HEY! Let’s ride bikes! module Bikes where Graphviz is fun. Graphviz is fair. You may already have one. You may already be there: data Arr a = a :-> a Graphviz plots graphs from .DOT files consisting of remarkably simple syntax: […]

Filed under: Uncategorized | 6 Comments

### The Gee-Whiz Monad (I)

[] is really the gee-whiz monad. Haskell code that prints *all the five-number combinations of integers in [-5..5]: mapM (\x->[x+i | i<-[-5..5]]) [1..5] No, really, try it. This has to qualify as the “most surprisingly long output” line of code in all of computer programming.

Filed under: Uncategorized | 3 Comments