xmobar-0.4 - the xmonad status bar - released!

hi!
I've just released xmobar-0.4, my XMonad status bar:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar-0.4
XMobar is a minimalistic text only status bar.
What's new:
- many performance improvements on the monitors side;
- added a (sort of) library for writing monitors;
- every monitor takes a set of command-line options to set:
* high and low thresholds,
* high, normal and low colors
* output template. Try for instance xmb-weather --help
Example:
[15:47:29]$ xmb-weather -t "<station> <tempF>, <rh>, (<hour>)" EGPF
Glasgow Airport

* Andrea Rossato (mailing_list@istitutocolli.org) wrote:
XMobar is a minimalistic text only status bar.
What's new: - many performance improvements on the monitors side; [...] Any suggestion, comments, critics are welcome.
I would suggest to consider improving overall memory usage: PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command 12955 robert 15 0 37932 2512 1508 S 0.0 0.7 0:00.03 ./dist/build/xmobar/xmobar 12956 robert 15 0 37932 2512 1508 S 0.0 0.7 0:00.01 ./dist/build/xmobar/xmobar 12958 robert 18 0 37932 2512 1508 S 0.0 0.7 0:00.02 ./dist/build/xmobar/xmobar 12961 robert 15 0 37932 2512 1508 S 0.0 0.7 0:00.00 ./dist/build/xmobar/xmobar 12954 robert 15 0 37932 2512 1508 S 0.0 0.7 0:00.09 ./dist/build/xmobar/xmobar That's how it looks on my machine with the default config. I.e. compiled xmobar and spawned it. Just for comparision purposes: 2982 robert 15 0 5640 2436 1528 S 0.0 0.7 0:01.95 /home/robert/bin/xmonad 2981 robert 15 0 4044 984 796 S 0.0 0.3 0:00.14 dzen2
All the best, Andrea
Regards, Rob.

On Thu, Jul 05, 2007 at 05:10:10PM +0200, Robert Manea wrote:
* Andrea Rossato (mailing_list@istitutocolli.org) wrote:
XMobar is a minimalistic text only status bar.
What's new: - many performance improvements on the monitors side; [...] Any suggestion, comments, critics are welcome.
I would suggest to consider improving overall memory usage:
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command 12955 robert 15 0 37932 2512 1508 S 0.0 0.7 0:00.03 ./dist/build/xmobar/xmobar 12956 robert 15 0 37932 2512 1508 S 0.0 0.7 0:00.01 ./dist/build/xmobar/xmobar 12958 robert 18 0 37932 2512 1508 S 0.0 0.7 0:00.02 ./dist/build/xmobar/xmobar 12961 robert 15 0 37932 2512 1508 S 0.0 0.7 0:00.00 ./dist/build/xmobar/xmobar 12954 robert 15 0 37932 2512 1508 S 0.0 0.7 0:00.09 ./dist/build/xmobar/xmobar
well, this does not tell me much, actually... xmobar is linked to everything needed to run a haskell binary in your system, and all this stuff must be loaded. have a look here: http://virtualthreads.blogspot.com/2006/02/understanding-memory-usage-on-lin...
Just for comparision purposes:
2982 robert 15 0 5640 2436 1528 S 0.0 0.7 0:01.95 /home/robert/bin/xmonad 2981 robert 15 0 4044 984 796 S 0.0 0.3 0:00.14 dzen2
This is just a misleading statement: dzen is using a lot of library that are already loaded into memory. This is not a useful comparison. You should know that. But if I'm getting something wrong please let me know. Anyway thanks for your kind attention. Ciao Andrea

* Andrea Rossato (mailing_list@istitutocolli.org) wrote: [...]
12954 robert 15 0 37932 2512 1508 S 0.0 0.7 0:00.09 ./dist/build/xmobar/xmobar
well, this does not tell me much, actually... xmobar is linked to everything needed to run a haskell binary in your system, and all this stuff must be loaded.
True for the virtual memory size. Still, the question remains why does xmonad which is obviuosly also linked to "everything needed to run a haskell binary" _not_ use equally much memory? The answer might be: because xmobar uses some really huge libraries that are not being used by/shared with any other haskell prog i use. So if I go one step further i could conclude that I'm spending a lot of precious memory for only a single application.
have a look here: http://virtualthreads.blogspot.com/2006/02/understanding-memory-usage-on-lin...
Just for comparision purposes:
2982 robert 15 0 5640 2436 1528 S 0.0 0.7 0:01.95 /home/robert/bin/xmonad 2981 robert 15 0 4044 984 796 S 0.0 0.3 0:00.14 dzen2
This is just a misleading statement: dzen is using a lot of library that are already loaded into memory. This is not a useful comparison. You should know that.
Well, in my opinion the comparision _is_ useful because it shows 2 things: * A haskell programm with a fair bit higher complexity than xmobar needs way less memory or said in other words does not need that many huge supporting librarieѕ as xmobar. * A program (dzen) with a somewhat comparable feature set needs way less memory. Sure you could argue that ps shows bogus for multiple instances of a process etc. but used libraries need to be mapped and if they are huge and only used by a single program they simply waiste memory. Please do not take this as any kind of offense, i just wanted to point out the obvious :):
Ciao Andrea
Bye, Rob.

