Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 05-13-2002, 11:46 AM   #1
Koryon
Member
 
Join Date: Apr 2002
Location: Canada
Posts: 50
Koryon is on a distinguished road
Send a message via ICQ to Koryon Send a message via MSN to Koryon
Just a thread for people to post thoughts on various non-C programming languages and how suited they are for muds. (Noticed mhc just registered, let's get a big push for erlang )

I'll say a bit about Perl, It's a nice interpreted typeless language, one of the best things done with it so far I've seen by someone who made a perl server based off of Vagrant, very modular, with loading of files, so just edit the source, reload that file, and changes are done.

And of course Perl has the builtin support for Regexp stuff, and can make simple scripts easy to do, here's some excerpts from my accounting scripts:

[code] # List processes without controlling TTY, Don't display header
# Show Resident Set Size, Group ID, Command line, sort numerically
system('ps -A -t ? h --format rss,gid,pid,command|sort -n >temp.txt');
$psfile = new FileHandle "< temp.txt" or die "couldn't open file\n\r";

#Determine what processes should be counted, and counts them
while ($process = $psfile->getline) {
$_ = $process;
if (/(\d+?)(\s+?)(\d+?)(\s+?)(\d+?)(\s+?)(\p{IsPrint }+)/) {
next if not $grplist{$3};
next if $1 < 1000;
$memlist{$3} += $1;
$pslist{$3} = $5;
$psname{$3} = $7;
}
}
[/quote]

This one sends me info on logins.
[code] $time = ctime(time-(60*60));

$time =~ /(\w+?)(\s+?)(\w+?)(\s+?)(\w+?)/;

$day = '"'.$1.$2.$3.$4.$5.'"';

open LASTLOG, "last -a | grep $day |";
open MAILING, "| mail -s 'User logins' tech";

print MAILING "User Logins for $day;\n\n";

while (<LASTLOG>) {
print MAILING $_;
}
[/quote]

Of course, the fact the code can get pretty cryptic (mine's not at all!! is one of the major drawbacks.
Koryon is offline   Reply With Quote
Old 05-14-2002, 04:14 PM   #2
mhc
Member
 
Join Date: May 2002
Location: Linköping, Sweden
Posts: 31
mhc is on a distinguished road
At the bottom of every MUD, there is basically a database which contains data of what objects are loaded, and their state. Ideally, that database should be distributed, and naturally it should be robust. Of course, it gets easier if the language you program in supports this. But we are lucky; there IS such a grail of programming. It is named Erlang.
mhc is offline   Reply With Quote
Reply


Thread Tools


Programming Languages - Similar Threads
Thread Thread Starter Forum Replies Last Post
Mud Programming Textbook Tezcatlipoca MUD Coding 1 04-07-2005 07:46 AM
Freelance MUD programming Seln Pseudonym MUD Coding 3 12-25-2004 01:32 PM
SIM Expands It's Programming Team Azeroth Advertising for Staff 0 08-18-2003 02:47 PM
"Other" Languages for Mud Creation kaylus1 MUD Coding 14 03-24-2003 11:50 AM
Mud Programming Language bbg Advertising for Players 1 09-28-2002 10:31 AM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 11:49 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2014