LPMuds.net

LPMuds.net Forums => Drivers => Topic started by: FallenTree on June 03, 2015, 11:58:21 am

Title: Fluffos 3.0-alpha-8.1 Releases
Post by: FallenTree on June 03, 2015, 11:58:21 am
Please checkout

https://github.com/fluffos/fluffos/releases/tag/fluffos-3.0-alpha8.1

fluffos-3.0-alpha8.1
@thefallentree thefallentree released this 2 hours ago

Significant changes
1) This release migrated significant part of local_options into runtime config. Adding set_config() efun, allowing changing runtime config. see src/testsuite/etc/config.test For up-to-date list.
2) Sync thirdparty/libtelnet @ HEAD
3) fix #251 memory accounting int overflow
4) Upgrade object ref counter to uint32, This enables large mud , and more call_outs.
5) Adding runtime config controlled new behavior : Make ed deal with chinese characters. Sprintf ignore ANSI colors.
6) Make replace_program with function reference a warning instead.
7) Restore call_out(0) prevention.
8) Some work on restore_object() to reduce memory usage etc.

Detailed change log in
fluffos:fluffos-3.0-alpha8.0...fluffos:fluffos-3.0-alpha8.1
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: DarKWateR on June 03, 2015, 07:15:58 pm
Hello, thanks for you work!!!

Finally i found the problem that i wrote in other thread (time_expression)

