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






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

Go to the bottom of the page Go to the top of the page
#1 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:
.........................
Current Development: Lunacy (a Lua powered Merc project)

Scandum
Wizard






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

Go to the bottom of the page Go to the top of the page
#2 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.

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






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

Go to the bottom of the page Go to the top of the page
#3 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?
.........................
-Heath

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
Sorcerer






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

Go to the bottom of the page Go to the top of the page
#4 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.

Quote:
[ichat] Twisol@Talon: Do me, do me.

JohnnyStarr
Wizard






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

Go to the bottom of the page Go to the top of the page
#5 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?
.........................
Current Development: Lunacy (a Lua powered Merc project)

Tyche
Wizard






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

Go to the bottom of the page Go to the top of the page
#6 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,105
Joined: Aug 8, 2006

Go to the bottom of the page Go to the top of the page
#7 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.

JohnnyStarr
Wizard






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

Go to the bottom of the page Go to the top of the page
#8 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.
.........................
Current Development: Lunacy (a Lua powered Merc project)

JohnnyStarr
Wizard






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

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

Tyche said:

Fantastic!
.........................
Current Development: Lunacy (a Lua powered Merc project)

quixadhal
Wizard






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

Go to the bottom of the page Go to the top of the page
#10 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/Alelord_banner.png

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






Group: Members
Posts: 5,728
Joined: Jun 30, 2007

Go to the bottom of the page Go to the top of the page
#11 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,105
Joined: Aug 8, 2006

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

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

Tyche
Wizard






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

Go to the bottom of the page Go to the top of the page
#13 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,074
Joined: Jun 1, 2006

Go to the bottom of the page Go to the top of the page
#14 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.
.........................
-Heath

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: 550
Joined: Feb 14, 2009

Go to the bottom of the page Go to the top of the page
#15 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?
.........................
Current Development: Lunacy (a Lua powered Merc project)

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

Valid XHTML 1.1! Valid CSS!