Hi,

the /$objtype/bin/im/* seems to be a good idea at first, but I'm more
for an upas/fs approach where you have a generic interface with protocol
specific modules (pop3, imap), this also has its implications on the
/mnt/im as the protocol specific's will be hidden too, that way the fs code
is not duplicated in every im specific protocol client.

and what about if you want to be connected to more than 1 irc server?
that breaks /mnt/im/irc, that's why I think that /net like fs would be
better, this what I have in mind:

/mnt/im
	0
		channels		/* nil with protocols that don't support channels */
			#plan9
				ctl	/* op features */
				data	/* chat */
				stats /* channel stats (topic, nusers, ...)*/
		ctl			/* talk to the server (away, nick, whatever) */
		stats			/* status of the connection */
		users		/* users on server generated on demmand as you
					    sugested */
			quintile
				ctl	/* ignore, give op, whatever*/
				data /* chat */
				stats /* user stats (idle time, real name, ...) */
	clone			/* connect to a server with a supported protocol */
	ctl				/* protocol independent part */


note that "users" and "channels" have the same files, so they could be, just
/mnt/im/0/chat/
				#plan9
					ctl
					data
					stats
				quintile
					clt
					data
					stats

'#plan9' and 'quintile' could be generated on demmand or just by openning some chat/clone file.
/mnt/im/0/chat
			0
				ctl
				data
				stats
			clone

well, I don't know what's better, but anyway a fs like this will hide every protocol
specific part, so the client would be simpler to implement.

webfs is designed with this idea in mind, even if it's not implemented you could
add file:// and ftp:// and the client wouldn't notice the difference between http,
file or ftp.


anyway, just some random thoughts ☺

---

Federico G. Benavento

> Hi,
> 
> Sorry been busy.
> 
> Russ wrote this email
> 
> http://groups.google.com/group/comp.os.plan9/msg/0204f56bce7cacf2?dmode=source
> 
> I asked him about it and he replied:
> 
>> That comment (in the 9fans message) is almost
>> everything I wrote for that particular attempt!
>> I fear I've lost even that now.
>> 
>> One thing I was planning was to split out the
>> network file system code from the rest of the
>> program, so that if you wanted to write a file
>> server that looked just like something that
>> belonged in /net, you didn't have to rewrite
>> the fs part again and again.  Sshnet is probably
>> the best starting point for that.
>> 
>> There is a plan9port acme IRC client at http://swtch.com/irc.tar.gz.
>> I've announced it on #9fans but nowhere else.
>> The whole mux and subscribe stuff is way too complicated
>> for a standalone client (I'm about to rip it out) but it's
>> necessary and maybe even reasonable for a chatfs.
>> Or maybe something simpler would be just as good.
>> The more I play with it the more ridiculous it seems.
>> I might have been overdesigning.  Certainly the base-level
>> IRC parsing code (Imsg* routines) is worth reusing.
>> The Isub* code maybe not as much.
>> 
>> Just last night I started over and wrote an AIM TOC acme
>> client from scratch and I think I ended up with a much
>> simpler program and a better separation between the
>> chat interface and the underlying protocol.  I plan to move
>> the IRC code over and then release them together.
>> 
>> I feel kind of bad that 1) there isn't a chatfs and 2) I'm
>> writing chat clients without doing the chatfs, but it's just
>> so much harder to use file systems here in Unixland 
>> that it's just not worth the effort to me.  It would have
>> some nice benefits to be sure, though, like having a
>> single session that you could import from anywhere.
>> I'd really like that.
>> 
>> 
> 
> My ideas have altered a bit since then, I think we should have
> 
> 	/386/bin/im/irc
> 	         im/msim
> 	         im/yahoo
> 	         im/icq
> 	         etc...
> 
> These take similar arguments:
> 
> 	im/irc [net!]host[!port] [user or #channel]...
> 
> and mount themselves on /mnt/im/...
> 
> thus
> 
> 	im/irc irc.freenode.org '#plan9' fgb
> 
> would give
> 	/mnt/im
> 		msim
> 		yahoo
> 		irc
> 			#plan9
> 				data
> 				users	list of who is connected
> 				status	topic, operator flags etc
> 				ctl	operator features (low priority idea)
> 			fgb
> 				data
> 				status	(realname, host, user, away-string, idletime)
> 				ctrl	(ignore ems ? :-)
> 
> These data files are streams that you can connect to using con -l
> or perhaps later a more cleverer client which might do bold/underline etc,
> though con would do me fine.
> 
> You can connect to other channels/clients on the fly by walking to
> their directory, eg
> 	ls /mnt/im/irc/__20h__
> 
> The im/* programs would send plumb messages to a faces-like program to display
> the currently active users - maybe anyone who has spoken to you in the last 10 mins.
> 
> I thought of keeping the list sorted in order of who spoke last but I think that
> would be too distracting.
> 
> right click on a users face to start a 1-2-1 private chat with them
> right click on a channel face to start chatting with that channel.
> 
> The faces-like program would then send a seccond plumb message
> to start your favorite user interface (con -l for me).
> 
> Ok,
> 
> Loads of ideas.
> 
> I have written... not much, a reasonably structured single threaded IRC client
> which keeps track of the users on the channel. It also does some simple formatting
> to make the conversation easier (for me) to read, eg, from today:
> 
>> fgb
>> 	ah, you are talking about the channel stack
>> 
>> noselasd
>> 	fgb: no, the stack for all 100 procs he'll have.
>> 	the stackS
>> --------- 3 min
>> 
>> fgb
>> 	ok, so there is no problem, and he is just whining
>> --------- 5 min
>> 
>> Djoobstil
>> 	me ?
>> 
>> fgb
>> 	yes
>> 
> 
> 
> The idle time is printed only if its greater than 3 mins,
> and if you hit return you get the time between the last
> comment and "now".
> 
> It has one command, ? which lists all users, their real names,
> and idle times - sorted by idle time, this will go when the faces-like
> prog appears.
> 
> eg:
> 
>> ?
>> eeemess           0:02:43 n=ems@unaffiliated/ems Your ad here
>> npe_?             0:06:12 n=npe@v129-22-126-45.VCLIENT.CWRU.Edu Noah Evans
>> npe?              0:16:25 n=npe@ryo4218.naist.jp Noah Evans
>> idealm            0:22:07 n=ideal@222.67.232.135 Mark
>> perspectival      0:38:30 n=silas@kr.bk.cz gaim
>> fgb?              1:11:56 n=fgb@186-227-235-201.fibertel.com.ar Federico G. Benavento
>> sqweek            1:29:42 n=sqweek@203.161.72.120.dyn.amnet.net.au sqweek
>> noselasd?         1:29:42 n=noselasd@80.239.96.162 Firefly
> 
> I would be interested in any thoughts.
> 
> -Steve
> 
> This email and any attachments is confidential, may be legally privileged and is intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender.
