MudBytes
» MUDBytes Community » Language Discussions » Ruby » input evaluation
Pages: << prev 1, 2 next >>
input evaluation
JohnnyStarr
Wizard






Group: Members
Posts: 823
Joined: Feb 14, 2009

Go to the bottom of the page Go to the top of the page
#1 id:36513 Posted Oct 18, 2009, 8:51 pm

I'm trying to figure out why exactly Putty sends a signal on connection, i pasted it below, but its really just boxes:
Code (text):
1
2
3
4
5
 
input> "���� ����'������"
 


Either way, i need to be able to run some type of pre evaluation of the input, I'm new to Ruby
so any help would be great! So far i've been playing with a regexp:
Code (text):
1
2
3
4
5
 
unless data =~ /abcdefghijklmnopqrstuvwxyz1234567890/i
 


But I'm sure there's a better way.  :wink:
.........................

"It's not the daily increase but daily decrease. Hack away at the unessential." - Bruce Lee
Southlake Window Cleaner

Scandum
Wizard






Group: Members
Posts: 1,404
Joined: Aug 8, 2006

Go to the bottom of the page Go to the top of the page
#2 id:36514 Posted Oct 18, 2009, 8:58 pm

I believe it sends out some telnet negotiations. Try to print the characters as decimal values to make more sense of it.
.........................
TinTin++ Mud Client - I can't believe it's not butter!

Last edited Oct 18, 2009, 8:58 pm by Scandum
Runter
Wizard






Group: Members
Posts: 1,851
Joined: Jun 1, 2006

Go to the bottom of the page Go to the top of the page
#3 id:36522 Posted Oct 19, 2009, 3:39 am


I don't really understand what you mean.  Do you want to filter out all non-alpha numeric?
.........................
CoralMud project

For once you have tasted flight Ruby you will walk the earth with your eyes turned skywards,
for there you have been and there you will long to return. --
                                              Leonardo Da Vinci Yukihiro Matsumoto

Chris Bailey
Wizard




Group: Members
Posts: 602
Joined: Sep 13, 2008

Go to the bottom of the page Go to the top of the page
#4 id:36523 Posted Oct 19, 2009, 3:54 am

Hey, what exactly you want to do with that data is important in determining how to handle it. What is the goal?
.........................
If what Proust says is true, that happiness is the absence of fever, then I will never know happiness. For I am possessed by a fever for knowledge, experience, and creation.

JohnnyStarr
Wizard






Group: Members
Posts: 823
Joined: Feb 14, 2009

Go to the bottom of the page Go to the top of the page
#5 id:36561 Posted Oct 19, 2009, 5:24 pm

Runter said:

I don't really understand what you mean.  Do you want to filter out all non-alpha numeric?

Yes, I did at one point.

Chris Bailey said:
Hey, what exactly you want to do with that data is important in determining how to handle it. What is the goal?


I realized after reading up on the Telnet support that they are in fact telnet options as Scandom said.
I was able to develop a quick routine to handle it, but I still havent figured out how to handle byte-by-byte support for Win32 telnet systems. Does anyone have a good example of how one might go about this?
.........................

"It's not the daily increase but daily decrease. Hack away at the unessential." - Bruce Lee
Southlake Window Cleaner

Tyche
Wizard






Group: Members
Posts: 1,349
Joined: May 23, 2006

Go to the bottom of the page Go to the top of the page
#6 id:36562 Posted Oct 19, 2009, 5:43 pm

staryavsky said:
I was able to develop a quick routine to handle it, but I still havent figured out how to handle byte-by-byte support for Win32 telnet systems. Does anyone have a good example of how one might go about this?


Yes
.........................
http://jlsysinc.gotdns.com/ladybug_laugh2.jpghttp://jlsysinc.gotdns.com/teensymud_250x80.pnghttp://jlsysinc.gotdns.com/palin_calendar.jpg
For now we see through a glass, darkly; but then face to face: now I know in part; but then shall I know even as also I am known.


Scandum
Wizard






Group: Members
Posts: 1,404
Joined: Aug 8, 2006

Go to the bottom of the page Go to the top of the page
#7 id:36567 Posted Oct 19, 2009, 6:49 pm

staryavsky said:

I was able to develop a quick routine to handle it, but I still havent figured out how to handle byte-by-byte support for Win32 telnet systems. Does anyone have a good example of how one might go about this?

One thing to keep in mind is that Vista comes with telnet disabled, so it's a bit of a useless exercise trying to support it.
.........................
TinTin++ Mud Client - I can't believe it's not butter!

JohnnyStarr
Wizard






Group: Members
Posts: 823
Joined: Feb 14, 2009

Go to the bottom of the page Go to the top of the page
#8 id:36568 Posted Oct 19, 2009, 6:54 pm

Scandum said:
staryavsky said:

I was able to develop a quick routine to handle it, but I still havent figured out how to handle byte-by-byte support for Win32 telnet systems. Does anyone have a good example of how one might go about this?

