Camelia, the Perl 6 bug

IRC log for #mojo, 2010-09-19

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

All times shown according to UTC.

Time Nick Message
00:00 marcus_ I AM BACK
00:10 sri OH NOES
00:10 sri HIDE THE BOOZE!
00:14 marcus_ TOO LATE
00:24 kvorg left #mojo
01:31 arpadszasz left #mojo
02:07 awnstudio_l left #mojo
02:08 perlrocks Twitter: "Welcome to the world of modern Perl: 22th Mojolicious:: Lite: If you do really simple web | gihyo.jp ... 技術評論社 http://dlvr.it/5Vt9j" (ja) --RtestR http://twitter.com/RtestR/status/24897951775
02:08 perlrocks Twitter: "RT @ RtestR: Welcome to the world of modern Perl: 22th Mojolicious:: Lite: If you do really simple web | gihyo.jp ... 技術評論社 http://dlvr.it/5Vt9j" (ja) --AE_PerlIsm http://twitter.com/AE_PerlIsm/status/24897952639
02:14 awnstudio_l joined #mojo
02:33 perlrocks Twitter: "Welcome to the world of modern Perl: 22th Mojolicious:: Lite: If you do really simple web | gihyo.jp ... 技術評論社 http://dlvr.it/5VwyK" (ja) --hiraba_reader http://twitter.com/hiraba_​reader/status/24899651382
02:35 janus left #mojo
02:54 janus joined #mojo
03:28 awnstudio_l left #mojo
03:35 awnstudio_l joined #mojo
04:03 tholen42 joined #mojo
04:05 tl left #mojo
04:15 awnstudio_l left #mojo
04:24 awnstudio_l joined #mojo
04:29 [1]awnstudio joined #mojo
04:29 awnstudio_l left #mojo
04:44 [1]awnstudio left #mojo
04:49 perlrocks Twitter: "Mojolicious Japanese translation project documents - livedoor Wiki (wiki) http://dlvr.it/5WCNm" (ja) --RtestR http://twitter.com/RtestR/status/24908723054
04:51 awnstudio_l joined #mojo
06:36 cognominal left #mojo
06:49 cognominal joined #mojo
06:57 goldfish1 is now known as go|dfish
07:13 Drossel joined #mojo
07:15 Kulag left #mojo
07:18 Kulag joined #mojo
07:19 Drossel left #mojo
07:21 perlrocks Twitter: "Mojolicious:: Lite sample "Image BBS" - Yuki Kimoto Perl Informations http://dlvr.it/5WVwV" (ja) --hiraba_reader http://twitter.com/hiraba_​reader/status/24916736939
07:21 perlrocks Twitter: "Mojolicious:: Lite message board sample word - Perl Introduction to Perl Introduction ~ ~ with the sample code http://dlvr.it/5WVwR" (ja) --hiraba_reader http://twitter.com/hiraba_​reader/status/24916737094
07:21 perlrocks Twitter: "RT @ hiraba_reader: Mojolicious:: Lite message board sample word - Perl Introduction to Perl Introduction ~ ~ with the sample code http://dlvr.it/5WVwR" (ja) --AE_PerlIsm http://twitter.com/AE_PerlIsm/status/24916737557
07:21 arpadszasz joined #mojo
07:25 perlrocks Twitter: "RT! Hiraba_reader: Mojolicious:: Lite message board sample word - Perl Introduction to Perl Introduction ~ ~ with the sample code http://dlvr.it/5WVwR" (ja) --perlism http://twitter.com/perlism/status/24916905823
07:55 esskar_ left #mojo
07:55 esskar_ joined #mojo
07:58 und3f[A] is now known as und3f
09:03 Kulag left #mojo
09:04 Kulag joined #mojo
09:29 [1]awnstudio joined #mojo
09:29 awnstudio_l left #mojo
09:39 Htbaa joined #mojo
09:42 Rhaen wow!
09:43 Rhaen sri: thanks for pulling. Looks very nice to me!
09:43 Rhaen sri: it's all about style - and as I learned how to document the Mojolicious way, I'�ll use it the next time accordingly
09:44 Rhaen oh, and I understood that git thing. Thanks :)
09:45 [1]awnstudio left #mojo
09:46 awnstudio_l joined #mojo
09:54 Rhaen in case noone noticed so far, after you inflated an application the inflated files will be preferred to your data section.
09:54 Rhaen hmpf...
10:09 arpadszasz left #mojo
10:28 perlrocks Twitter: "http://bit.ly/dsTHH2 kraih's mojo at master - GitHub click here to add a descriptionclick here to add a homepageMojolicious: Perl Duct T.." (ja) --recenturl http://twitter.com/recenturl/status/24924850190
10:29 arthas joined #mojo
10:32 arthas_ joined #mojo
10:37 arthas left #mojo
10:58 perlrocks Twitter: "[Perl] [Mojolicious:: Lite] [Text:: Xslate] Mojolicious:: Lite with, Text:: XSlate be able to use http://d.hatena.ne.jp/meme​memomo/20100919/1284893899" (ja) --memememomo http://twitter.com/memememomo/status/24926170131
10:58 perlrocks Twitter: "RT @ memememomo: [perl] [Mojolicious:: Lite] [Text:: Xslate] Mojolicious:: Lite で, Text:: XSlate を 使える よう に する http://d.hatena.ne.jp/memememomo/2010091. .." (id) --AE_PerlIsm http://twitter.com/AE_PerlIsm/status/24926170689
11:00 perlrocks Twitter: "RT! Memememomo: [perl] [Mojolicious:: Lite] [Text:: Xslate] Mojolicious:: Lite で, Text:: XSlate を 使える よう に する http://d.hatena.ne.jp/memememomo/20100919. .." (id) --perlism http://twitter.com/perlism/status/24926249128
11:02 marcus_ Rhaen: not seeing how it could be any other way...
11:03 marcus_ preferring DATA over files would not be very intuitive.
11:34 arpadszasz joined #mojo
11:44 arpadszasz left #mojo
12:00 Kulag left #mojo
12:02 Kulag joined #mojo
12:03 awnstudio_l left #mojo
12:08 Kulag left #mojo
12:19 dotan joined #mojo
12:27 Kulag joined #mojo
12:43 Kulag left #mojo
12:44 Kulag joined #mojo
12:44 perlrocks Twitter: "Mojolicious:: Lite with, Text:: XSlate be able to use - Memememomo http://htn.to/64LLG4" (ja) --__gfx__ http://twitter.com/__gfx__/status/24931655103
13:11 kvorg joined #mojo
13:23 su-bzero_ joined #mojo
13:27 su-bzero left #mojo
13:28 marcus_ I guess the japanese have discovered mojo...
13:37 Rhaen marcus_: sorry, just came back now
13:37 Rhaen marcus_: That's totally ok that the file templates overwrite the __DATA__ section
13:37 Rhaen I just didn't realize that I already inflated the file :)
13:38 Rhaen as I came back to my computer, the editor was still open, I changed the __DATA__ section and nothing happend :)
13:41 marcus_ mm :)
13:53 perlrocks Twitter: "Mojolicious:: Lite with, Text:: XSlate be able to use http://htn.to/4ZaHn8" (ja) --murakoma http://twitter.com/murakoma/status/24936125820
13:57 perlrocks Twitter: "perl Mojolicious:: Lite with, Text:: XSlate be able to use http://htn.to/4ZaHn8" (ja) --murakoma http://twitter.com/murakoma/status/24936432724
13:57 perlrocks Twitter: "RT @ murakoma: perl Mojolicious:: Lite で, Text:: XSlate を 使える よう に する http://htn.to/4ZaHn8" (id) --AE_PerlIsm http://twitter.com/AE_PerlIsm/status/24936433240
14:00 perlrocks Twitter: "RT! Murakoma: perl Mojolicious:: Lite で, Text:: XSlate を 使える よう に する http://htn.to/4ZaHn8" (id) --perlism http://twitter.com/perlism/status/24936630691
14:33 dotan left #mojo
14:41 jawnsy left #mojo
14:41 Rhaen if the japanese discovered Mojolicious we will be flooded with tweets soon!
14:49 jawnsy joined #mojo
15:12 arpadszasz joined #mojo
15:30 esskar_ sri, if i have file to a template, how can i render it to a string with all the stuff from the stash accessible from the template?
15:31 und3f esskar, $self->render_partial
15:38 esskar_ und3f: even if i only have the filename? or what do i put as the first parameter?
15:39 und3f esskar_, rednder_partial uses same arguments as render
15:40 und3f esskar_,  you can do $self->render_partial(template => 'test');
15:40 esskar_ ok
15:40 esskar_ i see
15:40 esskar_ thankls
16:01 janus hi from amsterdam
16:04 arpadszasz there seems to be a bug in the latest github version
16:06 arpadszasz i get no logging messages in the daemon log, apart from the timestamp + class names
16:08 arpadszasz can somebody confirm this? http://pastie.org/1168380
16:11 janus arpadszasz: same here
16:15 arpadszasz seems like commit f37966f broke it
16:16 arpadszasz i reverted the change made in f37966f to Mojo/Log.pm and now i get the messages
16:17 Rhaen git drives me nuts. Is it acceptable to trash a forked repo from github and fork again?
16:22 spleenjack joined #mojo
16:30 und3f arpadszasz, yes, broke, i made pull request to sri
16:30 und3f with fixup
16:31 und3f arpadszasz, http://github.com/kraih/mojo/pull/22
16:31 arpadszasz und3f: thanks!
16:32 und3f sri, Mojo::IOLoop load cpu 100% during idle ssl connection
16:32 und3f i tested it on perl -MMojo::IOLoop -e 'my $l = Mojo::IOLoop->new;my $s = $l->listen(port => 3000, tls => 1); $l->start'
16:32 und3f sri, also tested on Mojolicious::Lite
16:32 arpadszasz und3f: works again :)
16:33 und3f arpadszasz, of course. sri just modified my previous path and made it unworkable
16:34 arpadszasz so nice to have logs again
18:17 esskar_ sri, dom failure: http://perlpunks.de/paste/show/4c965399.164b.2ef
18:20 arpadszasz is there another way other than $self->defaults->{dbh} to store something like a DB handle from a Mojolicious class?
18:21 arpadszasz $self->defaults is marked as experimental in the documentation
18:23 esskar_ arpadszasz: write a helper for it,
18:24 arpadszasz esskar: i thought that would be the other option
18:24 tempire esskar_: id attribute values cannot start with a number
18:24 tempire http://www.w3.org/TR/html401/types.html#type-name
18:24 esskar_ tempire: but text can ;)
18:24 arpadszasz although i like $self->defaults, gonna use it for now :P
18:25 esskar_ tempire: change the id="0" to id="foo" and it still fails
18:25 esskar_ because the 0 is interpreted as nothing
18:27 tempire right, because it's not a valid value.
18:27 esskar_ ???
18:27 tempire so it doesn't register as a valid id
18:28 esskar_ nope
18:28 esskar_ thats not the point
18:28 tempire Change it to id="foo">foo< and it will work
18:28 esskar_ id="0" is not the problem
18:28 esskar_ $dom->parse('<div><div id="a">A</div><div id="b">B</div></div><div id="x">0</div>'); print $dom;
18:28 esskar_ results in<div><div id="a">A</div><div id="b">B</div></div><div id="x" />
18:28 esskar_ ;)
18:29 tempire ah
18:29 tempire I see
18:30 esskar_ yep
18:30 esskar_ it wipes ou all the text
18:30 esskar_ but 0 is not empty ;)
18:41 arthas_ left #mojo
18:45 sri und3f: umm, *you* broke it, not me
18:46 und3f sri, my path were right
18:46 und3f sri, you wrote in your manner
18:46 und3f sri, you totally rewrite it
18:47 und3f sri, you even changed decode to encode
18:50 und3f sri, here original patch http://github.com/und3f/mojo/commit/b8​7c1edd314d9b349525afafa3eda7ce509efa93 and you patch http://github.com/kraih/mojo/commit/f3​7966f90689a6707420d3eb61577b84ef22d6bf
18:51 GitHub20 joined #mojo
18:51 GitHub20 mojo: master Sebastian Riedel * 9edf4e8 (1 files in 1 dirs): fixed typo - http://bit.ly/biNknn
18:51 GitHub20 left #mojo
18:53 tempire sri: esskar's text problem in Mojo::DOM only needs a "if (defined $text) {" on line 638
18:53 tempire I'll submit a test & path
18:53 tempire s/path/patch/
18:54 sri tempire: already fixed too :)
18:54 sri tempire: sorry
18:54 tempire np
18:55 sri und3f: the problem is that i accepted a patch without test :/
18:56 und3f sri, actually you didn't accepted patch
18:56 sri i did and modified it with a typo
18:56 und3f yes
18:57 und3f there is no tests for MOjo::Log
18:57 sri exactly
18:57 sri i should have refused everything until there was a test
18:57 und3f Refuse Mojo::Log :P
19:00 und3f sri, please take a look at this http://pastebin.ca/1944391
19:00 und3f i told today about this problem
19:01 sri und3f: no idea, all i know is that https works via browser
19:02 und3f sri, i found this problem during testing my app that uses pure tcp
19:02 und3f sri, with ssl support
19:02 sri could be IO::Socket::SSL
19:03 und3f not mojo::ioloop?
19:03 sri i don't know
19:03 esskar_ fucking markdown replaces <hr /> to <hr>
19:03 sri but it's unlikely
19:03 sri mojo::ioloop only reacts to readable events from poll/epoll/kqueue
19:05 und3f sri, also there is vulnerability:
19:06 und3f sri, http://pastebin.ca/1944400
19:07 und3f sri, server make 100% cpu loading after client disconnect
19:07 sri feel free to fix
19:09 sri the non blocking IO::Socket::SSL api is almost undocumented though, it will be very hard
19:11 sri boring, i found the bug :(
19:12 sri cpu usage down to 0% after removing two unneccessary lines
19:13 sri never goes over 0,1%
19:14 und3f sri, i am writing application that should keep ssl connections to others servers, everything on mojo
19:14 und3f something like jsonrpc tcp version
19:20 GitHub176 joined #mojo
19:20 GitHub176 mojo: master Sebastian Riedel * adf7e0d (4 files in 3 dirs): fixed two small bugs - http://bit.ly/aHEX0K
19:20 GitHub176 left #mojo
19:21 sri und3f: that will fix it
19:21 sri esskar: same
19:21 und3f sri, thanks, i'll test
19:22 forwardever joined #mojo
19:23 und3f sri, wrong tls handshake still cause 100% cpu load
19:23 sri not for me
19:23 sri tested it too
19:23 und3f sri, but it case of right handshake everything is ok
19:27 sri it is IO::Poll
19:35 sri about this one i'm not sure
19:35 sri it's no problem with kqueue
19:41 Rhaen_ joined #mojo
19:46 Rhaen left #mojo
19:46 Rhaen_ is now known as Rhaen
19:50 GabrielVieira left #mojo
20:12 GabrielVieira joined #mojo
20:13 sri und3f: seems to be an IO::Socket::SSL bug
20:13 sri if it encounters a real bug in "accept_SSL" the socket loses its file descriptor
20:14 und3f :(
20:15 sri which doesn't really make much sense
20:15 sri it in turn borks IO::Poll which depends on it
20:16 sri monkey patching is not an option, since IO::Poll uses fileno()
20:16 sri which returns nothing, so file descriptors leak i think
20:17 sri and poll can't block anymore
20:18 sri und3f: so, you'll have to report the broken fileno() behavior to the IO::Socket::SSL maintainer
20:18 und3f me? I don't know the details
20:18 sri well, i don't get involved anymore
20:19 und3f sri, could you please write tests? :)
20:19 sri it's simply fileno() not working anymore if $socket->accept_SSL fails
20:19 und3f oke :P
20:19 und3f Just kidding
20:23 arpadszasz helpers are nice, thanks esskar++
20:23 und3f sri, ok, i sent message to maintainer
20:23 und3f sri, thanks for help
20:23 sri i might have found a workaround
20:24 sri $socket->fileno seems to still work
20:24 sri lets see
20:24 sri damn
20:24 sri that only works for us, not IO::Poll
20:25 sri but it shows the brokenness
20:25 sri fileno $socket should always work when $socket->fileno work
20:25 sri *+s
20:29 sri wonder if this bug is fixable
20:34 perlrocks Twitter: "Looks like we've found a serious bug in IO::Socket::SSL that breaks IO::Poll, i suggest not using https in #mojolicious for now. #perl" --kraih http://twitter.com/kraih/status/24964799641
20:34 perlrocks Twitter: "RT @kraih: Looks like we've found a serious bug in IO::Socket::SSL that breaks IO::Poll, i suggest not using https in #mojolicious for n ..." --esskar http://twitter.com/esskar/status/24964838588
20:38 perlite left #mojo
20:38 perlite joined #mojo
20:40 perlrocks Twitter: "The bug is a big security risk since failed ssl handshakes result in a file descriptor leak which can crash your server. #perl #mojolicious" --kraih http://twitter.com/kraih/status/24965200213
20:46 sri und3f: https://rt.cpan.org/Public/Dist/​Display.html?Name=IO-Socket-SSL # don't see the report here
20:46 und3f sri, i send it to mainteiner' email
20:49 sri ah i see
21:00 Htbaa left #mojo
21:24 forwardever I have a question regarding routes
21:25 forwardever $r->route('/:controller/:actio​n/:id')->to('example#welcome', id => 1);
21:28 forwardever now /example/welcome/3 -> Welcome to the Mojolicious Web Framework!
21:28 sri whats the question?
21:29 forwardever will ask in a couple of seconds, just want to be sure by testing it again in my local server
21:30 sri und3f: i've opened a ticket too, the bug is too serious
21:30 forwardever then /example/welcome/ or /example/welcome -> Welcome to the Mojolicious Web Framework!
21:31 forwardever in this case, id is set to 1 as kind of a default
21:31 sri true
21:31 und3f sri, that nice, because i think that i missed technical details in my email
21:33 forwardever the question now: if I request /totally/different/path, I would expect :controller and :action to be overwritten by the to command
21:33 forwardever I mean "to"-command
21:33 sri overwritten?
21:34 sri ->to is just a set of default values
21:34 sri the route will try to fill them with new values if it can
21:34 sri the route needs to match for that though
21:35 sri you can leave out :controller and :action placeholders if you want them to always use the ->to values
21:36 sri like /:something/:else/:id ;)
21:37 spleenjack left #mojo
21:39 forwardever okay, my expectation was that action and contoller in "to" are always used if :controller and :action are used in route(), but "redefined" in "to"
21:40 sri ok, i thought the routing guide made that pretty clear
21:41 sri did you read it?
21:41 forwardever I have to read that again, just started to look at mojolicious again after a couple of months
21:41 sri ah
21:43 forwardever started with "generate app" and first looked at the example in "myapp.pm"
21:44 sri Rhaen: thanks for the patch btw. more would be very much appreciated :)
21:44 forwardever so whats the use of to('example#welcome') in this example if it is completely ignored
21:45 sri it's not ignored, it's the default
21:45 sri GET / for example uses it
21:45 sri GET /example would still use the action and id defaults
21:45 sri and so on
21:46 sri the :controller and :action placeholders are a simple way to generate a lot of dynamic routes at once
21:47 sri once simple route for multiple controllers
21:47 sri something to start with before moving on to more specific routes
21:48 sri think of it as a fallback default route
21:48 sri ->route('/lalala')->to('foo#bar') would always use the same controller and action
21:48 forwardever okay, now I got it, so it should come first, ahead of more specific routes, right ?
21:49 sri last
21:49 sri as a fallback
21:49 und3f is now known as und3f[A]
21:49 sri most specific first
21:49 forwardever yea, okay, that's what I meant :)
21:49 sri :)
21:50 sri that way when you add a new controller Bar with an action baz it will always be available as /bar/baz right away, even if you move on to a more specific route later on
21:51 sri thanks to url_for you won't have to change code
21:51 sri just routes
22:00 forwardever I have another question regarding deployment
22:01 forwardever if I get things right, static files can also be delivered via mojolicious
22:01 sri yes, put it in the public directory and it just works
22:02 forwardever how does that compare to delivering static files directly via apache, is there a huge performance hit
22:02 sri yes there is
22:02 sri but normally you would have nginx or so in front anyway
22:03 sri so static files are served once and then cached
22:04 sri you can of course also just configure the reverse proxy to serve directly from the public directory
22:04 sri everything is possible :)
22:05 arpadszasz left #mojo
22:10 forwardever or just use a ScriptAlias as in your cookbook example for my mojolicious app and let Apache do everything else (static files) ?
22:11 sri sure
22:11 sri you can also add a prefix for static files to make that easier
22:11 sri like /static/ in catalyst
22:18 forwardever still not sure if I got everything right, if I set DocumentRoot /home/sri/myapp/public as in your Cookbook example, files would be delivered directly by Apache as normal, so static files would only be delivered via mojolicious when using the mojo dispatcher to deliver these files ? (sorry, but it's not easy for me to understand this server stuff)
22:23 sri i'm not an apache expert
22:24 sri if a request reaches mojolicious it will be handled
22:25 sri dunno how apache will handle DocumentRoot and stuff
22:25 janus i think in order to get it work that way it would need to be via mod_perl and mojo would decline the request so apache handles it
22:25 janus but that's a completely different story i guess
22:27 janus also, the nginx comparison confuses the apache example unless you enable caching? :)
22:28 awnstudio left #mojo
22:28 janus unless i miss something DocumentRoot is ignored if you ScriptAlias /
22:29 janus at least i had a few fights in that regard :)
22:29 janus hence the mod_perl/decline comment
22:30 janus anyways, need to grab some of those sleeps
22:35 forwardever as far as I understand your Apache/CGI examples, files in /home/sri/myapp/public (DocumentRoot) would be delivered via Apache (e.g. www.example.com/index.html) -> no performance hit, while www.example.com/myapp/index.html would be dispatched and delivered by Mojolicious -> performance hit, does that make sense ?
22:37 sri sounds like it makes sense
22:40 forwardever okay :) so will continue to provide images and things like that via apache
22:45 tempire Apache configuration makes me tired.
22:47 * tempire wants hypnotoad to alleviate any necessity for configuring an external web server.
22:49 forwardever one last question for today: I also played around with Plack in recent days, as far as I understand, Mojo::Server::PSGI is not a PSGI server (just a tool to make mojo apps work with PSGI servers), is that right? (so I cannot use Mojo::Server::PSGI as a server for other PSGI apps
23:07 sri right
23:07 sri it is the glue
23:10 forwardever okay, just was confused a bit by the naming of this class, thanks a lot for the insight, will watch the Hypno-Toad now :)
23:28 forwardever left #mojo

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