Home Page   #c  #ruby-lang  #cisco  #mysql  #apache  #javascript  #java  #perl  #php  #openmoko   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#perl

14 October 2007


Total 42 pages. You are browsing page 1/42.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

--- Log opened Sun Oct 14 00:00:16 2007
00:13 <****> BARACUDA!\
00:14 <****> er, wrong chan
00:14 <****> s'ok
00:15 <****> btw, is there a Perl forum engine that works in tainted mode?
00:23 <****> hehe
00:23 <****> even there is an version of damn small linux with qemu
00:23 <****> perfect for me
00:30 <****> anyone else having a problem with use.perl.org ?
00:30 <****> yes
00:31 <****> do you happen to know if pudge hangs out on efnet
00:32 <****> all I know is /whois pudge
00:33 <****> k
00:33 <****>) using regular expressions
00:34 <****> what regexp matches polynomial terms?
00:35 <****> ehtom - out of curiosity, what is your larger goal?
00:36 <****> IOW - is matching exponents part of a larger puzzle?
00:36 <****> its part of an assignment
00:36 <****> do you need to match lots of these in the same string or just one?
00:36 <****> ehtom - ah
00:36 <****> perldoc perlretut
00:36 <****> but not in perl... just C (our lecturer is an idiot)
00:37 <****> in C would be much different than in perl
00:37 <****> SubStack: just one
00:37 <****> 3);` says "Use of implicit split to @_ is deprecated at newboo.pl line 12."
00:37 <****> ehtom - well, then pointing out CPAN modules that already do what you want is likely pointless then
00:37 <****> Limbic_Region: unfortunately, like I say, hes an idiot
00:37 <****> unless the course is about c and not perl
00:37 <****> ehtom - typically this would be done using a parser not a regular expression
00:37 <****> term op term
00:38 <****> yeah its about C not perl, just I know perl ppl know everything about regexp's
00:38 <****> any idea what the warning means? or why it's comming up?
00:38 <****> sabooky: what part do you not understand?
00:38 <****> if you really want to use regular expressions in c, there are numerous libraries available
00:38 <****> Limbic_Region: parser? u mean flex/yacc?
00:38 <****> or you could embed perl itself
00:38 <****> ehtom - well, those are fine choices yes
00:38 <****> mauke: what's the warning about? what's deprecated about what I'm doing, and how should I do it?
00:38 <****> Limbic_Region: i've managed to do it using sscanf :\ but its a kludge
00:39 <****> ehtom - but since all you are after is a simple ^
00:39 <****> sabooky: the warning is about clobbering @_
00:39 <****> sabooky: you're not supposed to overwrite @_
00:39 <****> mauke: oh so split writes to @_
00:39 <****> in scalar context, yes
00:40 <****> Limbic_Region: why not use regexp's though?
00:40 <****> split in *scalar context* writes to @_
00:40 <****> how else can i quickly test if the line is greater then 3 fields long?
00:40 <****> 3
00:40 <****> ehtom - no reason for a silly assignment but mathematical expression parsing is silly to do in a regex
00:40 <****> ehtom - so what is acceptable before and after ^
00:41 <****> Limbic_Region: what do you mean by ^?
00:41 <****> mauke: ok, thanks.
00:41 <****>) using regular expressions
00:41 <****> sorry, missed that part
00:41 <****> so no whitespace
00:42 <****> variable must be the letter x
00:42 <****> exponent must be an integer
00:42 <****> Limbic_Region: like 3.14159x^2 but not 3.14159x^-2
00:42 <****> \d+(?:\.\d*)?x\^\d+
00:42 <****> and get back the 3.14159 and the 2
00:42 <****> if you follow me ...
00:42 <****> I do
00:42 <****> (\d+(?:\.\d*)?)x\^(\d+)
00:42 <****> real number is the hard part
00:42 <****> mauke - what about -3.14x^2
00:42 <****> mauke: negatives are in the set of all reals too
00:42 * CPAN upload: HTML-Template-Filter-TT2-0.03 by SAPER
00:43 <****> NO THEY ARE NOT
00:43 <****> I am looking at Scalar::Util's looks_like_a_number
00:43 <****> ([+\-]?\d+(?:\.\d*)?)x\^(\d+)
00:43 * SubStack looks for the xcompose magic to get that curvy e thingy
00:43 <****> what if someone types x^2
00:43 <****> or just x
00:43 <****> that's illegal
00:43 <****> 3); that's not working :/
00:43 <****> you need a real number before the x
00:43 <****> then there's Regexp::Common with regexes for various types of numbers
00:44 <****> anno- this is for a silly C class
00:44 <****> sabooky: figure out what that means and why it happens
00:44 <****> err oops forgot the scalaar
00:44 <****> with a stupid instructor - apparently
00:44 * ehtom gets the feeling this is not as simple as he first thought
00:44 <****> How long an interval do you guys think is fair for hitting a website?
00:44 <****> Right now ive got my script doing so at 30mins
00:45 <****> ehtom - take a look at http://search.cpan.org/src/GBARR/Scalar-List-Utils-1.19/lib/Scalar/Util.pm
00:45 <****> Limbic_Region's url is at http://xrl.us/7c8t
00:45 <****> search for sub looks_like_number {
00:45 <****> (/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/) omfg
00:46 <****> handles positive and negative numbers, floats, scientific notation, etc
00:46 <****> handy
00:46 <****> There is a reason people don't use regular expressions for complex parsing. ;)
00:46 * Limbic_Region said that a bit ago
00:46 <****> also, will that regexp work with the GNU regexp library?
00:46 <****> mauke: is this the only way to do it? do{ my @t = split " ", $line;@t}
00:46 <****> (yet)
00:47 <****> How can I shoot off a process from a progrom, and continue on with the rest of my normal program without waiting for the newly executed one to finish?
00:47 <****> 3
00:47 <****> mauke: ''
00:47 <****> eval: $line = "1 2 3 4"; () = split " ", $line
00:47 <****> mauke: 1


Total 42 pages. You are browsing page 1/42.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo