Camelia, the Perl 6 bug

IRC log for #bioperl, 2013-02-14

| Channels | #bioperl index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
02:33 census_ joined #bioperl
02:33 census_ hi!
05:43 deafferret !
11:44 ncultures joined #bioperl
11:44 ncultures left #bioperl
12:39 census__ joined #bioperl
12:39 census__ Hi!
14:08 ObseLeTe joined #bioperl
17:22 looper joined #bioperl
18:51 carandraug joined #bioperl
19:05 carandraug a questino. We just received word in Octave about GSoC. Is bioperl going to apply too?
19:05 carandraug *question
19:13 census__ what is bioperl?
19:14 census__ I thought bioperl was a bunch of cool perl users.
19:19 carandraug census__, nop. http://www.bioperl.org/
19:31 deafferret :)
19:31 deafferret carandraug: I'd ask bioperl-l about GSoC. Somebody just needs to step up and do it again, if anyone wants to
19:33 carandraug deafferret, I'd apply to be a student not a mentor :p I'll already be a mentor in Octave
19:35 deafferret sure. still, that's the mailing list to have those discussions.
19:35 deafferret prodding them might get you a student slot :)
19:35 deafferret also, you could apply for Perl Foundation grants
19:35 deafferret they're looking for applicants
19:37 carandraug deafferret, that'd be perl work only. I'd rather do some biology at the same time. Something that I could use for my own work. My experience in FOSS is that it only works when one's is scratching their own itch
19:38 deafferret agreed :)
19:44 carandraug deafferret, has ever the perl foundation issued a grant for a bioperl related project?
19:44 deafferret uhh.... dunno. there website might have a history of grants on it
19:59 census__ quick perl 5 q please?
20:00 deafferret census__: don't ask to ask, just ask :)
20:00 census__ ok thanks :)
20:00 census__ i have a .txt from which i input data like: Edward,Abbenante,Rhode Island,1915
20:01 census__ and then i split 1915 to 1913-1917
20:01 census__ i am doing this as:
20:01 census__ @args{qw/givenname surname birth_place birth_year} = map { /\s/ ? qq["$_"] : $_ } split /,/, $line;
20:01 census__ $args{birth_year} = ( $args{birth_year} - 2 ) . '-' . ( $args{birth_year} + 2 );
20:01 census__ @args2{qw/givenname surname birth_place birth_year} = split /,/, $line;
20:01 census__ But I get the error:
20:01 census__ "Backslash found where operator expected at jsontest5.pl line 27, near "qw/givenn ame surname birth_place birth_year} = map { /\""
20:02 census__ Why is this a problem? What should it be instead?
20:03 census__ full script: http://scsys.co.uk:8002/230476?ln=on&amp​;tidy=on&hl=on&submit=Format+it!
20:05 carandraug census__, that doesn't sound very biological
20:25 deafferret census__: ya, this is more irc.perl.org #perl-help than #bioperl :)
20:25 * deafferret starts looking anyway
20:26 deafferret census__: so you forgot your ending /   in your qw//
20:26 deafferret after birth_year
20:26 deafferret brb
20:42 census__ yes, you are correct deafferret
20:42 census__ I fixed it! :)
20:43 deafferret woot!
20:43 sl33v3 joined #bioperl
20:43 census__ may i ask you one more q please? :)
20:43 census__ I am stuck in line 40: http://paste.scsys.co.uk/230480?ln=on&amp​;tidy=on&hl=on&submit=Format+it!
20:44 census__ every entry in the input .txt gets stuck there, and i know in theory they should not.  i also know they site is fine because i just ran another script using a different part of it.
21:06 deafferret census__: so the LWP::UserAgent docs should tell you how to print what's wrong there
21:07 deafferret e.g. die $response->status_line;
21:08 deafferret oh... ya, you're using $response->code lower down, so apparently you knew that?
21:08 deafferret so... what error(s) are you getting?
21:08 census__ No error.  it compiles
21:08 census__ But it only prints the warning.
21:08 census__ Infinitely until I kill it.
21:09 census__ the warning that i made, that is
21:09 deafferret huh? stick $response->status_line in your warning and tell me what it says
21:10 census__ if ( not $res->is_success ) { $response->status_line; warn "Bad response :("; sleep(1); redo }
21:10 census__ is that what you have in mind?
21:11 census__ Error: "Global symbol "$response" requires explicit package name at jsontest5.pl line 40 . Execution of jsontest5.pl aborted due to compilation errors."
21:16 deafferret unless ($res->is_success) { warn "Bad response: " . $res->status_line; }
21:17 census__ Error: "Bad response: 404 Not Found at jsontest5.pl line 40, <$l> line 1. malformed JSON string, neither array, object, number, string or atom, at charact er offset 1 (before "<!DOCTYPE html>\n<ht...") at jsontest5.pl line 42."
21:18 census__ DId I do something wrong:
21:18 census__ Line 40 = unless ($res->is_success) { warn "Bad response: " . $res->status_line; }
21:19 deafferret your code is fine. you're getting 404 back from the server.
21:20 deafferret so i'd also dump your $uri and see if you're surprised that that $uri 404s
21:20 census__ that is strange though because i've scraped another part of the website.
21:20 deafferret dump meaning "warn" it
21:23 census__ If I comment it out, I get: "malformed JSON string, neither array, object, number, string or atom, at charact er offset 1 (before "<!DOCTYPE html>\n<ht...") at jsontest5.pl line 42."
21:23 census__ That is, if I comment out that warn line on line 40
21:24 census__ Maybe I did not do firebug correctly for this site?
21:27 deafferret umm... your sleep(1); redo   is sweeping a bunch of messy stuff under the rug. if you don't care, then don't worry about it.
21:27 census__ what do you mean exactly?
21:29 deafferret do you see where you were doing    sleep(1); redo;   on line 40?
21:29 deafferret do you understand what that was doing?
21:30 census__ i thought that waits 1 second and tries for success again?
21:31 deafferret I suspect something weird is happening. I would expect consistent 404 responses if you're actually requesting the same $uri twice. Don't you think?
21:31 deafferret so if I were you I'd care about tracking down which $uris, exactly, were 404ing
21:31 deafferret but if you don't care, then just put the redo back :)
21:32 census__ no, i don't.
21:32 census__ i think it's random at the moment.
21:32 census__ i truly believe the data to be perfect
21:32 census__ the inputs that is
21:32 census__ and the site is a little fragile/flaky
21:32 deafferret okey-dokey
21:32 census__ i know with my other script, the same input can sometimes work and then 5 seconds later it fails, and then 5 secs later it works again
21:33 deafferret bummer. Whatever Works!  :)
21:36 census__ you suggested to put a warn earlier ?
21:37 deafferret ?  If it were me I would want to know EXACTLY which $uris failed, and why. So I'd open up a log file and warn or print all such info to that file.
21:37 deafferret but, obviously you can do whatever you want.
21:38 census__ oh no, i don't care about that.  eventually every url should work.  now none are working
21:38 census__ so i wonder if i am doing something earlier with the my url line wrong altogether
21:40 deafferret nopaste your CURRENT code
21:41 census__ http://scsys.co.uk:8002/230502?ln=on&amp​;tidy=on&amp;hl=on&amp;submit=Format+it!
21:41 deafferret so its probably stopping at line 40   die Dumper $res, right?   take that back out so you ignore failures
21:42 deafferret is your program saying "died at line 40?" that would be your hint :)
21:43 census__ Bad response :( at jsontest5.pl line 40, <$l> line 1.
21:44 deafferret huh? show me another paste where you show you running the program and EVERYTHING that happens on your screen
21:48 census__ ok.  i got it !!!
21:48 census__ it was a firebug issue :)
21:48 census__ i fixed it...
21:49 deafferret yay!
21:50 census__ i have one more hunch/question
21:51 census__ http://scsys.co.uk:8002/230504?ln=on&amp​;tidy=on&amp;hl=on&amp;submit=Format+it!
21:52 census__ at the end, i have my table.
21:52 census__ consider lines 103-105.
21:52 census__ and then lines 111-113
21:55 census__ It's not a huge deal
21:55 census__ Everything runs fine
21:55 census__ but imagine that cell in line 103-105 is blank.
21:55 census__ the terminal gives me a warning it is blank and the output prints ,, instead of ,"",
22:31 census__ are you good with table::extract?
22:40 deafferret i don't recall using HTML::TableExtract;
22:40 census__ ok.  thanks.
22:40 census__ i'm using it to scrape.
22:42 deafferret census__: so lines 107-113 I wouldn't manipulate your hashes like that, I'd just do it all in the printing
22:42 deafferret but if it works then I guess don't worry about it
22:43 census__ oh.  i just changed them around!!
22:43 census__ let me show you
22:44 deafferret does s/^\s+|\s+$//g actually work? I would have guess it wouldn't
22:44 deafferret but I'm often wrong. :)
22:44 census__ http://scsys.co.uk:8002/230524?ln=on&amp​;tidy=on&amp;hl=on&amp;submit=Format+it!
22:44 census__ yeah, totally does.
22:44 deafferret ah yes, that's much better :)
22:44 deafferret good job! :)
22:46 deafferret maybe   for ($o, STDOUT) { print ( join ",", @values ), "\n" }    is cleaner?
22:47 deafferret also I like to    use 5.10.0;   and then "say" things instead of "print" them. that adds \n to the end :)
22:47 census__ what do you mean?
22:47 census__ which line?
22:47 deafferret um, my first suggestion was a replacement for 94,95
22:48 deafferret my second suggestions is for anywhere you print "\n"  :)
22:50 census__ ok, cool !  :)
22:52 carandraug joined #bioperl
22:54 census__ I have a q.
22:55 census__ If I leave my computer .for awhile . . . will perl continue to run?
22:55 census__ Or will there be a screen saver and perl will stop running?
23:28 deafferret duuno, that's up to your computer.
23:32 census__ ok.  thanks for letting me know
23:44 sivoais joined #bioperl

| Channels | #bioperl index | Today | | Search | Google Search | Plain-Text | summary