Imagine this: you load up a 4chan chat page, and you're connected to another user to chat one on one. Completely at random, with no traces of identity whatsoever. That's it. There could be a button to get a new person if you really don't like who you're talking to or you've seen them before, or you could just hit F5. In the true spirit of Anonymous, you could talk about anything in complete freedom.
I think that could be pretty awesome (and also pretty fail, but such is the way of all things chan), and it's an idea that I've had in the back of my mind for a while. I don't have the wherewithal to make it happen, however, so by /img/'s recommendation I'm here pitching it to /prog/ in the hope that someone will get inspired and make this happen. I'd really like to see it made real. I have to imagine that it would be very simple to make, although finding a good host and getting people to use it is another matter.
Anyone's interest piqued?
Name:
Anonymous2007-12-05 19:05
>>1
That's a pretty amusing idea and easy enough to implement, too. You're wasting your time here, though, /prog/ never delivers anything, ever. I bet lots of people could hack something up in Python/Perl + Javascript real quick, post the code and let you handle the rest, like the actual CSS + HTML page layout. It's sad, really.
Only time I've seen anyone do something impressive for /prog/ was when one guy who was given random XOR encrypted files by the OP (who claimed they were Excel files) not only cracked them himself with only an hex editor and C programs he wrote himself, but also figured out what they really were. Everything else that /prog/ delivers is just 10 lines of Scheme or BBCode related programming jokes. And I'm not counting with the trolling and stupid memes you have to go through before you get meaningful replies either.
>>41
Somehow, that doesn't surprise me. Well, I've never written anything intended to function like a server before, so I'm not entirely sure where to begin. You mention python and perl, neither of which I'm familiar with, but would PHP do the job? I really ought to figure out this whole AJAX thing, especially since I'm already reasonably familiar with javascript. I don't think that's going to be a problem, but what will be is my unfamiliarity with writing code that... needs each of its instances to be in some aware of each other.
If I had to cobble something together, I suppose I'd have a function that checked a text file on the server for a unique ID and either grabbed it if it was there and wiped the file, or set its own to be grabbed on next run. Then I'd have another file to act as a kind of message board to be checked by each instance of the script for messages addressed to its own ID (the first of which would be an indication to the instance whose ID was grabbed that it had been paired up). Using text files is probably ridiculous, and maybe the entire concept is too, but that ought to illustrate my understanding (or lack thereof). Can anyone point me in the right direction?
Name:
Anonymous2007-12-05 19:41
I think if I were to implement this I'd set it up so that anons telnetted into a server that would pair up two random anons for chatting. When they typed, the characters would be echoed to a shared buffer in real time (control codes filtered out, of course).
Name:
Anonymous2007-12-05 19:46
it's not so simple to do this, because you need to use asynchronous javascript and xml or something else besides plain javascript to chat in a webpage, since webpages... they're... you know... stateless.
Name:
Anonymous2007-12-05 20:04
>>46
I kind of want to learn Erlang and then do this. I've been looking for an excuse to learn Erlang.
I hate webdev though. Fuck that.
{ new_client, ClientSock }
->
% Spawn a new thread for this client, attempt to get name
spawn( server, client_get_name, [ ClientSock, self() ] ),
% Loop
responder( ClientList );
{ client_choose_name, { ClientSock, ClientName } }
->
% Make sure the name isn't taken.
case lists:keysearch( ClientName, 2, ClientList ) of
false
->
% Add the client into the list
NewClientList = [ { ClientSock, ClientName } | ClientList ],
% Send the join message to all users
send_to_all_clients(
NewClientList,
io_lib:format(
"~s has joined the chat.~n",
[ ClientName ]
)
),
% Set up the thread to listen for that client
spawn( server, client,
[ { ClientSock, ClientName }, self() ]
),
% Loop with new client list.
responder( NewClientList );
{ value, _ }
->
% Send them a message
gen_tcp:send( ClientSock,
io_lib:format(
"The name ~s is already taken.~n",
[ ClientName ]
)
),
% Request they choose another name
spawn( server, client_get_name, [ ClientSock, self() ] ),
% Loop with old client list.
responder( ClientList )
end;
% Already looped above.
{ client_message, Msg }
->
% Message is preformatted.
% Need to send the message to all clients.
send_to_all_clients( ClientList, Msg ),
% Loop
responder( ClientList );
{ client_closed, { ClientSock, ClientName } }
->
% Remove the entry from the list, if it exists.
NewClientList = lists:keydelete( ClientSock, 1, ClientList ),
% Send message to all clients about logoff.
send_to_all_clients(
NewClientList,
io_lib:format( "~s has left the chat.~n", [ ClientName ] )
),
% loop
responder( NewClientList )
end
.
Name:
Anonymous2007-12-05 21:05
>>37
The problem with "wave(s) of the future" languages, is that they never are. And then five years down the road, they're just the "wave of fail that was ENTERPRISE GRADE five years ago". Languages like, lisp, C, etc... have been around oh... 30 years? And are still used.
Name:
Anonymous2007-12-05 23:55
ONE WORD. JAVA
Name:
Anonymous2007-12-06 3:56
>>49
Wow, awesome. Too bad that was actually the easiest part of it and (as usual with toy languages) your example is completely worthless in the real world.
Name:
Anonymous2007-12-06 4:31
>>52
haha o wow. The telecommunications industry relies on Erlang.
Name:
Anonymous2007-12-06 4:33
>>50 Languages like, lisp, C, etc... have been around oh... 30 years? And are still used.
Right. Only thing is, nobody uses LISP.
Name:
Anonymous2007-12-06 4:34
>>53
Hahahaha oh wow. Actually, the point still stands and one company isn't the telecommunications industry. Shows what you know, though.
>>55
Let's see your version of the same application in C. I'm willing to bet that it's a fuckload more convoluted than Erlang, and that's just the easiest part of the application. Thanks.
To add to this, let's see you perform runtime code-patching in anything but a "toy" language. Enjoy your measly uptimes measured in mere weeks, and your system-wide crashes when a single server fails while my language ensures that my application can stay running on my cluster with it's built-in process redundancy and error recovery systems.
Sorry if you're not used to thinking in such large-scale terms.
>>57
Let's see you do something actually useful, you moron.
Name:
Anonymous2007-12-06 4:49
>>57 Why hello thar I am an Enterprise Programmer. I do not need to know how to design stable programs, my toy language does it automagically for me.
Fix'd, Visual Basic thinking spotted. GTFO my /prog/
>>68
I know a lot of /b/tards IRL, and besides a weirder sense of humor they're pretty much regular boys and girls.
Name:
Anonymous2007-12-06 19:31
The one on one part is what makes this fail. Just make it a regular chat where everyone is named Anonymous unless they use a name and/or tripcode, like on the boards.
Name:
Anonymous2007-12-06 19:34
>>71
But then it's just like any thread on the board, except with faster spamming.
Name:
Anonymous2007-12-06 19:43
>>70 they're pretty much regular boys and girls. regular boys and girls.
boys and girls. girls
>>71
No, see it's when you get more than 2 in a room that you start to have problems. They just start copying each other and spouting the same old shit in an attempt to prove to each other that their members of the cool kids' club. Names/tripcodes only provide them with identities and make the matter worse. But with two people there's only 'me' and 'you,' and there's no sense of a group to belong to.
Name:
Anonymous2007-12-07 1:41
But what if an odd number of people are connected? Does the odd man just wait until someone else connects, or quit before that happens?
Name:
Anonymous2007-12-07 1:57
>>77
Right, he'd have to wait. Hopefully there'd be enough users that the wait would be short.
Name:
Anonymous2007-12-07 2:06
>>77
I'd suggest randomly putting him into a chat session with two others, then removing one random person and putting him into a one-to-one with someone else when they connect. Should be interesting.
Name:
Anonymous2007-12-07 5:03
I think chats should only be a minute long, then you move along. like that dance where people swap partners. i saw it in a movie.