TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

TinTin++ 1.91.1

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    The TinTin++ message board Forum Index -> Announcements
View previous topic :: View next topic  
Author Message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun Mar 01, 2009 12:16 am    Post subject: TinTin++ 1.91.1 Reply with quote


  • Added the \0xx escape code, where xx is an octal number.

  • Added the \cx escape code, where x is a control character. For example: \c[ is the same as \e.

  • Switched from POSIX regular expressions to PCRE (Perl Compatible Regular Expressions).

  • Updated actions, highlights, and substitutions to use PCRE. Their new syntax is:

    Code:

          ^   force match of start of line.
          $   force match of end of line.

          %1-%99 lazy match of any text, available at %xx (%1-%99).
          %0 should be avoided in triggers, and if left alone lists all matches.

          { } embed a regular expression, available at %xx + 1.

          [ ] . + | ( ) ? * are treated as normal text unlessed used within braces. Keep in mind that { } is replaced with ( ) when using braces.

          Of the following the (lazy) match is available at %xx + 1

          %w match zero to any number of letters.
          %W match zero to any number of non letters.
          %d match zero to any number of digits.
          %D match zero to any number of non digits.
          %s match zero to any number of spaces.
          %S match zero to any number of non spaces.
          %? match zero or one character.
          %. match one character.
          %+ match one to any number of characters.
          %* match zero to any number of characters.


  • The following incompatibilities exist:
    Code:

          [his|her] is no longer valid, use {his|her}

          %{variable} is no longer valid, no alternative available.

          ^ can no longer be used as end of line marker.

          unnumbered arguments like %w and {his|her} have the match start at %1 instead of %0.


  • #config regexp no longer works for actions, aliases, gags, highlights, prompts, and substitutions. So I guess everyone needs to go over their triggers to see if they still work if they want to use this version.


Last edited by Scandum on Sun Mar 08, 2009 5:28 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
cupcake



Joined: 06 Jun 2008
Posts: 9

PostPosted: Mon Mar 02, 2009 9:25 pm    Post subject: Reply with quote

I'm having problems with this release. First, I use /gag {^^} to gag all the extra line breaks I get, but this seems to gag everything now. Second, with my entire system loaded after fixing all the triggers, even just moving around is noticeably slower. Fighting is unacceptably slow. Lastly, I got a random crash from code that has worked just fine for numerous releases:

Code:
########################################### DEBUG STACK ############################################
DEBUG_STACK[000] = readmud(0xc6000)
DEBUG_STACK[001] = [Aetolia] do_one_line(You have recovered balance on all limbs.)
####################################################################################################
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Tue Mar 03, 2009 11:34 am    Post subject: Reply with quote

{^$} should be used instead of {^^}.


PCRE indeed appears to be slower than what tintin was originally using.

You can try to anchor as many triggers with a ^ as possible to force the beginning of the line to be matched, that might give a significant speed increase.

I'll also look into pre-compiling triggers and see if that makes a significant difference. I'll probably still have to compile triggers containing variables every time they're called.

What scripts are triggered by the 'You have recovered balance on all limbs.' line? It'd help if you can figure out how to reproduce the crash.
Back to top
View user's profile Send private message Send e-mail
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Tue Mar 03, 2009 3:49 pm    Post subject: Reply with quote

If the crash is very infrequent you can use:

#debug all log, and debugging information should be written to your log file (this requires you to log a session). This will spam your log file up quite a bit, but might help track down where tintin crashes.

Having looked into things, adding anchors probably isn't going to help a whole lot.

Hopefully pre-compiling all triggers that do not contain variables will solve the speed issue.
Back to top
View user's profile Send private message Send e-mail
cupcake



Joined: 06 Jun 2008
Posts: 9

PostPosted: Wed Mar 04, 2009 3:54 am    Post subject: Reply with quote

I've actually had to go back two versions. I never got 1.99.0, and when I started using it after going back from 1.99.1, I got weird debug stacks I never got before. I'll try to track down more information if I can with debug. Also, what exactly does pre-compiling triggers mean?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Wed Mar 04, 2009 10:24 am    Post subject: Reply with quote

The way pcre works is that you compile a regular expression, next execute it. I did some testing and execution is roughly 30% faster if I save the compilation instead of re-compiling the trigger everytime it's called.

I did some testing and pre-compiled PCRE triggers are 3 times slower instead of 5 times slower.

I'll work on a pre-parser that determines if a trigger should be parsed by PCRE or not, that way triggers that only use ^ $ and %1 to %99 will be faster.
Back to top
View user's profile Send private message Send e-mail
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Wed Mar 04, 2009 3:30 pm    Post subject: Reply with quote

I've uploaded a beta that should have much faster triggers.

Keep in mind that triggers containing $variables or @functions will need to be compiled each time they're parsed, resulting in 2 to 4x slower execution times.

Beta source code: http://tintin.sourceforge.net/download/tintin-beta.tar.gz
Back to top
View user's profile Send private message Send e-mail
ben



Joined: 04 Feb 2009
Posts: 2

PostPosted: Thu Mar 05, 2009 8:36 am    Post subject: Reply with quote

I'm having problems with this release on freebsd 7, Can anyone help me out?
Code:

$ make
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5    -c tinexp.c
tinexp.c:31:18: error: pcre.h: No such file or directory
tinexp.c: In function 'regexp_comp':
tinexp.c:172: error: 'pcre' undeclared (first use in this function)
tinexp.c:172: error: (Each undeclared identifier is reported only once
tinexp.c:172: error: for each function it appears in.)
tinexp.c:172: error: 'regex' undeclared (first use in this function)
tinexp.c:176: warning: implicit declaration of function 'pcre_compile'
tinexp.c:183: warning: implicit declaration of function 'pcre_exec'
*** Error code 1

Stop in /tmp/tt/tt/src.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Thu Mar 05, 2009 8:43 am    Post subject: Reply with quote

You'll have to install the pcre library.

The source code is available at: http://www.pcre.org/
Back to top
View user's profile Send private message Send e-mail
ben



Joined: 04 Feb 2009
Posts: 2

PostPosted: Thu Mar 05, 2009 12:20 pm    Post subject: Reply with quote

Thanks for your help.
I installed pcre v7.8 on Freebsd. But i still got some error messages as follow when i make tintin:
Code:

$ls -l /usr/local/include/pcre*
-r--r--r--  1 root  wheel  12481  3  5 23:15 /usr/local/include/pcre.h
-r--r--r--  1 root  wheel   6600  3  5 23:15 /usr/local/include/pcre_scanner.h
-r--r--r--  1 root  wheel   6216  3  5 23:15 /usr/local/include/pcre_stringpiece.h
-r--r--r--  1 root  wheel  26253  3  5 23:15 /usr/local/include/pcrecpp.h
-r--r--r--  1 root  wheel   6783  3  5 23:15 /usr/local/include/pcrecpparg.h
-r--r--r--  1 root  wheel   5029  3  5 23:15 /usr/local/include/pcreposix.h
$ make
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c action.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c alias.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c files.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c help.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c highlight.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c strhash.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c llist.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c log.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c main.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c misc.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c net.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c parse.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c path.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c update.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c history.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c tab.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c vt102.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c terminal.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c session.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c function.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c text.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c substitute.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c tick.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c telopt.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c math.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c split.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c debug.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c tinexp.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c mapper.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c tables.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c buffer.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c prompt.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c class.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c event.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c utils.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c chat.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c macro.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c config.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c gag.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c variables.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c array.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c input.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c cursor.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c memory.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c system.c
system.c: In function 'do_run':
system.c:63: warning: implicit declaration of function 'forkpty'
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c line.c
gcc -Wall -Wno-trigraphs  -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5   -I/usr/local/include -c tokenize.c
---- Linking...
gcc -Wall -Wno-trigraphs -I/usr/local/include -O2 -fno-strict-aliasing -pipe  -D_GNU_SOURCE -DHAVE_CONFIG_H -DBIG5    -o tt++ action.o alias.o files.o help.o highlight.o strhash.o llist.o log.o  main.o misc.o net.o parse.o path.o update.o history.o tab.o vt102.o  terminal.o session.o function.o text.o substitute.o tick.o telopt.o  math.o split.o debug.o tinexp.o mapper.o tables.o buffer.o prompt.o  class.o  event.o utils.o chat.o macro.o  config.o gag.o variables.o  array.o input.o cursor.o memory.o system.o line.o tokenize.o -lutil -lpthread -lz
tinexp.o(.text+0x131a): In function `regexp_compile':
[color=red]: undefined reference to `pcre_compile'[/color]
tinexp.o(.text+0x1657): In function `regexp_compare':
[color=red]: undefined reference to `pcre_exec'[/color]
tinexp.o(.text+0x17b4): In function `regexp_compare':
: undefined reference to `pcre_compile'
*** Error code 1

Stop in /tmp/tmp1/tt/src.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Thu Mar 05, 2009 12:26 pm    Post subject: Reply with quote

Try running ./configure again in tintin++.

Or edit the Makefile, look for 'LIBS = ', and add -lpcre to list.

That ought to do the trick. Smile


Also, if you're having speed issues, consider using the beta source code.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    The TinTin++ message board Forum Index -> Announcements All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group