a.shortbrain

Open-source, Unix and python related ressources
home » tags » linux

Haskell installation under gentoo

I wanted to test xmonad, mostly because it's compatible with gnome (the panel, session, etc..). xmonad is written in haskell, so a/the haskell compiler is needed, and probably a recent version is better. The haskell overlay does not really work well.

Anyway, in order to compile the haskell compiler, we need the haskell compiler (inifinite loop here). It should be done by the ebuild (portage stuff) of ghc but.. it failed.. the only way I have found is to install a old version with binary and next update from this one (now we have a ghc binary).

$ USE="binary" emerge -D =dev-lang/ghc-6.6.1
$ emerge -D ghc

And, it should be OK. I'm following this guide, almost.

PS : xmonad is like dwm and wmii, but, better and extensible... Yes, I'm a geek..

edit : I was wrong, the binary is not available for the last last version (an unstable one). It's so simple, just install the ghc-6.6.1 version with the flag binary, and that's all folk.. xmonap is really the best window manager ever.

$ USE="binary" emerge -D ghc

¶ Last update : November 2nd, 2007 at 3:23PM

¶ October 31st, 2007 at 7:38PM, in haskell, gentoo, linux and ghc.

Configuration

It's an article about my computers configuration. Well, it's not really obvious without any other information. I'll write specific article about specific software like Emacs or Eclipse, but, I want to share my configuration files, tips & tricks, so here it is.

Read more..

¶ Last update : October 28th, 2007 at 11:21PM

¶ October 6th, 2007 at 2:57PM, in configuration, linux, unix, emacs, script, python and bash.

I switch !

No, I don't use Mac Os X for the moment, so I'm not a switcher in the geek common sense, but.. I switch..

Three or four month ago, I was using Gnome and/or Openbox. The last three month i discover wmii and the great feature of an organized window manager. I use python-wmii, which is basically a python wrapper for wmii. It was great but, well, not really optimized.. So I switch to...

DWM

dwm is a dynamic window manager for X. It manages windows in tiled and floating layouts. Either layout can be applied dynamically, optimizing the environment for the application in use and the task performed. It is the little brother of wmii.

Everything is compiled, it's written in less than 2000 lines of code, and well.. It's heavily configurable if you have a C programming knowledge.. I'm in love...

A simple screencast is available.. I've done it late yesterday night so.. I almost forget everything I wanted to show.. but.. :D

¶ September 4th, 2007 at 2:32PM, in linux, xorg, window, manager, dwm and wmii.

Rxvt-unicode tips

rxvt-unicode is my preferred terminal application, over xterm, gnome-terminal or else. Well, it's a little bit ugly by default, but with a .Xdefault customized, it come beautiful and really essential. But first, why choosing urxvt [1]. Let's see on the web site

Its main features (many of them unique) over rxvt are:
  • Stores text in Unicode (either UCS-2 or UCS-4).

  • Uses locale-correct input, output and width: as long as your system supports the locale, rxvt-unicode will display correctly.

  • Daemon mode: one daemon can open multiple windows on multiple displays, which improves memory usage and startup time considerably.

  • Embedded perl, for endless customization and improvement opportunities, such as:
    • Tabbed terminal support.
    • Regex-driven customisable selection that can properly select shell arguments, urls etc.
    • Selection-transformation and option popup menus.
    • Automatically transforming the selection once made.
    • Incremental scrollback buffer search.
    • Automatic URL-underlining and launching.
    • Remote pastebin, digital clock, block graphics to ascii filter and whatever you like to implement for yourself.
  • Crash-free. At least I try, but rxvt-unicode certainly crashes much less often than rxvt and its many clones, and reproducible bugs get fixed immediately.

  • Completely flicker-free.

  • Re-wraps long lines instead of splitting or cutting them on resizes.

  • Full combining character support (unlike xterm :).

  • Multiple fonts supported at the same time: No need to choose between nice japanese and ugly latin, or no japanese and nice latin characters :).

  • Supports Xft and core fonts in any combination.

  • Can easily be embedded into other applications.

  • All documentation accessible through manpages.

  • Locale-independent XIM support.

  • Many small improvements, such as improved and corrected terminfo, improved secondary screen modes, italic and bold font support, tinting and shading.

  • Encapsulation of privileged operations in a separate process (improves security).

  • Optimised for local and remote connections.

