#perl
29 September 2007
Total 19 pages. You are browsing page 3/19.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
01:45 <****> i am fine
01:45 <****> It's still messy though
01:45 <****> E.g. I have a test where I expect to wait for 2 seconds. So I use time hires to check it's anywhere from 1.9 to 2.1. Sometimes that fails.
01:45 <****> I had to up it to 2.5. And even then very occasionally on high-load machines, the test fails
01:46 <****> Leonerd Its Perl its Messy...
01:46 <****> LeoNerd: why not use a simply gt ?
01:46 <****> ??
01:46 <****> try Assembler maybe this would do it
01:46 <****> Because, as I said, sometimes it's not ready yet
01:47 <****> kspath: OK.. I'll try to explain yet again.
01:47 <****> LeoNerd: but you said it failed if outside of 2.1 or 2.5
01:47 <****> Leonerd in your place I would consiter to post a warning message wen the time dif between scheduled and time is increasing
01:47 <****> I ask poll() to wait for, say, 2000ms. Sometimes if I try to see how long it waited by using Time::HiRes::time() either side, I sometimes get 1999ms
01:47 <****> And so on
01:47 <****> LeoNerd: it is ok. I doubt I will be of much help at this point. too sleepy and foggy now
01:49 <****> leonerds yo have to live with this unsharpness.. thing how i feeled using 32bit and no change of getting time::hires building my first data collector
01:50 <****> Yes, I know. I know it's not perfect
01:50 <****> LeoNerd: if each timer only runs once than why not just use a less than and greater than ? if time is before it started than problem if time is after no matter how long after expire
01:50 <****> I'm not complaining about the OS
01:50 <****> I'm asking "how do I write my test script so it doesn't fail"
01:50 <****> if it's a queue of timers, and each is dependent on the one before it, why would the next one fail of the one before it finished eariler? (i still don't see the race condition if it's a queue)
01:50 <****> Gah
01:51 <****> No...
01:51 <****> OK, here's some pseudocode
01:51 <****> sub { $done = 1 } }; poll(); ok( $done, 1, "Timer ran" );
01:51 <****> My problem is that sometimes, occasionally, that fails.
01:51 <****> leonerd why waiting 2000ms and not 2000times 1 ms?
01:51 <****> Why? Because the timer event queue sometimes doesn't think it's ready to run yet
01:52 <****> Why? Because gettimeofday() and poll() sometimes slightly disagree
01:52 <****> BoaThor99: because that's, for want of a better word, stupid.
01:52 <****> bad. Wastes context switches, increases latency of the rest of the system.
01:52 <****> ^^
01:52 <****> Wastes battery power on laptops
01:53 <****> really? lots of tiny sleeps wastes power on laptops? :)
01:53 <****> LeoNerd you can´t eat the cake and have it too^^
01:53 <****> If you're going to do a sequence of 2000 1ms sleeps, you might as well while(time() != $never) { 1 }
01:53 <****> quatrix_: Yes. Go read about the tickless kernel stuff for lower power usage on laptops
01:54 <****> anyway. I've already solved the problem.
01:54 <****> Basically, by having the test script sometimes insert a few extra poll() loops until it gets the right result
01:55 <****> there is an other thing that gives me headache its the magic of ++ but not -- and \n in perl
01:56 <****> GumbyBRAIN: What is the capital of deep magik?
01:56 <****> find it.
01:59 <****> m
02:04 <****> night
02:35 <****> hi, are there perl modules for parsing other programming languages? I would be particularly interested in ecmascript/javascript, but also others...
02:35 <****> RetroJ: there's a Javascript module. See http://search.cpan.org/
02:36 <****> wow, for executing javascript, even. that's fancy
02:36 <****> perl rules LOLOL
02:37 <****> mm, recursive LOL :)
02:37 <****> recursive?
02:37 <****> sorry
02:37 <****> i eat recursively, not iteratively
02:37 <****> lol() { lol() }
02:38 <****> EAOL
02:38 <****> apeiron: oi
02:38 <****> /* user has made themselves appear to be an AOL user */
02:39 <****> apeiron: tried the meditation thingie today, i couldn't do nothing for 2 minutes.
02:40 <****> quatrix_, May help to start off with just being quiet and trying to empty your mind of everything possible.
02:40 <****> $mind = undef;
02:41 <****> apeiron: that's what i tried, i think my flat is too noisy..
02:41 <****> even now, almost 3am, very noisy.
02:42 <****> maybe i can sound proof the bathroom, heh.
02:42 <****> Quiet is important.
02:43 <****> so it seems.
02:43 * CPAN upload: Unix-PID-v0.0.13 by DMUEY
02:48 <****>prepare( "INSE" (62 lines, 1.9K) at http://sial.org/pbot/27783
02:49 <****> hey, thats me
02:50 <****> this is driving me batty... that [15] is eq '', but I cant seem to insert a new value
02:50 <****> ??!?
02:50 <****> Yes, so fill in a name so the poor bot doesn't make us guess who "someone" is.
02:51 <****> HA HA COCKS.
02:51 <****> buu, WHERE?!
02:51 <****> Incoming.
02:51 <****> (and do they need another?)
02:52 <****> No.
02:53 <****> darkblueB|off, An error message would be helpful.
02:54 <****> Dat Write ERROR: invalid syntax for integer ""
02:54 <****> Data
02:54 <****> So don't give it "" as an integer.
02:54 <****> (bloody brilliant)
02:54 <****> Indeed.
02:55 <****> so, perhaps if I replace the empty field with a 0, or a "0"
02:55 <****> then, it wouldn't be mwpty, would it?
02:55 <****> $field[15] = "0"; # hmm
02:56 <****> sub15 m prints, as does sub15 ''
02:56 <****> er?
02:56 <****> sub15 '' proves that the first stuffed number didn't take
02:56 <****> (see the clever print statements when the safety test catches?)
02:57 <****> Also, you're not checking for definedness first.
02:57 <****> @field is not the same as @fieldA
02:57 <****> That too.
02:57 <****> aaarrrggg
02:57 <****> Using strict and warnings?
02:57 <****> use strict; would catch that
02:57 <****> apeiron: obviously not
02:57 <****> defined has nothing to do with it
02:57 <****> pravus++ # ace catch
02:57 <****> pravus == ace
02:57 <****> It does if it's undefined and you use a pattern match against it.
02:57 <****> apeiron: it wasn't easy ;D
Total 19 pages. You are browsing page 3/19.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
