Camelia, the Perl 6 bug

IRC log for #mojo, 2013-01-03

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

All times shown according to UTC.

Time Nick Message
00:01 gryphon joined #mojo
00:10 Averna joined #mojo
00:12 Molaf__ joined #mojo
00:23 jnbek^dt joined #mojo
00:41 cfmweston joined #mojo
00:41 Miked joined #mojo
00:44 cfmweston Inside a  Mojo::IOLoop->delay(), if i have 3 callbacks, are they guaranteed to execute sequentially?
00:46 tempire cfmweston: with ->steps?
00:47 cfmweston Nope, just inside delay().
00:48 cfmweston Something like Mojo::IOLoop->delay(sub{},sub{},sub{})
00:49 tempire It probably calls steps.
00:49 tempire http://mojolicio.us/perldo​c/Mojo/IOLoop/Delay#steps
00:49 tempire which would indicate yes
00:55 cfmweston Ok, I'm doing $ua->get() in the first sub{} and processing the results of the on the next sub{}, then doing some more $ua->get() calls in the next sub{}, but I'm only getting results from the first set of $ua->get() calls and not the second ones. The second set is giving me premature connection close error for the transactions...
00:59 cfmweston Yes
01:00 cfmweston joined #mojo
01:09 cfmweston Any idea why that's happening?
01:09 bpmedley_ joined #mojo
01:16 basic61 joined #mojo
01:25 chenryn joined #mojo
01:28 asarch joined #mojo
01:30 mattastrophe joined #mojo
01:33 keedi joined #mojo
01:40 human39 joined #mojo
01:45 human39 joined #mojo
01:58 human39_ joined #mojo
02:05 xaka joined #mojo
02:08 human39 joined #mojo
02:13 human39 joined #mojo
02:23 cfmweston joined #mojo
02:48 human39 joined #mojo
02:50 yakubori joined #mojo
02:53 cfmweston joined #mojo
02:54 human39 joined #mojo
02:54 cfmweston Hello, does any one here have experience with Mojo::IOLoop->delay() ?
02:57 cfmweston Inside a Controller in a Mojolicious app, I'm using Mojo::IOLoop->delay() with 3 sub{} callbacks. Given the documentation I'm expecting that they will run sequentially. Am I correct?
02:59 amirite joined #mojo
03:02 human39 joined #mojo
03:06 amirite joined #mojo
03:07 d4rkie joined #mojo
03:14 amirite joined #mojo
03:16 Koterpillar joined #mojo
03:18 Koterpillar I implemented MyApp::Command::blah; how do I now start it through Mojolicious::Commands->start_app('MyApp') ?
03:24 amirite joined #mojo
03:25 noganex joined #mojo
03:27 jberger Koterpillar, you understand that Commands are typically intended to be run as command-line programs?
03:31 Koterpillar Yes, that's the last command in my myapp.pl script
03:34 Koterpillar but I can run 'myapp.pl daemon', just not 'myapp.pl blah'
03:44 ilbot2 joined #mojo
03:44 Topic for #mojo is now Mojolicious real-time web framework 3.0 🌈 http://mojolicio.us 🌈 http://irclog.perlgeek.de/mojo/today 🌈 Now with 50% more refracted light!
03:44 jberger http://mojolicio.us/perldoc/Mojolicious/Gui​des/Cookbook#Adding_commands_to_Mojolicious
03:44 jberger see the third code block
03:47 Koterpillar Ah! There it is!
03:47 Koterpillar Thank you.
03:48 Koterpillar I was pushing it before start_app, so it was in the wrong Commands instance. :\
03:57 mattastrophe joined #mojo
04:01 mweston joined #mojo
04:01 mweston Hello
04:01 mweston anybody here?
04:02 cfedde no one of consequence.
04:02 mweston can you help me?
04:03 cfedde assuming the problem is easy enough.
04:03 mweston I have a question about Mojo::IOLoop->delay()
04:04 cfedde maybe someone else who is watching might be able to help.
04:04 mweston I'm gonna post the code somewhere and see if anyone can. Gimme a sec.
04:05 jberger Koterpillar, np, enjou
04:05 jberger enjoy
04:09 mweston This is the code I'm having trouble with based on a recipe from the Mojolicious Cookbook, maybe someone can help: http://paste.scsys.co.uk/221658?tidy=on&amp​;hl=on&store=on&submit=Format+it%21
04:10 mweston in that code I only get the results from the first 3 $ua->get() calls in the first sub {} callback inside of Mojo::IOLoop->delay().
04:10 mweston Any idea why?
04:31 amirite joined #mojo
04:36 lukep joined #mojo
04:42 amirite joined #mojo
06:18 ObseLeTe joined #mojo
07:08 Vandal joined #mojo
07:20 ObseLeTe joined #mojo
07:43 Foxcool joined #mojo
07:44 Miked joined #mojo
08:41 dod joined #mojo
08:52 lukep joined #mojo
08:52 dod joined #mojo
09:00 sri o/
09:01 sri yakubori: the logo is cc-sa licensed, you can always use it to link back to mojolicious
09:14 Molaf joined #mojo
09:21 ObseLeTe joined #mojo
09:52 SmokeMachine joined #mojo
10:26 DaniBunny joined #mojo
10:33 DaniBunny joined #mojo
10:40 trexy joined #mojo
10:41 trexy Hi
10:41 mire_ joined #mojo
10:41 trexy just want to share something strange when I was setting up a route
10:42 trexy here is where I added a route:
10:42 trexy $r->route('/foo')->to('action-CreditCard#foo');
10:42 trexy in my application lib area the file is known as
10:42 trexy App/Action/CreditCard.pm
10:43 trexy if I use a studly package name (i.e., CreditCard) then the route is not found
10:43 trexy if the file is App/Action/Creditcard.pm - then all works fine
10:44 trexy how can I declare a route with a camel cased package name?
10:50 DaniBunny exit
10:50 inokenty trexy: ->to('action-credit_card#foo')
10:50 DaniBunny joined #mojo
10:51 trexy so _ is needBetween camel-cased letters?
10:51 inokenty Yep
10:51 trexy MyPackageName -> my_package_name
10:51 trexy ok
10:51 trexy thanks a lot
10:52 trexy I must have blanked where in the Routes documentation this is  mentioned - thanks for clarifying
10:53 inokenty Or you can use ->to('Action::CreditCard#foo')
10:53 inokenty trexy: http://mojolicio.us/perldoc/Mojolic​ious/Guides/Routing#Route_to_class
10:53 trexy ok - I think I like that better - thanks
11:10 DaniBunny joined #mojo
11:12 b2b joined #mojo
11:17 DaniBunny joined #mojo
11:20 trexy left #mojo
12:10 mire_ joined #mojo
12:16 yakubori joined #mojo
13:20 d4rkie joined #mojo
13:26 cornelius joined #mojo
13:29 tadamo_ joined #mojo
14:10 mire_ joined #mojo
14:29 laidback_01 joined #mojo
14:36 Miked joined #mojo
14:45 good_news_everyone joined #mojo
14:45 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/DZzqpQ
14:45 good_news_everyone mojo/master f3b5e9e Sebastian Riedel: add plugin system to highlights
14:45 good_news_everyone left #mojo
14:51 good_news_everyone joined #mojo
14:51 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/MGdFyw
14:51 good_news_everyone mojo/master 62c82ff Sebastian Riedel: fixed plugin list
14:51 good_news_everyone left #mojo
14:52 ObseLeTe joined #mojo
15:05 jpn joined #mojo
15:09 good_news_everyone joined #mojo
15:09 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/wonSfA
15:09 good_news_everyone mojo/master ad46042 Sebastian Riedel: documentation tweaks
15:09 good_news_everyone left #mojo
15:09 ObseLeTe joined #mojo
15:12 gryphon joined #mojo
15:16 Britzel joined #mojo
15:18 jpn joined #mojo
15:23 vervain Mojolicious::Guides::Cookbook s/cotains/contains/
15:27 mire_ joined #mojo
15:27 good_news_everyone joined #mojo
15:27 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/CxRDXw
15:27 good_news_everyone mojo/master d5b4b61 Sebastian Riedel: fixed typo in cookbook
15:27 good_news_everyone left #mojo
15:33 ObseLeTe joined #mojo
15:38 bluescreen joined #mojo
15:40 mattastrophe joined #mojo
15:48 b2b joined #mojo
16:20 tadamo_ joined #mojo
16:36 labrown joined #mojo
16:40 jpn joined #mojo
16:41 vervain joined #mojo
16:56 basic61 i'm confused about the template naming, in one case the controller directory must be lower case ("templates/main/index.html.ep) otherwise mojo says Template not found.
16:56 basic61 in another case it has to be upper case ("templates/Main/index.html.ep").
16:56 basic61 the routes are the same in both projects to('Main#index') and the controller class is also upper case "Main".
16:57 basic61 how come the "Main" directory must be lower case in that one project?
17:05 xaka joined #mojo
17:16 mire_ joined #mojo
17:31 dod joined #mojo
17:32 dod joined #mojo
17:39 yakubori joined #mojo
17:41 SmokeMachine joined #mojo
17:46 jnbek^dt joined #mojo
18:09 inokenty basic61: All templates are lowercased
18:10 basic61 inokenty: then why does mojolicious say template ("templates/Main/index.html.ep") not found if i name the directory "main"?
18:17 marcus basic61: the route should probably be to 'main#index' even tho the controller is Main.
18:28 rem_lex|pivo joined #mojo
18:31 basic61 marcus if the route is lowercase main and the directory is too, it works. but again, why does it work in one case and not in the other case?
18:31 basic61 seems so random
18:33 marcus basic61: I'm thinking that your variant should probably be a syntax error, but I sri probably has a better answer.
18:40 sh4 joined #mojo
18:53 sri marcus: i don't care as long as there's no minimal test case
18:54 marcus sri: seems like it should be fairly easy to test, but what is the expected behavior for uppercase in ->to ?
18:54 SmokeMachine joined #mojo
18:54 sri marcus: is there a test case?
18:54 sri otherwise it's undefined
18:56 SmokeMac_ joined #mojo
18:57 marcus sri: not in t/mojolicious/routes.t at least.
18:58 sri as far as i can see it's tested and works flawless
18:59 sri https://github.com/kraih/mojo/blob/master/​t/mojolicious/lib/MojoliciousTest.pm#L125
19:01 marcus sri: yeah, just found it as well.
19:03 marcus basic61: what you did should be working according to the mojolicious test suite.
19:04 marcus basic61: t/mojolicious/app.t gets /test7 which in turn renders foo/bar/test.html.ep based on ->to('Foo::Bar#test')
19:06 SmokeMachine joined #mojo
19:06 sri this is why i usually insist on test cases
19:07 basic61 just like in this example code, my routes use upper case controller names
19:07 basic61 in this example, both controller directories foo and bar are lower case... which only works in one of two mojolicious projects i'm currently working on
19:08 * sri dies of too much vague
19:08 basic61 when I find some time, i'll create a little test case
19:11 sri it takes like 2 minutes
19:11 sri MOJO_LOG_LEVEL=debug perl -Mojo -E 'get->to("Foo#bar"); app->start' get -M HEAD /
19:14 * sri waits for the obligatory "sorry guys, this one project is using mojolicious 1.x..."
19:15 inokenty =)
19:21 SmokeMac_ joined #mojo
19:23 basic61 sri no, it's actually mojolicious 3.70. and i'm sorry, i'm not familiar with using mojolicious on command line, so i don't know how to complete your suggested command so it'll work...
19:24 basic61 but as for the logging - mojolicious is already logging into the "log" directory i've created
19:26 mire_ joined #mojo
19:29 anaio joined #mojo
19:33 SmokeMachine joined #mojo
19:40 duncanthrax joined #mojo
19:49 SmokeMac_ joined #mojo
20:19 mattastrophe joined #mojo
20:21 * sri wonders if there should be a link_to_mojolicious tag helper :)
20:21 sh4|2 joined #mojo
20:21 sri or mojolicious_logo
20:27 marcus basic61: are you on windows perchance?
20:27 basic61 marcus: no, linux, the test server is on freebsd
20:28 basic61 and it's an nfs share, not a case insensitive cifs share if that's why you're asking
20:29 marcus basic61: https://www.evernote.com/shard/s22/sh/6b274d19-007​6-42a5-9ba3-b3488f420b84/f7349520a4f86c1521d8ed109​5f75737/deep/0/Screenshot%2004.01.13%2000:29.jpg
20:29 marcus basic61: no, was only curious because you couldn't run something on the command line...
20:31 basic61 oh - i didn't say what the error was
20:31 basic61 Can't locate object method "Mojo" via package "get"
20:32 sri marcus: that's a lot of pixels
20:33 marcus sri: looks good to me ;)
20:33 basic61 shoot there's a typo but now it says "Not a code reference"
20:34 marcus basic61: probably still a typo then, why not just copy/paste it from irc like I did in the screenshot above?
20:39 lukep joined #mojo
20:39 basic61 my bad there was another typo
20:39 basic61 but what are we supposed to learn from that output? i mean if i name the controller directory "main" lower case, i get those Template not found "Main/index.html.ep" errors written to the log.
20:39 basic61 with this command line i get a 404. with upper case Main, it works and this command obviously shows a 200 ok
20:40 marcus basic61: with no directory whatsoever you can see that the output above is looking for Template "foo/bar.html.ep"
20:40 basic61 well but in my case, according to the mojo log, it's looking for upper case "Main/index.html.ep"
20:42 basic61 in both, my code and that linked example code, the route uses the upper case version to("Main#index")
20:45 marcus basic61: well, I am completely unable to reproduce that, even in this case:  MOJO_LOG_LEVEL=debug perl -Mojo -E 'package Main { use Mojo::Base 'Mojolicious::Controller'; sub index { }; }; get->to("Main#index"); app->start' get -M HEAD /
20:45 marcus it still looks for template main/index.html.ep ...
20:46 marcus can you nopaste the output you see of running the command above into a gist?
20:47 marcus feel free to run it from your home directory or whatever, it's not dependent on your current project.
20:49 basic61 HTTP 200, should i really put that in a pastebin/gist ?
20:49 basic61 it probably makes more sense if i copy my entire project (the one that looks for the upper case version), strip the irrelevant parts and load that up somewhere...
20:51 basic61 i can't get over the fact that i don't see any relevant difference between the 2 projects and yet, one of them wants the controller directory to be upper case
21:03 marcus basic61: pretty sure it doesn't output 'HTTP 200'.
21:03 marcus but I'm quite bored with this now..
21:03 * marcus &
21:14 xaka joined #mojo
21:14 vervain marcus: from the earlier command I get http://pastebin.com/HVPCgfJz
21:15 marcus vervain: interesting, that's contrary to what I see.
21:15 basic61 of course - for the record this is the full output http://paste.debian.net/221465/
21:15 basic61 anyway i'll just leave the controller dir upper case in one project and lower case in the other project.
21:15 basic61 it works that way, no idea why.
21:15 basic61 in case it causes new errors, i'll create a test project so you guys can see the code, that's the only reasonable way to go about debugging something like this i think.
21:15 basic61 thanks anyway
21:16 * vervain is quite contrary. :-)
21:16 vervain That's on Mojolicious 3.34 and Perl 5.14.2
21:16 basic61 vervain: this is exactly what my logs say, same error
21:16 marcus vervain: ans which os?
21:16 marcus and even
21:17 vervain linux, ext3
21:17 vervain Linux 2.6.32
21:18 vervain Debian squeeze
21:20 sri 3.34 is old
21:20 vervain I'm just updating now to double check.
21:20 sri 265 lines of Changes old
21:21 marcus I just tested on debian unstable with 3.69, couldn't reproduce
21:22 marcus 5.16.2 tho
21:23 sri unlikely that perl version matters, or cpan-testers would show it
21:23 vervain Looks better now: http://pastebin.com/pzb6jtaZ
21:23 marcus I have a squeeze box in the us.
21:24 sri "3.45 - Improved router and renderer to allow camel case controllers."
21:24 marcus vervain: interesting, but basic61 said he was on 3.70
21:24 amirite_ joined #mojo
21:24 sri it's a recent feature
21:24 vervain Papa got a sqeeze box
21:25 sri 3.46 even
21:26 b2b joined #mojo
21:30 vervain basic61: Are you still around?
21:31 amirite joined #mojo
21:35 ObseLeTe joined #mojo
21:45 basic61 vervain yes
21:47 basic61 i'll check something...
21:54 basic61 found it
21:58 basic61 it was a version issue, i thought i was using 3.70 in both cases, but the "upper case project" actually used 2.98 on the dev systen i'm currently using just because i had the @INC order messed up, stupid mistake
22:00 inokenty =)
22:02 bluescreen joined #mojo
22:03 bluescreen joined #mojo
22:09 yakubori joined #mojo
22:10 sri called it
22:11 wircus basic6: \o/
22:16 rhaen_fork joined #mojo
22:16 rhaen_fork hep
23:04 arthas joined #mojo
23:35 zivester joined #mojo
23:44 jzawodn joined #mojo

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