The main point here are : unicode support, daemon mode, Embedded perl (for endless customization and improvement opportunities). It support tabs and lot's of other thing with this embedded perl. Let's see what is my current configuration.

urxvt*foreground: gray
urxvt*background: #23292f
urxvt*color0:         rgb:60/60/60
urxvt*color1:         #ba8b8b
urxvt*color2:         #86af80
urxvt*color3:         #c6d01e
urxvt*color4:         #3c8ec4
urxvt*color5:         #9a70b2
urxvt*color6:         #9fc1cc
urxvt*color7:         rgb:a0/a0/a0
urxvt*color8:         #71a3b7
urxvt*color9:         #e5505f
urxvt*color10:        #8cba87
urxvt.color11:        #e0d95c
urxvt*color12:        #5899c4
urxvt.color13:        #ad73ba
urxvt*color14:                #338eaa
urxvt*color15:                #f7f7f2
urxvt*font:                   xft:ProFontWindows:size=9:antialias=true
urxvt*scrollBar:              false
urxvt*VisibleBell:      true
urxvt*saveLines:              2000
urxvt*secondaryScroll: true
urxvt*perl-ext-common: matcher,tabbed
urxvt*urlLauncher: firefox
urxvt*martcher.button: 1
urxvt*termName: rxvt

When tabbed is used, you will have something like the following figure. The keybindings are the following :

  • SHIFT+Down to create a new tab
  • SHIFT+Left to go to the next tab by the left
  • SHIFT+Right to go to the next tab by the right

Using the mouse works too.

EDIT : update of my configuration.

urxvt*foreground: gray
urxvt*background: #23292f
urxvt*color0:         rgb:60/60/60
urxvt*color1:         #ba8b8b
urxvt*color2:         #86af80
urxvt*color3:         #c6d01e
urxvt*color4:         #3c8ec4
urxvt*color5:         #9a70b2
urxvt*color6:         #9fc1cc
urxvt*color7:         rgb:a0/a0/a0
urxvt*color8:         #71a3b7
urxvt*color9:         #e5505f
urxvt*color10:        #8cba87
urxvt.color11:        #e0d95c
urxvt*color12:        #5899c4
urxvt.color13:        #ad73ba
urxvt*color14:                #338eaa
urxvt*color15:                #f7f7f2
urxvt*font:                   xft:Consolas:size=8:antialias=true
urxvt*scrollBar:              false
urxvt*visualBell:      true
urxvt*cursorBlink:      true
urxvt*cursorUnderline:  true
urxvt*saveLines:              2000
urxvt*secondaryScroll: true
urxvt*perl-ext-common: matcher,tabbed,selection-popup,option-popup,searchable-scrollback<M-s>,readline
URxvt.keysym.C-M-r: perl:selection:rot13
urxvt*martcher.button: 1
urxvt*termName: rxvt
URxvt.tabbed.tabbar-fg: 81
URxvt.tabbed.tabbar-bg: 80
URxvt.tabbed.tab-fg:    7

And we can see something like the following figures.

http://a.shortbrain.org/pub/screenshots/screenshot-20070830@132214.png

rxvt-unicode with tab enabled (update) with GNU/Screen launched and attached in.

[1]uxrvt is rxvt-unicode in fact, and the binary to launch

¶ Last update : October 13th, 2007 at 12:09PM

¶ August 30th, 2007 at 11:22AM, in linux, unix, terminal, console, rxvt, unicode, urxvt, tips and tab.