« first day (269 days earlier)      last day (4904 days later) » 
00:00 - 17:0017:00 - 00:00

Tek
Tek
17:38
@ircmaxell Ah, I figured. I was wondering how it could fail since I thought you meant the opposite for a second :P
:-P
Now I'm hitting a memory limit issue on code coverage calculations... Granted, I'm running 14,356 tests :-P
Tek
Tek
lol! good luck with that
@ircmaxell Which reminds me, how's your new job going so far?
well, only around 800 of the tests are actually unit tests. The other 13.5k are test vectors for ciphers and password generators...
The new job is going quite well
Tek
Tek
@ircmaxell Ah ok. I was about to say that is an immense amount of unit tests.
Oh really? That's good to hear!
yeah, I'm actually cutting back on the unit tests (down to about 800 from 1500)
Tek
Tek
17:47
Cutting back in what way? Ignoring some tests or refactoring or?
Not ignoring any tests, just cleaning it up quite a bit to the point where it is much faster and cleaner
Time: 05:22, Memory: 297.50Mb

OK (14356 tests, 14273 assertions)

Writing code coverage data to XML file, this may take a moment.
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate
 42 bytes) in PHP\CodeCoverage.php on line 368
Execution of target "unit-all" failed for the following reason: CryptLib\build\phing\test.xml:
49:1: Task exited with code 255

BUILD FAILED
CryptLib\build
\phing\test.xml:49:1: Task exited with code 255
Total time: 6 minutes  30.31 seconds
Tek
Tek
lol what, that test took more than 512mb to run?
no, it's the coverage calculation that's taking all the memory
I'm trying 1gb now
@ircmaxell do you really need so much tests?
actually, yes
17:53
sounds like OS devel :-P
for example, I implemented tripledes based on a custom implementation of DES.
I ran the first 20 test vectors and it all looked good
but when I installed the vector suite with all the vectors included, it failed 90% of them. Because I made a mistake in the implementation
okay, but if I get it correctly - that vector suite is those 13.5k tests, but I'm talking about those 800
Right
well, it's 100 classes, so 8 tests per class on average...
Time: 05:21, Memory: 297.50Mb

OK (14356 tests, 14273 assertions)

Writing code coverage data to XML file, this may take a moment.

Generating code coverage report, this may take a moment.
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocat
e 76055691 bytes) in PHP\CodeCoverage\Report\HTML\Node
\File.php on line 377
Execution of target "unit-all" failed for the following reason: CryptLib\build\phing\test.xml:
49:1: Task exited with code 255
100 classes?
about that
17:59
well, it's your lib... but it looks little too much
why you say that?
smells like over-engineering. how many algos does it implements?
what's purpose of that class?
You missed the design of that
basically to create an Enum without resorting to constants or the like
so:
a) it sucks because of extends
b) you don't need class for each value - one generic class + factory should be enough
eih... I could, but that makes life a little bit harder because I then need to pass around a factory, where here they are just throw away objects
18:06
Can someone help me with this? stackoverflow.com/questions/6668223/…
18:42
@AcacioNerull Does strtotime() not work?
It is pretty flexible in the kinds of date formats it accepts. I've personally always been able to rely on it when converting a date string to a timestamp.
As a last resort, you could parse the date string manually and use the mktime() function to generate a timestamp based on the parsed date elements.
I have a class that uses warning_count, error_count and is_local_time info from output array. I don't want to change the entire code, because it was written by another team, and I'm not aware of all the dependencies.
@AcacioNerull I wonder if you could download the PHP source code and just copy and paste the function into your code base.
Because of this function, we are having issues to move the application from our server to another that doesn't supports PHP 5.3
@Michael thanks, I'll try it.
18:59
The errors and warnings probably only occur if the function has trouble parsing the date. If you parse it manually, then you will never have any errors or warnings.
For is_localtime, you can look at the timezone in the date string and see if it matches your local timezone.
@Michael but this is what the function does, it looks for invalid datetime string and then corrects it based on given error and warning outputs. We have a batch file with tons of datetime strings that needs to be corrected
@AcacioNerull What about using regular expressions to fix them?
I'm looking at php source file (ext\date\php_date.c), but it looks to complicated. I'm not a PHP expert...
Yes, this is what we're doing right now. We're developing another class using regular expressions instead
I'm just trying to find an easier way to accomplish our server migration without changing much our code
19:17
If this task of correcting the batch file only needs to be done once, then you could run the original code a machine that has 5.3 installed, and then copy the corrected batch file to the other machine.
The batch file is generated once a week...
@Michael I have to go. Thanks for your help!
@Michael have a nice day!
@AcacioNerull No problem, good luck!
@ircmaxell Isn't that class called SplEnum?
20:17
damn this was a long work day
20:53
@ircmaxell certainly better than just getInstance.
21:21
posted on July 12, 2011 by Horde news

Authentication in Horde is complex. Very complex. To help you (and myself) to understand how exactly authenticating to Horde works, I tried to dissect the processes involved.

@ircmaxell what about that extends? :-P but yeah, less useless classes, better.
21:48
posted on July 12, 2011 by Federico Cargnelutti

Most of the time remote scripts are included at the end of an html document, right before the closing body tag. This is because browsers are single threaded and when they encounter a script tag, they halt any other processes until they download and parse the script. By including scripts at the end, you allow the browser to download and render all page elements, style sheets and images without a

 
2 hours later…
23:50
@nikic that's a preclude extension, so I can't use it...
00:00 - 17:0017:00 - 00:00

« first day (269 days earlier)      last day (4904 days later) »