[dwm] [OT] Wheel designs

From: yy <yiyu.jgl_AT_gmail.com>
Date: Thu, 19 Feb 2009 22:46:22 +0100

I find your current discussion very relevant to what I'm doing with
dio[1] now. It would really be great to share ideas and, eventually,
join efforts.
I will try to explain the different ideas I had with dio development,
it's a long history.

This is what I have now:
The main idea behind dio was a very simple player of items which could
be used for music and video. I took dmenu and extensively modified it
to display items in scrollable windows and manage button events,
depending on the command line options different actions are done when
items are clicked, added, etc. Several bash scripts run dio in
different ways:
The player reads its items from stdin, displays them and launch child
proccess to actually play the file.
A directory browser is done redirecting ls output to dio stdin and
relaunching itself when directories are selected. It is convenient to
add files to the player.
Keyboard input was already supported from dmenu, it allows to search
for items. Giving the option to redirect this input to stdout added
the possibility to turn dio into a very basic terminal emulator. I
never implemented a ptty or anything, it just redirected a shell
stdin/out, but it was pretty usable with simple programs like dc or
sic. Smaller applications like the calendar or terminal history were
straightforward.

In its current state, dio has been a test bed for ui ideas, but its
implementation lacks any kind of design, it just came up like this. In
particular, the idea of turning command line arguments into a new
language sounded like some kind of aberration to me. So, I started to
think in how to rewrite dio from scratch.

The most difficult decission is where you want to put the line of what
it will do and what you will leave to the applications. I thought in
several possibilities:
1. Make dio simpler, so that it just displays input and sends output
(events are sent as output too). In some way, this is in the path of
what Matthias is proposing. All the logic of the player, for example,
would be done by external programs and would tell dio that how to
represent the list. The problem here is that you would have to kept
two different lists of items, and process management can be tricky.
Some kind of language for communication would be needed. All the
simplicity would be gone.
2. Turn dio into a library and have different applications (which make
use of popen()) instead of scripts. It has the advantage you don't
need any new language. It could even be the right approach, in fact
the biggest problem I found with it was that libgt seemed to me like
something similar from the few informantion we have and I was waiting
to se what it exactly was.
3. Develope a small language similar to awk (a subset of) and add to
it special "patterns" and fields to manage events and make some
formating (bg color, fg color and maybe bold font, no more) and turn
dio into an interpreter. I don't have any strong fundation to suggest
this, new languages should be added only when they are really needed,
but I have been looking at yacc and lex documentation these last days
and, dude, it would be so funny...
4. Rewrite everything in the acme way. The idea to give dio more text
editing capabilities crosses my mind from time to time. acme is almost
perfect as an user interface for me, but it is an user interface for
programmers and when it comes to play music for example and all those
"desktop tasks" it just isn't the right tool. I have grasped the code
and I have to admit is too much for me, although it is a great way to
learn I'm not the right person to improve Pike's work, it is out of my
possibilities.

I started to rewrite dio from scatch and what I have now is a small
program that displays its stdin in a scrollable window and prints to
stdout the clicked items on the form "Button3 Item 1". Just that, no
more, but everything can be done from there.

As you see, this is a total rambling, but I really think we could have
something here, your ideas also look very interesting to me, and every
comment will be appreciated.

Nacht,

[1] http://code.google.com/p/dynamic-io/

-- 
- yiyus || JGL .
Received on Thu Feb 19 2009 - 21:46:22 UTC

This archive was generated by hypermail 2.2.0 : Thu Feb 19 2009 - 21:48:04 UTC