On Thu, Jul 05, 2007 at 06:57:27PM +0200, Robert Manea wrote:
True for the virtual memory size. Still, the question remains why does xmonad which is obviuosly also linked to "everything needed to run a haskell binary" _not_ use equally much memory?
The answer might be: because xmobar uses some really huge libraries that are not being used by/shared with any other haskell prog i use. So if I go one step further i could conclude that I'm spending a lot of precious memory for only a single application.
I totally agree with you.
* A haskell programm with a fair bit higher complexity than xmobar needs way less memory or said in other words does not need that many huge supporting librarieѕ as xmobar.
xmobar is doing far more complex things than xmonad is doing. just read the code. Xmonad does nothing but keeping track of the windows you open, in a very well design data structure. xmobar parses, forks threads, opens, closes files in very small amounts of time, writes variables shared by threads, and does a lot of very highly difficult operations. Look, I'm far from saying that xmobar is a nice piece of code (I don't care that much, about xmobar, or just about my coding capacity). But it does a lot of very complicated things. Probably in the most inefficiently conceivable way. Still a lot of stuff. Go read it!
* A program (dzen) with a somewhat comparable feature set needs way less memory.
yes, and it requires learning a very complicated programming language, with manual memory allocation and uncontrolled side effects. Memory is cheap, bro...;-)
Please do not take this as any kind of offense, i just wanted to point out the obvious :):
we are just sharing code and opinions. this is just great, isn't it? ciao Andrea

On Thu, Jul 05, 2007 at 06:57:27PM +0200, Robert Manea wrote:
* Andrea Rossato (mailing_list@istitutocolli.org) wrote: [...]
12954 robert 15 0 37932 2512 1508 S 0.0 0.7 0:00.09 ./dist/build/xmobar/xmobar
well, this does not tell me much, actually... xmobar is linked to everything needed to run a haskell binary in your system, and all this stuff must be loaded.
True for the virtual memory size. Still, the question remains why does xmonad which is obviuosly also linked to "everything needed to run a haskell binary" _not_ use equally much memory?
The answer might be: because xmobar uses some really huge libraries that are not being used by/shared with any other haskell prog i use. So if I go one step further i could conclude that I'm spending a lot of precious memory for only a single application.
Just for comparision purposes:
2982 robert 15 0 5640 2436 1528 S 0.0 0.7 0:01.95 /home/robert/bin/xmonad 2981 robert 15 0 4044 984 796 S 0.0 0.3 0:00.14 dzen2
What leads you to the conclusion that xmobar is using considerably more memory than xmonad? According to the figures that you yourself post, they are using the same amount (to within a few %). Stefan

On Thu, Jul 05, 2007 at 07:32:00PM +0000, Xavier Maillard wrote:
What does it look like ?
http://gorgias.mine.nu/xmobar/xmobar-0.4.jpg The status bar at the very bottom of the screen. All the best. Andrea

Andrea Rossato
On Thu, Jul 05, 2007 at 07:32:00PM +0000, Xavier Maillard wrote:
What does it look like ?
http://gorgias.mine.nu/xmobar/xmobar-0.4.jpg
The status bar at the very bottom of the screen.
Really nice ! I will try it. Xavier

Andrea Rossato
The status bar at the very bottom of the screen.
Would you mind eventually posting your whole config (xmonad and xmobar) so I can try it here ? I am really no haskell master at all and tweaking Config.hs is too hard :) Thank you.

On Thu, Jul 05, 2007 at 10:13:04PM +0000, Xavier Maillard wrote:
Would you mind eventually posting your whole config (xmonad and xmobar) so I can try it here ? I am really no haskell master at all and tweaking Config.hs is too hard :)
Sure. This is my xmobar config (works with the darcs version. For 0.4
change "font" to "fonts", "height" to "hight" and "
participants (4)
-
Andrea Rossato
-
Robert Manea
-
Stefan O'Rear
-
Xavier Maillard