ephemient (ephemient) wrote,

In the footsteps of wmii

dtlin@burnup:~$ wc dwm-3.8/*.[ch]
  402  1274  9459 dwm-3.8/client.c
   99   593  3859 dwm-3.8/config.arg.h
   97   588  3862 dwm-3.8/config.default.h
  136   448  2911 dwm-3.8/draw.c
  147  1003  6186 dwm-3.8/dwm.h
  365  1025  8124 dwm-3.8/event.c
  255   779  4816 dwm-3.8/layout.c
  325  1066  9123 dwm-3.8/main.c
  154   425  2836 dwm-3.8/tag.c
   54   142  1053 dwm-3.8/util.c
 2034  7343 52229 total
dtlin@burnup:~$ cat dwm-3.8/*.[ch] | gzip -9 | wc -c
13749
dtlin@burnup:~$ wc xmonad/*.hs
   97   584  3787 xmonad/Config.hs
  184   848  5877 xmonad/Main.hs
  223  1242  7822 xmonad/Operations.hs
  179  1334  7148 xmonad/StackSet.hs
  114   567  3708 xmonad/XMonad.hs
  797  4575 28342 total
dtlin@burnup:~$ cat xmonad/*.hs | gzip -9 | wc -c
9073

(I failed at counting the first time I tried to compare them.  Computers are really much better at this than I am.)

Both dwm and xmonad are minimalistic X11 window managers, roughly equivalent in goals.  Not that comparing anything to C is ever fair, but note that dwm, written in C, is nearly triple the line count of xmonad, written in Haskell.  xmonad even supports Xinerama, which dwm doesn’t do.

Surprisingly, dwm only contains about 20 lines dedicated to memory management and not much more dealing with linked list management, while xmonad contains 180 lines for a rotating stack data structure.  i.e., dwm is unusually small and xmonad is unusually large, for C and Haskell projects.
Tags: geek
  • Post a new comment

    Error

    default userpic
  • 3 comments