The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2014-07-26

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

All times shown according to UTC.

Time Nick Message
00:02 sujithm joined #mojo
00:34 tempire phillipadsmith: look at the distributed examples
00:34 tempire (core commands)
00:36 phillipadsmith tempire: I was looking for the deploy heroku example … was incorrectly searching for Mojo::Command::
00:53 woz joined #mojo
01:49 klapperl joined #mojo
01:57 woz joined #mojo
02:06 noganex_ joined #mojo
02:32 Adura joined #mojo
03:01 woz joined #mojo
03:24 asarch joined #mojo
03:25 asarch If I do: $r->get('/product/:id/details')->to('product#details'); I can visit: http://127.0.0.1:3000/product/3434/details
03:26 asarch But if I do: $r->get('/language/:name/characteristics')->to('language#characteristics'); I cannot visit: http://127.0.0.1:3000/language/perl/characteristics
03:26 asarch Why/
03:26 asarch ?
03:53 basic6 joined #mojo
04:03 woz joined #mojo
04:43 stephan48 joined #mojo
04:57 KCL_ joined #mojo
04:58 KCL joined #mojo
05:00 Adura joined #mojo
05:07 woz joined #mojo
05:13 Zx3 joined #mojo
06:11 woz joined #mojo
06:17 D4RK-PH0ENiX joined #mojo
06:19 thowe joined #mojo
06:42 sujithm joined #mojo
07:14 woz joined #mojo
07:25 Vandal joined #mojo
08:17 woz joined #mojo
08:34 _eugen joined #mojo
08:42 noganex joined #mojo
08:48 babl joined #mojo
09:04 sri https://github.com/kraih/mojo/pull/655 # big pull request
09:08 mr-foobar joined #mojo
09:11 mire joined #mojo
09:22 sh4 joined #mojo
09:22 berov joined #mojo
09:23 woz joined #mojo
09:26 sujithm joined #mojo
09:37 basiliscos joined #mojo
09:48 batman i like the idea behind the pull request. at least i have wanted to jump to the last step many times...
09:49 batman but i always get around it, though i can't remember how exactly now
09:49 batman but i think the code could be simpler. i haven't tried it out my self, but it looks over complicated
09:49 batman #655 that is ^
09:50 batman i think the way i solve it is by refactoring the steps into method calls which might create another delay
09:51 batman i'm not against having it in the code, but i'm not sure i think it's useful enough to give it a +1
09:58 batman sri: why didn't you like http://pastie.org/9420422 ?
10:00 mire joined #mojo
10:01 sri doesn't feel right
10:02 sri when you combine filter with checks, it's not very pretty
10:02 sri $validation->required('foo')->filter('wrap', 'a', 'b')->like(qr/^a.+b$/)
10:02 sri and i personally rarely have a need for it
10:03 sri making it not good enough to get my vote
10:06 batman ok.
10:06 batman but do you use some sort of filtering in your apps? if so, how do you do it then?
10:07 sri i don't
10:07 batman ok :)
10:09 batman just validation? like(qr{^\w+$}) and if they have whitespace theyneed to fix it themselves?
10:11 batman crap... i need to go and get an ice coffee. it's superduperhot :(
10:12 batman hope my feedback on #655 makes sense. i guess i'm leaning against -1, but i have no strong opinion.
10:15 sri batman: you should comment on github
10:16 batman ok.
10:16 sri say that you're leaning towards :-1:
10:16 * sri likes github emoji :)
10:18 batman :)
10:18 batman :ship: ;)
10:20 * sri is thinking about native SOCKS support again, testing it kinda sucks though
10:20 sri for some reason IO::Socket::SOCKS now installs on os x
10:21 sri batman: that thumbs up is misleading :S
10:22 batman better now?
10:24 sri yea
10:25 d4rkie joined #mojo
10:28 woz joined #mojo
10:44 mattastrophe joined #mojo
10:55 dod joined #mojo
11:33 woz joined #mojo
11:36 D4RK-PH0ENiX joined #mojo
11:46 mr-fooba_ joined #mojo
11:49 batman ????
12:03 D4RK-PH0ENiX joined #mojo
12:05 trone_ joined #mojo
12:10 Zx3 joined #mojo
12:22 sujithm joined #mojo
12:37 woz joined #mojo
12:40 sujithm_ joined #mojo
12:41 sujithm joined #mojo
12:50 denis_boyun joined #mojo
13:12 sujithm joined #mojo
13:38 woz joined #mojo
13:49 sujithm joined #mojo
14:09 sri hmm, i gave a SOCKS patch a try and failed miserably ;p
14:14 sri http://pastie.org/9422641 # this is how far i got
14:14 sri i'm not even sure non-blocking support in IO::Socket::Socks works
14:15 sri looks like it just hangs, even if i force debug output it says nothing
14:18 sri yea, new_from_socket/fd is entirely untested... glorious :(
14:35 batman sri: testing is for sissies ;)
14:37 sri you know, i really want to better support tor... but socks modules on cpan are just not good
14:37 berov How do you actually decide when to switch to a new code name like Snow-Man Tiger Face etc.?
14:38 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Contributing#Rules
14:42 woz joined #mojo
14:43 berov Well, ok then my question should be how do you decide when it is time for a new major version
14:44 berov May be after having a good amount of new features added
14:44 berov ?
14:45 sri when we get close to x.99
14:45 sri it's arbitrary
14:45 berov ah ok, thanks
14:47 berov sri: I fixed most of the bad things you saw in Ado. There may be of course more..
14:48 berov still not sure how to avoid using directly  $stash->{'mojo.active_session'} and $stash->{'mojo.session'}
14:49 denis_boyun joined #mojo
14:49 berov for switching to some arbitrary strage mechanism
14:49 berov not cookie
14:49 berov *storage*
14:50 sri batman: just remembered what annoyed me most about filters... they don't fit well into the validation docs
14:51 sri make everything look more complicated
14:51 sri jberger, batman, tempire, marcus, crab: if you feel like we absolutely need filters please speak up!!!1 http://pastie.org/9420422
14:51 sri but solve the documentation problem
14:52 gatitskiy joined #mojo
15:00 gatitskiy joined #mojo
15:01 gatitski_ joined #mojo
15:02 good_news_everyon joined #mojo
15:02 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/n1D9uw
15:02 good_news_everyon mojo/master a5e62ba Sebastian Riedel: prevent a few random warnings
15:02 good_news_everyon left #mojo
15:03 babl joined #mojo
15:23 mire joined #mojo
15:29 asarch joined #mojo
15:31 berov so may be if there is  an API to set and get mojo.session and mojo.active_session this may allow people more easily to swtich the storage of the session?
15:32 berov Use-case is when I want to use for example database storage for sessions
15:33 berov and not having to replace Mojolicious::Sessions with something else
15:40 asarch If I do: $r->get('/product/:id/details')->to('product#details'); I can visit: http://127.0.0.1:3000/product/343
15:40 asarch 4/details
15:40 asarch ut if I do: $r->get('/language/:name/characteristics')->to('language#characteristics'); I cannot visit: http:/
15:40 asarch /127.0.0.1:3000/language/perl/characteristics
15:41 asarch Ups, the c&p went wrong :-(
15:46 woz joined #mojo
15:50 asarch Or should I do: $r->get('/language/:id/characteristics')->to('language#characteristics"); and then visit: http://127.0.0.1:3000/language/3453/characteristics
15:50 asarch ?
15:55 Ravenhall joined #mojo
16:02 sri asarch: pasting the same question over and over does not make it any better
16:03 asarch I thought you were sleeping :-(
16:04 sri perl -Mojo -E 'get "/language/:name/characteristics" => {text => "you are wrong!"}; app->start' get /language/perl/characteristics
16:04 gatitskiy joined #mojo
16:04 gatitskiy joined #mojo
16:05 sri i see most questions, but i only answer the good ones
16:05 sri as i suspect, most people do
16:06 asarch Oh, I see
16:06 asarch Your script is wrong
16:07 sri that's a bold move cotton
16:08 asarch ?
16:09 sri lets see if it pays off
16:09 sri http://makeameme.org/media/created/Thats-a-bold.jpg
16:09 sri telling me my script is wrong
16:16 babl left #mojo
16:22 asarch So, I cannot do that, right?
16:22 asarch :-(
16:30 * lb is confused
16:30 lb "I can't do X" "X works perfectly fine, as demonstrated in this example" "so I cannot do X"
16:31 sri http://cdn.meme.li/instances/500x/44382534.jpg
16:32 gatitskiy joined #mojo
16:34 asarch I mean, to get an address like: /language/perl/characteristics
16:34 lb 18:04 <@sri> perl -Mojo -E 'get "/language/:name/characteristics" => {text => "you are wrong!"}; app->start' get /language/perl/characteristics
16:34 lb works for me
16:36 lb put together the smallest possible program you can that demonstrates your problem, and paste that into some website
16:36 lb you haven't asked a question that described the problem yet
16:37 shadowpaste "asarch" at 217.168.150.38 pasted "$ perl -Mojo -E 'get "/language/:name/characteristics" => {text => "you are wrong!"}; app->start'" (29 lines) at http://paste.scsys.co.uk/409760
16:37 asarch That's what I get
16:37 asarch Then maybe my version is quite old
16:38 lb you didn't write the whole command
16:39 lb get       Perform HTTP request.
16:39 lb was there a get argument in sri's example?
16:39 asarch Oh, I thought "get /language/perl/characteristics" was plain English
16:39 asarch Yeah, yeah, it worked!
16:39 lb so, put together the smallest possible program you can that demonstrates your problem,
16:45 asarch Gotcha! /language/perl/details work fine but /language/perl-v5.18.1/details doesn't
16:46 asarch Not even if I change "-" for "_"
16:47 woz joined #mojo
16:48 asarch Bingo! The problem are the dots
16:48 asarch /language/perl-v5_18_1/details works fine
16:49 lb the problem is your choice of placeholder
16:49 lb read the placeholder chapters in Mojolicious::Guides::Routing
16:52 asarch I see
16:52 asarch Thank you lb
16:52 asarch Thank you very much guys :-)
16:52 asarch Thank you
16:57 KCL_ joined #mojo
16:57 KCL joined #mojo
16:58 gatitskiy joined #mojo
17:05 gatitskiy joined #mojo
17:23 basiliscos joined #mojo
17:51 woz joined #mojo
18:13 Ravenhall joined #mojo
18:14 inokenty joined #mojo
18:23 babl joined #mojo
18:33 basic6_ joined #mojo
18:38 sri kinda funny nobody noticed how much i broke in 5.18
18:38 basic6 joined #mojo
18:39 thowe Hm.  The anchor link for "GET/POST parameters" doesn't work for me at http://mojolicio.us/perldoc/Mojolicious/Lite
18:42 sri works in chrome
18:42 thowe hm.  I have firefox 24.6 here, apparently....
18:50 sri i actually do have a smarter way to handle anchors there... but it doesn't work with firefix either
18:50 sri think it might be that Pod::Simple is generating anchors firefox doesn't like
18:51 thowe It may be that Firefox needs to be smarter, but I wonder what else is just as dumb...
18:52 Ravenhall joined #mojo
18:54 sri i've tried to be smart in the past and generate custom anchors... but that doesn't work for internal links generated by Pod::Simple... so i now just let Pod::Simple::HTML do all the anchor generating
18:55 woz joined #mojo
18:56 good_news_everyon joined #mojo
18:56 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/0YeDCA
18:56 good_news_everyon mojo/master 3ae054c Sebastian Riedel: improved support for Unicode anchors in Mojolicious::Plugin::PODRenderer
18:56 good_news_everyon left #mojo
18:56 thowe It's not bothering me any, I just thought it kind of funny so I mentioned it.
18:58 sri also affects all anchors here http://mojolicio.us/perldoc/Mojolicious/Guides/FAQ
19:00 thowe Should I just stick error messages that I want to appear on pages in the stash, or is there something special for that?
19:01 thowe Like "User doesn't exist, try again." and the like
19:25 sri IO::Poll is really ridiculously slow
19:25 sri BUT
19:25 sri if i use an internal function it's suddenly faster than select :S
19:25 sri http://pastie.org/9423175
19:25 sri IO::Poll::_poll
19:25 purl IO::Poll::_poll is in XS
19:26 sri it's more than 10 times faster than using the oo api
19:26 sri and it noticeable in benchmarks... mango does hundreds of inserts per second more
19:26 sri *+'s
19:27 sri dunno if it's ok to use the private function in this case
19:35 good_news_everyon joined #mojo
19:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/W5JG9g
19:35 good_news_everyon mojo/master cccc50a Sebastian Riedel: fixed is_readable scalability problems in Mojo::Reactor
19:35 good_news_everyon left #mojo
19:39 thowe If I have a place in my template for a stash value, and it isn't defined, how do I just ignore that?  The following complains that "Global symbol "$error" requires explicit package name":
19:39 thowe <% if (defined $error) { %><div><%= $error %></div><% }; =%>
19:40 batman app->defaults(error => '');
19:40 batman thowe: ^
19:48 sri re scalability problem... i just cargo cultet the idiom from the docs... but totally ignored the actual select() limit
19:48 thowe batman, That works, Thanks.   I'm sure that is needed because of some magc that is employes with making stash things exist as variables(?)
19:49 sri we all know select() is usually limited to 1024 file descriptors, but what some may not know, that limit is on the actual file descriptor number, so it doesn't matter if you only have one socket with the id 1025, it's too high
19:51 sri (i knew that once... but havn't used select in soooo long...)
19:52 sri IO::Poll doesn't appear to have changed since 1997... so depending on that little bit of private api may not be *that* risky
19:57 woz joined #mojo
20:19 lb you'd think
20:19 lb some asshole started maintaining screen after all these years, and he broke the socket-file format
20:19 lb or whatever he did - it broke new screen's ability to connect to old screen sessions
20:21 sri lol!
20:22 sri i'm not the first
20:22 sri http://grep.cpan.me/?q=IO%3A%3APoll%3A%3A_poll
20:22 sri we are in good company
20:25 batman thowe: yes, and the templates "use strict", so the variables need to exist.
20:26 lb thowe: if (stash 'foo') { }
20:30 thowe lb, Thanks.  It obviously still needs to be defined as '', though.
20:31 lb no
20:32 lb if (stash 'foo') { } doesn't complain if foo is not on stash
20:33 lb ($foo still won't work inside the braces of course)
20:34 sri oh that's funny, firefox likes its id values unescaped, and chrome likes them escaped
20:35 * sri still can't get over the anchor problem
20:35 sri i can make it work in firefox *or* chrome -.-
20:36 sri http://pastie.org/9423270 # actually makes complicated anchors work in firefox (kinda)
20:47 sri eeeeeeeep https://metacpan.org/source/DWHEELER/Pod-Simple-3.28/lib/Pod/Simple/HTML.pm#L726
20:51 sri http://3.bp.blogspot.com/-QLJNbbpQOmY/Uf1mZNhgLxI/AAAAAAAAR64/ComxchRRYoM/s1600/i+just+feel+like+poisoning+everybody.jpg
20:52 sri Pod::Simple::HTML needs to be killed with fire
20:59 woz joined #mojo
21:02 good_news_everyon joined #mojo
21:02 good_news_everyon [mojo] kraih tagged v5.19 at a52f156: https://github.com/kraih/mojo/commits/v5.19
21:02 good_news_everyon left #mojo
21:03 good_news_everyon joined #mojo
21:03 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/H1SrzQ
21:03 good_news_everyon mojo/master 66d6615 Sebastian Riedel: bump version
21:03 good_news_everyon left #mojo
21:15 punter joined #mojo
21:33 sri well shit
21:34 sri so nobody told me about Pod::Simple::XHTML, which looks like the same garbage on the surface... but actually has a sensible core :O
21:35 neyasov_ joined #mojo
21:57 geira joined #mojo
22:01 woz joined #mojo
22:17 jb360 joined #mojo
22:21 good_news_everyon joined #mojo
22:21 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/0vlH3g
22:21 good_news_everyon mojo/master 35791c5 Sebastian Riedel: fixed a few bugs in Mojolicious::Plugin::PODRenderer by switching from Pod::Simple::HTML to Pod::Simple::XHTML
22:21 good_news_everyon left #mojo
22:21 sri so much better
22:28 good_news_everyon joined #mojo
22:28 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/T2tYhA
22:28 good_news_everyon mojo/master 3f0b782 Sebastian Riedel: no need to generate id
22:28 good_news_everyon left #mojo
22:33 good_news_everyon joined #mojo
22:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/aCfuxg
22:33 good_news_everyon mojo/master ae38e38 Sebastian Riedel: fixed Perl 5.18.x compatibility
22:33 good_news_everyon left #mojo
22:36 good_news_everyon joined #mojo
22:36 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/QFpMIA
22:36 good_news_everyon mojo/master bc03be9 Sebastian Riedel: test generated ids
22:36 good_news_everyon left #mojo
23:02 woz joined #mojo
23:02 good_news_everyon joined #mojo
23:02 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/7Bn3Pg
23:02 good_news_everyon mojo/master 5fca5d3 Sebastian Riedel: idify can generate unique ids
23:02 good_news_everyon left #mojo
23:05 sri well, shit... idify is not part of perl 5.10.1
23:12 D4RK-PH0ENiX joined #mojo
23:13 zivester joined #mojo
23:14 sri neat... Pod::Simple::XHTML is great, except for the version in 5.10... that one is totally broken
23:14 sri time to leave 5.10 support behind :)
23:30 D4RK-PH0ENiX joined #mojo
23:30 good_news_everyon joined #mojo
23:30 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/SezJpQ
23:30 good_news_everyon mojo/master 0c0311f Sebastian Riedel: Mojolicious::Plugin::PODRenderer no longer supports Perl 5.10.1
23:30 good_news_everyon left #mojo
23:30 sri welcome back to the world of deactivated features :S
23:31 zivester joined #mojo
23:31 sri jamadam will ave fun backporting this -.-
23:31 sri i can already see him go all (╯°□°)╯︵ ┻━┻
23:34 mire joined #mojo
23:34 good_news_everyon joined #mojo
23:34 good_news_everyon [mojo] kraih tagged v5.20 at e186d91: http://git.io/mQGqvw
23:34 good_news_everyon left #mojo
23:36 good_news_everyon joined #mojo
23:36 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/XU40gw
23:36 good_news_everyon mojo/master 2367c69 Sebastian Riedel: bump version
23:36 good_news_everyon left #mojo
23:40 good_news_everyon joined #mojo
23:40 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/5pTVpA
23:40 good_news_everyon mojo/master 4fe26af Sebastian Riedel: ids are already unique
23:40 good_news_everyon left #mojo
23:58 sri drama! https://groups.google.com/forum/#!topic/mojolicious/OEGEN4wAEz4

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