Linked by Thom Holwerda on Thu 18th Jun 2009 13:35 UTC, submitted by Jochen
Window Managers "samurai-x is a highly modular and configurable, next generation framework window manager for X. It is written in pure python utilising ctypes. samurai-x is targeted at people wishing to experiment with desktop programming and people who want more control over their desktop (without having to code in C)." Version 0.2 has been released recently.
Order by: Score:
Fear of programming in C?
by theosib on Thu 18th Jun 2009 13:57 UTC
theosib
Member since:
2006-03-02

I'm trying to decide if this is just because people don't want to take the time to learn to program C, or if in fact the amount of work a window manager has to do is so little that using an interpreted language is actually BETTER because it's more maintainable.

I know C, C++, Java, and lots of other compiled languages. Professionally, I even write quite a lot of Verilog. But honestly, if I could get a Ruby compiler that produced code that performed half as fast as what I can get out of C or C++, I'd do everything in Ruby. It just takes so much less time to code and debug.

And don't tell me about YARV. Going from an interpreted parse tree to interpreted bytecode may speed things up a bit SOMETIMES, but it's nowhere near natively compiled. And don't tell me you can't compile dynamic languages. They don't seem to have that problem with Self.

Reply Score: 3

RE: Fear of programming in C?
by sanctus on Thu 18th Jun 2009 16:01 UTC in reply to "Fear of programming in C?"
sanctus Member since:
2005-08-31

You always Lua, where jit compiled program run half C performance.

Also, I found myself being nearly as productive with ocaml, yes it's not dynamic, but its ml type system is efficient and native compiled code is near C performance.

But python got many, many libraries, strong user base and it's easy to learn for those who wants to expiriment.

Reply Score: 2

RE: Fear of programming in C?
by Tuishimi on Thu 18th Jun 2009 20:03 UTC in reply to "Fear of programming in C?"
Tuishimi Member since:
2005-07-06

Says in the text that it is for people who want more control over their window manager without having to know C.

Reply Score: 2

RE: Fear of programming in C?
by kuya on Fri 19th Jun 2009 09:07 UTC in reply to "Fear of programming in C?"
kuya Member since:
2009-06-19

It is written in python to make it smaller and easier - and yes we believe python is up to the task

Reply Score: 1

RE: Fear of programming in C?
by dagw on Tue 23rd Jun 2009 11:38 UTC in reply to "Fear of programming in C?"
dagw Member since:
2005-07-06

I'm trying to decide if this is just because people don't want to take the time to learn to program C, or if in fact the amount of work a window manager has to do is so little that using an interpreted language is actually BETTER because it's more maintainable.

I do a lot of coding in C and think it's a great language. That being said I write virtually all my actual end user applications in Python, calling out to C libraries when needed. So while I haven't looked at this particular app yet, I think that in principal they're doing the right thing.

Reply Score: 2

My 2 cents.
by clarks on Thu 18th Jun 2009 15:03 UTC
clarks
Member since:
2009-02-05

I'm not trying to knock the reason behind this window manager. What I don't understand is why is it that the wheel keeps on being reinvented over and over again? If you are going to create a new window manager, why not create something that deviates away from the traditional desktop and use it as an experiment to create something that is more intuitive than panels that run across the top and bottom of one's screen. I am not saying that I have such the idea, I'm just saying that the constant reinventing is just pointless. This is especially true if the cost outweigh the benefits. In reference to samurai, I'm not saying that the cost outweigh the benefit. I'm just saying that there should be something that it does that makes it feel different from all other window managers. Flame On!!!

Reply Score: 1

RE: My 2 cents.
by dagw on Tue 23rd Jun 2009 12:01 UTC in reply to "My 2 cents."
dagw Member since:
2005-07-06

What I don't understand is why is it that the wheel keeps on being reinvented over and over again?

As a prolific wheel re-inventor, I'll add my two cents.
Mainly I do it because in re-inventing I hope to also find a way to improve the wheel. If you've never built a working wheel you stand no chance of inventing a better one. By re-implementing known algorithms you get insights that will lead you to build better algorithms. If you start by saying I'm going to do something completely new chance are you'll get nowhere.

Also it's nice do have your very own wheel built the way you like having wheels built. Sure it might not be the fastest wheel on the block, but it's your wheel and you know exactly how to fix it when it breaks.

Thirdly (and perhaps most importantly) I like building wheels. The fact that I can download a better wheel for free in no way makes it less fun to invent your own wheel.

This is especially true if the cost outweigh the benefits.

Which is virtually never the case when it comes to Open Source. The cost to you, me and everyone else is zero, so why care.

The cost to the developers is slightly higher, but chances are that they would have spent their time playing computer games, watching movies or reading a book if they hadn't been coding (I know I would). On the other hand the benefit is quite high both from and educational and professional point of view and probably also from a 'having fun' point of view. So the cost benefit value is very much in favour of the benefit.

Reply Score: 2

Comment by memson
by memson on Thu 18th Jun 2009 15:49 UTC
memson
Member since:
2006-01-01

"... It is written in pure python..."

BING, no dice.

Reply Score: 2

RE: Comment by memson
by libray on Fri 19th Jun 2009 16:00 UTC in reply to "Comment by memson"
libray Member since:
2005-08-27

"... depending on the following libraries and modules:
ooxcb (from the git repository)
libxcb
setuptools"

DING DING
What is their definition of "pure python"

Reply Score: 2

man...
by helf on Thu 18th Jun 2009 21:16 UTC
helf
Member since:
2005-07-06

Rurouni Kenshin was so much better.

Reply Score: 5

This is cool
by deviantsink on Thu 18th Jun 2009 22:23 UTC
deviantsink
Member since:
2009-06-18

I'm already using a WM written in python, it's called Pycawm. It use Xlibs and I was thinking of trying to port it to xcb.
Here samourai-x is already using xcb so I'm going to take a close look at it.

I used to run a tweaked pwm (ion ancestor) written in C but I'm not very good at C so it was hard to add stuff.

Python is much easier for me as I use it daily at work,
so in a few days I changed all the things I wanted and got to the same point of my old wm which took me years (not fulltime) to tweak.

Reply Score: 1

Comment by aacs
by aacs on Thu 18th Jun 2009 22:56 UTC
aacs
Member since:
2008-12-13

This is good news for me, as I have been brewing window manager experiments myself in Python. It should prove valuable, as quick and dirty probing, then crystallizing is very enjoyable in that language.

Hopefully soon PyPy will have optimizing JIT, and it will apply to any dynamic language implemented in that framework so speed shouldn't be much of a problem in the near future.

Reply Score: 1