Camelia, the Perl 6 bug

IRC log for #mojo, 2011-03-25

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

All times shown according to UTC.

Time Nick Message
00:20 perlrocks Twitter: "Catalyst vs. PerlDancer vs. Mojolicious vs. Django Nau's Battle Royale" (ja) --x86_64 http://twitter.com/x86_64/status/51075952867938304
00:38 xris left #mojo
00:57 daviddelikat joined #mojo
01:02 daviddelikat1 left #mojo
01:10 Kulag left #mojo
01:10 Kulag joined #mojo
01:12 alnewkirk-away left #mojo
01:14 Akron left #mojo
02:40 jpablobr joined #mojo
03:18 jpablobr left #mojo
03:33 perlrocks Twitter: "Deadsilu 135x17 print  Day of the Dead   The Virgin by mojolicious http://etsy.me/hAyxGd newly added to the @Etsy store!! xoxo" --mojo_licious__ http://twitter.com/mojo_licio​us__/status/51124409850806272
04:11 MisterHatt is it possible to pass the hashred of all params in a request to something? how would I go about it if so, just \$self->param ?
04:12 MisterHatt got a page with a heap of data (email, password, name, etc) and if someone wants to update their details, it'd be posting the entire thing which I just want to forward to the external API as a block update, so figured I could name my params accordingly and just pass the entire set of hashes over
04:13 MisterHatt if that makes sense at all
04:14 arpadszasz joined #mojo
04:49 crab $self->req->params->to_hash
05:39 plenum joined #mojo
05:50 plenum left #mojo
05:53 ysyrota joined #mojo
06:07 Alias_ left #mojo
06:09 MisterHatt ah nice, thanks crab
06:11 arpadszasz left #mojo
06:20 daviddelikat1 joined #mojo
06:23 daviddelikat left #mojo
06:34 plenum joined #mojo
06:37 kaare joined #mojo
06:38 koban` joined #mojo
07:04 AmeliePoulain joined #mojo
07:11 kvorg left #mojo
07:21 koban` left #mojo
07:21 koban` joined #mojo
07:23 koban` left #mojo
07:23 koban` joined #mojo
07:26 koban` left #mojo
07:35 Christian joined #mojo
07:35 Christian moin
07:48 AmeliePoulain left #mojo
07:54 koban joined #mojo
07:58 metaperl left #mojo
08:02 AmeliePoulain joined #mojo
08:10 yakudzo When I try to load lite app on shared hosting apache err log shows me "Premature end of script headers:" but if I run it from the console I ./myapp cgi it shows me "Content-Type: text/html;charset=UTF-8"
08:10 yakudzo where I'nm wrong ?\
08:11 yakudzo may be it cont like it because after Content-Type: text/html;charset=UTF-8 there is no \n\n?
08:29 metaperl joined #mojo
08:31 fhelmber_ joined #mojo
08:36 cosmincx joined #mojo
08:52 stephen joined #mojo
08:57 stephen1 joined #mojo
08:58 stephen left #mojo
09:02 koban left #mojo
09:05 koban joined #mojo
09:07 stephen1 left #mojo
09:08 plenum yakudzo: maybe Apache is using another perl installation?
09:11 plenum yakudzo: if your script starts with #!/usr/bin/env perl maybe Apache (as it is running as different user than you) is finding another perl installation in $PATH
09:12 yakudzo trying to check it with simple cgi script and eval
09:13 yakudzo eval "use Mojolicious::Lite" I mean
09:19 plenum yakudzo: i'm (falsely) assuming you are running Linux :)
09:19 yakudzo plenum, I running linux
09:19 plenum yakudzo: Linux/*nix
09:22 plenum yakudzo: as root run this (substitute www-data to the user your Apache installation runs as): su - www-data -c "perl -v"
09:28 yakudzo its shared hosting
09:29 yakudzo theere is no su
09:29 yakudzo but eval shows that cant find it
09:29 moritz did you install it to some local directory?
09:30 yakudzo they have 5.12 on the hosting
09:32 yakudzo inc shows not all directories that I use. I think I found solution
09:32 yakudzo (:
09:32 yakudzo @INC I mean
09:32 moritz use lib ...
09:41 abra left #mojo
09:51 abra joined #mojo
09:53 yakudzo yep it works
09:53 yakudzo many thanks
10:03 fhelmbe__ joined #mojo
10:06 fhelmber_ left #mojo
10:14 cosmincx left #mojo
10:17 fhelmbe__ left #mojo
10:18 fhelmber_ joined #mojo
10:23 baton8 joined #mojo
10:24 ysyrota left #mojo
10:25 ysyrota joined #mojo
10:25 spleenjack joined #mojo
10:28 Christian can i define a global $Log object?
10:29 moritz Christian: 'our $Log;' will be package scooped (but globally accessible)
10:30 moritz Christian: if you spell it $::Log instead, it lives in the main:: namespace, and can be accessed as $::Log everywhere
10:31 Christian thats it, i need it for the whole controller
10:32 moritz in a lite app you can just a lexical :-)
10:33 Christian :)
10:34 Christian i work only with real apps ;)
10:36 * moritz doesn't find his lite app unreal in any way
10:36 Christian it was a joke :)
10:37 moritz except that it's not yet deployed, but that's really a totally different story
10:37 moritz ok :-)
10:37 Christian its friday and the sun is shinning
10:37 moritz indeed
10:37 Christian for little things i use lite apps too
10:38 Christian it the fastest way to test somthing
10:39 moritz aye
10:41 fmerges joined #mojo
11:50 ana-im joined #mojo
12:06 cosmincx joined #mojo
12:16 fhelmber_ left #mojo
12:28 sri Christian: just use $self->app->log
12:31 fhelmber_ joined #mojo
12:47 ysyrota left #mojo
12:47 ysyrota joined #mojo
12:48 MisterHatt sri: do the perl raptor shirts come with optional raptor beards?
12:48 MisterHatt </awkward>
12:49 perlrocks Twitter: "Mojolicious Web Framework http://bit.ly/hii64E" --delicious50 http://twitter.com/delicious​50/status/51264351411240960
12:59 Akron joined #mojo
13:02 mattastrophe joined #mojo
13:06 marcus left #mojo
13:11 marcus joined #mojo
13:11 mattastrophe left #mojo
13:20 marcus left #mojo
13:21 marcus joined #mojo
13:31 abra left #mojo
13:36 crab moritz: what does your ununreal lite app do?
13:36 moritz crab: it's like a wiki for semantic relations between books
13:36 moritz http://moritzlenz.dyndns.org:3000/m/44 a link says more than 100 words
13:37 moritz *very* early preview, no design yet :-)
13:38 moritz after two weeks of occasionally working on it in my free time, I've discovered another site that does the same :(
13:40 moritz I decided to beat them with superior marketing *cough*, some features they don't have (collecting titles of translations, not yet implemented *cough*), and scraping their data (their license allows it :-)
13:40 moritz if somebody wants to play with the edit feature, use username: test  password; test123
14:21 crab argh.
14:22 crab my app doesn't return 404s any more. it does the "waiting for response, forgot to render or resume?" thing
14:22 mattastrophe joined #mojo
14:22 crab i wonder how or when i broke it.
14:22 moritz git bisect will tell you
14:23 moritz but good that you mention it, I should add a test for a 404
14:24 moritz any feedback on my ununreal app, btw?
14:28 Christian thx sri
14:47 AmeliePoulain left #mojo
14:51 crab there's no way to disable the .txt ->stash(format => 'txt') thing, is there?
14:53 sri no
14:57 mateu left #mojo
15:05 crab hum.
15:06 perlrocks Twitter: "#mojolicious and the JSP #perl module, plus #mongodb and some special sauce makes for some really funky apps." --perlninja http://twitter.com/perlninj​a/status/51298905761120256
15:06 sri crab: you can always manually delete it
15:07 crab sri: yep, that's what i'll do (well, just override is enough)
15:16 crab doing ->render_json() will _always_ result in an application/json response though, right?
15:22 sri no
15:22 crab oh.
15:23 kaare left #mojo
15:28 plenum left #mojo
15:36 Christian nice weekend to you all
15:36 crab sri: when would it not?
15:38 Christian left #mojo
15:39 sri format => 'txt'
15:42 crab does not seem to be true.
15:43 crab $self->render_json({foo=>1},format => 'txt') in a new lite_app gives me application/json
15:44 crab and reading the code in Renderer seems to support this, since it looks at ->{json} and forces the format to json
15:47 crab i think it's fine behaviour.
15:57 koban left #mojo
16:03 sri hmm, that's unexpected
16:07 Akron Fine but unexpected behaviour ... like a smoking wearing bear in the zoo.
16:09 mateu joined #mojo
16:09 sri hehe
16:09 cosmincx left #mojo
16:11 fmerges left #mojo
16:12 plenum joined #mojo
16:18 kaare joined #mojo
16:19 plenum left #mojo
16:27 crab smoking wearing bear?
16:27 crab oh, must be smoking <something>-wearing bear
16:27 moritz a bear that wears a smoking?
16:30 crab or maybe he meant a smoking, wearing, bearing. as in an improperly lubricated ball bearing.
16:31 crab maybe i should submit a doc patch before sri begins to think about changing this behaviour ;-)
16:38 ysyrota left #mojo
16:41 sri moritz: are coroutines in rakudo yet?
16:41 moritz sri: yes, as gather / take
16:41 sri neat
16:46 vel joined #mojo
16:47 vel left #mojo
16:48 vel joined #mojo
16:52 Akron crab: smoking-wearing, yepp. That's more unexpected.
16:54 vel left #mojo
16:56 vel joined #mojo
16:56 vel left #mojo
16:56 vel joined #mojo
16:59 vel left #mojo
16:59 vel joined #mojo
17:29 xris joined #mojo
17:47 ispy_ joined #mojo
17:57 arpadszasz joined #mojo
18:00 crab will using foo => qr/foo|bar|baz/ work to restrict a placeholder named foo?
18:00 crab i ask since i'm not supposed to use ()... oh, i guess i'll wrap them in a (?:...)
18:02 sri yes, (?:) is fine
18:02 sri don't forget you can always use "myapp.pl routes"
18:03 sri that might be worth mentioning in the documentation
18:13 Akron sri: Was there a (design) reason you coupled the event stream parser with Mojo::DOM instead of making a mojo::SAX?
18:14 sri i just didn't care much about the sax parser
18:15 sri the idea was that if i ever cared i could just move it to a separate package
18:15 sri tests for a sax parser would have been a lot of overhead :)
18:16 GitHub150 joined #mojo
18:16 GitHub150 mojo: master Sebastian Riedel * bb870df (2 files in 2 dirs): pod improvements - http://bit.ly/efOE8q
18:16 GitHub150 left #mojo
18:20 sri it's also not strictly sax
18:21 Akron Yes - but it's pretty easy to decouple - so I was wondering why putting everything in one module.
18:22 sri guess i wouldn't mind decoupling if there was a good plan
18:24 Akron Okay - I think I'll need a strict xml-parser for a project - using your event stream parser would be nice. If I've got a good reason to do it, I will share the use case and beg for decoupling. ;)
18:24 crab s/use case/patch with tests/
18:25 sri it's mostly about the tests
18:25 Akron Without a good use case, there is no reason for decoupling.
18:25 xris left #mojo
18:25 sri oh, you said strict
18:25 Akron But then - sure, I will provide tests as well.
18:25 sri the parser is very very relaxed actually
18:25 Akron sri: More strict.
18:26 crab hm, does $r->route('/foo')->via('get')-​>to(...)->via('post)->to(...) supposed to work?
18:26 crab s/does/is/
18:26 Akron sri: I will have a deeper look at the weekend.
18:28 crab i like how ./app routes quotes explicitly-set route names, so you know the others are auto-generated
18:29 sri crab: you're starting to ask more and more questions that are quicker answered with a look at the source :)
18:29 stephen joined #mojo
18:29 crab bad crab
18:30 crab but, well, usually i do look at the source too.
18:30 sri and correct my wrong answers xD
18:30 sri i'm too lazy to look and mostly just guess
18:31 sri but correcting me usually makes people feel good so that's fine :D
18:33 sri it's funny how i feel the most helpful when i'm wrong
18:34 crab heh
18:36 crab i saw my mojo app on a (friend's) ipad yesterday, and i was amazed at how non-crappy it looked
18:36 sri ipads scare me
18:37 sri http://jpteti.com/post/4072771125/the-ipa​d-is-99-more-open-than-any-other-computer
18:56 fhelmber_ left #mojo
19:02 spleenjack left #mojo
19:09 kmx left #mojo
19:11 ispy_ left #mojo
19:27 snearch joined #mojo
19:29 Akron left #mojo
19:37 mattastrophe left #mojo
20:04 Akron joined #mojo
20:21 rhaen hallo!
20:21 rhaen hello?
20:21 purl i guess hello is this thing on?
20:21 rhaen someone alive?
20:21 rhaen ah!
20:22 crab hi rhaen.
20:22 crab we are all zombies.
20:23 crab but we would be happy to eat your braaaanes
20:23 rhaen ah, cool :)
20:23 rhaen omg, I will give a talk about mojo tomorrow
20:23 rhaen at the LUGA
20:24 crab got slides we can look at?
20:24 rhaen which is a local German linuxish day
20:24 rhaen nope :)
20:24 rhaen because - it's about documenting things :)
20:24 rhaen and not about Mojo stuff itselfe
20:25 rhaen interesting tho :)
20:26 crab good luck with the talk.
20:26 rhaen thanks, I'll need it
20:43 elb0w sri that link makes me sad
20:43 crab give him a break, he's 14 years old
20:44 crab though i suppose it's scary that he's already so brainwashed
21:10 dekimsey left #mojo
21:19 snearch left #mojo
21:43 moritz fwwiw I have found a page which Mojo::DOM misparses... it doesn't close its <li>s, and has many of them
21:43 moritz http://www.isfdb.org/cgi-bin/tag.cgi?51
21:44 vel left #mojo
21:45 sri moritz: you know the drill ;)
21:46 moritz sri: I write a test case, you fix it? :-)
21:46 * sri nods
21:46 moritz sri: or is it more "this is so broken, get off of my lawn with that piece of crap"?
21:46 moritz :-)
21:46 sri only one way to find out :)
21:47 chansen heh
21:49 arpadszasz left #mojo
21:49 * moritz writes it on his TODO list for tomorrow
21:58 sri moritz: are you sure it is misparsed?
21:58 moritz sri: assuming that $dom->inner_xml isn't buggy: yes
21:59 moritz for example it produces <div id="main" />
22:00 moritz and the huge list below "Titles Marked With Tag: fantasy" is one <ul />, and then lots of <li />s without any content
22:00 moritz I'm sure firefox parses it differently
22:02 sri you checked with master?
22:02 moritz aye
22:03 crab moritz: oh, to respond to your earlier question: no, no feedback about the !!real app. i didn't really understand what it was doing.
22:04 crab but larry wall would probably like the chartreuse background.
22:04 moritz sri: what's the difference between to_xml and inner_xml (in Mojo::DOM)?
22:05 sri one only renders the children
22:05 moritz crab: the idea is to show which book form a series or story arc, and in which order you should read them
22:06 kaare left #mojo
22:06 moritz and yes, design sucks. After I have some more features I'll try to fix it.
22:06 crab moritz: ahh
22:12 sri moritz: the html is broken
22:13 moritz sri: that's what I've said from the start
22:13 sri i mean from the site
22:13 moritz yes
22:13 sri there are useless end tags mixed in that overwhelm the parser a bit
22:17 sri the parser looks through the stack if there is a matching opening tag and closes optional tags on the way up
22:18 moritz would it be more robst to completly ignore closing tags that have no matching opening tag?
22:18 sri how?
22:19 sri look up the stack and do it again for optional tags after finding a matching one?
22:19 moritz yes
22:19 sri would be quite expensive
22:19 moritz or maybe keep a hash of open tags seem so far
22:19 moritz *seen
22:19 sri huge mantainance overhead
22:20 sri we are now entering the domain of html healing
22:20 sri not sure i want to go there
22:22 sri but i don't have time to work on it anyway
22:23 sri the whole optional tag code would need a cleanup first
22:25 Akron sri: This sgml-behaviour thing is totally broken, why not using tag-healing at all with a 'I eat everything' parser and a defined tag-closer window?
22:25 Akron sri: I don't mean, it's broken in Mojo - it's broken in html. ;)
22:26 sri Akron: don't understand the question
22:27 Akron sri: Instead of "correct" html closing you could let the parser heal by looking at the stack (with a defined look-behind frame) and if there's nothing in there, parsing with a defined look-ahead.
22:29 sri feel free to improve the parser, just don't make it more complicated
22:30 sri but did you pick up earlier what the problem actually was?
22:30 Akron I'm currently having a look at the decoupling.
22:30 Akron Yes - I understand the problem.
22:31 sri this is about optional tags, not really useless closing tags causing havoc
22:32 sri the useless closing tag just triggers optional tag cleanup code
22:32 Akron Yes - I mean: always fall back to clean up instead of treating optional tags special.
22:33 sri i don't think that would work
22:33 sri optional tags have a shitload of conditions attached
22:34 sri i would be more than happy if you find a better solution though ;)
22:34 Akron Optional tags are bad. As the real world is.
22:34 sri couldn't agree more, they suck big time
22:35 Akron I'll do my very best. ;)
22:35 sri tests are quite good, so making mistakes will be rather hard ;)
22:37 Akron However - there are some well-formed examples Mojo::DOM does not treat right at the moment.
22:38 Akron So - there are some hard tests left I think. ;)
22:46 sri Akron: need test case
22:47 sri and a link to the right section of the spec i suppose if they are so hard
22:56 marty left #mojo
23:07 kvorg joined #mojo
23:15 kvorg left #mojo
23:15 kvorg joined #mojo
23:17 Akron sri: http://pastebin.com/2NCbLQgc and http://www.w3.org/TR/xml/#sec-prolog-dtd
23:18 Akron (First I though href="javascript:alert('Hello \"World\"!')" would also be a real world case - but it's not accepted by browsers ...)
23:23 kvorg left #mojo
23:23 kvorg joined #mojo
23:24 sri Akron: ok, i don't think i really care about inline dtds :S
23:24 Akron :( And if I come up with a patch?
23:25 sri if it doesn't make things more complicated sure
23:26 Akron Okay.
23:46 kvorg1 joined #mojo
23:46 kvorg left #mojo
23:55 kvorg1 left #mojo

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