Camelia, the Perl 6 bug

IRC log for #mojo, 2010-12-18

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

All times shown according to UTC.

Time Nick Message
00:20 GabrielVieira joined #mojo
00:25 GabrielVieira2 left #mojo
00:44 Akron left #mojo
00:52 marty left #mojo
00:56 marty joined #mojo
02:09 crab moo.
02:35 daviddelikat joined #mojo
03:04 achromic left #mojo
03:21 daviddelikat left #mojo
03:27 daviddelikat joined #mojo
04:04 tholen42 joined #mojo
04:05 tl left #mojo
05:34 MojoGuest579 joined #mojo
05:34 MojoGuest579 From: http://www.google.co.jp/search?sourceid=chrome&​amp;ie=UTF-8&q=WebSocket+%E3%83%87%E3%83%A2 (1 hits)
05:35 MojoGuest579 left #mojo
06:40 daviddelikat left #mojo
06:57 su-bzero is now known as su-bzero[A]
08:00 su-bzero[A] is now known as su-bzero
08:21 und3f[A] is now known as und3f
08:33 su-bzero is now known as su-bzero[A]
08:33 su-bzero[A] is now known as su-bzero
08:33 und3f left #mojo
08:33 und3f joined #mojo
08:34 su-bzero left #mojo
08:34 su-bzero joined #mojo
08:36 su-bzero 2
09:16 perlrocks Twitter: "@kraih Nice, looks good in FF 3.6 too now :-) . btw, is there an IRC channel for mojolicious? #html5 #mojolicious #perl" --zipkid http://twitter.com/zipkid/status/16059125431533568
09:29 su-bzero is now known as su-bzero[A]
09:30 zipkid joined #mojo
09:31 zipkid Goodmorning :-)
09:36 zipkid "Application name has to be a well formed Perl module name."   i used  'ds' , what is wrong with that?
10:00 * sri waves
10:00 sri zipkid: you wouldn't name a cpan module like that, would you?
10:02 sri all lower case is reserved for pragmas *hint*
10:05 su-bzero[A] is now known as su-bzero
10:15 moritz technically it's still a valid module name.
10:16 zipkid sri: moritz ds_app works....
10:19 sri moritz: i never said it isn't
10:19 sri but it is very bad style
10:19 sri which we don't encourage
10:20 sri zipkid: umm, no ds_app does not work either
10:20 sri first char needs to be upper case
10:22 zipkid sri: .... it works for me here.... care to come and have a look, Brugge, Belgium. Very nice with snow and stuff... :-)
10:23 sri zipkid: then you are using another version now
10:23 zipkid sri: latest and greatest since this morning.... admittedly ds_app was created with tha latest of yesterday ...
10:24 sri see
10:24 zipkid lol
10:24 sri that error is new
10:27 GitHub71 joined #mojo
10:27 GitHub71 mojo: master Sebastian Riedel * 6c79c7f (1 files in 1 dirs): improved generator exception - http://bit.ly/gvP77r
10:27 GitHub71 left #mojo
10:27 sri that should help in the future
10:28 zipkid Your application name has to be a well formed (camel case) Perl module name
10:28 zipkid like "MyApp".
10:28 zipkid :-)
10:29 zipkid Thx!
10:34 * sri has to go xmas shopping now :S
10:34 zipkid poor sri
10:34 zipkid There is Chrismas-Market here in Brugge too! :-D
10:39 * moritz has mostly surpressed the thought of christmas presents
10:40 moritz worked well for the family, in all cases somebody else had an idea and wanted me to take over part of it
11:26 weestrom joined #mojo
11:26 weestrom hey all, just curious before I pull in Digest::MD5, is there any password hashing built into mojolicious?
11:30 moritz don't even think of md5, it's so fast that it's very easy to crack
11:31 moritz http://codahale.com/how-to​-safely-store-a-password/
11:45 weestrom left #mojo
11:46 weestrom joined #mojo
11:46 weestrom its just to hash a login for a blog admin page
11:49 weestrom plus, its my general opinion <%= $soapbox %> that if someone has SQL access its too late to worry too much about security of your site
12:07 memememomo_ joined #mojo
12:07 memememomo_ left #mojo
12:08 memememomo_ joined #mojo
12:08 memememomo_ is now known as memememomo
12:15 otaviof left #mojo
12:30 achromic joined #mojo
12:45 weestrom left #mojo
13:24 weestrom joined #mojo
13:31 daviddelikat joined #mojo
13:35 snearch joined #mojo
13:42 crab scrypt is better than bcrypt. but i haven't had the time or inclination to write a perl scrypt module.
13:45 zipkid how can i 'mix' the app and the static content in the same url (no ScriptAlias) with Apache CGI the way the built in server does it?
13:49 zipkid i want to avoid to have to use the /<myapp>/ part in the urls
13:53 memememomo is now known as memememomo_
14:02 avkhozov joined #mojo
14:20 crab zipkid: use a RewriteCond %{REQUEST_FILENAME} !-f to point requests to the CGI or something like that.
14:20 zipkid crab: hmm... right...
14:24 crab zipkid: much better to use mod_proxy and not CGI, i think.
14:24 zipkid ? s/proxy/perl/ ?
14:24 crab no.
14:25 crab ProxyPass / http://localhost:3000/, ProxyPassReverse / http://localhost:3000/ etc.
14:25 zipkid is the internal server powerfull enough ?
14:26 zipkid or use Hypnotoad ?
14:26 crab sure. use hypnotoad or plackup -s Starman to run your app on port 3000.
14:28 zipkid ok.... sounds even easier...
14:39 crab yes. it's a very nice way to do things.
14:40 crab and, better still, if you configure a caching reverse proxy and make your mojo send Expires: for static content, you don't need to worry about not hitting mojo for static resources.
14:40 crab as i just discovered a couple of days ago.
14:49 zipkid indeed...
14:58 zipkid hmm..... where does hypnotoad log to?
15:05 crab i don't know.
15:06 zipkid :-(
15:07 zipkid logging is 'kinda usefull' when developing :-)
15:07 zipkid ok... just the builtin server will do for dev :-)
15:19 sri hypnotoad uses the normal mojolicious logger
15:19 sri but usually with a production.log file
15:20 sri it's basically all up to the mojolicious app
15:22 sri log rotation can be done with the normal zero downtime software upgrade trick
15:22 sri since it triggers a log file reopening
15:24 * zipkid is not gettng anything logged with hypnotoad :-(
15:24 sri the log level is very high
15:24 sri it will only log errors in production mode
15:25 zipkid ahzo...ic
15:25 sri hypnotoad is a pure production server
15:26 zipkid no way to config the log level?
15:26 sri lots
15:26 zipkid btw, found nice christmas gifts?
15:27 sri yea, but not all yet :S
15:27 zipkid MOJO_LOG_LEVEL=debug ?
15:27 sri app->log->level('debug') is prolly better
15:27 sri but env var works too
15:28 sri very bad idea for production though
15:28 zipkid :-)
15:28 daviddelikat left #mojo
15:28 zipkid ok, thx!
15:29 sri if you want to keep some statistics just log them yourself ;)
15:29 zipkid need to go for a while! cya
15:29 * sri waves
15:29 zipkid sri: yes, but i'm developing and learning.. loggin helps :-)
15:29 crab i need to add more logging to my app(s)
15:29 sri don't develop with hypnotoad
15:30 sri it is very very bad for that
15:30 stephan48 why?
15:30 zipkid i understand.. but i want to know how to anyway
15:30 crab i'm not developing with hypnotoad. i just need to add more logging to my app(s)
15:30 sri thats ok
15:30 zipkid ok, later!
15:31 sri hypnotoad is optimized for production setups, the normal daemon for development
15:32 sri they behave very similar though, so you can expect apps to work exactly the same in both
15:33 sri in fact hypnotoad is a manager process with a pool of normal daemon workers, tuned for better uptime
15:34 crab ...which is very nice, testing/deployment-wise.
15:34 * yko wants to better know how does ht work
15:34 yko but it's my ptoblem, ill dig the source i think
15:34 perlrocks Twitter: "Mojolicious - Web framework for Perl http://www.findbestopensour​ce.com/product/mojolicious # opensource" (id) --bestopensource http://twitter.com/bestopenso​urce/status/16154464687751168
15:35 yko hey! they forgot to add 'best'
15:35 sri yko: the source is rather pleasant to read
15:35 crab yko: it's basically a simple pool manager, good thing about it is there's not much code
15:36 crab very straightforward operation, see Mojo::Server::Hypnotoad (i'm sure you know that already)
15:36 yko i'm reading it already
15:36 sri the only complicated topic is the zero downtime restarter
15:37 sri Perl makes that part a lot easier than ruby though
15:37 yko sri: how do you think is it possible to have a pool of different workers in the same way?
15:37 sri wouldn't be too hard
15:37 yko i mean - different applications
15:37 yko that's nice
15:37 sri you need a manager for managers
15:38 yko ha! nice
15:38 sri otherwise you don't get copy on write
15:38 sri it's not supported atm though
15:38 crab sri: it (approx.) just forks and execs the new binary, right?
15:38 sri crab: yea, and makes sure listen sockets are inherited
15:38 crab how?
15:38 sri that part is in Mojo::IOLoop
15:39 sri https://github.com/kraih/mojo/blo​b/master/lib/Mojo/IOLoop.pm#L315
15:39 sri and the code around it
15:40 sri i store file descriptor numbers in an env var
15:40 yko hmm, but... does ht really 'execs the new binary' as crab told?
15:40 sri yes
15:41 sri without closing the listen sockets
15:41 marty Is there a way to set a hash in the startup() routine so that it is always available in stash?
15:41 * yko confused
15:41 sri yko: like i said, thats the only complicated part ;p
15:41 marty I'm trying to set some global variables that I can access from stash all the time
15:42 yko marty: sub startup { $self->stash('some_var' => { foo => 'bar'}) } <-- that's what you mean?
15:43 marty Yep, I tried that but let me try again and make sure I did not do a typo...
15:43 sri marty: $self->defaults(foo => 'bar')
15:44 snearch left #mojo
15:44 sri i always wanted to rename defaults to stash too, but thought it might be too confusing
15:44 yko ouch, i may be wrong, sri is right. as usual ---
15:44 sri since there would be two stash methods behaving differently
15:45 marty Ahhhh, guess what?  sir, you were right!!  Imagine that.  :)  Thank you
15:45 yko sri: ye,. i remember now. we were discussing it few month ago
15:45 marty Thank you also yko, I tried the same thing just like you.
15:45 yko -_- it does not do me the honor :)
15:46 marty s/sir/sri/g
15:50 perlrocks Twitter: "Na @ amari3 I think so. Depends on too many modules, I installed the unit is still not end. Mojolicious:: Lite to change." (ja) --ABE_TAKASHI http://twitter.com/ABE_TAKAS​HI/status/16158392506650624
15:55 vel joined #mojo
16:00 zipkid is MOJO_RELOAD default 1 in the development server?
16:02 crab yko: if process A has listen sockets 3,4,5 and forks and execs another copy of itself, B has the same file descriptors, but doesn't know they were listen sockets
16:02 crab yko: hence $ENV{MOJO_REUSE} = "3:4:5"
16:03 yko crab: thanks, really good description
16:03 yko it completes whole picture
16:16 perlrocks Twitter: ""All files," The Simpsons "or" Futurama "from, please include at least one citation. "" Peace! "Mojolicious:: Guides:: CodingGuidelines http://bit.ly/igOeVX" (ja) --nekoruri http://twitter.com/nekorur​i/status/16164909406490624
16:46 sri zipkid: nope, as the lite tutorial says on line 1 or so
17:07 zipkid actually... for a not so small web app. Is Mojolicious or ::Lite 'better' ?
17:14 crab zipkid: read the growing guide and decide for yourself
17:15 crab zipkid; i didn't bother with ::lite at all, i went straight to mojolicious, but i knew fairly well beforehand what all would go into the app
17:15 crab but whatever you decide, (a) using mojolicious from the start won't hurt you, and (b) if you outgrow ::lite, moving up is easy
17:16 sri you are supposed to learn lite first and move on from there
17:17 zipkid i think Lite will be too 'Lite' for my app.
17:18 zipkid I have an existing app that needs migrating to a new framework
17:19 sri read the growing guide and decide for yourself
17:19 sri you need to know both anyway
17:20 zipkid sri: 'the growing guide' is that http://search.cpan.org/~kraih/Mojolicio​us-0.999950/lib/Mojolicious/Guides.pod or is there more?
17:21 sri not on cpan
17:21 sri github
17:21 sri if you have latest just use the perldoc browser
17:21 sri linked from the welcome page of any fresh app
17:22 zipkid so the same but with perldoc ?
17:22 sri ?
17:22 zipkid perldoc Mojolicious::Guides ?
17:22 zipkid perldoc Mojolicious::Guides:<guide>
17:22 * sri doesn't follow
17:23 sri https://github.com/kraih/mojo/blob/mas​ter/lib/Mojolicious/Guides/Growing.pod # anyway, thats the guide in question
17:24 crab my mojo links to Guides.pod on search.cpan.org
17:24 sri documentation is way better in the github version
17:24 zipkid ok, thx
17:24 zipkid and indeed, i thought it links to github here too...
17:25 crab ah, fixed in later versions
17:25 sri yea, the welcome page will now link to its own perldoc browser of it can
17:25 sri *if
17:26 crab Malformed UTF-8 character (fatal) at /usr/local/share/perl/5.10.1/Mojo/DOM.pm line 937, <GEN20> line 722.
17:26 crab (when i clicked on the link to Guides::Routing)
17:26 crab Guides::Rendering works ok, except for some junk characters at the start
17:26 crab looks pretty
17:26 crab er, overall, i mean. not the junk characters.
17:27 sri no junk characters here
17:27 sri and no errors at all
17:27 crab you use perl 5.12.x?
17:27 sri ye
17:28 sri flawless with 5.10 too
17:28 crab how strange
17:28 crab i get "unexpected continuation byte 0x84, with no preceding start byte" and "unexpected end of string". let me dig a bit.
17:29 sri 5.8.9 works flawless too
17:32 sri yko: you seem to be forgetting a lot ;p
17:33 yko sri: yes, i am
17:33 yko from other hand it's good: every day i have many news
17:33 sri lol
17:36 crab the junk is always at the beginning, immediately after <div id="perldoc">, therefore somehow the $dom stringification is involved
17:36 crab oh, at the end too
17:40 crab sri: perl -MPod::Simple::HTML -le 'print $Pod::Simple::HTML::VERSION'
17:40 crab ?
17:40 crab i have 3.13
17:41 marty Interesting.  I get the same error as crab.  But only when I try to view the routing pod.
17:41 marty Of course, I'm using a stock perl (kubuntu) so who knows.....  :)
17:41 crab marty: don't you get weird characters right at the top of everything that doesn't give the error, though?
17:41 sri crab: 3.13
17:42 marty Yep, I see those also.  Tested in both FF 4 and Chrome, same thing.
17:42 crab what is b() in     $app->helper(pod_to_html => sub { shift; b($self->_pod_to_html(@_)) });
17:42 marty but MAN!!! those doc pages are georgeous!!!  Great work sri
17:43 sri :)
17:43 sri crab: Mojo::ByteStream
17:43 sri prevents escaping
17:44 marty Malformed UTF-8 character (unexpected continuation byte 0x9e, with no preceding start byte) in pattern match (m//) at /usr/local/share/perl/5.10.1/Mojo/DOM.pm line 932, <GEN27> line 722.
17:45 marty Thats the error I'm getting when trying to view pod.  No big deal here.  Just thought I would throw that out there in case it is helpful
17:45 sri nothing i could do
17:46 sri someone else has to fix it
17:47 crab sri; do you get a NAME heading at the beginning?
17:47 sri yes, everything flawless
17:47 marty It must be something in our perl setups, crab
17:49 sri does it help if you add a $dom->charset(undef) before ->parse?
17:51 crab that doesn't fix it, no.
17:51 sri weird
17:56 GitHub107 joined #mojo
17:56 GitHub107 mojo: master Sebastian Riedel * 43c86c4 (1 files in 1 dirs): added some perldoc browser tests - http://bit.ly/gXxefI
17:56 GitHub107 left #mojo
17:56 sri crab: does that test pass?
18:00 crab #          got: 'SYNOPSIS'
18:00 crab #     expected: 'NAME'
18:00 crab (test 'h1')
18:01 sri hmm
18:02 sri ok, now it's testable, someone please fix it :)
18:02 marty Where would we look to fix it?
18:02 sri Mojolicious::Plugin::PodRenderer
18:03 sri around the Mojo::DOM code
18:03 marty Ok, Diving in.....  If you don't hear from me within the hour then you can assume I've gone blind brain strain.   :)
18:04 * sri salutes
18:05 crab it works if i remove that b()
18:05 sri interesting
18:07 sri crab: does it help if you add a "use utf8" to Mojo::ByteStream?
18:08 crab no.
18:09 sri :S
18:09 crab isn't "use utf8" just for utf8 source anyway, i.e. for utf-8 characters inside that .pm to be correctly handled?
18:10 sri was just a wild guess
18:10 sri for the strignify code in import
18:10 sri *stringify
18:10 sri thats where things go wrong
18:11 crab oh, i was confused about why it didn't get escaped when i removed the b(), but the template does <%== $perldoc %> anyway
18:11 sri ye == is not neccessary
18:12 sri umm
18:12 sri actually it is :S
18:12 * sri is confused
18:12 crab i'm confused too. if you have b() i would have thought == was unnecessary, or vice versa
18:13 sri hmm, wonder why the import code was so complicated
18:13 GitHub158 joined #mojo
18:13 GitHub158 mojo: master Sebastian Riedel * bb2c156 (1 files in 1 dirs): cleanup - http://bit.ly/idLuLi
18:13 GitHub158 left #mojo
18:13 sri does that make a difference?
18:14 crab no
18:14 yko no
18:14 sri :(
18:15 sri i think bytes get turned into chars accidentally
18:18 mmcleric left #mojo
18:18 crab but where are the strange bytes coming from at all?
18:19 sri screwed up bytes
18:20 sri removing b() on line 48 fixes it?
18:21 crab yes
18:22 crab completely
18:23 sri does "$output = b($output)->decode('UTF-8')->to_string;" on line 126 fix it too?
18:24 weestrom hmmm... checked the guides and docs first, and they are light on this, what am I doing wrong with trying to store a uid with a cookie using Mojolicious::Session? My app stores a Mojolicious::Session->new; in $self->{Session}, has a method to return it called session, but when try to check for a stored value inside a controller, by $self->app->session->load($userid), I get: Can't call method "signed_cookie" without a package or
18:24 weestrom object reference at /usr/local/share/perl/5.10​.1/Mojolicious/Session.pm line 21.
18:24 weestrom sorry for wall of text, any pointers?
18:24 sri weestrom: that sounds very wrong
18:25 weestrom ok, how so?
18:25 sri you are not supposed to touch app->session unless you really really know what you're doing
18:25 yko removing b from #48 causes test to fail at 6, 7, 10
18:26 crab sri: no, makes no difference
18:26 weestrom ok, so what is the correct way of using mojolicious to store a uid on the client?
18:26 sri weestrom: it's explained in the documentation
18:26 weestrom link please?
18:26 weestrom I couldn't find it
18:26 sri growing guide covers sessions
18:26 sri it's on github
18:27 sri lite tutorial has a quick recipe
18:27 weestrom in the wiki section?
18:27 sri pod
18:28 sri yko, crab: i'm out of ideas :/
18:28 sri weestrom: wiki might contain something too
18:29 yko just let other digg it, i think with some time problem will be found
18:30 weestrom hmm, sri: any way that I can browse pod without broken links back to search.cpan.org for other secions within the pod?
18:30 weestrom I'm really enjoying mojolicious so far, btw
18:30 sri weestrom: latest version on github has a built in pod browser
18:31 weestrom ahh, I've got it out of cpan, and nothing's broken so far in it, I will wait for built in pod browser to hit cpan
18:31 josh left #mojo
18:31 weestrom managed to browse down to it as its orgnaized well
18:31 sri you add a line "plugin 'pod_renderer';" to your app and can browse all documentation under /perldoc
18:31 josh joined #mojo
18:32 marty Found a clue.  Disabling parser->force_title('') in PodRendere.pm lets the page render.
18:32 sri marty: interesting, does it screw up something else?
18:32 weestrom ok, I see the example in the pod, thx much!
18:33 weestrom I WAS way backwards on how to use the sessions, I like the coding style this framework drives, its VERY readable!
18:33 sri :)
18:33 marty Nope.  I still have a few stray (strange) characters at the top of the page.  But the page renders where before it only gave me the error
18:34 weestrom I'm an embedded matlab developer who hacks procedural perl a bit as a necessity delving into OoP and WebApp design at the same time as a 20% passion project
18:34 weestrom always been something I've wanted to tackle, and I'm really enjoying myself as I get my arms around it
18:34 crab removing force_title does not work for me
18:35 * moritz always wonders what device embedded developers are in
18:35 yko sri: i think problem lies in Mojo::DOM
18:35 weestrom </offtopic>
18:35 marty On line 117 of the PodRenderer.pm?
18:35 sri weestrom: have fun :)
18:35 sri yko: not sure
18:35 yko after self->pod_to_html it's ok,line 73
18:35 sri hmm
18:35 marty Weestrom:  You're going to love Mojo, it's fun.  (we can thank sri for that)  :)
18:35 yko or so. after $self->pod_to_html it's ok
18:36 sri i suspect a charset problem
18:36 yko but right after Mojo::DOM->new->parse(... its broken
18:36 weestrom definitely have been, just getting my admin login working and the rest of the REAL nuts and bolts are done, then its css and config
18:36 sri yko: $dom->charset(undef) does not help right?
18:36 yko moment
18:36 sri (before parse)
18:37 yko oh... moment
18:37 sri weestrom: make sure to check out the whole new welcome page thing (latest github version + mojo generate lite_app)
18:37 weestrom I've been seeing the progress on twitter
18:38 yko no it doesn't
18:38 yko just let me or somebody else write correct test for Mojo::DOM
18:38 yko i think now it's not too hard, when problem is localized
18:38 sri yko: that would help a lot
18:39 marty Yep. agreed.  Hard to track down if it's not happening on sri system
18:39 sri hmmmmm
18:39 sri could be that line "decode $charset, $xml if $charset && !utf8::is_utf8 $xml;"
18:39 sri maybe the utf8 flag is set on your system
18:40 sri which prevents a proper decode or so
18:40 yko on three machines of other people? :)
18:40 yko but.. maybe
18:40 sri i suspect you are all on linux
18:40 marty Yep
18:40 yko locale: LANG=en_US.UTF-8
18:40 sri same locale possibly
18:40 yko on windows test dies even worse
18:40 marty Yes, I have the same locale as yko
18:41 crab me too
18:41 sri yko might be right that all i need is a Mojo::DOM test case
18:41 sri with the same kind of input
18:41 sri just a parse + stringify
18:43 marty I'll see if I can work one out
18:43 sri \o/
18:53 yko hm
18:54 yko utf8::upgrade($self->pod_to_html(..)) helps
18:54 yko that's not i'm actually looking for, just inform
18:55 vel left #mojo
18:57 zipkid ... how do i log to that development.log
18:58 yko $c->log->debug("Debug message")
18:58 yko aargh. $c->app->log->debug
18:59 yko that one is for controller. in startup just $self->log->debug('...')
18:59 zipkid thx
19:00 zipkid $c == $self i suppose ?
19:00 yko zipkid: it's a good practice to use $c for controller and $self for app
19:01 yko otherwise it's confusing in discussions
19:01 zipkid yko: the generator makes $self
19:02 yko tht's a generator problem -_-
19:02 zipkid thx
19:03 yko really, when thhere's too much $self (app, plugin, controller, etc) it's too confusing
19:04 zipkid yko: good tip
19:16 yko finally found
19:17 yko or not...  :\
19:18 zipkid hmm... where are things like req url and such stored?
19:18 moritz is there an easy way to have link_to generate a title attribute?
19:19 yko 1. $c->req->url
19:20 yko 2. <% link_to 'route name' => (title => 'some title', target => '_blank') => begin %>Text<%end%>
19:21 zipkid thx yko ;_)
19:21 yko mortiz: as its described at http://bit.ly/dLrgil
19:21 yko when you need helper's info please reffer to Mojolicious::Plugin::TagHelpers pod
19:21 yko there's much info about each helper
19:27 moritz thanks
19:28 zipkid yko: where is documented the stuff like $c->req->url ?
19:29 zipkid yko: nm
19:29 zipkid found it.
19:29 zipkid sorry
19:29 yko :)
19:31 yko some time must pass before you understand architecture of controller and app. you may want to look  into M9s::Controller pod. There's described attributes and aliases Controller provides
19:32 yko And then you can easy dive through pod.  ithink easy way is to launch default generated application and then just walk through localhost:3000/perldoc
19:32 yko sri++
19:35 sri yko: got a test case yet?
19:36 yko nope
19:36 yko working on it
19:36 yko i'm slowpok, do you remember? :)
19:36 * sri pushes yko
19:37 * yko is pushed to master now.
19:38 snearch joined #mojo
19:47 yko it's veery strange
19:47 yko fg
19:52 yko accessing $& after line 905 Mojo::DOM solves all problems
19:53 yko just "$&;" and all tests passed oO
19:54 yko and all problems with perldoc solved
20:01 moritz and mojo crawling at snail pace
20:02 yko im not purposing it's like a fix
20:15 yko hmm. it's not my day
20:23 sri whats wrong?
20:23 yko can not catch it
20:24 sri can't you just dump the input and use it in the test?
20:25 sri and look at flags with Devel::Peek
20:25 sri oooh
20:25 sri i'd like to see Devel::Peek output
20:26 marty * is taking notes on sri devel techniques
20:27 sri for the return value of $self->pod_to_html
20:29 sri might give me all i need
20:29 yko https://gist.github.com/raw/16d08f9​e3203fa0597c7/dd81d424a6417921a4396​bc720f4d2d6a8e95b12/gistfile1.txt
20:29 marty I had not heard of Devel::Peek before  (hangs head in shame)  :)
20:30 sri yko: did you change it manually?
20:30 yko my $string = $self->pod_to_html(join '', <$file>);
20:30 yko use Devel::Peek; Dump($string);
20:31 sri everything after PV = looks completely borked
20:31 sri thats not valid Dump() output
20:31 sri doesn't match LEN
20:32 yko sri, 'PV" not contains all text
20:32 yko you want it all?
20:32 sri i want everything exactly the way Dump() shows it
20:32 yko -_
20:32 sri with indentation
20:32 sri if possible
20:34 sri everything except for PV looks exactly the same here
20:34 yko https://gist.github.com/raw/16d08f9​e3203fa0597c7/30bcaa03bfd828b4e94ad​bb8e17b39ab9f767742/gistfile1.txt
20:34 sri much better thanks
20:35 sri interesting
20:35 sri LEN is different
20:36 yko it seems that problem lies somewehere deeper than Mojo::DOM
20:36 sri LEN = 22016
20:36 sri here
20:37 yko as i told before, accessing $& in _parse_xml right after match solves all problems
20:37 yko that looks strange
20:38 MojoGuest905 joined #mojo
20:38 MojoGuest905 From: http://www.google.de/search?client=safari&amp;rl​s=en&amp;q=websocket+demo&amp;ie=UTF-8&amp;oe=UT​F-8&amp;redir_esc=&amp;ei=3BsNTcuWFomVOueg1ZIJ (1 hits)
20:39 MojoGuest905 left #mojo
20:40 yko just dump pod_to_html output and parse it with dom not enough to test, but you know it now
20:42 sri oh, what if you replace b() with Mojo::ByteStream->new?
20:43 yko where?
20:43 sri podrenderer
20:43 yko wait.. LEN must match CUR ?
20:44 sri no
20:44 sri CUR = 21522
20:44 sri LEN = 22016
20:44 sri here
20:46 sri the value is absolutely equal though
20:48 yko doesn't helps much. wait, ill check everything
20:51 GitHub104 joined #mojo
20:51 GitHub104 mojo: master Sebastian Riedel * 7897ad3 (1 files in 1 dirs): cleanup - http://bit.ly/i2QvSB
20:51 GitHub104 left #mojo
20:52 GitHub1 joined #mojo
20:52 GitHub1 mojo: master Sebastian Riedel * 28a8377 (1 files in 1 dirs): removed test - http://bit.ly/fnOxYb
20:53 GitHub1 left #mojo
20:53 sri no point failing on linux with an impossible to fix bug :S
20:53 sri i'll consider it a perl bug for now
20:54 yko or a Pod::Simple::HTML
20:59 daviddelikat joined #mojo
21:00 yko fg
21:03 snearch left #mojo
21:04 crab does anyone understand the bug?
21:06 sri then it would be fixed
21:08 sri it's obviously a problem with the interpretation of the data, not the data itself
21:12 yko crab: can you run that test: https://github.com/yko/mojo/commit/f76​14cf7495dda5076eda1c317e3339ecd49cad1
21:12 yko sri: i feels stupid, but removing b() from #48 helps now
21:13 yko and, maybe i have test...
21:14 yko sri: 100% it's not the data: i dumped output and then loaded it from file: all works fine then :\
21:15 weestrom what does $app->session('foo') return if foo isn't set on the client?
21:16 * moritz suspects undef
21:17 * weestrom too but if(app->session('foo')) seems to be true when 'foo' is not set on the client, am I lacking in my understanding of how if should treat an undef?
21:17 moritz what kind of true does it seem to be?
21:17 moritz and are you sure it's not an old cookie that's causing problems?
21:18 weestrom I'm sure, I wasn't ever executing a session before this
21:18 weestrom it seems to be true enough for it to execute if($app->session('foo)){ code here }
21:19 weestrom and getting an exeption that I was trying to prevent of doing a DBIx resultset query with an undef hash
21:20 sri don't do that
21:21 sri app->session != $c->session
21:21 sri app->session('foo') will go horribly wrong
21:21 yko $c->session should be used as hashref afaik
21:22 sri it can be used in many ways
21:22 yko exists $c->session->{foo} is a right check
21:23 sri it returns undef
21:23 sri what yko said works too
21:24 yko sri: actually guides saing to do: my $user = $self->session('user');
21:24 sri yea, $self always refering to $c
21:25 MojoGuest707 joined #mojo
21:25 MojoGuest707 From: http://www.google.nl/search?sourceid=ch​rome&amp;ie=UTF-8&amp;q=websocket+extjs (1 hits)
21:26 yko so $c->session('user') ? but it will override existing session object with string 'user'
21:26 sri ok, i'm going to make a drastic change
21:26 * yko lies
21:26 weestrom ahh, I was misunderstanding the scope of $self :)
21:26 sri app->session will become app->sessions
21:27 weestrom easy fix, not much code written around it yet :)
21:28 yko crab? can you run that test?
21:28 weestrom this is why I have things running and test them
21:30 MojoGuest707 left #mojo
21:31 crab yko: oh, sorry. yes, fails.
21:32 yko crab: removing b() from Plugin/PodRenderer.pm#48 should help (if you still have that "perldoc browser tests")
21:33 weestrom $c->session('foo') DOES work as expected, thx guys
21:33 yko crab: can you try it on your side?
21:37 DaTa left #mojo
21:39 marty hmm. Is everyone able to run the mojo test suite without erros?  I'm failing on 'content is similar' test
21:39 marty s/erros/errors/
21:41 crab yko: er, i confirmed earlier that removing the b() fixes it
21:41 yko oh.... sorry
21:41 yko thanks a lot
21:41 marty Ahh ok.  Did not know if they were related.  sorry
21:42 yko marty: i think it's t/mojolicious/pod_renderer_lite_app.t test - it's removed already
21:43 GitHub20 joined #mojo
21:43 GitHub20 mojo: master Sebastian Riedel * 3f2dc90 (5 files in 5 dirs): deprecated session method in Mojolicious - http://bit.ly/f0jast
21:43 GitHub20 left #mojo
21:44 sri that should help in the future
21:45 MojoGuest999 joined #mojo
21:45 MojoGuest999 From: http://news.ycombinator.com/item?id=1277067 (111 hits)
21:45 GitHub36 joined #mojo
21:45 GitHub36 mojo: master Sebastian Riedel * 59e3ecb (1 files in 1 dirs): cleanup - http://bit.ly/eaLsds
21:45 GitHub36 left #mojo
21:45 MojoGuest999 left #mojo
21:46 sri yko: test passes here
21:46 yko and fails on linux
21:49 marty I just updated.   Still fails on 'content is similar' test
21:51 yko sri: i may purpose quickfix for that. just wrap $xml into doublequotes
21:51 macroz joined #mojo
21:51 yko to make sure to_string called on ByteStream, etc
21:54 GitHub65 joined #mojo
21:54 GitHub65 mojo: master Sebastian Riedel * fa33765 (2 files in 2 dirs): added test and possible workaround - http://bit.ly/dZ94dr
21:54 GitHub65 left #mojo
21:54 sri yko: like that?
21:55 yko \o/
21:55 sri tests pass?
21:56 yko Yep!
21:56 yko thanks a lot
21:56 sri yko++
21:56 sri crab++
21:56 sri marty++
21:57 yko sri++
21:57 sri what a weird bug
21:57 yko agree
21:58 yko a was really confused when found that accessing $& during tokenizing solved the problem
21:58 marty Perfect!!  all test pass!  :)
21:59 marty sri++ yko++  <group hug>
22:00 marty crab++
22:01 * yko misses purl
22:01 yko oh, sri. you have 5.12, ye?
22:01 yko on win 5.12 passed dom.t
22:02 yko i bet all who had similar errors were on 5.10 or so
22:02 sri hmm
22:02 GabrielVieira2 joined #mojo
22:02 sri i tested with 5.12 5.10 and 5.8.9
22:02 yko both passed?
22:02 sri all
22:02 yko argh... really strange
22:05 yko good night everyone
22:07 GabrielVieira left #mojo
22:11 sri yay, unicode snowman will look fine after the next fix too
22:11 marty :)
22:12 marty Good night yko.
22:16 GitHub64 joined #mojo
22:16 GitHub64 mojo: master Sebastian Riedel * 2dfd6d6 (2 files in 2 dirs): fixed another small bug - http://bit.ly/gw491q
22:16 GitHub64 left #mojo
22:17 sri ok, now the unicode snowman in Mojolicious::Guides::Routing should look good
22:17 crab !
22:39 DaTa joined #mojo
22:39 perlrocks Twitter: "An awesome #mojolicious community debug session made the unicode snowman very happy today. :) http://twitpic.com/3h855s/full #perl" --kraih http://twitter.com/kraih/status/16261399072215040
23:07 polvo left #mojo
23:18 und3f is now known as und3f[A]
23:20 und3f[A] is now known as und3f
23:25 und3f is now known as und3f[A]
23:27 und3f[A] is now known as und3f
23:40 vel joined #mojo

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