The problem is PRAGMA_OPTIMIZE in local_options.
With that option, the driver executes a F_TRANSFER_LOCAL instead of F_LOCAL (or F_LOCAL_VALUE, i don't remember at this moment) and then right variable lose, because transfer_local change svalue to number.

this operation is executed in generate.cc -> optimizer_end_function (in my tests)

The code for simulate this "bug" is in flag apply in master.c:
Code: [Select]
void bug(){
  string err = "", err2 = "test";
  err += err2;
  time_expression{
  debug_message(sprintf("%O %O\n", err, err2));
  };
}
void flag(string str) {
  switch (str) {
    case "test":
      bug();
      break;
  }
}
The output is "test ################" instead of "test test"

Without PRAGMA_OPTIMIZE now is OK.

I'll continue my tests in this version of driver.

Thank you!!

PD: Sorry my english :(
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: FallenTree on June 03, 2015, 10:34:03 pm
Please note:
a bug was introduced in restore_object:  Please download the new version here:

https://github.com/fluffos/fluffos/releases/tag/fluffos-3.0-alpha8.2


Thanks for the demonstration of optimize bug, that sure has existed for a long time, I will take a stab to it.
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: DarKWateR on June 04, 2015, 03:34:50 am
perfect!
Yesterday i made in my copy of driver the same change in restore_object (my mudlib is old!), i update files with last version.

Thank you!
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: FallenTree on June 05, 2015, 01:27:09 am
Good news:
The optimize bug with "time_expression" was solved by  https://github.com/fluffos/fluffos/pull/267

Please give it a try! Fortunately it is only buggy with time_expression in rare cases.

Cheers. 
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: FallenTree on June 05, 2015, 09:18:22 am
Previous fix was wrong. the real fix is

https://github.com/fluffos/fluffos/pull/268
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: DarKWateR on June 05, 2015, 11:48:24 am
Perfect!
I'll try too!

Thank you very mucho.

For now, driver is working ok in real environment :D
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: DarKWateR on June 05, 2015, 12:58:25 pm
Hello, a little problem.

i've connected to driver with basic windows telnet and output fails, because there aren't crlf.

The files in my mud have unix lineendings.

In previous version works ok.

I think that previous version insert \r when find a \n character in add_message in comm.cc, but in new driver all work is made by libtelnet, and perhaps don't 'convert' output.

I've modified comm.cc adding that \r and is ok, but sure you can do it much better than me.

Perhaps is useful a new options in local_options for indicate if convert lineendings?

The effect is the same that open a file with unix lineendings with windows notepad.
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: quixadhal on June 05, 2015, 03:15:03 pm
Just as a note, libtelnet should not (itself) convert LF to CRLF.  The TELNET spec allows for LF to be sent by itself, however it is not considered a line ending in that case, merely a token in the data stream.  CR must be followed by either LF or NUL, so a lone CR would need to have a NUL added (and stripped on reception).

If the application intends to use LF as a line terminator, it should convert those LF tokens to be CRLF tokens before being passed to the TELNET stream.

I've found that when working with TELNET, the simplest thing to do is read a file in as an array of lines with the line endings removed.  Then make an API function to your TELNET library that takes an array and assumes they are lines, adding CRLF to each before sending.
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: FallenTree on June 06, 2015, 08:13:23 am
Hello, a little problem.

i've connected to driver with basic windows telnet and output fails, because there aren't crlf.

The files in my mud have unix lineendings.

In previous version works ok.

I think that previous version insert \r when find a \n character in add_message in comm.cc, but in new driver all work is made by libtelnet, and perhaps don't 'convert' output.

I've modified comm.cc adding that \r and is ok, but sure you can do it much better than me.

Perhaps is useful a new options in local_options for indicate if convert lineendings?

The effect is the same that open a file with unix lineendings with windows notepad.

Which version was the previous version?
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: DarKWateR on June 07, 2015, 06:49:11 am
sorry.
Because of pragma optimize error, i was using fluffos-3.0-alpha8.0 until the last release of 8.1.

The exact code that i said is in add_message (comm.cc):
Code: [Select]
for (cp = trans; cp < end; cp++) {
...
...
...
  if ((*cp == '\n' || *cp == -1){
...
...
      ip->message_buf[ip->message_producer] = (*cp == '\n') ? '\r' : -1;
...
...
    }
   ip->message_buf[ip->message_producer] = *cp;
}

I simulated that in 8.1.
I mean, i insert \r when i found \n, but is a patch for my mud.
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: melkor on July 01, 2015, 07:29:38 am
Anyone else having issues compiling this on Debian Jessie?
It seems that i cannot pass the libevent check and it does not matter that libevent-dev package is installed...

Code: [Select]
./configure
--SNIP--
checking for libevent >= 2.0... no
configure: error: Fail to find libevent (2.0+) header/library, install libevent-dev or change --with_libevent

Code: [Select]
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                  Version                         Architecture                    Description
+++-=====================================================-===============================-===============================-===============================================================================================================
ii  libevent-2.0-5:amd64                                  2.0.21-stable-2                 amd64                           Asynchronous event notification library
ii  libevent-core-2.0-5:amd64                             2.0.21-stable-2                 amd64                           Asynchronous event notification library (core)
ii  libevent-dev                                          2.0.21-stable-2                 amd64                           Asynchronous event notification library (development files)
ii  libevent-extra-2.0-5:amd64                            2.0.21-stable-2                 amd64                           Asynchronous event notification library (extra)
ii  libevent-openssl-2.0-5:amd64                          2.0.21-stable-2                 amd64                           Asynchronous event notification library (openssl)
ii  libevent-pthreads-2.0-5:amd64                         2.0.21-stable-2                 amd64                           Asynchronous event notification library (pthreads)

The result is the same on two different systems. One is running Debian Jessie, the other is Debian Sid.
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: quixadhal on July 01, 2015, 01:57:59 pm
sorry.
Because of pragma optimize error, i was using fluffos-3.0-alpha8.0 until the last release of 8.1.

The exact code that i said is in add_message (comm.cc):
Code: [Select]
for (cp = trans; cp < end; cp++) {
...
...
...
  if ((*cp == '\n' || *cp == -1){
...
...
      ip->message_buf[ip->message_producer] = (*cp == '\n') ? '\r' : -1;
...
...
    }
   ip->message_buf[ip->message_producer] = *cp;
}

I simulated that in 8.1.
I mean, i insert \r when i found \n, but is a patch for my mud.

I hope you're only doing that for TELNET sockets, and not for normal binary mode sockets.  This would, for example, break the "mudmode" sockets used for intermud connections.
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: DarKWateR on July 03, 2015, 10:36:52 am
sorry.
Because of pragma optimize error, i was using fluffos-3.0-alpha8.0 until the last release of 8.1.

The exact code that i said is in add_message (comm.cc):
Code: [Select]
for (cp = trans; cp < end; cp++) {
...
...
...
  if ((*cp == '\n' || *cp == -1){
...
...
      ip->message_buf[ip->message_producer] = (*cp == '\n') ? '\r' : -1;
...
...
    }
   ip->message_buf[ip->message_producer] = *cp;
}

I simulated that in 8.1.
I mean, i insert \r when i found \n, but is a patch for my mud.

I hope you're only doing that for TELNET sockets, and not for normal binary mode sockets.  This would, for example, break the "mudmode" sockets used for intermud connections.

Yes, only if connection_type is PORT_TELNET (original is "connection_type != PORT_BINARY")

Thanks for you advice! :)
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: DarKWateR on July 03, 2015, 10:40:58 am
Anyone else having issues compiling this on Debian Jessie?
It seems that i cannot pass the libevent check and it does not matter that libevent-dev package is installed...

Code: [Select]
./configure
--SNIP--
checking for libevent >= 2.0... no
configure: error: Fail to find libevent (2.0+) header/library, install libevent-dev or change --with_libevent

Code: [Select]
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                  Version                         Architecture                    Description
+++-=====================================================-===============================-===============================-===============================================================================================================
ii  libevent-2.0-5:amd64                                  2.0.21-stable-2                 amd64                           Asynchronous event notification library
ii  libevent-core-2.0-5:amd64                             2.0.21-stable-2                 amd64                           Asynchronous event notification library (core)
ii  libevent-dev                                          2.0.21-stable-2                 amd64                           Asynchronous event notification library (development files)
ii  libevent-extra-2.0-5:amd64                            2.0.21-stable-2                 amd64                           Asynchronous event notification library (extra)
ii  libevent-openssl-2.0-5:amd64                          2.0.21-stable-2                 amd64                           Asynchronous event notification library (openssl)
ii  libevent-pthreads-2.0-5:amd64                         2.0.21-stable-2                 amd64                           Asynchronous event notification library (pthreads)

The result is the same on two different systems. One is running Debian Jessie, the other is Debian Sid.

Hello, my server is debian 8.0 and it works ok.
Did you use ./build.Fluffos instead?
Title: Re: Fluffos 3.0-alpha-8.1 Releases
Post by: melkor on July 05, 2015, 09:26:51 am
Thanks @DarkWater it worked with ./build.FluffOS. Now i think i am an idiot. ;D