One thing to keep in mind is that Vista comes with telnet disabled, so it's a bit of a useless exercise trying to support it.

Come on man, what about all those Win95 users out there!!!  :wink:
Just call me paranoid, but if you go down that road, what terminal dosn't support ANSI color ETC.
.........................

"It's not the daily increase but daily decrease. Hack away at the unessential." - Bruce Lee
Southlake Window Cleaner

JohnnyStarr
Wizard






Group: Members
Posts: 823
Joined: Feb 14, 2009

Go to the bottom of the page Go to the top of the page
#9 id:36569 Posted Oct 19, 2009, 6:56 pm

Tyche said:

Fantastic!
.........................

"It's not the daily increase but daily decrease. Hack away at the unessential." - Bruce Lee
Southlake Window Cleaner

quixadhal
Wizard






Group: Members
Posts: 1,473
Joined: Oct 17, 2007

Go to the bottom of the page Go to the top of the page
#10 id:36585 Posted Oct 20, 2009, 7:57 pm

staryavsky said:
Scandum said:
staryavsky said:

I was able to develop a quick routine to handle it, but I still havent figured out how to handle byte-by-byte support for Win32 telnet systems. Does anyone have a good example of how one might go about this?

One thing to keep in mind is that Vista comes with telnet disabled, so it's a bit of a useless exercise trying to support it.

Come on man, what about all those Win95 users out there!!!  :wink:
Just call me paranoid, but if you go down that road, what terminal dosn't support ANSI color ETC.


This one doesn't!  Mine is amber though, and currently doesn't work :(
.........................
http://i302.photobucket.com/albums/nn96/quixadhal/DramaBytes.png

Last edited Oct 20, 2009, 7:58 pm by quixadhal
David Haley
Wizard






Group: Members
Posts: 6,912
Joined: Jun 30, 2007

Go to the bottom of the page Go to the top of the page
#11 id:36588 Posted Oct 20, 2009, 11:14 pm

It's no surprise that MUDs as a genre haven't evolved much if that's the target client architecture...
.........................
-- d.c.h --
BabbleMUD Project (custom codebase)
Legends of the Darkstone (head coder)
http://david.the-haleys.org
.........................

Scandum
Wizard






Group: Members
Posts: 1,404
Joined: Aug 8, 2006

Go to the bottom of the page Go to the top of the page
#12 id:36598 Posted Oct 21, 2009, 9:17 am

Especially if you consider that the VT220 has more advanced terminal handling than the average mud client.
.........................
TinTin++ Mud Client - I can't believe it's not butter!

Tyche
Wizard






Group: Members
Posts: 1,349
Joined: May 23, 2006

Go to the bottom of the page Go to the top of the page
#13 id:36602 Posted Oct 21, 2009, 10:52 am

David Haley said:
It's no surprise that MUDs as a genre haven't evolved much if that's the target client architecture...

Scandum said:
Especially if you consider that the VT220 has more advanced terminal handling than the average mud client.


The challenge of moving mud server developers out of the 1960's teletypes and into the 1970's virtual terminals is apparently insurmountable. ;-)
.........................
http://jlsysinc.gotdns.com/ladybug_laugh2.jpghttp://jlsysinc.gotdns.com/teensymud_250x80.pnghttp://jlsysinc.gotdns.com/palin_calendar.jpg
For now we see through a glass, darkly; but then face to face: now I know in part; but then shall I know even as also I am known.


Runter
Wizard






Group: Members
Posts: 1,851
Joined: Jun 1, 2006

Go to the bottom of the page Go to the top of the page
#14 id:36606 Posted Oct 21, 2009, 2:00 pm


Tyche said:
David Haley said:
It's no surprise that MUDs as a genre haven't evolved much if that's the target client architecture...

Scandum said:
Especially if you consider that the VT220 has more advanced terminal handling than the average mud client.


The challenge of moving mud server developers out of the 1960's teletypes and into the 1970's virtual terminals is apparently insurmountable. ;-)


Yes, We can.
.........................
CoralMud project

For once you have tasted flight Ruby you will walk the earth with your eyes turned skywards,
for there you have been and there you will long to return. --
                                              Leonardo Da Vinci Yukihiro Matsumoto

JohnnyStarr
Wizard






Group: Members
Posts: 823
Joined: Feb 14, 2009

Go to the bottom of the page Go to the top of the page
#15 id:36629 Posted Oct 22, 2009, 7:37 pm

quixadhal said:
This one doesn't!  Mine is amber though, and currently doesn't work :(


What's with the Duracell? What kind of crazy hack is that?
.........................

"It's not the daily increase but daily decrease. Hack away at the unessential." - Bruce Lee
Southlake Window Cleaner

Last edited Oct 22, 2009, 7:37 pm by staryavsky
Pages:<< prev 1, 2 next >>
Tags
[+]

Valid XHTML 1.1! Valid CSS!