Camelia, the Perl 6 bug

IRC log for #mojo, 2011-05-25

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

All times shown according to UTC.

Time Nick Message
00:09 DaTa left #mojo
00:18 perlrocks Twitter: "Mojolicious CVE-2010-4802 'Commands.pm' Unspecified Vulnerability - http://t.co/MvdloSq" --unixfreaxjp http://twitter.com/unixfreax​jp/status/73181074116722688
00:40 DaTa joined #mojo
01:15 Alias joined #mojo
01:27 xantus joined #mojo
01:27 * xantus waves
01:32 xantus I suggest that @_ in redirect_to for relative and abs params be passed as url params
01:32 xantus so you can do $self->redirect_to( '/foo', bar => 'baz' );   => /foo?bar=baz
01:37 * sri waves
01:37 sri xantus: not possible
01:37 purl rumour has it not possible is it
01:41 sri or maybe possible
01:42 sri but confusing
01:42 purl i heard confusing was my know-it-all attitude or the french mac keyboard layout
01:42 * sri slaps purl
01:42 purl o/` Hit me baby, one more time o/`
01:46 perlrocks Twitter: "Mojolicious-Plugin-Toto 0.02 by BDUGGAN - http://frepan.org/~bduggan/M​ojolicious-Plugin-Toto-0.02/" --cpan_new http://twitter.com/cpan_ne​w/status/73203250882560001
02:18 xantus sri: ok, np
02:18 xantus a Mojo::URL should work
02:19 sri $self->redirect_to($self->url_for(...)->query(foo => 'bar'));
02:21 xantus hm, I hope query returns url and not query, or that won't work
02:22 sri it does
02:22 sri (with arguments)
02:22 xantus ahhhh
02:22 xantus makes sense
02:22 purl rumour has it makes sense is http://xrl.us/bjq3kq
02:23 sri you can of course also make your own little helper
02:23 sri ->my_redirect(...)
03:10 sri DAMN
03:10 sri how can they end the event like that!!!
03:45 alnewkirk left #mojo
04:29 sri tempire: if you're working on an external queue patch make sure to check for performance loss too
04:30 sri adding and removing keep alive connections from kqueue/poll can't be cheap
04:30 perlrocks Twitter: "trying out mojolicious" (ja) --akimichi http://twitter.com/akimich​i/status/73244638642831360
04:33 tempire I don't even completely understand the problem at the moment.  If I get there, it will be a while.
04:33 tempire My functional studies are more prominent at the moment.
04:33 sri no problem, i'm not even sure if it's a good idea
04:34 sri the only real use would be for making keep alive work with Coro
04:35 sri (without a user agent pool)
04:35 sri the big problem is that if we keep a pool of useragents around each one will have a keep alive queue
04:36 sri no connection can be shared between user agents
04:36 sri so we might end up with *a lot* of open file descriptors
04:40 sri decision would be much easier if coroutines were a perl core feature
04:57 tabbi joined #mojo
04:57 tabbi left #mojo
05:10 perlrocks Twitter: "Tadashi Arata [SIDfm ID12682] Mojolicious the CGI environment to handle multiple issues, such as DoS attacks http://dlvr.it/SvGN4" (ja) --pikipiki_net http://twitter.com/pikipiki_​net/status/73254498902085632
05:22 ysyrota joined #mojo
05:23 Alias left #mojo
05:32 sri wonder if we should allow /foo/*bar in addition to /foo/(*bar)
05:33 sri /foo/(.bar) as the only one that requires quoting could seem a bit inconsistent though
05:44 koban` joined #mojo
05:50 abra left #mojo
05:59 josh joined #mojo
06:02 abra joined #mojo
06:07 fhelmber_ joined #mojo
06:12 D4RK-PH0ENiX left #mojo
06:20 AmeliePoulain joined #mojo
06:32 zakame joined #mojo
06:41 espent_ left #mojo
06:41 zakame left #mojo
06:41 stephen1 joined #mojo
06:41 espent joined #mojo
06:41 memowe left #mojo
06:41 marty left #mojo
06:41 toebu left #mojo
06:41 perlite_ joined #mojo
06:42 marty joined #mojo
06:42 toebu joined #mojo
06:42 josh left #mojo
06:42 su-bzero joined #mojo
06:42 su-bzero_ left #mojo
06:43 daviddelikat1 joined #mojo
06:43 perlite left #mojo
06:43 stephen left #mojo
06:44 perlite_ is now known as perlite
06:44 daviddelikat left #mojo
06:44 memowe joined #mojo
06:46 cosmincx joined #mojo
06:59 d4rkie joined #mojo
07:07 tabbi joined #mojo
07:09 tabbi left #mojo
07:09 arthas joined #mojo
07:14 koban` left #mojo
07:29 perlrocks Twitter: "Debian Linux Security Advisory 2239-1 - Several vulnerabilities have been discovered Mojolicious, a Perl Web App... http://bit.ly/kj1S5n" --Exploit_This http://twitter.com/Exploit_T​his/status/73289665364508672
08:03 Sugar joined #mojo
08:29 fhelmbe__ joined #mojo
08:32 fhelmber_ left #mojo
08:33 tabbi1 joined #mojo
08:33 tabbi1 left #mojo
08:41 zakame joined #mojo
08:51 ComLock joined #mojo
08:57 ComLock left #mojo
09:00 Foxcool joined #mojo
09:12 koban` joined #mojo
09:18 ajgb joined #mojo
09:32 Akron joined #mojo
09:33 spleenjack joined #mojo
09:52 sh4 joined #mojo
09:57 holgr joined #mojo
10:14 sh9 joined #mojo
10:14 sh4 left #mojo
10:22 j3nnn1 left #mojo
10:29 snearch joined #mojo
10:32 j3nnn1 joined #mojo
10:55 koban` left #mojo
10:55 koban` joined #mojo
11:12 snearch left #mojo
11:41 fmerges joined #mojo
11:51 cosmincx left #mojo
12:06 crab Program terminated with signal 11, Segmentation fault.
12:06 crab #0  0x00002b5945121142 in Perl_csighandler () from /usr/lib/libperl.so.5.10
12:06 crab anyone encountered that sort of problem with a long-running hypnotoad server?
12:12 j3nnn1 left #mojo
12:17 crab i know i could upgrade to 5.12.3 in production without any trouble, but would it give me any noticeable performance increase?
12:20 moemoe joined #mojo
12:21 moemoe hi, i'm just having to adress a method in a subclass as target, neither ->to(obj_sub#view) nor ->to(obj::sub#view) seems to work, what should be the correct way?
12:21 crab eh, i don't actually care. my performance is fine as it is. i just want to get rid of the segfaults.
12:22 crab moemoe: obj-sub#view becomes obj::sub->view, if that's what you want
12:23 moemoe crab: suddenly it works, great, thanks :)
12:29 cosmincx joined #mojo
12:38 moemoe Is there an easy way to create a generic route like "object/$type/action/:id"->"object-$type#action"
12:41 dekimsey joined #mojo
12:54 metaperl marty - do you use Mongoose to work with MongoDB in Perl?
13:02 sh9 left #mojo
13:04 sh4 joined #mojo
13:13 sh4 left #mojo
13:13 sh4 joined #mojo
13:22 amoore joined #mojo
13:25 koban` moemoe: $r->route("/object/${_}/action/​:id")->to("object-${_}#action") foreach qw(1 2 3); ?
13:26 moemoe koban`: This is the solution I have right now
13:26 moemoe I thought it would be great to test if the adressed class exists and just fail if it doesn't exist, but without me having to update the loop every time I create e new one
13:28 marty metaperl:  No, I do not use Mongoose, just mongoDB.  I'm waiting to see what sri comes up with before I start using mongoose.
13:28 marty oops forgot.   good morning gang!
13:29 koban` moemoe: so you want something like dynamic route generation?
13:29 moemoe koban`: Yes
13:33 koban` moemoe: maybe $r->route(/object/:type/actio​n/:id)->to('object#action'); and check type in action?
13:43 metaperl left #mojo
13:45 fmerges left #mojo
13:54 zakame left #mojo
13:57 fmerges joined #mojo
14:07 koban` left #mojo
14:09 metaperl joined #mojo
14:22 sri moemoe: maybe a shortcut? http://mojolicio.us/perldoc?Mojo​licious/Guides/Routing#Shortcuts
14:22 AmeliePoulain left #mojo
14:23 sri crab: segfault is of course something that just shouldn't happen
14:24 sri but i would suggest using a maintained perl for production setups
14:24 sri not 5.10
14:26 perlrocks Twitter: "Nice timely response by debian - apt+Mojolicious users please take note of http://www.debian.org/security/2011/dsa-2239 #perl" --shadowcat_mst http://twitter.com/shadowcat_​mst/status/73394414566916097
14:28 stephan48 i thought mst is one of the pro-catalyst-anti-mojo guys?
14:28 perlrocks Twitter: "We recommend that you update your mojolicious installs http://is.gd/RkISGn #perl #Debian" --dozykraut http://twitter.com/dozykrau​t/status/73395137027391488
14:29 marcus stephan48: Why can't we all just get a bong?
14:29 marcus I mean along
14:30 marty marcus; LOL, Freudin Slip dude!
14:30 stephan48 idk
14:30 marcus marty: well, I *am* going to amsterdam in a week :p
14:31 marcus so it's possible
14:31 stephan48 marcus: we are human... that prevents it that we all can be friends without people making problems...
14:46 sri puny humans
14:53 Sugar https://github.com/kraih/mojo/wi​ki/Hypnotoad-prefork-web-server
14:53 Sugar why does this page say that hypnotad is experimental?
14:53 stephan48 isnt it experimental?
14:54 Sugar http://search.cpan.org/~kraih/Mojolici​ous-1.34/lib/Mojo/Server/Hypnotoad.pm
14:54 Sugar here is quite
14:54 Sugar about experimental
14:54 sri it is no longer experimental
14:54 Sugar ok, thx
14:55 sri just update the wiki if it has wrong information
14:55 sri that's why it is a wiki ;)
14:55 Sugar i has updated it
14:55 sri Sugar++
14:56 kaare joined #mojo
15:02 d4rkie left #mojo
15:16 holgr left #mojo
15:16 holgr joined #mojo
15:24 bgsmith joined #mojo
15:24 ysyrota left #mojo
15:25 perlrocks Twitter: "#cpanm made it EASY to install Moose,DBIx::Class,Mojo,DBD::mysql on shared hosting (centos w/ perl-5.8.8) through a webshell (no SSH acces)!" --arpadszasz http://twitter.com/arpadsza​sz/status/73409304081866753
15:25 sri eeeeep
15:25 sri 5.8
15:25 bgsmith greetings channel, newbie question - trying out an example, getting an error message Can't locate object method "say" via package "Mojo::DOM"
15:26 sri that's because Mojo::DOM doesn't have a say method :)
15:26 bgsmith right, it was in ByteStream.pm
15:28 bgsmith but the synopsis in http://search.cpan.org/~kraih/Mojol​icious-1.33/lib/Mojo/DOM.pm#___top uses the say method with only a "use Mojo::DOM;"
15:28 bgsmith ok ... i'll paste my code to a pastebin
15:28 sri say is a perl builtin
15:29 sri available in newer perls
15:29 sri perldoc -f say
15:30 bgsmith http://pastebin.com/nKnnEwZa
15:30 sri yes, you need to "use 5.12;"
15:30 bgsmith hmmmmmm i'm still on jaunty jackalope ... 5.10.1
15:30 bgsmith let me check
15:30 bgsmith aaargh
15:30 bgsmith ok
15:31 sri or whatever it was in 5.10 to enable say :)
15:31 cosmincx left #mojo
15:31 sri 5.10 is unmaintained though, i would highly recommend a newer perl
15:32 bgsmith ok :)
15:33 bgsmith hmmm perldoc -f gives " This keyword is only available when the "say" feature is enabled: see feature."
15:34 sri then that's what you need
15:34 sri or just use print
15:34 stephan48 "use 5.10.0;" @ bgsmith
15:36 bgsmith okay thanks print will do for the moment. but what does the 'see feature.' refer to in the 5.10.1 documentation if say wasn't there.
15:36 bgsmith stephan48: thanks! that did the trick :)
15:37 bgsmith ok I guess I do not understand much about enabling and disabling -features- in perl. will google.
15:38 GitHub165 joined #mojo
15:38 GitHub165 mojo: master Sebastian Riedel * 61eae5c (1 files in 1 dirs): do not use 5.10+ features in documentation - http://bit.ly/kbmx1O
15:38 GitHub165 left #mojo
15:38 sri ok, removed from documentation
15:39 tabbi joined #mojo
15:40 bgsmith tnx sri and stephan48
15:41 sri this is exactly why enabling new features sucks
15:42 sri they should just be there even if it breaks stuff
15:42 d4rkie joined #mojo
15:43 sri otherwise there is not enough incentive for people to actually learn modern perl
15:47 tabbi left #mojo
15:50 sri damn, i need a new scifi series to watch :(
16:07 perlrocks Twitter: "@ Takumn and give end users a shareware, I very much because you look a lot like keeping the server. Perl framework and jquery but not Mojolicious 作Ri直Shitai do not feel like studying for. But now preeminent sense." (ja) --atoge http://twitter.com/atoge/status/73419970721230848
16:08 kaare left #mojo
16:09 marty OMG!  I think plinkett is my new hero!  http://redlettermedia.com/plinkett/star-wa​rs/star-wars-episode-1-the-phantom-menace/
16:09 kaare joined #mojo
16:18 Sugar left #mojo
16:29 perlrocks Twitter: "@ Atoge Mojolicious like I've never heard. Why do not you wonder if all the tea rather longer written in js." (ja) --takumn http://twitter.com/takumn/status/73425388386271232
16:31 ajgb left #mojo
16:35 crab sri: does using 5.12.3 sound sensible?
16:35 sri it does
16:35 crab i can upgrade to that right away, since i've tested it extensively in development. but i haven't tested 5.14.0 at all, so...
16:35 crab ah, fine.
16:36 sri yea, i would wait for 5.14.1
16:36 kaare left #mojo
16:37 sri the 10% performance increase can be worth risking it with 5.14.0 though
16:37 fmerges left #mojo
16:42 perlrocks Twitter: "@ Takumn Catalyst 作Rashi going for him who made the successor, Mojolicious. Js be like that all the server side or javascript. It is a little interesting." (ja) --atoge http://twitter.com/atoge/status/73428625600417792
16:42 crab sri: nah. it's already so fast that i didn't even bother to turn on the memcached support i worked so hard on.
16:50 * crab watches 5.12.3 cpanm install mojolicious and other dependencies
16:52 sri btw. i have a hypnotoad running on 5.10.1 for 200 days now
16:52 sri segfault is mostly caused by xs modules
16:52 sri maybe one of your dependencies has a problem
16:55 arthas left #mojo
17:04 bgsmith left #mojo
17:04 crab maybe.
17:10 sri reminds me that we still could use a few hacks to increase copy on write effectiveness for hypnotoad
17:10 crab whee. upgrade completed. no problems at all, as far as i can see.
17:11 barries joined #mojo
17:11 sri i've been thinking about triggering a request in the manager process before forking
17:12 barries is there any interest in a "static_image" helper that's like the image helper, but adds width & height attributes to the image?
17:14 barries (pasted here: http://pastebin.com/j0sGCJXA )
17:17 Akron barries: good example for shortcuts! In fact, I did something like that ... but did not complete it.
17:17 marty It looks useful to me. In fact, I think I'll use it.  Thank you. :)
17:17 bgsmith joined #mojo
17:17 sri barries: release it as a plugin :)
17:18 barries Here's a more worky version. http://pastebin.com/FNeDReWs
17:18 barries Is there a useful way to re-use ::TagHelpers::_tag()? It's pretty clearly private, but I don't want to have to copy it.
17:19 sri don't ever use private methods
17:19 sri you can use the "tag" helper
17:19 sri $self->tag(...)
17:20 barries oooo, shiny.
17:20 sh4 left #mojo
17:20 crab hi barries.
17:20 sri http://mojolicio.us/perldoc?Moj​olicious/Plugin/TagHelpers#tag
17:21 barries hey crab!
17:21 barries @sri: yup, already have it integrated.
17:21 sri :)
17:22 barries Thanks for the tip... works a charm.
17:23 barries here it is for anyone playing along at home: http://pastebin.com/yTBdtDcv
17:37 bgsmith left #mojo
17:38 GitHub137 joined #mojo
17:38 GitHub137 mojo: master Sebastian Riedel * db9ee2d (2 files in 2 dirs): reduced memory usage of Hypnotoad workers by at least 1MB (each) - http://bit.ly/iU4QFf
17:38 GitHub137 left #mojo
17:39 sri barries: $self->tag(..) is cheaper than $app->tag(...)
17:40 sri $app->$helper is one extra Mojolicious::Controller instantiation
17:42 D4RK-PH0ENiX joined #mojo
17:43 d4rkie left #mojo
17:44 * barries reads &AUTOLOAD source
17:46 sri https://github.com/kraih/mojo/blob/mas​ter/lib/Mojolicious/Controller.pm#L53
17:46 sri that one is the cheapest
17:47 sri the one in Mojolicious.pm is nice for convenience, but costs extra
17:47 barries would getting it from $app->renderer->helpers->{tag} be too tightly coupled? Guess it doesn't, there's a file I/O going on here any way. Might be good to memoize the results.
17:47 barries s/it doesn't/it isn't worth it/
17:48 sri yea, it's not like you would gain anything by not using autoload
17:49 barries only a small gain (relative to the file I/O) because these AUTOLOADs don't compile methods to prevent future AUTOLOADS
17:50 sri that's actually a feature :) autolaod protects helpers from getting exposed to the world as actions ;)
17:51 barries Ah, that explains it... I knew it had to be on purpose, but I don't know Mojo's innards well enough to guess why.
17:52 metaperl left #mojo
17:58 metaperl joined #mojo
18:00 barries Is there a recommended way for a mojo helper like this to cache things (like the results of the call to &imgsize)? I could see the extra file I/O on an image-heavy page as being a significant contribution to the elapsed time for rendering.
18:01 sri just use Memoize?
18:06 fhelmbe__ left #mojo
18:10 sri http://mojolicio.us/perldoc?Mojolic​ious/Plugin/DefaultHelpers#memorize
18:10 sri there is also another helper
18:10 sri it's mostly for caching results inside templates though
18:10 sri like blocks that should only be rendered once
18:13 sri you could even do <%= memorize begin %><%= my_image_helper ... %><% end %>
18:13 sri :)
18:15 barries Not straight memoizing, it would cache the results and invalidate the cache if file size or mod time changes.
18:21 Foxcool left #mojo
18:33 perlrocks Twitter: "I'll miss more stories Mojolicious quee .." (es) --MauricioOs_ http://twitter.com/MauricioO​s_/status/73456711033307136
18:36 stephen1 left #mojo
18:39 Foxcool joined #mojo
18:39 stephen joined #mojo
18:43 yegor joined #mojo
18:46 yegor left #mojo
18:52 barries see y'all later; thanks for the help, sri
18:53 barries left #mojo
19:02 trone_ joined #mojo
19:06 trone left #mojo
20:08 d4rkie joined #mojo
20:08 metaperl left #mojo
20:08 Foxcool left #mojo
20:10 D4RK-PH0ENiX left #mojo
20:12 D4RK-PH0ENiX joined #mojo
20:14 d4rkie left #mojo
20:19 d4rkie joined #mojo
20:23 d4rkie_ joined #mojo
20:24 D4RK-PH0ENiX left #mojo
20:25 d4rkie left #mojo
20:27 Foxcool joined #mojo
20:36 snearch joined #mojo
20:42 dekimsey left #mojo
20:43 amoore left #mojo
20:44 snearch left #mojo
20:52 metaperl joined #mojo
21:04 holgr left #mojo
21:04 holgr joined #mojo
21:40 holgr left #mojo
22:14 Foxcool left #mojo
22:26 j3nnn1 joined #mojo
22:30 Akron left #mojo
23:12 GitHub125 joined #mojo
23:12 GitHub125 mojo: master Sebastian Riedel * 30b57bc (4 files in 3 dirs): added experimental load_app method to Mojo::Server - http://bit.ly/lXT6WR
23:12 GitHub125 left #mojo
23:34 GitHub56 joined #mojo
23:34 GitHub56 mojo: master Sebastian Riedel * e9f046f (1 files in 1 dirs): made application loader a bit smarter - http://bit.ly/kk3D4r
23:34 GitHub56 left #mojo
23:44 AigleNoir left #mojo
23:45 AigleNoir joined #mojo

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