| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Comments:
<0> JamesG: what DO you program then <1> It's not relevant <2> rawr <3> vim question: Is there a way, in your .vimrc to refer to the visual selection (like as with <cword>), so you can map perldoc? <4> JamesG: We can not solve your problem via remoting viewing. <5> JamesG by the time you get some useful answer here you gonna run out of nerves <4> ology: Answer: #vim <6> was it mc elephant? 'cause that would be relevant. <7> linuxnohow, open FH,"<file"; while(<FH>) { $curline = $_; } <2> mauke: elephants are vicious killers <6> Yango: ****s <1> Yango: That's basically the syntax in use now.. <2> mauke: I saw it on the science channel <1> And that runs out of memory <4> JamesG: It should not. <5> that cant run out of memory
<4> JamesG: Or at least, you know it is some other problem. <0> Yango: that's some silly code <7> JamesG, maybe you're doing $curline.=$_? <4> JamesG: Look for places where it stores large amounts of data, implicitly or other wise. <1> Hm <1> Ok, I think I see the problem, actually. <4> JamesG: Usually the culprit is an implicitly created list of the entire contents of the file. <1> Yeah, I think that's what's happening here <1> It's doing: while (<FILE>) { push (@foo, $_) } <8> !!! <6> haha, even worse <7> hahaha <8> JamesG: that's terrifying to do with logfiles <7> that's not even implicit! <1> No wonder this code took them 18 hours to run. <2> ew <4> haha <4> Nice. <7> is there a config file parser in perl? <6> yes, lots <7> mauke, which one you like best? <6> none <9> I'm using a hosted account, and I've created a directory ~/perl where I'm storing my personal modules... I'm trying to figure out what to set PERL5LIB to, tho, and it looks like some modules are putting themselves in lib/, and some in share/... why is that? <10> http://rafb.net/paste/results/fVyeAl11.html <11> The paste fVyeAl11 has been moved to http://erxz.com/pb/936 <10> Has anyone else had difficulty installing mod_perl or mod_anything with undefined symbols? <10> There has to be a simple solution. <12> there always is <10> nm /usr/lib/apache2/modules/mod_perl.so|grep Perl_Ipatchlevel_ptr <10> U Perl_Ipatchlevel_ptr <4> furio: Er, what? <10> The symbol appears to be defined... <4> AI_coder: Are you sure mod_embperl works with ap2? <10> buu: I'm trying mod_perl <4> AI_coder: It is complaining about mod_embperl <4> What is line 3 of the configuration file it mentions? <10> buu: Yes, that one is, I have the same problem with mod_perl however. <10> LoadModule perl_module modules/mod_perl.so <10> If I had to guess it has to do with upgrading pel. <10> It doesn't seem to cry with mod_php or mod_python. <13> If you upgrade Perl, and your mod_perl used the same Perl, you must also upgrade mod_perl. <13> Or just recompile mod_perl. <10> Juerd: For some reason, gentoo seems to hate perl, I've had many problems with it. <14> Anyone see snything wrong with this --> http://darklords.livepaul.com/netaim.pl ?? <12> I WILL EAT YOUR HEART <10> I guess I will reinstall apache, perl, and mod_perl in that order. <15> even if I eat it first and vomit it back up? <10> And lib_perl <16> @loclist = sort map { s/^\s+//; s/\s+$//; $_; } split(/,|\r\n/, $locales_text); -- Given text like "This, is, text, " I'd like this to only have "(This,is,text)" as a result and not "(This,is,text,)" <16> Is there an easy way to do this in that same one line? <14> What does this mean?? --> PARSE: how many args in '2'? <17> crschmidt: so join(',', map {length($_)?$_:()} @loclist) <6> a.k.a. grep <17> grep is overrated. ;-) <16> dondelelcaro: sorry, i wasn't clear enough, i want the array to have only non-blank elements <17> crschmidt: so stick a grep or map in front of the ***ignment... <16> grep is probably want i want... <17> they're equivalent in this case... <6> grep is a special case of map <6> I'd still use grep here because it's clearer
<17> mauke: yeah, if I didn't have map on the brain, I'd probably use grep too... <16> so... something like "sort grep {!/^$/} map {" instead of "sort map {" above? <16> (I ask because that doesn't seem to work) <18> @array = grep /\S/, @array; <19> is there a way to force regular expression matching to match the smallest possible pattern ? <17> ramy: ? <6> ramy: no <18> ramy: y??e??s?? <20> ramy: I ***ume you're having trouble with greediness ; <6> I ***ume you're not using perl but pcre to "parse" html <19> if I have a string like "zzabbbcccczz" and a regular expression "a.*c" , this usually matched the substring "abbbcccc" not "abbbc" <20> heh <6> ramy: always, not usually <17> ramy: you want a.*?c then. perldoc perlretut <11> The perldoc for perlretut - Perl regular expressions tutorial is at http://perldoc.perl.org/perlretut.html <6> dondelelcaro: a[^c]*c actually <19> thanks folks <17> mauke: um... that's the same thing... unless he anchored it too... <19> in fact , both worked :) <2> cpan just crashed my computer. :( <19> although I can understand a[^c]*c , but not a.*?c <17> ramy: that means that it's time to read the regex documentation so you learn what ? does. <4> godling: Awesome. <19> dondelelcaro: that's perfectly correct ! <19> I am reading it now <2> buu: it was fantastic, I had to reboot. <7> whats the perl way to get the user part of $HOME? <6> Yango: what user part? <7> $HOME=/home/user <21> $ENV{'HOME'} or something like that <6> Yango: what if it's /some/other/dir? <21> Are you just looking for the last directory ? You could split(/ <21> err split(/\/, $_) or whjatever and use the last array element <15> /\/ isn't going to work so nicely. <7> high-rez, that's what I was doing, but don't know how to refer to the last element (it's /\//) <21> err split(/\//,$_) ? <21> :) <15> well you can use (split whatever)[-1] <6> Yango: why are you doing that? <15> not much point in putting $_ there either. <15> but you're apparently ***uming he even wants something from $_ <22> Ani-_, thanks, that new Tie::File::AsHash (v.8ish) looks like it's propogated its way through cpan.org! your help is appreciated :-) <21> well this is true, i'm ***uming he's going ot read document on the split function and knoiws enough about perl to know i'm jusdt referring to any string to split. <7> easier way to get a formatted date string? `date `? <6> Yango: please answer my question <7> mauke, because I receive that string as a parameter, and I want to deduce the username from it... and it is _always_ a home dir (with username at the end) <13> 01:54 < AI_coder> Juerd: For some reason, gentoo seems to hate perl, I've had many problems with it. <13> No, Gentoo hates users, not Perl. <6> you might also want to have a look at File::Basename <6> Yango: I'd use POSIX::strftime to format dates <21> Every distribution has its place. <21> I realize I'm surrounded by people more rabid than those they seek to make fun of, but just because something isn't the right tool for the task, does not make it a bad tool. <13> high-rez: Gentoo has its place in education: it teaches people how to fix broken linux systems. <13> high-rez: It's done so for me, during 18 months of it being my primary workstation. And it's great for that. <13> But people who can't fix such things themselves, and need that much guidance, are better off without Gentoo. <21> The biggest complaint I hear about gentoo is that it's installation is hard. Anybody making money in IT (especially if they work with *nix) better at least be able to do a gentoo install without breaking a sweat. I look at it as right tool for the job. Do you want an os whose release cycle is essentially 'bleeding-edge', then gentoo is prolly good for you. If you want an OS with an 18 month release cycle, and is compltely stable, polished and user frien <6> ... polished and user frien <21> I think they're different, but similar. A polished OS is one that is both clean, and simple. OSX is clean and simple from the users perspective. Ubuntu on the other hand, isn't quite as clean - but its plenty user friendly for 99% of users. <21> My father and grandmother have no problem doing basic stuff in ubuntu - but if given the choice between it and OSX they'd prolly pick OSX for it's asthetics, and more coheive feel. <21> now i'll take that gentoo is neither polished nor user friendly, but if you're knowledgable enough to write shell scripts - and you prolly are if you're here then you shouldn't have any problem running gentoo. os for my father or grandma? no. good os for bleeding edge **** only someone with the knowledge and skillset to take advantage of it? yeah. Either way, i'm not sure where you were going with that mauke (if you didnt understand the distinction betw <0> i don't want to run gentoo <6> the distinction betw <0> merlyn: what was that qdb website you pasted yesterday? high-rez needs to see it <0> does irssi make logs automatically? <6> no <23> linuxnohow: See /log (I think) <23> high-rez: OSX is not clean and is definetly not simple from a unix admin perspective, infact, I'd argue that it's an OpenStep system rather than a Unix system. <21> Arafangion: Funny I was making that same argument just a week ago, and I agree 100%. From a unix admin perspective (i'm not talking my dad and grandma here), it's a real pain in the ***. It does not have, for example, a proper package management system, since most osx applications are installed as those single file package crap thingies (which are .app directories). <7> what's wrong with => $myvar = chomp($_) if $check == 4; regardless of the value of $_, $myvar is 1 <21> Arafangion: As well half of the unix userland is unusable in osx (fdisk, and mount for example dont behave like they should). <23> high-rez: Those two are quite understandable. <7> oh, it should be at first line chomp($_); and then $myvar = $_ if $check == 4; <7> right?
Return to
#perl or Go to some related
logs:
#web my lo torrent main.cf smtp_client_restrictions cross-table indices 1047552 mysql packet increase packman nasm #css movw syntax ARM #perl dis-asm ubuntu package
|
|