00:36:04 | han_solo | what is an .asf video feed? |
00:45:36 | bbeattie | microsoft |
00:45:57 | bbeattie | I'm not sure what the "format" is, but it's one of MS's |
00:47:41 | brailsmt | .asf = A Stupid Feed |
00:51:16 | han_solo | wonders why uug is streaming their meeting in asf right now |
00:55:22 | Jayce^ | hey han_solo, requested the book today :) just for you.. |
00:56:04 | han_solo | the vim book? woohoo |
00:58:12 | Jayce^ | yup.. |
01:16:23 | brailsmt | msvc++ is stupid... |
01:22:00 | Jayce^ | did you expect anything else? |
01:22:08 | brailsmt | curses... (not the lib) |
01:23:26 | brailsmt | oooh... :) |
01:23:37 | brailsmt | vim in window +ruby is compiling :) |
01:23:50 | brailsmt | only took two days... |
01:40:12 | brailsmt | dangit... |
02:14:46 | Bradipo | Anyone here use OpenBSD? |
02:15:27 | Jayce^ | nope.. would like to play with it (again, did *some* once).. but no extra boxen |
02:15:31 | Bradipo | I guess this isn't *BSD specific though... |
02:15:52 | Bradipo | The man page for usermod says that -f will set the time when their password should be changed. |
02:16:49 | Bradipo | But, instead of prompting the user to change the password, it simply locks them out when the time is reached. |
03:22:17 | han_solo | this is it, I'm going to update my server to sarge |
03:22:27 | Bradipo | I know none of us have a problem with this, but just in case... |
03:22:29 | Bradipo | http://www.sltrib.com/09192002/business/182517.htm |
03:22:52 | HarleyPig | good luck |
03:23:09 | Bradipo | Good luck indeed, what's sarge? |
03:24:04 | han_solo | debian testing |
03:24:21 | HarleyPig | Ouch ... that's gonna hurt. |
03:25:01 | han_solo | testing is still fairly good though, unstable would be insane for a server |
03:25:12 | HarleyPig | Can anyone here help me with a perl problem I'm having? I don't want to go into #perl if I can get away with it. |
03:25:30 | Bradipo | If my limited knowledge of perl can help... |
03:25:30 | han_solo | I wouldn't move but it's an hp box, and support for hp is newish |
03:25:45 | han_solo | only 200 upgraded packages |
03:26:51 | HarleyPig | I've got a package where I'm creating some functions as constants ( sub COUNT { 'cnt' } ) and I want to create defaults |
03:27:04 | HarleyPig | %default = ( ${\COUNT} => 25 ); |
03:27:24 | HarleyPig | and create a sub DEFAULT ( $default{shift} ) that returns the default. |
03:27:26 | Bradipo | Well, that just went over my perl head. |
03:27:27 | HarleyPig | Make sense so far? |
03:27:28 | HarleyPig | :D |
03:27:38 | HarleyPig | Thanks anyway. :> |
03:27:53 | Bradipo | So, you want a constant function? |
03:28:13 | HarleyPig | Yeah, but I know how to do that already ... sub COUNT { 'cnt' } is a constant function. |
03:28:33 | Bradipo | Hmm, I guess when I think constant, I think C/C++ constant. |
03:28:47 | HarleyPig | Yeah ... but perl doesn't have a constant datatype. |
03:28:54 | HarleyPig | The above is a work around. |
03:29:02 | Bradipo | Interesting. |
03:29:31 | Bradipo | What you are trying to do makes sense, but I don't know how it would be done in perl. |
03:29:48 | HarleyPig | It took me a while to get used to it, but I did some testing and it turns out not to increase compilation time at all. |
03:30:26 | HarleyPig | Well, that *should* work, but %default keeps turning up empty and I can't figure out why. |
03:30:50 | Bradipo | Why the \COUNT? |
03:31:12 | HarleyPig | ? |
03:31:13 | HarleyPig | Oh. |
03:31:18 | Bradipo | In your assignment. |
03:31:48 | HarleyPig | %default = ( COUNT => 25 ) would end up being 'COUNT' instead of 'cnt' |
03:32:00 | HarleyPig | the ${\COUNT} forces the execution of the subroutine. |
03:32:27 | Bradipo | I just love perl's syntax. |
03:35:38 | HarleyPig | :D |
03:35:47 | HarleyPig | Wanna see some evil syntax? |
03:35:54 | Bradipo | I've seen pleny, but sure. |
03:36:01 | Bradipo | s/pleny/plenty/ |
03:36:07 | HarleyPig | my $i = 0; |
03:36:07 | HarleyPig | $ref->{$column[$i++]} = $_ |
03:36:07 | HarleyPig | for @{($db->selectall_arrayref($get_user_data))->[0]}; |
03:36:31 | HarleyPig | tries to avoid the splatter from heads exploding. |
03:36:52 | Bradipo | I always, always forget what $_ is. |
03:37:04 | HarleyPig | The default variable. |
03:37:10 | Bradipo | Which is? |
03:37:20 | HarleyPig | In this case each element of the for. |
03:37:34 | HarleyPig | $get_user_data is a sql query. |
03:37:39 | Bradipo | I figured that. |
03:37:45 | HarleyPig | The $db is a handle to the db. |
03:37:48 | Bradipo | Yeah. |
03:37:53 | HarleyPig | selectall_arrayref returns an array. |
03:37:56 | Bradipo | Got that much too. |
03:37:56 | HarleyPig | oops |
03:38:01 | HarleyPig | a reference to an array |
03:38:13 | Bradipo | Hence the @{...} |
03:38:16 | HarleyPig | right. |
03:38:20 | HarleyPig | uh no |
03:38:27 | Bradipo | But the $_ happens before the for loop. |
03:38:31 | HarleyPig | the ($db..))->[0] |
03:38:40 | HarleyPig | dereferences the array. |
03:38:45 | HarleyPig | Uh ... sorry. |
03:38:47 | Bradipo | Kind of like returning a poiter to itself. |
03:39:02 | HarleyPig | selectall_arraryref returns a reference to an array of references to arrays. |
03:39:08 | Bradipo | Dereference, makes more sense. |
03:39:50 | HarleyPig | I only want the first result (there should only be on row returned anyway from the query). |
03:40:45 | HarleyPig | Believe it or not, this is actually about 20% faster than doing it with the easier to understand syntax ... but this piece of code is going to be hit many times a second. |
03:40:48 | HarleyPig | *sigh* |
03:41:30 | Jayce^ | HarleyPig: just catching up.. perl has the use constant pragma.. does the same.. |
03:42:03 | HarleyPig | I know ... I like mine better ... they both turn into noops anyway. |
03:42:17 | HarleyPig | I'm just being piggish. |
03:42:40 | HarleyPig | Less typing doing it directly |
03:43:34 | Jayce^ | so you are saying you want COUNT to be a code_ref? |
03:43:40 | Jayce^ | or a value? |
03:43:44 | HarleyPig | Nope, just a constant value |
03:44:04 | Bradipo | A function that always returns the same value? |
03:44:09 | HarleyPig | Right. |
03:44:19 | HarleyPig | (which is waht use constant does |
03:44:40 | Jayce^ | so basically, you are creating code that is more difficult to read and work with, just for hubris sake? |
03:44:57 | Bradipo | Performance's sake I believe... |
03:45:07 | HarleyPig | Huh? No ... for creating tags in forms. |
03:45:13 | Jayce^ | probably isn't faster than use constant |
03:45:28 | HarleyPig | It isn't. benchmark shows them to be exaclty the same. |
03:45:33 | Bradipo | HarleyPig: Sorry, didn't mean to speak for you. :-) |
03:45:54 | HarleyPig | Bradipo: s'ok ... performance, but indirectly. :> |
03:46:42 | HarleyPig | This way I can do my $parms = Vars ; $parms->{COUNT} and make it easy to read |
03:46:52 | HarleyPig | but the form will have 'cnt' for the field name |
03:47:00 | HarleyPig | or even 'c' if I want. |
03:47:20 | HarleyPig | The less bytes that are transferred makes the page load that much faster each time. |
03:47:53 | HarleyPig | And when the code is compiled the compiler sees that COUNT is a constant function and replaces that occurrence with the value. |
03:48:34 | HarleyPig | Does that make sense? |
03:48:43 | Bradipo | I think so. |
03:48:51 | HarleyPig | Jayce^: Do you still think I'm being obfuscated? :] |
03:49:33 | HarleyPig | What I want to do is something like $count = $parms->{COUNT}||DEFAULT(${\COUNT}) |
03:50:18 | HarleyPig | That way I can put all the variable data in one file and let the design folk change that to their hearts content and not touch my code. |
03:59:23 | Jayce^ | sorry, taking care of sick kid.. |
04:00:27 | Jayce^ | well, as for page size, you should load in mod_gzip.. take care of that.. |
04:00:53 | Jayce^ | along with apache::clean you'll be getting around a 75% page size decrease.. on average.. |
04:00:53 | HarleyPig | heh. I've got two with the flu ... poor wife has been dealing with cloth underwear adn diapers because I haven't gotten paid in 4 weeks. |
04:00:54 | HarleyPig | *sigh* |
04:01:15 | Jayce^ | yeah, same flu.. real bad diarreah |
04:01:19 | HarleyPig | True ... but still, every byte counts. |
04:01:23 | HarleyPig | yep. |
04:01:33 | Jayce^ | yeah, but that's gzip.. byte patters compress.. |
04:01:37 | Jayce^ | patterns |
04:01:48 | HarleyPig | I've only had to change them a few times that way. She's been a little frazzled lately. |
04:01:55 | Jayce^ | I bet.. |
04:02:23 | HarleyPig | also, mod_gzip doesn't really help with pages less than a kilobyte in size, and the smaller the page the more it's bad. |
04:02:50 | Jayce^ | you work with that many pages <1k ? seriously? |
04:04:02 | Jayce^ | DEFAULT() is what? sub or list? |
04:06:28 | HarleyPig | Yeah ... most form pages are less than 1k (not including images, which are downloaded in a separate pipe). |
04:06:51 | HarleyPig | DEFAULT is a sub that just returns the requested element from the hash %default. |
04:07:04 | HarleyPig | supposedly, but %default isn't being populated correctly for some reqason. |
04:09:29 | Jayce^ | well, they can be the same pipe :D |
04:09:52 | HarleyPig | Ok ... true ... but mod_gzip would still not compress the small page. |
04:09:57 | Jayce^ | hrmm.. can't say much right now.. gimmie a bit to think.. gotta go help out some again..... |
04:10:09 | HarleyPig | I've seen people suggest setting mod_gzip to 2048 bytes as well. |
04:10:21 | HarleyPig | And I have even more pages that fit in that boundary. |
04:10:29 | HarleyPig | Doing some testing to see what's the optimal size. |
04:10:46 | Jayce^ | I just don't see most pages being that small, I know most ours are much larger.. still under 20k for most pages.. but that get's great results |
04:12:10 | HarleyPig | Yeah ... but most of our forms are just under 1k ... they're very simple forms. |
04:12:21 | HarleyPig | Besides, even with gzip I still prefer less. |
04:12:49 | HarleyPig | Also, doing it this way you can play with field names very easily and find the optimal field name length or pattern. |
04:16:08 | HarleyPig | Did you see the url that I pasted that code bit to? |
04:18:14 | HarleyPig | Damn. I killed convo in both channels. |
04:19:17 | Jayce^ | hehe |
04:19:27 | Jayce^ | what other channel? |
04:19:58 | Jayce^ | ahh |
04:21:22 | HarleyPig | Did you see the answer? |
04:21:29 | Jayce^ | yeah, this #perl is different than the other.. :D |
04:21:59 | HarleyPig | I was just about to post my question there too ... getting ready to put on the asbestos suit. |
04:22:17 | Jayce^ | hehe... |
04:22:21 | Jayce^ | +shift? |
04:22:33 | HarleyPig | Yeah. I completely forgot about that. |
04:22:42 | Jayce^ | details? |
04:22:48 | HarleyPig | I don't understand why %default was showing empty though. |
04:22:50 | HarleyPig | jas |
04:22:52 | Jayce^ | shift as a function? |
04:22:55 | HarleyPig | Uh, just a sec. |
04:22:59 | Jayce^ | yes? :D |
04:23:21 | HarleyPig | Asking in #perl |
04:24:27 | HarleyPig | Did you get that? |
04:25:20 | Jayce^ | yeah, hadn't even thought of that.. want to reread the section.. |
04:25:22 | HarleyPig | Bradipo: Still here? Want to know the resolution to my problem? |
04:25:45 | HarleyPig | Jayce^: Let me know which section when you find it, would you please? |
04:25:51 | Jayce^ | if I find it :D |
04:26:02 | Jayce^ | heh.. somebody in there going by the nick 'belgarion' |
04:26:34 | HarleyPig | :> |
04:30:39 | Jayce^ | can't find it.. |
05:10:34 | BZFlag | hmm SoftwareMechanic.com is avalable. ;-) |
05:10:48 | Bradipo | lol |
05:11:10 | Bradipo | HarleyPig: What was the resolution to your problem? |
05:12:16 | HarleyPig | Bradipo: Sorry ... the sub DEFAULT { $default(shift) } needed to be sub DEFAULT { $default{+shift} } |
05:13:12 | Bradipo | Nice. |
05:13:29 | HarleyPig | :/ I should have remembered that. |
05:13:40 | Bradipo | BZFlag: Are you going to setup shop? :-) |
05:13:43 | HarleyPig | Perl DWIM didn't in that case. |
05:37:51 | BZFlag | Bradipo_: nope, I'm happy with GuruGroup.com ;-) |
06:52:34 | BZFlag | http://www.estoretogo.com/showitem.asp?item=kb-LOIKBMSP hmm. cheaper new even counting shipping. |
07:18:14 | BZFlag | oh, /me notices that Dave's is the optical mouse version. ahh. that's worth more. |
13:20:02 | CosmicPenguin | is away: Uh, oh.. the weasel got out again... |
13:20:04 | CosmicPenguin | is back (gone 00:00:02) |
13:20:19 | han_solo | you're fast to catch that weasel |
15:25:53 | fozz | Now you seem em. Now you don't. Now you seem em... |
15:55:08 | Bradipo | How can I change the title of my terminal from the command line? |
16:07:15 | CosmicPenguin | Bash? |
23:35:28 | Bonez39 | greetings, anyone chatting here this evening? |
23:36:50 | Bonez39 | hello? anyone? |
23:42:19 | Bonez39 | no one? |
23:45:25 | Bonez39 | anyone? |