IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1822.26 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-06-09
[08:40]<xylxjzys>I only implemented a tiny piece of it and it's almost 1000 lines and I can barely manage it
[08:40]<kdzdg>AnarkiDotNET, where can i get it ;)
[08:40]<zgzzcydjvgev>we have to make it first
[08:40]<szgdvddgzgzzaxd>hmm, multiuser coding, or version control? or both?
[08:40]<zgzzcydjvgev>both
[08:40]<kdzdg>both
[08:40]<xylxjzys>it should be easy to write
[08:40]<xylxjzys>just send keystrokes to a server
[08:40]<xylxjzys>the server sequences them then sends updates to everyone
[08:40]<zgzzcydjvgev>if the multiuser server (which would be similar to an IRC server) keeps track of the state of things it should be easy to version control everything
[08:40]<szgdvddgzgzzaxd>oh, now that looks scary to do on top of a GUI
[08:40]<xylxjzys>so when you type there would be latency before it is displayed, but it should be unnoticable
[08:41]<xylxjzys>AnarkiDotNET: I'll help you with it if you want to try.
[08:41]<zgzzcydjvgev>i'll write the server
[08:41]<szgdvddgzgzzaxd>I've done that kind of thing with screen...
[08:41]<xylxjzys>I suggest we get it working outside of VS though.
[08:41]<zgzzcydjvgev>if you do the VS plugin
[08:41]<zgzzcydjvgev>or
[08:41]<xylxjzys>I'm not starting with a VS plugin :P
[08:41]<xylxjzys>the VS plugin API is very complicated
[08:41]<zgzzcydjvgev>we can write a IDE-independant class library
[08:41]<szgdvddgzgzzaxd>ok, will the plugin ultimately support more than keystrokes?
[08:41]<xylxjzys>just a Notepad equivalent would be useful as a test
[08:41]<zgzzcydjvgev>for the protocol + communication + events and such
[08:41]<kdzdg>http://www.jozjan.net/blog/index.php?gadget=Blog&action=SingleView&id=329
[08:42]<szgdvddgzgzzaxd>Notepad equivalent is already done, in some form. Let me see if I can find the doc...
[08:42]<xylxjzys>I don't know. By keystrokes I meant command, and a command can be something like "Insert 'E' at position=1242"
[08:42]<zgzzcydjvgev>yep
[08:42]<szgdvddgzgzzaxd>http://www.hezmatt.org/~mpalmer/blog/knowledge/software/screen/
[08:42]<xylxjzys>So each key you press, such as a letter, or a command such as C-v, results in a command object being sent to the server.
[08:43]<xylxjzys>The server then notifies all users connected to it, including the client that typed the command in the first place.
[08:43]<szgdvddgzgzzaxd>already done. I doubt it can be the basis for your VS plugin, but it might be nice to know
[08:43]<xylxjzys>SanityInAnarchy: It seems like both users share a common insertion point, though, if I understand the page you just posted.
[08:43]<xylxjzys>Ideally the case we are considering allows any number of users each to edit anywhere in the document...
[08:43]<zgzzcydjvgev>yes
[08:44]<zgzzcydjvgev>just a sec i'll get a document site up and start collecting ideas and putting them down
[08:44]<xylxjzys>However, we'd need some intelligent tracking... it would need to be smarter than insertion at column+line
[08:44]<szgdvddgzgzzaxd>ah, I see what you mean. So, the keystrokes get sent to the server, but going back is a bit different
[08:44]<xylxjzys>Let's say we receive two commands at the server, one slightly after the other.
[08:44]<xylxjzys>C1 is "Insert E at Line=28, Column=42"
[08:45]<szgdvddgzgzzaxd>now, here's a question -- do you do any locking? And how do you avoid tripping over each other? Or will this be intended for small groups?
[08:45]<xylxjzys>... furthermore let's assume C1 causes a new line to be added to the document somehow.
[08:45]<xylxjzys>C2 is "Insert X at Line=32, Column=0"
[08:45]<xylxjzys>If C1 is executed before C2, things will be messed up, because line 32 is actually changed to line 33.
[08:45]<zgzzcydjvgev>the server will have to process the incoming commands and update the data
[08:46]<xylxjzys>So, we'll need some interesting algorithms to properly modify commands such that C2 now modifies line 33 instead, the line as the user SAW when he issued the command.
[08:46]<zgzzcydjvgev>i'm naming this "IntelliTrack" for the moment
[08:46]<zndy_wjfnz|afk>off to work. Later all
[08:46]<xylxjzys>AnarkiDotNET, does what I'm saying about processing of incoming commands make sense?
[08:46]<szgdvddgzgzzaxd>Good luck to you, but at this point it looks no longer easy/reliable
[08:46]<zgzzcydjvgev>yes
[08:46]<xylxjzys>SanityInAnarchy: I think it will be both, we just need to identify correct behavior.
[08:47]<zgzzcydjvgev>oh it can be made to work :)
[08:47]<szgdvddgzgzzaxd>this is essentially what people have to do, often manually, with a 3-way merge
[08:47]<zgzzcydjvgev>a realtime game server does this with tens of players simultaneously
[08:47]<szgdvddgzgzzaxd>so I'll be impressed if you can make it work when someone's network blinks off for 20 secs worth of editing
[08:47]<zgzzcydjvgev>but has to deal with usuall 33-100 "ticks" per second
[08:47]<szgdvddgzgzzaxd>a realtime game server is solving a different problem
[08:47]<zgzzcydjvgev>not really
[08:47]<xylxjzys>SanityInAnarchy: But as long as people aren't working in the same position of the file, just the keystrokes themselves need to be merged... and that's easy with sequential commands.
[08:48]<szgdvddgzgzzaxd>yes, really. Because when you die because you lagged or the person wasn't where you expected them to be, oh well, you died
[08:48]<xylxjzys>It works like this:
[08:48]<szgdvddgzgzzaxd>here, it can mean code gets messed up.
[08:48]<xylxjzys>The client sends the command they wish to execute, and the *last command they saw from the server*.
[08:48]<xylxjzys>The server uses that last seen command to appropriately reposition the client's command
[08:48]<xylxjzys>Yes, if people are both modifying an individual line, things can get messed up.
[08:49]<zndy_wjfnz|afk>Xiphoris: just a quick thought: what happens with your cursor when your 'opponent' adds a new line, and thus shifts all code down one line, including the part you are editing?
[08:49]<xylxjzys>But there is of course sophisticated undo :)
[08:49]<xylxjzys>Remi_Woler|AFK: That's why the client sends last-seen-command
[08:49]<xylxjzys>If your opponents command is *after* last-seen-command, the server changes your command.
[08:49]<kdzdg>7 minutes left
[08:49]<xylxjzys>For example, if your command adds a character to line 32, and your opponent's command (which happens before yours) adds a line betwee 5 and 6, then your command is updated to modify line 33.
[08:50]<szgdvddgzgzzaxd>here's how I'd do it: Break things down into (much) smaller files, and make it easy to do so. Lock each file for writing, let people watch you type in realtime, have builtin chat (IRC/Jabber). Only one file can be edited at a time, but really, if this becomes a problem, your files are too big.
[08:50]<zndy_wjfnz|afk>Xiphoris: ic
[08:50]<xylxjzys>So if opponent adds a line at Line=1, but I haven't seen it
[08:50]<xylxjzys>I send a command to add a line at Line=10
[08:50]<xylxjzys>my last seen command was before the opponent's
[08:50]<zgzzcydjvgev>this will definately be something you will have to "get used to"
[08:50]<zgzzcydjvgev>for example if a new line causes your cursor to move down while typing
[08:50]<zgzzcydjvgev>you will have to become used to behaviour like that
[08:51]<xylxjzys>We'd reposition the cursor to stay on its line.
[08:51]<xylxjzys>If your client receives a "newline" command before your line, then everything you're working on gets updated.
[08:51]<szgdvddgzgzzaxd>hmm. How about behavior like commenting out or outright deleting what you're working on?
[08:51]<xylxjzys>We should reposition the cursor *and* scroll such that you don't even notice it.
[08:51]<zgzzcydjvgev>commented text is still text
[08:51]<xylxjzys>SanityInAnarchy: Working on the same line at the same time would be pretty hard to figure out.
[08:51]<zgzzcydjvgev>its just not compiled :P
[08:52]<szgdvddgzgzzaxd>Xiphoris: so you're locking at the level of a line, instead of a file
[08:52]<xylxjzys>SanityInAnarchy: I think we'd just have to provide undo and let users fix the situation if people are typing on the same line near the same column.
[08:52]<xylxjzys>SanityInAnarchy: I suppose we could lock; that makes sense. I was sort of just proposing the users noticing it getting jumbled and using undo.
[08:52]<xylxjzys>What would be useful is to indicate to all "players" which line others are working on.
[08:52]<xylxjzys>For instance, you see the line you're working on as being hilighted in green.
[08:52]<szgdvddgzgzzaxd>AnarkiDotNET: it'd still be fairly annoying/frightening to see your color coding disappear and all of your code suddenly be apparently-ignored...
[08:52]<xylxjzys>Other people see that line as being hilighted in red.
[08:53]<xylxjzys>Thus, when people are working near the same area they can see each other without having to type.
[08:53]<xylxjzys>If we had an in-game chat to help coordination, I think we could avoid the toe-stepping-on.
[08:53]<szgdvddgzgzzaxd>Xiphoris: the problem with undo is, think about how big CVS repositories get. (Or SVN, or SourceSafe, or whatever.)
[08:53]<szgdvddgzgzzaxd>Xiphoris: now imagine 1000 times faster revisions, at least...
[08:53]<xylxjzys>SanityInAnarchy: Every keystroke would not be a repository revision.
[08:54]<xylxjzys>Keystrokes are preserved from the last revision to the current revision, and undo works in that area only.







